react-doctor 0.9.12-dev.4e04921 → 0.9.12-dev.557145
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/{build-section-divider-tfjT2QLm.js → build-section-divider-03Wz07A3.js} +7 -7
- package/dist/{ci-B43J1Ess.js → ci-BJISp0Lg.js} +12 -12
- package/dist/cli.js +24 -24
- package/dist/{design-BDdfMh-h.js → design-C85Z6wgY.js} +4 -4
- package/dist/{exit-gracefully-DqpcD-Vf.js → exit-gracefully-BtYRR9PK.js} +6 -6
- package/dist/{handle-error-CARApAEM.js → handle-error-CHEoVuek.js} +5 -5
- package/dist/index.js +129 -20
- package/dist/{inspect-BUho62BG.js → inspect-vOtCicMw.js} +16 -16
- package/dist/{install-DpclnG0S.js → install-DGW5St2C.js} +9 -9
- package/dist/{install-doctor-script-BMs37_Sk.js → install-doctor-script-BcPdnCoo.js} +4 -4
- package/dist/{install-github-workflow-fPb5ywGT.js → install-github-workflow-B8pUhQ3R.js} +5 -5
- package/dist/{install-react-doctor-DmqgPYSn.js → install-react-doctor-Dtcyy__y.js} +8 -8
- package/dist/{jsx-runtime-CPl2KjXl.js → jsx-runtime-BdJ4Qkgp.js} +5 -5
- package/dist/{print-branded-header-RIpRQr4r.js → print-branded-header-DcnApzbb.js} +4 -4
- package/dist/project-analysis-worker.js +53 -52
- package/dist/{prompt-runtime-scan-url-CnY2K4GM.js → prompt-runtime-scan-url-DO5LWX8q.js} +5 -5
- package/dist/{read-object-file-Dq16zpeH.js → read-object-file-nByxIxZd.js} +4 -4
- package/dist/{record-metric-_j0sfE0f.js → record-metric-Bkub8U7Q.js} +125 -15
- package/dist/{report-error-BpOwcvUC.js → report-error-DuEpff_7.js} +5 -5
- package/dist/{report-workflow-result-CdhgsIxv.js → report-workflow-result--V0KVZGX.js} +5 -5
- package/dist/{resolve-scope-BQYJQdnO.js → resolve-scope-ajqqgMdS.js} +6 -6
- package/dist/{rules-Wy0sMPol.js → rules-B3Jk5BS6.js} +6 -6
- package/dist/{run-scan-app-a2W1sXd8.js → run-scan-app-D7yKEvMi.js} +15 -14
- package/dist/{runtime-scan-Et2ti-cX.js → runtime-scan-CN_fvs6q.js} +9 -9
- package/dist/{sanitize-runtime-url-CGzIyXT5.js → sanitize-runtime-url-CkCpxd4T.js} +4 -4
- package/dist/{scan-BT6FO2c5.js → scan-B2ijGQAP.js} +9 -9
- package/dist/{should-fail-scan-gate-B6BiyS0J.js → should-fail-scan-gate-3inPx0Rt.js} +11 -11
- package/dist/{should-skip-prompts-Dq_eE2kO.js → should-skip-prompts-BmKdNS3r.js} +4 -4
- package/dist/{should-use-tui-C7N-IGgN.js → should-use-tui-LbXua39D.js} +4 -4
- package/dist/{telemetry-runtime-DSSpyxtS.js → telemetry-runtime-pRbw2p6F.js} +4 -4
- package/dist/{version-D49f_qlq.js → version-BWpE-HbU.js} +4 -4
- package/dist/{why-BeXRT_9P.js → why-CyItx1Pg.js} +4 -4
- package/dist/{with-run-span-56NQ5SEG.js → with-run-span-mTMAyfjb.js} +5 -5
- package/package.json +4 -4
|
@@ -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]="
|
|
3
|
-
import { Kt as highlighter, N as SENTRY_FLUSH_TIMEOUT_MS, a as isEnvFlagEnabled, er as CANONICAL_GITHUB_URL, ft as anonymizeInPlace, hn as scrubSensitivePaths, i as isTelemetryEnabled, o as buildSentryScope, or as DOCS_URL, pt as anonymizeText } from "./record-metric-
|
|
4
|
-
import { r as isExpectedUserError } from "./telemetry-runtime-
|
|
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]="6e2dd43c-5807-583f-8967-57dc2a59e007")}catch(e){}}();
|
|
3
|
+
import { Kt as highlighter, N as SENTRY_FLUSH_TIMEOUT_MS, a as isEnvFlagEnabled, er as CANONICAL_GITHUB_URL, ft as anonymizeInPlace, hn as scrubSensitivePaths, i as isTelemetryEnabled, o as buildSentryScope, or as DOCS_URL, pt as anonymizeText } from "./record-metric-Bkub8U7Q.js";
|
|
4
|
+
import { r as isExpectedUserError } from "./telemetry-runtime-pRbw2p6F.js";
|
|
5
5
|
import * as Sentry from "@sentry/node";
|
|
6
6
|
//#region src/cli/utils/scrub-sentry-event.ts
|
|
7
7
|
/**
|
|
@@ -70,13 +70,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
70
70
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
71
71
|
* standard `SENTRY_RELEASE` override.
|
|
72
72
|
*/
|
|
73
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.9.12-dev.
|
|
73
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.9.12-dev.0557145`;
|
|
74
74
|
/**
|
|
75
75
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
76
76
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
77
77
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
78
78
|
*/
|
|
79
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.9.12-dev.
|
|
79
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.9.12-dev.0557145") ? "development" : "production");
|
|
80
80
|
//#endregion
|
|
81
81
|
//#region src/instrument.ts
|
|
82
82
|
let isInitialized = false;
|
|
@@ -212,5 +212,5 @@ const buildSectionDivider = () => highlighter.dim(`${DIVIDER_INDENT}${"─".repe
|
|
|
212
212
|
//#endregion
|
|
213
213
|
export { initializeSentry as i, buildFooterLinkLines as n, flushSentry as r, buildSectionDivider as t };
|
|
214
214
|
|
|
215
|
-
//# sourceMappingURL=build-section-divider-
|
|
216
|
-
//# debugId=
|
|
215
|
+
//# sourceMappingURL=build-section-divider-03Wz07A3.js.map
|
|
216
|
+
//# debugId=6e2dd43c-5807-583f-8967-57dc2a59e007
|
|
@@ -1,15 +1,15 @@
|
|
|
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]="e22f7d55-4a4c-51c6-851a-c89cca46e05a")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import { Kt as highlighter, T as METRIC, cr as GITHUB_ACTIONS_SETUP_URL, t as recordCount, tr as CI_URL, zn as runSync } from "./record-metric-
|
|
5
|
-
import { r as isExpectedUserError } from "./telemetry-runtime-
|
|
6
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
7
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
8
|
-
import { M as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-
|
|
9
|
-
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-
|
|
10
|
-
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-
|
|
11
|
-
import { t as shouldSkipPrompts } from "./should-skip-prompts-
|
|
12
|
-
import { t as printBrandedHeader } from "./print-branded-header-
|
|
4
|
+
import { Kt as highlighter, T as METRIC, cr as GITHUB_ACTIONS_SETUP_URL, t as recordCount, tr as CI_URL, zn as runSync } from "./record-metric-Bkub8U7Q.js";
|
|
5
|
+
import { r as isExpectedUserError } from "./telemetry-runtime-pRbw2p6F.js";
|
|
6
|
+
import { n as handleUserError, t as handleError } from "./handle-error-CHEoVuek.js";
|
|
7
|
+
import { t as reportErrorToSentry } from "./report-error-DuEpff_7.js";
|
|
8
|
+
import { M as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-BcPdnCoo.js";
|
|
9
|
+
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-B8pUhQ3R.js";
|
|
10
|
+
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-ajqqgMdS.js";
|
|
11
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-BmKdNS3r.js";
|
|
12
|
+
import { t as printBrandedHeader } from "./print-branded-header-DcnApzbb.js";
|
|
13
13
|
import * as path$1 from "node:path";
|
|
14
14
|
import * as fs$1 from "node:fs";
|
|
15
15
|
//#region src/cli/utils/ci/ci-provider.ts
|
|
@@ -7498,5 +7498,5 @@ const ciConfigAction = (options) => runCiCommand("config", runCiConfig, options)
|
|
|
7498
7498
|
//#endregion
|
|
7499
7499
|
export { ciConfigAction, ciInstallAction, ciUpgradeAction };
|
|
7500
7500
|
|
|
7501
|
-
//# sourceMappingURL=ci-
|
|
7502
|
-
//# debugId=
|
|
7501
|
+
//# sourceMappingURL=ci-BJISp0Lg.js.map
|
|
7502
|
+
//# debugId=e22f7d55-4a4c-51c6-851a-c89cca46e05a
|
package/dist/cli.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
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]="f42b1a1f-3941-5a61-bf1b-ea87400b9ec6")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import { H as isDebugFlagEnabled, Kt as highlighter, _ as VERSION, d as isJsonModeActive, er as CANONICAL_GITHUB_URL, gn as setColorEnabled, h as writeJsonErrorReport, i as isTelemetryEnabled, tr as CI_URL, z as CliInputError } from "./record-metric-
|
|
5
|
-
import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-
|
|
6
|
-
import { i as initializeSentry, r as flushSentry } from "./build-section-divider-
|
|
7
|
-
import { t as exitGracefully } from "./exit-gracefully-
|
|
8
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
4
|
+
import { H as isDebugFlagEnabled, Kt as highlighter, _ as VERSION, d as isJsonModeActive, er as CANONICAL_GITHUB_URL, gn as setColorEnabled, h as writeJsonErrorReport, i as isTelemetryEnabled, tr as CI_URL, z as CliInputError } from "./record-metric-Bkub8U7Q.js";
|
|
5
|
+
import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-pRbw2p6F.js";
|
|
6
|
+
import { i as initializeSentry, r as flushSentry } from "./build-section-divider-03Wz07A3.js";
|
|
7
|
+
import { t as exitGracefully } from "./exit-gracefully-BtYRR9PK.js";
|
|
8
|
+
import { n as handleUserError, t as handleError } from "./handle-error-CHEoVuek.js";
|
|
9
9
|
import { n as getLastRunTraceId } from "./active-run-trace-dlIZeEvb.js";
|
|
10
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
10
|
+
import { t as reportErrorToSentry } from "./report-error-DuEpff_7.js";
|
|
11
11
|
import { t as unrefStdin } from "./unref-stdin-BKT_s38a.js";
|
|
12
12
|
import { execFileSync } from "node:child_process";
|
|
13
13
|
//#region ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/error.js
|
|
@@ -3529,7 +3529,7 @@ ${highlighter.dim("Learn more:")}
|
|
|
3529
3529
|
const collectCategoryOption = (value, previousValues) => [...previousValues ?? [], value];
|
|
3530
3530
|
const program = new Command().name("react-doctor").description("Diagnose React codebase health").version(VERSION, "-v, --version", "display the version number").argument("[directory]", "project directory 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);
|
|
3531
3531
|
program.action(async (directory = ".", flags) => {
|
|
3532
|
-
const { runScanCommand } = await import("./scan-
|
|
3532
|
+
const { runScanCommand } = await import("./scan-B2ijGQAP.js");
|
|
3533
3533
|
return runScanCommand({
|
|
3534
3534
|
directory,
|
|
3535
3535
|
flags,
|
|
@@ -3537,75 +3537,75 @@ program.action(async (directory = ".", flags) => {
|
|
|
3537
3537
|
});
|
|
3538
3538
|
});
|
|
3539
3539
|
program.command("design [directory]").description("Run only the focused UI design diagnostics").addHelpText("after", renderDesignHelpEpilog).action(async (directory, _options, command) => {
|
|
3540
|
-
const { designAction } = await import("./design-
|
|
3540
|
+
const { designAction } = await import("./design-C85Z6wgY.js");
|
|
3541
3541
|
return designAction(directory ?? ".", command.optsWithGlobals());
|
|
3542
3542
|
});
|
|
3543
3543
|
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) => {
|
|
3544
|
-
const { runtimeScanAction } = await import("./runtime-scan-
|
|
3544
|
+
const { runtimeScanAction } = await import("./runtime-scan-CN_fvs6q.js");
|
|
3545
3545
|
return runtimeScanAction(url, options);
|
|
3546
3546
|
});
|
|
3547
3547
|
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) => {
|
|
3548
|
-
const { whyAction } = await import("./why-
|
|
3548
|
+
const { whyAction } = await import("./why-CyItx1Pg.js");
|
|
3549
3549
|
return whyAction(location, options);
|
|
3550
3550
|
});
|
|
3551
3551
|
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) => {
|
|
3552
|
-
const { installAction } = await import("./install-
|
|
3552
|
+
const { installAction } = await import("./install-DGW5St2C.js");
|
|
3553
3553
|
return installAction(options, command);
|
|
3554
3554
|
});
|
|
3555
3555
|
const providerOption = ["--provider <name>", "ci provider: github-actions or gitlab-ci (auto-detected by default)"];
|
|
3556
3556
|
const prOption = ["--pr", "open a pull request with the change instead of writing it to the working tree"];
|
|
3557
3557
|
const ci = program.command("ci").description("Set up, upgrade, and configure React Doctor in your CI");
|
|
3558
3558
|
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) => {
|
|
3559
|
-
const { ciInstallAction } = await import("./ci-
|
|
3559
|
+
const { ciInstallAction } = await import("./ci-BJISp0Lg.js");
|
|
3560
3560
|
return ciInstallAction(command.optsWithGlobals());
|
|
3561
3561
|
});
|
|
3562
3562
|
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) => {
|
|
3563
|
-
const { ciConfigAction } = await import("./ci-
|
|
3563
|
+
const { ciConfigAction } = await import("./ci-BJISp0Lg.js");
|
|
3564
3564
|
return ciConfigAction(command.optsWithGlobals());
|
|
3565
3565
|
});
|
|
3566
3566
|
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) => {
|
|
3567
|
-
const { ciUpgradeAction } = await import("./ci-
|
|
3567
|
+
const { ciUpgradeAction } = await import("./ci-BJISp0Lg.js");
|
|
3568
3568
|
return ciUpgradeAction(command.optsWithGlobals());
|
|
3569
3569
|
});
|
|
3570
3570
|
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 () => {
|
|
3571
|
-
const { versionAction } = await import("./version-
|
|
3571
|
+
const { versionAction } = await import("./version-BWpE-HbU.js");
|
|
3572
3572
|
return versionAction();
|
|
3573
3573
|
});
|
|
3574
3574
|
const rules = program.command("rules").description("List, explain, and configure which React Doctor rules run");
|
|
3575
3575
|
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) => {
|
|
3576
|
-
const { rulesListAction } = await import("./rules-
|
|
3576
|
+
const { rulesListAction } = await import("./rules-B3Jk5BS6.js");
|
|
3577
3577
|
return rulesListAction(command.optsWithGlobals());
|
|
3578
3578
|
});
|
|
3579
3579
|
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) => {
|
|
3580
|
-
const { rulesExplainAction } = await import("./rules-
|
|
3580
|
+
const { rulesExplainAction } = await import("./rules-B3Jk5BS6.js");
|
|
3581
3581
|
return rulesExplainAction(rule, command.optsWithGlobals());
|
|
3582
3582
|
});
|
|
3583
3583
|
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) => {
|
|
3584
|
-
const { rulesSetAction } = await import("./rules-
|
|
3584
|
+
const { rulesSetAction } = await import("./rules-B3Jk5BS6.js");
|
|
3585
3585
|
return rulesSetAction(rule, severity, command.optsWithGlobals());
|
|
3586
3586
|
});
|
|
3587
3587
|
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) => {
|
|
3588
|
-
const { rulesEnableAction } = await import("./rules-
|
|
3588
|
+
const { rulesEnableAction } = await import("./rules-B3Jk5BS6.js");
|
|
3589
3589
|
return rulesEnableAction(rule, command.optsWithGlobals());
|
|
3590
3590
|
});
|
|
3591
3591
|
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) => {
|
|
3592
|
-
const { rulesDisableAction } = await import("./rules-
|
|
3592
|
+
const { rulesDisableAction } = await import("./rules-B3Jk5BS6.js");
|
|
3593
3593
|
return rulesDisableAction(rule, command.optsWithGlobals());
|
|
3594
3594
|
});
|
|
3595
3595
|
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) => {
|
|
3596
|
-
const { rulesCategoryAction } = await import("./rules-
|
|
3596
|
+
const { rulesCategoryAction } = await import("./rules-B3Jk5BS6.js");
|
|
3597
3597
|
return rulesCategoryAction(category, severity, command.optsWithGlobals());
|
|
3598
3598
|
});
|
|
3599
3599
|
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) => {
|
|
3600
|
-
const { rulesIgnoreTagAction } = await import("./rules-
|
|
3600
|
+
const { rulesIgnoreTagAction } = await import("./rules-B3Jk5BS6.js");
|
|
3601
3601
|
return rulesIgnoreTagAction(tag, command.optsWithGlobals());
|
|
3602
3602
|
});
|
|
3603
3603
|
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) => {
|
|
3604
|
-
const { rulesUnignoreTagAction } = await import("./rules-
|
|
3604
|
+
const { rulesUnignoreTagAction } = await import("./rules-B3Jk5BS6.js");
|
|
3605
3605
|
return rulesUnignoreTagAction(tag, command.optsWithGlobals());
|
|
3606
3606
|
});
|
|
3607
3607
|
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) => {
|
|
3608
|
-
const { runScanCommand } = await import("./scan-
|
|
3608
|
+
const { runScanCommand } = await import("./scan-B2ijGQAP.js");
|
|
3609
3609
|
return runScanCommand({
|
|
3610
3610
|
directory,
|
|
3611
3611
|
flags: command.optsWithGlobals(),
|
|
@@ -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]="e9d2f2ec-9e29-5a05-ad29-c7032d463c86")}catch(e){}}();
|
|
3
|
+
import { t as inspectAction } from "./inspect-vOtCicMw.js";
|
|
4
4
|
//#region src/cli/commands/design.ts
|
|
5
5
|
const designAction = async (directory, flags) => inspectAction(directory, {
|
|
6
6
|
...flags,
|
|
@@ -10,5 +10,5 @@ const designAction = async (directory, flags) => inspectAction(directory, {
|
|
|
10
10
|
//#endregion
|
|
11
11
|
export { designAction };
|
|
12
12
|
|
|
13
|
-
//# sourceMappingURL=design-
|
|
14
|
-
//# debugId=
|
|
13
|
+
//# sourceMappingURL=design-C85Z6wgY.js.map
|
|
14
|
+
//# debugId=e9d2f2ec-9e29-5a05-ad29-c7032d463c86
|
|
@@ -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]="
|
|
3
|
-
import { d as isJsonModeActive, m as writeJsonCancellationReport } from "./record-metric-
|
|
4
|
-
import { n as shutdownTelemetry } from "./telemetry-runtime-
|
|
5
|
-
import { n as buildFooterLinkLines, r as flushSentry, t as buildSectionDivider } from "./build-section-divider-
|
|
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]="6a639ad8-dc8e-5942-b252-917984d190d2")}catch(e){}}();
|
|
3
|
+
import { d as isJsonModeActive, m as writeJsonCancellationReport } from "./record-metric-Bkub8U7Q.js";
|
|
4
|
+
import { n as shutdownTelemetry } from "./telemetry-runtime-pRbw2p6F.js";
|
|
5
|
+
import { n as buildFooterLinkLines, r as flushSentry, t as buildSectionDivider } from "./build-section-divider-03Wz07A3.js";
|
|
6
6
|
import { t as activeScanAbortRegistry } from "./active-scan-abort-registry-DwG6tSPy.js";
|
|
7
7
|
//#region src/cli/utils/active-tui-renderer.ts
|
|
8
8
|
let activeTuiRenderer = null;
|
|
@@ -50,5 +50,5 @@ const exitGracefully = () => {
|
|
|
50
50
|
//#endregion
|
|
51
51
|
export { registerActiveTuiRenderer as n, exitGracefully as t };
|
|
52
52
|
|
|
53
|
-
//# sourceMappingURL=exit-gracefully-
|
|
54
|
-
//# debugId=
|
|
53
|
+
//# sourceMappingURL=exit-gracefully-BtYRR9PK.js.map
|
|
54
|
+
//# debugId=6a639ad8-dc8e-5942-b252-917984d190d2
|
|
@@ -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]="
|
|
3
|
-
import { $n as CANONICAL_DISCORD_URL, An as gen, Cn as error, Ft as formatErrorChain, It as formatReactDoctorError, Kt as highlighter, T as METRIC, Xt as isReactDoctorError, _ as VERSION, br as isErrnoException, er as CANONICAL_GITHUB_URL, t as recordCount, zn as runSync } from "./record-metric-
|
|
4
|
-
import { a as isNpmCacheCorruptionError, i as formatNpmCacheCorruptionError, o as formatEnvironmentError, s as isEnvironmentError } from "./telemetry-runtime-
|
|
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]="a8b7c1ad-1c43-58da-9000-becb134c5585")}catch(e){}}();
|
|
3
|
+
import { $n as CANONICAL_DISCORD_URL, An as gen, Cn as error, Ft as formatErrorChain, It as formatReactDoctorError, Kt as highlighter, T as METRIC, Xt as isReactDoctorError, _ as VERSION, br as isErrnoException, er as CANONICAL_GITHUB_URL, t as recordCount, zn as runSync } from "./record-metric-Bkub8U7Q.js";
|
|
4
|
+
import { a as isNpmCacheCorruptionError, i as formatNpmCacheCorruptionError, o as formatEnvironmentError, s as isEnvironmentError } from "./telemetry-runtime-pRbw2p6F.js";
|
|
5
5
|
//#region src/cli/utils/handle-error.ts
|
|
6
6
|
const OTLP_ENDPOINT_ENVIRONMENT_VARIABLE = "REACT_DOCTOR_OTLP_ENDPOINT";
|
|
7
7
|
const OTLP_AUTH_HEADER_ENVIRONMENT_VARIABLE = "REACT_DOCTOR_OTLP_AUTH_HEADER";
|
|
@@ -110,5 +110,5 @@ const handleUserError = (error$1, options = {}) => {
|
|
|
110
110
|
//#endregion
|
|
111
111
|
export { handleUserError as n, handleError as t };
|
|
112
112
|
|
|
113
|
-
//# sourceMappingURL=handle-error-
|
|
114
|
-
//# debugId=
|
|
113
|
+
//# sourceMappingURL=handle-error-CHEoVuek.js.map
|
|
114
|
+
//# debugId=a8b7c1ad-1c43-58da-9000-becb134c5585
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
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]="d37422e0-941a-5fe0-81e5-bc092d5cd66e")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import * as path$1$1 from "node:path";
|
|
6
|
-
import path from "node:path";
|
|
6
|
+
import path, { join, posix } from "node:path";
|
|
7
7
|
import * as fs$1$3 from "node:fs";
|
|
8
|
-
import fs from "node:fs";
|
|
8
|
+
import fs, { existsSync } from "node:fs";
|
|
9
9
|
import * as NodeChildProcess from "node:child_process";
|
|
10
10
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
11
11
|
import ts from "typescript";
|
|
12
|
+
import { parseSync } from "oxc-parser";
|
|
12
13
|
import { ALL_REACT_DOCTOR_RULE_KEYS, CROSS_FILE_DEPENDENCY_COLLECTORS, CROSS_FILE_RULE_IDS, FRAMEWORK_SPECIFIC_RULE_KEYS, FRAMEWORK_TOKENS, MOTION_LIBRARY_PACKAGES, REACT_COMPILER_RULES, REACT_DOCTOR_OPT_IN_PROJECT_RULE_IDS, REACT_DOCTOR_PROJECT_RULES, REACT_DOCTOR_RULES, REACT_DOCTOR_RULE_REGISTRY, REACT_DOCTOR_SCAN_RULES, classifySecurityScanFile, collectCrossFileDependencyProbes, resetManifestCaches, shouldReadSecurityScanContent } from "oxlint-plugin-react-doctor/core";
|
|
13
14
|
import * as Crypto from "node:crypto";
|
|
14
15
|
import crypto, { createHash, randomUUID } from "node:crypto";
|
|
@@ -1883,7 +1884,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1883
1884
|
module.exports = picomatch;
|
|
1884
1885
|
}));
|
|
1885
1886
|
//#endregion
|
|
1886
|
-
//#region ../core/dist/collect-unplugin-auto-import-global-scopes-
|
|
1887
|
+
//#region ../core/dist/collect-unplugin-auto-import-global-scopes-hOS9iAJg.js
|
|
1887
1888
|
var import_picomatch = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1888
1889
|
const pico = require_picomatch$1();
|
|
1889
1890
|
const utils = require_utils();
|
|
@@ -2397,6 +2398,74 @@ const compileGlobPatternsLenient = (patterns, onInvalid) => {
|
|
|
2397
2398
|
}
|
|
2398
2399
|
return compiled;
|
|
2399
2400
|
};
|
|
2401
|
+
const isOxcAstNode = (value) => Boolean(value) && typeof value === "object" && typeof value.type === "string";
|
|
2402
|
+
const getStaticModuleSpecifier = (value) => {
|
|
2403
|
+
if (!isOxcAstNode(value)) return void 0;
|
|
2404
|
+
if (typeof value.value === "string") return value.value;
|
|
2405
|
+
if (value.type === "TemplateLiteral" && Array.isArray(value.expressions) && value.expressions.length === 0 && Array.isArray(value.quasis) && isOxcAstNode(value.quasis[0]) && value.quasis[0].value && typeof value.quasis[0].value === "object" && "cooked" in value.quasis[0].value && typeof value.quasis[0].value.cooked === "string") return value.quasis[0].value.cooked;
|
|
2406
|
+
};
|
|
2407
|
+
const collectStaticModuleSpecifiers = (sourceText, options = {}) => {
|
|
2408
|
+
const { filePath = "module.tsx", includeTypeOnly = true } = options;
|
|
2409
|
+
const parsedModule = parseSync(filePath, sourceText, { sourceType: "unambiguous" });
|
|
2410
|
+
const moduleSpecifiers = /* @__PURE__ */ new Set();
|
|
2411
|
+
const addSpecifier = (value) => {
|
|
2412
|
+
const moduleSpecifier = getStaticModuleSpecifier(value);
|
|
2413
|
+
if (moduleSpecifier) moduleSpecifiers.add(moduleSpecifier);
|
|
2414
|
+
};
|
|
2415
|
+
const visitNode = (value) => {
|
|
2416
|
+
if (Array.isArray(value)) {
|
|
2417
|
+
for (const child of value) visitNode(child);
|
|
2418
|
+
return;
|
|
2419
|
+
}
|
|
2420
|
+
if (!isOxcAstNode(value)) return;
|
|
2421
|
+
if (value.type === "ImportDeclaration") {
|
|
2422
|
+
const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
|
|
2423
|
+
const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.importKind !== "type");
|
|
2424
|
+
if (includeTypeOnly || value.importKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
|
|
2425
|
+
} else if (value.type === "ExportNamedDeclaration") {
|
|
2426
|
+
const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
|
|
2427
|
+
const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.exportKind !== "type");
|
|
2428
|
+
if (includeTypeOnly || value.exportKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
|
|
2429
|
+
} else if (value.type === "ExportAllDeclaration" || value.type === "ImportExpression") {
|
|
2430
|
+
if (includeTypeOnly || value.exportKind !== "type") addSpecifier(value.source);
|
|
2431
|
+
} else if (value.type === "TSImportType") {
|
|
2432
|
+
if (includeTypeOnly) addSpecifier(value.source);
|
|
2433
|
+
} else if (value.type === "TSExternalModuleReference") addSpecifier(value.expression);
|
|
2434
|
+
else if (value.type === "CallExpression" && isOxcAstNode(value.callee) && value.callee.type === "Identifier" && value.callee.name === "require" && Array.isArray(value.arguments) && value.arguments.length > 0) addSpecifier(value.arguments[0]);
|
|
2435
|
+
for (const child of Object.values(value)) visitNode(child);
|
|
2436
|
+
};
|
|
2437
|
+
visitNode(parsedModule.program);
|
|
2438
|
+
return moduleSpecifiers;
|
|
2439
|
+
};
|
|
2440
|
+
const toPosixPath = (filePath) => filePath.replace(/\\/g, "/");
|
|
2441
|
+
const isPathInsideDirectoryOrEqual = (candidatePath, directoryPath) => {
|
|
2442
|
+
const normalizedCandidatePath = posix.normalize(toPosixPath(candidatePath));
|
|
2443
|
+
const normalizedDirectoryPath = posix.normalize(toPosixPath(directoryPath));
|
|
2444
|
+
const relativePath = posix.relative(normalizedDirectoryPath, normalizedCandidatePath);
|
|
2445
|
+
return relativePath === "" || relativePath !== ".." && !relativePath.startsWith("../") && !posix.isAbsolute(relativePath);
|
|
2446
|
+
};
|
|
2447
|
+
const RESOLVABLE_EXTENSIONS = [
|
|
2448
|
+
".ts",
|
|
2449
|
+
".tsx",
|
|
2450
|
+
".js",
|
|
2451
|
+
".jsx",
|
|
2452
|
+
".mjs",
|
|
2453
|
+
".mts",
|
|
2454
|
+
".cjs",
|
|
2455
|
+
".cts",
|
|
2456
|
+
".es6"
|
|
2457
|
+
];
|
|
2458
|
+
const resolveEntryWithExtensions = (basePath) => {
|
|
2459
|
+
if (existsSync(basePath)) return basePath;
|
|
2460
|
+
for (const extension of RESOLVABLE_EXTENSIONS) {
|
|
2461
|
+
const withExtension = basePath + extension;
|
|
2462
|
+
if (existsSync(withExtension)) return withExtension;
|
|
2463
|
+
}
|
|
2464
|
+
for (const extension of RESOLVABLE_EXTENSIONS) {
|
|
2465
|
+
const indexCandidate = join(basePath, `index${extension}`);
|
|
2466
|
+
if (existsSync(indexCandidate)) return indexCandidate;
|
|
2467
|
+
}
|
|
2468
|
+
};
|
|
2400
2469
|
/**
|
|
2401
2470
|
* Resolves a path to its canonical, symlink-free form, falling back to
|
|
2402
2471
|
* the input when it cannot be realpath'd (broken symlink, permission
|
|
@@ -53517,7 +53586,7 @@ const await_ = fiberAwait;
|
|
|
53517
53586
|
* @category combinators
|
|
53518
53587
|
* @since 2.0.0
|
|
53519
53588
|
*/
|
|
53520
|
-
const join = fiberJoin;
|
|
53589
|
+
const join$1 = fiberJoin;
|
|
53521
53590
|
/**
|
|
53522
53591
|
* Interrupts a fiber, causing it to stop executing and clean up any
|
|
53523
53592
|
* acquired resources.
|
|
@@ -55514,7 +55583,7 @@ const mapEffectConcurrent = (self, f, options) => fromTransformBracket(fnUntrace
|
|
|
55514
55583
|
const fiber = runFork(f(value, i++));
|
|
55515
55584
|
trackFiber(fiber);
|
|
55516
55585
|
fiber.addObserver(onExit);
|
|
55517
|
-
return offer(effects, join(fiber));
|
|
55586
|
+
return offer(effects, join$1(fiber));
|
|
55518
55587
|
}), forever({ disableYield: true }), catchCause$1((cause) => offer(effects, failCause$3(cause)).pipe(andThen(failCause$1(effects, cause)))), forkIn(forkedScope));
|
|
55519
55588
|
}
|
|
55520
55589
|
return take(queue);
|
|
@@ -55840,9 +55909,9 @@ const mergeAll = /* @__PURE__ */ dual(2, (channels, { bufferSize = 16, concurren
|
|
|
55840
55909
|
if (semaphore) if (fibers.size < concurrencyN) yield* semaphore.take(1);
|
|
55841
55910
|
else {
|
|
55842
55911
|
pullFiber = yield* forkChild(pull);
|
|
55843
|
-
yield* raceFirst(semaphore.take(1), andThen(join(pullFiber), never));
|
|
55912
|
+
yield* raceFirst(semaphore.take(1), andThen(join$1(pullFiber), never));
|
|
55844
55913
|
}
|
|
55845
|
-
const channel = pullFiber === void 0 ? yield* pull : yield* join(pullFiber);
|
|
55914
|
+
const channel = pullFiber === void 0 ? yield* pull : yield* join$1(pullFiber);
|
|
55846
55915
|
const childScope = forkUnsafe(forkedScope);
|
|
55847
55916
|
const childPull = yield* toTransform(channel)(upstream, childScope);
|
|
55848
55917
|
while (fibers.size >= concurrencyN) {
|
|
@@ -69759,18 +69828,58 @@ const METRO_CONFIG_FILE_NAMES = [
|
|
|
69759
69828
|
const EXPO_METRO_CONFIG_EXTEND_SIGNALS = [
|
|
69760
69829
|
"expo/metro-config",
|
|
69761
69830
|
"@sentry/react-native/metro",
|
|
69762
|
-
"getSentryExpoConfig"
|
|
69831
|
+
"getSentryExpoConfig",
|
|
69832
|
+
"posthog-react-native/metro",
|
|
69833
|
+
"getPostHogExpoConfig"
|
|
69763
69834
|
];
|
|
69835
|
+
const resolveLocalMetroConfigModule = (moduleSpecifier, importingFilePath, rootDirectory) => {
|
|
69836
|
+
if (!moduleSpecifier.startsWith(".")) return void 0;
|
|
69837
|
+
const importedPath = path$1$1.resolve(path$1$1.dirname(importingFilePath), moduleSpecifier);
|
|
69838
|
+
const candidateBasePaths = [
|
|
69839
|
+
importedPath,
|
|
69840
|
+
importedPath.replace(/\.[cm]?js$/, ""),
|
|
69841
|
+
path$1$1.join(importedPath, "index")
|
|
69842
|
+
];
|
|
69843
|
+
for (const candidateBasePath of candidateBasePaths) {
|
|
69844
|
+
const resolvedPath = resolveEntryWithExtensions(candidateBasePath);
|
|
69845
|
+
if (resolvedPath !== void 0 && isFile(resolvedPath) && isPathInsideDirectoryOrEqual(resolvedPath, rootDirectory)) return resolvedPath;
|
|
69846
|
+
}
|
|
69847
|
+
};
|
|
69848
|
+
const hasExpoMetroConfigSignal = (metroConfigPath, rootDirectory) => {
|
|
69849
|
+
const pendingFilePaths = [metroConfigPath];
|
|
69850
|
+
const visitedFilePaths = /* @__PURE__ */ new Set();
|
|
69851
|
+
while (pendingFilePaths.length > 0) {
|
|
69852
|
+
const currentFilePath = pendingFilePaths.pop();
|
|
69853
|
+
if (currentFilePath === void 0 || visitedFilePaths.has(currentFilePath)) continue;
|
|
69854
|
+
if (visitedFilePaths.size >= 100) return true;
|
|
69855
|
+
visitedFilePaths.add(currentFilePath);
|
|
69856
|
+
let contents;
|
|
69857
|
+
try {
|
|
69858
|
+
contents = fs$1$3.readFileSync(currentFilePath, "utf-8");
|
|
69859
|
+
} catch {
|
|
69860
|
+
return true;
|
|
69861
|
+
}
|
|
69862
|
+
if (EXPO_METRO_CONFIG_EXTEND_SIGNALS.some((signal) => contents.includes(signal))) return true;
|
|
69863
|
+
let moduleSpecifiers;
|
|
69864
|
+
try {
|
|
69865
|
+
moduleSpecifiers = collectStaticModuleSpecifiers(contents, {
|
|
69866
|
+
filePath: currentFilePath,
|
|
69867
|
+
includeTypeOnly: false
|
|
69868
|
+
});
|
|
69869
|
+
} catch {
|
|
69870
|
+
continue;
|
|
69871
|
+
}
|
|
69872
|
+
for (const moduleSpecifier of moduleSpecifiers) {
|
|
69873
|
+
const localModulePath = resolveLocalMetroConfigModule(moduleSpecifier, currentFilePath, rootDirectory);
|
|
69874
|
+
if (localModulePath !== void 0 && !visitedFilePaths.has(localModulePath)) pendingFilePaths.push(localModulePath);
|
|
69875
|
+
}
|
|
69876
|
+
}
|
|
69877
|
+
return false;
|
|
69878
|
+
};
|
|
69764
69879
|
const checkExpoMetroConfig = (context) => {
|
|
69765
69880
|
const metroConfigPath = METRO_CONFIG_FILE_NAMES.map((fileName) => path$1$1.join(context.rootDirectory, fileName)).find((candidatePath) => isFile(candidatePath));
|
|
69766
69881
|
if (metroConfigPath === void 0) return [];
|
|
69767
|
-
|
|
69768
|
-
try {
|
|
69769
|
-
contents = fs$1$3.readFileSync(metroConfigPath, "utf-8");
|
|
69770
|
-
} catch {
|
|
69771
|
-
return [];
|
|
69772
|
-
}
|
|
69773
|
-
if (EXPO_METRO_CONFIG_EXTEND_SIGNALS.some((signal) => contents.includes(signal))) return [];
|
|
69882
|
+
if (hasExpoMetroConfigSignal(metroConfigPath, context.rootDirectory)) return [];
|
|
69774
69883
|
return [buildExpoDiagnostic({
|
|
69775
69884
|
rule: "expo-metro-config",
|
|
69776
69885
|
filePath: path$1$1.basename(metroConfigPath),
|
|
@@ -77209,9 +77318,9 @@ const runInspect = (input, hooks = {}) => gen(function* () {
|
|
|
77209
77318
|
if (!lintFailureState.didFail) if (maintainabilityFailureState.didFail) yield* scanProgress.fail(MAINTAINABILITY_FAIL_TEXT);
|
|
77210
77319
|
else if (input.suppressScanSummary) yield* scanProgress.stop();
|
|
77211
77320
|
else yield* scanProgress.succeed(`Scanned ${scannedFilesLabel} in ${scanElapsedSeconds}s${workerCountSuffix}`);
|
|
77212
|
-
const supplyChainResult = yield* join(supplyChainFiber);
|
|
77321
|
+
const supplyChainResult = yield* join$1(supplyChainFiber);
|
|
77213
77322
|
const supplyChainCollected = supplyChainResult.diagnostics;
|
|
77214
|
-
const securityScanCollected = yield* join(securityScanFiber);
|
|
77323
|
+
const securityScanCollected = yield* join$1(securityScanFiber);
|
|
77215
77324
|
yield* reporterService.finalize;
|
|
77216
77325
|
const finalDiagnostics = sortDiagnosticsStable(assignFixGroups([
|
|
77217
77326
|
...envCollected,
|
|
@@ -77220,7 +77329,7 @@ const runInspect = (input, hooks = {}) => gen(function* () {
|
|
|
77220
77329
|
...lintCollected,
|
|
77221
77330
|
...maintainabilityCollected
|
|
77222
77331
|
]));
|
|
77223
|
-
const githubViewerPermission = yield* join(githubViewerPermissionFiber);
|
|
77332
|
+
const githubViewerPermission = yield* join$1(githubViewerPermissionFiber);
|
|
77224
77333
|
const scoreMetadata = {
|
|
77225
77334
|
...repo !== null ? { repo } : {},
|
|
77226
77335
|
...sha !== null ? { sha } : {},
|
|
@@ -78070,4 +78179,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
78070
78179
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
78071
78180
|
|
|
78072
78181
|
//# sourceMappingURL=index.js.map
|
|
78073
|
-
//# debugId=
|
|
78182
|
+
//# debugId=d37422e0-941a-5fe0-81e5-bc092d5cd66e
|
|
@@ -1,18 +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]="
|
|
3
|
-
import { An as gen, At as discoverSupportedSubprojects, Bt as getDiffInfo, Cr as messageFromUnknown, F as STAGED_FILES_TEMP_DIR_PREFIX, Fn as provide$1, Gn as provide, H as isDebugFlagEnabled, I as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, Jt as isPathInsideDirectory, K as isCiOrCodingAgentEnvironment, Kt as highlighter, Lt as getBaselineDiffPlan, Pt as findLegacyConfig, Rn as runPromise, Rt as getChangedLineRanges, Sr as isPlainObject, T as METRIC, Wt as hasSupportedFrameworkOrLibrary, X as Git, _ as VERSION, _r as STAGED_FILES_PROJECT_CONFIG_FILENAMES, br as isErrnoException, er as CANONICAL_GITHUB_URL, f as setJsonReportDirectory, fn as resolveScanTarget, g as writeJsonReport, h as writeJsonErrorReport, ht as buildJsonReport, in as mapWithConcurrency, kt as detectAiTrainingEnvironment, n as recordDistribution, nn as listWorkspacePackages, p as setJsonReportMode, q as isCodingAgentEnvironment, sn as remainingDeadlineBudgetMs, t as recordCount, u as enableJsonMode, ut as StagedFiles, yn as toRelativePath, z as CliInputError } from "./record-metric-
|
|
4
|
-
import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-
|
|
5
|
-
import { r as flushSentry } from "./build-section-divider-
|
|
6
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
7
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
8
|
-
import { A as runGitRaw, M as cliLogger, c as spinner, i as hasDoctorScript, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-
|
|
9
|
-
import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-
|
|
10
|
-
import { c as openWorkflowPullRequest, i as warnDeprecatedDiff, l as stageWorkflowFile, r as resolveScope, s as resolveBlockingLevel, t as finalizeScope, u as toForwardSlashes } from "./resolve-scope-
|
|
11
|
-
import { t as shouldSkipPrompts } from "./should-skip-prompts-
|
|
12
|
-
import { A as resolveMergeBaseRef, C as copyToClipboard, D as deduplicateProjectScans, E as collectProjectSourceFileCounts, I as printDiagnosticsDump, O as createInvocationInspect, S as CLI_AGENT_BINARIES, T as buildHandoffPayload, V as buildEmptyReportMessage, _ as resolveCliInspectOptions, a as projectManifestChanged, b as setUpGitHubActions, c as selectProjects, d as resolveProjectChangedLineRanges, f as resolveProjectDiffIncludePaths, g as resolveWorkspaceDeadCodeOwner, h as retryMissingProjectScores, i as validateModeFlags, j as printHeadlessReport, k as inspect, l as buildCodeFrame, m as resolveProjectRelativeDirectory, n as formatSkippedProjectsMessage, o as partitionProjectScanOutcomes, p as resolveProjectSourceFilePaths, r as validateIncludeUntrackedScope, t as shouldFailScanGate, u as resolveProjectScan, v as filterScansForSurface, w as launchCliAgent, x as detectLaunchableAgents, y as countUniqueScannedFiles, z as filterDiagnosticsByCategories } from "./should-fail-scan-gate-
|
|
13
|
-
import { a as recordGate, i as readPreference, o as runMigrations, p as SETUP_HINT_EVENT, r as isGatePending, s as writePreference, u as HANDOFF_TARGET_PREFERENCE_ID } from "./report-workflow-result
|
|
14
|
-
import { a as askUpgradeActionVersion, c as recordCiPromptDecision, i as installReactDoctorAgentHooks, l as hasHandledActionUpgrade, o as askAddToGitHubActions, r as findAgentsWithOutdatedReactDoctorHooks, s as hasHandledCiPrompt, t as getSkillSourceDirectory, u as recordActionUpgradeDecision } from "./install-react-doctor-
|
|
15
|
-
import { t as readObjectFile } from "./read-object-file-
|
|
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]="52ef48c8-ca8e-5418-83af-b6c962fa4d57")}catch(e){}}();
|
|
3
|
+
import { An as gen, At as discoverSupportedSubprojects, Bt as getDiffInfo, Cr as messageFromUnknown, F as STAGED_FILES_TEMP_DIR_PREFIX, Fn as provide$1, Gn as provide, H as isDebugFlagEnabled, I as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, Jt as isPathInsideDirectory, K as isCiOrCodingAgentEnvironment, Kt as highlighter, Lt as getBaselineDiffPlan, Pt as findLegacyConfig, Rn as runPromise, Rt as getChangedLineRanges, Sr as isPlainObject, T as METRIC, Wt as hasSupportedFrameworkOrLibrary, X as Git, _ as VERSION, _r as STAGED_FILES_PROJECT_CONFIG_FILENAMES, br as isErrnoException, er as CANONICAL_GITHUB_URL, f as setJsonReportDirectory, fn as resolveScanTarget, g as writeJsonReport, h as writeJsonErrorReport, ht as buildJsonReport, in as mapWithConcurrency, kt as detectAiTrainingEnvironment, n as recordDistribution, nn as listWorkspacePackages, p as setJsonReportMode, q as isCodingAgentEnvironment, sn as remainingDeadlineBudgetMs, t as recordCount, u as enableJsonMode, ut as StagedFiles, yn as toRelativePath, z as CliInputError } from "./record-metric-Bkub8U7Q.js";
|
|
4
|
+
import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-pRbw2p6F.js";
|
|
5
|
+
import { r as flushSentry } from "./build-section-divider-03Wz07A3.js";
|
|
6
|
+
import { n as handleUserError, t as handleError } from "./handle-error-CHEoVuek.js";
|
|
7
|
+
import { t as reportErrorToSentry } from "./report-error-DuEpff_7.js";
|
|
8
|
+
import { A as runGitRaw, M as cliLogger, c as spinner, i as hasDoctorScript, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-BcPdnCoo.js";
|
|
9
|
+
import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-B8pUhQ3R.js";
|
|
10
|
+
import { c as openWorkflowPullRequest, i as warnDeprecatedDiff, l as stageWorkflowFile, r as resolveScope, s as resolveBlockingLevel, t as finalizeScope, u as toForwardSlashes } from "./resolve-scope-ajqqgMdS.js";
|
|
11
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-BmKdNS3r.js";
|
|
12
|
+
import { A as resolveMergeBaseRef, C as copyToClipboard, D as deduplicateProjectScans, E as collectProjectSourceFileCounts, I as printDiagnosticsDump, O as createInvocationInspect, S as CLI_AGENT_BINARIES, T as buildHandoffPayload, V as buildEmptyReportMessage, _ as resolveCliInspectOptions, a as projectManifestChanged, b as setUpGitHubActions, c as selectProjects, d as resolveProjectChangedLineRanges, f as resolveProjectDiffIncludePaths, g as resolveWorkspaceDeadCodeOwner, h as retryMissingProjectScores, i as validateModeFlags, j as printHeadlessReport, k as inspect, l as buildCodeFrame, m as resolveProjectRelativeDirectory, n as formatSkippedProjectsMessage, o as partitionProjectScanOutcomes, p as resolveProjectSourceFilePaths, r as validateIncludeUntrackedScope, t as shouldFailScanGate, u as resolveProjectScan, v as filterScansForSurface, w as launchCliAgent, x as detectLaunchableAgents, y as countUniqueScannedFiles, z as filterDiagnosticsByCategories } from "./should-fail-scan-gate-3inPx0Rt.js";
|
|
13
|
+
import { a as recordGate, i as readPreference, o as runMigrations, p as SETUP_HINT_EVENT, r as isGatePending, s as writePreference, u as HANDOFF_TARGET_PREFERENCE_ID } from "./report-workflow-result--V0KVZGX.js";
|
|
14
|
+
import { a as askUpgradeActionVersion, c as recordCiPromptDecision, i as installReactDoctorAgentHooks, l as hasHandledActionUpgrade, o as askAddToGitHubActions, r as findAgentsWithOutdatedReactDoctorHooks, s as hasHandledCiPrompt, t as getSkillSourceDirectory, u as recordActionUpgradeDecision } from "./install-react-doctor-Dtcyy__y.js";
|
|
15
|
+
import { t as readObjectFile } from "./read-object-file-nByxIxZd.js";
|
|
16
16
|
import * as path$1 from "node:path";
|
|
17
17
|
import * as fs$1 from "node:fs";
|
|
18
18
|
import { tmpdir } from "node:os";
|
|
@@ -1441,5 +1441,5 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
|
|
|
1441
1441
|
//#endregion
|
|
1442
1442
|
export { warnDeprecatedFailOn as n, runProjectMigrations as r, inspectAction as t };
|
|
1443
1443
|
|
|
1444
|
-
//# sourceMappingURL=inspect-
|
|
1445
|
-
//# debugId=
|
|
1444
|
+
//# sourceMappingURL=inspect-vOtCicMw.js.map
|
|
1445
|
+
//# debugId=52ef48c8-ca8e-5418-83af-b6c962fa4d57
|
|
@@ -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]="
|
|
3
|
-
import { T as METRIC, t as recordCount, zn as runSync } from "./record-metric-
|
|
4
|
-
import { r as isExpectedUserError } from "./telemetry-runtime-
|
|
5
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
6
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
7
|
-
import { t as printBrandedHeader } from "./print-branded-header-
|
|
8
|
-
import { n as runInstallReactDoctor } from "./install-react-doctor-
|
|
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]="548b12e6-3c30-505d-8b51-c68b2e5c6bbc")}catch(e){}}();
|
|
3
|
+
import { T as METRIC, t as recordCount, zn as runSync } from "./record-metric-Bkub8U7Q.js";
|
|
4
|
+
import { r as isExpectedUserError } from "./telemetry-runtime-pRbw2p6F.js";
|
|
5
|
+
import { n as handleUserError, t as handleError } from "./handle-error-CHEoVuek.js";
|
|
6
|
+
import { t as reportErrorToSentry } from "./report-error-DuEpff_7.js";
|
|
7
|
+
import { t as printBrandedHeader } from "./print-branded-header-DcnApzbb.js";
|
|
8
|
+
import { n as runInstallReactDoctor } from "./install-react-doctor-Dtcyy__y.js";
|
|
9
9
|
//#region src/cli/commands/install.ts
|
|
10
10
|
const installAction = async (options, command) => {
|
|
11
11
|
recordCount(METRIC.cliInvoked, 1, { command: "install" });
|
|
@@ -29,5 +29,5 @@ const installAction = async (options, command) => {
|
|
|
29
29
|
//#endregion
|
|
30
30
|
export { installAction };
|
|
31
31
|
|
|
32
|
-
//# sourceMappingURL=install-
|
|
33
|
-
//# debugId=
|
|
32
|
+
//# sourceMappingURL=install-DGW5St2C.js.map
|
|
33
|
+
//# debugId=548b12e6-3c30-505d-8b51-c68b2e5c6bbc
|
|
@@ -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, Cn as error$1, En as warn, Kt as highlighter, Tn as log, k as RUN_GIT_MAX_BUFFER_BYTES, wn as info$1, zn as runSync } 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]="8bad28fe-56c7-501d-bdc1-688ec7a2bd87")}catch(e){}}();
|
|
3
|
+
import { B as isNonInteractiveEnvironment, Cn as error$1, En as warn, Kt as highlighter, Tn as log, k as RUN_GIT_MAX_BUFFER_BYTES, wn as info$1, zn as runSync } from "./record-metric-Bkub8U7Q.js";
|
|
4
4
|
import { a as chalk, i as stripAnsi, t as eastAsianWidth } from "./get-east-asian-width-Cglw13G7.js";
|
|
5
5
|
import { execFileSync } from "node:child_process";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
@@ -2805,5 +2805,5 @@ const installReactDoctorScriptStep = (projectRoot) => {
|
|
|
2805
2805
|
//#endregion
|
|
2806
2806
|
export { runGitRaw as A, isRecord as C, readPackageJson as D, packageHasRecordKey as E, cliLogger as M, resolveGitPath as O, getPackageJsonPath as S, packageHasNestedRecordKey as T, REACT_DOCTOR_COMMAND as _, installReactDoctorScriptStep as a, VITE_PLUS_HOOKS_PATH as b, spinner as c, HUSKY_HOOKS_PATH as d, LEFTHOOK_CONFIG_FILES as f, PRE_COMMIT_CONFIG_FILE as g, OVERCOMMIT_CONFIG_FILE as h, hasDoctorScript as i, writeJsonFile as j, runGit as k, HOOK_FILE_NAME as l, NON_BLOCKING_REACT_DOCTOR_COMMAND as m, findNearestPackageDirectory as n, isSpinnerSilent as o, LEGACY_HOOK_RUNNER_RELATIVE_PATH as p, hasDoctorDependency as r, setSpinnerSilent as s, DOCTOR_PACKAGE_NAME as t, HOOK_RELATIVE_PATH as u, SIMPLE_GIT_HOOKS_CONFIG_FILE as v, packageHasDependency as w, ensureTrailingNewline as x, SIMPLE_GIT_HOOKS_PACKAGE_JSON_KEY as y };
|
|
2807
2807
|
|
|
2808
|
-
//# sourceMappingURL=install-doctor-script-
|
|
2809
|
-
//# debugId=
|
|
2808
|
+
//# sourceMappingURL=install-doctor-script-BcPdnCoo.js.map
|
|
2809
|
+
//# debugId=8bad28fe-56c7-501d-bdc1-688ec7a2bd87
|