react-doctor 0.9.12-dev.bd08406 → 0.9.12-dev.ca30808
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/README.md +6 -0
- package/dist/{build-section-divider-DjX3mmIx.js → build-section-divider-DGcPvzjX.js} +7 -7
- package/dist/{ci-D0OU7_5i.js → ci-DZ9QnUV4.js} +12 -12
- package/dist/cli.js +67 -38
- package/dist/{design-D-9YrV4y.js → design-BlxQroSp.js} +4 -4
- package/dist/{devtools-BiC-AP3B.js → devtools-CC2PAZ85.js} +3 -3
- package/dist/{exit-gracefully-DuS_nzeq.js → exit-gracefully-Dt1ix6Xh.js} +6 -6
- package/dist/{get-east-asian-width-Cglw13G7.js → get-east-asian-width-Bv2TD3Xj.js} +3 -3
- package/dist/{handle-error-BzC_gVSx.js → handle-error-Cslt8b7C.js} +17 -12
- package/dist/index.js +459 -285
- package/dist/{inspect-NIjyNi5S.js → inspect-Dd1qqPJf.js} +38 -29
- package/dist/{install-BcGDtIYv.js → install-DeWeUjqr.js} +9 -9
- package/dist/{install-doctor-script-W-u3DPjZ.js → install-doctor-script-DbKR-GHo.js} +7 -14
- package/dist/{install-github-workflow-DqodeftR.js → install-github-workflow-Bkv_CMdF.js} +10 -6
- package/dist/{install-react-doctor-C3r0K9JP.js → install-react-doctor-DkfLDtWd.js} +8 -8
- package/dist/{jsx-runtime-BXnpEdz3.js → jsx-runtime-DwPH8QhA.js} +7 -7
- package/dist/path-format-DnHpmJwG.js +9 -0
- package/dist/{print-branded-header-eiCaprox.js → print-branded-header-CFNvp2ey.js} +4 -4
- package/dist/project-analysis-worker.js +53 -52
- package/dist/{prompt-runtime-scan-url-CAZLxZl0.js → prompt-runtime-scan-url-BuXp7_n4.js} +6 -6
- package/dist/{read-object-file-D4DobruV.js → read-object-file-CEbx-anl.js} +4 -4
- package/dist/{record-metric-CECbS8Qh.js → record-metric-BzGcVSov.js} +405 -230
- package/dist/{report-error-Ckftf8UM.js → report-error-ZMTPN93d.js} +5 -5
- package/dist/{report-workflow-result-MtfAsorD.js → report-workflow-result-CKUjTJpB.js} +5 -5
- package/dist/{resolve-scope-IDn0nWJF.js → resolve-scope-BgrQEVtj.js} +8 -10
- package/dist/{rules-6hA6QP9L.js → rules-DizN5gJ6.js} +6 -6
- package/dist/{run-scan-app-DNHg67cm.js → run-scan-app-CjSGMmOE.js} +17 -14
- package/dist/{runtime-scan-Dqqn1kW3.js → runtime-scan-DINB89wl.js} +9 -9
- package/dist/{sanitize-runtime-url-DhYx4VYy.js → sanitize-runtime-url-CFvLC0Vp.js} +4 -4
- package/dist/{scan-DtjqkKaM.js → scan-CEvjogRY.js} +17 -11
- package/dist/{should-fail-scan-gate-CXE70SlM.js → should-fail-scan-gate-gpuv_UOL.js} +19 -12
- package/dist/{should-skip-prompts-DwpFmYZZ.js → should-skip-prompts-F0NaNR8z.js} +4 -4
- package/dist/{should-use-tui-Cze9CmaN.js → should-use-tui-Dve0A4YR.js} +4 -4
- package/dist/{telemetry-runtime-DVy10F6G.js → telemetry-runtime-Bs7DsGaF.js} +55 -7
- package/dist/{unref-stdin-BKT_s38a.js → unref-stdin-SK3WfwxS.js} +3 -3
- package/dist/{version-Cr0PARuU.js → version-DVa-lN1C.js} +4 -4
- package/dist/{why-DnrSKh_M.js → why-BqR3fLtE.js} +4 -4
- package/dist/{with-run-span-BsK0r1ay.js → with-run-span-NbAvibgv.js} +5 -5
- package/package.json +3 -2
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { An as gen, At as discoverSupportedSubprojects, Bt as getDiffInfo, Cr as messageFromUnknown, F as STAGED_FILES_TEMP_DIR_PREFIX, Fn as provide$1, Gn as provide, H as isDebugFlagEnabled, I as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, Jt as isPathInsideDirectory, K as isCiOrCodingAgentEnvironment, Kt as highlighter, Lt as getBaselineDiffPlan, Pt as findLegacyConfig, Rn as runPromise, Rt as getChangedLineRanges, Sr as isPlainObject, T as METRIC, Wt as hasSupportedFrameworkOrLibrary, X as Git, _ as VERSION, _r as STAGED_FILES_PROJECT_CONFIG_FILENAMES, br as isErrnoException, er as CANONICAL_GITHUB_URL, f as setJsonReportDirectory, fn as resolveScanTarget, g as writeJsonReport, h as writeJsonErrorReport, ht as buildJsonReport, in as mapWithConcurrency, kt as detectAiTrainingEnvironment, n as recordDistribution, nn as listWorkspacePackages, p as setJsonReportMode, q as isCodingAgentEnvironment, sn as remainingDeadlineBudgetMs, t as recordCount, u as enableJsonMode, ut as StagedFiles, yn as toRelativePath, z as CliInputError } from "./record-metric-
|
|
4
|
-
import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-
|
|
5
|
-
import { r as flushSentry } from "./build-section-divider-
|
|
6
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
7
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { t as
|
|
12
|
-
import {
|
|
13
|
-
import { a as
|
|
14
|
-
import { a as
|
|
15
|
-
import { t as
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1230ca3b-79a6-58db-b084-8e2df3fc56c9")}catch(e){}}();
|
|
3
|
+
import { An as gen, At as discoverSupportedSubprojects, Bt as getDiffInfo, Cr as messageFromUnknown, F as STAGED_FILES_TEMP_DIR_PREFIX, Fn as provide$1, Gn as provide, H as isDebugFlagEnabled, I as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, Jt as isPathInsideDirectory, K as isCiOrCodingAgentEnvironment, Kt as highlighter, Lt as getBaselineDiffPlan, Pt as findLegacyConfig, Rn as runPromise, Rt as getChangedLineRanges, Sr as isPlainObject, T as METRIC, Wt as hasSupportedFrameworkOrLibrary, X as Git, _ as VERSION, _r as STAGED_FILES_PROJECT_CONFIG_FILENAMES, br as isErrnoException, er as CANONICAL_GITHUB_URL, f as setJsonReportDirectory, fn as resolveScanTarget, g as writeJsonReport, h as writeJsonErrorReport, ht as buildJsonReport, in as mapWithConcurrency, kt as detectAiTrainingEnvironment, n as recordDistribution, nn as listWorkspacePackages, p as setJsonReportMode, q as isCodingAgentEnvironment, sn as remainingDeadlineBudgetMs, t as recordCount, u as enableJsonMode, ut as StagedFiles, yn as toRelativePath, z as CliInputError } from "./record-metric-BzGcVSov.js";
|
|
4
|
+
import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-Bs7DsGaF.js";
|
|
5
|
+
import { r as flushSentry } from "./build-section-divider-DGcPvzjX.js";
|
|
6
|
+
import { n as handleUserError, t as handleError } from "./handle-error-Cslt8b7C.js";
|
|
7
|
+
import { t as reportErrorToSentry } from "./report-error-ZMTPN93d.js";
|
|
8
|
+
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-DbKR-GHo.js";
|
|
10
|
+
import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-Bkv_CMdF.js";
|
|
11
|
+
import { c as openWorkflowPullRequest, i as warnDeprecatedDiff, l as stageWorkflowFile, r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-BgrQEVtj.js";
|
|
12
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-F0NaNR8z.js";
|
|
13
|
+
import { A as inspect, B as filterDiagnosticsByCategories, C as CLI_AGENT_BINARIES, D as collectProjectSourceFileCounts, E as buildHandoffPayload, H as buildEmptyReportMessage, L as printDiagnosticsDump, M as printHeadlessReport, O as deduplicateProjectScans, S as detectLaunchableAgents, T as launchCliAgent, _ as resolveWorkspaceDeadCodeOwner, a as validateModeFlags, b as countUniqueScannedFiles, d as resolveProjectScan, f as resolveProjectChangedLineRanges, g as retryMissingProjectScores, h as resolveProjectRelativeDirectory, i as validateIncludeUntrackedScope, j as resolveMergeBaseRef, k as createInvocationInspect, l as selectProjects, m as resolveProjectSourceFilePaths, n as formatSkippedProjectsMessage, o as projectManifestChanged, p as resolveProjectDiffIncludePaths, s as partitionProjectScanOutcomes, t as shouldFailScanGate, u as buildCodeFrame, v as resolveCliInspectOptions, w as copyToClipboard, x as setUpGitHubActions, y as filterScansForSurface } from "./should-fail-scan-gate-gpuv_UOL.js";
|
|
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-CKUjTJpB.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-DkfLDtWd.js";
|
|
16
|
+
import { t as readObjectFile } from "./read-object-file-CEbx-anl.js";
|
|
16
17
|
import * as path$1 from "node:path";
|
|
17
18
|
import * as fs$1 from "node:fs";
|
|
18
19
|
import { tmpdir } from "node:os";
|
|
@@ -1094,11 +1095,11 @@ const runStagedInspect = async (input) => {
|
|
|
1094
1095
|
};
|
|
1095
1096
|
//#endregion
|
|
1096
1097
|
//#region src/cli/commands/inspect.ts
|
|
1097
|
-
const
|
|
1098
|
+
const buildFileSelectionDiffInfo = (filePaths) => ({
|
|
1098
1099
|
currentBranch: process.env.GITHUB_HEAD_REF?.trim() || null,
|
|
1099
1100
|
baseBranch: process.env.GITHUB_BASE_REF?.trim() || "pull request target",
|
|
1100
1101
|
baseSha: process.env.REACT_DOCTOR_BASE_SHA?.trim() || void 0,
|
|
1101
|
-
changedFiles,
|
|
1102
|
+
changedFiles: [...filePaths],
|
|
1102
1103
|
isCurrentChanges: false
|
|
1103
1104
|
});
|
|
1104
1105
|
const hasScanDeadlineExpired = (scanDeadlineEpochMs) => scanDeadlineEpochMs !== void 0 && remainingDeadlineBudgetMs(scanDeadlineEpochMs) === 0;
|
|
@@ -1185,7 +1186,7 @@ const maybeMigrateLegacyConfig = async (requestedDirectory, { isQuiet, isStaged
|
|
|
1185
1186
|
if (!(!isQuiet && !isStaged && process.stdout.isTTY === true && !isCiOrCodingAgentEnvironment())) return;
|
|
1186
1187
|
await runProjectMigrations(requestedDirectory);
|
|
1187
1188
|
};
|
|
1188
|
-
const inspectAction = async (directory, flags, invocationCommand = "inspect") => {
|
|
1189
|
+
const inspectAction = async (directory, flags, invocationCommand = "inspect", selectedFilePaths) => {
|
|
1189
1190
|
const isScoreOnly = Boolean(flags.score);
|
|
1190
1191
|
const isJsonMode = Boolean(flags.json);
|
|
1191
1192
|
const isQuiet = isScoreOnly || isJsonMode;
|
|
@@ -1262,14 +1263,15 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
|
|
|
1262
1263
|
}
|
|
1263
1264
|
const projectDirectories = await selectProjects(resolvedDirectory, flags.project, skipPrompts, userConfig?.projects);
|
|
1264
1265
|
const projectSelectionCompletedTime = performance.now();
|
|
1265
|
-
|
|
1266
|
-
|
|
1266
|
+
const hasPositionalFileSelection = selectedFilePaths !== void 0;
|
|
1267
|
+
let providedFilesDiffInfo = hasPositionalFileSelection ? buildFileSelectionDiffInfo(selectedFilePaths) : flags.changedFilesFrom ? buildFileSelectionDiffInfo(readChangedFilesFrom(path$1.resolve(flags.changedFilesFrom))) : null;
|
|
1268
|
+
if (providedFilesDiffInfo !== null && requestedDirectory !== resolvedDirectory) {
|
|
1267
1269
|
const relativeProjectDirectory = resolveProjectRelativeDirectory(requestedDirectory, resolvedDirectory);
|
|
1268
1270
|
if (relativeProjectDirectory) {
|
|
1269
1271
|
const projectPrefix = `${relativeProjectDirectory}/`;
|
|
1270
|
-
|
|
1271
|
-
...
|
|
1272
|
-
changedFiles:
|
|
1272
|
+
providedFilesDiffInfo = {
|
|
1273
|
+
...providedFilesDiffInfo,
|
|
1274
|
+
changedFiles: providedFilesDiffInfo.changedFiles.flatMap((filePath) => {
|
|
1273
1275
|
return filePath.startsWith(projectPrefix) ? [filePath.slice(projectPrefix.length)] : [];
|
|
1274
1276
|
})
|
|
1275
1277
|
};
|
|
@@ -1277,7 +1279,11 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
|
|
|
1277
1279
|
}
|
|
1278
1280
|
const requestedScope = resolveScope(flags, userConfig);
|
|
1279
1281
|
const includeUntracked = flags.includeUntracked ?? false;
|
|
1280
|
-
const scopeRequest =
|
|
1282
|
+
const scopeRequest = hasPositionalFileSelection ? {
|
|
1283
|
+
scope: "files",
|
|
1284
|
+
base: void 0,
|
|
1285
|
+
usedDeprecatedDiff: false
|
|
1286
|
+
} : requestedScope.scope === void 0 && providedFilesDiffInfo !== null ? {
|
|
1281
1287
|
...requestedScope,
|
|
1282
1288
|
scope: "changed"
|
|
1283
1289
|
} : requestedScope;
|
|
@@ -1285,8 +1291,8 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
|
|
|
1285
1291
|
scanStartupSpinner = !isQuiet ? spinner("Scanning...").start() : null;
|
|
1286
1292
|
if (scanStartupSpinner !== null) recordDistribution(METRIC.scanFeedbackDelay, performance.now() - projectSelectionCompletedTime, { unit: "millisecond" });
|
|
1287
1293
|
const wantsDiffMode = scopeRequest.scope !== void 0 && scopeRequest.scope !== "full";
|
|
1288
|
-
const shouldDetectDiff =
|
|
1289
|
-
const diffInfo =
|
|
1294
|
+
const shouldDetectDiff = providedFilesDiffInfo === null && (wantsDiffMode || scopeRequest.scope === void 0 && !skipPrompts && !isQuiet);
|
|
1295
|
+
const diffInfo = providedFilesDiffInfo ?? (shouldDetectDiff ? await getDiffInfo(resolvedDirectory, scopeRequest.base, includeUntracked) : null);
|
|
1290
1296
|
scanStartupSpinner?.stop();
|
|
1291
1297
|
scanStartupSpinner = null;
|
|
1292
1298
|
const scope = await finalizeScope({
|
|
@@ -1297,7 +1303,7 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
|
|
|
1297
1303
|
});
|
|
1298
1304
|
scanStartupSpinner = !isQuiet ? spinner("Scanning...").start() : null;
|
|
1299
1305
|
const isDiffMode = scope !== "full";
|
|
1300
|
-
const comparisonBaseRef = isDiffMode && diffInfo && !diffInfo.isCurrentChanges ? diffInfo.baseSha ? await resolveMergeBaseRef(resolvedDirectory, diffInfo.baseSha) : diffInfo.diffBaseRef ?? await resolveMergeBaseRef(resolvedDirectory, diffInfo.baseBranch) : null;
|
|
1306
|
+
const comparisonBaseRef = isDiffMode && diffInfo && !diffInfo.isCurrentChanges && !hasPositionalFileSelection ? diffInfo.baseSha ? await resolveMergeBaseRef(resolvedDirectory, diffInfo.baseSha) : diffInfo.diffBaseRef ?? await resolveMergeBaseRef(resolvedDirectory, diffInfo.baseBranch) : null;
|
|
1301
1307
|
const baselineRef = scope === "changed" ? comparisonBaseRef : null;
|
|
1302
1308
|
const baselineDiffPlan = baselineRef === null ? null : await getBaselineDiffPlan(resolvedDirectory, baselineRef);
|
|
1303
1309
|
const linesBaseRef = diffInfo?.isCurrentChanges ? "HEAD" : comparisonBaseRef;
|
|
@@ -1315,7 +1321,10 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
|
|
|
1315
1321
|
}
|
|
1316
1322
|
setJsonReportMode(baselineRef ? "baseline" : isDiffMode ? "diff" : "full");
|
|
1317
1323
|
if (isDiffMode && diffInfo && !isQuiet) {
|
|
1318
|
-
if (
|
|
1324
|
+
if (hasPositionalFileSelection) {
|
|
1325
|
+
const fileLabel = diffInfo.changedFiles.length === 1 ? "file" : "files";
|
|
1326
|
+
cliLogger.log(`Scanning ${diffInfo.changedFiles.length} selected ${fileLabel}`);
|
|
1327
|
+
} else if (diffInfo.isCurrentChanges) cliLogger.log("Scanning uncommitted changes");
|
|
1319
1328
|
else {
|
|
1320
1329
|
const currentBranchLabel = diffInfo.currentBranch ?? "(detached HEAD)";
|
|
1321
1330
|
cliLogger.log(`Scanning changes: ${highlighter.info(currentBranchLabel)} → ${highlighter.info(diffInfo.baseBranch)}`);
|
|
@@ -1441,5 +1450,5 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
|
|
|
1441
1450
|
//#endregion
|
|
1442
1451
|
export { warnDeprecatedFailOn as n, runProjectMigrations as r, inspectAction as t };
|
|
1443
1452
|
|
|
1444
|
-
//# sourceMappingURL=inspect-
|
|
1445
|
-
//# debugId=
|
|
1453
|
+
//# sourceMappingURL=inspect-Dd1qqPJf.js.map
|
|
1454
|
+
//# debugId=1230ca3b-79a6-58db-b084-8e2df3fc56c9
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { T as METRIC, t as recordCount, zn as runSync } from "./record-metric-
|
|
4
|
-
import { r as isExpectedUserError } from "./telemetry-runtime-
|
|
5
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
6
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
7
|
-
import { t as printBrandedHeader } from "./print-branded-header-
|
|
8
|
-
import { n as runInstallReactDoctor } from "./install-react-doctor-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3b8e6399-e1d2-56d3-97c0-70f10502ace8")}catch(e){}}();
|
|
3
|
+
import { T as METRIC, t as recordCount, zn as runSync } from "./record-metric-BzGcVSov.js";
|
|
4
|
+
import { r as isExpectedUserError } from "./telemetry-runtime-Bs7DsGaF.js";
|
|
5
|
+
import { n as handleUserError, t as handleError } from "./handle-error-Cslt8b7C.js";
|
|
6
|
+
import { t as reportErrorToSentry } from "./report-error-ZMTPN93d.js";
|
|
7
|
+
import { t as printBrandedHeader } from "./print-branded-header-CFNvp2ey.js";
|
|
8
|
+
import { n as runInstallReactDoctor } from "./install-react-doctor-DkfLDtWd.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-DeWeUjqr.js.map
|
|
33
|
+
//# debugId=3b8e6399-e1d2-56d3-97c0-70f10502ace8
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { B as isNonInteractiveEnvironment, Cn as error$1, En as warn, Kt as highlighter, Tn as log, k as RUN_GIT_MAX_BUFFER_BYTES, wn as info$1, zn as runSync } from "./record-metric-
|
|
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]="2d08cefe-a608-5643-a686-9948728273d2")}catch(e){}}();
|
|
3
|
+
import { B as isNonInteractiveEnvironment, Cn as error$1, En as warn, Kt as highlighter, Tn as log, k as RUN_GIT_MAX_BUFFER_BYTES, wn as info$1, zn as runSync } from "./record-metric-BzGcVSov.js";
|
|
4
|
+
import { a as chalk, i as stripAnsi, t as eastAsianWidth } from "./get-east-asian-width-Bv2TD3Xj.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";
|
|
8
8
|
import process$1 from "node:process";
|
|
9
9
|
import { stripVTControlCharacters } from "node:util";
|
|
10
10
|
import tty from "node:tty";
|
|
11
|
+
import isUnicodeSupported from "is-unicode-supported";
|
|
11
12
|
//#region src/cli/utils/cli-logger.ts
|
|
12
13
|
/**
|
|
13
14
|
* Thin synchronous façade over Effect's `Console` module. Used by
|
|
@@ -2132,14 +2133,6 @@ format(105, 49);
|
|
|
2132
2133
|
format(106, 49);
|
|
2133
2134
|
format(107, 49);
|
|
2134
2135
|
//#endregion
|
|
2135
|
-
//#region ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
2136
|
-
function isUnicodeSupported() {
|
|
2137
|
-
const { env } = process$1;
|
|
2138
|
-
const { TERM, TERM_PROGRAM } = env;
|
|
2139
|
-
if (process$1.platform !== "win32") return TERM !== "linux";
|
|
2140
|
-
return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
2141
|
-
}
|
|
2142
|
-
//#endregion
|
|
2143
2136
|
//#region ../../node_modules/.pnpm/log-symbols@7.0.1/node_modules/log-symbols/symbols.js
|
|
2144
2137
|
const _isUnicodeSupported = isUnicodeSupported();
|
|
2145
2138
|
const info = blue(_isUnicodeSupported ? "ℹ" : "i");
|
|
@@ -2810,7 +2803,7 @@ const installReactDoctorScriptStep = (projectRoot) => {
|
|
|
2810
2803
|
}
|
|
2811
2804
|
};
|
|
2812
2805
|
//#endregion
|
|
2813
|
-
export {
|
|
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 };
|
|
2814
2807
|
|
|
2815
|
-
//# sourceMappingURL=install-doctor-script-
|
|
2816
|
-
//# debugId=
|
|
2808
|
+
//# sourceMappingURL=install-doctor-script-DbKR-GHo.js.map
|
|
2809
|
+
//# debugId=2d08cefe-a608-5643-a686-9948728273d2
|
|
@@ -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-
|
|
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]="fc05dd16-aa60-55cc-9a1c-ab773fba476e")}catch(e){}}();
|
|
3
|
+
import { w as GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS } from "./record-metric-BzGcVSov.js";
|
|
4
|
+
import { t as unrefStdin } from "./unref-stdin-SK3WfwxS.js";
|
|
5
|
+
import { M as cliLogger } from "./install-doctor-script-DbKR-GHo.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";
|
|
@@ -183,6 +183,10 @@ jobs:
|
|
|
183
183
|
# the gate: uncomment the block below and set blocking to "error" (fail
|
|
184
184
|
# on new error-severity findings) or "warning" (fail on any finding).
|
|
185
185
|
# Full reference: https://www.react.doctor/ci
|
|
186
|
+
#
|
|
187
|
+
# Security: @v2 is a floating major tag that may move. For supply-chain-
|
|
188
|
+
# hardened CI, pin to a full commit SHA with a version comment instead:
|
|
189
|
+
# uses: millionco/react-doctor@<sha> # v2.x.x
|
|
186
190
|
# with:
|
|
187
191
|
# blocking: error # Gate level: "none" (advisory, the default) | "warning" | "error"
|
|
188
192
|
# scope: full # On PRs, scan the whole project instead of just changed files
|
|
@@ -263,5 +267,5 @@ const upgradeReactDoctorWorkflowInPlace = (projectRoot) => {
|
|
|
263
267
|
//#endregion
|
|
264
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 };
|
|
265
269
|
|
|
266
|
-
//# sourceMappingURL=install-github-workflow-
|
|
267
|
-
//# debugId=
|
|
270
|
+
//# sourceMappingURL=install-github-workflow-Bkv_CMdF.js.map
|
|
271
|
+
//# debugId=fc05dd16-aa60-55cc-9a1c-ab773fba476e
|
|
@@ -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, Kt as highlighter, T as METRIC, br as isErrnoException, cr as GITHUB_ACTIONS_SETUP_URL, gr as SKILL_NAME, t as recordCount, z as CliInputError } from "./record-metric-
|
|
4
|
-
import {
|
|
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]="1e268a10-448d-5151-8b1d-9c2981167dd3")}catch(e){}}();
|
|
3
|
+
import { C as CI_TRUST_COMPANIES, Kt as highlighter, T as METRIC, br as isErrnoException, cr as GITHUB_ACTIONS_SETUP_URL, gr as SKILL_NAME, t as recordCount, z as CliInputError } from "./record-metric-BzGcVSov.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-DbKR-GHo.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-Bkv_CMdF.js";
|
|
6
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-F0NaNR8z.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-CKUjTJpB.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-DkfLDtWd.js.map
|
|
1156
|
+
//# debugId=1e268a10-448d-5151-8b1d-9c2981167dd3
|
|
@@ -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]="3cab3ca0-d248-511d-af0e-5e98a2ca5334")}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-BzGcVSov.js";
|
|
5
|
+
import { n as registerActiveTuiRenderer, t as exitGracefully } from "./exit-gracefully-Dt1ix6Xh.js";
|
|
6
|
+
import { a as chalk, i as stripAnsi, n as isFullWidth$1, r as isWide$1 } from "./get-east-asian-width-Bv2TD3Xj.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-CC2PAZ85.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-DwPH8QhA.js.map
|
|
25873
|
+
//# debugId=3cab3ca0-d248-511d-af0e-5e98a2ca5334
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/cli/utils/path-format.ts
|
|
2
|
+
|
|
3
|
+
!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]="0330366c-931b-5aad-9410-de708cd22f46")}catch(e){}}();
|
|
4
|
+
const toForwardSlashes = (filePath) => filePath.replaceAll("\\", "/");
|
|
5
|
+
//#endregion
|
|
6
|
+
export { toForwardSlashes as t };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=path-format-DnHpmJwG.js.map
|
|
9
|
+
//# debugId=0330366c-931b-5aad-9410-de708cd22f46
|
|
@@ -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 { An as gen, Kt as highlighter, Tn as log, _ as VERSION } 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]="bf2f33a4-7d92-5b3e-ba80-cd6767fd19ff")}catch(e){}}();
|
|
3
|
+
import { An as gen, Kt as highlighter, Tn as log, _ as VERSION } from "./record-metric-BzGcVSov.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-CFNvp2ey.js.map
|
|
22
|
+
//# debugId=bf2f33a4-7d92-5b3e-ba80-cd6767fd19ff
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="98b361a0-3811-59d7-bcea-c6d79bbebdbd")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
4
|
import { n as require_picomatch$2, t as require_semver } from "./semver-DFtnEmN-.js";
|
|
5
5
|
import { builtinModules } from "node:module";
|
|
@@ -9,12 +9,12 @@ import path, { basename, dirname, extname, isAbsolute, join, parse, posix, relat
|
|
|
9
9
|
import * as fs$1 from "node:fs";
|
|
10
10
|
import { existsSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
|
|
11
11
|
import ts from "typescript";
|
|
12
|
+
import { parseSync } from "oxc-parser";
|
|
12
13
|
import { ResolverFactory } from "oxc-resolver";
|
|
13
14
|
import { devNull } from "node:os";
|
|
14
15
|
import { parseJSONC, parseTOML, parseYAML } from "confbox";
|
|
15
16
|
import { readFile } from "node:fs/promises";
|
|
16
17
|
import { parse as parse$1 } from "@astrojs/compiler/sync";
|
|
17
|
-
import { parseSync } from "oxc-parser";
|
|
18
18
|
//#region ../core/src/project-analysis/constants.ts
|
|
19
19
|
const DEFAULT_EXTENSIONS = [
|
|
20
20
|
".ts",
|
|
@@ -38057,6 +38057,13 @@ const discoverMobileEntryPoints = (directory) => {
|
|
|
38057
38057
|
}
|
|
38058
38058
|
};
|
|
38059
38059
|
//#endregion
|
|
38060
|
+
//#region ../core/src/utils/unwrap-typescript-expression.ts
|
|
38061
|
+
const unwrapTypescriptExpression = (expression) => {
|
|
38062
|
+
let currentExpression = expression;
|
|
38063
|
+
while (ts.isParenthesizedExpression(currentExpression) || ts.isAsExpression(currentExpression) || ts.isSatisfiesExpression(currentExpression) || ts.isNonNullExpression(currentExpression) || ts.isTypeAssertionExpression(currentExpression)) currentExpression = currentExpression.expression;
|
|
38064
|
+
return currentExpression;
|
|
38065
|
+
};
|
|
38066
|
+
//#endregion
|
|
38060
38067
|
//#region ../core/src/project-analysis/collect/expo-config-plugin-entries.ts
|
|
38061
38068
|
const EXPO_CONFIG_FILE_GLOBS = ["app.config.{ts,mts,cts,js,mjs,cjs}", "app.json"];
|
|
38062
38069
|
const NESTED_EXPO_CONFIG_FILE_GLOBS = [
|
|
@@ -38102,11 +38109,6 @@ const addExpoPluginEntry = (entries, packageNamePlugins, rootDirectory, configDi
|
|
|
38102
38109
|
const getPropertyName$4 = (name) => {
|
|
38103
38110
|
if (ts.isIdentifier(name) || ts.isStringLiteral(name) || ts.isNumericLiteral(name)) return name.text;
|
|
38104
38111
|
};
|
|
38105
|
-
const unwrapExpression = (expression) => {
|
|
38106
|
-
let currentExpression = expression;
|
|
38107
|
-
while (ts.isParenthesizedExpression(currentExpression)) currentExpression = currentExpression.expression;
|
|
38108
|
-
return currentExpression;
|
|
38109
|
-
};
|
|
38110
38112
|
const collectExpoPluginPathsFromArray = (array, entries, packageNamePlugins, rootDirectory, configDirectory) => {
|
|
38111
38113
|
for (const element of array.elements) {
|
|
38112
38114
|
if (ts.isStringLiteral(element) || ts.isNoSubstitutionTemplateLiteral(element)) {
|
|
@@ -38129,14 +38131,14 @@ const collectExpoPluginPathsFromConfigObject = (objectLiteral, entries, packageN
|
|
|
38129
38131
|
};
|
|
38130
38132
|
const collectReturnedExpoConfigPluginPaths = (body, entries, packageNamePlugins, rootDirectory, configDirectory) => {
|
|
38131
38133
|
if (!ts.isBlock(body)) {
|
|
38132
|
-
const expression =
|
|
38134
|
+
const expression = unwrapTypescriptExpression(body);
|
|
38133
38135
|
if (ts.isObjectLiteralExpression(expression)) collectExpoPluginPathsFromConfigObject(expression, entries, packageNamePlugins, rootDirectory, configDirectory);
|
|
38134
38136
|
return;
|
|
38135
38137
|
}
|
|
38136
38138
|
const visit = (node) => {
|
|
38137
38139
|
if (ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node) || ts.isArrowFunction(node)) return;
|
|
38138
38140
|
if (ts.isReturnStatement(node) && node.expression) {
|
|
38139
|
-
const expression =
|
|
38141
|
+
const expression = unwrapTypescriptExpression(node.expression);
|
|
38140
38142
|
if (ts.isObjectLiteralExpression(expression)) collectExpoPluginPathsFromConfigObject(expression, entries, packageNamePlugins, rootDirectory, configDirectory);
|
|
38141
38143
|
return;
|
|
38142
38144
|
}
|
|
@@ -38145,7 +38147,7 @@ const collectReturnedExpoConfigPluginPaths = (body, entries, packageNamePlugins,
|
|
|
38145
38147
|
visit(body);
|
|
38146
38148
|
};
|
|
38147
38149
|
const collectExpoPluginPathsFromConfigExpression = (expression, entries, packageNamePlugins, rootDirectory, configDirectory, bindings, seenIdentifiers = /* @__PURE__ */ new Set()) => {
|
|
38148
|
-
const configExpression =
|
|
38150
|
+
const configExpression = unwrapTypescriptExpression(expression);
|
|
38149
38151
|
if (ts.isObjectLiteralExpression(configExpression)) {
|
|
38150
38152
|
collectExpoPluginPathsFromConfigObject(configExpression, entries, packageNamePlugins, rootDirectory, configDirectory);
|
|
38151
38153
|
return;
|
|
@@ -40999,13 +41001,6 @@ const extractSupabaseFunctionEntries = (rootDirectory) => import_out.default.syn
|
|
|
40999
41001
|
onlyFiles: true
|
|
41000
41002
|
});
|
|
41001
41003
|
//#endregion
|
|
41002
|
-
//#region ../core/src/utils/unwrap-typescript-expression.ts
|
|
41003
|
-
const unwrapTypescriptExpression = (expression) => {
|
|
41004
|
-
let currentExpression = expression;
|
|
41005
|
-
while (ts.isParenthesizedExpression(currentExpression) || ts.isAsExpression(currentExpression) || ts.isSatisfiesExpression(currentExpression) || ts.isNonNullExpression(currentExpression) || ts.isTypeAssertionExpression(currentExpression)) currentExpression = currentExpression.expression;
|
|
41006
|
-
return currentExpression;
|
|
41007
|
-
};
|
|
41008
|
-
//#endregion
|
|
41009
41004
|
//#region ../core/src/project-analysis/utils/is-path-inside-directory-or-equal.ts
|
|
41010
41005
|
const isPathInsideDirectoryOrEqual = (candidatePath, directoryPath) => {
|
|
41011
41006
|
const normalizedCandidatePath = posix.normalize(toPosixPath(candidatePath));
|
|
@@ -46087,47 +46082,53 @@ const collectPackageLockPackageMetadata = (searchRoots, resolutionDirectory, dec
|
|
|
46087
46082
|
return metadataByPackageName;
|
|
46088
46083
|
};
|
|
46089
46084
|
//#endregion
|
|
46090
|
-
//#region ../core/src/project-analysis/utils/collect-static-module-
|
|
46091
|
-
const
|
|
46092
|
-
|
|
46093
|
-
|
|
46094
|
-
|
|
46095
|
-
|
|
46096
|
-
|
|
46097
|
-
};
|
|
46098
|
-
const
|
|
46099
|
-
|
|
46100
|
-
|
|
46101
|
-
|
|
46085
|
+
//#region ../core/src/project-analysis/utils/collect-static-module-specifiers.ts
|
|
46086
|
+
const getStaticModuleSpecifier = (value) => {
|
|
46087
|
+
if (!isOxcAstNode(value)) return void 0;
|
|
46088
|
+
if (typeof value.value === "string") return value.value;
|
|
46089
|
+
if (value.type === "TemplateLiteral" && Array.isArray(value.expressions) && value.expressions.length === 0 && Array.isArray(value.quasis) && isOxcAstNode(value.quasis[0]) && value.quasis[0].value && typeof value.quasis[0].value === "object" && "cooked" in value.quasis[0].value && typeof value.quasis[0].value.cooked === "string") return value.quasis[0].value.cooked;
|
|
46090
|
+
};
|
|
46091
|
+
const collectStaticModuleSpecifiers = (sourceText, options = {}) => {
|
|
46092
|
+
const { filePath = "module.tsx", includeTypeOnly = true } = options;
|
|
46093
|
+
const parsedModule = parseSync(filePath, sourceText, { sourceType: "unambiguous" });
|
|
46094
|
+
const moduleSpecifiers = /* @__PURE__ */ new Set();
|
|
46095
|
+
const addSpecifier = (value) => {
|
|
46096
|
+
const moduleSpecifier = getStaticModuleSpecifier(value);
|
|
46097
|
+
if (moduleSpecifier) moduleSpecifiers.add(moduleSpecifier);
|
|
46102
46098
|
};
|
|
46103
|
-
|
|
46104
|
-
for (const staticExport of parsedModule.module.staticExports) for (const entry of staticExport.entries) if (entry.moduleRequest) addSpecifier(entry.moduleRequest.value);
|
|
46105
|
-
const visitNode = (value, isInTypeScriptModuleBlock = false) => {
|
|
46099
|
+
const visitNode = (value) => {
|
|
46106
46100
|
if (Array.isArray(value)) {
|
|
46107
|
-
for (const child of value) visitNode(child
|
|
46101
|
+
for (const child of value) visitNode(child);
|
|
46108
46102
|
return;
|
|
46109
46103
|
}
|
|
46110
46104
|
if (!isOxcAstNode(value)) return;
|
|
46111
|
-
if (
|
|
46112
|
-
const
|
|
46113
|
-
|
|
46114
|
-
|
|
46115
|
-
if (value.type === "
|
|
46116
|
-
const
|
|
46117
|
-
|
|
46118
|
-
|
|
46119
|
-
if (value.type === "
|
|
46120
|
-
|
|
46121
|
-
|
|
46122
|
-
|
|
46123
|
-
if (value.type === "
|
|
46124
|
-
|
|
46125
|
-
|
|
46126
|
-
}
|
|
46127
|
-
const childIsInTypeScriptModuleBlock = isInTypeScriptModuleBlock || value.type === "TSModuleBlock";
|
|
46128
|
-
for (const child of Object.values(value)) visitNode(child, childIsInTypeScriptModuleBlock);
|
|
46105
|
+
if (value.type === "ImportDeclaration") {
|
|
46106
|
+
const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
|
|
46107
|
+
const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.importKind !== "type");
|
|
46108
|
+
if (includeTypeOnly || value.importKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
|
|
46109
|
+
} else if (value.type === "ExportNamedDeclaration") {
|
|
46110
|
+
const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
|
|
46111
|
+
const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.exportKind !== "type");
|
|
46112
|
+
if (includeTypeOnly || value.exportKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
|
|
46113
|
+
} else if (value.type === "ExportAllDeclaration" || value.type === "ImportExpression") {
|
|
46114
|
+
if (includeTypeOnly || value.exportKind !== "type") addSpecifier(value.source);
|
|
46115
|
+
} else if (value.type === "TSImportType") {
|
|
46116
|
+
if (includeTypeOnly) addSpecifier(value.source);
|
|
46117
|
+
} else if (value.type === "TSExternalModuleReference") addSpecifier(value.expression);
|
|
46118
|
+
else if (value.type === "CallExpression" && isOxcAstNode(value.callee) && value.callee.type === "Identifier" && value.callee.name === "require" && Array.isArray(value.arguments) && value.arguments.length > 0) addSpecifier(value.arguments[0]);
|
|
46119
|
+
for (const child of Object.values(value)) visitNode(child);
|
|
46129
46120
|
};
|
|
46130
46121
|
visitNode(parsedModule.program);
|
|
46122
|
+
return moduleSpecifiers;
|
|
46123
|
+
};
|
|
46124
|
+
//#endregion
|
|
46125
|
+
//#region ../core/src/project-analysis/utils/collect-static-module-package-names.ts
|
|
46126
|
+
const collectStaticModulePackageNames = (sourceText) => {
|
|
46127
|
+
const packageNames = /* @__PURE__ */ new Set();
|
|
46128
|
+
for (const specifier of collectStaticModuleSpecifiers(sourceText, { filePath: "package-reference.tsx" })) {
|
|
46129
|
+
const packageName = extractPackageName(specifier);
|
|
46130
|
+
if (packageName) packageNames.add(packageName);
|
|
46131
|
+
}
|
|
46131
46132
|
return packageNames;
|
|
46132
46133
|
};
|
|
46133
46134
|
//#endregion
|
|
@@ -51897,4 +51898,4 @@ startProjectAnalysisWorker();
|
|
|
51897
51898
|
export {};
|
|
51898
51899
|
|
|
51899
51900
|
//# sourceMappingURL=project-analysis-worker.js.map
|
|
51900
|
-
//# debugId=
|
|
51901
|
+
//# debugId=98b361a0-3811-59d7-bcea-c6d79bbebdbd
|
|
@@ -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 { t as unrefStdin } from "./unref-stdin-
|
|
4
|
-
import { a as RUNTIME_SCAN_LOCAL_DEV_PORTS, t as sanitizeRuntimeUrl, u as RUNTIME_SCAN_MAX_STRING_LENGTH } from "./sanitize-runtime-url-
|
|
5
|
-
import { a as useExitOnCtrlC, c as Spinner, d as useInput, h as Box, i as import_react, m as Text, n as registerMountedTuiRenderer, o as terminalSymbols, p as render, r as useStdoutDimensions, s as isPrintableInput, t as require_jsx_runtime } from "./jsx-runtime-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="da9746b7-d36b-5b5c-93fc-9c3afd7c6a18")}catch(e){}}();
|
|
3
|
+
import { t as unrefStdin } from "./unref-stdin-SK3WfwxS.js";
|
|
4
|
+
import { a as RUNTIME_SCAN_LOCAL_DEV_PORTS, t as sanitizeRuntimeUrl, u as RUNTIME_SCAN_MAX_STRING_LENGTH } from "./sanitize-runtime-url-CFvLC0Vp.js";
|
|
5
|
+
import { a as useExitOnCtrlC, c as Spinner, d as useInput, h as Box, i as import_react, m as Text, n as registerMountedTuiRenderer, o as terminalSymbols, p as render, r as useStdoutDimensions, s as isPrintableInput, t as require_jsx_runtime } from "./jsx-runtime-DwPH8QhA.js";
|
|
6
6
|
import * as http from "node:http";
|
|
7
7
|
//#region src/cli/runtime-scan/detect-local-runtime-urls.ts
|
|
8
8
|
const LOCAL_HTTP_HOSTS = ["127.0.0.1", "::1"];
|
|
@@ -236,5 +236,5 @@ const promptRuntimeScanUrl = () => new Promise((resolve) => {
|
|
|
236
236
|
//#endregion
|
|
237
237
|
export { promptRuntimeScanUrl };
|
|
238
238
|
|
|
239
|
-
//# sourceMappingURL=prompt-runtime-scan-url-
|
|
240
|
-
//# debugId=
|
|
239
|
+
//# sourceMappingURL=prompt-runtime-scan-url-BuXp7_n4.js.map
|
|
240
|
+
//# debugId=da9746b7-d36b-5b5c-93fc-9c3afd7c6a18
|
|
@@ -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 { Sr as isPlainObject } 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]="a88de006-73f4-589e-881b-919297af685b")}catch(e){}}();
|
|
3
|
+
import { Sr as isPlainObject } from "./record-metric-BzGcVSov.js";
|
|
4
4
|
import * as fs$1 from "node:fs";
|
|
5
5
|
import { parseJSON5 } from "confbox";
|
|
6
6
|
//#region src/cli/utils/read-object-file.ts
|
|
@@ -20,5 +20,5 @@ const readObjectFile = (filePath) => {
|
|
|
20
20
|
//#endregion
|
|
21
21
|
export { readObjectFile as t };
|
|
22
22
|
|
|
23
|
-
//# sourceMappingURL=read-object-file-
|
|
24
|
-
//# debugId=
|
|
23
|
+
//# sourceMappingURL=read-object-file-CEbx-anl.js.map
|
|
24
|
+
//# debugId=a88de006-73f4-589e-881b-919297af685b
|