react-doctor 0.9.13-dev.fa72869 → 0.9.13-dev.fd64d26

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 (46) hide show
  1. package/dist/_react-doctor_require-typescript-DnwIzXJn.js +7 -0
  2. package/dist/{active-scan-abort-registry-DwG6tSPy.js → active-scan-abort-registry-B72ASBUh.js} +3 -3
  3. package/dist/build-section-divider-DqBNBmQx.js +80 -0
  4. package/dist/{ci-DJX0d-zr.js → ci-C9VIuxer.js} +12 -12
  5. package/dist/cli.js +25 -26
  6. package/dist/constants-CKOk_Fa9.js +23 -0
  7. package/dist/{design-16noMOyv.js → design-Bi2Vyiox.js} +4 -4
  8. package/dist/{devtools-CC2PAZ85.js → devtools-DOdrAPkZ.js} +3 -3
  9. package/dist/duplicate-jsx-worker.d.ts +1 -0
  10. package/dist/duplicate-jsx-worker.js +636 -0
  11. package/dist/{exit-gracefully-CmnLSIyy.js → exit-gracefully-BECsBTnW.js} +7 -7
  12. package/dist/{get-east-asian-width-Bv2TD3Xj.js → get-east-asian-width-CM5BOEC-.js} +3 -3
  13. package/dist/{handle-error-BoWVnsAX.js → handle-error-Bpa6UIOi.js} +5 -5
  14. package/dist/index.js +2329 -1616
  15. package/dist/{inspect-CQjmfc6o.js → inspect-CIlLTl74.js} +25 -21
  16. package/dist/{install-BI45HWXE.js → install-CWRhGRwA.js} +9 -9
  17. package/dist/{install-doctor-script-Czibd55T.js → install-doctor-script-4bc7a9Xa.js} +5 -5
  18. package/dist/{install-github-workflow-DAW5HCoZ.js → install-github-workflow-CApF2UUE.js} +5 -5
  19. package/dist/{install-react-doctor-0EPCiZSM.js → install-react-doctor-5JVhuBwj.js} +8 -8
  20. package/dist/{jsx-runtime-CpHGdrl2.js → jsx-runtime-BiIKqx7W.js} +7 -7
  21. package/dist/oxlint-worker.d.ts +1 -0
  22. package/dist/oxlint-worker.js +135 -0
  23. package/dist/{print-branded-header-D99_D1jG.js → print-branded-header-I68eir6S.js} +4 -4
  24. package/dist/project-analysis-worker.js +452 -469
  25. package/dist/{prompt-runtime-scan-url-BXbCor1e.js → prompt-runtime-scan-url-DTURCZJx.js} +5 -5
  26. package/dist/{read-object-file-B74hRgMl.js → read-object-file-D_so7aRw.js} +4 -4
  27. package/dist/{record-metric-BcJN2xOB.js → record-metric-Cs3byi4j.js} +1823 -1059
  28. package/dist/{report-error-OirqwZb5.js → report-error-C6cwK5ek.js} +7 -7
  29. package/dist/{report-workflow-result-C4EMosul.js → report-workflow-result-C__-WR2y.js} +5 -5
  30. package/dist/{resolve-scope-CKnF1u7B.js → resolve-scope-Ded7Rst2.js} +6 -6
  31. package/dist/{rules-D-04wsFx.js → rules-zE-OOAQv.js} +6 -6
  32. package/dist/{run-scan-app-hjGd9Nt9.js → run-scan-app-vOe1geDj.js} +28 -22
  33. package/dist/{runtime-scan-5ucpiIRF.js → runtime-scan-BpV7bw6k.js} +14 -14
  34. package/dist/{sanitize-runtime-url-KJQEVCa5.js → sanitize-runtime-url-Bz3numjM.js} +5 -5
  35. package/dist/{scan-Busv3qJ_.js → scan-lvKKvrda.js} +9 -9
  36. package/dist/{semver-DFtnEmN-.js → semver-DlmXks31.js} +3 -3
  37. package/dist/{should-fail-scan-gate-D1mS86Ff.js → should-fail-scan-gate-Chyg9-UY.js} +116 -72
  38. package/dist/{should-skip-prompts-DkasjzpQ.js → should-skip-prompts-DHnGjhIu.js} +4 -4
  39. package/dist/{should-use-tui-B5bj9qhm.js → should-use-tui-DXeiBj0r.js} +4 -4
  40. package/dist/{telemetry-runtime-DFNjke5Y.js → telemetry-runtime-C4xTDemQ.js} +153 -5
  41. package/dist/unwrap-typescript-expression-CbO_6kmC.js +14 -0
  42. package/dist/{version-DKEaWdQZ.js → version-BEYXWT3R.js} +4 -4
  43. package/dist/{why-BP622crq.js → why-Bd-soKyA.js} +4 -4
  44. package/dist/{with-run-span-B9bjgvks.js → with-run-span-B6t6uEzq.js} +5 -5
  45. package/package.json +4 -4
  46. package/dist/build-section-divider-DPs8DOje.js +0 -216
@@ -1,9 +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]="c186aa02-3930-575f-bb5c-af90dae0f631")}catch(e){}}();
3
- import { N as SENTRY_FLUSH_TIMEOUT_MS, T as METRIC, Xt as isReactDoctorError, l as getRunId, o as buildSentryScope, t as recordCount } from "./record-metric-BcJN2xOB.js";
4
- import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-DFNjke5Y.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]="d1a84978-f195-5dbc-bc4c-5d042074e0e4")}catch(e){}}();
3
+ import { N as SENTRY_FLUSH_TIMEOUT_MS, Qt as isReactDoctorError, T as METRIC, l as getRunId, o as buildSentryScope, t as recordCount } from "./record-metric-Cs3byi4j.js";
4
+ import { i as getSentry, n as shutdownTelemetry, o as isExpectedUserError } from "./telemetry-runtime-C4xTDemQ.js";
5
5
  import { r as recordRunTraceId, t as getActiveRunTrace } from "./active-run-trace-dlIZeEvb.js";
6
- import * as Sentry from "@sentry/node";
7
6
  //#region src/cli/utils/report-error.ts
8
7
  /**
9
8
  * Sends an error to Sentry — enriched with a fresh snapshot of the current run
@@ -21,7 +20,8 @@ import * as Sentry from "@sentry/node";
21
20
  * original error.
22
21
  */
23
22
  const reportErrorToSentry = async (error) => {
24
- if (!Sentry.isInitialized()) return void 0;
23
+ const Sentry = await getSentry();
24
+ if (!Sentry?.isInitialized()) return void 0;
25
25
  if (isExpectedUserError(error)) return void 0;
26
26
  try {
27
27
  const { tags, contexts } = buildSentryScope();
@@ -60,5 +60,5 @@ const reportErrorToSentry = async (error) => {
60
60
  //#endregion
61
61
  export { reportErrorToSentry as t };
62
62
 
63
- //# sourceMappingURL=report-error-OirqwZb5.js.map
64
- //# debugId=c186aa02-3930-575f-bb5c-af90dae0f631
63
+ //# sourceMappingURL=report-error-C6cwK5ek.js.map
64
+ //# debugId=d1a84978-f195-5dbc-bc4c-5d042074e0e4
@@ -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]="e5336bb4-9f5c-5d0e-84e9-24d1ae7b19dc")}catch(e){}}();
3
- import { O as REACT_DOCTOR_CONFIG_PROJECT_NAME, T as METRIC, t as recordCount } from "./record-metric-BcJN2xOB.js";
4
- import { u as isCommandAvailable } from "./install-github-workflow-DAW5HCoZ.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]="b718c90c-bb84-5144-bcd3-49d5e25c6361")}catch(e){}}();
3
+ import { O as REACT_DOCTOR_CONFIG_PROJECT_NAME, T as METRIC, t as recordCount } from "./record-metric-Cs3byi4j.js";
4
+ import { u as isCommandAvailable } from "./install-github-workflow-CApF2UUE.js";
5
5
  import { spawn } from "node:child_process";
6
6
  import * as path$1 from "node:path";
7
7
  import process$1 from "node:process";
@@ -275,5 +275,5 @@ const reportWorkflowResult = (workflowSpinner, result, projectRoot) => {
275
275
  //#endregion
276
276
  export { recordGate as a, ACTION_UPGRADE_EVENT as c, INSTALL_AGENTS_PREFERENCE_ID as d, ONBOARDING_EVENT as f, detectAvailableAgents as h, readPreference as i, CI_PITCH_EVENT as l, computeDefaultSelectedAgents as m, openUrl as n, runMigrations as o, SETUP_HINT_EVENT as p, isGatePending as r, writePreference as s, reportWorkflowResult as t, HANDOFF_TARGET_PREFERENCE_ID as u };
277
277
 
278
- //# sourceMappingURL=report-workflow-result-C4EMosul.js.map
279
- //# debugId=e5336bb4-9f5c-5d0e-84e9-24d1ae7b19dc
278
+ //# sourceMappingURL=report-workflow-result-C__-WR2y.js.map
279
+ //# debugId=b718c90c-bb84-5144-bcd3-49d5e25c6361
@@ -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]="48c8a27e-7fcc-5700-8446-01037c21a079")}catch(e){}}();
3
- import { Jt as isPathInsideDirectory, Nt as filterSourceFiles, wr as toCanonicalPath } from "./record-metric-BcJN2xOB.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]="76421512-29bb-53e0-b43a-678fed6fa07d")}catch(e){}}();
3
+ import { Ft as filterSourceFiles, Xt as isPathInsideDirectory, or as toCanonicalPath } from "./record-metric-Cs3byi4j.js";
4
4
  import { t as toForwardSlashes } from "./path-format-DnHpmJwG.js";
5
- import { M as cliLogger } from "./install-doctor-script-Czibd55T.js";
6
- import { d as detectDefaultBranch, f as runCommand, l as prompts, u as isCommandAvailable } from "./install-github-workflow-DAW5HCoZ.js";
5
+ import { M as cliLogger } from "./install-doctor-script-4bc7a9Xa.js";
6
+ import { d as detectDefaultBranch, f as runCommand, l as prompts, u as isCommandAvailable } from "./install-github-workflow-CApF2UUE.js";
7
7
  import * as path$1 from "node:path";
8
8
  //#region src/cli/utils/open-workflow-pull-request.ts
9
9
  const NEW_BRANCH_PREFIX = "react-doctor/add-github-actions";
@@ -333,5 +333,5 @@ const finalizeScope = async ({ requested, diffInfo, skipPrompts, isQuiet }) => {
333
333
  //#endregion
334
334
  export { isValidBlockingLevel as a, openWorkflowPullRequest as c, warnDeprecatedDiff as i, stageWorkflowFile as l, isScopeValue as n, pickBlockingLevel as o, resolveScope as r, resolveBlockingLevel as s, finalizeScope as t };
335
335
 
336
- //# sourceMappingURL=resolve-scope-CKnF1u7B.js.map
337
- //# debugId=48c8a27e-7fcc-5700-8446-01037c21a079
336
+ //# sourceMappingURL=resolve-scope-Ded7Rst2.js.map
337
+ //# debugId=76421512-29bb-53e0-b43a-678fed6fa07d
@@ -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]="2d61499f-1638-59f8-8c7a-0fad2df32e73")}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-BcJN2xOB.js";
4
- import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-Czibd55T.js";
5
- import { t as readObjectFile } from "./read-object-file-B74hRgMl.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]="42447f8b-e7b6-5031-a24c-0fb48a3035a6")}catch(e){}}();
3
+ import { $t as isSameRuleKey, Ct as clearConfigCache, Jt as highlighter, Sn as validateConfigTypes, T as METRIC, Ut as getEquivalentRuleKeys, _t as buildRuleDocsUrl, an as loadConfigWithSource, dr as COMPILER_CLEANUP_BUCKET, fr as COMPILER_CLEANUP_RULE_KEYS, ir as isPlainObject, t as recordCount } from "./record-metric-Cs3byi4j.js";
4
+ import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-4bc7a9Xa.js";
5
+ import { t as readObjectFile } from "./read-object-file-D_so7aRw.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-D-04wsFx.js.map
581
- //# debugId=2d61499f-1638-59f8-8c7a-0fad2df32e73
580
+ //# sourceMappingURL=rules-zE-OOAQv.js.map
581
+ //# debugId=42447f8b-e7b6-5031-a24c-0fb48a3035a6
@@ -1,13 +1,13 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="32923065-9af7-5ef0-a958-6142820a69e1")}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-BcJN2xOB.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]="ff3c7491-8ce2-552a-a383-c87e2d6452a1")}catch(e){}}();
3
+ import { Bn as runPromise, Bt as getChangedLineRanges, C as CI_TRUST_COMPANIES, Dr as getCategoryImpact, G as isCiEnvironment, Gt as hasPublishedFixRecipe, Hn as sync, Ht as getDiffInfo, Jn as succeed, Jt as highlighter, L as TUI_REPORT_COMPACT_MAX_ROWS, R as TUI_REPORT_DETAIL_WIDTH_FRACTION, T as METRIC, V as isGitHookEnvironment, Wn as void_, _r as GITHUB_ACTIONS_SETUP_URL, _t as buildRuleDocsUrl, bt as calculateScore, ct as Reporter, er as yieldToEventLoop, ln as remainingDeadlineBudgetMs, mn as resolveScanTarget, mr as DIAGNOSTIC_CATEGORY_BUCKETS, n as recordDistribution, on as mapWithConcurrency, ot as Progress, t as recordCount, zt as getBaselineDiffPlan } from "./record-metric-Cs3byi4j.js";
4
4
  import { t as toForwardSlashes } from "./path-format-DnHpmJwG.js";
5
- import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-Czibd55T.js";
6
- import { i as isReactDoctorWorkflowInstalled } from "./install-github-workflow-DAW5HCoZ.js";
7
- import { r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-CKnF1u7B.js";
8
- import { B as filterDiagnosticsByCategories, C as CLI_AGENT_BINARIES, D as collectProjectSourceFileCounts, E as buildHandoffPayload, F as formatElapsedTime, G as buildSortedRuleGroups, H as buildEmptyReportMessage, I as printFooter, K as formatFixRecipeLine, L as printDiagnosticsDump, N as pluralize, O as deduplicateProjectScans, P as formatSkippedCheckLabel, R as formatDiagnosticSite, S as detectLaunchableAgents, T as launchCliAgent, U as hasLintHardFailure, V as buildNoScoreMessage, W as buildRulePriorityMap, _ as resolveWorkspaceDeadCodeOwner, b as countUniqueScannedFiles, c as discoverWorkspacePackages, d as resolveProjectScan, f as resolveProjectChangedLineRanges, g as retryMissingProjectScores, i as validateIncludeUntrackedScope, j as resolveMergeBaseRef, k as createInvocationInspect, l as selectProjects, m as resolveProjectSourceFilePaths, n as formatSkippedProjectsMessage, o as projectManifestChanged, p as resolveProjectDiffIncludePaths, q as formatLearnMoreLine, s as partitionProjectScanOutcomes, t as shouldFailScanGate, u as buildCodeFrame, v as resolveCliInspectOptions, w as copyToClipboard, x as setUpGitHubActions, y as filterScansForSurface, z as hasIncompleteScoreAnalysis } from "./should-fail-scan-gate-D1mS86Ff.js";
9
- import { a as recordGate, f as ONBOARDING_EVENT, n as openUrl, r as isGatePending } from "./report-workflow-result-C4EMosul.js";
10
- 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-CpHGdrl2.js";
5
+ import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-4bc7a9Xa.js";
6
+ import { i as isReactDoctorWorkflowInstalled } from "./install-github-workflow-CApF2UUE.js";
7
+ import { r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-Ded7Rst2.js";
8
+ import { A as createInvocationInspect, B as hasIncompleteScoreAnalysis, C as detectLaunchableAgents, D as buildHandoffPayload, E as launchCliAgent, F as formatSkippedCheckLabel, G as hasLintHardFailure, H as buildNoScoreMessage, I as formatElapsedTime, J as formatFixRecipeLine, K as buildRulePriorityMap, L as printFooter, M as resolveMergeBaseRef, O as collectProjectSourceFiles, P as pluralize, R as printDiagnosticsDump, S as setUpGitHubActions, T as copyToClipboard, U as buildEmptyReportMessage, V as filterDiagnosticsByCategories, Y as formatLearnMoreLine, _ as retryMissingProjectScores, b as filterScansForSurface, c as partitionProjectScanOutcomes, d as buildCodeFrame, f as resolveProjectScan, h as resolveProjectSourceFilePaths, i as validateIncludeUntrackedScope, k as deduplicateProjectScans, l as discoverWorkspacePackages, m as resolveProjectDiffIncludePaths, n as formatSkippedProjectsMessage, o as resolveExcludedProjectDirectories, p as resolveProjectChangedLineRanges, q as buildSortedRuleGroups, s as projectManifestChanged, t as shouldFailScanGate, u as selectProjects, v as resolveWorkspaceDeadCodeOwner, w as CLI_AGENT_BINARIES, x as countUniqueScannedFiles, y as resolveCliInspectOptions, z as formatDiagnosticSite } from "./should-fail-scan-gate-Chyg9-UY.js";
9
+ import { a as recordGate, f as ONBOARDING_EVENT, n as openUrl, r as isGatePending } from "./report-workflow-result-C__-WR2y.js";
10
+ 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-BiIKqx7W.js";
11
11
  import path from "node:path";
12
12
  import { performance } from "node:perf_hooks";
13
13
  import isUnicodeSupported from "is-unicode-supported";
@@ -2064,10 +2064,13 @@ const resolveTuiInspectOptions = (input, config) => {
2064
2064
  warnings
2065
2065
  };
2066
2066
  };
2067
- const resolveSelectedDirectories = async (rootDirectory, input) => {
2067
+ const resolveProjectSelection = async (rootDirectory, input) => {
2068
2068
  const packages = discoverWorkspacePackages(rootDirectory);
2069
- if (!(packages.length > 1 && !input.projectFlag && !input.skipPrompts && (input.configProjects ?? []).length === 0 && process.stdin.isTTY === true)) return selectProjects(rootDirectory, input.projectFlag, input.skipPrompts ?? false, input.configProjects);
2070
- return promptProjectSelection(packages, rootDirectory);
2069
+ const workspaceProjectDirectories = packages.map((workspacePackage) => workspacePackage.directory);
2070
+ return {
2071
+ selectedDirectories: packages.length > 1 && !input.projectFlag && !input.skipPrompts && (input.configProjects ?? []).length === 0 && process.stdin.isTTY === true ? await promptProjectSelection(packages, rootDirectory) : await selectProjects(rootDirectory, input.projectFlag, input.skipPrompts ?? false, input.configProjects),
2072
+ workspaceProjectDirectories
2073
+ };
2071
2074
  };
2072
2075
  const promptProjectSelection = (packages, rootDirectory) => new Promise((resolve) => {
2073
2076
  let disposeRenderer = () => {};
@@ -2249,8 +2252,9 @@ const runMountedScan = async (rootDirectory, presentation, blockingLevel, execut
2249
2252
  throw error;
2250
2253
  }
2251
2254
  };
2252
- const runSingleProjectScan = async (rootScanTarget, projectDirectory, input, scopePlan, blockingLevel, inspectProject) => {
2255
+ const runSingleProjectScan = async (rootScanTarget, projectDirectory, workspaceProjectDirectories, input, scopePlan, blockingLevel, inspectProject) => {
2253
2256
  const projectScan = await resolveProjectScan(rootScanTarget, projectDirectory);
2257
+ const isRootProject = path.resolve(projectScan.directory) === path.resolve(rootScanTarget.resolvedDirectory);
2254
2258
  const isSupplyChainEnabled = input.options?.supplyChain ?? projectScan.config?.supplyChain?.enabled ?? true;
2255
2259
  const scopeOptions = resolveProjectTuiScanScope({
2256
2260
  plan: scopePlan,
@@ -2273,7 +2277,9 @@ const runSingleProjectScan = async (rootScanTarget, projectDirectory, input, sco
2273
2277
  uiLayers: {
2274
2278
  reporter: reporterLayerForStore(context.store),
2275
2279
  progress: progressLayerForStore(context.store)
2276
- }
2280
+ },
2281
+ excludedProjectDirectories: resolveExcludedProjectDirectories(projectScan.directory, workspaceProjectDirectories),
2282
+ retainExcludedProjectDeadCodeDiagnostics: isRootProject
2277
2283
  });
2278
2284
  const reportSelection = selectReportDiagnostics({
2279
2285
  scan: {
@@ -2315,7 +2321,7 @@ const runSingleProjectScan = async (rootScanTarget, projectDirectory, input, sco
2315
2321
  };
2316
2322
  });
2317
2323
  };
2318
- const runMultiProjectScan = async (rootScanTarget, directories, input, scopePlan, blockingLevel, inspectProject) => {
2324
+ const runMultiProjectScan = async (rootScanTarget, directories, workspaceProjectDirectories, input, scopePlan, blockingLevel, inspectProject) => {
2319
2325
  const feedbackStartTime = performance.now();
2320
2326
  const rootDirectory = rootScanTarget.resolvedDirectory;
2321
2327
  const discoveredProjectScans = deduplicateProjectScans(await mapWithConcurrency([...directories], 4, (projectDirectory) => resolveProjectScan(rootScanTarget, projectDirectory)));
@@ -2356,7 +2362,7 @@ const runMultiProjectScan = async (rootScanTarget, directories, input, scopePlan
2356
2362
  });
2357
2363
  context.store.setProgress(`Scanning ${projectCount} projects…`);
2358
2364
  await yieldToEventLoop();
2359
- const precomputedSourceFileCounts = scopePlan.scope === "full" ? await collectProjectSourceFileCounts(rootDirectory, projectScans.map(({ projectScan }) => projectScan.directory)) : null;
2365
+ const precomputedSourceFiles = scopePlan.scope === "full" ? await collectProjectSourceFiles(rootDirectory, projectScans.map(({ projectScan }) => projectScan.directory)) : null;
2360
2366
  const { completedScans, skippedScans } = partitionProjectScanOutcomes(await mapWithConcurrency(projectScans, 4, async ({ projectScan, scopeOptions }) => {
2361
2367
  if (input.options?.deadlineEpochMs !== void 0 && remainingDeadlineBudgetMs(input.options.deadlineEpochMs) === 0) {
2362
2368
  finishedCount += 1;
@@ -2380,7 +2386,7 @@ const runMultiProjectScan = async (rootScanTarget, directories, input, scopePlan
2380
2386
  isCi: isCiEnvironment(),
2381
2387
  configOverride: projectScan.config,
2382
2388
  configSourceDirectory: projectScan.configSourceDirectory ?? void 0,
2383
- precomputedSourceFileCount: precomputedSourceFileCounts?.get(projectScan.directory),
2389
+ precomputedSourceFiles: precomputedSourceFiles?.get(projectScan.directory),
2384
2390
  uiLayers: {
2385
2391
  reporter: Reporter.layerNoop,
2386
2392
  progress: progressLayerForStore(context.store, {
@@ -2389,7 +2395,7 @@ const runMultiProjectScan = async (rootScanTarget, directories, input, scopePlan
2389
2395
  })
2390
2396
  },
2391
2397
  concurrentScan: true,
2392
- excludedProjectDirectories: discoveredProjectScans.filter((candidateProjectScan) => isPathInsideDirectory(candidateProjectScan.directory, projectScan.directory)).map((candidateProjectScan) => candidateProjectScan.directory),
2398
+ excludedProjectDirectories: resolveExcludedProjectDirectories(projectScan.directory, [...discoveredProjectScans.map((candidateProjectScan) => candidateProjectScan.directory), ...workspaceProjectDirectories]),
2393
2399
  retainExcludedProjectDeadCodeDiagnostics: ownsWorkspaceDeadCode
2394
2400
  });
2395
2401
  finishedCount += 1;
@@ -2497,15 +2503,15 @@ const runScanApp = async (input) => {
2497
2503
  configProjects: input.configProjects ?? scanTarget.userConfig?.projects,
2498
2504
  share: input.share ?? scanTarget.userConfig?.share ?? true
2499
2505
  };
2500
- const selectedDirectories = await resolveSelectedDirectories(rootDirectory, resolvedInput);
2506
+ const { selectedDirectories, workspaceProjectDirectories } = await resolveProjectSelection(rootDirectory, resolvedInput);
2501
2507
  const inspectProject = createInvocationInspect(input.options?.concurrency);
2502
2508
  const blockingLevel = resolveBlockingLevel({ blocking: resolvedInput.blocking }, scanTarget.userConfig);
2503
2509
  if (selectedDirectories.length === 0) return { shouldFail: false };
2504
- if (selectedDirectories.length === 1) return runSingleProjectScan(scanTarget, selectedDirectories[0], resolvedInput, scopePlan, blockingLevel, inspectProject);
2505
- return runMultiProjectScan(scanTarget, selectedDirectories, resolvedInput, scopePlan, blockingLevel, inspectProject);
2510
+ if (selectedDirectories.length === 1) return runSingleProjectScan(scanTarget, selectedDirectories[0], workspaceProjectDirectories, resolvedInput, scopePlan, blockingLevel, inspectProject);
2511
+ return runMultiProjectScan(scanTarget, selectedDirectories, workspaceProjectDirectories, resolvedInput, scopePlan, blockingLevel, inspectProject);
2506
2512
  };
2507
2513
  //#endregion
2508
2514
  export { runScanApp };
2509
2515
 
2510
- //# sourceMappingURL=run-scan-app-hjGd9Nt9.js.map
2511
- //# debugId=32923065-9af7-5ef0-a958-6142820a69e1
2516
+ //# sourceMappingURL=run-scan-app-vOe1geDj.js.map
2517
+ //# debugId=ff3c7491-8ce2-552a-a383-c87e2d6452a1
@@ -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]="57850f80-2659-57f9-a7bc-37d17b21e892")}catch(e){}}();
3
- import { Kt as highlighter, T as METRIC, t as recordCount, u as enableJsonMode, z as CliInputError } from "./record-metric-BcJN2xOB.js";
4
- import { t as activeScanAbortRegistry } from "./active-scan-abort-registry-DwG6tSPy.js";
5
- import { t as reportErrorToSentry } from "./report-error-OirqwZb5.js";
6
- import { n as resetSentryRunState, r as withRunSpan } from "./with-run-span-B9bjgvks.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-KJQEVCa5.js";
8
- import { r as resolveTuiEnvironment, t as isTuiEnvironmentSupported } from "./should-use-tui-B5bj9qhm.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]="f049e9fd-54d4-5925-8c99-c3f3160db7b2")}catch(e){}}();
3
+ import { Jt as highlighter, T as METRIC, t as recordCount, u as enableJsonMode, z as CliInputError } from "./record-metric-Cs3byi4j.js";
4
+ import { t as activeScanAbortRegistry } from "./active-scan-abort-registry-B72ASBUh.js";
5
+ import { t as reportErrorToSentry } from "./report-error-C6cwK5ek.js";
6
+ import { n as resetSentryRunState, r as withRunSpan } from "./with-run-span-B6t6uEzq.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-Bz3numjM.js";
8
+ import { r as resolveTuiEnvironment, t as isTuiEnvironmentSupported } from "./should-use-tui-DXeiBj0r.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";
12
- import * as os$1 from "node:os";
13
12
  import * as fsp from "node:fs/promises";
13
+ import * as os$1 from "node:os";
14
14
  import { createGzip } from "node:zlib";
15
15
  import { performance } from "node:perf_hooks";
16
16
  import { pipeline } from "node:stream/promises";
@@ -448,15 +448,15 @@ const startDevtoolsTrace = async (cdpSession) => {
448
448
  throw cause;
449
449
  }
450
450
  };
451
- const endDevtoolsTrace = async (cdpSession) => {
451
+ const endDevtoolsTrace = async (cdpSession, timeoutMs = RUNTIME_SCAN_TRACING_COMPLETE_TIMEOUT_MS) => {
452
452
  const traceComplete = new Promise((resolve) => {
453
453
  cdpSession.once("Tracing.tracingComplete", resolve);
454
454
  });
455
455
  let timeoutHandle;
456
456
  const traceTimeout = new Promise((_resolve, reject) => {
457
457
  timeoutHandle = setTimeout(() => {
458
- reject(/* @__PURE__ */ new Error("Chrome did not finish the performance trace in time."));
459
- }, RUNTIME_SCAN_TRACING_COMPLETE_TIMEOUT_MS);
458
+ reject(new CliInputError("Chrome did not finalize the performance trace within 60 seconds. Record a shorter interaction and retry."));
459
+ }, timeoutMs);
460
460
  });
461
461
  let stream;
462
462
  try {
@@ -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-BXbCor1e.js");
722
+ const { promptRuntimeScanUrl } = await import("./prompt-runtime-scan-url-DTURCZJx.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-5ucpiIRF.js.map
770
- //# debugId=57850f80-2659-57f9-a7bc-37d17b21e892
769
+ //# sourceMappingURL=runtime-scan-BpV7bw6k.js.map
770
+ //# debugId=f049e9fd-54d4-5925-8c99-c3f3160db7b2
@@ -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]="3c8c1c3a-3291-511c-b3f3-6b4a9843ddd7")}catch(e){}}();
3
- import { z as CliInputError } from "./record-metric-BcJN2xOB.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]="739c900d-a78f-5e9b-8917-334b39017f90")}catch(e){}}();
3
+ import { z as CliInputError } from "./record-metric-Cs3byi4j.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;
@@ -26,7 +26,7 @@ const RUNTIME_SCAN_LOCAL_DEV_PORTS = [
26
26
  ];
27
27
  const RUNTIME_SCAN_BROWSER_WIDTH_PX = 1440;
28
28
  const RUNTIME_SCAN_TRACE_FILE_EXTENSION = ".json.gz";
29
- const RUNTIME_SCAN_TRACING_COMPLETE_TIMEOUT_MS = 1e4;
29
+ const RUNTIME_SCAN_TRACING_COMPLETE_TIMEOUT_MS = 6e4;
30
30
  const RUNTIME_SCAN_PROBE_RELATIVE_PATH = "runtime-scan/browser-probe.iife.js";
31
31
  const RUNTIME_SCAN_PROBE_SNAPSHOT_BINDING_NAME_PLACEHOLDER = "__REACT_DOCTOR_RUNTIME_SCAN_CAPTURE__";
32
32
  const RUNTIME_SCAN_PROBE_SNAPSHOT_ATTRIBUTE_NAME_PLACEHOLDER = "data-react-doctor-runtime-scan-snapshot";
@@ -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-KJQEVCa5.js.map
76
- //# debugId=3c8c1c3a-3291-511c-b3f3-6b4a9843ddd7
75
+ //# sourceMappingURL=sanitize-runtime-url-Bz3numjM.js.map
76
+ //# debugId=739c900d-a78f-5e9b-8917-334b39017f90
@@ -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]="96991e4f-22a8-5864-8e7e-26aa486928ba")}catch(e){}}();
3
- import { T as METRIC, fn as resolveScanTarget, t as recordCount } from "./record-metric-BcJN2xOB.js";
4
- import { i as warnDeprecatedDiff } from "./resolve-scope-CKnF1u7B.js";
5
- import { a as validateModeFlags, r as validateFilePathSelectionFlags, v as resolveCliInspectOptions } from "./should-fail-scan-gate-D1mS86Ff.js";
6
- import { n as warnDeprecatedFailOn, r as runProjectMigrations, t as inspectAction } from "./inspect-CQjmfc6o.js";
7
- import { n as shouldUseTui, r as resolveTuiEnvironment } from "./should-use-tui-B5bj9qhm.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]="fc3675eb-4eda-5b89-aa6f-9ef410865d62")}catch(e){}}();
3
+ import { T as METRIC, mn as resolveScanTarget, t as recordCount } from "./record-metric-Cs3byi4j.js";
4
+ import { i as warnDeprecatedDiff } from "./resolve-scope-Ded7Rst2.js";
5
+ import { a as validateModeFlags, r as validateFilePathSelectionFlags, y as resolveCliInspectOptions } from "./should-fail-scan-gate-Chyg9-UY.js";
6
+ import { n as warnDeprecatedFailOn, r as runProjectMigrations, t as inspectAction } from "./inspect-CIlLTl74.js";
7
+ import { n as shouldUseTui, r as resolveTuiEnvironment } from "./should-use-tui-DXeiBj0r.js";
8
8
  import path from "node:path";
9
9
  //#region src/cli/commands/scan.ts
10
10
  const runScanCommand = async (input) => {
@@ -28,7 +28,7 @@ const runScanCommand = async (input) => {
28
28
  warnDeprecatedFailOn(input.flags, scanTarget.userConfig);
29
29
  warnDeprecatedDiff(input.flags, scanTarget.userConfig);
30
30
  recordCount(METRIC.cliInvoked, 1, { command: input.invocationCommand });
31
- const { runScanApp } = await import("./run-scan-app-hjGd9Nt9.js");
31
+ const { runScanApp } = await import("./run-scan-app-vOe1geDj.js");
32
32
  const { shouldFail } = await runScanApp({
33
33
  directory: input.directory,
34
34
  scanTarget,
@@ -43,5 +43,5 @@ const runScanCommand = async (input) => {
43
43
  //#endregion
44
44
  export { runScanCommand };
45
45
 
46
- //# sourceMappingURL=scan-Busv3qJ_.js.map
47
- //# debugId=96991e4f-22a8-5864-8e7e-26aa486928ba
46
+ //# sourceMappingURL=scan-lvKKvrda.js.map
47
+ //# debugId=fc3675eb-4eda-5b89-aa6f-9ef410865d62
@@ -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]="901ba4e5-e2df-5352-b388-d03a653e9bde")}catch(e){}}();
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]="5d8e40f7-4111-5236-adfc-3b597f28e1e3")}catch(e){}}();
3
3
  import { t as __commonJSMin } from "./chunk-ChKA3wi6.js";
4
4
  //#region ../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/constants.js
5
5
  var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -3215,5 +3215,5 @@ var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3215
3215
  //#endregion
3216
3216
  export { require_picomatch as n, require_semver as t };
3217
3217
 
3218
- //# sourceMappingURL=semver-DFtnEmN-.js.map
3219
- //# debugId=901ba4e5-e2df-5352-b388-d03a653e9bde
3218
+ //# sourceMappingURL=semver-DlmXks31.js.map
3219
+ //# debugId=5d8e40f7-4111-5236-adfc-3b597f28e1e3