react-doctor 0.9.13-dev.ff7dd67 → 0.9.14-dev.499a020
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_react-doctor_require-typescript-DXQDYeWK.js +16 -0
- package/dist/{active-run-trace-dlIZeEvb.js → active-run-trace-Dewycxda.js} +3 -3
- package/dist/{active-scan-abort-registry-DwG6tSPy.js → active-scan-abort-registry-CCTgal0O.js} +3 -3
- package/dist/build-section-divider-BsKw6rbA.js +81 -0
- package/dist/{ci-ByM_SFTq.js → ci-Y7ntr_X7.js} +14 -13
- package/dist/cli.js +31 -30
- package/dist/constants-CW_854PH.js +1035 -0
- package/dist/constants-DNh19qg9.js +23 -0
- package/dist/{design-2hjOmtV1.js → design-CZbXwzWh.js} +4 -4
- package/dist/{devtools-CC2PAZ85.js → devtools-D20sefkm.js} +3 -3
- package/dist/duplicate-jsx-worker.d.ts +1 -0
- package/dist/duplicate-jsx-worker.js +636 -0
- package/dist/{exit-gracefully-niPFXq9Y.js → exit-gracefully-Bq8kCmar.js} +7 -7
- package/dist/fs-utils-C88IbqFa.js +45 -0
- package/dist/{get-east-asian-width-Bv2TD3Xj.js → get-east-asian-width-DRPy7dqz.js} +4 -4
- package/dist/{handle-error-D-4lexec.js → handle-error-DkZtH4y1.js} +6 -5
- package/dist/index.d.ts +8511 -8509
- package/dist/index.js +61693 -60580
- package/dist/{inspect-BrctG7ql.js → inspect-4R70DaBp.js} +38 -27
- package/dist/{install-CcFc56OK.js → install-DSOkcCn6.js} +10 -9
- package/dist/{install-doctor-script-Coa2ErCg.js → install-doctor-script-k5jxcUWB.js} +17 -8
- package/dist/{install-github-workflow-DlfdrYkQ.js → install-github-workflow-Dh3nS6ms.js} +10 -10
- package/dist/{install-react-doctor-BWxqZMX-.js → install-react-doctor-NmiRJQtp.js} +15 -11
- package/dist/is-cache-globally-disabled-CoHiYz2i.js +10 -0
- package/dist/{jsx-runtime-Njm7vAoN.js → jsx-runtime-B1PPqZBs.js} +11 -10
- package/dist/oxlint-worker.d.ts +1 -0
- package/dist/oxlint-worker.js +225 -0
- package/dist/{path-format-DnHpmJwG.js → path-format-By20mo8A.js} +3 -3
- package/dist/{print-branded-header-DFkeG4BS.js → print-branded-header-ydu9MCpt.js} +4 -4
- package/dist/project-analysis-worker.js +461 -480
- package/dist/{prompt-runtime-scan-url-BenBNq25.js → prompt-runtime-scan-url-BEFbrKze.js} +6 -6
- package/dist/react-compiler-detection-worker.d.ts +1 -0
- package/dist/react-compiler-detection-worker.js +1029 -0
- package/dist/{read-object-file-CqMtxcfF.js → read-object-file-f9AWbDOo.js} +4 -4
- package/dist/{record-metric-Bkorhx43.js → record-metric-BeiisdDK.js} +12998 -12770
- package/dist/{report-error-DPjmfRi9.js → report-error-CwReeGgL.js} +9 -8
- package/dist/{report-workflow-result-CBL6CrLY.js → report-workflow-result-CRhHHcHp.js} +24 -11
- package/dist/{resolve-scope-BFloAClV.js → resolve-scope-DsrT6gaf.js} +7 -7
- package/dist/{rules-BKNy9YIl.js → rules-Bhk46JNb.js} +8 -7
- package/dist/{run-scan-app-Bc70ozp-.js → run-scan-app-B_r_jHg-.js} +30 -23
- package/dist/{runtime-scan-ODrdp5mV.js → runtime-scan-B6v3G55b.js} +13 -12
- package/dist/{sanitize-runtime-url-BYOmPSdm.js → sanitize-runtime-url-CVRMHksi.js} +4 -4
- package/dist/{scan-BfcGHHkI.js → scan-BJsk-x4c.js} +10 -9
- package/dist/{semver-DFtnEmN-.js → semver-BZIuy1gP.js} +3 -3
- package/dist/{should-fail-scan-gate-CCPDoHaM.js → should-fail-scan-gate-B8cvpr6W.js} +1339 -1283
- package/dist/{should-skip-prompts-D-ClPHHR.js → should-skip-prompts-CupUff2k.js} +4 -4
- package/dist/{should-use-tui-BaCVIPPN.js → should-use-tui-t0DIGfJ0.js} +4 -4
- package/dist/start-scan-preamble-D0QepYZ_.js +68 -0
- package/dist/start-scan-preamble-DVhXIPc0.d.ts +1 -0
- package/dist/start-scan-preamble.d.ts +1 -0
- package/dist/start-scan-preamble.js +4 -0
- package/dist/{telemetry-runtime-BGWa_GB9.js → telemetry-runtime-DfK-XYFO.js} +154 -5
- package/dist/{unref-stdin-SK3WfwxS.js → unref-stdin-D-NZBFpg.js} +3 -3
- package/dist/unwrap-typescript-expression-CrEPQUWz.js +14 -0
- package/dist/{version-DN1N-oZy.js → version-DpQFTCI_.js} +5 -4
- package/dist/{why-CyioXUF2.js → why-DA3u09OY.js} +4 -4
- package/dist/{with-run-span-GsCWW2_X.js → with-run-span-DP84SJbD.js} +7 -6
- package/package.json +9 -7
- package/dist/build-section-divider-BRuN44fL.js +0 -216
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
//#region \0react-doctor:require-typescript
|
|
3
|
+
const requireTypescript = createRequire(import.meta.url);
|
|
4
|
+
const loadTypescript = () => {
|
|
5
|
+
const realModule = requireTypescript("typescript");
|
|
6
|
+
typescriptBinding = realModule;
|
|
7
|
+
return realModule;
|
|
8
|
+
};
|
|
9
|
+
let typescriptBinding = new Proxy({}, {
|
|
10
|
+
get: (_target, key) => Reflect.get(loadTypescript(), key),
|
|
11
|
+
has: (_target, key) => Reflect.has(loadTypescript(), key)
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { typescriptBinding as t };
|
|
15
|
+
!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]="ad041add-451a-54d8-9d3a-b264e28ea9a8")}catch(e){}}();
|
|
16
|
+
//# debugId=ad041add-451a-54d8-9d3a-b264e28ea9a8
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/cli/utils/active-run-trace.ts
|
|
2
2
|
|
|
3
|
-
!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
|
+
!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]="48d55113-5c1a-5bd6-9947-ff2116274782")}catch(e){}}();
|
|
4
4
|
let activeRunTrace = null;
|
|
5
5
|
const setActiveRunTrace = (trace) => {
|
|
6
6
|
activeRunTrace = trace;
|
|
@@ -14,5 +14,5 @@ const getLastRunTraceId = () => lastRunTraceId;
|
|
|
14
14
|
//#endregion
|
|
15
15
|
export { setActiveRunTrace as i, getLastRunTraceId as n, recordRunTraceId as r, getActiveRunTrace as t };
|
|
16
16
|
|
|
17
|
-
//# sourceMappingURL=active-run-trace-
|
|
18
|
-
//# debugId=
|
|
17
|
+
//# sourceMappingURL=active-run-trace-Dewycxda.js.map
|
|
18
|
+
//# debugId=48d55113-5c1a-5bd6-9947-ff2116274782
|
package/dist/{active-scan-abort-registry-DwG6tSPy.js → active-scan-abort-registry-CCTgal0O.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/cli/utils/active-scan-abort-registry.ts
|
|
2
2
|
|
|
3
|
-
!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
|
+
!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]="e0d0ca7d-c392-5d1c-a559-9a81595ca671")}catch(e){}}();
|
|
4
4
|
const activeScanAbortControllers = /* @__PURE__ */ new Set();
|
|
5
5
|
const activeScanCleanups = /* @__PURE__ */ new Set();
|
|
6
6
|
const activeScanAbortRegistry = {
|
|
@@ -24,5 +24,5 @@ const activeScanAbortRegistry = {
|
|
|
24
24
|
//#endregion
|
|
25
25
|
export { activeScanAbortRegistry as t };
|
|
26
26
|
|
|
27
|
-
//# sourceMappingURL=active-scan-abort-registry-
|
|
28
|
-
//# debugId=
|
|
27
|
+
//# sourceMappingURL=active-scan-abort-registry-CCTgal0O.js.map
|
|
28
|
+
//# debugId=e0d0ca7d-c392-5d1c-a559-9a81595ca671
|
|
@@ -0,0 +1,81 @@
|
|
|
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]="202427d9-8832-586a-b39a-eb7f9bef580f")}catch(e){}}();
|
|
3
|
+
import { bt as DOCS_URL, lt as CANONICAL_GITHUB_URL } from "./constants-CW_854PH.js";
|
|
4
|
+
import { Ot as highlighter } from "./record-metric-BeiisdDK.js";
|
|
5
|
+
//#region src/cli/utils/resolve-measure-width.ts
|
|
6
|
+
const resolveClampedWidth = (input) => {
|
|
7
|
+
const terminalColumns = process.stdout.columns;
|
|
8
|
+
if (!terminalColumns || terminalColumns <= 0) return input.fullWidth;
|
|
9
|
+
const availableColumns = terminalColumns - input.reservedColumns;
|
|
10
|
+
return Math.max(input.minWidth, Math.min(input.fullWidth, availableColumns));
|
|
11
|
+
};
|
|
12
|
+
const resolveMeasureWidth = (reservedColumns = 0) => resolveClampedWidth({
|
|
13
|
+
reservedColumns,
|
|
14
|
+
fullWidth: 60,
|
|
15
|
+
minWidth: 24
|
|
16
|
+
});
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/cli/utils/wrap-indented-text.ts
|
|
19
|
+
const wrapLine = (lineText, width, breakLongWords) => {
|
|
20
|
+
if (lineText.length <= width) return [lineText];
|
|
21
|
+
const wrappedLines = [];
|
|
22
|
+
let remainingText = lineText.trim();
|
|
23
|
+
while (remainingText.length > width) {
|
|
24
|
+
const candidateText = remainingText.slice(0, width);
|
|
25
|
+
const breakIndex = candidateText.lastIndexOf(" ");
|
|
26
|
+
if (breakIndex <= 0) {
|
|
27
|
+
if (breakLongWords) {
|
|
28
|
+
wrappedLines.push(candidateText);
|
|
29
|
+
remainingText = remainingText.slice(width).trimStart();
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
const nextSpace = remainingText.indexOf(" ");
|
|
33
|
+
if (nextSpace === -1) break;
|
|
34
|
+
wrappedLines.push(remainingText.slice(0, nextSpace));
|
|
35
|
+
remainingText = remainingText.slice(nextSpace + 1).trimStart();
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
wrappedLines.push(remainingText.slice(0, breakIndex));
|
|
39
|
+
remainingText = remainingText.slice(breakIndex + 1).trimStart();
|
|
40
|
+
}
|
|
41
|
+
if (remainingText.length > 0) wrappedLines.push(remainingText);
|
|
42
|
+
return wrappedLines;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Greedy word-wrap to a character width, returning one string per line
|
|
46
|
+
* (no indentation applied). Preserves existing `\n` boundaries.
|
|
47
|
+
*/
|
|
48
|
+
const wrapTextToWidth = (text, width, options = {}) => {
|
|
49
|
+
if (width <= 0) return text.split("\n");
|
|
50
|
+
const breakLongWords = options.breakLongWords ?? true;
|
|
51
|
+
return text.split("\n").flatMap((lineText) => wrapLine(lineText, width, breakLongWords));
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/cli/utils/build-footer-description-lines.ts
|
|
55
|
+
const FOOTER_DESCRIPTION_INDENT = " ";
|
|
56
|
+
const buildFooterDescriptionLines = (description) => {
|
|
57
|
+
return wrapTextToWidth(description, resolveMeasureWidth(2)).map((line) => highlighter.dim(`${FOOTER_DESCRIPTION_INDENT}${line}`));
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/cli/utils/build-footer-link-lines.ts
|
|
61
|
+
const buildFooterLinkLines = ({ shareUrl }) => [
|
|
62
|
+
...shareUrl === null ? [] : [
|
|
63
|
+
` ${highlighter.bold("Share:")} ${highlighter.info(shareUrl)}`,
|
|
64
|
+
...buildFooterDescriptionLines("Tell others how you did on socials"),
|
|
65
|
+
""
|
|
66
|
+
],
|
|
67
|
+
` ${highlighter.bold("Docs:")} ${highlighter.info(DOCS_URL)}`,
|
|
68
|
+
...buildFooterDescriptionLines("Learn more about fixing issues, setting up CI/CD, and configuring rules with a config file"),
|
|
69
|
+
"",
|
|
70
|
+
` ${highlighter.bold("GitHub:")} ${highlighter.info(CANONICAL_GITHUB_URL)}`,
|
|
71
|
+
...buildFooterDescriptionLines("Report issues and star the repository!")
|
|
72
|
+
];
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/cli/utils/build-section-divider.ts
|
|
75
|
+
const DIVIDER_INDENT = " ";
|
|
76
|
+
const buildSectionDivider = () => highlighter.dim(`${DIVIDER_INDENT}${"─".repeat(resolveMeasureWidth(2))}`);
|
|
77
|
+
//#endregion
|
|
78
|
+
export { buildFooterLinkLines as n, buildSectionDivider as t };
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=build-section-divider-BsKw6rbA.js.map
|
|
81
|
+
//# debugId=202427d9-8832-586a-b39a-eb7f9bef580f
|
|
@@ -1,17 +1,18 @@
|
|
|
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]="ca7243f8-cb01-5e69-9dcf-18a495c1e391")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { a as
|
|
11
|
-
import {
|
|
12
|
-
import { t as
|
|
13
|
-
import
|
|
4
|
+
import { kt as GITHUB_ACTIONS_SETUP_URL, u as METRIC, ut as CI_URL } from "./constants-CW_854PH.js";
|
|
5
|
+
import { Ot as highlighter, t as recordCount, yn as runSync } from "./record-metric-BeiisdDK.js";
|
|
6
|
+
import { o as isExpectedUserError } from "./telemetry-runtime-DfK-XYFO.js";
|
|
7
|
+
import { n as handleUserError, t as handleError } from "./handle-error-DkZtH4y1.js";
|
|
8
|
+
import { t as reportErrorToSentry } from "./report-error-CwReeGgL.js";
|
|
9
|
+
import { N as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-k5jxcUWB.js";
|
|
10
|
+
import { a as readReactDoctorWorkflow, d as detectDefaultBranch, f as runCommand, l as prompts, n as getReactDoctorWorkflowPath, s as upgradeWorkflowActionToV2, t as buildWorkflowContent } from "./install-github-workflow-Dh3nS6ms.js";
|
|
11
|
+
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-DsrT6gaf.js";
|
|
12
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-CupUff2k.js";
|
|
13
|
+
import { t as printBrandedHeader } from "./print-branded-header-ydu9MCpt.js";
|
|
14
14
|
import * as fs$1 from "node:fs";
|
|
15
|
+
import * as path$1 from "node:path";
|
|
15
16
|
//#region src/cli/utils/ci/ci-provider.ts
|
|
16
17
|
const ADVISORY_GATE = {
|
|
17
18
|
blocking: "none",
|
|
@@ -7498,5 +7499,5 @@ const ciConfigAction = (options) => runCiCommand("config", runCiConfig, options)
|
|
|
7498
7499
|
//#endregion
|
|
7499
7500
|
export { ciConfigAction, ciInstallAction, ciUpgradeAction };
|
|
7500
7501
|
|
|
7501
|
-
//# sourceMappingURL=ci-
|
|
7502
|
-
//# debugId=
|
|
7502
|
+
//# sourceMappingURL=ci-Y7ntr_X7.js.map
|
|
7503
|
+
//# debugId=ca7243f8-cb01-5e69-9dcf-18a495c1e391
|
package/dist/cli.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
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]="01a511d3-2f70-50c3-8de6-424d199534ba")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import { i as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { n as
|
|
10
|
-
import {
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import {
|
|
4
|
+
import { lt as CANONICAL_GITHUB_URL, ut as CI_URL } from "./constants-CW_854PH.js";
|
|
5
|
+
import "./start-scan-preamble-D0QepYZ_.js";
|
|
6
|
+
import { In as isDirectory, Ot as highlighter, Rn as isFile, S as isDebugFlagEnabled, Yt as setColorEnabled, _ as VERSION, d as isJsonModeActive, h as writeJsonErrorReport, ht as filterSourceFiles, i as isTelemetryEnabled, kt as isPathInsideDirectory, y as CliInputError } from "./record-metric-BeiisdDK.js";
|
|
7
|
+
import { a as initializeSentry, n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-DfK-XYFO.js";
|
|
8
|
+
import { t as exitGracefully } from "./exit-gracefully-Bq8kCmar.js";
|
|
9
|
+
import { n as handleUserError, t as handleError } from "./handle-error-DkZtH4y1.js";
|
|
10
|
+
import { n as getLastRunTraceId } from "./active-run-trace-Dewycxda.js";
|
|
11
|
+
import { t as reportErrorToSentry } from "./report-error-CwReeGgL.js";
|
|
12
|
+
import { t as toForwardSlashes } from "./path-format-By20mo8A.js";
|
|
13
|
+
import { t as unrefStdin } from "./unref-stdin-D-NZBFpg.js";
|
|
14
14
|
import * as path$1 from "node:path";
|
|
15
|
+
import { execFileSync } from "node:child_process";
|
|
15
16
|
//#region ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/error.js
|
|
16
17
|
var require_error = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17
18
|
/**
|
|
@@ -3557,7 +3558,7 @@ ${highlighter.dim("Learn more:")}
|
|
|
3557
3558
|
const collectCategoryOption = (value, previousValues) => [...previousValues ?? [], value];
|
|
3558
3559
|
const program = new Command().name("react-doctor").description("Diagnose React codebase health").version(VERSION, "-v, --version", "display the version number").argument("[paths...]", "one project directory or source file paths to scan").option("--lint", "enable linting").option("--no-lint", "skip linting").addOption(new Option("--dead-code").hideHelp()).addOption(new Option("--no-dead-code").hideHelp()).option("--supply-chain", "enable the dependency supply-chain scan (default)").option("--no-supply-chain", "skip the dependency supply-chain scan (Socket.dev dependency health checks)").option("--verbose", "show every rule and per-file details (default shows top 3 rules)").option("--debug", "force a Sentry trace and print its id at the end (paste it into a bug report)").option("--output-dir <dir>", "directory for the full diagnostics dump (default: a temp folder)").option("--score", "output only the score").option("--json", "output a single structured JSON report (suppresses other output)").option("--json-compact", "with --json, emit compact JSON (no indentation)").option("--json-out <path>", "with --json, write the report to a file instead of stdout").option("--no-cache", "disable all scan caches for this run").option("-y, --yes", "skip prompts, scan all workspace projects").option("--no-parallel", "lint serially with one worker (default: parallel across CPU cores; set the worker count with REACT_DOCTOR_PARALLEL)").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple); overrides the `projects` config field").option("--scope <value>", "how much supported JS/TS and inline HTML script source to scan/report: full (default), files, changed (only new issues vs base), or lines (issues whose source spans touch changed lines)").option("--base <ref>", "base git ref for files/changed/lines scope (auto-detected when omitted)").option("--include-untracked", "with --scope files/changed/lines, also scan ordinary untracked files (respects .gitignore)").addOption(new Option("--diff [base]", "[deprecated] alias for --scope changed (pass `false` to force a full scan)").hideHelp()).addOption(new Option("--changed-files-from <file>", "scan source files listed in a newline-delimited changed-files file").hideHelp()).option("--no-score", "skip the score API, the share URL, and crash reporting").addOption(new Option("--category <category>", "only show diagnostics in a category (repeatable; e.g. Security)").argParser(collectCategoryOption)).option("--no-telemetry", "alias for --no-score (skip the score API, share URL, and crash reporting)").option("--staged", "scan only staged (git index) files for pre-commit hooks (honors --project and config `projects`; exits 0 when nothing is staged)").option("--max-duration <seconds>", MAX_DURATION_OPTION_DESCRIPTION).option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").addOption(new Option("--fail-on <level>", "[deprecated] alias for --blocking <level>").hideHelp()).option("--no-respect-inline-disables", "audit mode: neutralize inline lint suppressions before scanning").option("--warnings", "show warning-severity diagnostics (default)").option("--no-warnings", "hide warning-severity diagnostics (errors only)").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderRootHelpEpilog);
|
|
3559
3560
|
program.action(async (positionalPaths = [], flags) => {
|
|
3560
|
-
const { runScanCommand } = await import("./scan-
|
|
3561
|
+
const { runScanCommand } = await import("./scan-BJsk-x4c.js");
|
|
3561
3562
|
return runScanCommand({
|
|
3562
3563
|
...resolvePositionalScanInput(positionalPaths),
|
|
3563
3564
|
flags,
|
|
@@ -3565,75 +3566,75 @@ program.action(async (positionalPaths = [], flags) => {
|
|
|
3565
3566
|
});
|
|
3566
3567
|
});
|
|
3567
3568
|
program.command("design [directory]").description("Run only the focused UI design diagnostics").addHelpText("after", renderDesignHelpEpilog).action(async (directory, _options, command) => {
|
|
3568
|
-
const { designAction } = await import("./design-
|
|
3569
|
+
const { designAction } = await import("./design-CZbXwzWh.js");
|
|
3569
3570
|
return designAction(directory ?? ".", command.optsWithGlobals());
|
|
3570
3571
|
});
|
|
3571
3572
|
program.command("scan").description("Scan a React interaction in Chrome until you press Enter").argument("[url]", "HTTP(S) URL of the running React app; detects local apps when omitted").option("-f, --format <format>", "report format: text, json, or jsonl", "text").option("--cdp <url>", "reuse Chrome at this remote-debugging endpoint").option("--trace-out <path>", "save the compressed .json.gz DevTools trace at this path").addHelpText("after", renderRuntimeScanHelpEpilog).action(async (url, options) => {
|
|
3572
|
-
const { runtimeScanAction } = await import("./runtime-scan-
|
|
3573
|
+
const { runtimeScanAction } = await import("./runtime-scan-B6v3G55b.js");
|
|
3573
3574
|
return runtimeScanAction(url, options);
|
|
3574
3575
|
});
|
|
3575
3576
|
program.command("why <location>").description("Explain why a rule fired (or why a suppression didn't apply) at a file:line").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple)").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async (location, options) => {
|
|
3576
|
-
const { whyAction } = await import("./why-
|
|
3577
|
+
const { whyAction } = await import("./why-DA3u09OY.js");
|
|
3577
3578
|
return whyAction(location, options);
|
|
3578
3579
|
});
|
|
3579
3580
|
program.command("install").alias("setup").description("Install the react-doctor skill into your coding agents and optional git hook").option("-y, --yes", "skip prompts, install for all detected agents").option("--dry-run", "show what would be installed without writing files").option("--agent-hooks", "install end-of-turn agent hooks for Claude Code and Cursor").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderInstallHelpEpilog).action(async (options, command) => {
|
|
3580
|
-
const { installAction } = await import("./install-
|
|
3581
|
+
const { installAction } = await import("./install-DSOkcCn6.js");
|
|
3581
3582
|
return installAction(options, command);
|
|
3582
3583
|
});
|
|
3583
3584
|
const providerOption = ["--provider <name>", "ci provider: github-actions or gitlab-ci (auto-detected by default)"];
|
|
3584
3585
|
const prOption = ["--pr", "open a pull request with the change instead of writing it to the working tree"];
|
|
3585
3586
|
const ci = program.command("ci").description("Set up, upgrade, and configure React Doctor in your CI");
|
|
3586
3587
|
ci.command("install").description("Add a CI workflow that scans every pull request").option(...providerOption).option(...prOption).option("--blocking <level>", "gate level: none (advisory, default), warning, or error").option("--scope <value>", "what a pull-request scan reports: changed (default), files, lines, full").option("--comment", "post a summary comment on each pull request").option("--no-comment", "don't post a summary comment").option("--review-comments", "add inline review comments on changed lines").option("--no-review-comments", "don't add inline review comments").option("--commit-status", "report a commit status with the health score").option("--no-commit-status", "don't report a commit status").option("-y, --yes", "skip prompts; use the defaults").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderCiHelpEpilog).action(async (_options, command) => {
|
|
3587
|
-
const { ciInstallAction } = await import("./ci-
|
|
3588
|
+
const { ciInstallAction } = await import("./ci-Y7ntr_X7.js");
|
|
3588
3589
|
return ciInstallAction(command.optsWithGlobals());
|
|
3589
3590
|
});
|
|
3590
3591
|
ci.command("config").description("Change the gate, scan scope, and pull-request reporting").option(...providerOption).option("--blocking <level>", "gate level: none (advisory), warning, or error").option("--scope <value>", "what a pull-request scan reports: changed, files, lines, or full").option("--comment", "post a summary comment on each pull request").option("--no-comment", "don't post a summary comment").option("--review-comments", "add inline review comments on changed lines").option("--no-review-comments", "don't add inline review comments").option("--commit-status", "report a commit status with the health score").option("--no-commit-status", "don't report a commit status").option("-y, --yes", "skip prompts; print the current settings").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async (_options, command) => {
|
|
3591
|
-
const { ciConfigAction } = await import("./ci-
|
|
3592
|
+
const { ciConfigAction } = await import("./ci-Y7ntr_X7.js");
|
|
3592
3593
|
return ciConfigAction(command.optsWithGlobals());
|
|
3593
3594
|
});
|
|
3594
3595
|
ci.command("upgrade").description("Upgrade the CI workflow to the action's current major").option(...providerOption).option(...prOption).option("-y, --yes", "skip prompts").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async (_options, command) => {
|
|
3595
|
-
const { ciUpgradeAction } = await import("./ci-
|
|
3596
|
+
const { ciUpgradeAction } = await import("./ci-Y7ntr_X7.js");
|
|
3596
3597
|
return ciUpgradeAction(command.optsWithGlobals());
|
|
3597
3598
|
});
|
|
3598
3599
|
program.command("version").description("show the version with Node and platform info").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async () => {
|
|
3599
|
-
const { versionAction } = await import("./version-
|
|
3600
|
+
const { versionAction } = await import("./version-DpQFTCI_.js");
|
|
3600
3601
|
return versionAction();
|
|
3601
3602
|
});
|
|
3602
3603
|
const rules = program.command("rules").description("List, explain, and configure which React Doctor rules run");
|
|
3603
3604
|
rules.command("list").description("List rules and the severity they run at under your config").option("--category <name>", "only show rules in a category (e.g. Performance)").option("--tag <name>", "only show rules with a tag (e.g. design, test-noise)").option("--framework <name>", "only show rules for a framework (e.g. global, nextjs)").option("--configured", "only show rules your config has changed from the default").option("--json", "output a structured JSON array").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (_options, command) => {
|
|
3604
|
-
const { rulesListAction } = await import("./rules-
|
|
3605
|
+
const { rulesListAction } = await import("./rules-Bhk46JNb.js");
|
|
3605
3606
|
return rulesListAction(command.optsWithGlobals());
|
|
3606
3607
|
});
|
|
3607
3608
|
rules.command("explain <rule>").description("Explain why a rule matters, its current severity, and how to configure it").option("--json", "output a structured JSON object").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, _options, command) => {
|
|
3608
|
-
const { rulesExplainAction } = await import("./rules-
|
|
3609
|
+
const { rulesExplainAction } = await import("./rules-Bhk46JNb.js");
|
|
3609
3610
|
return rulesExplainAction(rule, command.optsWithGlobals());
|
|
3610
3611
|
});
|
|
3611
3612
|
rules.command("set <rule> <severity>").description("Set a rule's severity: off, warn, or error").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, severity, _options, command) => {
|
|
3612
|
-
const { rulesSetAction } = await import("./rules-
|
|
3613
|
+
const { rulesSetAction } = await import("./rules-Bhk46JNb.js");
|
|
3613
3614
|
return rulesSetAction(rule, severity, command.optsWithGlobals());
|
|
3614
3615
|
});
|
|
3615
3616
|
rules.command("enable <rule>").description("Enable a rule at its recommended severity (or pass --severity)").option("--severity <level>", "severity to enable at: warn or error").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, _options, command) => {
|
|
3616
|
-
const { rulesEnableAction } = await import("./rules-
|
|
3617
|
+
const { rulesEnableAction } = await import("./rules-Bhk46JNb.js");
|
|
3617
3618
|
return rulesEnableAction(rule, command.optsWithGlobals());
|
|
3618
3619
|
});
|
|
3619
3620
|
rules.command("disable <rule>").description("Disable a rule so it never runs").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, _options, command) => {
|
|
3620
|
-
const { rulesDisableAction } = await import("./rules-
|
|
3621
|
+
const { rulesDisableAction } = await import("./rules-Bhk46JNb.js");
|
|
3621
3622
|
return rulesDisableAction(rule, command.optsWithGlobals());
|
|
3622
3623
|
});
|
|
3623
3624
|
rules.command("category <category> <severity>").description("Set the severity for a whole category (off, warn, error)").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (category, severity, _options, command) => {
|
|
3624
|
-
const { rulesCategoryAction } = await import("./rules-
|
|
3625
|
+
const { rulesCategoryAction } = await import("./rules-Bhk46JNb.js");
|
|
3625
3626
|
return rulesCategoryAction(category, severity, command.optsWithGlobals());
|
|
3626
3627
|
});
|
|
3627
3628
|
rules.command("ignore-tag <tag>").description("Skip a whole rule family by tag before linting (e.g. design)").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (tag, _options, command) => {
|
|
3628
|
-
const { rulesIgnoreTagAction } = await import("./rules-
|
|
3629
|
+
const { rulesIgnoreTagAction } = await import("./rules-Bhk46JNb.js");
|
|
3629
3630
|
return rulesIgnoreTagAction(tag, command.optsWithGlobals());
|
|
3630
3631
|
});
|
|
3631
3632
|
rules.command("unignore-tag <tag>").description("Stop ignoring a tag previously skipped via ignore-tag").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (tag, _options, command) => {
|
|
3632
|
-
const { rulesUnignoreTagAction } = await import("./rules-
|
|
3633
|
+
const { rulesUnignoreTagAction } = await import("./rules-Bhk46JNb.js");
|
|
3633
3634
|
return rulesUnignoreTagAction(tag, command.optsWithGlobals());
|
|
3634
3635
|
});
|
|
3635
3636
|
program.command("experimental-tui [directory]", { hidden: true }).description("[experimental] interactive, scrollable scan report").option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addOption(new Option("--no-dead-code").hideHelp()).option("--no-supply-chain", "skip the dependency supply-chain scan").option("--score", "only print the numeric score (for scripts and CI)").option("--no-score", "skip the score API, the share URL, and crash reporting").option("--no-cache", "disable all scan caches for this run").option("--max-duration <seconds>", MAX_DURATION_OPTION_DESCRIPTION).option("-p, --project <names>", "scan specific workspace projects (comma-separated, or *)").option("-y, --yes", "skip the project prompt and scan every discovered project").action(async (directory = ".", _localOptions, command) => {
|
|
3636
|
-
const { runScanCommand } = await import("./scan-
|
|
3637
|
+
const { runScanCommand } = await import("./scan-BJsk-x4c.js");
|
|
3637
3638
|
return runScanCommand({
|
|
3638
3639
|
directory,
|
|
3639
3640
|
flags: command.optsWithGlobals(),
|
|
@@ -3673,4 +3674,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
3673
3674
|
export {};
|
|
3674
3675
|
|
|
3675
3676
|
//# sourceMappingURL=cli.js.map
|
|
3676
|
-
//# debugId=
|
|
3677
|
+
//# debugId=01a511d3-2f70-50c3-8de6-424d199534ba
|