react-doctor 0.9.17-dev.6932e7d → 0.9.17-dev.695e46e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -68
- package/dist/{build-section-divider-CCkdYDGY.js → build-section-divider-BlNg8CJ3.js} +4 -4
- package/dist/{ci-CLau9lJp.js → ci-dPYHQlYK.js} +18 -12
- package/dist/cli.js +27 -27
- package/dist/{design-tLYKOrgj.js → design-CEbK8378.js} +4 -4
- package/dist/duplicate-jsx-worker.js +3 -3
- package/dist/{exit-gracefully-CJYxagiG.js → exit-gracefully-C8JRlcU-.js} +6 -6
- package/dist/{handle-error-CXKa5V_C.js → handle-error-qi-5p5I2.js} +5 -5
- package/dist/index.d.ts +12 -5
- package/dist/index.js +32 -25
- package/dist/{inspect-kY0lepPl.js → inspect-BJE38z7r.js} +24 -19
- package/dist/{install-CcgxmHS7.js → install-R-4Yhbnt.js} +9 -9
- package/dist/{install-doctor-script-BYia3c6r.js → install-doctor-script-CzA3N60N.js} +4 -4
- package/dist/{install-github-workflow-DT9g71vu.js → install-github-workflow-DqIx2JgD.js} +5 -5
- package/dist/{install-react-doctor-gIlaQo52.js → install-react-doctor-BzFeAPsN.js} +8 -8
- package/dist/{jsx-runtime-Dz1BgjFv.js → jsx-runtime-BkWtbZXO.js} +5 -5
- package/dist/{print-branded-header-DcuhNpZD.js → print-branded-header-CO4r1oDZ.js} +4 -4
- package/dist/{prompt-runtime-scan-url-CU7G3L34.js → prompt-runtime-scan-url-sBG2_LDZ.js} +5 -5
- package/dist/{read-object-file-vLexPMRt.js → read-object-file-Bl7a4v-9.js} +4 -4
- package/dist/{record-metric-BzJGgUyE.js → record-metric-DcSvz1k4.js} +129 -53
- package/dist/{report-error-yT3d2npg.js → report-error-BmvMTKij.js} +5 -5
- package/dist/{report-workflow-result-Ch1KGhmX.js → report-workflow-result-K7NFRSY6.js} +5 -5
- package/dist/{resolve-scan-exit-code-7pqpigjA.js → resolve-scan-exit-code-KDrMkTrJ.js} +24 -32
- package/dist/{resolve-scope-C9r6_i2P.js → resolve-scope-DIgYBn32.js} +10 -9
- package/dist/{rules-53y-4mhG.js → rules-H0yqeV5v.js} +6 -6
- package/dist/{run-scan-app-xQcO9Chd.js → run-scan-app-ChPI8NEg.js} +16 -14
- package/dist/{runtime-scan-Dna29iOk.js → runtime-scan-XUqvrTH4.js} +9 -9
- package/dist/{sanitize-runtime-url-BAn4mEFw.js → sanitize-runtime-url-D_7VZU0F.js} +4 -4
- package/dist/{scan-Dcsq2-gA.js → scan-BTohT6wy.js} +9 -9
- package/dist/{should-skip-prompts-gmTKMHB5.js → should-skip-prompts-BX-idWyW.js} +4 -4
- package/dist/{should-use-tui-C8mCTPBf.js → should-use-tui-CnsREuvI.js} +4 -4
- package/dist/skills/react-doctor/SKILL.md +9 -8
- package/dist/skills/react-doctor/references/explain.md +5 -0
- package/dist/{telemetry-runtime-DUAbnIzM.js → telemetry-runtime-BufSIW3d.js} +6 -6
- package/dist/{version-Bk87XkeX.js → version-BVBbh_L8.js} +4 -4
- package/dist/{why-Cv45HYJ4.js → why-BJoyzEcf.js} +4 -4
- package/dist/{with-run-span-CmzJ3vFq.js → with-run-span-xUMrAJ_a.js} +5 -5
- package/package.json +2 -2
|
@@ -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]="
|
|
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]="082d70d2-d243-5462-a2e8-373566f7e85c")}catch(e){}}();
|
|
3
3
|
import { D as TUI_REPORT_COMPACT_MAX_ROWS, In as getCategoryImpact, O as TUI_REPORT_DETAIL_WIDTH_FRACTION, _t as DIAGNOSTIC_CATEGORY_BUCKETS, kt as GITHUB_ACTIONS_SETUP_URL, o as CI_TRUST_COMPANIES, u as METRIC } from "./constants-Bwylqy0B.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Ct as getChangedLineRanges, En as sync, Mn as succeed, Mt as highlighter, On as void_, Q as buildRuleDocsUrl, St as getBaselineDiffPlan, T as isCiEnvironment, Tt as getDiffInfo, U as Reporter, Ut as mapWithConcurrency, V as Progress, Xt as resolveScanTarget, kt as hasPublishedFixRecipe, n as recordDistribution, qt as remainingDeadlineBudgetMs, t as recordCount, tt as calculateScore, wn as runPromise, x as isGitHookEnvironment, zn as yieldToEventLoop } from "./record-metric-DcSvz1k4.js";
|
|
5
5
|
import { t as toForwardSlashes } from "./path-format-By20mo8A.js";
|
|
6
|
-
import { N as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-
|
|
7
|
-
import { i as isReactDoctorWorkflowInstalled } from "./install-github-workflow-
|
|
8
|
-
import { r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-
|
|
9
|
-
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 resolveScanExitCode, u as selectProjects, v as resolveWorkspaceDeadCodeOwner, w as CLI_AGENT_BINARIES, x as countUniqueScannedFiles, y as resolveCliInspectOptions, z as formatDiagnosticSite } from "./resolve-scan-exit-code-
|
|
10
|
-
import { a as recordGate, f as ONBOARDING_EVENT, n as openUrl, r as isGatePending } from "./report-workflow-result-
|
|
11
|
-
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-
|
|
6
|
+
import { N as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-CzA3N60N.js";
|
|
7
|
+
import { i as isReactDoctorWorkflowInstalled } from "./install-github-workflow-DqIx2JgD.js";
|
|
8
|
+
import { r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-DIgYBn32.js";
|
|
9
|
+
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 resolveScanExitCode, u as selectProjects, v as resolveWorkspaceDeadCodeOwner, w as CLI_AGENT_BINARIES, x as countUniqueScannedFiles, y as resolveCliInspectOptions, z as formatDiagnosticSite } from "./resolve-scan-exit-code-KDrMkTrJ.js";
|
|
10
|
+
import { a as recordGate, f as ONBOARDING_EVENT, n as openUrl, r as isGatePending } from "./report-workflow-result-K7NFRSY6.js";
|
|
11
|
+
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-BkWtbZXO.js";
|
|
12
12
|
import path from "node:path";
|
|
13
13
|
import { performance } from "node:perf_hooks";
|
|
14
14
|
import isUnicodeSupported from "is-unicode-supported";
|
|
@@ -48,7 +48,8 @@ const resolveProjectTuiScanScope = (input) => {
|
|
|
48
48
|
baseFiles: baselineBaseFiles,
|
|
49
49
|
headFiles: baselineHeadFiles
|
|
50
50
|
} : void 0,
|
|
51
|
-
|
|
51
|
+
contextual: input.plan.scope === "contextual",
|
|
52
|
+
changedLineRanges: (input.plan.scope === "lines" || input.plan.scope === "contextual") && input.plan.changedLineRanges !== null ? resolveProjectChangedLineRanges(input.rootDirectory, input.projectDirectory, input.plan.changedLineRanges) : void 0,
|
|
52
53
|
supplyChainManifestChanged
|
|
53
54
|
};
|
|
54
55
|
};
|
|
@@ -72,13 +73,14 @@ const resolveTuiScanScope = async (input) => {
|
|
|
72
73
|
const baselineRef = scope === "changed" ? comparisonBaseRef : null;
|
|
73
74
|
const baselineDiffPlan = baselineRef === null ? null : await getBaselineDiffPlan(input.directory, baselineRef);
|
|
74
75
|
const linesBaseRef = diffInfo?.isCurrentChanges ? "HEAD" : comparisonBaseRef;
|
|
75
|
-
const changedLineRanges = scope === "lines" && diffInfo !== null && (diffInfo.isCurrentChanges || linesBaseRef !== null) ? await getChangedLineRanges({
|
|
76
|
+
const changedLineRanges = (scope === "lines" || scope === "contextual") && diffInfo !== null && (diffInfo.isCurrentChanges || linesBaseRef !== null) ? await getChangedLineRanges({
|
|
76
77
|
directory: input.directory,
|
|
77
78
|
baseRef: linesBaseRef ?? void 0,
|
|
78
79
|
files: [...diffInfo.changedFiles],
|
|
79
|
-
includeUntracked
|
|
80
|
+
includeUntracked,
|
|
81
|
+
includeDeletions: scope === "contextual"
|
|
80
82
|
}) : null;
|
|
81
|
-
if (scope === "lines" && changedLineRanges === null) {
|
|
83
|
+
if ((scope === "lines" || scope === "contextual") && changedLineRanges === null) {
|
|
82
84
|
cliLogger.warn("Could not determine changed lines (no base ref or git diff failed); reporting all issues in changed files.");
|
|
83
85
|
cliLogger.break();
|
|
84
86
|
}
|
|
@@ -2522,5 +2524,5 @@ const runScanApp = async (input) => {
|
|
|
2522
2524
|
//#endregion
|
|
2523
2525
|
export { runScanApp };
|
|
2524
2526
|
|
|
2525
|
-
//# sourceMappingURL=run-scan-app-
|
|
2526
|
-
//# debugId=
|
|
2527
|
+
//# sourceMappingURL=run-scan-app-ChPI8NEg.js.map
|
|
2528
|
+
//# debugId=082d70d2-d243-5462-a2e8-373566f7e85c
|
|
@@ -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]="
|
|
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]="85044e67-1de6-5a75-aacf-9e3840396c60")}catch(e){}}();
|
|
3
3
|
import { u as METRIC } from "./constants-Bwylqy0B.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Mt as highlighter, t as recordCount, u as enableJsonMode, y as CliInputError } from "./record-metric-DcSvz1k4.js";
|
|
5
5
|
import { t as activeScanAbortRegistry } from "./active-scan-abort-registry-CCTgal0O.js";
|
|
6
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
7
|
-
import { n as resetSentryRunState, r as withRunSpan } from "./with-run-span-
|
|
8
|
-
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-
|
|
9
|
-
import { r as resolveTuiEnvironment, t as isTuiEnvironmentSupported } from "./should-use-tui-
|
|
6
|
+
import { t as reportErrorToSentry } from "./report-error-BmvMTKij.js";
|
|
7
|
+
import { n as resetSentryRunState, r as withRunSpan } from "./with-run-span-xUMrAJ_a.js";
|
|
8
|
+
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-D_7VZU0F.js";
|
|
9
|
+
import { r as resolveTuiEnvironment, t as isTuiEnvironmentSupported } from "./should-use-tui-CnsREuvI.js";
|
|
10
10
|
import * as fs$1 from "node:fs";
|
|
11
11
|
import * as path$1 from "node:path";
|
|
12
12
|
import * as os$1 from "node:os";
|
|
@@ -720,7 +720,7 @@ const resolveRuntimeScanUrl = async (url) => {
|
|
|
720
720
|
if (url !== void 0) return url;
|
|
721
721
|
if (!isTuiEnvironmentSupported(resolveTuiEnvironment(process.stderr.isTTY === true))) throw new CliInputError("A URL is required outside an interactive terminal. Run `react-doctor scan <url>`.");
|
|
722
722
|
recordCount(METRIC.runtimeScanUrlPromptShown);
|
|
723
|
-
const { promptRuntimeScanUrl } = await import("./prompt-runtime-scan-url-
|
|
723
|
+
const { promptRuntimeScanUrl } = await import("./prompt-runtime-scan-url-sBG2_LDZ.js");
|
|
724
724
|
return promptRuntimeScanUrl();
|
|
725
725
|
};
|
|
726
726
|
const runtimeScanAction = async (url, flags) => {
|
|
@@ -767,5 +767,5 @@ const runtimeScanAction = async (url, flags) => {
|
|
|
767
767
|
//#endregion
|
|
768
768
|
export { runtimeScanAction };
|
|
769
769
|
|
|
770
|
-
//# sourceMappingURL=runtime-scan-
|
|
771
|
-
//# debugId=
|
|
770
|
+
//# sourceMappingURL=runtime-scan-XUqvrTH4.js.map
|
|
771
|
+
//# debugId=85044e67-1de6-5a75-aacf-9e3840396c60
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { y as CliInputError } from "./record-metric-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="49f4628e-284d-53e1-990e-909084fff729")}catch(e){}}();
|
|
3
|
+
import { y as CliInputError } from "./record-metric-DcSvz1k4.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-
|
|
76
|
-
//# debugId=
|
|
75
|
+
//# sourceMappingURL=sanitize-runtime-url-D_7VZU0F.js.map
|
|
76
|
+
//# debugId=49f4628e-284d-53e1-990e-909084fff729
|
|
@@ -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]="
|
|
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]="03e6111e-fea3-5b2c-95b1-6c71f761f47b")}catch(e){}}();
|
|
3
3
|
import { u as METRIC } from "./constants-Bwylqy0B.js";
|
|
4
|
-
import {
|
|
5
|
-
import { i as warnDeprecatedDiff } from "./resolve-scope-
|
|
6
|
-
import { n as warnDeprecatedFailOn, r as runProjectMigrations, t as inspectAction } from "./inspect-
|
|
7
|
-
import { a as validateModeFlags, r as validateFilePathSelectionFlags, y as resolveCliInspectOptions } from "./resolve-scan-exit-code-
|
|
8
|
-
import { n as shouldUseTui, r as resolveTuiEnvironment } from "./should-use-tui-
|
|
4
|
+
import { Xt as resolveScanTarget, t as recordCount } from "./record-metric-DcSvz1k4.js";
|
|
5
|
+
import { i as warnDeprecatedDiff } from "./resolve-scope-DIgYBn32.js";
|
|
6
|
+
import { n as warnDeprecatedFailOn, r as runProjectMigrations, t as inspectAction } from "./inspect-BJE38z7r.js";
|
|
7
|
+
import { a as validateModeFlags, r as validateFilePathSelectionFlags, y as resolveCliInspectOptions } from "./resolve-scan-exit-code-KDrMkTrJ.js";
|
|
8
|
+
import { n as shouldUseTui, r as resolveTuiEnvironment } from "./should-use-tui-CnsREuvI.js";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
//#region src/cli/commands/scan.ts
|
|
11
11
|
const runScanCommand = async (input) => {
|
|
@@ -29,7 +29,7 @@ const runScanCommand = async (input) => {
|
|
|
29
29
|
warnDeprecatedFailOn(input.flags, scanTarget.userConfig);
|
|
30
30
|
warnDeprecatedDiff(input.flags, scanTarget.userConfig);
|
|
31
31
|
recordCount(METRIC.cliInvoked, 1, { command: input.invocationCommand });
|
|
32
|
-
const { runScanApp } = await import("./run-scan-app-
|
|
32
|
+
const { runScanApp } = await import("./run-scan-app-ChPI8NEg.js");
|
|
33
33
|
const { exitCode } = await runScanApp({
|
|
34
34
|
directory: input.directory,
|
|
35
35
|
scanTarget,
|
|
@@ -45,5 +45,5 @@ const runScanCommand = async (input) => {
|
|
|
45
45
|
//#endregion
|
|
46
46
|
export { runScanCommand };
|
|
47
47
|
|
|
48
|
-
//# sourceMappingURL=scan-
|
|
49
|
-
//# debugId=
|
|
48
|
+
//# sourceMappingURL=scan-BTohT6wy.js.map
|
|
49
|
+
//# debugId=03e6111e-fea3-5b2c-95b1-6c71f761f47b
|
|
@@ -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]="
|
|
3
|
-
import { b as isNonInteractiveEnvironment } from "./record-metric-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fd415e4c-c50a-5152-9087-21dfa63da701")}catch(e){}}();
|
|
3
|
+
import { b as isNonInteractiveEnvironment } from "./record-metric-DcSvz1k4.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-
|
|
10
|
-
//# debugId=
|
|
9
|
+
//# sourceMappingURL=should-skip-prompts-BX-idWyW.js.map
|
|
10
|
+
//# debugId=fd415e4c-c50a-5152-9087-21dfa63da701
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { b as isNonInteractiveEnvironment } from "./record-metric-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="32f1346d-71b4-5d01-ac98-0dcb0cd82b68")}catch(e){}}();
|
|
3
|
+
import { b as isNonInteractiveEnvironment } from "./record-metric-DcSvz1k4.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-
|
|
25
|
-
//# debugId=
|
|
24
|
+
//# sourceMappingURL=should-use-tui-CnsREuvI.js.map
|
|
25
|
+
//# debugId=32f1346d-71b4-5d01-ac98-0dcb0cd82b68
|
|
@@ -52,14 +52,15 @@ When the user wants to understand a rule, disagrees with one, or wants to disabl
|
|
|
52
52
|
npx react-doctor@latest --verbose --scope changed
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
| Flag
|
|
56
|
-
|
|
|
57
|
-
| `.`
|
|
58
|
-
| `--verbose`
|
|
59
|
-
| `--scope changed`
|
|
60
|
-
| `--scope
|
|
61
|
-
| `--
|
|
62
|
-
| `
|
|
55
|
+
| Flag | Purpose |
|
|
56
|
+
| -------------------- | --------------------------------------------------------------------------------------- |
|
|
57
|
+
| `.` | Scan current directory |
|
|
58
|
+
| `--verbose` | Show affected files and line numbers per rule |
|
|
59
|
+
| `--scope changed` | Only report issues introduced vs the base branch (default: full) |
|
|
60
|
+
| `--scope contextual` | Report findings in modified functions, JSX elements, or files, as selected by each rule |
|
|
61
|
+
| `--scope lines` | Only report issues on the changed lines |
|
|
62
|
+
| `--score` | Output only the numeric score |
|
|
63
|
+
| `design` | Run only the focused UI design diagnostics |
|
|
63
64
|
|
|
64
65
|
### Reuse a base scan
|
|
65
66
|
|
|
@@ -55,6 +55,11 @@ Match the control to the intent — prefer the narrowest one:
|
|
|
55
55
|
|
|
56
56
|
How the layers combine: `ignore.tags` disables every rule carrying that tag **before** linting, so a tagged rule stays off even if `rules`/`categories` set it to `warn`/`error` (a rule-level override cannot re-enable a tag-ignored rule). For rules that aren't tag-disabled, `rules` overrides `categories` overrides the rule's default. `surfaces` is visibility-only and never changes whether a rule runs.
|
|
57
57
|
|
|
58
|
+
With `customRulesOnly: true`, ported rules stay off by default. Set a specific rule
|
|
59
|
+
to `"warn"` or `"error"` in `rules` to enable it. Current and legacy rule keys both
|
|
60
|
+
work. Category settings do not enable ported rules. Project requirements and tag
|
|
61
|
+
exclusions still apply, and the React Compiler plugin stays off.
|
|
62
|
+
|
|
58
63
|
## Config shape
|
|
59
64
|
|
|
60
65
|
Config lives in `doctor.config.ts` (or `.js`/`.mjs`/`.cjs`/`.json`/`.jsonc`), or the `reactDoctor` key in `package.json`. The `rules` commands edit whichever exists — TS/JS edits preserve formatting (via magicast) — and create `doctor.config.json` when none does, stamping `$schema`:
|
|
@@ -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]="
|
|
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]="c639ad7a-3103-5809-8c86-995b1149c6bb")}catch(e){}}();
|
|
3
3
|
import { S as SENTRY_FLUSH_TIMEOUT_MS } from "./constants-Bwylqy0B.js";
|
|
4
|
-
import {
|
|
4
|
+
import { $t as scrubSensitivePaths, Bn as messageFromUnknown, Ft as isReactDoctorError, In as void_, J as anonymizeInPlace, Nn as close, Pn as makeUnsafe, Pt as isProjectDiscoveryError, Rt as layerObservability, Tn as runSync, Un as isErrnoException, Y as anonymizeText, _ as VERSION, a as isEnvFlagEnabled, hn as make, i as isTelemetryEnabled, kn as buildWithScope, o as buildSentryScope, wn as runPromise, y as CliInputError } from "./record-metric-DcSvz1k4.js";
|
|
5
5
|
//#region src/cli/utils/is-environment-error.ts
|
|
6
6
|
const ENVIRONMENT_ERROR_CODES = new Set([
|
|
7
7
|
"EACCES",
|
|
@@ -212,13 +212,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
212
212
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
213
213
|
* standard `SENTRY_RELEASE` override.
|
|
214
214
|
*/
|
|
215
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.9.17-dev.
|
|
215
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.9.17-dev.695e46e`;
|
|
216
216
|
/**
|
|
217
217
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
218
218
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
219
219
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
220
220
|
*/
|
|
221
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.9.17-dev.
|
|
221
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.9.17-dev.695e46e") ? "development" : "production");
|
|
222
222
|
//#endregion
|
|
223
223
|
//#region src/instrument.ts
|
|
224
224
|
let sentryPromise = null;
|
|
@@ -396,5 +396,5 @@ const shutdownTelemetry = async () => {
|
|
|
396
396
|
//#endregion
|
|
397
397
|
export { initializeSentry as a, isNpmCacheCorruptionError as c, getSentry as i, formatEnvironmentError as l, shutdownTelemetry as n, isExpectedUserError as o, flushSentry as r, formatNpmCacheCorruptionError as s, getTelemetryContext as t, isEnvironmentError as u };
|
|
398
398
|
|
|
399
|
-
//# sourceMappingURL=telemetry-runtime-
|
|
400
|
-
//# debugId=
|
|
399
|
+
//# sourceMappingURL=telemetry-runtime-BufSIW3d.js.map
|
|
400
|
+
//# debugId=c639ad7a-3103-5809-8c86-995b1149c6bb
|
|
@@ -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]="
|
|
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]="64307905-2b81-55a6-8542-25e39d35fa52")}catch(e){}}();
|
|
3
3
|
import { u as METRIC } from "./constants-Bwylqy0B.js";
|
|
4
|
-
import { _ as VERSION, t as recordCount } from "./record-metric-
|
|
4
|
+
import { _ as VERSION, t as recordCount } from "./record-metric-DcSvz1k4.js";
|
|
5
5
|
//#region src/cli/commands/version.ts
|
|
6
6
|
/**
|
|
7
7
|
* oclif-style version line. 12-factor CLI Apps (#3, "What version am I
|
|
@@ -18,5 +18,5 @@ const versionAction = () => {
|
|
|
18
18
|
//#endregion
|
|
19
19
|
export { versionAction };
|
|
20
20
|
|
|
21
|
-
//# sourceMappingURL=version-
|
|
22
|
-
//# debugId=
|
|
21
|
+
//# sourceMappingURL=version-BVBbh_L8.js.map
|
|
22
|
+
//# debugId=64307905-2b81-55a6-8542-25e39d35fa52
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { t as inspectAction } from "./inspect-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="57739070-af39-57eb-b3f9-be414fea1340")}catch(e){}}();
|
|
3
|
+
import { t as inspectAction } from "./inspect-BJE38z7r.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-
|
|
21
|
-
//# debugId=
|
|
20
|
+
//# sourceMappingURL=why-BJoyzEcf.js.map
|
|
21
|
+
//# debugId=57739070-af39-57eb-b3f9-be414fea1340
|
|
@@ -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]="
|
|
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]="5ddd5988-dacd-50c3-b7a5-af124c60b2b2")}catch(e){}}();
|
|
3
3
|
import { p as NANOSECONDS_PER_MILLISECOND } from "./constants-Bwylqy0B.js";
|
|
4
|
-
import { Fn as
|
|
5
|
-
import { t as getTelemetryContext } from "./telemetry-runtime-
|
|
4
|
+
import { Fn as fail, In as void_, Sn as provideContext, Tn as runSync, _n as makeSpan, c as setSentryProjectInfo, o as buildSentryScope, r as toSpanAttributes, s as buildSentryProjectContext } from "./record-metric-DcSvz1k4.js";
|
|
5
|
+
import { t as getTelemetryContext } from "./telemetry-runtime-BufSIW3d.js";
|
|
6
6
|
import { i as setActiveRunTrace, r as recordRunTraceId } from "./active-run-trace-Dewycxda.js";
|
|
7
7
|
//#region src/cli/utils/with-run-span.ts
|
|
8
8
|
/**
|
|
@@ -107,5 +107,5 @@ const recordSentryProjectContext = (projectInfo, rootSpan, options = {}) => {
|
|
|
107
107
|
//#endregion
|
|
108
108
|
export { resetSentryRunState as n, withRunSpan as r, recordSentryProjectContext as t };
|
|
109
109
|
|
|
110
|
-
//# sourceMappingURL=with-run-span-
|
|
111
|
-
//# debugId=
|
|
110
|
+
//# sourceMappingURL=with-run-span-xUMrAJ_a.js.map
|
|
111
|
+
//# debugId=5ddd5988-dacd-50c3-b7a5-af124c60b2b2
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-doctor",
|
|
3
|
-
"version": "0.9.17-dev.
|
|
3
|
+
"version": "0.9.17-dev.695e46e",
|
|
4
4
|
"description": "Your agent writes bad React. This catches it",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"typescript": ">=5.0.4 <6",
|
|
71
71
|
"yaml": "^2.9.0",
|
|
72
72
|
"yoga-layout": "~3.2.1",
|
|
73
|
-
"oxlint-plugin-react-doctor": "0.9.17-dev.
|
|
73
|
+
"oxlint-plugin-react-doctor": "0.9.17-dev.695e46e"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@types/babel__code-frame": "^7.27.0",
|