react-doctor 0.9.12-dev.1d3e4a6 → 0.9.12-dev.2133985

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.
Files changed (34) hide show
  1. package/dist/{build-section-divider-8MOZLIsm.js → build-section-divider-DQM0hZGG.js} +7 -7
  2. package/dist/{ci-BkncxruQ.js → ci-B7o1TYLf.js} +12 -12
  3. package/dist/cli.js +28 -27
  4. package/dist/{design-cWsjx19m.js → design-DL-dFjOh.js} +4 -4
  5. package/dist/{exit-gracefully-B9tEGAKH.js → exit-gracefully-A-YLrXTL.js} +6 -6
  6. package/dist/{handle-error-wbMFUdUK.js → handle-error-B6MY7nJt.js} +17 -12
  7. package/dist/index.js +209 -23
  8. package/dist/{inspect-Bz2rayph.js → inspect-BDh9LRzm.js} +16 -16
  9. package/dist/{install-DdckCi3Z.js → install-DyTkOJfe.js} +9 -9
  10. package/dist/{install-doctor-script-jOg4qbkK.js → install-doctor-script-1sBrw2pV.js} +4 -4
  11. package/dist/{install-github-workflow-C5OkC7nA.js → install-github-workflow-DHfC7l5M.js} +5 -5
  12. package/dist/{install-react-doctor-W8P-PVpX.js → install-react-doctor-C4TMh-1c.js} +8 -8
  13. package/dist/{jsx-runtime-0eiF0jis.js → jsx-runtime-dEetRYud.js} +5 -5
  14. package/dist/{print-branded-header-_cUJmAUD.js → print-branded-header-DA3lha5-.js} +4 -4
  15. package/dist/project-analysis-worker.js +53 -52
  16. package/dist/{prompt-runtime-scan-url-CV2AUqdk.js → prompt-runtime-scan-url-BiM1MLOR.js} +5 -5
  17. package/dist/{read-object-file-DOfcpaZX.js → read-object-file-BPlkYYY5.js} +4 -4
  18. package/dist/{record-metric-BA5ry-7d.js → record-metric-D-lvwUld.js} +205 -18
  19. package/dist/{report-error-CFe3r9gh.js → report-error-R7qwdCqP.js} +5 -5
  20. package/dist/{report-workflow-result-BoDN1Z77.js → report-workflow-result-CAvwgr8H.js} +5 -5
  21. package/dist/{resolve-scope-BVNh_icv.js → resolve-scope-Dzj_xz-v.js} +6 -6
  22. package/dist/{rules-CyIHtrnI.js → rules-CTgx-0Wm.js} +6 -6
  23. package/dist/{run-scan-app-BhUlnxaV.js → run-scan-app-DlH6tVzs.js} +15 -14
  24. package/dist/{runtime-scan-CUt6T5J3.js → runtime-scan-Bnh9_l_w.js} +9 -9
  25. package/dist/{sanitize-runtime-url-CWANxE3L.js → sanitize-runtime-url-CJXlzCnZ.js} +4 -4
  26. package/dist/{scan-DU_zcchs.js → scan-D5RrGccQ.js} +9 -9
  27. package/dist/{should-fail-scan-gate-CDwqCAPq.js → should-fail-scan-gate-xwJ4Hcnr.js} +11 -11
  28. package/dist/{should-skip-prompts-B9za5uX9.js → should-skip-prompts-JirKHNGh.js} +4 -4
  29. package/dist/{should-use-tui-BR82qmYC.js → should-use-tui-DFek4hnU.js} +4 -4
  30. package/dist/{telemetry-runtime-C9dZxrK_.js → telemetry-runtime-BMf4C2Ho.js} +55 -7
  31. package/dist/{version-yw_bHX_4.js → version-DHmyxBxT.js} +4 -4
  32. package/dist/{why-CdGev87Z.js → why-DwXvdA3f.js} +4 -4
  33. package/dist/{with-run-span-CCVNobt7.js → with-run-span-CRCw8uwE.js} +5 -5
  34. package/package.json +2 -2
@@ -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]="3feddfa4-c798-5030-9bdd-412426100384")}catch(e){}}();
3
- import { Kt as highlighter, Sr as isPlainObject, St as clearConfigCache, T as METRIC, Vt as getEquivalentRuleKeys, Zt as isSameRuleKey, bn as validateConfigTypes, gt as buildRuleDocsUrl, nr as COMPILER_CLEANUP_BUCKET, rn as loadConfigWithSource, rr as COMPILER_CLEANUP_RULE_KEYS, t as recordCount } from "./record-metric-BA5ry-7d.js";
4
- import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-jOg4qbkK.js";
5
- import { t as readObjectFile } from "./read-object-file-DOfcpaZX.js";
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]="193b4771-d934-5fe0-a6bd-50b354f499d5")}catch(e){}}();
3
+ import { Kt as highlighter, Sr as isPlainObject, St as clearConfigCache, T as METRIC, Vt as getEquivalentRuleKeys, Zt as isSameRuleKey, bn as validateConfigTypes, gt as buildRuleDocsUrl, nr as COMPILER_CLEANUP_BUCKET, rn as loadConfigWithSource, rr as COMPILER_CLEANUP_RULE_KEYS, t as recordCount } from "./record-metric-D-lvwUld.js";
4
+ import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-1sBrw2pV.js";
5
+ import { t as readObjectFile } from "./read-object-file-BPlkYYY5.js";
6
6
  import * as path$1 from "node:path";
7
7
  import * as fs$1 from "node:fs";
8
8
  import { REACT_DOCTOR_RULES } from "oxlint-plugin-react-doctor/core";
@@ -577,5 +577,5 @@ const rulesUnignoreTagAction = async (tag, options) => {
577
577
  //#endregion
578
578
  export { rulesCategoryAction, rulesDisableAction, rulesEnableAction, rulesExplainAction, rulesIgnoreTagAction, rulesListAction, rulesSetAction, rulesUnignoreTagAction };
579
579
 
580
- //# sourceMappingURL=rules-CyIHtrnI.js.map
581
- //# debugId=3feddfa4-c798-5030-9bdd-412426100384
580
+ //# sourceMappingURL=rules-CTgx-0Wm.js.map
581
+ //# debugId=193b4771-d934-5fe0-a6bd-50b354f499d5
@@ -1,12 +1,12 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e56fb95d-437f-5327-b155-bbc1a288b833")}catch(e){}}();
3
- import { Bn as sync, Bt as getDiffInfo, C as CI_TRUST_COMPANIES, G as isCiEnvironment, Hn as void_, Jt as isPathInsideDirectory, Kn as succeed, Kt as highlighter, L as TUI_REPORT_COMPACT_MAX_ROWS, Lt as getBaselineDiffPlan, R as TUI_REPORT_DETAIL_WIDTH_FRACTION, Rn as runPromise, Rt as getChangedLineRanges, T as METRIC, Ut as hasPublishedFixRecipe, V as isGitHookEnvironment, ar as DIAGNOSTIC_CATEGORY_BUCKETS, at as Progress, cr as GITHUB_ACTIONS_SETUP_URL, fn as resolveScanTarget, gt as buildRuleDocsUrl, in as mapWithConcurrency, n as recordDistribution, sn as remainingDeadlineBudgetMs, st as Reporter, t as recordCount, vr as getCategoryImpact, xn as yieldToEventLoop, yt as calculateScore } from "./record-metric-BA5ry-7d.js";
4
- import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-jOg4qbkK.js";
5
- import { i as isReactDoctorWorkflowInstalled } from "./install-github-workflow-C5OkC7nA.js";
6
- import { r as resolveScope, s as resolveBlockingLevel, t as finalizeScope, u as toForwardSlashes } from "./resolve-scope-BVNh_icv.js";
7
- import { A as resolveMergeBaseRef, B as buildNoScoreMessage, C as copyToClipboard, D as deduplicateProjectScans, E as collectProjectSourceFileCounts, F as printFooter, G as formatFixRecipeLine, H as hasLintHardFailure, I as printDiagnosticsDump, K as formatLearnMoreLine, L as formatDiagnosticSite, M as pluralize, N as formatSkippedCheckLabel, O as createInvocationInspect, P as formatElapsedTime, R as hasIncompleteScoreAnalysis, S as CLI_AGENT_BINARIES, T as buildHandoffPayload, U as buildRulePriorityMap, V as buildEmptyReportMessage, W as buildSortedRuleGroups, _ as resolveCliInspectOptions, a as projectManifestChanged, b as setUpGitHubActions, c as selectProjects, d as resolveProjectChangedLineRanges, f as resolveProjectDiffIncludePaths, g as resolveWorkspaceDeadCodeOwner, h as retryMissingProjectScores, l as buildCodeFrame, n as formatSkippedProjectsMessage, o as partitionProjectScanOutcomes, p as resolveProjectSourceFilePaths, r as validateIncludeUntrackedScope, s as discoverWorkspacePackages, t as shouldFailScanGate, u as resolveProjectScan, v as filterScansForSurface, w as launchCliAgent, x as detectLaunchableAgents, y as countUniqueScannedFiles, z as filterDiagnosticsByCategories } from "./should-fail-scan-gate-CDwqCAPq.js";
8
- import { a as recordGate, f as ONBOARDING_EVENT, n as openUrl, r as isGatePending } from "./report-workflow-result-BoDN1Z77.js";
9
- import { a as useExitOnCtrlC, c as Spinner, d as useInput, f as Transform, h as Box, i as import_react, l as useStdout, m as Text, n as registerMountedTuiRenderer, o as terminalSymbols, p as render, r as useStdoutDimensions, s as isPrintableInput, t as require_jsx_runtime, u as useApp } from "./jsx-runtime-0eiF0jis.js";
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]="24f16c3c-b61b-5460-8542-51a36e8d7775")}catch(e){}}();
3
+ import { Bn as sync, Bt as getDiffInfo, C as CI_TRUST_COMPANIES, G as isCiEnvironment, Hn as void_, Jt as isPathInsideDirectory, Kn as succeed, Kt as highlighter, L as TUI_REPORT_COMPACT_MAX_ROWS, Lt as getBaselineDiffPlan, R as TUI_REPORT_DETAIL_WIDTH_FRACTION, Rn as runPromise, Rt as getChangedLineRanges, T as METRIC, Ut as hasPublishedFixRecipe, V as isGitHookEnvironment, ar as DIAGNOSTIC_CATEGORY_BUCKETS, at as Progress, cr as GITHUB_ACTIONS_SETUP_URL, fn as resolveScanTarget, gt as buildRuleDocsUrl, in as mapWithConcurrency, n as recordDistribution, sn as remainingDeadlineBudgetMs, st as Reporter, t as recordCount, vr as getCategoryImpact, xn as yieldToEventLoop, yt as calculateScore } from "./record-metric-D-lvwUld.js";
4
+ import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-1sBrw2pV.js";
5
+ import { i as isReactDoctorWorkflowInstalled } from "./install-github-workflow-DHfC7l5M.js";
6
+ import { r as resolveScope, s as resolveBlockingLevel, t as finalizeScope, u as toForwardSlashes } from "./resolve-scope-Dzj_xz-v.js";
7
+ import { A as resolveMergeBaseRef, B as buildNoScoreMessage, C as copyToClipboard, D as deduplicateProjectScans, E as collectProjectSourceFileCounts, F as printFooter, G as formatFixRecipeLine, H as hasLintHardFailure, I as printDiagnosticsDump, K as formatLearnMoreLine, L as formatDiagnosticSite, M as pluralize, N as formatSkippedCheckLabel, O as createInvocationInspect, P as formatElapsedTime, R as hasIncompleteScoreAnalysis, S as CLI_AGENT_BINARIES, T as buildHandoffPayload, U as buildRulePriorityMap, V as buildEmptyReportMessage, W as buildSortedRuleGroups, _ as resolveCliInspectOptions, a as projectManifestChanged, b as setUpGitHubActions, c as selectProjects, d as resolveProjectChangedLineRanges, f as resolveProjectDiffIncludePaths, g as resolveWorkspaceDeadCodeOwner, h as retryMissingProjectScores, l as buildCodeFrame, n as formatSkippedProjectsMessage, o as partitionProjectScanOutcomes, p as resolveProjectSourceFilePaths, r as validateIncludeUntrackedScope, s as discoverWorkspacePackages, t as shouldFailScanGate, u as resolveProjectScan, v as filterScansForSurface, w as launchCliAgent, x as detectLaunchableAgents, y as countUniqueScannedFiles, z as filterDiagnosticsByCategories } from "./should-fail-scan-gate-xwJ4Hcnr.js";
8
+ import { a as recordGate, f as ONBOARDING_EVENT, n as openUrl, r as isGatePending } from "./report-workflow-result-CAvwgr8H.js";
9
+ import { a as useExitOnCtrlC, c as Spinner, d as useInput, f as Transform, h as Box, i as import_react, l as useStdout, m as Text, n as registerMountedTuiRenderer, o as terminalSymbols, p as render, r as useStdoutDimensions, s as isPrintableInput, t as require_jsx_runtime, u as useApp } from "./jsx-runtime-dEetRYud.js";
10
10
  import path from "node:path";
11
11
  import { performance } from "node:perf_hooks";
12
12
  import isUnicodeSupported from "is-unicode-supported";
@@ -2042,14 +2042,14 @@ const qualifyDiagnosticPaths = (diagnostics, rootDirectory, projectDirectory) =>
2042
2042
  filePath: toForwardSlashes(path.join(prefix, diagnostic.filePath))
2043
2043
  });
2044
2044
  };
2045
- const resolveScanPresentation = (input, projectScans) => {
2045
+ const resolveScanPresentation = (input, projectScans, rootDirectory) => {
2046
2046
  const isScoreDisabled = input.options?.noScore === true || projectScans.some((projectScan) => projectScan.config?.noScore === true);
2047
2047
  return {
2048
2048
  isOffline: isCiEnvironment() || input.share === false || isShareOptedOut(projectScans, input.options?.noScore),
2049
2049
  initialProgress: projectScans.length > 1 ? "Indexing workspace files…" : "Scanning project…",
2050
2050
  noScoreMessage: buildNoScoreMessage({ isScoreDisabled }),
2051
2051
  outputDirectory: input.options?.outputDirectory,
2052
- shouldRecommendCi: projectScans.length > 1 || projectScans.some((projectScan) => isCiUnconfigured(projectScan.directory)),
2052
+ shouldRecommendCi: isCiUnconfigured(rootDirectory),
2053
2053
  verbose: input.options?.verbose === true
2054
2054
  };
2055
2055
  };
@@ -2224,6 +2224,7 @@ const runMountedScan = async (rootDirectory, presentation, blockingLevel, execut
2224
2224
  const completedScan = await executeScan(context);
2225
2225
  mountedRenderer.dispose();
2226
2226
  mountedRenderer = mountRenderer("report");
2227
+ if (presentation.shouldRecommendCi) recordCount(METRIC.tuiCiRecommendationShown);
2227
2228
  await mountedRenderer.instance.waitUntilExit();
2228
2229
  mountedRenderer.dispose();
2229
2230
  if (presentation.outputDirectory !== void 0 || presentation.verbose) await runPromise(printDiagnosticsDump([...completedScan.diagnostics], presentation.outputDirectory, presentation.verbose));
@@ -2260,7 +2261,7 @@ const runSingleProjectScan = async (rootScanTarget, projectDirectory, input, sco
2260
2261
  process.stdout.write("No changed source files in the selected project.\n");
2261
2262
  return { shouldFail: false };
2262
2263
  }
2263
- const presentation = resolveScanPresentation(input, [projectScan]);
2264
+ const presentation = resolveScanPresentation(input, [projectScan], rootScanTarget.resolvedDirectory);
2264
2265
  return runMountedScan(projectScan.directory, presentation, blockingLevel, async (context) => {
2265
2266
  const result = await inspectProject(projectScan.directory, {
2266
2267
  ...resolveTuiInspectOptions(input, projectScan.config),
@@ -2342,7 +2343,7 @@ const runMultiProjectScan = async (rootScanTarget, directories, input, scopePlan
2342
2343
  isRootDeadCodeEnabled: input.options?.deadCode ?? rootProjectScan?.config?.deadCode ?? true
2343
2344
  });
2344
2345
  if (workspaceDeadCodeOwner !== null) recordCount(METRIC.scanWorkspaceMaintainabilityShared, 1, { projectCount: discoveredProjectScans.length });
2345
- return runMountedScan(rootDirectory, resolveScanPresentation(input, projectScans.map(({ projectScan }) => projectScan)), blockingLevel, async (context) => {
2346
+ return runMountedScan(rootDirectory, resolveScanPresentation(input, projectScans.map(({ projectScan }) => projectScan), rootDirectory), blockingLevel, async (context) => {
2346
2347
  const startTime = performance.now();
2347
2348
  let finishedCount = 0;
2348
2349
  recordDistribution(METRIC.scanFeedbackDelay, performance.now() - feedbackStartTime, {
@@ -2505,5 +2506,5 @@ const runScanApp = async (input) => {
2505
2506
  //#endregion
2506
2507
  export { runScanApp };
2507
2508
 
2508
- //# sourceMappingURL=run-scan-app-BhUlnxaV.js.map
2509
- //# debugId=e56fb95d-437f-5327-b155-bbc1a288b833
2509
+ //# sourceMappingURL=run-scan-app-DlH6tVzs.js.map
2510
+ //# debugId=24f16c3c-b61b-5460-8542-51a36e8d7775
@@ -1,11 +1,11 @@
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]="725ef887-7edf-5bb0-81cc-7a9e73efad9c")}catch(e){}}();
3
- import { Kt as highlighter, T as METRIC, t as recordCount, u as enableJsonMode, z as CliInputError } from "./record-metric-BA5ry-7d.js";
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]="94da1c5c-8783-519b-af0e-cb87bc75bb23")}catch(e){}}();
3
+ import { Kt as highlighter, T as METRIC, t as recordCount, u as enableJsonMode, z as CliInputError } from "./record-metric-D-lvwUld.js";
4
4
  import { t as activeScanAbortRegistry } from "./active-scan-abort-registry-DwG6tSPy.js";
5
- import { t as reportErrorToSentry } from "./report-error-CFe3r9gh.js";
6
- import { n as resetSentryRunState, r as withRunSpan } from "./with-run-span-CCVNobt7.js";
7
- import { _ as RUNTIME_SCAN_SNAPSHOT_TIMEOUT_MS, b as RUNTIME_SCAN_TRACING_COMPLETE_TIMEOUT_MS, f as RUNTIME_SCAN_PROBE_RELATIVE_PATH, g as RUNTIME_SCAN_SAFE_CDP_PAGE_URLS, h as RUNTIME_SCAN_PROBE_SNAPSHOT_TOKEN_PLACEHOLDER, l as RUNTIME_SCAN_MAX_SNAPSHOT_PAYLOAD_BYTES, m as RUNTIME_SCAN_PROBE_SNAPSHOT_BINDING_NAME_PLACEHOLDER, n as RUNTIME_SCAN_BROWSER_WIDTH_PX, o as RUNTIME_SCAN_MAX_COMPONENT_EVENTS, p as RUNTIME_SCAN_PROBE_SNAPSHOT_ATTRIBUTE_NAME_PLACEHOLDER, r as RUNTIME_SCAN_CONTROL_CHARACTERS_PATTERN, s as RUNTIME_SCAN_MAX_RECORDING_DURATION_MS, t as sanitizeRuntimeUrl, v as RUNTIME_SCAN_TRACE_CATEGORIES, y as RUNTIME_SCAN_TRACE_FILE_EXTENSION } from "./sanitize-runtime-url-CWANxE3L.js";
8
- import { r as resolveTuiEnvironment, t as isTuiEnvironmentSupported } from "./should-use-tui-BR82qmYC.js";
5
+ import { t as reportErrorToSentry } from "./report-error-R7qwdCqP.js";
6
+ import { n as resetSentryRunState, r as withRunSpan } from "./with-run-span-CRCw8uwE.js";
7
+ import { _ as RUNTIME_SCAN_SNAPSHOT_TIMEOUT_MS, b as RUNTIME_SCAN_TRACING_COMPLETE_TIMEOUT_MS, f as RUNTIME_SCAN_PROBE_RELATIVE_PATH, g as RUNTIME_SCAN_SAFE_CDP_PAGE_URLS, h as RUNTIME_SCAN_PROBE_SNAPSHOT_TOKEN_PLACEHOLDER, l as RUNTIME_SCAN_MAX_SNAPSHOT_PAYLOAD_BYTES, m as RUNTIME_SCAN_PROBE_SNAPSHOT_BINDING_NAME_PLACEHOLDER, n as RUNTIME_SCAN_BROWSER_WIDTH_PX, o as RUNTIME_SCAN_MAX_COMPONENT_EVENTS, p as RUNTIME_SCAN_PROBE_SNAPSHOT_ATTRIBUTE_NAME_PLACEHOLDER, r as RUNTIME_SCAN_CONTROL_CHARACTERS_PATTERN, s as RUNTIME_SCAN_MAX_RECORDING_DURATION_MS, t as sanitizeRuntimeUrl, v as RUNTIME_SCAN_TRACE_CATEGORIES, y as RUNTIME_SCAN_TRACE_FILE_EXTENSION } from "./sanitize-runtime-url-CJXlzCnZ.js";
8
+ import { r as resolveTuiEnvironment, t as isTuiEnvironmentSupported } from "./should-use-tui-DFek4hnU.js";
9
9
  import * as path$1 from "node:path";
10
10
  import * as fs$1 from "node:fs";
11
11
  import { randomUUID } from "node:crypto";
@@ -719,7 +719,7 @@ const resolveRuntimeScanUrl = async (url) => {
719
719
  if (url !== void 0) return url;
720
720
  if (!isTuiEnvironmentSupported(resolveTuiEnvironment(process.stderr.isTTY === true))) throw new CliInputError("A URL is required outside an interactive terminal. Run `react-doctor scan <url>`.");
721
721
  recordCount(METRIC.runtimeScanUrlPromptShown);
722
- const { promptRuntimeScanUrl } = await import("./prompt-runtime-scan-url-CV2AUqdk.js");
722
+ const { promptRuntimeScanUrl } = await import("./prompt-runtime-scan-url-BiM1MLOR.js");
723
723
  return promptRuntimeScanUrl();
724
724
  };
725
725
  const runtimeScanAction = async (url, flags) => {
@@ -766,5 +766,5 @@ const runtimeScanAction = async (url, flags) => {
766
766
  //#endregion
767
767
  export { runtimeScanAction };
768
768
 
769
- //# sourceMappingURL=runtime-scan-CUt6T5J3.js.map
770
- //# debugId=725ef887-7edf-5bb0-81cc-7a9e73efad9c
769
+ //# sourceMappingURL=runtime-scan-Bnh9_l_w.js.map
770
+ //# debugId=94da1c5c-8783-519b-af0e-cb87bc75bb23
@@ -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]="e67fc8b2-b516-5d60-ad56-2ca455ab3354")}catch(e){}}();
3
- import { z as CliInputError } from "./record-metric-BA5ry-7d.js";
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]="498e7f6f-1d7f-531c-845b-dfebe141d836")}catch(e){}}();
3
+ import { z as CliInputError } from "./record-metric-D-lvwUld.js";
4
4
  //#region src/cli/runtime-scan/constants.ts
5
5
  const RUNTIME_SCAN_MAX_COMPONENT_EVENTS = 2e3;
6
6
  const RUNTIME_SCAN_MAX_SNAPSHOT_PAYLOAD_BYTES = 5 * 1024 * 1024;
@@ -72,5 +72,5 @@ const sanitizeRuntimeUrl = (rawUrl) => {
72
72
  //#endregion
73
73
  export { RUNTIME_SCAN_SNAPSHOT_TIMEOUT_MS as _, RUNTIME_SCAN_LOCAL_DEV_PORTS as a, RUNTIME_SCAN_TRACING_COMPLETE_TIMEOUT_MS as b, RUNTIME_SCAN_MAX_SNAPSHOT_BYTES as c, RUNTIME_SCAN_MAX_TRACE_BYTES as d, RUNTIME_SCAN_PROBE_RELATIVE_PATH as f, RUNTIME_SCAN_SAFE_CDP_PAGE_URLS as g, RUNTIME_SCAN_PROBE_SNAPSHOT_TOKEN_PLACEHOLDER as h, RUNTIME_SCAN_LAYOUT_THRASH_RATIO as i, RUNTIME_SCAN_MAX_SNAPSHOT_PAYLOAD_BYTES as l, RUNTIME_SCAN_PROBE_SNAPSHOT_BINDING_NAME_PLACEHOLDER as m, RUNTIME_SCAN_BROWSER_WIDTH_PX as n, RUNTIME_SCAN_MAX_COMPONENT_EVENTS as o, RUNTIME_SCAN_PROBE_SNAPSHOT_ATTRIBUTE_NAME_PLACEHOLDER as p, RUNTIME_SCAN_CONTROL_CHARACTERS_PATTERN as r, RUNTIME_SCAN_MAX_RECORDING_DURATION_MS as s, sanitizeRuntimeUrl as t, RUNTIME_SCAN_MAX_STRING_LENGTH as u, RUNTIME_SCAN_TRACE_CATEGORIES as v, RUNTIME_SCAN_TRACE_FILE_EXTENSION as y };
74
74
 
75
- //# sourceMappingURL=sanitize-runtime-url-CWANxE3L.js.map
76
- //# debugId=e67fc8b2-b516-5d60-ad56-2ca455ab3354
75
+ //# sourceMappingURL=sanitize-runtime-url-CJXlzCnZ.js.map
76
+ //# debugId=498e7f6f-1d7f-531c-845b-dfebe141d836
@@ -1,10 +1,10 @@
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]="36d1800a-05d3-57f5-b818-d4b9442c0ee9")}catch(e){}}();
3
- import { T as METRIC, fn as resolveScanTarget, t as recordCount } from "./record-metric-BA5ry-7d.js";
4
- import { i as warnDeprecatedDiff } from "./resolve-scope-BVNh_icv.js";
5
- import { _ as resolveCliInspectOptions, i as validateModeFlags } from "./should-fail-scan-gate-CDwqCAPq.js";
6
- import { n as warnDeprecatedFailOn, r as runProjectMigrations, t as inspectAction } from "./inspect-Bz2rayph.js";
7
- import { n as shouldUseTui, r as resolveTuiEnvironment } from "./should-use-tui-BR82qmYC.js";
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]="5a8532a4-d7da-5bbc-be3a-b01ad73e1a4b")}catch(e){}}();
3
+ import { T as METRIC, fn as resolveScanTarget, t as recordCount } from "./record-metric-D-lvwUld.js";
4
+ import { i as warnDeprecatedDiff } from "./resolve-scope-Dzj_xz-v.js";
5
+ import { _ as resolveCliInspectOptions, i as validateModeFlags } from "./should-fail-scan-gate-xwJ4Hcnr.js";
6
+ import { n as warnDeprecatedFailOn, r as runProjectMigrations, t as inspectAction } from "./inspect-BDh9LRzm.js";
7
+ import { n as shouldUseTui, r as resolveTuiEnvironment } from "./should-use-tui-DFek4hnU.js";
8
8
  import path from "node:path";
9
9
  //#region src/cli/commands/scan.ts
10
10
  const runScanCommand = async (input) => {
@@ -22,7 +22,7 @@ const runScanCommand = async (input) => {
22
22
  warnDeprecatedFailOn(input.flags, scanTarget.userConfig);
23
23
  warnDeprecatedDiff(input.flags, scanTarget.userConfig);
24
24
  recordCount(METRIC.cliInvoked, 1, { command: input.invocationCommand });
25
- const { runScanApp } = await import("./run-scan-app-BhUlnxaV.js");
25
+ const { runScanApp } = await import("./run-scan-app-DlH6tVzs.js");
26
26
  const { shouldFail } = await runScanApp({
27
27
  directory: input.directory,
28
28
  scanTarget,
@@ -37,5 +37,5 @@ const runScanCommand = async (input) => {
37
37
  //#endregion
38
38
  export { runScanCommand };
39
39
 
40
- //# sourceMappingURL=scan-DU_zcchs.js.map
41
- //# debugId=36d1800a-05d3-57f5-b818-d4b9442c0ee9
40
+ //# sourceMappingURL=scan-D5RrGccQ.js.map
41
+ //# debugId=5a8532a4-d7da-5bbc-be3a-b01ad73e1a4b
@@ -1,14 +1,14 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0af88013-0e63-5d8e-8292-66400d39d007")}catch(e){}}();
3
- import { $ as Linter, A as SCAN_RESULT_CACHE_FILENAME, An as gen, At as discoverSupportedSubprojects, B as isNonInteractiveEnvironment, Bn as sync, Cn as error, Ct as collectSourceFileCountsByDirectory, Dn as Diagnostic, Dt as createNodeReadFileLinesSync, En as warn, Et as countOptInProjectRuleSelections, Fn as provide, G as isCiEnvironment, Gt as hashFileContents, Ht as groupBy, In as provideContext, J as Config, Jt as isPathInsideDirectory, K as isCiOrCodingAgentEnvironment, Kn as succeed, Kt as highlighter, Ln as provideService, Mn as map, Mt as filterPathsOutsideDirectories, Nn as orElseSucceed, Nt as filterSourceFiles, On as decodeUnknownSync, Ot as createOxlintSpawnSlots, Pn as promise, Q as LintPartialFailures, Qt as isScanComplete, Rn as runPromise, S as BASELINE_FILES_TEMP_DIR_PREFIX, Sn as Console, T as METRIC, Tn as log, Tt as computeDiagnosticDelta, U as ACTION_INPUT_ENVIRONMENT_VARIABLES, Ut as hasPublishedFixRecipe, Vn as try_, W as detectRunnerOs, Wn as mergeAll, X as Git, Xt as isReactDoctorError, Y as Files, Zn as ParentSpan, _ as VERSION, _n as shouldUseMaintainabilityLayer, _t as buildRuleSeverityControls, an as materializeSourceTree, ar as DIAGNOSTIC_CATEGORY_BUCKETS, at as Progress, bt as canonicalizeUserRuleKey, cn as resolveGithubActionsScoreMetadata, ct as Score, d as isJsonModeActive, dn as resolveScanConcurrency, dr as JSX_DUPLICATION_SOURCE_FILE_PATTERN, dt as SupplyChain, en as listSourceFiles, et as Maintainability, fn as resolveScanTarget, fr as JSX_FILE_PATTERN, gt as buildRuleDocsUrl, hr as SHARE_BASE_URL, in as mapWithConcurrency, it as PerFileLintCacheEnabled, jt as filterDiagnosticsForSurface, l as getRunId, ln as resolveLintBatchOrdering, lr as GIT_SHOW_MAX_BUFFER_BYTES, lt as SidecarLintCacheEnabled, mn as runInspect, mr as OXLINT_NODE_REQUIREMENT, mt as atomicWriteJson, n as recordDistribution, nn as listWorkspacePackages, nt as OxlintConcurrency, on as mergeReactDoctorConfigs, ot as Project, pn as restoreLegacyThrow, pr as MILLISECONDS_PER_SECOND, qt as isMonorepoRoot, r as toSpanAttributes, rt as OxlintSpawnSlots, sn as remainingDeadlineBudgetMs, sr as ENTERPRISE_CONTACT_URL, st as Reporter, t as recordCount, tn as listSourceFilesCooperative, tr as CI_URL, tt as NodeResolver, un as resolveReactDoctorCacheDir, ur as HTML_FILE_PATTERN, v as makeNoopConsole, vn as summarizeDiagnostics, vt as buildSkippedChecks, wt as computeConfigFingerprint, xn as yieldToEventLoop, xr as isFile, xt as classifyFileContext, yr as isDirectory, yt as calculateScore, z as CliInputError, zn as runSync, zt as getDiagnosticRuleIdentity } from "./record-metric-BA5ry-7d.js";
4
- import { t as getTelemetryContext } from "./telemetry-runtime-C9dZxrK_.js";
5
- import { n as buildFooterLinkLines, t as buildSectionDivider } from "./build-section-divider-8MOZLIsm.js";
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]="5234d86f-e853-5e14-98be-3a57d4d975a0")}catch(e){}}();
3
+ import { $ as Linter, A as SCAN_RESULT_CACHE_FILENAME, An as gen, At as discoverSupportedSubprojects, B as isNonInteractiveEnvironment, Bn as sync, Cn as error, Ct as collectSourceFileCountsByDirectory, Dn as Diagnostic, Dt as createNodeReadFileLinesSync, En as warn, Et as countOptInProjectRuleSelections, Fn as provide, G as isCiEnvironment, Gt as hashFileContents, Ht as groupBy, In as provideContext, J as Config, Jt as isPathInsideDirectory, K as isCiOrCodingAgentEnvironment, Kn as succeed, Kt as highlighter, Ln as provideService, Mn as map, Mt as filterPathsOutsideDirectories, Nn as orElseSucceed, Nt as filterSourceFiles, On as decodeUnknownSync, Ot as createOxlintSpawnSlots, Pn as promise, Q as LintPartialFailures, Qt as isScanComplete, Rn as runPromise, S as BASELINE_FILES_TEMP_DIR_PREFIX, Sn as Console, T as METRIC, Tn as log, Tt as computeDiagnosticDelta, U as ACTION_INPUT_ENVIRONMENT_VARIABLES, Ut as hasPublishedFixRecipe, Vn as try_, W as detectRunnerOs, Wn as mergeAll, X as Git, Xt as isReactDoctorError, Y as Files, Zn as ParentSpan, _ as VERSION, _n as shouldUseMaintainabilityLayer, _t as buildRuleSeverityControls, an as materializeSourceTree, ar as DIAGNOSTIC_CATEGORY_BUCKETS, at as Progress, bt as canonicalizeUserRuleKey, cn as resolveGithubActionsScoreMetadata, ct as Score, d as isJsonModeActive, dn as resolveScanConcurrency, dr as JSX_DUPLICATION_SOURCE_FILE_PATTERN, dt as SupplyChain, en as listSourceFiles, et as Maintainability, fn as resolveScanTarget, fr as JSX_FILE_PATTERN, gt as buildRuleDocsUrl, hr as SHARE_BASE_URL, in as mapWithConcurrency, it as PerFileLintCacheEnabled, jt as filterDiagnosticsForSurface, l as getRunId, ln as resolveLintBatchOrdering, lr as GIT_SHOW_MAX_BUFFER_BYTES, lt as SidecarLintCacheEnabled, mn as runInspect, mr as OXLINT_NODE_REQUIREMENT, mt as atomicWriteJson, n as recordDistribution, nn as listWorkspacePackages, nt as OxlintConcurrency, on as mergeReactDoctorConfigs, ot as Project, pn as restoreLegacyThrow, pr as MILLISECONDS_PER_SECOND, qt as isMonorepoRoot, r as toSpanAttributes, rt as OxlintSpawnSlots, sn as remainingDeadlineBudgetMs, sr as ENTERPRISE_CONTACT_URL, st as Reporter, t as recordCount, tn as listSourceFilesCooperative, tr as CI_URL, tt as NodeResolver, un as resolveReactDoctorCacheDir, ur as HTML_FILE_PATTERN, v as makeNoopConsole, vn as summarizeDiagnostics, vt as buildSkippedChecks, wt as computeConfigFingerprint, xn as yieldToEventLoop, xr as isFile, xt as classifyFileContext, yr as isDirectory, yt as calculateScore, z as CliInputError, zn as runSync, zt as getDiagnosticRuleIdentity } from "./record-metric-D-lvwUld.js";
4
+ import { t as getTelemetryContext } from "./telemetry-runtime-BMf4C2Ho.js";
5
+ import { n as buildFooterLinkLines, t as buildSectionDivider } from "./build-section-divider-DQM0hZGG.js";
6
6
  import { t as activeScanAbortRegistry } from "./active-scan-abort-registry-DwG6tSPy.js";
7
- import { C as isRecord, M as cliLogger, S as getPackageJsonPath, a as installReactDoctorScriptStep, c as spinner, k as runGit, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-jOg4qbkK.js";
8
- import { d as detectDefaultBranch, l as prompts, r as installReactDoctorWorkflow, u as isCommandAvailable } from "./install-github-workflow-C5OkC7nA.js";
9
- import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, o as pickBlockingLevel, u as toForwardSlashes } from "./resolve-scope-BVNh_icv.js";
10
- import { n as resetSentryRunState, r as withRunSpan, t as recordSentryProjectContext } from "./with-run-span-CCVNobt7.js";
11
- import { h as detectAvailableAgents, t as reportWorkflowResult } from "./report-workflow-result-BoDN1Z77.js";
7
+ import { C as isRecord, M as cliLogger, S as getPackageJsonPath, a as installReactDoctorScriptStep, c as spinner, k as runGit, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-1sBrw2pV.js";
8
+ import { d as detectDefaultBranch, l as prompts, r as installReactDoctorWorkflow, u as isCommandAvailable } from "./install-github-workflow-DHfC7l5M.js";
9
+ import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, o as pickBlockingLevel, u as toForwardSlashes } from "./resolve-scope-Dzj_xz-v.js";
10
+ import { n as resetSentryRunState, r as withRunSpan, t as recordSentryProjectContext } from "./with-run-span-CRCw8uwE.js";
11
+ import { h as detectAvailableAgents, t as reportWorkflowResult } from "./report-workflow-result-CAvwgr8H.js";
12
12
  import { createRequire } from "node:module";
13
13
  import { spawn } from "node:child_process";
14
14
  import * as path$1 from "node:path";
@@ -2997,5 +2997,5 @@ const shouldFailScanGate = (input) => {
2997
2997
  //#endregion
2998
2998
  export { resolveMergeBaseRef as A, buildNoScoreMessage as B, copyToClipboard as C, deduplicateProjectScans as D, collectProjectSourceFileCounts as E, printFooter as F, formatFixRecipeLine as G, hasLintHardFailure as H, printDiagnosticsDump as I, formatLearnMoreLine as K, formatDiagnosticSite as L, pluralize as M, formatSkippedCheckLabel as N, createInvocationInspect as O, formatElapsedTime as P, hasIncompleteScoreAnalysis as R, CLI_AGENT_BINARIES as S, buildHandoffPayload as T, buildRulePriorityMap as U, buildEmptyReportMessage as V, buildSortedRuleGroups as W, resolveCliInspectOptions as _, projectManifestChanged as a, setUpGitHubActions as b, selectProjects as c, resolveProjectChangedLineRanges as d, resolveProjectDiffIncludePaths as f, resolveWorkspaceDeadCodeOwner as g, retryMissingProjectScores as h, validateModeFlags as i, printHeadlessReport as j, inspect as k, buildCodeFrame as l, resolveProjectRelativeDirectory as m, formatSkippedProjectsMessage as n, partitionProjectScanOutcomes as o, resolveProjectSourceFilePaths as p, validateIncludeUntrackedScope as r, discoverWorkspacePackages as s, shouldFailScanGate as t, resolveProjectScan as u, filterScansForSurface as v, launchCliAgent as w, detectLaunchableAgents as x, countUniqueScannedFiles as y, filterDiagnosticsByCategories as z };
2999
2999
 
3000
- //# sourceMappingURL=should-fail-scan-gate-CDwqCAPq.js.map
3001
- //# debugId=0af88013-0e63-5d8e-8292-66400d39d007
3000
+ //# sourceMappingURL=should-fail-scan-gate-xwJ4Hcnr.js.map
3001
+ //# debugId=5234d86f-e853-5e14-98be-3a57d4d975a0
@@ -1,10 +1,10 @@
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]="8d1f8205-382d-5e88-adbc-51c603910830")}catch(e){}}();
3
- import { B as isNonInteractiveEnvironment } from "./record-metric-BA5ry-7d.js";
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]="fdaeddaf-a81a-56b2-a261-5994fe4edb13")}catch(e){}}();
3
+ import { B as isNonInteractiveEnvironment } from "./record-metric-D-lvwUld.js";
4
4
  //#region src/cli/utils/should-skip-prompts.ts
5
5
  const shouldSkipPrompts = (input = {}) => Boolean(input.yes) || Boolean(input.json) || isNonInteractiveEnvironment() || !process.stdin.isTTY;
6
6
  //#endregion
7
7
  export { shouldSkipPrompts as t };
8
8
 
9
- //# sourceMappingURL=should-skip-prompts-B9za5uX9.js.map
10
- //# debugId=8d1f8205-382d-5e88-adbc-51c603910830
9
+ //# sourceMappingURL=should-skip-prompts-JirKHNGh.js.map
10
+ //# debugId=fdaeddaf-a81a-56b2-a261-5994fe4edb13
@@ -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]="11b18b5e-a590-54bc-b883-b2b36ab9b0d7")}catch(e){}}();
3
- import { B as isNonInteractiveEnvironment } from "./record-metric-BA5ry-7d.js";
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]="78dffdbe-752d-56b3-8d3a-85e8544d8dba")}catch(e){}}();
3
+ import { B as isNonInteractiveEnvironment } from "./record-metric-D-lvwUld.js";
4
4
  //#region src/cli/utils/resolve-tui-environment.ts
5
5
  const resolveTuiEnvironment = (outputIsTty = process.stdout.isTTY === true) => ({
6
6
  isNonInteractiveEnvironment: isNonInteractiveEnvironment(),
@@ -21,5 +21,5 @@ const shouldUseTui = (input) => {
21
21
  //#endregion
22
22
  export { shouldUseTui as n, resolveTuiEnvironment as r, isTuiEnvironmentSupported as t };
23
23
 
24
- //# sourceMappingURL=should-use-tui-BR82qmYC.js.map
25
- //# debugId=11b18b5e-a590-54bc-b883-b2b36ab9b0d7
24
+ //# sourceMappingURL=should-use-tui-DFek4hnU.js.map
25
+ //# debugId=78dffdbe-752d-56b3-8d3a-85e8544d8dba
@@ -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]="c19cefdf-bbc2-58dd-affd-050e66ca9200")}catch(e){}}();
3
- import { $t as layerObservability, Cr as messageFromUnknown, Jn as makeUnsafe, Rn as runPromise, Un as buildWithScope, Xn as void_, Xt as isReactDoctorError, Yt as isProjectDiscoveryError, _ as VERSION, br as isErrnoException, i as isTelemetryEnabled, kn as make, qn as close, z as CliInputError, zn as runSync } from "./record-metric-BA5ry-7d.js";
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]="f309af82-b9bb-5f6b-8b53-d81fdb327824")}catch(e){}}();
3
+ import { $t as layerObservability, Cr as messageFromUnknown, Jn as makeUnsafe, Rn as runPromise, Un as buildWithScope, Xn as void_, Xt as isReactDoctorError, Yt as isProjectDiscoveryError, _ as VERSION, br as isErrnoException, i as isTelemetryEnabled, kn as make, qn as close, z as CliInputError, zn as runSync } from "./record-metric-D-lvwUld.js";
4
4
  //#region src/cli/utils/is-environment-error.ts
5
5
  const ENVIRONMENT_ERROR_CODES = new Set([
6
6
  "EACCES",
@@ -61,6 +61,51 @@ const formatEnvironmentError = (error) => {
61
61
  }
62
62
  };
63
63
  //#endregion
64
+ //#region src/cli/utils/is-npm-cache-corruption-error.ts
65
+ const MISSING_AJV_META_SCHEMA_MESSAGES = new Set(["Cannot find module './meta/unevaluated.json'", "Cannot find module './meta/validation.json'"]);
66
+ const NPX_AJV_META_SCHEMA_REQUIRE_PATH_PATTERN = /(?:^|\/)_npx\/(?<cacheKey>[a-f0-9]{16})\/node_modules\/ajv\/dist\/refs\/json-schema-2020-12\/index\.js$/;
67
+ const isModuleNotFoundError = (error) => error instanceof Error && "code" in error && error.code === "MODULE_NOT_FOUND";
68
+ const findNpmCacheCorruptionError = (error) => {
69
+ const pendingErrors = [error];
70
+ const visitedErrors = /* @__PURE__ */ new Set();
71
+ while (pendingErrors.length > 0) {
72
+ const currentError = pendingErrors.pop();
73
+ if (typeof currentError !== "object" || currentError === null) continue;
74
+ if (visitedErrors.has(currentError)) continue;
75
+ visitedErrors.add(currentError);
76
+ if (isModuleNotFoundError(currentError)) {
77
+ const [message] = currentError.message.split("\n");
78
+ if (message && MISSING_AJV_META_SCHEMA_MESSAGES.has(message)) {
79
+ const requireStack = Array.isArray(currentError.requireStack) ? currentError.requireStack : [];
80
+ for (const requirePath of requireStack) {
81
+ if (typeof requirePath !== "string") continue;
82
+ const cacheKey = requirePath.replaceAll("\\", "/").match(NPX_AJV_META_SCHEMA_REQUIRE_PATH_PATTERN)?.groups?.cacheKey;
83
+ if (cacheKey !== void 0) return {
84
+ cacheKey,
85
+ moduleNotFoundError: currentError
86
+ };
87
+ }
88
+ }
89
+ }
90
+ if (currentError instanceof Error && currentError.cause !== void 0) pendingErrors.push(currentError.cause);
91
+ }
92
+ return null;
93
+ };
94
+ const isNpmCacheCorruptionError = (error) => findNpmCacheCorruptionError(error) !== null;
95
+ const formatNpmCacheCorruptionError = (error) => {
96
+ const corruptionMatch = findNpmCacheCorruptionError(error);
97
+ if (!corruptionMatch) return messageFromUnknown(error);
98
+ return [
99
+ "The npx cache has an incomplete Ajv installation.",
100
+ "",
101
+ "Remove this cache entry, then run React Doctor again:",
102
+ ` npm cache npx rm ${corruptionMatch.cacheKey}`,
103
+ " npx react-doctor@latest",
104
+ "",
105
+ `Original error: ${corruptionMatch.moduleNotFoundError.message}`
106
+ ].join("\n");
107
+ };
108
+ //#endregion
64
109
  //#region src/cli/utils/is-expected-user-error.ts
65
110
  /**
66
111
  * Whether `error` is an expected, user-actionable failure — the user's project
@@ -69,7 +114,7 @@ const formatEnvironmentError = (error) => {
69
114
  * `handleUserError` (a plain message — no "Something went wrong", prefilled
70
115
  * issue, Discord link, or Sentry reference), since there is no bug to report.
71
116
  *
72
- * Four distinct shapes reach the CLI's catch blocks:
117
+ * Five distinct shapes reach the CLI's catch blocks:
73
118
  *
74
119
  * - **Project-discovery failures** (`NoReactDependencyError`,
75
120
  * `ProjectNotFoundError`, `PackageJsonNotFoundError`, `NotADirectoryError`,
@@ -89,12 +134,15 @@ const formatEnvironmentError = (error) => {
89
134
  * actionable message instead of crashing. See `is-environment-error.ts` for
90
135
  * why the set stays narrow (codes that usually mean our bug keep reaching
91
136
  * Sentry).
137
+ * - **npm cache corruption** (missing Ajv meta-schema files inside `_npx`) —
138
+ * an incomplete npx package installation that the user can remove and
139
+ * reinstall.
92
140
  *
93
141
  * This composes the existing core narrowers rather than introducing a new
94
142
  * error-shape helper (AGENTS.md): it encodes CLI-layer reporting policy, not
95
143
  * knowledge of the `ReactDoctorError` shape.
96
144
  */
97
- const isExpectedUserError = (error) => error instanceof CliInputError || isProjectDiscoveryError(error) || isEnvironmentError(error) || isReactDoctorError(error) && (error.reason._tag === "GitBaseBranchInvalid" || error.reason._tag === "GitBaseBranchMissing");
145
+ const isExpectedUserError = (error) => error instanceof CliInputError || isProjectDiscoveryError(error) || isEnvironmentError(error) || isNpmCacheCorruptionError(error) || isReactDoctorError(error) && (error.reason._tag === "GitBaseBranchInvalid" || error.reason._tag === "GitBaseBranchMissing");
98
146
  //#endregion
99
147
  //#region src/cli/utils/resolve-axiom-telemetry-options.ts
100
148
  /**
@@ -197,7 +245,7 @@ const shutdownTelemetry = async () => {
197
245
  return pendingShutdown;
198
246
  };
199
247
  //#endregion
200
- export { isEnvironmentError as a, formatEnvironmentError as i, shutdownTelemetry as n, isExpectedUserError as r, getTelemetryContext as t };
248
+ export { isNpmCacheCorruptionError as a, formatNpmCacheCorruptionError as i, shutdownTelemetry as n, formatEnvironmentError as o, isExpectedUserError as r, isEnvironmentError as s, getTelemetryContext as t };
201
249
 
202
- //# sourceMappingURL=telemetry-runtime-C9dZxrK_.js.map
203
- //# debugId=c19cefdf-bbc2-58dd-affd-050e66ca9200
250
+ //# sourceMappingURL=telemetry-runtime-BMf4C2Ho.js.map
251
+ //# debugId=f309af82-b9bb-5f6b-8b53-d81fdb327824
@@ -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]="7a148021-5cee-543a-b507-026fcbc863c7")}catch(e){}}();
3
- import { T as METRIC, _ as VERSION, t as recordCount } from "./record-metric-BA5ry-7d.js";
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]="d9af157c-8beb-5970-bda5-38ef21d40fe8")}catch(e){}}();
3
+ import { T as METRIC, _ as VERSION, t as recordCount } from "./record-metric-D-lvwUld.js";
4
4
  //#region src/cli/commands/version.ts
5
5
  /**
6
6
  * oclif-style version line. 12-factor CLI Apps (#3, "What version am I
@@ -17,5 +17,5 @@ const versionAction = () => {
17
17
  //#endregion
18
18
  export { versionAction };
19
19
 
20
- //# sourceMappingURL=version-yw_bHX_4.js.map
21
- //# debugId=7a148021-5cee-543a-b507-026fcbc863c7
20
+ //# sourceMappingURL=version-DHmyxBxT.js.map
21
+ //# debugId=d9af157c-8beb-5970-bda5-38ef21d40fe8
@@ -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]="3d4347f7-a963-542b-9084-eef6d11bde9e")}catch(e){}}();
3
- import { t as inspectAction } from "./inspect-Bz2rayph.js";
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]="e2ea5b64-3e2e-58e8-bd13-a04e40cb8a21")}catch(e){}}();
3
+ import { t as inspectAction } from "./inspect-BDh9LRzm.js";
4
4
  //#region src/cli/commands/why.ts
5
5
  /**
6
6
  * `why <file:line>` — explains why a rule fired (or why a suppression didn't
@@ -17,5 +17,5 @@ const whyAction = async (location, options) => {
17
17
  //#endregion
18
18
  export { whyAction };
19
19
 
20
- //# sourceMappingURL=why-CdGev87Z.js.map
21
- //# debugId=3d4347f7-a963-542b-9084-eef6d11bde9e
20
+ //# sourceMappingURL=why-DwXvdA3f.js.map
21
+ //# debugId=e2ea5b64-3e2e-58e8-bd13-a04e40cb8a21
@@ -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]="26a0c8a5-47f3-5072-a5a2-98fb13897b6c")}catch(e){}}();
3
- import { D as NANOSECONDS_PER_MILLISECOND, In as provideContext, Xn as void_, Yn as fail, c as setSentryProjectInfo, jn as makeSpan, o as buildSentryScope, r as toSpanAttributes, s as buildSentryProjectContext, zn as runSync } from "./record-metric-BA5ry-7d.js";
4
- import { t as getTelemetryContext } from "./telemetry-runtime-C9dZxrK_.js";
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]="4617844a-0d54-50f4-843f-2a85e60c4e46")}catch(e){}}();
3
+ import { D as NANOSECONDS_PER_MILLISECOND, In as provideContext, Xn as void_, Yn as fail, c as setSentryProjectInfo, jn as makeSpan, o as buildSentryScope, r as toSpanAttributes, s as buildSentryProjectContext, zn as runSync } from "./record-metric-D-lvwUld.js";
4
+ import { t as getTelemetryContext } from "./telemetry-runtime-BMf4C2Ho.js";
5
5
  import { i as setActiveRunTrace, r as recordRunTraceId } from "./active-run-trace-dlIZeEvb.js";
6
6
  //#region src/cli/utils/with-run-span.ts
7
7
  /**
@@ -106,5 +106,5 @@ const recordSentryProjectContext = (projectInfo, rootSpan, options = {}) => {
106
106
  //#endregion
107
107
  export { resetSentryRunState as n, withRunSpan as r, recordSentryProjectContext as t };
108
108
 
109
- //# sourceMappingURL=with-run-span-CCVNobt7.js.map
110
- //# debugId=26a0c8a5-47f3-5072-a5a2-98fb13897b6c
109
+ //# sourceMappingURL=with-run-span-CRCw8uwE.js.map
110
+ //# debugId=4617844a-0d54-50f4-843f-2a85e60c4e46
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-doctor",
3
- "version": "0.9.12-dev.1d3e4a6",
3
+ "version": "0.9.12-dev.2133985",
4
4
  "description": "Your agent writes bad React. This catches it",
5
5
  "keywords": [
6
6
  "accessibility",
@@ -68,7 +68,7 @@
68
68
  "typescript": ">=5.0.4 <6",
69
69
  "yaml": "^2.9.0",
70
70
  "yoga-layout": "~3.2.1",
71
- "oxlint-plugin-react-doctor": "0.9.12-dev.1d3e4a6"
71
+ "oxlint-plugin-react-doctor": "0.9.12-dev.2133985"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@types/babel__code-frame": "^7.27.0",