react-doctor 0.9.13-dev.fa72869 → 0.9.13-dev.fd64d26
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-DqBNBmQx.js +80 -0
- package/dist/{ci-DJX0d-zr.js → ci-C9VIuxer.js} +12 -12
- package/dist/cli.js +25 -26
- package/dist/constants-CKOk_Fa9.js +23 -0
- package/dist/{design-16noMOyv.js → design-Bi2Vyiox.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-CmnLSIyy.js → exit-gracefully-BECsBTnW.js} +7 -7
- package/dist/{get-east-asian-width-Bv2TD3Xj.js → get-east-asian-width-CM5BOEC-.js} +3 -3
- package/dist/{handle-error-BoWVnsAX.js → handle-error-Bpa6UIOi.js} +5 -5
- package/dist/index.js +2329 -1616
- package/dist/{inspect-CQjmfc6o.js → inspect-CIlLTl74.js} +25 -21
- package/dist/{install-BI45HWXE.js → install-CWRhGRwA.js} +9 -9
- package/dist/{install-doctor-script-Czibd55T.js → install-doctor-script-4bc7a9Xa.js} +5 -5
- package/dist/{install-github-workflow-DAW5HCoZ.js → install-github-workflow-CApF2UUE.js} +5 -5
- package/dist/{install-react-doctor-0EPCiZSM.js → install-react-doctor-5JVhuBwj.js} +8 -8
- package/dist/{jsx-runtime-CpHGdrl2.js → jsx-runtime-BiIKqx7W.js} +7 -7
- package/dist/oxlint-worker.d.ts +1 -0
- package/dist/oxlint-worker.js +135 -0
- package/dist/{print-branded-header-D99_D1jG.js → print-branded-header-I68eir6S.js} +4 -4
- package/dist/project-analysis-worker.js +452 -469
- package/dist/{prompt-runtime-scan-url-BXbCor1e.js → prompt-runtime-scan-url-DTURCZJx.js} +5 -5
- package/dist/{read-object-file-B74hRgMl.js → read-object-file-D_so7aRw.js} +4 -4
- package/dist/{record-metric-BcJN2xOB.js → record-metric-Cs3byi4j.js} +1823 -1059
- package/dist/{report-error-OirqwZb5.js → report-error-C6cwK5ek.js} +7 -7
- package/dist/{report-workflow-result-C4EMosul.js → report-workflow-result-C__-WR2y.js} +5 -5
- package/dist/{resolve-scope-CKnF1u7B.js → resolve-scope-Ded7Rst2.js} +6 -6
- package/dist/{rules-D-04wsFx.js → rules-zE-OOAQv.js} +6 -6
- package/dist/{run-scan-app-hjGd9Nt9.js → run-scan-app-vOe1geDj.js} +28 -22
- package/dist/{runtime-scan-5ucpiIRF.js → runtime-scan-BpV7bw6k.js} +14 -14
- package/dist/{sanitize-runtime-url-KJQEVCa5.js → sanitize-runtime-url-Bz3numjM.js} +5 -5
- package/dist/{scan-Busv3qJ_.js → scan-lvKKvrda.js} +9 -9
- package/dist/{semver-DFtnEmN-.js → semver-DlmXks31.js} +3 -3
- package/dist/{should-fail-scan-gate-D1mS86Ff.js → should-fail-scan-gate-Chyg9-UY.js} +116 -72
- package/dist/{should-skip-prompts-DkasjzpQ.js → should-skip-prompts-DHnGjhIu.js} +4 -4
- package/dist/{should-use-tui-B5bj9qhm.js → should-use-tui-DXeiBj0r.js} +4 -4
- package/dist/{telemetry-runtime-DFNjke5Y.js → telemetry-runtime-C4xTDemQ.js} +153 -5
- package/dist/unwrap-typescript-expression-CbO_6kmC.js +14 -0
- package/dist/{version-DKEaWdQZ.js → version-BEYXWT3R.js} +4 -4
- package/dist/{why-BP622crq.js → why-Bd-soKyA.js} +4 -4
- package/dist/{with-run-span-B9bjgvks.js → with-run-span-B6t6uEzq.js} +5 -5
- package/package.json +4 -4
- package/dist/build-section-divider-DPs8DOje.js +0 -216
|
@@ -1,19 +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 {
|
|
4
|
-
import { n as shutdownTelemetry,
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as reportErrorToSentry } from "./report-error-OirqwZb5.js";
|
|
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]="63f08e8e-a01c-5ac4-b7c7-d058df84ef32")}catch(e){}}();
|
|
3
|
+
import { Bn as runPromise, Bt as getChangedLineRanges, Er as STAGED_FILES_PROJECT_CONFIG_FILENAMES, F as STAGED_FILES_TEMP_DIR_PREFIX, H as isDebugFlagEnabled, Ht as getDiffInfo, I as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, It as findLegacyConfig, Jt as highlighter, K as isCiOrCodingAgentEnvironment, Kt as hasSupportedFrameworkOrLibrary, Ln as provide$1, Mn as gen, Mt as discoverSupportedSubprojects, T as METRIC, X as Git, _ as VERSION, ar as messageFromUnknown, dt as StagedFiles, f as setJsonReportDirectory, g as writeJsonReport, gt as buildJsonReport, h as writeJsonErrorReport, in as listWorkspacePackages, ir as isPlainObject, jt as detectAiTrainingEnvironment, ln as remainingDeadlineBudgetMs, lr as CANONICAL_GITHUB_URL, mn as resolveScanTarget, n as recordDistribution, nr as isErrnoException, on as mapWithConcurrency, p as setJsonReportMode, q as isCodingAgentEnvironment, qn as provide, t as recordCount, u as enableJsonMode, xn as toRelativePath, z as CliInputError, zt as getBaselineDiffPlan } from "./record-metric-Cs3byi4j.js";
|
|
4
|
+
import { n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-C4xTDemQ.js";
|
|
5
|
+
import { n as handleUserError, t as handleError } from "./handle-error-Bpa6UIOi.js";
|
|
6
|
+
import { t as reportErrorToSentry } from "./report-error-C6cwK5ek.js";
|
|
8
7
|
import { t as toForwardSlashes } from "./path-format-DnHpmJwG.js";
|
|
9
|
-
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-
|
|
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-
|
|
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-4bc7a9Xa.js";
|
|
9
|
+
import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-CApF2UUE.js";
|
|
10
|
+
import { c as openWorkflowPullRequest, i as warnDeprecatedDiff, l as stageWorkflowFile, r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-Ded7Rst2.js";
|
|
11
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-DHnGjhIu.js";
|
|
12
|
+
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-Chyg9-UY.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-C__-WR2y.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-5JVhuBwj.js";
|
|
15
|
+
import { t as readObjectFile } from "./read-object-file-D_so7aRw.js";
|
|
17
16
|
import * as path$1 from "node:path";
|
|
18
17
|
import * as fs$1 from "node:fs";
|
|
19
18
|
import { tmpdir } from "node:os";
|
|
@@ -583,10 +582,11 @@ const runProjectScanBatch = async (input) => {
|
|
|
583
582
|
const ownsBatchSpinnerSilence = isMultiProject && input.isSilent;
|
|
584
583
|
const wasSpinnerSilent = isSpinnerSilent();
|
|
585
584
|
if (ownsBatchSpinnerSilence) setSpinnerSilent(true);
|
|
585
|
+
const projectConcurrency = Math.max(4, (input.oxlintConcurrency ?? 1) * 4);
|
|
586
586
|
let finishedProjectCount = 0;
|
|
587
587
|
let scanOutcomes;
|
|
588
588
|
try {
|
|
589
|
-
scanOutcomes = await mapWithConcurrency(input.projects, isMultiProject ?
|
|
589
|
+
scanOutcomes = await mapWithConcurrency(input.projects, isMultiProject ? projectConcurrency : 1, async (project) => {
|
|
590
590
|
const scanOutcome = await input.scanProject(project);
|
|
591
591
|
finishedProjectCount += 1;
|
|
592
592
|
batchSpinner?.update(`Scanning ${projectCount} projects… (${finishedProjectCount}/${projectCount})`);
|
|
@@ -1109,14 +1109,14 @@ const buildProjectInspectOptions = ({ context, projectScan, projectScanPlan, own
|
|
|
1109
1109
|
return {
|
|
1110
1110
|
...context.scanOptions,
|
|
1111
1111
|
deadCode: context.workspaceDeadCodeOwner === null ? context.scanOptions.deadCode : ownsWorkspaceDeadCode,
|
|
1112
|
-
|
|
1112
|
+
precomputedSourceFiles: context.precomputedSourceFiles?.get(scanDirectory),
|
|
1113
1113
|
deadlineEpochMs: context.scanDeadlineEpochMs,
|
|
1114
1114
|
includePaths: projectScanPlan.includePaths,
|
|
1115
1115
|
configOverride: projectScan.config,
|
|
1116
1116
|
configSourceDirectory: projectScan.configSourceDirectory ?? void 0,
|
|
1117
1117
|
suppressRendering: context.isMultiProject,
|
|
1118
1118
|
concurrentScan: context.isMultiProject,
|
|
1119
|
-
excludedProjectDirectories: context.projectScans.
|
|
1119
|
+
excludedProjectDirectories: resolveExcludedProjectDirectories(scanDirectory, [...context.projectScans.map((candidateProjectScan) => candidateProjectScan.directory), ...context.workspaceProjectDirectories]),
|
|
1120
1120
|
retainExcludedProjectDeadCodeDiagnostics: ownsWorkspaceDeadCode,
|
|
1121
1121
|
baseline: context.baselineRef !== null && projectScanPlan.projectBaselineBaseFiles !== null && projectScanPlan.projectBaselineHeadFiles !== null ? {
|
|
1122
1122
|
ref: context.baselineRef,
|
|
@@ -1239,7 +1239,8 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect", se
|
|
|
1239
1239
|
return;
|
|
1240
1240
|
}
|
|
1241
1241
|
const scanOptions = resolveCliInspectOptions(flags, userConfig);
|
|
1242
|
-
const
|
|
1242
|
+
const oxlintConcurrency = resolveInvocationOxlintConcurrency(scanOptions.concurrency);
|
|
1243
|
+
const inspectProject = createInvocationInspect(oxlintConcurrency);
|
|
1243
1244
|
const scanDeadlineEpochMs = scanOptions.maxDurationMs !== void 0 ? Date.now() + scanOptions.maxDurationMs : void 0;
|
|
1244
1245
|
const categoryFilters = new Set(scanOptions.categoryFilters ?? []);
|
|
1245
1246
|
const skipPrompts = shouldSkipPrompts({
|
|
@@ -1261,6 +1262,7 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect", se
|
|
|
1261
1262
|
});
|
|
1262
1263
|
return;
|
|
1263
1264
|
}
|
|
1265
|
+
const workspaceProjectDirectories = discoverWorkspacePackages(resolvedDirectory).map((workspacePackage) => workspacePackage.directory);
|
|
1264
1266
|
const projectDirectories = await selectProjects(resolvedDirectory, flags.project, skipPrompts, userConfig?.projects);
|
|
1265
1267
|
const projectSelectionCompletedTime = performance.now();
|
|
1266
1268
|
const hasPositionalFileSelection = selectedFilePaths !== void 0;
|
|
@@ -1352,8 +1354,9 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect", se
|
|
|
1352
1354
|
isQuiet,
|
|
1353
1355
|
isMultiProject,
|
|
1354
1356
|
workspaceDeadCodeOwner,
|
|
1355
|
-
|
|
1357
|
+
precomputedSourceFiles: isMultiProject && !isDiffMode ? await collectProjectSourceFiles(resolvedDirectory, projectScans.map((projectScan) => projectScan.directory)) : null,
|
|
1356
1358
|
projectScans,
|
|
1359
|
+
workspaceProjectDirectories,
|
|
1357
1360
|
baselineRef,
|
|
1358
1361
|
scope,
|
|
1359
1362
|
changedLineRanges
|
|
@@ -1362,6 +1365,7 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect", se
|
|
|
1362
1365
|
projects: projectScans,
|
|
1363
1366
|
isQuiet,
|
|
1364
1367
|
isSilent: scanOptions.silent === true,
|
|
1368
|
+
oxlintConcurrency,
|
|
1365
1369
|
scanProject: (projectScan) => runConfiguredProjectScan({
|
|
1366
1370
|
context: projectScanExecutionContext,
|
|
1367
1371
|
projectScan
|
|
@@ -1450,5 +1454,5 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect", se
|
|
|
1450
1454
|
//#endregion
|
|
1451
1455
|
export { warnDeprecatedFailOn as n, runProjectMigrations as r, inspectAction as t };
|
|
1452
1456
|
|
|
1453
|
-
//# sourceMappingURL=inspect-
|
|
1454
|
-
//# debugId=
|
|
1457
|
+
//# sourceMappingURL=inspect-CIlLTl74.js.map
|
|
1458
|
+
//# debugId=63f08e8e-a01c-5ac4-b7c7-d058df84ef32
|
|
@@ -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,
|
|
4
|
-
import {
|
|
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]="d90c04d3-1341-5c15-93ba-bd4a50ecde39")}catch(e){}}();
|
|
3
|
+
import { T as METRIC, Vn as runSync, t as recordCount } from "./record-metric-Cs3byi4j.js";
|
|
4
|
+
import { o as isExpectedUserError } from "./telemetry-runtime-C4xTDemQ.js";
|
|
5
|
+
import { n as handleUserError, t as handleError } from "./handle-error-Bpa6UIOi.js";
|
|
6
|
+
import { t as reportErrorToSentry } from "./report-error-C6cwK5ek.js";
|
|
7
|
+
import { t as printBrandedHeader } from "./print-branded-header-I68eir6S.js";
|
|
8
|
+
import { n as runInstallReactDoctor } from "./install-react-doctor-5JVhuBwj.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-CWRhGRwA.js.map
|
|
33
|
+
//# debugId=d90c04d3-1341-5c15-93ba-bd4a50ecde39
|
|
@@ -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 { B as isNonInteractiveEnvironment,
|
|
4
|
-
import { a as chalk, i as stripAnsi, t as eastAsianWidth } from "./get-east-asian-width-
|
|
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]="8bcb4d51-4114-5fc5-a5a1-27aca2231fae")}catch(e){}}();
|
|
3
|
+
import { B as isNonInteractiveEnvironment, Dn as log, En as info$1, Jt as highlighter, On as warn, Tn as error$1, Vn as runSync, k as RUN_GIT_MAX_BUFFER_BYTES } from "./record-metric-Cs3byi4j.js";
|
|
4
|
+
import { a as chalk, i as stripAnsi, t as eastAsianWidth } from "./get-east-asian-width-CM5BOEC-.js";
|
|
5
5
|
import { execFileSync } from "node:child_process";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
7
7
|
import * as fs$1 from "node:fs";
|
|
@@ -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-4bc7a9Xa.js.map
|
|
2809
|
+
//# debugId=8bcb4d51-4114-5fc5-a5a1-27aca2231fae
|
|
@@ -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 { w as GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS } 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]="1e4bd0a0-7322-5173-8731-48e894b39793")}catch(e){}}();
|
|
3
|
+
import { w as GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS } from "./record-metric-Cs3byi4j.js";
|
|
4
4
|
import { t as unrefStdin } from "./unref-stdin-SK3WfwxS.js";
|
|
5
|
-
import { M as cliLogger } from "./install-doctor-script-
|
|
5
|
+
import { M as cliLogger } from "./install-doctor-script-4bc7a9Xa.js";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import { execFile } from "node:child_process";
|
|
8
8
|
import * as path$1 from "node:path";
|
|
@@ -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-CApF2UUE.js.map
|
|
271
|
+
//# debugId=1e4bd0a0-7322-5173-8731-48e894b39793
|
|
@@ -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 { C as CI_TRUST_COMPANIES,
|
|
4
|
-
import { C as isRecord, D as readPackageJson, E as packageHasRecordKey, M 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, j as writeJsonFile, 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-
|
|
5
|
-
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-
|
|
6
|
-
import { t as shouldSkipPrompts } from "./should-skip-prompts-
|
|
7
|
-
import { a as recordGate, c as ACTION_UPGRADE_EVENT, d as INSTALL_AGENTS_PREFERENCE_ID, 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-
|
|
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]="53facdce-b851-58d9-93f4-770fcaeef198")}catch(e){}}();
|
|
3
|
+
import { C as CI_TRUST_COMPANIES, Jt as highlighter, T as METRIC, Tr as SKILL_NAME, _r as GITHUB_ACTIONS_SETUP_URL, nr as isErrnoException, t as recordCount, z as CliInputError } from "./record-metric-Cs3byi4j.js";
|
|
4
|
+
import { C as isRecord, D as readPackageJson, E as packageHasRecordKey, M 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, j as writeJsonFile, 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-4bc7a9Xa.js";
|
|
5
|
+
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-CApF2UUE.js";
|
|
6
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-DHnGjhIu.js";
|
|
7
|
+
import { a as recordGate, c as ACTION_UPGRADE_EVENT, d as INSTALL_AGENTS_PREFERENCE_ID, 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-C__-WR2y.js";
|
|
8
8
|
import { execFile } from "node:child_process";
|
|
9
9
|
import * as path$1 from "node:path";
|
|
10
10
|
import * as fs$1 from "node:fs";
|
|
@@ -1152,5 +1152,5 @@ const runInstallReactDoctor = async (options = {}) => {
|
|
|
1152
1152
|
//#endregion
|
|
1153
1153
|
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
1154
|
|
|
1155
|
-
//# sourceMappingURL=install-react-doctor-
|
|
1156
|
-
//# debugId=
|
|
1155
|
+
//# sourceMappingURL=install-react-doctor-5JVhuBwj.js.map
|
|
1156
|
+
//# debugId=53facdce-b851-58d9-93f4-770fcaeef198
|
|
@@ -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]="
|
|
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]="64386208-60d0-503c-ac02-d7379798907c")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import { T as METRIC, t as recordCount } from "./record-metric-
|
|
5
|
-
import { n as registerActiveTuiRenderer, t as exitGracefully } from "./exit-gracefully-
|
|
6
|
-
import { a as chalk, i as stripAnsi, n as isFullWidth$1, r as isWide$1 } from "./get-east-asian-width-
|
|
4
|
+
import { T as METRIC, t as recordCount } from "./record-metric-Cs3byi4j.js";
|
|
5
|
+
import { n as registerActiveTuiRenderer, t as exitGracefully } from "./exit-gracefully-BECsBTnW.js";
|
|
6
|
+
import { a as chalk, i as stripAnsi, n as isFullWidth$1, r as isWide$1 } from "./get-east-asian-width-CM5BOEC-.js";
|
|
7
7
|
import { EventEmitter } from "node:events";
|
|
8
8
|
import { execFileSync } from "node:child_process";
|
|
9
9
|
import * as fs$1 from "node:fs";
|
|
@@ -20440,7 +20440,7 @@ if (process$1.env["DEV"] === "true") {
|
|
|
20440
20440
|
import.meta.resolve("react-devtools-core");
|
|
20441
20441
|
isDevtoolsInstalled = true;
|
|
20442
20442
|
} catch {}
|
|
20443
|
-
if (isDevtoolsInstalled) await import("./devtools-
|
|
20443
|
+
if (isDevtoolsInstalled) await import("./devtools-DOdrAPkZ.js");
|
|
20444
20444
|
}
|
|
20445
20445
|
const diff = (before, after) => {
|
|
20446
20446
|
if (before === after) return;
|
|
@@ -25869,5 +25869,5 @@ var require_jsx_runtime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
25869
25869
|
//#endregion
|
|
25870
25870
|
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
25871
|
|
|
25872
|
-
//# sourceMappingURL=jsx-runtime-
|
|
25873
|
-
//# debugId=
|
|
25872
|
+
//# sourceMappingURL=jsx-runtime-BiIKqx7W.js.map
|
|
25873
|
+
//# debugId=64386208-60d0-503c-ac02-d7379798907c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,135 @@
|
|
|
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]="c27c68d9-63f9-55ae-8eed-5bceb81f5b02")}catch(e){}}();
|
|
3
|
+
import { o as OXLINT_WORKER_JOB_END_MARKER, s as REACT_DOCTOR_PLUGIN_RESET_HOOK_KEY } from "./constants-CKOk_Fa9.js";
|
|
4
|
+
import * as path$1 from "node:path";
|
|
5
|
+
import * as fs$1 from "node:fs";
|
|
6
|
+
import { pathToFileURL } from "node:url";
|
|
7
|
+
import * as os$1 from "node:os";
|
|
8
|
+
//#region ../core/src/utils/create-filesystem-cache-epoch-gate.ts
|
|
9
|
+
const createFilesystemCacheEpochGate = () => {
|
|
10
|
+
let lastFilesystemCacheEpoch = null;
|
|
11
|
+
return { shouldReset: (filesystemCacheEpoch) => {
|
|
12
|
+
if (filesystemCacheEpoch !== null && filesystemCacheEpoch === lastFilesystemCacheEpoch) return false;
|
|
13
|
+
lastFilesystemCacheEpoch = filesystemCacheEpoch;
|
|
14
|
+
return true;
|
|
15
|
+
} };
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region ../core/src/start-oxlint-worker.ts
|
|
19
|
+
const LINT_IMPORT_PATTERN = /import\s*\{\s*(\w+)\s+as\s+lint\s*\}\s*from\s*"\.\/bindings\.js"/;
|
|
20
|
+
const isForwardedFunction = (value) => typeof value === "function";
|
|
21
|
+
const readFunctionExport = (moduleNamespace, exportName) => {
|
|
22
|
+
if (typeof moduleNamespace !== "object" || moduleNamespace === null || !(exportName in moduleNamespace)) throw new Error(`oxlint internals do not export "${exportName}"`);
|
|
23
|
+
const exported = Reflect.get(moduleNamespace, exportName);
|
|
24
|
+
if (!isForwardedFunction(exported)) throw new Error(`oxlint internal export "${exportName}" is not a function`);
|
|
25
|
+
return exported;
|
|
26
|
+
};
|
|
27
|
+
const readWorkspacesExport = (moduleNamespace) => {
|
|
28
|
+
if (typeof moduleNamespace !== "object" || moduleNamespace === null || !("workspaces" in moduleNamespace)) return null;
|
|
29
|
+
const exported = Reflect.get(moduleNamespace, "workspaces");
|
|
30
|
+
return exported instanceof Map ? exported : null;
|
|
31
|
+
};
|
|
32
|
+
const importOxlintInternals = async (oxlintPackageDirectory) => {
|
|
33
|
+
const distDirectory = path$1.join(oxlintPackageDirectory, "dist");
|
|
34
|
+
const cliSource = fs$1.readFileSync(path$1.join(distDirectory, "cli.js"), "utf8");
|
|
35
|
+
const lintExportName = LINT_IMPORT_PATTERN.exec(cliSource)?.[1];
|
|
36
|
+
if (lintExportName === void 0) throw new Error("could not locate oxlint's `lint` binding export");
|
|
37
|
+
const importDist = (fileName) => import(pathToFileURL(path$1.join(distDirectory, fileName)).href);
|
|
38
|
+
const [bindings, plugins, workspace] = await Promise.all([
|
|
39
|
+
importDist("bindings.js"),
|
|
40
|
+
importDist("plugins.js"),
|
|
41
|
+
importDist("workspace.js")
|
|
42
|
+
]);
|
|
43
|
+
const loadJsConfigs = (...forwarded) => importDist("js_config.js").then((jsConfig) => readFunctionExport(jsConfig, process.env.VP_VERSION ? "loadVitePlusConfigs" : "loadJsConfigs")(...forwarded));
|
|
44
|
+
return {
|
|
45
|
+
lint: readFunctionExport(bindings, lintExportName),
|
|
46
|
+
loadPlugin: readFunctionExport(plugins, "loadPlugin"),
|
|
47
|
+
setupRuleConfigs: readFunctionExport(plugins, "setupRuleConfigs"),
|
|
48
|
+
lintFile: readFunctionExport(plugins, "lintFile"),
|
|
49
|
+
createWorkspace: readFunctionExport(workspace, "createWorkspace"),
|
|
50
|
+
destroyWorkspace: readFunctionExport(workspace, "destroyWorkspace"),
|
|
51
|
+
loadJsConfigs,
|
|
52
|
+
workspaces: readWorkspacesExport(workspace)
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
const setStdioBlocking = (stream) => {
|
|
56
|
+
if (!("_handle" in stream)) return;
|
|
57
|
+
const handle = stream._handle;
|
|
58
|
+
if (typeof handle !== "object" || handle === null || !("setBlocking" in handle)) return;
|
|
59
|
+
const setBlocking = handle.setBlocking;
|
|
60
|
+
if (typeof setBlocking === "function") setBlocking.call(handle, true);
|
|
61
|
+
};
|
|
62
|
+
const writeLine = (fileDescriptor, line) => {
|
|
63
|
+
fs$1.writeSync(fileDescriptor, `\n${line}\n`);
|
|
64
|
+
};
|
|
65
|
+
const isJobMessage = (message) => typeof message === "object" && message !== null && "type" in message && message.type === "job" && "id" in message && typeof message.id === "number" && "cwd" in message && typeof message.cwd === "string" && "argumentsList" in message && Array.isArray(message.argumentsList) && "filesystemCacheEpoch" in message && (message.filesystemCacheEpoch === null || typeof message.filesystemCacheEpoch === "number");
|
|
66
|
+
const sendToParent = (message) => {
|
|
67
|
+
process.send?.(message);
|
|
68
|
+
};
|
|
69
|
+
const resetPluginFilesystemCaches = () => {
|
|
70
|
+
const resetHook = Reflect.get(globalThis, REACT_DOCTOR_PLUGIN_RESET_HOOK_KEY);
|
|
71
|
+
if (typeof resetHook === "function") resetHook();
|
|
72
|
+
};
|
|
73
|
+
const filesystemCacheEpochGate = createFilesystemCacheEpochGate();
|
|
74
|
+
const idleWorkingDirectory = process.cwd();
|
|
75
|
+
const leaveJobWorkingDirectory = () => {
|
|
76
|
+
try {
|
|
77
|
+
process.chdir(idleWorkingDirectory);
|
|
78
|
+
} catch {
|
|
79
|
+
process.chdir(os$1.tmpdir());
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
const runJob = async (internals, job) => {
|
|
83
|
+
const workspaceUri = `file:///react-doctor-oxlint-job-${job.id}`;
|
|
84
|
+
let status = "error";
|
|
85
|
+
let errorMessage = null;
|
|
86
|
+
try {
|
|
87
|
+
process.chdir(job.cwd);
|
|
88
|
+
if (filesystemCacheEpochGate.shouldReset(job.filesystemCacheEpoch)) resetPluginFilesystemCaches();
|
|
89
|
+
internals.createWorkspace(workspaceUri);
|
|
90
|
+
status = await internals.lint(job.argumentsList, (...forwarded) => internals.loadPlugin(...[...forwarded.slice(0, 3), workspaceUri]), (...forwarded) => internals.setupRuleConfigs(...forwarded), (...forwarded) => internals.lintFile(...[...forwarded.slice(0, 7), workspaceUri]), (...forwarded) => Promise.resolve(internals.createWorkspace(...forwarded)), (...forwarded) => internals.destroyWorkspace(...forwarded), (...forwarded) => internals.loadJsConfigs(...forwarded)) === false ? "findings" : "ok";
|
|
91
|
+
} catch (error) {
|
|
92
|
+
errorMessage = error instanceof Error ? error.stack ?? error.message : String(error);
|
|
93
|
+
} finally {
|
|
94
|
+
internals.destroyWorkspace(workspaceUri);
|
|
95
|
+
internals.workspaces?.delete(workspaceUri);
|
|
96
|
+
leaveJobWorkingDirectory();
|
|
97
|
+
}
|
|
98
|
+
if (errorMessage !== null) fs$1.writeSync(2, `${errorMessage}\n`);
|
|
99
|
+
writeLine(1, `${OXLINT_WORKER_JOB_END_MARKER}:${job.id}:${status}`);
|
|
100
|
+
writeLine(2, `${OXLINT_WORKER_JOB_END_MARKER}:${job.id}:end`);
|
|
101
|
+
};
|
|
102
|
+
const startOxlintWorker = () => {
|
|
103
|
+
const oxlintPackageDirectory = process.argv[2];
|
|
104
|
+
process.on("disconnect", () => process.exit(0));
|
|
105
|
+
if (oxlintPackageDirectory === void 0) {
|
|
106
|
+
sendToParent({
|
|
107
|
+
type: "unavailable",
|
|
108
|
+
message: "missing oxlint package directory argument"
|
|
109
|
+
});
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
setStdioBlocking(process.stdout);
|
|
113
|
+
setStdioBlocking(process.stderr);
|
|
114
|
+
importOxlintInternals(oxlintPackageDirectory).then((internals) => {
|
|
115
|
+
let queue = Promise.resolve();
|
|
116
|
+
process.on("message", (message) => {
|
|
117
|
+
if (!isJobMessage(message)) return;
|
|
118
|
+
queue = queue.then(() => runJob(internals, message));
|
|
119
|
+
});
|
|
120
|
+
sendToParent({ type: "ready" });
|
|
121
|
+
}, (error) => {
|
|
122
|
+
sendToParent({
|
|
123
|
+
type: "unavailable",
|
|
124
|
+
message: error instanceof Error ? error.message : String(error)
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/oxlint-worker.ts
|
|
130
|
+
startOxlintWorker();
|
|
131
|
+
//#endregion
|
|
132
|
+
export {};
|
|
133
|
+
|
|
134
|
+
//# sourceMappingURL=oxlint-worker.js.map
|
|
135
|
+
//# debugId=c27c68d9-63f9-55ae-8eed-5bceb81f5b02
|
|
@@ -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 {
|
|
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]="9ca4d139-a932-5af1-b95d-cc9f40b95014")}catch(e){}}();
|
|
3
|
+
import { Dn as log, Jt as highlighter, Mn as gen, _ as VERSION } from "./record-metric-Cs3byi4j.js";
|
|
4
4
|
//#region src/cli/utils/print-branded-header.ts
|
|
5
5
|
/**
|
|
6
6
|
* Single branded line every command prints first when not in JSON
|
|
@@ -18,5 +18,5 @@ const printBrandedHeader = gen(function* () {
|
|
|
18
18
|
//#endregion
|
|
19
19
|
export { printBrandedHeader as t };
|
|
20
20
|
|
|
21
|
-
//# sourceMappingURL=print-branded-header-
|
|
22
|
-
//# debugId=
|
|
21
|
+
//# sourceMappingURL=print-branded-header-I68eir6S.js.map
|
|
22
|
+
//# debugId=9ca4d139-a932-5af1-b95d-cc9f40b95014
|