react-doctor 0.9.12-dev.0b670aa → 0.9.12-dev.1971506

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 (43) hide show
  1. package/README.md +27 -0
  2. package/dist/active-run-trace-dlIZeEvb.js +18 -0
  3. package/dist/active-scan-abort-registry-DwG6tSPy.js +28 -0
  4. package/dist/{build-section-divider-CJ7k-BvF.js → build-section-divider-dzVqU6Fr.js} +8 -22
  5. package/dist/{ci-Dannv-cF.js → ci-tO6eKsPx.js} +12 -11
  6. package/dist/cli.js +76 -24
  7. package/dist/{design-9x5DReyL.js → design-BOr8ASzl.js} +4 -4
  8. package/dist/{devtools-D8NTVj81.js → devtools-BiC-AP3B.js} +3 -3
  9. package/dist/{exit-gracefully-ti2wONpM.js → exit-gracefully-B4JO2DSi.js} +15 -9
  10. package/dist/get-east-asian-width-Cglw13G7.js +444 -0
  11. package/dist/{report-error-BlOAg03W.js → handle-error-JVQU0Pxy.js} +6 -61
  12. package/dist/index.d.ts +2 -2
  13. package/dist/index.js +61 -43
  14. package/dist/{inspect-C3itFiEW.js → inspect-CBkHe9dS.js} +17 -16
  15. package/dist/{install-CjIJL6S5.js → install-DG3MH36X.js} +9 -8
  16. package/dist/{install-doctor-script-0sdZ4SY8.js → install-doctor-script-DaB6kssK.js} +6 -441
  17. package/dist/{install-github-workflow-DQ8_lhAW.js → install-github-workflow-CHs4pPvZ.js} +6 -6
  18. package/dist/{install-react-doctor-DRG8hdL4.js → install-react-doctor-D4Z6xm2T.js} +8 -8
  19. package/dist/{run-scan-app-Cgn4ELJF.js → jsx-runtime-5ph9KX7N.js} +280 -2769
  20. package/dist/{print-branded-header-Dc1KdrcV.js → print-branded-header-BRA02Uik.js} +4 -4
  21. package/dist/prompt-runtime-scan-url-1IvWhRJ0.js +240 -0
  22. package/dist/{read-object-file-rblJxHxN.js → read-object-file-CacQMaGw.js} +4 -4
  23. package/dist/{record-metric-Dgg2b2LG.js → record-metric-DcBAbVVs.js} +115 -76
  24. package/dist/report-error-Cj58fOLO.js +64 -0
  25. package/dist/{report-workflow-result-Dp4dCUxw.js → report-workflow-result-DadOSgvV.js} +5 -5
  26. package/dist/{resolve-scope-CbeXgE9z.js → resolve-scope-pqK2skSv.js} +6 -6
  27. package/dist/{rules-ClDrNCc3.js → rules-IBWoSmK_.js} +6 -6
  28. package/dist/run-scan-app-JphzszIp.js +2508 -0
  29. package/dist/runtime-scan/browser-probe.iife.js +855 -0
  30. package/dist/runtime-scan-BSMwOS9F.js +770 -0
  31. package/dist/sanitize-runtime-url-BN8oyAb7.js +76 -0
  32. package/dist/{scan-Caa_ogFB.js → scan-1Hakw1J4.js} +10 -22
  33. package/dist/{should-fail-scan-gate-BGzNJApW.js → should-fail-scan-gate-CwBjVudY.js} +23 -114
  34. package/dist/{should-skip-prompts-Bbl0ToUI.js → should-skip-prompts-CtQ-6r7T.js} +4 -4
  35. package/dist/should-use-tui-BLBNwhU6.js +25 -0
  36. package/dist/skills/performance/SKILL.md +113 -0
  37. package/dist/skills/react-doctor/SKILL.md +6 -0
  38. package/dist/{unref-stdin-C7d7_3va.js → telemetry-runtime-BxsPVkMH.js} +5 -23
  39. package/dist/unref-stdin-BKT_s38a.js +12 -0
  40. package/dist/{version-Bjql-CLM.js → version-5WSKTaCF.js} +4 -4
  41. package/dist/{why-BqG2EML8.js → why-DHTN2DPT.js} +4 -4
  42. package/dist/with-run-span-Kn-I23fJ.js +110 -0
  43. package/package.json +8 -6
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]="a17c28bc-da40-5fec-8489-037e933cd8c3")}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]="3404885b-ce22-59ed-b773-5398b6af4974")}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 * as path$1$1 from "node:path";
@@ -64290,7 +64290,7 @@ var ProjectNotFoundError = class extends Error {
64290
64290
  kind;
64291
64291
  constructor(directory, options) {
64292
64292
  const kind = options?.kind ?? "no-project";
64293
- super(kind === "missing-path" ? `Scan target "${directory}" does not exist. Check the path and try again.` : `No React project found in ${directory}. Expected a package.json at the directory root or a nested package.json with a React dependency.`, options);
64293
+ super(kind === "missing-path" ? `Scan target "${directory}" does not exist. Check the path and try again.` : `No React or Three.js project found in ${directory}. Expected a package.json at the directory root or a nested package.json with a React or Three.js dependency.`, options);
64294
64294
  this.directory = directory;
64295
64295
  this.kind = kind;
64296
64296
  }
@@ -64324,7 +64324,7 @@ var AmbiguousProjectError = class extends Error {
64324
64324
  directory;
64325
64325
  candidates;
64326
64326
  constructor(directory, candidates, options) {
64327
- super(`Multiple React projects found under ${directory} (${candidates.length} candidates): ${candidates.join(", ")}. Re-run diagnose() with one of those subdirectories, or iterate them yourself.`, options);
64327
+ super(`Multiple React or Three.js projects found under ${directory} (${candidates.length} candidates): ${candidates.join(", ")}. Re-run diagnose() with one of those subdirectories, or iterate them yourself.`, options);
64328
64328
  this.directory = directory;
64329
64329
  this.candidates = candidates;
64330
64330
  }
@@ -65670,9 +65670,11 @@ const FRAMEWORK_PACKAGES = {
65670
65670
  "@remix-run/react": "remix",
65671
65671
  gatsby: "gatsby",
65672
65672
  astro: "astro",
65673
+ "@astrojs/react": "astro",
65673
65674
  vite: "vite",
65674
65675
  "react-scripts": "cra",
65675
65676
  expo: "expo",
65677
+ "expo-router": "expo",
65676
65678
  "react-native": "react-native"
65677
65679
  };
65678
65680
  const detectFramework = (dependencies) => {
@@ -66164,20 +66166,39 @@ const getDependencyDeclaration = ({ packageJson, packageName, sections }) => {
66164
66166
  version: null
66165
66167
  };
66166
66168
  };
66167
- const REACT_DEPENDENCY_NAMES = new Set([
66169
+ const REACT_PROJECT_DEPENDENCY_NAMES = new Set([
66168
66170
  "react",
66171
+ "react-dom",
66169
66172
  "react-native",
66170
66173
  "next",
66171
- "preact"
66174
+ "preact",
66175
+ "expo",
66176
+ "expo-router",
66177
+ "gatsby",
66178
+ "@remix-run/react",
66179
+ "@tanstack/react-start",
66180
+ "react-scripts",
66181
+ "@astrojs/react"
66172
66182
  ]);
66183
+ const REACT_THREE_FIBER_DEPENDENCY_NAMES = ["@react-three/fiber", "react-three-fiber"];
66184
+ const REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES = [
66185
+ ...REACT_THREE_FIBER_DEPENDENCY_NAMES,
66186
+ "@react-three/drei",
66187
+ "@react-three/rapier",
66188
+ "@react-three/postprocessing",
66189
+ "@react-three/xr",
66190
+ "@react-three/cannon"
66191
+ ];
66192
+ const THREE_DEPENDENCY_NAMES = ["three", ...REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES];
66173
66193
  const hasReactDependency = (packageJson) => {
66174
66194
  const allDependencies = {
66175
66195
  ...packageJson.peerDependencies,
66176
66196
  ...packageJson.dependencies,
66177
66197
  ...packageJson.devDependencies
66178
66198
  };
66179
- return Object.keys(allDependencies).some((packageName) => REACT_DEPENDENCY_NAMES.has(packageName));
66199
+ return Object.keys(allDependencies).some((packageName) => REACT_PROJECT_DEPENDENCY_NAMES.has(packageName));
66180
66200
  };
66201
+ const hasSupportedProjectDependency = (packageJson) => hasReactDependency(packageJson) || getDependencySpec(packageJson, "remotion") !== null || THREE_DEPENDENCY_NAMES.some((packageName) => getDependencySpec(packageJson, packageName) !== null);
66181
66202
  const getPreactVersion = (packageJson) => getDependencySpec(packageJson, "preact");
66182
66203
  const resolveCatalogBackedDependencyVersion = ({ rootDirectory, rootPackageJson, packageName, sourceDirectory = rootDirectory, sourcePackageJson = rootPackageJson, version }) => {
66183
66204
  if (version === null || !isCatalogReference(version)) return version;
@@ -66368,7 +66389,7 @@ const listWorkspacePackages = (rootDirectory) => {
66368
66389
  seenDirectories.add(workspacePackage.directory);
66369
66390
  packages.push(workspacePackage);
66370
66391
  };
66371
- if (hasReactDependency(packageJson)) pushIfNew({
66392
+ if (hasSupportedProjectDependency(packageJson)) pushIfNew({
66372
66393
  name: packageJson.name ?? path$1$1.basename(rootDirectory),
66373
66394
  directory: rootDirectory
66374
66395
  });
@@ -66376,7 +66397,7 @@ const listWorkspacePackages = (rootDirectory) => {
66376
66397
  const directories = resolveWorkspaceDirectories(rootDirectory, pattern);
66377
66398
  for (const workspaceDirectory of directories) {
66378
66399
  const workspacePackageJson = readPackageJson(path$1$1.join(workspaceDirectory, "package.json"));
66379
- if (!hasReactDependency(workspacePackageJson)) continue;
66400
+ if (!hasSupportedProjectDependency(workspacePackageJson)) continue;
66380
66401
  pushIfNew({
66381
66402
  name: workspacePackageJson.name ?? path$1$1.basename(workspaceDirectory),
66382
66403
  directory: workspaceDirectory
@@ -66443,7 +66464,6 @@ const MOBX_REACT_PACKAGE_NAME = "mobx-react";
66443
66464
  const MOBX_REACT_LITE_PACKAGE_NAME = "mobx-react-lite";
66444
66465
  const MOBX_STATE_TREE_PACKAGE_NAME = "mobx-state-tree";
66445
66466
  const MOBX_REACT_OBSERVER_PACKAGE_NAME = "mobx-react-observer";
66446
- const REACT_THREE_FIBER_DEPENDENCY_NAMES = ["@react-three/fiber", "react-three-fiber"];
66447
66467
  const REACT_THREE_FIBER_SECTIONS = [
66448
66468
  "dependencies",
66449
66469
  "peerDependencies",
@@ -66456,8 +66476,6 @@ const THREE_DEPENDENCY_SECTIONS = [
66456
66476
  "optionalDependencies",
66457
66477
  "devDependencies"
66458
66478
  ];
66459
- const REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES = [...REACT_THREE_FIBER_DEPENDENCY_NAMES, "@react-three/drei"];
66460
- const THREE_DEPENDENCY_NAMES = [...REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES, "three"];
66461
66479
  const REACT_ROUTER_DEPENDENCY_NAMES = [
66462
66480
  "@react-router/dev",
66463
66481
  "react-router-dom",
@@ -66961,13 +66979,13 @@ const detectTargetBlankOpenerProtection = (directory, packageJson) => {
66961
66979
  if (browserslistRequirement === "noreferrer" || electronRequirement === "noreferrer") return "noreferrer";
66962
66980
  if (browserslistRequirement === "noopener" || electronRequirement === "noopener") return "noopener";
66963
66981
  };
66964
- const toReactWorkspacePackages = (directories) => {
66982
+ const toSupportedWorkspacePackages = (directories) => {
66965
66983
  const packages = [];
66966
66984
  for (const directory of directories) {
66967
66985
  const packageJsonPath = path$1$1.join(directory, "package.json");
66968
66986
  if (!isFile(packageJsonPath)) continue;
66969
66987
  const packageJson = readPackageJson(packageJsonPath);
66970
- if (!hasReactDependency(packageJson)) continue;
66988
+ if (!hasSupportedProjectDependency(packageJson)) continue;
66971
66989
  const name = packageJson.name ?? path$1$1.basename(directory);
66972
66990
  packages.push({
66973
66991
  name,
@@ -66980,7 +66998,7 @@ const listManifestWorkspacePackages = (rootDirectory) => {
66980
66998
  if (isFile(path$1$1.join(rootDirectory, "package.json"))) return listWorkspacePackages(rootDirectory);
66981
66999
  const patterns = parsePnpmWorkspacePatterns(rootDirectory);
66982
67000
  const nxPatterns = patterns.length > 0 ? [] : getNxWorkspaceDirectories(rootDirectory);
66983
- return toReactWorkspacePackages((patterns.length > 0 ? patterns : nxPatterns).flatMap((pattern) => resolveWorkspaceDirectories(rootDirectory, pattern)));
67001
+ return toSupportedWorkspacePackages((patterns.length > 0 ? patterns : nxPatterns).flatMap((pattern) => resolveWorkspaceDirectories(rootDirectory, pattern)));
66984
67002
  };
66985
67003
  const NON_PROJECT_DIRECTORIES = new Set([
66986
67004
  "AppData",
@@ -66988,7 +67006,7 @@ const NON_PROJECT_DIRECTORIES = new Set([
66988
67006
  "Library"
66989
67007
  ]);
66990
67008
  const MAX_SCAN_DEPTH = 6;
66991
- const discoverReactSubprojectsByFilesystem = (rootDirectory) => {
67009
+ const discoverSupportedSubprojectsByFilesystem = (rootDirectory) => {
66992
67010
  const packages = [];
66993
67011
  const pendingDirectories = [{
66994
67012
  directory: rootDirectory,
@@ -67001,7 +67019,7 @@ const discoverReactSubprojectsByFilesystem = (rootDirectory) => {
67001
67019
  const packageJsonPath = path$1$1.join(currentDirectory, "package.json");
67002
67020
  if (isFile(packageJsonPath)) {
67003
67021
  const packageJson = readPackageJson(packageJsonPath);
67004
- if (hasReactDependency(packageJson)) {
67022
+ if (hasSupportedProjectDependency(packageJson)) {
67005
67023
  const name = packageJson.name ?? path$1$1.basename(currentDirectory);
67006
67024
  packages.push({
67007
67025
  name,
@@ -67021,11 +67039,11 @@ const discoverReactSubprojectsByFilesystem = (rootDirectory) => {
67021
67039
  }
67022
67040
  return packages;
67023
67041
  };
67024
- const discoverReactSubprojects = (rootDirectory) => {
67042
+ const discoverSupportedSubprojects = (rootDirectory) => {
67025
67043
  if (!isDirectory(rootDirectory)) return [];
67026
67044
  const manifestPackages = listManifestWorkspacePackages(rootDirectory);
67027
67045
  if (manifestPackages.length > 0) return manifestPackages;
67028
- return discoverReactSubprojectsByFilesystem(rootDirectory);
67046
+ return discoverSupportedSubprojectsByFilesystem(rootDirectory);
67029
67047
  };
67030
67048
  const cachedProjectInfos = /* @__PURE__ */ new Map();
67031
67049
  const clearProjectCache = () => {
@@ -67300,16 +67318,31 @@ const discoverProject = (directory, options = {}) => {
67300
67318
  cachedProjectInfos.set(directory, projectInfo);
67301
67319
  return projectInfo;
67302
67320
  };
67321
+ const REACT_COMPATIBLE_FRAMEWORKS = new Set([
67322
+ "nextjs",
67323
+ "tanstack-start",
67324
+ "cra",
67325
+ "remix",
67326
+ "gatsby",
67327
+ "expo",
67328
+ "react-native",
67329
+ "preact"
67330
+ ]);
67303
67331
  /**
67304
- * A project is worth scanning when it has React/Preact (the framework-
67332
+ * Whether project discovery resolved a React-compatible runtime directly or
67333
+ * through a framework whose runtime is necessarily React-compatible.
67334
+ */
67335
+ const hasReactRuntime = (project) => project.reactVersion !== null || project.preactVersion !== null || REACT_COMPATIBLE_FRAMEWORKS.has(project.framework);
67336
+ /**
67337
+ * A project is worth scanning when it has a supported runtime (the runtime-
67305
67338
  * specific rules apply) OR it simply has source files to lint. The
67306
67339
  * second arm is what lets a plain TypeScript/JavaScript codebase — no
67307
67340
  * React dependency at all — run the framework-agnostic rules
67308
67341
  * (security, architecture, zod, bundle-size, …) instead of hard-failing
67309
- * with "No React dependency". Only a directory with neither React nor a
67310
- * single source file has nothing to analyze.
67342
+ * with "No React dependency". Only a directory with neither a supported
67343
+ * runtime nor a single source file has nothing to analyze.
67311
67344
  */
67312
- const isAnalyzableProject = (project) => project.reactVersion !== null || project.preactVersion !== null || project.sourceFileCount > 0;
67345
+ const isAnalyzableProject = (project) => hasReactRuntime(project) || project.hasThree === true || project.hasRemotion === true || project.sourceFileCount > 0;
67313
67346
  const LEGACY_RULE_KEY_TO_NATIVE_RULE_KEY = {
67314
67347
  "deslop/circular-dependency": "react-doctor/circular-dependency",
67315
67348
  "deslop/unused-dependency": "react-doctor/unused-dependency",
@@ -69227,11 +69260,11 @@ const resolveConfigRootDir = (config, configSourceDirectory) => {
69227
69260
  };
69228
69261
  const resolveDiagnoseTarget = (directory, options = {}) => {
69229
69262
  if (isFile(path$1$1.join(directory, "package.json"))) return directory;
69230
- const reactSubprojects = discoverReactSubprojects(directory);
69231
- if (reactSubprojects.length === 0) return null;
69232
- if (reactSubprojects.length === 1) return reactSubprojects[0].directory;
69263
+ const subprojects = discoverSupportedSubprojects(directory);
69264
+ if (subprojects.length === 0) return null;
69265
+ if (subprojects.length === 1) return subprojects[0].directory;
69233
69266
  if (options.allowAmbiguous === true) return null;
69234
- throw new AmbiguousProjectError(directory, reactSubprojects.map((subproject) => path$1$1.relative(directory, subproject.directory)).toSorted());
69267
+ throw new AmbiguousProjectError(directory, subprojects.map((subproject) => path$1$1.relative(directory, subproject.directory)).toSorted());
69235
69268
  };
69236
69269
  /**
69237
69270
  * The canonical entry-point translation shared by every public shell
@@ -70966,21 +70999,6 @@ function* collectSecurityScanFiles(rootDirectory, excludedDirectories = /* @__PU
70966
70999
  }
70967
71000
  }
70968
71001
  }
70969
- const REACT_COMPATIBLE_FRAMEWORKS = new Set([
70970
- "nextjs",
70971
- "tanstack-start",
70972
- "cra",
70973
- "remix",
70974
- "gatsby",
70975
- "expo",
70976
- "react-native",
70977
- "preact"
70978
- ]);
70979
- /**
70980
- * Whether project discovery resolved a React-compatible runtime directly or
70981
- * through a framework whose runtime is necessarily React-compatible.
70982
- */
70983
- const hasReactRuntime = (project) => project.reactVersion !== null || project.preactVersion !== null || REACT_COMPATIBLE_FRAMEWORKS.has(project.framework);
70984
71002
  const CLIENT_ONLY_FRAMEWORKS = new Set([
70985
71003
  "vite",
70986
71004
  "cra",
@@ -74505,7 +74523,7 @@ const buildRelatedLocations = (labels, filePath, sourceBuffer) => {
74505
74523
  const isOxlintSpan = (value) => isRecord(value) && typeof value.offset === "number" && typeof value.length === "number" && typeof value.line === "number" && typeof value.column === "number";
74506
74524
  const isOxlintLabel = (value) => isRecord(value) && isOxlintSpan(value.span);
74507
74525
  const isMappableOxlintDiagnostic = (value) => isRecord(value) && typeof value.code === "string" && value.code.length > 0 && typeof value.filename === "string" && value.filename.length > 0 && (value.severity === "warning" || value.severity === "error") && Array.isArray(value.labels) && value.labels.every(isOxlintLabel);
74508
- const isEngineFailureDiagnostic = (value) => !isRecord(value) || typeof value.filename !== "string" || value.filename.length === 0;
74526
+ const isEngineFailureDiagnostic = (value) => !isRecord(value) || typeof value.filename !== "string" || value.filename.length === 0 || typeof value.message === "string" && value.message.startsWith("Error running JS plugin.") && (typeof value.code !== "string" || value.code.length === 0) && Array.isArray(value.labels) && value.labels.length === 0;
74509
74527
  const isOxlintOutput = (value) => isRecord(value) && Array.isArray(value.diagnostics);
74510
74528
  /**
74511
74529
  * Parses one oxlint subprocess's stdout into a flat `Diagnostic[]`.
@@ -77864,4 +77882,4 @@ const toJsonReport = (result, options) => buildJsonReport({
77864
77882
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
77865
77883
 
77866
77884
  //# sourceMappingURL=index.js.map
77867
- //# debugId=a17c28bc-da40-5fec-8489-037e933cd8c3
77885
+ //# debugId=3404885b-ce22-59ed-b773-5398b6af4974
@@ -1,17 +1,18 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8866f91b-03bc-5192-bcd9-41f92d6f8f65")}catch(e){}}();
3
- import { $n as CANONICAL_GITHUB_URL, F as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, G as isCiOrCodingAgentEnvironment, Gt as highlighter, It as getBaselineDiffPlan, K as isCodingAgentEnvironment, Ln as runPromise, Lt as getChangedLineRanges, Nt as findLegacyConfig, Ot as detectAiTrainingEnvironment, P as STAGED_FILES_TEMP_DIR_PREFIX, Pn as provide$1, R as CliInputError, Sr as messageFromUnknown, Ut as hasSupportedFrameworkOrLibrary, V as isDebugFlagEnabled, Wn as provide, Y as Git, dn as resolveScanTarget, f as setJsonReportDirectory, g as VERSION, gr as STAGED_FILES_PROJECT_CONFIG_FILENAMES, h as writeJsonReport, kn as gen, kt as discoverReactSubprojects, lt as StagedFiles, m as writeJsonErrorReport, mt as buildJsonReport, n as recordDistribution, on as remainingDeadlineBudgetMs, p as setJsonReportMode, qt as isPathInsideDirectory, rn as mapWithConcurrency, t as recordCount, tn as listWorkspacePackages, u as enableJsonMode, vn as toRelativePath, w as METRIC, xr as isPlainObject, yr as isErrnoException, zt as getDiffInfo } from "./record-metric-Dgg2b2LG.js";
4
- import { c as isExpectedUserError, s as shutdownTelemetry } from "./unref-stdin-C7d7_3va.js";
5
- import { i as flushSentry } from "./build-section-divider-CJ7k-BvF.js";
6
- import { n as handleError, r as handleUserError, t as reportErrorToSentry } from "./report-error-BlOAg03W.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-0sdZ4SY8.js";
8
- import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-DQ8_lhAW.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-CbeXgE9z.js";
10
- import { t as shouldSkipPrompts } from "./should-skip-prompts-Bbl0ToUI.js";
11
- import { A as resolveMergeBaseRef, C as copyToClipboard, D as deduplicateProjectScans, E as collectProjectSourceFileCounts, I as printDiagnosticsDump, O as createInvocationInspect, S as CLI_AGENT_BINARIES, T as buildHandoffPayload, V as buildEmptyReportMessage, _ 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, z as filterDiagnosticsByCategories } from "./should-fail-scan-gate-BGzNJApW.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-Dp4dCUxw.js";
13
- 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-DRG8hdL4.js";
14
- import { t as readObjectFile } from "./read-object-file-rblJxHxN.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]="cdce2df7-3021-509b-8f70-8f62933cb628")}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-DcBAbVVs.js";
4
+ import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-BxsPVkMH.js";
5
+ import { r as flushSentry } from "./build-section-divider-dzVqU6Fr.js";
6
+ import { n as handleUserError, t as handleError } from "./handle-error-JVQU0Pxy.js";
7
+ import { t as reportErrorToSentry } from "./report-error-Cj58fOLO.js";
8
+ import { N as cliLogger, c as spinner, i as hasDoctorScript, j as runGitRaw, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-DaB6kssK.js";
9
+ import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-CHs4pPvZ.js";
10
+ 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-pqK2skSv.js";
11
+ import { t as shouldSkipPrompts } from "./should-skip-prompts-CtQ-6r7T.js";
12
+ import { A as resolveMergeBaseRef, C as copyToClipboard, D as deduplicateProjectScans, E as collectProjectSourceFileCounts, I as printDiagnosticsDump, O as createInvocationInspect, S as CLI_AGENT_BINARIES, T as buildHandoffPayload, V as buildEmptyReportMessage, _ 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, z as filterDiagnosticsByCategories } from "./should-fail-scan-gate-CwBjVudY.js";
13
+ import { a as recordGate, i as readPreference, o as runMigrations, p as SETUP_HINT_EVENT, r as isGatePending, s as writePreference, u as HANDOFF_TARGET_PREFERENCE_ID } from "./report-workflow-result-DadOSgvV.js";
14
+ import { a as askUpgradeActionVersion, c as recordCiPromptDecision, i as installReactDoctorAgentHooks, l as hasHandledActionUpgrade, o as askAddToGitHubActions, r as findAgentsWithOutdatedReactDoctorHooks, s as hasHandledCiPrompt, t as getSkillSourceDirectory, u as recordActionUpgradeDecision } from "./install-react-doctor-D4Z6xm2T.js";
15
+ import { t as readObjectFile } from "./read-object-file-CacQMaGw.js";
15
16
  import * as path$1 from "node:path";
16
17
  import * as fs$1 from "node:fs";
17
18
  import { tmpdir } from "node:os";
@@ -475,7 +476,7 @@ const buildDiagnosticIssueUrl = (input) => {
475
476
  const findOwningProjectDirectory = (rootDirectory, filePath) => {
476
477
  const absoluteFile = path$1.isAbsolute(filePath) ? filePath : path$1.resolve(rootDirectory, filePath);
477
478
  const workspacePackages = listWorkspacePackages(rootDirectory);
478
- const candidates = workspacePackages.length > 0 ? workspacePackages : discoverReactSubprojects(rootDirectory);
479
+ const candidates = workspacePackages.length > 0 ? workspacePackages : discoverSupportedSubprojects(rootDirectory);
479
480
  if (candidates.length === 0) return rootDirectory;
480
481
  let bestMatch = null;
481
482
  for (const candidate of candidates) {
@@ -1440,5 +1441,5 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
1440
1441
  //#endregion
1441
1442
  export { warnDeprecatedFailOn as n, runProjectMigrations as r, inspectAction as t };
1442
1443
 
1443
- //# sourceMappingURL=inspect-C3itFiEW.js.map
1444
- //# debugId=8866f91b-03bc-5192-bcd9-41f92d6f8f65
1444
+ //# sourceMappingURL=inspect-CBkHe9dS.js.map
1445
+ //# debugId=cdce2df7-3021-509b-8f70-8f62933cb628
@@ -1,10 +1,11 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4cc1a4b2-6730-5e5d-b9ab-413189ef8516")}catch(e){}}();
3
- import { Rn as runSync, t as recordCount, w as METRIC } from "./record-metric-Dgg2b2LG.js";
4
- import { c as isExpectedUserError } from "./unref-stdin-C7d7_3va.js";
5
- import { n as handleError, r as handleUserError, t as reportErrorToSentry } from "./report-error-BlOAg03W.js";
6
- import { t as printBrandedHeader } from "./print-branded-header-Dc1KdrcV.js";
7
- import { n as runInstallReactDoctor } from "./install-react-doctor-DRG8hdL4.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]="04d7bddf-d1ce-5a77-bd57-2b455895280e")}catch(e){}}();
3
+ import { T as METRIC, t as recordCount, zn as runSync } from "./record-metric-DcBAbVVs.js";
4
+ import { r as isExpectedUserError } from "./telemetry-runtime-BxsPVkMH.js";
5
+ import { n as handleUserError, t as handleError } from "./handle-error-JVQU0Pxy.js";
6
+ import { t as reportErrorToSentry } from "./report-error-Cj58fOLO.js";
7
+ import { t as printBrandedHeader } from "./print-branded-header-BRA02Uik.js";
8
+ import { n as runInstallReactDoctor } from "./install-react-doctor-D4Z6xm2T.js";
8
9
  //#region src/cli/commands/install.ts
9
10
  const installAction = async (options, command) => {
10
11
  recordCount(METRIC.cliInvoked, 1, { command: "install" });
@@ -28,5 +29,5 @@ const installAction = async (options, command) => {
28
29
  //#endregion
29
30
  export { installAction };
30
31
 
31
- //# sourceMappingURL=install-CjIJL6S5.js.map
32
- //# debugId=4cc1a4b2-6730-5e5d-b9ab-413189ef8516
32
+ //# sourceMappingURL=install-DG3MH36X.js.map
33
+ //# debugId=04d7bddf-d1ce-5a77-bd57-2b455895280e