react-doctor 0.9.11 → 0.9.12-dev.a2b460d

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.
Files changed (28) hide show
  1. package/dist/{build-section-divider-sLcWe1hO.js → build-section-divider-Vz879zXD.js} +7 -7
  2. package/dist/{ci-DsrrD52i.js → ci-BVYrYekU.js} +11 -11
  3. package/dist/cli.js +22 -22
  4. package/dist/{design-CP25gyyg.js → design-D-TYN_tr.js} +4 -4
  5. package/dist/{exit-gracefully-CVVkBxDS.js → exit-gracefully-Cjv5kC_l.js} +6 -6
  6. package/dist/index.d.ts +17 -19
  7. package/dist/index.js +150 -34
  8. package/dist/{inspect-D6y8oLtg.js → inspect-kkvDHKDE.js} +19 -19
  9. package/dist/{install-afMFGeTB.js → install-ZeYvD9Rw.js} +8 -8
  10. package/dist/{install-doctor-script-Be7Mv3-l.js → install-doctor-script-D58Hr1dM.js} +4 -4
  11. package/dist/{install-github-workflow-Dev2F6Ea.js → install-github-workflow-DkMicv8E.js} +6 -6
  12. package/dist/{install-react-doctor-DIPVunY4.js → install-react-doctor-CjgE52al.js} +8 -8
  13. package/dist/lsp.js +55 -24
  14. package/dist/{print-branded-header-D5jLdo4p.js → print-branded-header-D4QYSu-h.js} +4 -4
  15. package/dist/{read-object-file-CEh1CqnD.js → read-object-file-OFRlvCAL.js} +4 -4
  16. package/dist/{record-metric-CJxSHfJD.js → record-metric-CMe2d1Xv.js} +86 -41
  17. package/dist/{report-error-CAEixMg1.js → report-error-1l7v6_dE.js} +5 -5
  18. package/dist/{report-workflow-result-C0jbKH8p.js → report-workflow-result-EagkH_v9.js} +5 -5
  19. package/dist/{resolve-scope-DS7rcRRz.js → resolve-scope-CMNrOdDf.js} +6 -6
  20. package/dist/{rules-BJynymuU.js → rules-CzR1qUru.js} +6 -6
  21. package/dist/{run-scan-app-BGzlyiIB.js → run-scan-app-Ciq22jzp.js} +69 -36
  22. package/dist/{scan-CgPRG6_z.js → scan-D4m5r4Rs.js} +8 -8
  23. package/dist/{should-fail-scan-gate-4jf7ZRdL.js → should-fail-scan-gate-lMTlhEhE.js} +56 -21
  24. package/dist/{should-skip-prompts-C78r7Ww7.js → should-skip-prompts-mXKZBNCz.js} +4 -4
  25. package/dist/{unref-stdin-Dc8ipkaw.js → unref-stdin-Cxhw67r6.js} +4 -4
  26. package/dist/{version-DDrwsTas.js → version-CnvVY2VD.js} +4 -4
  27. package/dist/{why-BRNrKY1b.js → why-BktDEhhH.js} +4 -4
  28. package/package.json +7 -9
package/dist/index.js CHANGED
@@ -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]="f242ba00-ff72-511c-8c6f-3b9b01029d57")}catch(e){}}();
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]="5ed02ea3-f769-5273-a8b7-d6593605c860")}catch(e){}}();
3
3
  import { i as __toESM$1, r as __require, t as __commonJSMin$1 } from "./chunk-ChKA3wi6.js";
4
4
  import { createRequire } from "node:module";
5
5
  import { ALL_REACT_DOCTOR_RULE_KEYS, CROSS_FILE_DEPENDENCY_COLLECTORS, CROSS_FILE_RULE_IDS, FRAMEWORK_SPECIFIC_RULE_KEYS, FRAMEWORK_TOKENS, MOTION_LIBRARY_PACKAGES, REACT_COMPILER_RULES, REACT_DOCTOR_RULES, REACT_DOCTOR_RULE_REGISTRY, REACT_DOCTOR_SCAN_RULES, classifySecurityScanFile, collectCrossFileDependencyProbes, resetManifestCaches, shouldReadSecurityScanContent } from "oxlint-plugin-react-doctor/core";
@@ -20673,11 +20673,11 @@ var JsonReportV1 = class extends Class("JsonReportV1")({
20673
20673
  */
20674
20674
  baselineDegraded: optional(Boolean$1),
20675
20675
  /**
20676
- * Whether any scanned project resolved a React-compatible runtime (React
20677
- * or Preact). `false` means every React-runtime rule family was gated off,
20678
- * so an empty `diagnostics` array is vacuous — NOT the same as a clean
20679
- * React scan. Consumers gating on the report (CI, verifiers, hooks) should
20680
- * treat `reactDetected === false` as "wrong scan target", not "all clear".
20676
+ * Whether any scanned project resolved a React-compatible runtime directly
20677
+ * or through a React-backed framework. `false` means every React-runtime
20678
+ * rule family was gated off, not that the scan target was unsupported:
20679
+ * other detected framework and library rule families still run, as do
20680
+ * framework-neutral rules on any analyzable project.
20681
20681
  * Absent when nothing was scanned (`projects` is empty), on error reports,
20682
20682
  * and on reports from older CLI versions.
20683
20683
  */
@@ -63958,7 +63958,7 @@ const SOCKET_FREE_USER_AGENT = "react-doctor-supply-chain";
63958
63958
  const FILE_LINT_CACHE_FILENAME = "file-lint-cache.json";
63959
63959
  const FILE_LINT_CACHE_MAX_FILE_COUNT = 5e4;
63960
63960
  const SIDECAR_LINT_CACHE_FILENAME = "sidecar-lint-cache.json";
63961
- const CORE_PACKAGE_VERSION = "0.9.11";
63961
+ const CORE_PACKAGE_VERSION = "0.9.12";
63962
63962
  const DEAD_CODE_CACHE_FILENAME = "dead-code-cache.json";
63963
63963
  const DEAD_CODE_SUMMARY_CACHE_FILENAME = "dead-code-summaries.json";
63964
63964
  const SUPPLY_CHAIN_PLUGIN = "socket";
@@ -64303,7 +64303,8 @@ const listSourceFilesViaFilesystemCooperative = async (rootDirectory, signal) =>
64303
64303
  const listSourceFilePaths = (rootDirectory) => (listSourceFilesViaGit(rootDirectory) ?? listSourceFilesViaFilesystem(rootDirectory)).sort();
64304
64304
  const listSourceFilePathsCooperative = async (rootDirectory, signal) => (await listSourceFilesViaGitCooperative(rootDirectory, signal) ?? await listSourceFilesViaFilesystemCooperative(rootDirectory, signal)).sort();
64305
64305
  const listSourceFilesWithSize = (rootDirectory) => collectSizedSourceFiles(rootDirectory, listSourceFilePaths(rootDirectory));
64306
- const listSourceFilesCooperative = async (rootDirectory, signal) => (await collectSizedSourceFilesCooperative(rootDirectory, await listSourceFilePathsCooperative(rootDirectory, signal), signal)).map((entry) => entry.path);
64306
+ const listSourceFilesWithSizeCooperative = async (rootDirectory, signal) => collectSizedSourceFilesCooperative(rootDirectory, await listSourceFilePathsCooperative(rootDirectory, signal), signal);
64307
+ const listSourceFilesCooperative = async (rootDirectory, signal) => (await listSourceFilesWithSizeCooperative(rootDirectory, signal)).map((entry) => entry.path);
64307
64308
  const listSourceFiles = (rootDirectory) => listSourceFilesWithSize(rootDirectory).map((entry) => entry.path);
64308
64309
  const countSourceFiles = (rootDirectory) => listSourceFilesWithSize(rootDirectory).length;
64309
64310
  const NEXT_CONFIG_FILENAMES = [
@@ -70787,6 +70788,21 @@ function* collectSecurityScanFiles(rootDirectory, excludedDirectories = /* @__PU
70787
70788
  }
70788
70789
  }
70789
70790
  }
70791
+ const REACT_COMPATIBLE_FRAMEWORKS = new Set([
70792
+ "nextjs",
70793
+ "tanstack-start",
70794
+ "cra",
70795
+ "remix",
70796
+ "gatsby",
70797
+ "expo",
70798
+ "react-native",
70799
+ "preact"
70800
+ ]);
70801
+ /**
70802
+ * Whether project discovery resolved a React-compatible runtime directly or
70803
+ * through a framework whose runtime is necessarily React-compatible.
70804
+ */
70805
+ const hasReactRuntime = (project) => project.reactVersion !== null || project.preactVersion !== null || REACT_COMPATIBLE_FRAMEWORKS.has(project.framework);
70790
70806
  const CLIENT_ONLY_FRAMEWORKS = new Set([
70791
70807
  "vite",
70792
70808
  "cra",
@@ -70808,7 +70824,7 @@ const addVersionCapabilityLadder = (capabilities, name, detectedVersion, earlies
70808
70824
  const buildCapabilities = (project) => {
70809
70825
  const capabilities = /* @__PURE__ */ new Set();
70810
70826
  capabilities.add(project.framework);
70811
- if (project.reactVersion !== null || project.preactVersion !== null) capabilities.add("react");
70827
+ if (hasReactRuntime(project)) capabilities.add("react");
70812
70828
  if (project.framework === "expo" || project.framework === "react-native" || project.hasReactNativeWorkspace) capabilities.add("react-native");
70813
70829
  if (project.expoVersion !== null) {
70814
70830
  capabilities.add("expo");
@@ -73095,6 +73111,9 @@ const createOxlintConfig = ({ pluginPath, project, customRulesOnly = false, exte
73095
73111
  if (reactHooksJsPlugin) jsPlugins.push(reactHooksJsPlugin.entry);
73096
73112
  const capabilities = getCapabilities(project);
73097
73113
  const settingsRootDirectory = resolveSettingsRootDirectory(project.rootDirectory);
73114
+ const noMultiCompOverride = resolveRuleSeverityOverride({ ruleKey: "react-doctor/no-multi-comp" }, severityControls);
73115
+ const multiComponentFileOverride = resolveRuleSeverityOverride({ ruleKey: "react-doctor/no-multi-component-file" }, severityControls);
73116
+ const shouldUseExplicitNoMultiCompPolicy = noMultiCompOverride !== void 0 && multiComponentFileOverride === void 0;
73098
73117
  const enabledReactDoctorRules = {};
73099
73118
  for (const registryEntry of REACT_DOCTOR_RULES) {
73100
73119
  const rule = REACT_DOCTOR_RULE_REGISTRY[registryEntry.id];
@@ -73103,6 +73122,7 @@ const createOxlintConfig = ({ pluginPath, project, customRulesOnly = false, exte
73103
73122
  if (ruleSelection === "sidecar" && !CROSS_FILE_RULE_IDS.has(registryEntry.id)) continue;
73104
73123
  if (ruleSelection === "sidecar" && sidecarRuleIdFilter !== void 0 && !sidecarRuleIdFilter.has(registryEntry.id)) continue;
73105
73124
  if (rule.isScanRule) continue;
73125
+ if (registryEntry.id === "no-multi-component-file" && shouldUseExplicitNoMultiCompPolicy) continue;
73106
73126
  if (customRulesOnly && registryEntry.originallyExternal) continue;
73107
73127
  if (rule.framework !== "global" && !rule.requires) continue;
73108
73128
  if (!shouldEnableRule(rule.requires, rule.tags, capabilities, ignoredTags, rule.disabledWhen, includedTags)) continue;
@@ -73139,6 +73159,7 @@ const createOxlintConfig = ({ pluginPath, project, customRulesOnly = false, exte
73139
73159
  plugins: [],
73140
73160
  jsPlugins: [...jsPlugins, pluginPath],
73141
73161
  settings: { "react-doctor": {
73162
+ portedRuleMode: "curated",
73142
73163
  framework: project.framework,
73143
73164
  rootDirectory: settingsRootDirectory,
73144
73165
  capabilities: [...capabilities].sort(),
@@ -74320,6 +74341,10 @@ const resolveCleanedDiagnostic = (message, help, plugin, rule, project) => {
74320
74341
  };
74321
74342
  };
74322
74343
  const parseRuleCode = (code) => {
74344
+ if (typeof code !== "string" || code.length === 0) return {
74345
+ plugin: "unknown",
74346
+ rule: "unknown"
74347
+ };
74323
74348
  const match = code.match(/^(.+)\((.+)\)$/);
74324
74349
  if (!match) return {
74325
74350
  plugin: "unknown",
@@ -75403,7 +75428,7 @@ const runOxlint = async (options) => {
75403
75428
  const pluginPath = resolvePluginPath();
75404
75429
  const extendsPaths = (adoptExistingLintConfig && !customRulesOnly ? detectUserLintConfigPaths(rootDirectory) : []).filter(canOxlintExtendConfig);
75405
75430
  const userPlugins = includedTags.size > 0 ? [] : resolveUserPlugins(userConfig?.plugins, configSourceDirectory);
75406
- const restoreDisableDirectives = respectInlineDisables ? () => {} : await neutralizeDisableDirectives(rootDirectory, includePaths);
75431
+ const restoreDisableDirectives = respectInlineDisables ? () => {} : await neutralizeDisableDirectives(rootDirectory, includePaths ?? options.precomputedSourceFiles?.map((sourceFile) => sourceFile.path));
75407
75432
  const configDirectory = NFS.mkdtempSync(Path.join(os.tmpdir(), "react-doctor-oxlintrc-"));
75408
75433
  const configPath = Path.join(configDirectory, "oxlintrc.json");
75409
75434
  try {
@@ -75436,8 +75461,8 @@ const runOxlint = async (options) => {
75436
75461
  ...sharedArgs
75437
75462
  ];
75438
75463
  await yieldToEventLoop();
75439
- const sizedScanFiles = includePaths === void 0 ? listSourceFilesWithSize(rootDirectory) : null;
75440
- const candidateFiles = includePaths !== void 0 ? includePaths : (sizedScanFiles ?? []).map((entry) => entry.path);
75464
+ const sizedScanFiles = options.precomputedSourceFiles ?? (includePaths === void 0 ? listSourceFilesWithSize(rootDirectory) : null);
75465
+ const candidateFiles = sizedScanFiles === null ? includePaths ?? [] : sizedScanFiles.map((entry) => entry.path);
75441
75466
  const projectIndexModuleSources = includePaths === void 0 && options.deadlineEpochMs === void 0 ? await collectProjectIndexModuleSources(rootDirectory, candidateFiles) : void 0;
75442
75467
  unpluginAutoImportGlobalScopes = collectUnpluginAutoImportGlobalScopes({
75443
75468
  rootDirectory,
@@ -75817,6 +75842,7 @@ var Linter = class Linter extends Service()("react-doctor/Linter") {
75817
75842
  rootDirectory: input.rootDirectory,
75818
75843
  project: input.project,
75819
75844
  includePaths: input.includePaths ? [...input.includePaths] : void 0,
75845
+ precomputedSourceFiles: input.precomputedSourceFiles,
75820
75846
  nodeBinaryPath: input.nodeBinaryPath,
75821
75847
  customRulesOnly: input.customRulesOnly,
75822
75848
  respectInlineDisables: input.respectInlineDisables,
@@ -76614,22 +76640,23 @@ const runInspect = (input, hooks = {}) => gen(function* () {
76614
76640
  const relativeFilePath = toNormalizedRelativePath(diagnostic.filePath, scanDirectory);
76615
76641
  return excludedProjectRelativePaths.some((excludedRelativePath) => relativeFilePath === excludedRelativePath || relativeFilePath.startsWith(`${excludedRelativePath}/`));
76616
76642
  };
76617
- const precomputedSourceFiles = input.suppressScanSummary === true || excludedProjectDirectories.length > 0 ? yield* filesService.listSourceFilesCooperative({
76643
+ const shouldListSourceFiles = input.precomputedSourceFiles === void 0 && (input.suppressScanSummary === true || excludedProjectDirectories.length > 0);
76644
+ const precomputedSourceFilePaths = input.precomputedSourceFiles?.map((sourceFile) => sourceFile.path) ?? (shouldListSourceFiles ? yield* filesService.listSourceFilesCooperative({
76618
76645
  rootDirectory: scanDirectory,
76619
76646
  signal: input.signal
76620
- }) : null;
76621
- const includedPrecomputedSourceFiles = precomputedSourceFiles !== null && excludedProjectDirectories.length > 0 ? filterPathsOutsideDirectories({
76647
+ }) : null);
76648
+ const includedPrecomputedSourceFilePaths = precomputedSourceFilePaths !== null && excludedProjectDirectories.length > 0 ? filterPathsOutsideDirectories({
76622
76649
  rootDirectory: scanDirectory,
76623
- relativePaths: precomputedSourceFiles,
76650
+ relativePaths: precomputedSourceFilePaths,
76624
76651
  excludedDirectories: excludedProjectDirectories
76625
- }) : precomputedSourceFiles;
76626
- const sourceFileCount = excludedProjectDirectories.length > 0 ? includedPrecomputedSourceFiles?.length : input.precomputedSourceFileCount ?? includedPrecomputedSourceFiles?.length;
76652
+ }) : precomputedSourceFilePaths;
76653
+ const sourceFileCount = excludedProjectDirectories.length > 0 ? includedPrecomputedSourceFilePaths?.length : input.precomputedSourceFiles?.length ?? input.precomputedSourceFileCount ?? includedPrecomputedSourceFilePaths?.length;
76627
76654
  const project = yield* projectService.discover({
76628
76655
  directory: scanDirectory,
76629
76656
  sourceFileCount
76630
76657
  });
76631
76658
  if (!isAnalyzableProject(project)) return yield* new ReactDoctorError({ reason: new NoReactDependency({ directory: scanDirectory }) });
76632
- const deadCodeSourceFileCount = input.retainExcludedProjectDeadCodeDiagnostics === true && precomputedSourceFiles !== null ? precomputedSourceFiles.length : project.sourceFileCount;
76659
+ const deadCodeSourceFileCount = input.retainExcludedProjectDeadCodeDiagnostics === true && precomputedSourceFilePaths !== null ? precomputedSourceFilePaths.length : project.sourceFileCount;
76633
76660
  const [repo, sha, defaultBranch] = yield* all([
76634
76661
  gitService.githubRepo(scanDirectory).pipe(orElseSucceed(() => null)),
76635
76662
  gitService.headSha(scanDirectory).pipe(orElseSucceed(() => null)),
@@ -76640,13 +76667,16 @@ const runInspect = (input, hooks = {}) => gen(function* () {
76640
76667
  directory: scanDirectory,
76641
76668
  repo
76642
76669
  }).pipe(orElseSucceed(() => null)) : succeed$2(null));
76643
- let lintIncludePaths = (input.skipExplicitIncludePathFilter ? input.includePaths.length > 0 ? [...input.includePaths] : void 0 : computeExplicitLintIncludePaths([...input.includePaths])) ?? resolveLintIncludePaths(scanDirectory, resolvedConfig.config, includedPrecomputedSourceFiles ?? void 0);
76670
+ let lintIncludePaths = (input.skipExplicitIncludePathFilter ? input.includePaths.length > 0 ? [...input.includePaths] : void 0 : computeExplicitLintIncludePaths([...input.includePaths])) ?? resolveLintIncludePaths(scanDirectory, resolvedConfig.config, includedPrecomputedSourceFilePaths ?? void 0);
76644
76671
  if (excludedProjectDirectories.length > 0) lintIncludePaths = filterPathsOutsideDirectories({
76645
76672
  rootDirectory: scanDirectory,
76646
- relativePaths: lintIncludePaths ?? includedPrecomputedSourceFiles ?? (yield* filesService.listSourceFiles(scanDirectory)),
76673
+ relativePaths: lintIncludePaths ?? includedPrecomputedSourceFilePaths ?? (yield* filesService.listSourceFiles(scanDirectory)),
76647
76674
  excludedDirectories: excludedProjectDirectories
76648
76675
  });
76649
- const fallbackScannedFilePaths = input.suppressScanSummary ? (lintIncludePaths ?? includedPrecomputedSourceFiles ?? (yield* filesService.listSourceFiles(scanDirectory))).map((relativePath) => Path.resolve(scanDirectory, relativePath)) : [];
76676
+ const suppliedSourceFiles = input.precomputedSourceFiles;
76677
+ const includedPrecomputedSourceFilePathSet = suppliedSourceFiles === void 0 || input.includePaths.length > 0 ? null : new Set(lintIncludePaths ?? includedPrecomputedSourceFilePaths ?? []);
76678
+ const precomputedLintSourceFiles = includedPrecomputedSourceFilePathSet === null || suppliedSourceFiles === void 0 ? void 0 : suppliedSourceFiles.filter((sourceFile) => includedPrecomputedSourceFilePathSet.has(sourceFile.path));
76679
+ const fallbackScannedFilePaths = input.suppressScanSummary ? (lintIncludePaths ?? includedPrecomputedSourceFilePaths ?? (yield* filesService.listSourceFiles(scanDirectory))).map((relativePath) => Path.resolve(scanDirectory, relativePath)) : [];
76650
76680
  const beforeLint = hooks.beforeLint ?? NO_HOOKS.beforeLint;
76651
76681
  const afterLint = hooks.afterLint ?? NO_HOOKS.afterLint;
76652
76682
  yield* beforeLint(project);
@@ -76779,6 +76809,7 @@ const runInspect = (input, hooks = {}) => gen(function* () {
76779
76809
  rootDirectory: scanDirectory,
76780
76810
  project,
76781
76811
  includePaths: lintIncludePaths ?? void 0,
76812
+ precomputedSourceFiles: precomputedLintSourceFiles,
76782
76813
  nodeBinaryPath: input.nodeBinaryPath,
76783
76814
  customRulesOnly: input.customRulesOnly,
76784
76815
  respectInlineDisables: input.respectInlineDisables,
@@ -77215,13 +77246,6 @@ const summarizeDiagnostics = (diagnostics, worstScore = null, worstScoreLabel =
77215
77246
  scoreLabel: worstScoreLabel
77216
77247
  };
77217
77248
  };
77218
- /**
77219
- * Whether project discovery resolved a React-compatible runtime (React or
77220
- * Preact, which ships the same hooks + JSX model). This is the same
77221
- * predicate that grants the `react` capability, so `false` means every
77222
- * React-runtime rule family was gated off for the project.
77223
- */
77224
- const hasReactRuntime = (project) => project.reactVersion !== null || project.preactVersion !== null;
77225
77249
  const isScanComplete = (input) => input.analyzedFileCount !== void 0 && input.scannedFileCount !== void 0 && input.skippedCheckCount === 0 && input.skippedCheckReasonCount === 0 && input.analyzedFileCount === input.scannedFileCount;
77226
77250
  const toJsonDiff = (diff) => {
77227
77251
  if (!diff) return null;
@@ -77375,6 +77399,39 @@ const getDiffInfo = (directory, explicitBaseBranch, includeUntracked) => runProm
77375
77399
  };
77376
77400
  }).pipe(provide(Git.layerNode)));
77377
77401
  const filterSourceFiles = (filePaths) => filePaths.filter(isLintableSourceFile);
77402
+ const collectSourceFilesByDirectory = async (rootDirectory, projectDirectories, signal) => {
77403
+ const resolvedRootDirectory = Path.resolve(rootDirectory);
77404
+ const sourceFilesByDirectory = /* @__PURE__ */ new Map();
77405
+ const projectDirectoryByRelativePath = /* @__PURE__ */ new Map();
77406
+ for (const projectDirectory of projectDirectories) {
77407
+ const resolvedProjectDirectory = Path.resolve(projectDirectory);
77408
+ const relativeDirectory = Path.relative(resolvedRootDirectory, resolvedProjectDirectory);
77409
+ if (Path.isAbsolute(relativeDirectory) || relativeDirectory === ".." || relativeDirectory.startsWith(`..${Path.sep}`)) continue;
77410
+ sourceFilesByDirectory.set(resolvedProjectDirectory, []);
77411
+ projectDirectoryByRelativePath.set(relativeDirectory.replaceAll(Path.sep, "/"), resolvedProjectDirectory);
77412
+ }
77413
+ const sourceFiles = await listSourceFilesWithSizeCooperative(resolvedRootDirectory, signal);
77414
+ for (const sourceFile of sourceFiles) {
77415
+ let relativeDirectory = Path.posix.dirname(sourceFile.path);
77416
+ while (true) {
77417
+ const normalizedRelativeDirectory = relativeDirectory === "." ? "" : relativeDirectory;
77418
+ const projectDirectory = projectDirectoryByRelativePath.get(normalizedRelativeDirectory);
77419
+ if (projectDirectory !== void 0) {
77420
+ const projectRelativePath = Path.posix.relative(normalizedRelativeDirectory, sourceFile.path);
77421
+ const projectSourceFiles = sourceFilesByDirectory.get(projectDirectory);
77422
+ if (projectSourceFiles === void 0) break;
77423
+ projectSourceFiles.push({
77424
+ path: projectRelativePath,
77425
+ sizeBytes: sourceFile.sizeBytes
77426
+ });
77427
+ break;
77428
+ }
77429
+ if (relativeDirectory === ".") break;
77430
+ relativeDirectory = Path.posix.dirname(relativeDirectory);
77431
+ }
77432
+ }
77433
+ return sourceFilesByDirectory;
77434
+ };
77378
77435
  const createLintPhaseAbortError = () => new ReactDoctorError({ reason: new OxlintSpawnFailed({ cause: "lint phase aborted" }) });
77379
77436
  const createOxlintSpawnSlots = (concurrency) => createWorkerSlots({
77380
77437
  slotCount: resolveScanConcurrency(concurrency),
@@ -77462,6 +77519,60 @@ const mergeReactDoctorConfigs = (baseConfig, overrideConfig) => {
77462
77519
  };
77463
77520
  //#endregion
77464
77521
  //#region ../api/dist/index.js
77522
+ const resolveProjectGroupRoot = (projectDirectory) => {
77523
+ try {
77524
+ return isMonorepoRoot(projectDirectory) ? projectDirectory : findMonorepoRoot(projectDirectory);
77525
+ } catch {
77526
+ return null;
77527
+ }
77528
+ };
77529
+ const containsNestedProjectDirectories = (projectDirectories) => projectDirectories.some((projectDirectory, projectIndex) => projectDirectories.some((candidateDirectory, candidateIndex) => candidateIndex !== projectIndex && isPathInsideDirectory(candidateDirectory, projectDirectory)));
77530
+ const resolveCommonAncestorDirectory = (projectDirectories) => {
77531
+ let commonDirectory = projectDirectories[0];
77532
+ for (const projectDirectory of projectDirectories.slice(1)) while (commonDirectory !== projectDirectory && !isPathInsideDirectory(projectDirectory, commonDirectory)) commonDirectory = Path.dirname(commonDirectory);
77533
+ return commonDirectory;
77534
+ };
77535
+ const collectGroupSourceFiles = async (projectDirectories) => {
77536
+ if (projectDirectories.length === 1 || containsNestedProjectDirectories(projectDirectories)) return /* @__PURE__ */ new Map();
77537
+ try {
77538
+ return await collectSourceFilesByDirectory(resolveCommonAncestorDirectory(projectDirectories), projectDirectories);
77539
+ } catch {
77540
+ return /* @__PURE__ */ new Map();
77541
+ }
77542
+ };
77543
+ const compareProjectPlanEntries = (leftEntry, rightEntry) => {
77544
+ const leftSourceFileCount = leftEntry.precomputedSourceFiles?.length;
77545
+ const rightSourceFileCount = rightEntry.precomputedSourceFiles?.length;
77546
+ if (leftSourceFileCount === rightSourceFileCount) return leftEntry.originalIndex - rightEntry.originalIndex;
77547
+ if (leftSourceFileCount === void 0) return 1;
77548
+ if (rightSourceFileCount === void 0) return -1;
77549
+ return rightSourceFileCount - leftSourceFileCount;
77550
+ };
77551
+ const buildDiagnoseProjectPlan = async (projects) => {
77552
+ const projectDirectoriesByRootDirectory = /* @__PURE__ */ new Map();
77553
+ for (const project of projects) {
77554
+ const projectDirectory = Path.resolve(project.directory);
77555
+ const rootDirectory = resolveProjectGroupRoot(projectDirectory);
77556
+ if (rootDirectory === null) continue;
77557
+ const projectDirectories = projectDirectoriesByRootDirectory.get(rootDirectory);
77558
+ if (projectDirectories === void 0) projectDirectoriesByRootDirectory.set(rootDirectory, [projectDirectory]);
77559
+ else projectDirectories.push(projectDirectory);
77560
+ }
77561
+ const groupedSourceFiles = await Promise.all([...projectDirectoriesByRootDirectory.values()].map(collectGroupSourceFiles));
77562
+ const sourceFilesByDirectory = /* @__PURE__ */ new Map();
77563
+ for (const sourceFilesByProjectDirectory of groupedSourceFiles) for (const [projectDirectory, sourceFiles] of sourceFilesByProjectDirectory) {
77564
+ if (sourceFiles.length === 0) continue;
77565
+ sourceFilesByDirectory.set(projectDirectory, sourceFiles);
77566
+ }
77567
+ return projects.map((projectDefinition, originalIndex) => {
77568
+ const precomputedSourceFiles = sourceFilesByDirectory.get(Path.resolve(projectDefinition.directory));
77569
+ return {
77570
+ originalIndex,
77571
+ projectDefinition,
77572
+ ...precomputedSourceFiles === void 0 ? {} : { precomputedSourceFiles }
77573
+ };
77574
+ }).toSorted(compareProjectPlanEntries);
77575
+ };
77465
77576
  let didWarnAiTraining = false;
77466
77577
  const warnIfAiTrainingEnvironment = () => {
77467
77578
  if (didWarnAiTraining || detectAiTrainingEnvironment() === null) return;
@@ -77478,12 +77589,13 @@ const buildDiagnoseLayer = (input) => {
77478
77589
  });
77479
77590
  return mergeAll$1(Project.layerNode, configLayer, input.shouldRunDeadCode ? DeadCode.layerNode : DeadCode.layerOf([]), Files.layerNode, Git.layerNode, input.shouldRunLint ? Linter.layerOxlint : Linter.layerOf([]), LintPartialFailures.layerLive, succeed$3(OxlintConcurrency, input.oxlintConcurrency), succeed$3(OxlintSpawnSlots, input.oxlintSpawnSlots), Progress.layerNoop, Reporter.layerNoop, Score.layerHttp, input.config?.supplyChain?.enabled !== false ? SupplyChain.layerNode : SupplyChain.layerOf([]));
77480
77591
  };
77481
- const buildInspectProgram = (scanTarget, options, configOverride) => {
77592
+ const buildInspectProgram = (scanTarget, options, configOverride, precomputedSourceFiles) => {
77482
77593
  const effectiveConfig = configOverride ?? scanTarget.userConfig;
77483
77594
  const includePaths = options.includePaths ?? [];
77484
77595
  const shouldRunDeadCode = resolveShouldRunDeadCode(options, effectiveConfig);
77485
77596
  return runInspect({
77486
77597
  directory: scanTarget.resolvedDirectory,
77598
+ precomputedSourceFiles,
77487
77599
  includePaths,
77488
77600
  customRulesOnly: effectiveConfig?.customRulesOnly ?? false,
77489
77601
  respectInlineDisables: options.respectInlineDisables ?? effectiveConfig?.respectInlineDisables ?? true,
@@ -77539,7 +77651,7 @@ const findWorstScore = (projectResults) => {
77539
77651
  }
77540
77652
  return worstResult;
77541
77653
  };
77542
- const diagnoseProject = async (projectDefinition, baseOptions, batchConfig, oxlintConcurrency, oxlintSpawnSlots) => {
77654
+ const diagnoseProject = async (projectDefinition, baseOptions, batchConfig, oxlintConcurrency, oxlintSpawnSlots, precomputedSourceFiles) => {
77543
77655
  const startTime = globalThis.performance.now();
77544
77656
  try {
77545
77657
  const scanTarget = await resolveScanTarget(projectDefinition.directory);
@@ -77552,7 +77664,8 @@ const diagnoseProject = async (projectDefinition, baseOptions, batchConfig, oxli
77552
77664
  };
77553
77665
  const shouldRunLint = resolveShouldRunLint(mergedOptions, effectiveConfig);
77554
77666
  const shouldRunDeadCode = resolveShouldRunDeadCode(mergedOptions, effectiveConfig);
77555
- const program = buildInspectProgram(scanTarget, mergedOptions, effectiveConfig ?? void 0);
77667
+ const canReusePrecomputedSourceFiles = Path.resolve(projectDefinition.directory) === Path.resolve(scanTarget.resolvedDirectory);
77668
+ const program = buildInspectProgram(scanTarget, mergedOptions, effectiveConfig ?? void 0, canReusePrecomputedSourceFiles ? precomputedSourceFiles : void 0);
77556
77669
  const didOverridePlugins = batchConfig?.plugins !== void 0 || projectConfig?.plugins !== void 0;
77557
77670
  const layer = buildDiagnoseLayer(didOverrideConfig ? {
77558
77671
  config: effectiveConfig,
@@ -77590,7 +77703,10 @@ const diagnoseProjectBatch = async (input) => {
77590
77703
  const { projects, concurrency, config: batchConfig, ...baseOptions } = input;
77591
77704
  const oxlintConcurrency = runSync(OxlintConcurrency);
77592
77705
  const oxlintSpawnSlots = createOxlintSpawnSlots(oxlintConcurrency);
77593
- const projectResults = await mapWithConcurrency(projects, concurrency ?? 4, (projectDefinition) => diagnoseProject(projectDefinition, baseOptions, batchConfig, oxlintConcurrency, oxlintSpawnSlots));
77706
+ const projectResults = (await mapWithConcurrency(await buildDiagnoseProjectPlan(projects), concurrency ?? 4, async (projectPlanEntry) => ({
77707
+ originalIndex: projectPlanEntry.originalIndex,
77708
+ result: await diagnoseProject(projectPlanEntry.projectDefinition, baseOptions, batchConfig, oxlintConcurrency, oxlintSpawnSlots, projectPlanEntry.precomputedSourceFiles)
77709
+ }))).toSorted((leftProject, rightProject) => leftProject.originalIndex - rightProject.originalIndex).map((completedProject) => completedProject.result);
77594
77710
  const succeededProjects = projectResults.filter((projectResult) => projectResult.ok);
77595
77711
  return {
77596
77712
  projects: projectResults,
@@ -77635,4 +77751,4 @@ const toJsonReport = (result, options) => buildJsonReport({
77635
77751
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
77636
77752
 
77637
77753
  //# sourceMappingURL=index.js.map
77638
- //# debugId=f242ba00-ff72-511c-8c6f-3b9b01029d57
77754
+ //# debugId=5ed02ea3-f769-5273-a8b7-d6593605c860
@@ -1,17 +1,17 @@
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]="c10e3989-ba7b-535c-8f02-46fab9d4a049")}catch(e){}}();
3
- import { Cn as mapWithConcurrency, Dn as remainingDeadlineBudgetMs, En as messageFromUnknown, F as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, G as isCiOrCodingAgentEnvironment, Gt as discoverReactSubprojects, K as isCodingAgentEnvironment, Mn as resolveScanTarget, Nt as buildJsonReport, Ot as StagedFiles, P as STAGED_FILES_TEMP_DIR_PREFIX, Qt as getBaselineDiffPlan, R as CliInputError, Tt as STAGED_FILES_PROJECT_CONFIG_FILENAMES, V as isDebugFlagEnabled, Wt as detectAiTrainingEnvironment, Xn as gen, Y as CANONICAL_GITHUB_URL, Yt as findLegacyConfig, cn as highlighter, ct as Git, dr as provide, en as getChangedLineRanges, f as setJsonReportDirectory, g as VERSION, h as writeJsonReport, ir as runPromise, m as writeJsonErrorReport, mn as isPlainObject, n as recordDistribution, nn as getDiffInfo, on as hasReactRuntime, p as setJsonReportMode, pn as isPathInsideDirectory, t as recordCount, tr as provide$1, u as enableJsonMode, un as isErrnoException, w as METRIC, xn as listWorkspacePackages, zn as toRelativePath } from "./record-metric-CJxSHfJD.js";
4
- import { c as isExpectedUserError, s as shutdownTelemetry } from "./unref-stdin-Dc8ipkaw.js";
5
- import { i as flushSentry } from "./build-section-divider-sLcWe1hO.js";
6
- import { n as handleError, r as handleUserError, t as reportErrorToSentry } from "./report-error-CAEixMg1.js";
7
- import { F as runGitRaw, L as cliLogger, c as spinner, i as hasDoctorScript, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-Be7Mv3-l.js";
8
- import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-Dev2F6Ea.js";
9
- import { c as openWorkflowPullRequest, i as warnDeprecatedDiff, l as stageWorkflowFile, r as resolveScope, s as resolveBlockingLevel, t as finalizeScope, u as toForwardSlashes } from "./resolve-scope-DS7rcRRz.js";
10
- import { t as shouldSkipPrompts } from "./should-skip-prompts-C78r7Ww7.js";
11
- import { A as resolveMergeBaseRef, B as buildEmptyReportMessage, C as copyToClipboard, D as deduplicateProjectScans, E as collectProjectSourceFileCounts, F as printDiagnosticsDump, O as createInvocationInspect, R as filterDiagnosticsByCategories, S as CLI_AGENT_BINARIES, T as buildHandoffPayload, _ as resolveCliInspectOptions, a as projectManifestChanged, b as setUpGitHubActions, c as selectProjects, d as resolveProjectChangedLineRanges, f as resolveProjectDiffIncludePaths, g as resolveWorkspaceDeadCodeOwner, h as retryMissingProjectScores, i as validateModeFlags, j as printHeadlessReport, k as inspect, l as buildCodeFrame, m as resolveProjectRelativeDirectory, n as formatSkippedProjectsMessage, o as partitionProjectScanOutcomes, p as resolveProjectSourceFilePaths, r as validateIncludeUntrackedScope, t as shouldFailScanGate, u as resolveProjectScan, v as filterScansForSurface, w as launchCliAgent, x as detectLaunchableAgents, y as countUniqueScannedFiles } from "./should-fail-scan-gate-4jf7ZRdL.js";
12
- 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-C0jbKH8p.js";
13
- import { a as askUpgradeActionVersion, c as recordCiPromptDecision, i as installReactDoctorAgentHooks, l as hasHandledActionUpgrade, o as askAddToGitHubActions, r as findAgentsWithLegacyShellHooks, s as hasHandledCiPrompt, t as getSkillSourceDirectory, u as recordActionUpgradeDecision } from "./install-react-doctor-DIPVunY4.js";
14
- import { t as readObjectFile } from "./read-object-file-CEh1CqnD.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]="3259d4b7-6df9-57d7-9049-1830d16f0aa9")}catch(e){}}();
3
+ import { Cn as mapWithConcurrency, Dn as remainingDeadlineBudgetMs, En as messageFromUnknown, F as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, G as isCiOrCodingAgentEnvironment, Gt as discoverReactSubprojects, K as isCodingAgentEnvironment, Mn as resolveScanTarget, Nt as buildJsonReport, Ot as StagedFiles, P as STAGED_FILES_TEMP_DIR_PREFIX, Qt as getBaselineDiffPlan, R as CliInputError, Tt as STAGED_FILES_PROJECT_CONFIG_FILENAMES, V as isDebugFlagEnabled, Wt as detectAiTrainingEnvironment, Xn as gen, Y as CANONICAL_GITHUB_URL, Yt as findLegacyConfig, cn as highlighter, ct as Git, dr as provide, en as getChangedLineRanges, f as setJsonReportDirectory, g as VERSION, h as writeJsonReport, ir as runPromise, m as writeJsonErrorReport, mn as isPlainObject, n as recordDistribution, nn as getDiffInfo, on as hasSupportedFrameworkOrLibrary, p as setJsonReportMode, pn as isPathInsideDirectory, t as recordCount, tr as provide$1, u as enableJsonMode, un as isErrnoException, w as METRIC, xn as listWorkspacePackages, zn as toRelativePath } from "./record-metric-CMe2d1Xv.js";
4
+ import { c as isExpectedUserError, s as shutdownTelemetry } from "./unref-stdin-Cxhw67r6.js";
5
+ import { i as flushSentry } from "./build-section-divider-Vz879zXD.js";
6
+ import { n as handleError, r as handleUserError, t as reportErrorToSentry } from "./report-error-1l7v6_dE.js";
7
+ import { F as runGitRaw, L as cliLogger, c as spinner, i as hasDoctorScript, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-D58Hr1dM.js";
8
+ import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-DkMicv8E.js";
9
+ import { c as openWorkflowPullRequest, i as warnDeprecatedDiff, l as stageWorkflowFile, r as resolveScope, s as resolveBlockingLevel, t as finalizeScope, u as toForwardSlashes } from "./resolve-scope-CMNrOdDf.js";
10
+ import { t as shouldSkipPrompts } from "./should-skip-prompts-mXKZBNCz.js";
11
+ import { A as resolveMergeBaseRef, B as buildEmptyReportMessage, C as copyToClipboard, D as deduplicateProjectScans, E as collectProjectSourceFileCounts, F as printDiagnosticsDump, O as createInvocationInspect, R as filterDiagnosticsByCategories, S as CLI_AGENT_BINARIES, T as buildHandoffPayload, _ as resolveCliInspectOptions, a as projectManifestChanged, b as setUpGitHubActions, c as selectProjects, d as resolveProjectChangedLineRanges, f as resolveProjectDiffIncludePaths, g as resolveWorkspaceDeadCodeOwner, h as retryMissingProjectScores, i as validateModeFlags, j as printHeadlessReport, k as inspect, l as buildCodeFrame, m as resolveProjectRelativeDirectory, n as formatSkippedProjectsMessage, o as partitionProjectScanOutcomes, p as resolveProjectSourceFilePaths, r as validateIncludeUntrackedScope, t as shouldFailScanGate, u as resolveProjectScan, v as filterScansForSurface, w as launchCliAgent, x as detectLaunchableAgents, y as countUniqueScannedFiles } from "./should-fail-scan-gate-lMTlhEhE.js";
12
+ 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-EagkH_v9.js";
13
+ import { a as askUpgradeActionVersion, c as recordCiPromptDecision, i as installReactDoctorAgentHooks, l as hasHandledActionUpgrade, o as askAddToGitHubActions, r as findAgentsWithLegacyShellHooks, s as hasHandledCiPrompt, t as getSkillSourceDirectory, u as recordActionUpgradeDecision } from "./install-react-doctor-CjgE52al.js";
14
+ import { t as readObjectFile } from "./read-object-file-OFRlvCAL.js";
15
15
  import * as path$1 from "node:path";
16
16
  import * as fs$1 from "node:fs";
17
17
  import { tmpdir } from "node:os";
@@ -659,7 +659,7 @@ const parseStagedSnapshotDivergences = (statusOutput) => {
659
659
  const hasRenameOrCopySource = indexStatus === "R" || indexStatus === "C" || worktreeStatus === "R" || worktreeStatus === "C";
660
660
  const sourcePath = hasRenameOrCopySource ? statusEntries[entryIndex + 1] : void 0;
661
661
  const worktreePaths = worktreeStatus === "R" || worktreeStatus === "C" ? [filePath, sourcePath] : [filePath];
662
- if (worktreeStatus !== " ") {
662
+ if (worktreeStatus !== " " && worktreeStatus !== "!") {
663
663
  for (const worktreePath of worktreePaths) if (worktreePath && SNAPSHOT_CONFIG_FILENAMES.has(path$1.basename(worktreePath))) divergentConfigFiles.add(worktreePath);
664
664
  }
665
665
  if (hasRenameOrCopySource) entryIndex += 1;
@@ -701,7 +701,7 @@ const buildFinalCliScanOutcome = (input) => {
701
701
  baselineDegraded,
702
702
  mode: baselineDegraded ? "diff" : input.mode,
703
703
  scansForJsonReport: filterCompletedScansByCategories(input.completedScans, input.categoryFilters),
704
- shouldWarnNoReactDetected: input.completedScans.length > 0 && !input.completedScans.some((scan) => hasReactRuntime(scan.result.project))
704
+ shouldWarnNoSupportedLibraryDetected: input.completedScans.length > 0 && !input.completedScans.some((scan) => hasSupportedFrameworkOrLibrary(scan.result.project))
705
705
  };
706
706
  };
707
707
  //#endregion
@@ -723,9 +723,9 @@ const finalizeCliScans = (input) => {
723
723
  baselineIntended: input.baselineIntended,
724
724
  categoryFilters: input.categoryFilters
725
725
  });
726
- if (outcome.shouldWarnNoReactDetected) {
726
+ if (outcome.shouldWarnNoSupportedLibraryDetected) {
727
727
  recordCount(METRIC.scanNoReactDetected, 1);
728
- cliLogger.warn(`No React project detected at ${input.resolvedDirectory} — React rules were gated off; this is not the same as a clean scan.`);
728
+ cliLogger.warn(`No supported framework or library detected at ${input.resolvedDirectory} — library-specific rules were gated off; framework-neutral rules still ran.`);
729
729
  }
730
730
  if (input.isJsonMode) writeJsonReport(buildJsonReport({
731
731
  version: VERSION,
@@ -1439,5 +1439,5 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
1439
1439
  //#endregion
1440
1440
  export { warnDeprecatedFailOn as n, runProjectMigrations as r, inspectAction as t };
1441
1441
 
1442
- //# sourceMappingURL=inspect-D6y8oLtg.js.map
1443
- //# debugId=c10e3989-ba7b-535c-8f02-46fab9d4a049
1442
+ //# sourceMappingURL=inspect-kkvDHKDE.js.map
1443
+ //# debugId=3259d4b7-6df9-57d7-9049-1830d16f0aa9
@@ -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]="c9425d19-0407-5c8a-b1e2-c32c21f4df65")}catch(e){}}();
3
- import { ar as runSync, t as recordCount, w as METRIC } from "./record-metric-CJxSHfJD.js";
4
- import { c as isExpectedUserError } from "./unref-stdin-Dc8ipkaw.js";
5
- import { n as handleError, r as handleUserError, t as reportErrorToSentry } from "./report-error-CAEixMg1.js";
6
- import { t as printBrandedHeader } from "./print-branded-header-D5jLdo4p.js";
7
- import { n as runInstallReactDoctor } from "./install-react-doctor-DIPVunY4.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]="cceac041-5132-5523-a133-402c9b9f211b")}catch(e){}}();
3
+ import { ar as runSync, t as recordCount, w as METRIC } from "./record-metric-CMe2d1Xv.js";
4
+ import { c as isExpectedUserError } from "./unref-stdin-Cxhw67r6.js";
5
+ import { n as handleError, r as handleUserError, t as reportErrorToSentry } from "./report-error-1l7v6_dE.js";
6
+ import { t as printBrandedHeader } from "./print-branded-header-D4QYSu-h.js";
7
+ import { n as runInstallReactDoctor } from "./install-react-doctor-CjgE52al.js";
8
8
  //#region src/cli/commands/install.ts
9
9
  const installAction = async (options, command) => {
10
10
  recordCount(METRIC.cliInvoked, 1, { command: "install" });
@@ -28,5 +28,5 @@ const installAction = async (options, command) => {
28
28
  //#endregion
29
29
  export { installAction };
30
30
 
31
- //# sourceMappingURL=install-afMFGeTB.js.map
32
- //# debugId=c9425d19-0407-5c8a-b1e2-c32c21f4df65
31
+ //# sourceMappingURL=install-ZeYvD9Rw.js.map
32
+ //# debugId=cceac041-5132-5523-a133-402c9b9f211b
@@ -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]="fb0af4fe-a689-59b6-9176-764a13e051a3")}catch(e){}}();
3
- import { Gn as log, Kn as warn, O as RUN_GIT_MAX_BUFFER_BYTES, Un as error$1, Wn as info$1, ar as runSync, cn as highlighter, z as isNonInteractiveEnvironment } from "./record-metric-CJxSHfJD.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]="0b4b3409-1e66-5ed3-8857-c1a29dd03460")}catch(e){}}();
3
+ import { Gn as log, Kn as warn, O as RUN_GIT_MAX_BUFFER_BYTES, Un as error$1, Wn as info$1, ar as runSync, cn as highlighter, z as isNonInteractiveEnvironment } from "./record-metric-CMe2d1Xv.js";
4
4
  import { execFileSync } from "node:child_process";
5
5
  import * as path$1 from "node:path";
6
6
  import * as fs$1 from "node:fs";
@@ -3247,5 +3247,5 @@ const installReactDoctorScriptStep = (projectRoot) => {
3247
3247
  //#endregion
3248
3248
  export { packageHasNestedRecordKey as A, SIMPLE_GIT_HOOKS_CONFIG_FILE as C, getPackageJsonPath as D, ensureTrailingNewline as E, runGitRaw as F, writeJsonFile as I, cliLogger as L, readPackageJson as M, resolveGitPath as N, isRecord as O, runGit as P, REACT_DOCTOR_COMMAND as S, VITE_PLUS_HOOKS_PATH as T, LEFTHOOK_CONFIG_FILES as _, installReactDoctorScriptStep as a, OVERCOMMIT_CONFIG_FILE as b, spinner as c, stripAnsi as d, isUnicodeSupported as f, HUSKY_HOOKS_PATH as g, HOOK_RELATIVE_PATH as h, hasDoctorScript as i, packageHasRecordKey as j, packageHasDependency as k, isFullWidth as l, HOOK_FILE_NAME as m, findNearestPackageDirectory as n, isSpinnerSilent as o, chalk as p, hasDoctorDependency as r, setSpinnerSilent as s, DOCTOR_PACKAGE_NAME as t, isWide as u, LEGACY_HOOK_RUNNER_RELATIVE_PATH as v, SIMPLE_GIT_HOOKS_PACKAGE_JSON_KEY as w, PRE_COMMIT_CONFIG_FILE as x, NON_BLOCKING_REACT_DOCTOR_COMMAND as y };
3249
3249
 
3250
- //# sourceMappingURL=install-doctor-script-Be7Mv3-l.js.map
3251
- //# debugId=fb0af4fe-a689-59b6-9176-764a13e051a3
3250
+ //# sourceMappingURL=install-doctor-script-D58Hr1dM.js.map
3251
+ //# debugId=0b4b3409-1e66-5ed3-8857-c1a29dd03460
@@ -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]="4ded460a-121d-52f4-a9ed-5175abfd702f")}catch(e){}}();
3
- import { C as GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS } from "./record-metric-CJxSHfJD.js";
4
- import { t as unrefStdin } from "./unref-stdin-Dc8ipkaw.js";
5
- import { L as cliLogger } from "./install-doctor-script-Be7Mv3-l.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]="12e99d86-5499-52ca-9af6-8508b4a3b397")}catch(e){}}();
3
+ import { C as GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS } from "./record-metric-CMe2d1Xv.js";
4
+ import { t as unrefStdin } from "./unref-stdin-Cxhw67r6.js";
5
+ import { L as cliLogger } from "./install-doctor-script-D58Hr1dM.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";
@@ -263,5 +263,5 @@ const upgradeReactDoctorWorkflowInPlace = (projectRoot) => {
263
263
  //#endregion
264
264
  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
265
 
266
- //# sourceMappingURL=install-github-workflow-Dev2F6Ea.js.map
267
- //# debugId=4ded460a-121d-52f4-a9ed-5175abfd702f
266
+ //# sourceMappingURL=install-github-workflow-DkMicv8E.js.map
267
+ //# debugId=12e99d86-5499-52ca-9af6-8508b4a3b397
@@ -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]="e59d018b-df6e-5572-a363-cad2d16cc6a4")}catch(e){}}();
3
- import { R as CliInputError, S as CI_TRUST_COMPANIES, cn as highlighter, ot as GITHUB_ACTIONS_SETUP_URL, t as recordCount, un as isErrnoException, w as METRIC, wt as SKILL_NAME } from "./record-metric-CJxSHfJD.js";
4
- import { A as packageHasNestedRecordKey, D as getPackageJsonPath, E as ensureTrailingNewline, I as writeJsonFile, L as cliLogger, M as readPackageJson, N as resolveGitPath, O as isRecord, P as runGit, S as REACT_DOCTOR_COMMAND, T as VITE_PLUS_HOOKS_PATH, _ as LEFTHOOK_CONFIG_FILES, a as installReactDoctorScriptStep, b as OVERCOMMIT_CONFIG_FILE, c as spinner, g as HUSKY_HOOKS_PATH, h as HOOK_RELATIVE_PATH, j as packageHasRecordKey, k as packageHasDependency, m as HOOK_FILE_NAME, n as findNearestPackageDirectory, r as hasDoctorDependency, t as DOCTOR_PACKAGE_NAME, v as LEGACY_HOOK_RUNNER_RELATIVE_PATH, x as PRE_COMMIT_CONFIG_FILE, y as NON_BLOCKING_REACT_DOCTOR_COMMAND } from "./install-doctor-script-Be7Mv3-l.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-Dev2F6Ea.js";
6
- import { t as shouldSkipPrompts } from "./should-skip-prompts-C78r7Ww7.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-C0jbKH8p.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]="a65b0f9a-a22d-5b9c-8cf5-d488d02e2d39")}catch(e){}}();
3
+ import { R as CliInputError, S as CI_TRUST_COMPANIES, cn as highlighter, ot as GITHUB_ACTIONS_SETUP_URL, t as recordCount, un as isErrnoException, w as METRIC, wt as SKILL_NAME } from "./record-metric-CMe2d1Xv.js";
4
+ import { A as packageHasNestedRecordKey, D as getPackageJsonPath, E as ensureTrailingNewline, I as writeJsonFile, L as cliLogger, M as readPackageJson, N as resolveGitPath, O as isRecord, P as runGit, S as REACT_DOCTOR_COMMAND, T as VITE_PLUS_HOOKS_PATH, _ as LEFTHOOK_CONFIG_FILES, a as installReactDoctorScriptStep, b as OVERCOMMIT_CONFIG_FILE, c as spinner, g as HUSKY_HOOKS_PATH, h as HOOK_RELATIVE_PATH, j as packageHasRecordKey, k as packageHasDependency, m as HOOK_FILE_NAME, n as findNearestPackageDirectory, r as hasDoctorDependency, t as DOCTOR_PACKAGE_NAME, v as LEGACY_HOOK_RUNNER_RELATIVE_PATH, x as PRE_COMMIT_CONFIG_FILE, y as NON_BLOCKING_REACT_DOCTOR_COMMAND } from "./install-doctor-script-D58Hr1dM.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-DkMicv8E.js";
6
+ import { t as shouldSkipPrompts } from "./should-skip-prompts-mXKZBNCz.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-EagkH_v9.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";
@@ -1150,5 +1150,5 @@ const runInstallReactDoctor = async (options = {}) => {
1150
1150
  //#endregion
1151
1151
  export { askUpgradeActionVersion as a, recordCiPromptDecision as c, installReactDoctorAgentHooks as i, hasHandledActionUpgrade as l, runInstallReactDoctor as n, askAddToGitHubActions as o, findAgentsWithLegacyShellHooks as r, hasHandledCiPrompt as s, getSkillSourceDirectory as t, recordActionUpgradeDecision as u };
1152
1152
 
1153
- //# sourceMappingURL=install-react-doctor-DIPVunY4.js.map
1154
- //# debugId=e59d018b-df6e-5572-a363-cad2d16cc6a4
1153
+ //# sourceMappingURL=install-react-doctor-CjgE52al.js.map
1154
+ //# debugId=a65b0f9a-a22d-5b9c-8cf5-d488d02e2d39