react-doctor 0.9.13-dev.1239043 → 0.9.13-dev.45c0df3
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-DUxdYc-w.js +80 -0
- package/dist/{ci-CUgNjCr-.js → ci-BwvrFxxP.js} +12 -12
- package/dist/cli.js +25 -26
- package/dist/constants-CKOk_Fa9.js +23 -0
- package/dist/{design-CX2j8ubS.js → design-kKNMVr1y.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-cGJM2g3O.js → exit-gracefully-rrcHzkUN.js} +7 -7
- package/dist/{get-east-asian-width-Bv2TD3Xj.js → get-east-asian-width-CM5BOEC-.js} +3 -3
- package/dist/{handle-error-BCI-Nv3P.js → handle-error-CkUL31OJ.js} +5 -5
- package/dist/index.js +2289 -1604
- package/dist/{inspect-Dq5krKWG.js → inspect-DA6s8FhA.js} +22 -20
- package/dist/{install-C0aiZKgf.js → install-6tMGZzFd.js} +9 -9
- package/dist/{install-doctor-script-CaTIms0r.js → install-doctor-script-CjJaGxqK.js} +5 -5
- package/dist/{install-github-workflow-DjPgXVqg.js → install-github-workflow-0aMzq1Ju.js} +5 -5
- package/dist/{install-react-doctor-C-PVDWXv.js → install-react-doctor-Dvq7uaam.js} +8 -8
- package/dist/{jsx-runtime-D_A4d39v.js → jsx-runtime-DmLigwoS.js} +7 -7
- package/dist/oxlint-worker.d.ts +1 -0
- package/dist/oxlint-worker.js +135 -0
- package/dist/{print-branded-header-Dz0SwyHQ.js → print-branded-header-2XLtwL_O.js} +4 -4
- package/dist/project-analysis-worker.js +452 -469
- package/dist/{prompt-runtime-scan-url-BXdY2Opw.js → prompt-runtime-scan-url-BqFheEqh.js} +5 -5
- package/dist/{read-object-file-CmMGK1uu.js → read-object-file-BC9KgyfB.js} +4 -4
- package/dist/{record-metric-B6T_Ej33.js → record-metric-DadXt-YJ.js} +1782 -1047
- package/dist/{report-error-DwL3b99q.js → report-error-RqZ4TcFp.js} +7 -7
- package/dist/{report-workflow-result-5PueDIAr.js → report-workflow-result-C-6ou3Yf.js} +5 -5
- package/dist/{resolve-scope-CTlLl7e6.js → resolve-scope-IralKJo7.js} +6 -6
- package/dist/{rules-DEbHKRag.js → rules-PiRhyXht.js} +6 -6
- package/dist/{run-scan-app-D3huvmXJ.js → run-scan-app-Bx3RR66H.js} +12 -12
- package/dist/{runtime-scan-CHFAEYg3.js → runtime-scan-CzLZG2SG.js} +11 -11
- package/dist/{sanitize-runtime-url-Bbq40iIp.js → sanitize-runtime-url-ChOwIs6Q.js} +4 -4
- package/dist/{scan-C7sCm7wi.js → scan-BsKjedB4.js} +9 -9
- package/dist/{semver-DFtnEmN-.js → semver-DlmXks31.js} +3 -3
- package/dist/{should-fail-scan-gate-CfG_ppAV.js → should-fail-scan-gate-DKuuz_Be.js} +86 -67
- package/dist/{should-skip-prompts-BuNtAVEs.js → should-skip-prompts-D49q53Ep.js} +4 -4
- package/dist/{should-use-tui-B-lCjXVG.js → should-use-tui-BSXNboYB.js} +4 -4
- package/dist/{telemetry-runtime-BF83aBFL.js → telemetry-runtime-DprfIwPW.js} +153 -5
- package/dist/unwrap-typescript-expression-CbO_6kmC.js +14 -0
- package/dist/{version-C27gr4Qj.js → version-DihZTmZU.js} +4 -4
- package/dist/{why-CYRkZ2VY.js → why-B8uIFoLE.js} +4 -4
- package/dist/{with-run-span-CdsXSJgE.js → with-run-span-JTZIIQT_.js} +5 -5
- package/package.json +4 -4
- package/dist/build-section-divider-C09RcJrc.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-DwL3b99q.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]="50a349a9-fe36-5b25-a520-9b66a7170158")}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-DadXt-YJ.js";
|
|
4
|
+
import { n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-DprfIwPW.js";
|
|
5
|
+
import { n as handleUserError, t as handleError } from "./handle-error-CkUL31OJ.js";
|
|
6
|
+
import { t as reportErrorToSentry } from "./report-error-RqZ4TcFp.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 createInvocationInspect, C as detectLaunchableAgents, D as buildHandoffPayload, E as launchCliAgent, M as resolveMergeBaseRef, N as printHeadlessReport, O 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-CjJaGxqK.js";
|
|
9
|
+
import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-0aMzq1Ju.js";
|
|
10
|
+
import { c as openWorkflowPullRequest, i as warnDeprecatedDiff, l as stageWorkflowFile, r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-IralKJo7.js";
|
|
11
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-D49q53Ep.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-DKuuz_Be.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-6ou3Yf.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-Dvq7uaam.js";
|
|
15
|
+
import { t as readObjectFile } from "./read-object-file-BC9KgyfB.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,7 +1109,7 @@ 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,
|
|
@@ -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({
|
|
@@ -1353,7 +1354,7 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect", se
|
|
|
1353
1354
|
isQuiet,
|
|
1354
1355
|
isMultiProject,
|
|
1355
1356
|
workspaceDeadCodeOwner,
|
|
1356
|
-
|
|
1357
|
+
precomputedSourceFiles: isMultiProject && !isDiffMode ? await collectProjectSourceFiles(resolvedDirectory, projectScans.map((projectScan) => projectScan.directory)) : null,
|
|
1357
1358
|
projectScans,
|
|
1358
1359
|
workspaceProjectDirectories,
|
|
1359
1360
|
baselineRef,
|
|
@@ -1364,6 +1365,7 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect", se
|
|
|
1364
1365
|
projects: projectScans,
|
|
1365
1366
|
isQuiet,
|
|
1366
1367
|
isSilent: scanOptions.silent === true,
|
|
1368
|
+
oxlintConcurrency,
|
|
1367
1369
|
scanProject: (projectScan) => runConfiguredProjectScan({
|
|
1368
1370
|
context: projectScanExecutionContext,
|
|
1369
1371
|
projectScan
|
|
@@ -1452,5 +1454,5 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect", se
|
|
|
1452
1454
|
//#endregion
|
|
1453
1455
|
export { warnDeprecatedFailOn as n, runProjectMigrations as r, inspectAction as t };
|
|
1454
1456
|
|
|
1455
|
-
//# sourceMappingURL=inspect-
|
|
1456
|
-
//# debugId=
|
|
1457
|
+
//# sourceMappingURL=inspect-DA6s8FhA.js.map
|
|
1458
|
+
//# debugId=50a349a9-fe36-5b25-a520-9b66a7170158
|
|
@@ -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]="87517d14-75ff-52cb-a857-49ea60082526")}catch(e){}}();
|
|
3
|
+
import { T as METRIC, Vn as runSync, t as recordCount } from "./record-metric-DadXt-YJ.js";
|
|
4
|
+
import { o as isExpectedUserError } from "./telemetry-runtime-DprfIwPW.js";
|
|
5
|
+
import { n as handleUserError, t as handleError } from "./handle-error-CkUL31OJ.js";
|
|
6
|
+
import { t as reportErrorToSentry } from "./report-error-RqZ4TcFp.js";
|
|
7
|
+
import { t as printBrandedHeader } from "./print-branded-header-2XLtwL_O.js";
|
|
8
|
+
import { n as runInstallReactDoctor } from "./install-react-doctor-Dvq7uaam.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-6tMGZzFd.js.map
|
|
33
|
+
//# debugId=87517d14-75ff-52cb-a857-49ea60082526
|
|
@@ -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]="2034eb5c-fd9c-5159-8926-dcb2a7451086")}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-DadXt-YJ.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-CjJaGxqK.js.map
|
|
2809
|
+
//# debugId=2034eb5c-fd9c-5159-8926-dcb2a7451086
|
|
@@ -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]="1751648c-03ad-5ed4-87bc-ecb69acbd8b6")}catch(e){}}();
|
|
3
|
+
import { w as GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS } from "./record-metric-DadXt-YJ.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-CjJaGxqK.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-0aMzq1Ju.js.map
|
|
271
|
+
//# debugId=1751648c-03ad-5ed4-87bc-ecb69acbd8b6
|
|
@@ -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]="1ed8a5f4-3e7b-5320-abf9-bce0acc49ddf")}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-DadXt-YJ.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-CjJaGxqK.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-0aMzq1Ju.js";
|
|
6
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-D49q53Ep.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-6ou3Yf.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-Dvq7uaam.js.map
|
|
1156
|
+
//# debugId=1ed8a5f4-3e7b-5320-abf9-bce0acc49ddf
|
|
@@ -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]="093f74eb-add3-50d3-9fa8-4b04df554fda")}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-DadXt-YJ.js";
|
|
5
|
+
import { n as registerActiveTuiRenderer, t as exitGracefully } from "./exit-gracefully-rrcHzkUN.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-DmLigwoS.js.map
|
|
25873
|
+
//# debugId=093f74eb-add3-50d3-9fa8-4b04df554fda
|
|
@@ -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]="fb2088d5-9d83-5b69-b114-449a557e5f05")}catch(e){}}();
|
|
3
|
+
import { Dn as log, Jt as highlighter, Mn as gen, _ as VERSION } from "./record-metric-DadXt-YJ.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-2XLtwL_O.js.map
|
|
22
|
+
//# debugId=fb2088d5-9d83-5b69-b114-449a557e5f05
|