react-doctor 0.9.13 → 0.9.14-dev.bcf8062
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-DnwIzXJn.js +7 -0
- package/dist/{active-scan-abort-registry-DwG6tSPy.js → active-scan-abort-registry-B72ASBUh.js} +3 -3
- package/dist/build-section-divider-v7NN_cR8.js +80 -0
- package/dist/{ci-DqnZCnrL.js → ci-BnQkEEV1.js} +12 -12
- package/dist/cli.js +25 -26
- package/dist/constants-CKOk_Fa9.js +23 -0
- package/dist/{design-DqUidb1f.js → design-Du1rV5hV.js} +4 -4
- package/dist/{devtools-CC2PAZ85.js → devtools-DOdrAPkZ.js} +3 -3
- package/dist/duplicate-jsx-worker.d.ts +1 -0
- package/dist/duplicate-jsx-worker.js +636 -0
- package/dist/{exit-gracefully-CrpeIbra.js → exit-gracefully-D9ffPCDJ.js} +7 -7
- package/dist/{get-east-asian-width-Bv2TD3Xj.js → get-east-asian-width-CM5BOEC-.js} +3 -3
- package/dist/{handle-error-BEYYtsCl.js → handle-error-BWHTahSo.js} +5 -5
- package/dist/index.js +2329 -1616
- package/dist/{inspect-BjMaC5WV.js → inspect-fWFs2jtk.js} +25 -21
- package/dist/{install-DxLmASQ5.js → install-DWpPYvxU.js} +9 -9
- package/dist/{install-doctor-script-4EWviJL8.js → install-doctor-script-wNnu5y_f.js} +5 -5
- package/dist/{install-github-workflow-BPznUbbo.js → install-github-workflow-DsgMnbqe.js} +5 -5
- package/dist/{install-react-doctor-Baq9hjoF.js → install-react-doctor-hFwI2elO.js} +8 -8
- package/dist/{jsx-runtime-DvynQ_wu.js → jsx-runtime-DCJqkm-B.js} +7 -7
- package/dist/oxlint-worker.d.ts +1 -0
- package/dist/oxlint-worker.js +135 -0
- package/dist/{print-branded-header-DSB6i3kk.js → print-branded-header-BcXGdtml.js} +4 -4
- package/dist/project-analysis-worker.js +457 -470
- package/dist/{prompt-runtime-scan-url-BibDt9O1.js → prompt-runtime-scan-url-s4NKC5nM.js} +5 -5
- package/dist/{read-object-file-DfWpkle4.js → read-object-file-Be3X79OD.js} +4 -4
- package/dist/{record-metric-Cckscwg_.js → record-metric-D8ltm-Oh.js} +1823 -1059
- package/dist/{report-error-C1YnoRNl.js → report-error-5LSXHGJq.js} +7 -7
- package/dist/{report-workflow-result-IdGRoBFN.js → report-workflow-result-2aLf7RhF.js} +5 -5
- package/dist/{resolve-scope-Bb6fljxd.js → resolve-scope-BXJ4WEdf.js} +6 -6
- package/dist/{rules-BcFekwN4.js → rules-C71aHICA.js} +6 -6
- package/dist/{run-scan-app-CKHynQx8.js → run-scan-app-BqzvDO2G.js} +28 -22
- package/dist/{runtime-scan-7Y_mbqEa.js → runtime-scan-TcGr2CHS.js} +14 -14
- package/dist/{sanitize-runtime-url-DzyBLbi3.js → sanitize-runtime-url-LBQ4amZg.js} +5 -5
- package/dist/{scan-DQCwBx6p.js → scan-8j0aKndg.js} +9 -9
- package/dist/{semver-DFtnEmN-.js → semver-DlmXks31.js} +3 -3
- package/dist/{should-fail-scan-gate-BYPsKIde.js → should-fail-scan-gate-fjfa2sYx.js} +116 -72
- package/dist/{should-skip-prompts-CKkbB3rC.js → should-skip-prompts-BZZxI1vY.js} +4 -4
- package/dist/{should-use-tui-Crfoao-l.js → should-use-tui-C59qAiOG.js} +4 -4
- package/dist/{telemetry-runtime-DKJyjz9o.js → telemetry-runtime-CmlSXXfi.js} +153 -5
- package/dist/unwrap-typescript-expression-CbO_6kmC.js +14 -0
- package/dist/{version-CMkUAGmw.js → version-DRDcTlA9.js} +4 -4
- package/dist/{why-By3I6_Ex.js → why-DthVqP00.js} +4 -4
- package/dist/{with-run-span-DxFGyW7k.js → with-run-span-D4-folvM.js} +5 -5
- package/package.json +6 -6
- package/dist/build-section-divider-DELfSn3p.js +0 -216
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { N as SENTRY_FLUSH_TIMEOUT_MS,
|
|
4
|
-
import { n as shutdownTelemetry,
|
|
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]="c101e4f0-0556-5d74-9e1f-7afcba7c5349")}catch(e){}}();
|
|
3
|
+
import { N as SENTRY_FLUSH_TIMEOUT_MS, Qt as isReactDoctorError, T as METRIC, l as getRunId, o as buildSentryScope, t as recordCount } from "./record-metric-D8ltm-Oh.js";
|
|
4
|
+
import { i as getSentry, n as shutdownTelemetry, o as isExpectedUserError } from "./telemetry-runtime-CmlSXXfi.js";
|
|
5
5
|
import { r as recordRunTraceId, t as getActiveRunTrace } from "./active-run-trace-dlIZeEvb.js";
|
|
6
|
-
import * as Sentry from "@sentry/node";
|
|
7
6
|
//#region src/cli/utils/report-error.ts
|
|
8
7
|
/**
|
|
9
8
|
* Sends an error to Sentry — enriched with a fresh snapshot of the current run
|
|
@@ -21,7 +20,8 @@ import * as Sentry from "@sentry/node";
|
|
|
21
20
|
* original error.
|
|
22
21
|
*/
|
|
23
22
|
const reportErrorToSentry = async (error) => {
|
|
24
|
-
|
|
23
|
+
const Sentry = await getSentry();
|
|
24
|
+
if (!Sentry?.isInitialized()) return void 0;
|
|
25
25
|
if (isExpectedUserError(error)) return void 0;
|
|
26
26
|
try {
|
|
27
27
|
const { tags, contexts } = buildSentryScope();
|
|
@@ -60,5 +60,5 @@ const reportErrorToSentry = async (error) => {
|
|
|
60
60
|
//#endregion
|
|
61
61
|
export { reportErrorToSentry as t };
|
|
62
62
|
|
|
63
|
-
//# sourceMappingURL=report-error-
|
|
64
|
-
//# debugId=
|
|
63
|
+
//# sourceMappingURL=report-error-5LSXHGJq.js.map
|
|
64
|
+
//# debugId=c101e4f0-0556-5d74-9e1f-7afcba7c5349
|
|
@@ -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 { O as REACT_DOCTOR_CONFIG_PROJECT_NAME, T as METRIC, t as recordCount } from "./record-metric-
|
|
4
|
-
import { u as isCommandAvailable } from "./install-github-workflow-
|
|
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]="804fcc69-10aa-545d-a45a-53dfaf1703ff")}catch(e){}}();
|
|
3
|
+
import { O as REACT_DOCTOR_CONFIG_PROJECT_NAME, T as METRIC, t as recordCount } from "./record-metric-D8ltm-Oh.js";
|
|
4
|
+
import { u as isCommandAvailable } from "./install-github-workflow-DsgMnbqe.js";
|
|
5
5
|
import { spawn } from "node:child_process";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
7
7
|
import process$1 from "node:process";
|
|
@@ -275,5 +275,5 @@ const reportWorkflowResult = (workflowSpinner, result, projectRoot) => {
|
|
|
275
275
|
//#endregion
|
|
276
276
|
export { recordGate as a, ACTION_UPGRADE_EVENT as c, INSTALL_AGENTS_PREFERENCE_ID as d, ONBOARDING_EVENT as f, detectAvailableAgents as h, readPreference as i, CI_PITCH_EVENT as l, computeDefaultSelectedAgents as m, openUrl as n, runMigrations as o, SETUP_HINT_EVENT as p, isGatePending as r, writePreference as s, reportWorkflowResult as t, HANDOFF_TARGET_PREFERENCE_ID as u };
|
|
277
277
|
|
|
278
|
-
//# sourceMappingURL=report-workflow-result-
|
|
279
|
-
//# debugId=
|
|
278
|
+
//# sourceMappingURL=report-workflow-result-2aLf7RhF.js.map
|
|
279
|
+
//# debugId=804fcc69-10aa-545d-a45a-53dfaf1703ff
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import {
|
|
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]="7d305383-e085-5df3-b5b6-b5b6b3c01b02")}catch(e){}}();
|
|
3
|
+
import { Ft as filterSourceFiles, Xt as isPathInsideDirectory, or as toCanonicalPath } from "./record-metric-D8ltm-Oh.js";
|
|
4
4
|
import { t as toForwardSlashes } from "./path-format-DnHpmJwG.js";
|
|
5
|
-
import { M as cliLogger } from "./install-doctor-script-
|
|
6
|
-
import { d as detectDefaultBranch, f as runCommand, l as prompts, u as isCommandAvailable } from "./install-github-workflow-
|
|
5
|
+
import { M as cliLogger } from "./install-doctor-script-wNnu5y_f.js";
|
|
6
|
+
import { d as detectDefaultBranch, f as runCommand, l as prompts, u as isCommandAvailable } from "./install-github-workflow-DsgMnbqe.js";
|
|
7
7
|
import * as path$1 from "node:path";
|
|
8
8
|
//#region src/cli/utils/open-workflow-pull-request.ts
|
|
9
9
|
const NEW_BRANCH_PREFIX = "react-doctor/add-github-actions";
|
|
@@ -333,5 +333,5 @@ const finalizeScope = async ({ requested, diffInfo, skipPrompts, isQuiet }) => {
|
|
|
333
333
|
//#endregion
|
|
334
334
|
export { isValidBlockingLevel as a, openWorkflowPullRequest as c, warnDeprecatedDiff as i, stageWorkflowFile as l, isScopeValue as n, pickBlockingLevel as o, resolveScope as r, resolveBlockingLevel as s, finalizeScope as t };
|
|
335
335
|
|
|
336
|
-
//# sourceMappingURL=resolve-scope-
|
|
337
|
-
//# debugId=
|
|
336
|
+
//# sourceMappingURL=resolve-scope-BXJ4WEdf.js.map
|
|
337
|
+
//# debugId=7d305383-e085-5df3-b5b6-b5b6b3c01b02
|
|
@@ -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 {
|
|
4
|
-
import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-
|
|
5
|
-
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]="b79452f3-0c0b-5516-868a-91c3c66e6660")}catch(e){}}();
|
|
3
|
+
import { $t as isSameRuleKey, Ct as clearConfigCache, Jt as highlighter, Sn as validateConfigTypes, T as METRIC, Ut as getEquivalentRuleKeys, _t as buildRuleDocsUrl, an as loadConfigWithSource, dr as COMPILER_CLEANUP_BUCKET, fr as COMPILER_CLEANUP_RULE_KEYS, ir as isPlainObject, t as recordCount } from "./record-metric-D8ltm-Oh.js";
|
|
4
|
+
import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-wNnu5y_f.js";
|
|
5
|
+
import { t as readObjectFile } from "./read-object-file-Be3X79OD.js";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
7
7
|
import * as fs$1 from "node:fs";
|
|
8
8
|
import { REACT_DOCTOR_RULES } from "oxlint-plugin-react-doctor/core";
|
|
@@ -577,5 +577,5 @@ const rulesUnignoreTagAction = async (tag, options) => {
|
|
|
577
577
|
//#endregion
|
|
578
578
|
export { rulesCategoryAction, rulesDisableAction, rulesEnableAction, rulesExplainAction, rulesIgnoreTagAction, rulesListAction, rulesSetAction, rulesUnignoreTagAction };
|
|
579
579
|
|
|
580
|
-
//# sourceMappingURL=rules-
|
|
581
|
-
//# debugId=
|
|
580
|
+
//# sourceMappingURL=rules-C71aHICA.js.map
|
|
581
|
+
//# debugId=b79452f3-0c0b-5516-868a-91c3c66e6660
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { Bn as
|
|
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]="dc2d15e2-330e-5c97-852a-868b827ec1c8")}catch(e){}}();
|
|
3
|
+
import { Bn as runPromise, Bt as getChangedLineRanges, C as CI_TRUST_COMPANIES, Dr as getCategoryImpact, G as isCiEnvironment, Gt as hasPublishedFixRecipe, Hn as sync, Ht as getDiffInfo, Jn as succeed, Jt as highlighter, L as TUI_REPORT_COMPACT_MAX_ROWS, R as TUI_REPORT_DETAIL_WIDTH_FRACTION, T as METRIC, V as isGitHookEnvironment, Wn as void_, _r as GITHUB_ACTIONS_SETUP_URL, _t as buildRuleDocsUrl, bt as calculateScore, ct as Reporter, er as yieldToEventLoop, ln as remainingDeadlineBudgetMs, mn as resolveScanTarget, mr as DIAGNOSTIC_CATEGORY_BUCKETS, n as recordDistribution, on as mapWithConcurrency, ot as Progress, t as recordCount, zt as getBaselineDiffPlan } from "./record-metric-D8ltm-Oh.js";
|
|
4
4
|
import { t as toForwardSlashes } from "./path-format-DnHpmJwG.js";
|
|
5
|
-
import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-
|
|
6
|
-
import { i as isReactDoctorWorkflowInstalled } from "./install-github-workflow-
|
|
7
|
-
import { r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-
|
|
8
|
-
import { B as
|
|
9
|
-
import { a as recordGate, f as ONBOARDING_EVENT, n as openUrl, r as isGatePending } from "./report-workflow-result-
|
|
10
|
-
import { a as useExitOnCtrlC, c as Spinner, d as useInput, f as Transform, h as Box, i as import_react, l as useStdout, m as Text, n as registerMountedTuiRenderer, o as terminalSymbols, p as render, r as useStdoutDimensions, s as isPrintableInput, t as require_jsx_runtime, u as useApp } from "./jsx-runtime-
|
|
5
|
+
import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-wNnu5y_f.js";
|
|
6
|
+
import { i as isReactDoctorWorkflowInstalled } from "./install-github-workflow-DsgMnbqe.js";
|
|
7
|
+
import { r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-BXJ4WEdf.js";
|
|
8
|
+
import { A as createInvocationInspect, B as hasIncompleteScoreAnalysis, C as detectLaunchableAgents, D as buildHandoffPayload, E as launchCliAgent, F as formatSkippedCheckLabel, G as hasLintHardFailure, H as buildNoScoreMessage, I as formatElapsedTime, J as formatFixRecipeLine, K as buildRulePriorityMap, L as printFooter, M as resolveMergeBaseRef, O as collectProjectSourceFiles, P as pluralize, R as printDiagnosticsDump, S as setUpGitHubActions, T as copyToClipboard, U as buildEmptyReportMessage, V as filterDiagnosticsByCategories, Y as formatLearnMoreLine, _ as retryMissingProjectScores, b as filterScansForSurface, c as partitionProjectScanOutcomes, d as buildCodeFrame, f as resolveProjectScan, h as resolveProjectSourceFilePaths, i as validateIncludeUntrackedScope, k as deduplicateProjectScans, l as discoverWorkspacePackages, m as resolveProjectDiffIncludePaths, n as formatSkippedProjectsMessage, o as resolveExcludedProjectDirectories, p as resolveProjectChangedLineRanges, q as buildSortedRuleGroups, s as projectManifestChanged, t as shouldFailScanGate, u as selectProjects, v as resolveWorkspaceDeadCodeOwner, w as CLI_AGENT_BINARIES, x as countUniqueScannedFiles, y as resolveCliInspectOptions, z as formatDiagnosticSite } from "./should-fail-scan-gate-fjfa2sYx.js";
|
|
9
|
+
import { a as recordGate, f as ONBOARDING_EVENT, n as openUrl, r as isGatePending } from "./report-workflow-result-2aLf7RhF.js";
|
|
10
|
+
import { a as useExitOnCtrlC, c as Spinner, d as useInput, f as Transform, h as Box, i as import_react, l as useStdout, m as Text, n as registerMountedTuiRenderer, o as terminalSymbols, p as render, r as useStdoutDimensions, s as isPrintableInput, t as require_jsx_runtime, u as useApp } from "./jsx-runtime-DCJqkm-B.js";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import { performance } from "node:perf_hooks";
|
|
13
13
|
import isUnicodeSupported from "is-unicode-supported";
|
|
@@ -2064,10 +2064,13 @@ const resolveTuiInspectOptions = (input, config) => {
|
|
|
2064
2064
|
warnings
|
|
2065
2065
|
};
|
|
2066
2066
|
};
|
|
2067
|
-
const
|
|
2067
|
+
const resolveProjectSelection = async (rootDirectory, input) => {
|
|
2068
2068
|
const packages = discoverWorkspacePackages(rootDirectory);
|
|
2069
|
-
|
|
2070
|
-
return
|
|
2069
|
+
const workspaceProjectDirectories = packages.map((workspacePackage) => workspacePackage.directory);
|
|
2070
|
+
return {
|
|
2071
|
+
selectedDirectories: packages.length > 1 && !input.projectFlag && !input.skipPrompts && (input.configProjects ?? []).length === 0 && process.stdin.isTTY === true ? await promptProjectSelection(packages, rootDirectory) : await selectProjects(rootDirectory, input.projectFlag, input.skipPrompts ?? false, input.configProjects),
|
|
2072
|
+
workspaceProjectDirectories
|
|
2073
|
+
};
|
|
2071
2074
|
};
|
|
2072
2075
|
const promptProjectSelection = (packages, rootDirectory) => new Promise((resolve) => {
|
|
2073
2076
|
let disposeRenderer = () => {};
|
|
@@ -2249,8 +2252,9 @@ const runMountedScan = async (rootDirectory, presentation, blockingLevel, execut
|
|
|
2249
2252
|
throw error;
|
|
2250
2253
|
}
|
|
2251
2254
|
};
|
|
2252
|
-
const runSingleProjectScan = async (rootScanTarget, projectDirectory, input, scopePlan, blockingLevel, inspectProject) => {
|
|
2255
|
+
const runSingleProjectScan = async (rootScanTarget, projectDirectory, workspaceProjectDirectories, input, scopePlan, blockingLevel, inspectProject) => {
|
|
2253
2256
|
const projectScan = await resolveProjectScan(rootScanTarget, projectDirectory);
|
|
2257
|
+
const isRootProject = path.resolve(projectScan.directory) === path.resolve(rootScanTarget.resolvedDirectory);
|
|
2254
2258
|
const isSupplyChainEnabled = input.options?.supplyChain ?? projectScan.config?.supplyChain?.enabled ?? true;
|
|
2255
2259
|
const scopeOptions = resolveProjectTuiScanScope({
|
|
2256
2260
|
plan: scopePlan,
|
|
@@ -2273,7 +2277,9 @@ const runSingleProjectScan = async (rootScanTarget, projectDirectory, input, sco
|
|
|
2273
2277
|
uiLayers: {
|
|
2274
2278
|
reporter: reporterLayerForStore(context.store),
|
|
2275
2279
|
progress: progressLayerForStore(context.store)
|
|
2276
|
-
}
|
|
2280
|
+
},
|
|
2281
|
+
excludedProjectDirectories: resolveExcludedProjectDirectories(projectScan.directory, workspaceProjectDirectories),
|
|
2282
|
+
retainExcludedProjectDeadCodeDiagnostics: isRootProject
|
|
2277
2283
|
});
|
|
2278
2284
|
const reportSelection = selectReportDiagnostics({
|
|
2279
2285
|
scan: {
|
|
@@ -2315,7 +2321,7 @@ const runSingleProjectScan = async (rootScanTarget, projectDirectory, input, sco
|
|
|
2315
2321
|
};
|
|
2316
2322
|
});
|
|
2317
2323
|
};
|
|
2318
|
-
const runMultiProjectScan = async (rootScanTarget, directories, input, scopePlan, blockingLevel, inspectProject) => {
|
|
2324
|
+
const runMultiProjectScan = async (rootScanTarget, directories, workspaceProjectDirectories, input, scopePlan, blockingLevel, inspectProject) => {
|
|
2319
2325
|
const feedbackStartTime = performance.now();
|
|
2320
2326
|
const rootDirectory = rootScanTarget.resolvedDirectory;
|
|
2321
2327
|
const discoveredProjectScans = deduplicateProjectScans(await mapWithConcurrency([...directories], 4, (projectDirectory) => resolveProjectScan(rootScanTarget, projectDirectory)));
|
|
@@ -2356,7 +2362,7 @@ const runMultiProjectScan = async (rootScanTarget, directories, input, scopePlan
|
|
|
2356
2362
|
});
|
|
2357
2363
|
context.store.setProgress(`Scanning ${projectCount} projects…`);
|
|
2358
2364
|
await yieldToEventLoop();
|
|
2359
|
-
const
|
|
2365
|
+
const precomputedSourceFiles = scopePlan.scope === "full" ? await collectProjectSourceFiles(rootDirectory, projectScans.map(({ projectScan }) => projectScan.directory)) : null;
|
|
2360
2366
|
const { completedScans, skippedScans } = partitionProjectScanOutcomes(await mapWithConcurrency(projectScans, 4, async ({ projectScan, scopeOptions }) => {
|
|
2361
2367
|
if (input.options?.deadlineEpochMs !== void 0 && remainingDeadlineBudgetMs(input.options.deadlineEpochMs) === 0) {
|
|
2362
2368
|
finishedCount += 1;
|
|
@@ -2380,7 +2386,7 @@ const runMultiProjectScan = async (rootScanTarget, directories, input, scopePlan
|
|
|
2380
2386
|
isCi: isCiEnvironment(),
|
|
2381
2387
|
configOverride: projectScan.config,
|
|
2382
2388
|
configSourceDirectory: projectScan.configSourceDirectory ?? void 0,
|
|
2383
|
-
|
|
2389
|
+
precomputedSourceFiles: precomputedSourceFiles?.get(projectScan.directory),
|
|
2384
2390
|
uiLayers: {
|
|
2385
2391
|
reporter: Reporter.layerNoop,
|
|
2386
2392
|
progress: progressLayerForStore(context.store, {
|
|
@@ -2389,7 +2395,7 @@ const runMultiProjectScan = async (rootScanTarget, directories, input, scopePlan
|
|
|
2389
2395
|
})
|
|
2390
2396
|
},
|
|
2391
2397
|
concurrentScan: true,
|
|
2392
|
-
excludedProjectDirectories:
|
|
2398
|
+
excludedProjectDirectories: resolveExcludedProjectDirectories(projectScan.directory, [...discoveredProjectScans.map((candidateProjectScan) => candidateProjectScan.directory), ...workspaceProjectDirectories]),
|
|
2393
2399
|
retainExcludedProjectDeadCodeDiagnostics: ownsWorkspaceDeadCode
|
|
2394
2400
|
});
|
|
2395
2401
|
finishedCount += 1;
|
|
@@ -2497,15 +2503,15 @@ const runScanApp = async (input) => {
|
|
|
2497
2503
|
configProjects: input.configProjects ?? scanTarget.userConfig?.projects,
|
|
2498
2504
|
share: input.share ?? scanTarget.userConfig?.share ?? true
|
|
2499
2505
|
};
|
|
2500
|
-
const selectedDirectories = await
|
|
2506
|
+
const { selectedDirectories, workspaceProjectDirectories } = await resolveProjectSelection(rootDirectory, resolvedInput);
|
|
2501
2507
|
const inspectProject = createInvocationInspect(input.options?.concurrency);
|
|
2502
2508
|
const blockingLevel = resolveBlockingLevel({ blocking: resolvedInput.blocking }, scanTarget.userConfig);
|
|
2503
2509
|
if (selectedDirectories.length === 0) return { shouldFail: false };
|
|
2504
|
-
if (selectedDirectories.length === 1) return runSingleProjectScan(scanTarget, selectedDirectories[0], resolvedInput, scopePlan, blockingLevel, inspectProject);
|
|
2505
|
-
return runMultiProjectScan(scanTarget, selectedDirectories, resolvedInput, scopePlan, blockingLevel, inspectProject);
|
|
2510
|
+
if (selectedDirectories.length === 1) return runSingleProjectScan(scanTarget, selectedDirectories[0], workspaceProjectDirectories, resolvedInput, scopePlan, blockingLevel, inspectProject);
|
|
2511
|
+
return runMultiProjectScan(scanTarget, selectedDirectories, workspaceProjectDirectories, resolvedInput, scopePlan, blockingLevel, inspectProject);
|
|
2506
2512
|
};
|
|
2507
2513
|
//#endregion
|
|
2508
2514
|
export { runScanApp };
|
|
2509
2515
|
|
|
2510
|
-
//# sourceMappingURL=run-scan-app-
|
|
2511
|
-
//# debugId=
|
|
2516
|
+
//# sourceMappingURL=run-scan-app-BqzvDO2G.js.map
|
|
2517
|
+
//# debugId=dc2d15e2-330e-5c97-852a-868b827ec1c8
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import {
|
|
4
|
-
import { t as activeScanAbortRegistry } from "./active-scan-abort-registry-
|
|
5
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
6
|
-
import { n as resetSentryRunState, r as withRunSpan } from "./with-run-span-
|
|
7
|
-
import { _ as RUNTIME_SCAN_SNAPSHOT_TIMEOUT_MS, b as RUNTIME_SCAN_TRACING_COMPLETE_TIMEOUT_MS, f as RUNTIME_SCAN_PROBE_RELATIVE_PATH, g as RUNTIME_SCAN_SAFE_CDP_PAGE_URLS, h as RUNTIME_SCAN_PROBE_SNAPSHOT_TOKEN_PLACEHOLDER, l as RUNTIME_SCAN_MAX_SNAPSHOT_PAYLOAD_BYTES, m as RUNTIME_SCAN_PROBE_SNAPSHOT_BINDING_NAME_PLACEHOLDER, n as RUNTIME_SCAN_BROWSER_WIDTH_PX, o as RUNTIME_SCAN_MAX_COMPONENT_EVENTS, p as RUNTIME_SCAN_PROBE_SNAPSHOT_ATTRIBUTE_NAME_PLACEHOLDER, r as RUNTIME_SCAN_CONTROL_CHARACTERS_PATTERN, s as RUNTIME_SCAN_MAX_RECORDING_DURATION_MS, t as sanitizeRuntimeUrl, v as RUNTIME_SCAN_TRACE_CATEGORIES, y as RUNTIME_SCAN_TRACE_FILE_EXTENSION } from "./sanitize-runtime-url-
|
|
8
|
-
import { r as resolveTuiEnvironment, t as isTuiEnvironmentSupported } from "./should-use-tui-
|
|
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]="1b5f85ff-9d27-5bf1-b160-e3988e740085")}catch(e){}}();
|
|
3
|
+
import { Jt as highlighter, T as METRIC, t as recordCount, u as enableJsonMode, z as CliInputError } from "./record-metric-D8ltm-Oh.js";
|
|
4
|
+
import { t as activeScanAbortRegistry } from "./active-scan-abort-registry-B72ASBUh.js";
|
|
5
|
+
import { t as reportErrorToSentry } from "./report-error-5LSXHGJq.js";
|
|
6
|
+
import { n as resetSentryRunState, r as withRunSpan } from "./with-run-span-D4-folvM.js";
|
|
7
|
+
import { _ as RUNTIME_SCAN_SNAPSHOT_TIMEOUT_MS, b as RUNTIME_SCAN_TRACING_COMPLETE_TIMEOUT_MS, f as RUNTIME_SCAN_PROBE_RELATIVE_PATH, g as RUNTIME_SCAN_SAFE_CDP_PAGE_URLS, h as RUNTIME_SCAN_PROBE_SNAPSHOT_TOKEN_PLACEHOLDER, l as RUNTIME_SCAN_MAX_SNAPSHOT_PAYLOAD_BYTES, m as RUNTIME_SCAN_PROBE_SNAPSHOT_BINDING_NAME_PLACEHOLDER, n as RUNTIME_SCAN_BROWSER_WIDTH_PX, o as RUNTIME_SCAN_MAX_COMPONENT_EVENTS, p as RUNTIME_SCAN_PROBE_SNAPSHOT_ATTRIBUTE_NAME_PLACEHOLDER, r as RUNTIME_SCAN_CONTROL_CHARACTERS_PATTERN, s as RUNTIME_SCAN_MAX_RECORDING_DURATION_MS, t as sanitizeRuntimeUrl, v as RUNTIME_SCAN_TRACE_CATEGORIES, y as RUNTIME_SCAN_TRACE_FILE_EXTENSION } from "./sanitize-runtime-url-LBQ4amZg.js";
|
|
8
|
+
import { r as resolveTuiEnvironment, t as isTuiEnvironmentSupported } from "./should-use-tui-C59qAiOG.js";
|
|
9
9
|
import * as path$1 from "node:path";
|
|
10
10
|
import * as fs$1 from "node:fs";
|
|
11
11
|
import { randomUUID } from "node:crypto";
|
|
12
|
-
import * as os$1 from "node:os";
|
|
13
12
|
import * as fsp from "node:fs/promises";
|
|
13
|
+
import * as os$1 from "node:os";
|
|
14
14
|
import { createGzip } from "node:zlib";
|
|
15
15
|
import { performance } from "node:perf_hooks";
|
|
16
16
|
import { pipeline } from "node:stream/promises";
|
|
@@ -448,15 +448,15 @@ const startDevtoolsTrace = async (cdpSession) => {
|
|
|
448
448
|
throw cause;
|
|
449
449
|
}
|
|
450
450
|
};
|
|
451
|
-
const endDevtoolsTrace = async (cdpSession) => {
|
|
451
|
+
const endDevtoolsTrace = async (cdpSession, timeoutMs = RUNTIME_SCAN_TRACING_COMPLETE_TIMEOUT_MS) => {
|
|
452
452
|
const traceComplete = new Promise((resolve) => {
|
|
453
453
|
cdpSession.once("Tracing.tracingComplete", resolve);
|
|
454
454
|
});
|
|
455
455
|
let timeoutHandle;
|
|
456
456
|
const traceTimeout = new Promise((_resolve, reject) => {
|
|
457
457
|
timeoutHandle = setTimeout(() => {
|
|
458
|
-
reject(
|
|
459
|
-
},
|
|
458
|
+
reject(new CliInputError("Chrome did not finalize the performance trace within 60 seconds. Record a shorter interaction and retry."));
|
|
459
|
+
}, timeoutMs);
|
|
460
460
|
});
|
|
461
461
|
let stream;
|
|
462
462
|
try {
|
|
@@ -719,7 +719,7 @@ const resolveRuntimeScanUrl = async (url) => {
|
|
|
719
719
|
if (url !== void 0) return url;
|
|
720
720
|
if (!isTuiEnvironmentSupported(resolveTuiEnvironment(process.stderr.isTTY === true))) throw new CliInputError("A URL is required outside an interactive terminal. Run `react-doctor scan <url>`.");
|
|
721
721
|
recordCount(METRIC.runtimeScanUrlPromptShown);
|
|
722
|
-
const { promptRuntimeScanUrl } = await import("./prompt-runtime-scan-url-
|
|
722
|
+
const { promptRuntimeScanUrl } = await import("./prompt-runtime-scan-url-s4NKC5nM.js");
|
|
723
723
|
return promptRuntimeScanUrl();
|
|
724
724
|
};
|
|
725
725
|
const runtimeScanAction = async (url, flags) => {
|
|
@@ -766,5 +766,5 @@ const runtimeScanAction = async (url, flags) => {
|
|
|
766
766
|
//#endregion
|
|
767
767
|
export { runtimeScanAction };
|
|
768
768
|
|
|
769
|
-
//# sourceMappingURL=runtime-scan-
|
|
770
|
-
//# debugId=
|
|
769
|
+
//# sourceMappingURL=runtime-scan-TcGr2CHS.js.map
|
|
770
|
+
//# debugId=1b5f85ff-9d27-5bf1-b160-e3988e740085
|
|
@@ -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 { z as CliInputError } from "./record-metric-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c87359df-27e8-51bc-a27c-c0291dbe52fe")}catch(e){}}();
|
|
3
|
+
import { z as CliInputError } from "./record-metric-D8ltm-Oh.js";
|
|
4
4
|
//#region src/cli/runtime-scan/constants.ts
|
|
5
5
|
const RUNTIME_SCAN_MAX_COMPONENT_EVENTS = 2e3;
|
|
6
6
|
const RUNTIME_SCAN_MAX_SNAPSHOT_PAYLOAD_BYTES = 5 * 1024 * 1024;
|
|
@@ -26,7 +26,7 @@ const RUNTIME_SCAN_LOCAL_DEV_PORTS = [
|
|
|
26
26
|
];
|
|
27
27
|
const RUNTIME_SCAN_BROWSER_WIDTH_PX = 1440;
|
|
28
28
|
const RUNTIME_SCAN_TRACE_FILE_EXTENSION = ".json.gz";
|
|
29
|
-
const RUNTIME_SCAN_TRACING_COMPLETE_TIMEOUT_MS =
|
|
29
|
+
const RUNTIME_SCAN_TRACING_COMPLETE_TIMEOUT_MS = 6e4;
|
|
30
30
|
const RUNTIME_SCAN_PROBE_RELATIVE_PATH = "runtime-scan/browser-probe.iife.js";
|
|
31
31
|
const RUNTIME_SCAN_PROBE_SNAPSHOT_BINDING_NAME_PLACEHOLDER = "__REACT_DOCTOR_RUNTIME_SCAN_CAPTURE__";
|
|
32
32
|
const RUNTIME_SCAN_PROBE_SNAPSHOT_ATTRIBUTE_NAME_PLACEHOLDER = "data-react-doctor-runtime-scan-snapshot";
|
|
@@ -72,5 +72,5 @@ const sanitizeRuntimeUrl = (rawUrl) => {
|
|
|
72
72
|
//#endregion
|
|
73
73
|
export { RUNTIME_SCAN_SNAPSHOT_TIMEOUT_MS as _, RUNTIME_SCAN_LOCAL_DEV_PORTS as a, RUNTIME_SCAN_TRACING_COMPLETE_TIMEOUT_MS as b, RUNTIME_SCAN_MAX_SNAPSHOT_BYTES as c, RUNTIME_SCAN_MAX_TRACE_BYTES as d, RUNTIME_SCAN_PROBE_RELATIVE_PATH as f, RUNTIME_SCAN_SAFE_CDP_PAGE_URLS as g, RUNTIME_SCAN_PROBE_SNAPSHOT_TOKEN_PLACEHOLDER as h, RUNTIME_SCAN_LAYOUT_THRASH_RATIO as i, RUNTIME_SCAN_MAX_SNAPSHOT_PAYLOAD_BYTES as l, RUNTIME_SCAN_PROBE_SNAPSHOT_BINDING_NAME_PLACEHOLDER as m, RUNTIME_SCAN_BROWSER_WIDTH_PX as n, RUNTIME_SCAN_MAX_COMPONENT_EVENTS as o, RUNTIME_SCAN_PROBE_SNAPSHOT_ATTRIBUTE_NAME_PLACEHOLDER as p, RUNTIME_SCAN_CONTROL_CHARACTERS_PATTERN as r, RUNTIME_SCAN_MAX_RECORDING_DURATION_MS as s, sanitizeRuntimeUrl as t, RUNTIME_SCAN_MAX_STRING_LENGTH as u, RUNTIME_SCAN_TRACE_CATEGORIES as v, RUNTIME_SCAN_TRACE_FILE_EXTENSION as y };
|
|
74
74
|
|
|
75
|
-
//# sourceMappingURL=sanitize-runtime-url-
|
|
76
|
-
//# debugId=
|
|
75
|
+
//# sourceMappingURL=sanitize-runtime-url-LBQ4amZg.js.map
|
|
76
|
+
//# debugId=c87359df-27e8-51bc-a27c-c0291dbe52fe
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { T as METRIC,
|
|
4
|
-
import { i as warnDeprecatedDiff } from "./resolve-scope-
|
|
5
|
-
import { a as validateModeFlags, r as validateFilePathSelectionFlags,
|
|
6
|
-
import { n as warnDeprecatedFailOn, r as runProjectMigrations, t as inspectAction } from "./inspect-
|
|
7
|
-
import { n as shouldUseTui, r as resolveTuiEnvironment } from "./should-use-tui-
|
|
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]="06e334cc-aa5e-5d86-9693-8a9079711639")}catch(e){}}();
|
|
3
|
+
import { T as METRIC, mn as resolveScanTarget, t as recordCount } from "./record-metric-D8ltm-Oh.js";
|
|
4
|
+
import { i as warnDeprecatedDiff } from "./resolve-scope-BXJ4WEdf.js";
|
|
5
|
+
import { a as validateModeFlags, r as validateFilePathSelectionFlags, y as resolveCliInspectOptions } from "./should-fail-scan-gate-fjfa2sYx.js";
|
|
6
|
+
import { n as warnDeprecatedFailOn, r as runProjectMigrations, t as inspectAction } from "./inspect-fWFs2jtk.js";
|
|
7
|
+
import { n as shouldUseTui, r as resolveTuiEnvironment } from "./should-use-tui-C59qAiOG.js";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
//#region src/cli/commands/scan.ts
|
|
10
10
|
const runScanCommand = async (input) => {
|
|
@@ -28,7 +28,7 @@ const runScanCommand = async (input) => {
|
|
|
28
28
|
warnDeprecatedFailOn(input.flags, scanTarget.userConfig);
|
|
29
29
|
warnDeprecatedDiff(input.flags, scanTarget.userConfig);
|
|
30
30
|
recordCount(METRIC.cliInvoked, 1, { command: input.invocationCommand });
|
|
31
|
-
const { runScanApp } = await import("./run-scan-app-
|
|
31
|
+
const { runScanApp } = await import("./run-scan-app-BqzvDO2G.js");
|
|
32
32
|
const { shouldFail } = await runScanApp({
|
|
33
33
|
directory: input.directory,
|
|
34
34
|
scanTarget,
|
|
@@ -43,5 +43,5 @@ const runScanCommand = async (input) => {
|
|
|
43
43
|
//#endregion
|
|
44
44
|
export { runScanCommand };
|
|
45
45
|
|
|
46
|
-
//# sourceMappingURL=scan-
|
|
47
|
-
//# debugId=
|
|
46
|
+
//# sourceMappingURL=scan-8j0aKndg.js.map
|
|
47
|
+
//# debugId=06e334cc-aa5e-5d86-9693-8a9079711639
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5d8e40f7-4111-5236-adfc-3b597f28e1e3")}catch(e){}}();
|
|
3
3
|
import { t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
4
|
//#region ../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/constants.js
|
|
5
5
|
var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
@@ -3215,5 +3215,5 @@ var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3215
3215
|
//#endregion
|
|
3216
3216
|
export { require_picomatch as n, require_semver as t };
|
|
3217
3217
|
|
|
3218
|
-
//# sourceMappingURL=semver-
|
|
3219
|
-
//# debugId=
|
|
3218
|
+
//# sourceMappingURL=semver-DlmXks31.js.map
|
|
3219
|
+
//# debugId=5d8e40f7-4111-5236-adfc-3b597f28e1e3
|