react-doctor 0.9.13-dev.ff7dd67 → 0.9.14-dev.922616f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_react-doctor_require-typescript-DXQDYeWK.js +16 -0
- package/dist/{active-run-trace-dlIZeEvb.js → active-run-trace-Dewycxda.js} +3 -3
- package/dist/{active-scan-abort-registry-DwG6tSPy.js → active-scan-abort-registry-CCTgal0O.js} +3 -3
- package/dist/build-section-divider-CNFcGNYm.js +81 -0
- package/dist/{ci-ByM_SFTq.js → ci-CbTOIIel.js} +14 -13
- package/dist/cli.js +31 -30
- package/dist/constants-CW_854PH.js +1035 -0
- package/dist/constants-DNh19qg9.js +23 -0
- package/dist/{design-2hjOmtV1.js → design-CPav17ye.js} +4 -4
- package/dist/{devtools-CC2PAZ85.js → devtools-D20sefkm.js} +3 -3
- package/dist/duplicate-jsx-worker.d.ts +1 -0
- package/dist/duplicate-jsx-worker.js +636 -0
- package/dist/{exit-gracefully-niPFXq9Y.js → exit-gracefully-De_DePvj.js} +7 -7
- package/dist/fs-utils-C88IbqFa.js +45 -0
- package/dist/{get-east-asian-width-Bv2TD3Xj.js → get-east-asian-width-DRPy7dqz.js} +4 -4
- package/dist/{handle-error-D-4lexec.js → handle-error-B3GWdtbq.js} +6 -5
- package/dist/index.d.ts +8511 -8509
- package/dist/index.js +61693 -60580
- package/dist/{inspect-BrctG7ql.js → inspect-vT3G27FR.js} +38 -27
- package/dist/{install-CcFc56OK.js → install-C-_xdS80.js} +10 -9
- package/dist/{install-doctor-script-Coa2ErCg.js → install-doctor-script-BFv3Iiwe.js} +17 -8
- package/dist/{install-github-workflow-DlfdrYkQ.js → install-github-workflow-C-rhKOiP.js} +10 -10
- package/dist/{install-react-doctor-BWxqZMX-.js → install-react-doctor-BvU99j_I.js} +15 -11
- package/dist/is-cache-globally-disabled-CoHiYz2i.js +10 -0
- package/dist/{jsx-runtime-Njm7vAoN.js → jsx-runtime-CiJj554e.js} +11 -10
- package/dist/oxlint-worker.d.ts +1 -0
- package/dist/oxlint-worker.js +225 -0
- package/dist/{path-format-DnHpmJwG.js → path-format-By20mo8A.js} +3 -3
- package/dist/{print-branded-header-DFkeG4BS.js → print-branded-header-DJMuy9Hr.js} +4 -4
- package/dist/project-analysis-worker.js +461 -480
- package/dist/{prompt-runtime-scan-url-BenBNq25.js → prompt-runtime-scan-url-1YpMskOr.js} +6 -6
- package/dist/react-compiler-detection-worker.d.ts +1 -0
- package/dist/react-compiler-detection-worker.js +1029 -0
- package/dist/{read-object-file-CqMtxcfF.js → read-object-file-CWvQd5ls.js} +4 -4
- package/dist/{record-metric-Bkorhx43.js → record-metric-DSQY-qOh.js} +12998 -12770
- package/dist/{report-error-DPjmfRi9.js → report-error-C1g5jtl7.js} +9 -8
- package/dist/{report-workflow-result-CBL6CrLY.js → report-workflow-result-it0G879R.js} +24 -11
- package/dist/{resolve-scope-BFloAClV.js → resolve-scope-DmsEUxUn.js} +7 -7
- package/dist/{rules-BKNy9YIl.js → rules-BXkqekjc.js} +8 -7
- package/dist/{run-scan-app-Bc70ozp-.js → run-scan-app-wCfH8LdA.js} +30 -23
- package/dist/{runtime-scan-ODrdp5mV.js → runtime-scan-CXmDoQ2W.js} +13 -12
- package/dist/{sanitize-runtime-url-BYOmPSdm.js → sanitize-runtime-url-kA6U9dQF.js} +4 -4
- package/dist/{scan-BfcGHHkI.js → scan-Dd-VVq_7.js} +10 -9
- package/dist/{semver-DFtnEmN-.js → semver-BZIuy1gP.js} +3 -3
- package/dist/{should-fail-scan-gate-CCPDoHaM.js → should-fail-scan-gate-YK9VAFNu.js} +1339 -1283
- package/dist/{should-skip-prompts-D-ClPHHR.js → should-skip-prompts-SdC04R_e.js} +4 -4
- package/dist/{should-use-tui-BaCVIPPN.js → should-use-tui-D2fEl9q2.js} +4 -4
- package/dist/start-scan-preamble-D0QepYZ_.js +68 -0
- package/dist/start-scan-preamble-DVhXIPc0.d.ts +1 -0
- package/dist/start-scan-preamble.d.ts +1 -0
- package/dist/start-scan-preamble.js +4 -0
- package/dist/{telemetry-runtime-BGWa_GB9.js → telemetry-runtime-DOCJCTsL.js} +154 -5
- package/dist/{unref-stdin-SK3WfwxS.js → unref-stdin-D-NZBFpg.js} +3 -3
- package/dist/unwrap-typescript-expression-CrEPQUWz.js +14 -0
- package/dist/{version-DN1N-oZy.js → version-WpL8zILr.js} +5 -4
- package/dist/{why-CyioXUF2.js → why-CnQMoK2D.js} +4 -4
- package/dist/{with-run-span-GsCWW2_X.js → with-run-span-B0SMAP_Z.js} +7 -6
- package/package.json +9 -7
- package/dist/build-section-divider-BRuN44fL.js +0 -216
|
@@ -1,24 +1,23 @@
|
|
|
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 { n as
|
|
5
|
-
import { r as flushSentry } from "./
|
|
6
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
7
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
8
|
-
import { t as toForwardSlashes } from "./path-format-
|
|
9
|
-
import {
|
|
10
|
-
import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-
|
|
11
|
-
import { c as openWorkflowPullRequest, i as warnDeprecatedDiff, l as stageWorkflowFile, r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-
|
|
12
|
-
import { t as shouldSkipPrompts } from "./should-skip-prompts-
|
|
13
|
-
import { A as
|
|
14
|
-
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-
|
|
15
|
-
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-
|
|
16
|
-
import { t as readObjectFile } from "./read-object-file-
|
|
17
|
-
import * as path$1 from "node:path";
|
|
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]="6c893ff3-ad47-5d1f-83a8-6c52a429937a")}catch(e){}}();
|
|
3
|
+
import { N as discardPrefetchedGitCommands, T as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, lt as CANONICAL_GITHUB_URL, u as METRIC, w as STAGED_FILES_TEMP_DIR_PREFIX, xn as STAGED_FILES_PROJECT_CONFIG_FILENAMES } from "./constants-CW_854PH.js";
|
|
4
|
+
import { A as Git, D as isCodingAgentEnvironment, E as isCiOrCodingAgentEnvironment, Et as hasSupportedFrameworkOrLibrary, G as StagedFiles, Gt as resolveScanTarget, Ht as remainingDeadlineBudgetMs, Ln as isErrnoException, Lt as listWorkspacePackages, Ot as highlighter, Pn as messageFromUnknown, Qt as toRelativePath, S as isDebugFlagEnabled, St as getDiffInfo, Tn as provide, X as buildJsonReport, _ as VERSION, bt as getChangedLineRanges, dt as detectAiTrainingEnvironment, f as setJsonReportDirectory, ft as discoverSupportedSubprojects, g as writeJsonReport, gt as findLegacyConfig, h as writeJsonErrorReport, hn as provide$1, n as recordDistribution, p as setJsonReportMode, t as recordCount, u as enableJsonMode, un as gen, vn as runPromise, y as CliInputError, yt as getBaselineDiffPlan, zn as isPlainObject, zt as mapWithConcurrency } from "./record-metric-DSQY-qOh.js";
|
|
5
|
+
import { n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-DOCJCTsL.js";
|
|
6
|
+
import { n as handleUserError, t as handleError } from "./handle-error-B3GWdtbq.js";
|
|
7
|
+
import { t as reportErrorToSentry } from "./report-error-C1g5jtl7.js";
|
|
8
|
+
import { t as toForwardSlashes } from "./path-format-By20mo8A.js";
|
|
9
|
+
import { N as cliLogger, c as spinner, i as hasDoctorScript, j as runGitRaw, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-BFv3Iiwe.js";
|
|
10
|
+
import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-C-rhKOiP.js";
|
|
11
|
+
import { c as openWorkflowPullRequest, i as warnDeprecatedDiff, l as stageWorkflowFile, r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-DmsEUxUn.js";
|
|
12
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-SdC04R_e.js";
|
|
13
|
+
import { A as createInvocationInspect, C as detectLaunchableAgents, D as buildHandoffPayload, E as launchCliAgent, M as resolveMergeBaseRef, N as printHeadlessReport, O as collectProjectSourceFiles, R as printDiagnosticsDump, S as setUpGitHubActions, T as copyToClipboard, U as buildEmptyReportMessage, V as filterDiagnosticsByCategories, W as resolveInvocationOxlintConcurrency, _ as retryMissingProjectScores, a as validateModeFlags, b as filterScansForSurface, c as partitionProjectScanOutcomes, d as buildCodeFrame, f as resolveProjectScan, g as resolveProjectRelativeDirectory, h as resolveProjectSourceFilePaths, i as validateIncludeUntrackedScope, j as inspect, k as deduplicateProjectScans, l as discoverWorkspacePackages, m as resolveProjectDiffIncludePaths, n as formatSkippedProjectsMessage, o as resolveExcludedProjectDirectories, p as resolveProjectChangedLineRanges, s as projectManifestChanged, t as shouldFailScanGate, u as selectProjects, v as resolveWorkspaceDeadCodeOwner, w as CLI_AGENT_BINARIES, x as countUniqueScannedFiles, y as resolveCliInspectOptions } from "./should-fail-scan-gate-YK9VAFNu.js";
|
|
14
|
+
import { a as recordGate, g as loadAgentInstall, 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-it0G879R.js";
|
|
15
|
+
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-BvU99j_I.js";
|
|
16
|
+
import { t as readObjectFile } from "./read-object-file-CWvQd5ls.js";
|
|
18
17
|
import * as fs$1 from "node:fs";
|
|
18
|
+
import * as path$1 from "node:path";
|
|
19
19
|
import { tmpdir } from "node:os";
|
|
20
20
|
import { performance } from "node:perf_hooks";
|
|
21
|
-
import { SKILL_MANIFEST_FILE, getSkillAgentConfig, installSkillsFromSource } from "agent-install";
|
|
22
21
|
//#region src/cli/utils/handoff-target-preference.ts
|
|
23
22
|
const HANDOFF_TARGET_PREFERENCE = {
|
|
24
23
|
id: HANDOFF_TARGET_PREFERENCE_ID,
|
|
@@ -30,6 +29,7 @@ const rememberHandoffTarget = (target, options = {}) => writePreference(HANDOFF_
|
|
|
30
29
|
//#region src/cli/utils/install-skill-for-agent.ts
|
|
31
30
|
const installReactDoctorSkillForAgent = async (agent, projectRoot) => {
|
|
32
31
|
const source = getSkillSourceDirectory();
|
|
32
|
+
const { installSkillsFromSource, SKILL_MANIFEST_FILE } = loadAgentInstall();
|
|
33
33
|
if (!fs$1.existsSync(path$1.join(source, SKILL_MANIFEST_FILE))) return false;
|
|
34
34
|
const result = await installSkillsFromSource({
|
|
35
35
|
source,
|
|
@@ -125,8 +125,10 @@ const handoffToAgent = async (input) => {
|
|
|
125
125
|
outcome: "ci-suppressed",
|
|
126
126
|
diagnosticsCount: input.diagnostics.length
|
|
127
127
|
});
|
|
128
|
+
const launchableAgents = await detectLaunchableAgents();
|
|
129
|
+
const { getSkillAgentConfig } = loadAgentInstall();
|
|
128
130
|
const choices = [
|
|
129
|
-
...
|
|
131
|
+
...launchableAgents.map((agentId) => ({
|
|
130
132
|
title: getSkillAgentConfig(agentId).displayName,
|
|
131
133
|
description: `Open ${CLI_AGENT_BINARIES[agentId]} here with the top issues as a prompt`,
|
|
132
134
|
value: agentId
|
|
@@ -176,7 +178,7 @@ const handoffToAgent = async (input) => {
|
|
|
176
178
|
return;
|
|
177
179
|
}
|
|
178
180
|
const agentId = handoffTarget;
|
|
179
|
-
const displayName = getSkillAgentConfig(agentId).displayName;
|
|
181
|
+
const displayName = loadAgentInstall().getSkillAgentConfig(agentId).displayName;
|
|
180
182
|
const skillSpinner = spinner(`Installing the /react-doctor skill for ${displayName}...`).start();
|
|
181
183
|
try {
|
|
182
184
|
if (await installReactDoctorSkillForAgent(agentId, input.rootDirectory)) skillSpinner.succeed(`Installed the /react-doctor skill for ${displayName}.`);
|
|
@@ -334,7 +336,11 @@ const PROJECT_MIGRATIONS = [
|
|
|
334
336
|
}
|
|
335
337
|
}
|
|
336
338
|
];
|
|
337
|
-
const runProjectMigrations = (projectRoot, options = {}) =>
|
|
339
|
+
const runProjectMigrations = async (projectRoot, options = {}) => {
|
|
340
|
+
const results = await runMigrations(PROJECT_MIGRATIONS, { projectRoot }, options);
|
|
341
|
+
if (results.some((result) => result.ran && result.applied)) discardPrefetchedGitCommands();
|
|
342
|
+
return results;
|
|
343
|
+
};
|
|
338
344
|
//#endregion
|
|
339
345
|
//#region src/cli/utils/read-changed-files-from.ts
|
|
340
346
|
const isSafeRelativePath = (filePath) => {
|
|
@@ -583,10 +589,11 @@ const runProjectScanBatch = async (input) => {
|
|
|
583
589
|
const ownsBatchSpinnerSilence = isMultiProject && input.isSilent;
|
|
584
590
|
const wasSpinnerSilent = isSpinnerSilent();
|
|
585
591
|
if (ownsBatchSpinnerSilence) setSpinnerSilent(true);
|
|
592
|
+
const projectConcurrency = Math.max(4, (input.oxlintConcurrency ?? 1) * 4);
|
|
586
593
|
let finishedProjectCount = 0;
|
|
587
594
|
let scanOutcomes;
|
|
588
595
|
try {
|
|
589
|
-
scanOutcomes = await mapWithConcurrency(input.projects, isMultiProject ?
|
|
596
|
+
scanOutcomes = await mapWithConcurrency(input.projects, isMultiProject ? projectConcurrency : 1, async (project) => {
|
|
590
597
|
const scanOutcome = await input.scanProject(project);
|
|
591
598
|
finishedProjectCount += 1;
|
|
592
599
|
batchSpinner?.update(`Scanning ${projectCount} projects… (${finishedProjectCount}/${projectCount})`);
|
|
@@ -1109,14 +1116,14 @@ const buildProjectInspectOptions = ({ context, projectScan, projectScanPlan, own
|
|
|
1109
1116
|
return {
|
|
1110
1117
|
...context.scanOptions,
|
|
1111
1118
|
deadCode: context.workspaceDeadCodeOwner === null ? context.scanOptions.deadCode : ownsWorkspaceDeadCode,
|
|
1112
|
-
|
|
1119
|
+
precomputedSourceFiles: context.precomputedSourceFiles?.get(scanDirectory),
|
|
1113
1120
|
deadlineEpochMs: context.scanDeadlineEpochMs,
|
|
1114
1121
|
includePaths: projectScanPlan.includePaths,
|
|
1115
1122
|
configOverride: projectScan.config,
|
|
1116
1123
|
configSourceDirectory: projectScan.configSourceDirectory ?? void 0,
|
|
1117
1124
|
suppressRendering: context.isMultiProject,
|
|
1118
1125
|
concurrentScan: context.isMultiProject,
|
|
1119
|
-
excludedProjectDirectories: context.projectScans.
|
|
1126
|
+
excludedProjectDirectories: resolveExcludedProjectDirectories(scanDirectory, [...context.projectScans.map((candidateProjectScan) => candidateProjectScan.directory), ...context.workspaceProjectDirectories]),
|
|
1120
1127
|
retainExcludedProjectDeadCodeDiagnostics: ownsWorkspaceDeadCode,
|
|
1121
1128
|
baseline: context.baselineRef !== null && projectScanPlan.projectBaselineBaseFiles !== null && projectScanPlan.projectBaselineHeadFiles !== null ? {
|
|
1122
1129
|
ref: context.baselineRef,
|
|
@@ -1239,7 +1246,8 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect", se
|
|
|
1239
1246
|
return;
|
|
1240
1247
|
}
|
|
1241
1248
|
const scanOptions = resolveCliInspectOptions(flags, userConfig);
|
|
1242
|
-
const
|
|
1249
|
+
const oxlintConcurrency = resolveInvocationOxlintConcurrency(scanOptions.concurrency);
|
|
1250
|
+
const inspectProject = createInvocationInspect(oxlintConcurrency);
|
|
1243
1251
|
const scanDeadlineEpochMs = scanOptions.maxDurationMs !== void 0 ? Date.now() + scanOptions.maxDurationMs : void 0;
|
|
1244
1252
|
const categoryFilters = new Set(scanOptions.categoryFilters ?? []);
|
|
1245
1253
|
const skipPrompts = shouldSkipPrompts({
|
|
@@ -1261,6 +1269,7 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect", se
|
|
|
1261
1269
|
});
|
|
1262
1270
|
return;
|
|
1263
1271
|
}
|
|
1272
|
+
const workspaceProjectDirectories = discoverWorkspacePackages(resolvedDirectory).map((workspacePackage) => workspacePackage.directory);
|
|
1264
1273
|
const projectDirectories = await selectProjects(resolvedDirectory, flags.project, skipPrompts, userConfig?.projects);
|
|
1265
1274
|
const projectSelectionCompletedTime = performance.now();
|
|
1266
1275
|
const hasPositionalFileSelection = selectedFilePaths !== void 0;
|
|
@@ -1352,8 +1361,9 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect", se
|
|
|
1352
1361
|
isQuiet,
|
|
1353
1362
|
isMultiProject,
|
|
1354
1363
|
workspaceDeadCodeOwner,
|
|
1355
|
-
|
|
1364
|
+
precomputedSourceFiles: isMultiProject && !isDiffMode ? await collectProjectSourceFiles(resolvedDirectory, projectScans.map((projectScan) => projectScan.directory)) : null,
|
|
1356
1365
|
projectScans,
|
|
1366
|
+
workspaceProjectDirectories,
|
|
1357
1367
|
baselineRef,
|
|
1358
1368
|
scope,
|
|
1359
1369
|
changedLineRanges
|
|
@@ -1362,6 +1372,7 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect", se
|
|
|
1362
1372
|
projects: projectScans,
|
|
1363
1373
|
isQuiet,
|
|
1364
1374
|
isSilent: scanOptions.silent === true,
|
|
1375
|
+
oxlintConcurrency,
|
|
1365
1376
|
scanProject: (projectScan) => runConfiguredProjectScan({
|
|
1366
1377
|
context: projectScanExecutionContext,
|
|
1367
1378
|
projectScan
|
|
@@ -1450,5 +1461,5 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect", se
|
|
|
1450
1461
|
//#endregion
|
|
1451
1462
|
export { warnDeprecatedFailOn as n, runProjectMigrations as r, inspectAction as t };
|
|
1452
1463
|
|
|
1453
|
-
//# sourceMappingURL=inspect-
|
|
1454
|
-
//# debugId=
|
|
1464
|
+
//# sourceMappingURL=inspect-vT3G27FR.js.map
|
|
1465
|
+
//# debugId=6c893ff3-ad47-5d1f-83a8-6c52a429937a
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
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]="74bc3f75-de29-5342-b5f9-a0f4d94a54d3")}catch(e){}}();
|
|
3
|
+
import { u as METRIC } from "./constants-CW_854PH.js";
|
|
4
|
+
import { t as recordCount, yn as runSync } from "./record-metric-DSQY-qOh.js";
|
|
5
|
+
import { o as isExpectedUserError } from "./telemetry-runtime-DOCJCTsL.js";
|
|
6
|
+
import { n as handleUserError, t as handleError } from "./handle-error-B3GWdtbq.js";
|
|
7
|
+
import { t as reportErrorToSentry } from "./report-error-C1g5jtl7.js";
|
|
8
|
+
import { t as printBrandedHeader } from "./print-branded-header-DJMuy9Hr.js";
|
|
9
|
+
import { n as runInstallReactDoctor } from "./install-react-doctor-BvU99j_I.js";
|
|
9
10
|
//#region src/cli/commands/install.ts
|
|
10
11
|
const installAction = async (options, command) => {
|
|
11
12
|
recordCount(METRIC.cliInvoked, 1, { command: "install" });
|
|
@@ -29,5 +30,5 @@ const installAction = async (options, command) => {
|
|
|
29
30
|
//#endregion
|
|
30
31
|
export { installAction };
|
|
31
32
|
|
|
32
|
-
//# sourceMappingURL=install-
|
|
33
|
-
//# debugId=
|
|
33
|
+
//# sourceMappingURL=install-C-_xdS80.js.map
|
|
34
|
+
//# debugId=74bc3f75-de29-5342-b5f9-a0f4d94a54d3
|
|
@@ -1,10 +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 { B as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import * as path$1 from "node:path";
|
|
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]="2bd1f17e-6f12-57d6-b08d-724b268288e3")}catch(e){}}();
|
|
3
|
+
import { B as resolveGitCommand, g as RUN_GIT_MAX_BUFFER_BYTES } from "./constants-CW_854PH.js";
|
|
4
|
+
import { Ot as highlighter, an as log, b as isNonInteractiveEnvironment, in as info$1, on as warn, rn as error$1, yn as runSync } from "./record-metric-DSQY-qOh.js";
|
|
5
|
+
import { a as chalk, i as stripAnsi, t as eastAsianWidth } from "./get-east-asian-width-DRPy7dqz.js";
|
|
7
6
|
import * as fs$1 from "node:fs";
|
|
7
|
+
import * as path$1 from "node:path";
|
|
8
|
+
import { execFileSync } from "node:child_process";
|
|
8
9
|
import process$1 from "node:process";
|
|
9
10
|
import { stripVTControlCharacters } from "node:util";
|
|
10
11
|
import tty from "node:tty";
|
|
@@ -84,6 +85,14 @@ const runGitRaw = (projectRoot, args) => {
|
|
|
84
85
|
}
|
|
85
86
|
};
|
|
86
87
|
const runGit = (projectRoot, args) => runGitRaw(projectRoot, args)?.trim() ?? null;
|
|
88
|
+
const runGitAsync = async (projectRoot, args) => {
|
|
89
|
+
const output = await resolveGitCommand({
|
|
90
|
+
directory: projectRoot,
|
|
91
|
+
args,
|
|
92
|
+
maxBufferBytes: RUN_GIT_MAX_BUFFER_BYTES
|
|
93
|
+
});
|
|
94
|
+
return output === null ? null : output.trim();
|
|
95
|
+
};
|
|
87
96
|
const resolveGitPath = (baseDirectory, value) => path$1.isAbsolute(value) ? value : path$1.resolve(baseDirectory, value);
|
|
88
97
|
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
89
98
|
const getPackageJsonPath = (projectRoot) => path$1.join(projectRoot, PACKAGE_JSON_FILE_NAME);
|
|
@@ -2803,7 +2812,7 @@ const installReactDoctorScriptStep = (projectRoot) => {
|
|
|
2803
2812
|
}
|
|
2804
2813
|
};
|
|
2805
2814
|
//#endregion
|
|
2806
|
-
export {
|
|
2815
|
+
export { runGitAsync as A, isRecord as C, readPackageJson as D, packageHasRecordKey as E, writeJsonFile as M, cliLogger as N, 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, runGitRaw 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
2816
|
|
|
2808
|
-
//# sourceMappingURL=install-doctor-script-
|
|
2809
|
-
//# debugId=
|
|
2817
|
+
//# sourceMappingURL=install-doctor-script-BFv3Iiwe.js.map
|
|
2818
|
+
//# debugId=2bd1f17e-6f12-57d6-b08d-724b268288e3
|
|
@@ -1,14 +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 {
|
|
4
|
-
import { t as unrefStdin } from "./unref-stdin-
|
|
5
|
-
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]="9f4b08bd-c1d3-5d19-ac8e-b42622ab2515")}catch(e){}}();
|
|
3
|
+
import { s as GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS } from "./constants-CW_854PH.js";
|
|
4
|
+
import { t as unrefStdin } from "./unref-stdin-D-NZBFpg.js";
|
|
5
|
+
import { N as cliLogger } from "./install-doctor-script-BFv3Iiwe.js";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
|
-
import { execFile } from "node:child_process";
|
|
8
|
-
import * as path$1 from "node:path";
|
|
9
7
|
import * as fs$1 from "node:fs";
|
|
8
|
+
import * as path$1 from "node:path";
|
|
9
|
+
import { execFile } from "node:child_process";
|
|
10
10
|
import { promisify } from "node:util";
|
|
11
|
-
import basePrompts from "prompts";
|
|
12
11
|
//#region src/cli/utils/run-command.ts
|
|
13
12
|
const execFileAsync = promisify(execFile);
|
|
14
13
|
const runCommand = async (command, args, cwd, timeoutMs) => {
|
|
@@ -132,7 +131,8 @@ const patchMultiselectSubmit = () => {
|
|
|
132
131
|
originalSubmit.call(this);
|
|
133
132
|
};
|
|
134
133
|
};
|
|
135
|
-
const prompts = (questions, options = {}) => {
|
|
134
|
+
const prompts = async (questions, options = {}) => {
|
|
135
|
+
const { default: basePrompts } = await import("prompts");
|
|
136
136
|
patchMultiselectToggleAll();
|
|
137
137
|
patchMultiselectSubmit();
|
|
138
138
|
return basePrompts(questions, { onCancel: options.onCancel ?? onCancel }).finally(unrefStdin);
|
|
@@ -267,5 +267,5 @@ const upgradeReactDoctorWorkflowInPlace = (projectRoot) => {
|
|
|
267
267
|
//#endregion
|
|
268
268
|
export { readReactDoctorWorkflow as a, workflowUsesV1Action as c, detectDefaultBranch as d, runCommand as f, isReactDoctorWorkflowInstalled as i, prompts as l, getReactDoctorWorkflowPath as n, upgradeReactDoctorWorkflowInPlace as o, installReactDoctorWorkflow as r, upgradeWorkflowActionToV2 as s, buildWorkflowContent as t, isCommandAvailable as u };
|
|
269
269
|
|
|
270
|
-
//# sourceMappingURL=install-github-workflow-
|
|
271
|
-
//# debugId=
|
|
270
|
+
//# sourceMappingURL=install-github-workflow-C-rhKOiP.js.map
|
|
271
|
+
//# debugId=9f4b08bd-c1d3-5d19-ac8e-b42622ab2515
|
|
@@ -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 {
|
|
5
|
-
import { a as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import * as path$1 from "node:path";
|
|
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]="cefaa118-2fc7-50c9-a4c8-ae18cdb62924")}catch(e){}}();
|
|
3
|
+
import { kt as GITHUB_ACTIONS_SETUP_URL, o as CI_TRUST_COMPANIES, pn as SKILL_NAME, u as METRIC } from "./constants-CW_854PH.js";
|
|
4
|
+
import { Ln as isErrnoException, Ot as highlighter, t as recordCount, y as CliInputError } from "./record-metric-DSQY-qOh.js";
|
|
5
|
+
import { C as isRecord, D as readPackageJson, E as packageHasRecordKey, M as writeJsonFile, N as cliLogger, O as resolveGitPath, S as getPackageJsonPath, T as packageHasNestedRecordKey, _ as REACT_DOCTOR_COMMAND, a as installReactDoctorScriptStep, b as VITE_PLUS_HOOKS_PATH, c as spinner, d as HUSKY_HOOKS_PATH, f as LEFTHOOK_CONFIG_FILES, g as PRE_COMMIT_CONFIG_FILE, h as OVERCOMMIT_CONFIG_FILE, k as runGit, l as HOOK_FILE_NAME, m as NON_BLOCKING_REACT_DOCTOR_COMMAND, n as findNearestPackageDirectory, p as LEGACY_HOOK_RUNNER_RELATIVE_PATH, r as hasDoctorDependency, t as DOCTOR_PACKAGE_NAME, u as HOOK_RELATIVE_PATH, w as packageHasDependency, x as ensureTrailingNewline } from "./install-doctor-script-BFv3Iiwe.js";
|
|
6
|
+
import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, d as detectDefaultBranch, l as prompts, n as getReactDoctorWorkflowPath, o as upgradeReactDoctorWorkflowInPlace, r as installReactDoctorWorkflow } from "./install-github-workflow-C-rhKOiP.js";
|
|
7
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-SdC04R_e.js";
|
|
8
|
+
import { a as recordGate, c as ACTION_UPGRADE_EVENT, d as INSTALL_AGENTS_PREFERENCE_ID, g as loadAgentInstall, h as detectAvailableAgents, i as readPreference, l as CI_PITCH_EVENT, m as computeDefaultSelectedAgents, n as openUrl, r as isGatePending, s as writePreference, t as reportWorkflowResult } from "./report-workflow-result-it0G879R.js";
|
|
10
9
|
import * as fs$1 from "node:fs";
|
|
10
|
+
import * as path$1 from "node:path";
|
|
11
|
+
import { execFile } from "node:child_process";
|
|
11
12
|
import { fileURLToPath } from "node:url";
|
|
12
13
|
import { promisify } from "node:util";
|
|
13
|
-
import { SKILL_MANIFEST_FILE, getSkillAgentConfig, installSkillsFromSource, isSkillAgentType } from "agent-install";
|
|
14
14
|
//#region src/cli/utils/action-upgrade-prompt.ts
|
|
15
15
|
const ACTION_UPGRADE_GATE = {
|
|
16
16
|
id: ACTION_UPGRADE_EVENT,
|
|
@@ -111,6 +111,7 @@ const PREFERENCE_SEPARATOR = ",";
|
|
|
111
111
|
const readInstallAgents = (options = {}) => {
|
|
112
112
|
const stored = readPreference(INSTALL_AGENTS_PREFERENCE, {}, options);
|
|
113
113
|
if (stored === null) return [];
|
|
114
|
+
const { isSkillAgentType } = loadAgentInstall();
|
|
114
115
|
return stored.split(PREFERENCE_SEPARATOR).map((entry) => entry.trim()).filter((entry) => isSkillAgentType(entry));
|
|
115
116
|
};
|
|
116
117
|
const rememberInstallAgents = (agents, options = {}) => writePreference(INSTALL_AGENTS_PREFERENCE, agents.join(PREFERENCE_SEPARATOR), {}, options);
|
|
@@ -962,6 +963,7 @@ const getSkillSourceDirectory = () => {
|
|
|
962
963
|
};
|
|
963
964
|
const canInstallNativeAgentHooks = (agents) => agents.some((agent) => agent === "claude-code" || agent === "cursor");
|
|
964
965
|
const installReactDoctorSkillStep = async (sourceDir, selectedAgents, projectRoot) => {
|
|
966
|
+
const { getSkillAgentConfig, installSkillsFromSource, SKILL_MANIFEST_FILE } = loadAgentInstall();
|
|
965
967
|
const installSpinner = spinner(`Installing ${SKILL_NAME} skill...`).start();
|
|
966
968
|
try {
|
|
967
969
|
const installResult = await installSkillsFromSource({
|
|
@@ -995,6 +997,7 @@ const installReactDoctorGitHookStep = (gitHookTarget) => {
|
|
|
995
997
|
}
|
|
996
998
|
};
|
|
997
999
|
const installReactDoctorAgentHooksStep = (projectRoot, selectedAgents) => {
|
|
1000
|
+
const { getSkillAgentConfig } = loadAgentInstall();
|
|
998
1001
|
const hookSpinner = spinner("Installing React Doctor agent hooks...").start();
|
|
999
1002
|
try {
|
|
1000
1003
|
const hookResult = installReactDoctorAgentHooks({
|
|
@@ -1033,6 +1036,7 @@ const upgradeReactDoctorWorkflowStep = (projectRoot) => {
|
|
|
1033
1036
|
return true;
|
|
1034
1037
|
};
|
|
1035
1038
|
const runInstallReactDoctor = async (options = {}) => {
|
|
1039
|
+
const { getSkillAgentConfig, SKILL_MANIFEST_FILE } = loadAgentInstall();
|
|
1036
1040
|
const requestedProjectRoot = options.projectRoot ?? process.cwd();
|
|
1037
1041
|
const projectRoot = findNearestPackageDirectory(requestedProjectRoot) ?? requestedProjectRoot;
|
|
1038
1042
|
const sourceDir = options.sourceDir ?? getSkillSourceDirectory();
|
|
@@ -1152,5 +1156,5 @@ const runInstallReactDoctor = async (options = {}) => {
|
|
|
1152
1156
|
//#endregion
|
|
1153
1157
|
export { askUpgradeActionVersion as a, recordCiPromptDecision as c, installReactDoctorAgentHooks as i, hasHandledActionUpgrade as l, runInstallReactDoctor as n, askAddToGitHubActions as o, findAgentsWithOutdatedReactDoctorHooks as r, hasHandledCiPrompt as s, getSkillSourceDirectory as t, recordActionUpgradeDecision as u };
|
|
1154
1158
|
|
|
1155
|
-
//# sourceMappingURL=install-react-doctor-
|
|
1156
|
-
//# debugId=
|
|
1159
|
+
//# sourceMappingURL=install-react-doctor-BvU99j_I.js.map
|
|
1160
|
+
//# debugId=cefaa118-2fc7-50c9-a4c8-ae18cdb62924
|
|
@@ -0,0 +1,10 @@
|
|
|
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]="bfe69790-8a97-5c41-b23e-e08179df01ee")}catch(e){}}();
|
|
3
|
+
import { a as CACHE_DISABLED_VALUES } from "./constants-CW_854PH.js";
|
|
4
|
+
//#region src/cli/utils/is-cache-globally-disabled.ts
|
|
5
|
+
const isCacheGloballyDisabled = () => CACHE_DISABLED_VALUES.has(process.env.REACT_DOCTOR_NO_CACHE?.toLowerCase() ?? "");
|
|
6
|
+
//#endregion
|
|
7
|
+
export { isCacheGloballyDisabled as t };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=is-cache-globally-disabled-CoHiYz2i.js.map
|
|
10
|
+
//# debugId=bfe69790-8a97-5c41-b23e-e08179df01ee
|
|
@@ -1,15 +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]="
|
|
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]="7c297d30-62a1-5c01-9c19-123caadd1f09")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { execFileSync } from "node:child_process";
|
|
4
|
+
import { u as METRIC } from "./constants-CW_854PH.js";
|
|
5
|
+
import { t as recordCount } from "./record-metric-DSQY-qOh.js";
|
|
6
|
+
import { n as registerActiveTuiRenderer, t as exitGracefully } from "./exit-gracefully-De_DePvj.js";
|
|
7
|
+
import { a as chalk, i as stripAnsi, n as isFullWidth$1, r as isWide$1 } from "./get-east-asian-width-DRPy7dqz.js";
|
|
9
8
|
import * as fs$1 from "node:fs";
|
|
10
9
|
import fs from "node:fs";
|
|
11
|
-
import
|
|
10
|
+
import { execFileSync } from "node:child_process";
|
|
12
11
|
import os from "node:os";
|
|
12
|
+
import { EventEmitter } from "node:events";
|
|
13
|
+
import process$1, { cwd, env } from "node:process";
|
|
13
14
|
import { PassThrough, Stream } from "node:stream";
|
|
14
15
|
import tty from "node:tty";
|
|
15
16
|
import Yoga from "yoga-layout";
|
|
@@ -20440,7 +20441,7 @@ if (process$1.env["DEV"] === "true") {
|
|
|
20440
20441
|
import.meta.resolve("react-devtools-core");
|
|
20441
20442
|
isDevtoolsInstalled = true;
|
|
20442
20443
|
} catch {}
|
|
20443
|
-
if (isDevtoolsInstalled) await import("./devtools-
|
|
20444
|
+
if (isDevtoolsInstalled) await import("./devtools-D20sefkm.js");
|
|
20444
20445
|
}
|
|
20445
20446
|
const diff = (before, after) => {
|
|
20446
20447
|
if (before === after) return;
|
|
@@ -25869,5 +25870,5 @@ var require_jsx_runtime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
25869
25870
|
//#endregion
|
|
25870
25871
|
export { useExitOnCtrlC as a, Spinner as c, useInput as d, Transform as f, Box as h, import_react as i, useStdout as l, Text as m, registerMountedTuiRenderer as n, terminalSymbols as o, render as p, useStdoutDimensions as r, isPrintableInput as s, require_jsx_runtime as t, useApp as u };
|
|
25871
25872
|
|
|
25872
|
-
//# sourceMappingURL=jsx-runtime-
|
|
25873
|
-
//# debugId=
|
|
25873
|
+
//# sourceMappingURL=jsx-runtime-CiJj554e.js.map
|
|
25874
|
+
//# debugId=7c297d30-62a1-5c01-9c19-123caadd1f09
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|