react-doctor 0.9.13-dev.2e3f6eb → 0.9.13-dev.45c0df3

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-DUxdYc-w.js +80 -0
  4. package/dist/{ci-S0bTu0o7.js → ci-BwvrFxxP.js} +12 -12
  5. package/dist/cli.js +25 -26
  6. package/dist/constants-CKOk_Fa9.js +23 -0
  7. package/dist/{design-B_e6HEZ7.js → design-kKNMVr1y.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-DyTWDVj-.js → exit-gracefully-rrcHzkUN.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-4yYwwrfs.js → handle-error-CkUL31OJ.js} +5 -5
  14. package/dist/index.js +2324 -1619
  15. package/dist/{inspect-CuGcOcRw.js → inspect-DA6s8FhA.js} +25 -21
  16. package/dist/{install-HI1T486C.js → install-6tMGZzFd.js} +9 -9
  17. package/dist/{install-doctor-script-Deldi_8f.js → install-doctor-script-CjJaGxqK.js} +5 -5
  18. package/dist/{install-github-workflow-DSe3lec2.js → install-github-workflow-0aMzq1Ju.js} +5 -5
  19. package/dist/{install-react-doctor-CF-vA_AY.js → install-react-doctor-Dvq7uaam.js} +8 -8
  20. package/dist/{jsx-runtime-Dv23MVo2.js → jsx-runtime-DmLigwoS.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-DGdy9YGZ.js → print-branded-header-2XLtwL_O.js} +4 -4
  24. package/dist/project-analysis-worker.js +452 -469
  25. package/dist/{prompt-runtime-scan-url-CoDCW0Xw.js → prompt-runtime-scan-url-BqFheEqh.js} +5 -5
  26. package/dist/{read-object-file-CLvVP0OL.js → read-object-file-BC9KgyfB.js} +4 -4
  27. package/dist/{record-metric-CFTeG4Ha.js → record-metric-DadXt-YJ.js} +1818 -1062
  28. package/dist/{report-error-B_O2ZFAv.js → report-error-RqZ4TcFp.js} +7 -7
  29. package/dist/{report-workflow-result-CjDXDNp9.js → report-workflow-result-C-6ou3Yf.js} +5 -5
  30. package/dist/{resolve-scope-B-trcJ7X.js → resolve-scope-IralKJo7.js} +6 -6
  31. package/dist/{rules-VU4BYkQ8.js → rules-PiRhyXht.js} +6 -6
  32. package/dist/{run-scan-app-BfeaRuV4.js → run-scan-app-Bx3RR66H.js} +28 -22
  33. package/dist/{runtime-scan-B_Eegbyo.js → runtime-scan-CzLZG2SG.js} +11 -11
  34. package/dist/{sanitize-runtime-url-hKKd5j5H.js → sanitize-runtime-url-ChOwIs6Q.js} +4 -4
  35. package/dist/{scan-CrgcC-Rk.js → scan-BsKjedB4.js} +9 -9
  36. package/dist/{semver-DFtnEmN-.js → semver-DlmXks31.js} +3 -3
  37. package/dist/{should-fail-scan-gate-DE7RleKZ.js → should-fail-scan-gate-DKuuz_Be.js} +116 -72
  38. package/dist/{should-skip-prompts-BmYznvDr.js → should-skip-prompts-D49q53Ep.js} +4 -4
  39. package/dist/{should-use-tui-dVbYKSDM.js → should-use-tui-BSXNboYB.js} +4 -4
  40. package/dist/{telemetry-runtime-D2l_bu0o.js → telemetry-runtime-DprfIwPW.js} +153 -5
  41. package/dist/unwrap-typescript-expression-CbO_6kmC.js +14 -0
  42. package/dist/{version-CB3K7ucz.js → version-DihZTmZU.js} +4 -4
  43. package/dist/{why-CCN3R7xM.js → why-B8uIFoLE.js} +4 -4
  44. package/dist/{with-run-span-BC-NFEo9.js → with-run-span-JTZIIQT_.js} +5 -5
  45. package/package.json +6 -6
  46. package/dist/build-section-divider-DZA4c-cf.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]="43035c82-a054-500f-a6b4-541501a8fb2c")}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-CFTeG4Ha.js";
4
- import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-D2l_bu0o.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]="1e98afb3-97d6-519b-bc48-ed08df30c7da")}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-DadXt-YJ.js";
4
+ import { i as getSentry, n as shutdownTelemetry, o as isExpectedUserError } from "./telemetry-runtime-DprfIwPW.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-B_O2ZFAv.js.map
64
- //# debugId=43035c82-a054-500f-a6b4-541501a8fb2c
63
+ //# sourceMappingURL=report-error-RqZ4TcFp.js.map
64
+ //# debugId=1e98afb3-97d6-519b-bc48-ed08df30c7da
@@ -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]="12846b48-e09b-5719-8a66-89b6dbb53e1b")}catch(e){}}();
3
- import { O as REACT_DOCTOR_CONFIG_PROJECT_NAME, T as METRIC, t as recordCount } from "./record-metric-CFTeG4Ha.js";
4
- import { u as isCommandAvailable } from "./install-github-workflow-DSe3lec2.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]="c44c2196-4bbb-5c0d-9085-62f24097d1ce")}catch(e){}}();
3
+ import { O as REACT_DOCTOR_CONFIG_PROJECT_NAME, T as METRIC, t as recordCount } from "./record-metric-DadXt-YJ.js";
4
+ import { u as isCommandAvailable } from "./install-github-workflow-0aMzq1Ju.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-CjDXDNp9.js.map
279
- //# debugId=12846b48-e09b-5719-8a66-89b6dbb53e1b
278
+ //# sourceMappingURL=report-workflow-result-C-6ou3Yf.js.map
279
+ //# debugId=c44c2196-4bbb-5c0d-9085-62f24097d1ce
@@ -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]="4235e575-5856-5a8d-8d46-58d7138dff1e")}catch(e){}}();
3
- import { Jt as isPathInsideDirectory, Nt as filterSourceFiles, wr as toCanonicalPath } from "./record-metric-CFTeG4Ha.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]="c701c094-9668-578e-8fa8-2577852e7363")}catch(e){}}();
3
+ import { Ft as filterSourceFiles, Xt as isPathInsideDirectory, or as toCanonicalPath } from "./record-metric-DadXt-YJ.js";
4
4
  import { t as toForwardSlashes } from "./path-format-DnHpmJwG.js";
5
- import { M as cliLogger } from "./install-doctor-script-Deldi_8f.js";
6
- import { d as detectDefaultBranch, f as runCommand, l as prompts, u as isCommandAvailable } from "./install-github-workflow-DSe3lec2.js";
5
+ import { M as cliLogger } from "./install-doctor-script-CjJaGxqK.js";
6
+ import { d as detectDefaultBranch, f as runCommand, l as prompts, u as isCommandAvailable } from "./install-github-workflow-0aMzq1Ju.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-B-trcJ7X.js.map
337
- //# debugId=4235e575-5856-5a8d-8d46-58d7138dff1e
336
+ //# sourceMappingURL=resolve-scope-IralKJo7.js.map
337
+ //# debugId=c701c094-9668-578e-8fa8-2577852e7363
@@ -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]="03ac9e96-7ee0-57c9-bf0d-373148989b43")}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-CFTeG4Ha.js";
4
- import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-Deldi_8f.js";
5
- import { t as readObjectFile } from "./read-object-file-CLvVP0OL.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]="76170a78-fd0d-5d58-9ca4-db166ce43cc3")}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-DadXt-YJ.js";
4
+ import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-CjJaGxqK.js";
5
+ import { t as readObjectFile } from "./read-object-file-BC9KgyfB.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-VU4BYkQ8.js.map
581
- //# debugId=03ac9e96-7ee0-57c9-bf0d-373148989b43
580
+ //# sourceMappingURL=rules-PiRhyXht.js.map
581
+ //# debugId=76170a78-fd0d-5d58-9ca4-db166ce43cc3
@@ -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]="b86029da-6d89-5203-8c4c-07cf5cf48b53")}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-CFTeG4Ha.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]="c8f9e261-e88c-537a-a373-2bfe7217b372")}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-DadXt-YJ.js";
4
4
  import { t as toForwardSlashes } from "./path-format-DnHpmJwG.js";
5
- import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-Deldi_8f.js";
6
- import { i as isReactDoctorWorkflowInstalled } from "./install-github-workflow-DSe3lec2.js";
7
- import { r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-B-trcJ7X.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-DE7RleKZ.js";
9
- import { a as recordGate, f as ONBOARDING_EVENT, n as openUrl, r as isGatePending } from "./report-workflow-result-CjDXDNp9.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-Dv23MVo2.js";
5
+ import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-CjJaGxqK.js";
6
+ import { i as isReactDoctorWorkflowInstalled } from "./install-github-workflow-0aMzq1Ju.js";
7
+ import { r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-IralKJo7.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-DKuuz_Be.js";
9
+ import { a as recordGate, f as ONBOARDING_EVENT, n as openUrl, r as isGatePending } from "./report-workflow-result-C-6ou3Yf.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-DmLigwoS.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-BfeaRuV4.js.map
2511
- //# debugId=b86029da-6d89-5203-8c4c-07cf5cf48b53
2516
+ //# sourceMappingURL=run-scan-app-Bx3RR66H.js.map
2517
+ //# debugId=c8f9e261-e88c-537a-a373-2bfe7217b372
@@ -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]="b8e20c79-9998-55bb-aa66-ecf10a3316f4")}catch(e){}}();
3
- import { Kt as highlighter, T as METRIC, t as recordCount, u as enableJsonMode, z as CliInputError } from "./record-metric-CFTeG4Ha.js";
4
- import { t as activeScanAbortRegistry } from "./active-scan-abort-registry-DwG6tSPy.js";
5
- import { t as reportErrorToSentry } from "./report-error-B_O2ZFAv.js";
6
- import { n as resetSentryRunState, r as withRunSpan } from "./with-run-span-BC-NFEo9.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-hKKd5j5H.js";
8
- import { r as resolveTuiEnvironment, t as isTuiEnvironmentSupported } from "./should-use-tui-dVbYKSDM.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]="20dd09bb-f938-57ff-b074-d58c4b531a31")}catch(e){}}();
3
+ import { Jt as highlighter, T as METRIC, t as recordCount, u as enableJsonMode, z as CliInputError } from "./record-metric-DadXt-YJ.js";
4
+ import { t as activeScanAbortRegistry } from "./active-scan-abort-registry-B72ASBUh.js";
5
+ import { t as reportErrorToSentry } from "./report-error-RqZ4TcFp.js";
6
+ import { n as resetSentryRunState, r as withRunSpan } from "./with-run-span-JTZIIQT_.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-ChOwIs6Q.js";
8
+ import { r as resolveTuiEnvironment, t as isTuiEnvironmentSupported } from "./should-use-tui-BSXNboYB.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";
@@ -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-CoDCW0Xw.js");
722
+ const { promptRuntimeScanUrl } = await import("./prompt-runtime-scan-url-BqFheEqh.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-B_Eegbyo.js.map
770
- //# debugId=b8e20c79-9998-55bb-aa66-ecf10a3316f4
769
+ //# sourceMappingURL=runtime-scan-CzLZG2SG.js.map
770
+ //# debugId=20dd09bb-f938-57ff-b074-d58c4b531a31
@@ -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]="ef8d95fe-5733-5d50-baa8-d4327d607abe")}catch(e){}}();
3
- import { z as CliInputError } from "./record-metric-CFTeG4Ha.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]="cd646a83-8a82-55dd-9fd6-7810912fb44e")}catch(e){}}();
3
+ import { z as CliInputError } from "./record-metric-DadXt-YJ.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-hKKd5j5H.js.map
76
- //# debugId=ef8d95fe-5733-5d50-baa8-d4327d607abe
75
+ //# sourceMappingURL=sanitize-runtime-url-ChOwIs6Q.js.map
76
+ //# debugId=cd646a83-8a82-55dd-9fd6-7810912fb44e
@@ -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]="725bd346-66ff-5711-9ce0-e2016da3a02f")}catch(e){}}();
3
- import { T as METRIC, fn as resolveScanTarget, t as recordCount } from "./record-metric-CFTeG4Ha.js";
4
- import { i as warnDeprecatedDiff } from "./resolve-scope-B-trcJ7X.js";
5
- import { a as validateModeFlags, r as validateFilePathSelectionFlags, v as resolveCliInspectOptions } from "./should-fail-scan-gate-DE7RleKZ.js";
6
- import { n as warnDeprecatedFailOn, r as runProjectMigrations, t as inspectAction } from "./inspect-CuGcOcRw.js";
7
- import { n as shouldUseTui, r as resolveTuiEnvironment } from "./should-use-tui-dVbYKSDM.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]="5cf94bc2-d4f8-5e5f-afaf-f9eeebffc7b7")}catch(e){}}();
3
+ import { T as METRIC, mn as resolveScanTarget, t as recordCount } from "./record-metric-DadXt-YJ.js";
4
+ import { i as warnDeprecatedDiff } from "./resolve-scope-IralKJo7.js";
5
+ import { a as validateModeFlags, r as validateFilePathSelectionFlags, y as resolveCliInspectOptions } from "./should-fail-scan-gate-DKuuz_Be.js";
6
+ import { n as warnDeprecatedFailOn, r as runProjectMigrations, t as inspectAction } from "./inspect-DA6s8FhA.js";
7
+ import { n as shouldUseTui, r as resolveTuiEnvironment } from "./should-use-tui-BSXNboYB.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-BfeaRuV4.js");
31
+ const { runScanApp } = await import("./run-scan-app-Bx3RR66H.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-CrgcC-Rk.js.map
47
- //# debugId=725bd346-66ff-5711-9ce0-e2016da3a02f
46
+ //# sourceMappingURL=scan-BsKjedB4.js.map
47
+ //# debugId=5cf94bc2-d4f8-5e5f-afaf-f9eeebffc7b7
@@ -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