react-doctor 0.9.17-dev.6790398 → 0.9.17-dev.695e46e

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 +16 -72
  2. package/dist/{build-section-divider-Dim67rXw.js → build-section-divider-BlNg8CJ3.js} +5 -5
  3. package/dist/{ci-VPUN9zVG.js → ci-dPYHQlYK.js} +24 -14
  4. package/dist/cli.js +41 -32
  5. package/dist/{constants-DHn5rUeg.js → constants-Bwylqy0B.js} +7 -5
  6. package/dist/constants-DNh19qg9.js +2 -2
  7. package/dist/{design-Ca9iLZFh.js → design-CEbK8378.js} +4 -4
  8. package/dist/duplicate-jsx-worker.js +3 -3
  9. package/dist/{exit-gracefully-DS2t5b9N.js → exit-gracefully-C8JRlcU-.js} +6 -6
  10. package/dist/{handle-error-CgDR35_q.js → handle-error-qi-5p5I2.js} +6 -6
  11. package/dist/index.d.ts +12 -5
  12. package/dist/index.js +37 -29
  13. package/dist/{inspect-UkKIWtne.js → inspect-BJE38z7r.js} +31 -23
  14. package/dist/{install-DrNy4bq2.js → install-R-4Yhbnt.js} +10 -10
  15. package/dist/{install-doctor-script-CS0wqSeQ.js → install-doctor-script-CzA3N60N.js} +10 -6
  16. package/dist/{install-github-workflow-DsU8VVNa.js → install-github-workflow-DqIx2JgD.js} +22 -8
  17. package/dist/{install-react-doctor-QFnMrZ2v.js → install-react-doctor-BzFeAPsN.js} +9 -9
  18. package/dist/{is-cache-globally-disabled-DDlh_f1u.js → is-cache-globally-disabled-BvdYcw6Q.js} +4 -4
  19. package/dist/{jsx-runtime-BSm-O9xP.js → jsx-runtime-BkWtbZXO.js} +6 -6
  20. package/dist/{print-branded-header-BBW3HfFx.js → print-branded-header-CO4r1oDZ.js} +4 -4
  21. package/dist/{prompt-runtime-scan-url-DEumRB6-.js → prompt-runtime-scan-url-sBG2_LDZ.js} +5 -5
  22. package/dist/{read-object-file-J8Q0GAh3.js → read-object-file-Bl7a4v-9.js} +4 -4
  23. package/dist/{record-metric-8hUT9rDU.js → record-metric-DcSvz1k4.js} +133 -56
  24. package/dist/{report-error-SJqfye3w.js → report-error-BmvMTKij.js} +6 -6
  25. package/dist/{report-workflow-result-BD1jsXf3.js → report-workflow-result-K7NFRSY6.js} +8 -7
  26. package/dist/{should-fail-scan-gate-CmYO2FQV.js → resolve-scan-exit-code-KDrMkTrJ.js} +37 -41
  27. package/dist/{resolve-scope-Cg8hXnUj.js → resolve-scope-DIgYBn32.js} +10 -9
  28. package/dist/{rules-BVVd4I9S.js → rules-H0yqeV5v.js} +7 -7
  29. package/dist/{run-scan-app-V4RGT-Py.js → run-scan-app-ChPI8NEg.js} +33 -23
  30. package/dist/{runtime-scan-CMAxPalf.js → runtime-scan-XUqvrTH4.js} +10 -10
  31. package/dist/{sanitize-runtime-url-DxaPQWde.js → sanitize-runtime-url-D_7VZU0F.js} +4 -4
  32. package/dist/{scan-Dp-C1hLh.js → scan-BTohT6wy.js} +14 -13
  33. package/dist/{should-skip-prompts-C_uUzoop.js → should-skip-prompts-BX-idWyW.js} +4 -4
  34. package/dist/{should-use-tui-Bee0rHYE.js → should-use-tui-CnsREuvI.js} +4 -4
  35. package/dist/skills/react-doctor/SKILL.md +13 -8
  36. package/dist/skills/react-doctor/references/explain.md +5 -0
  37. package/dist/{start-scan-preamble-BPz3nzCQ.js → start-scan-preamble-2uz0joCl.js} +5 -5
  38. package/dist/start-scan-preamble.js +3 -3
  39. package/dist/{telemetry-runtime-BxGjZZLT.js → telemetry-runtime-BufSIW3d.js} +7 -7
  40. package/dist/{version-CA41cE5h.js → version-BVBbh_L8.js} +5 -5
  41. package/dist/{why-DV7AdTes.js → why-BJoyzEcf.js} +4 -4
  42. package/dist/{with-run-span-jMF17VMD.js → with-run-span-xUMrAJ_a.js} +6 -6
  43. package/package.json +4 -4
package/dist/index.d.ts CHANGED
@@ -341,7 +341,7 @@ interface Pipeable {
341
341
  */
342
342
  declare const Class$1: new () => Pipeable;
343
343
  //#endregion
344
- //#region ../core/dist/resolve-scan-concurrency-DJ7pmvUB.d.ts
344
+ //#region ../core/dist/resolve-scan-concurrency-NI_fN2UJ.d.ts
345
345
  /**
346
346
  * A secondary source location attached to a diagnostic (oxlint's
347
347
  * non-primary labels). Editors render these as
@@ -434,7 +434,7 @@ type BlockingLevel = "error" | "warning" | "none";
434
434
  /**
435
435
  * How much of the project a scan looks at and reports on — the single knob the
436
436
  * CLI `--scope` flag, the GitHub Action `scope` input, and this config field
437
- * all share. Ordered widest to narrowest:
437
+ * all share:
438
438
  *
439
439
  * - `"full"` — whole project, every issue (the default). Environment and
440
440
  * supply-chain checks run only at this scope.
@@ -443,8 +443,9 @@ type BlockingLevel = "error" | "warning" | "none";
443
443
  * - `"changed"` — only issues the change INTRODUCED vs the base (the baseline
444
444
  * delta). What `--diff <base>` and the action's `scope: changed` do today.
445
445
  * - `"lines"` — only issues on the lines the change actually touched.
446
+ * - `"contextual"` — issues in modified functions, JSX elements, or files, as selected by each rule.
446
447
  */
447
- type ScopeValue = "full" | "files" | "changed" | "lines";
448
+ type ScopeValue = "full" | "files" | "changed" | "lines" | "contextual";
448
449
  interface ReactDoctorIgnoreOverride {
449
450
  /** Glob patterns the override applies to (e.g. `["src/legacy/**"]`). */
450
451
  files: string[];
@@ -627,13 +628,13 @@ interface ReactDoctorConfig {
627
628
  */
628
629
  warnings?: boolean;
629
630
  /**
630
- * Scan scope. Defaults to `"full"`. See `ScopeValue` for the four values.
631
+ * Scan scope. Defaults to `"full"`. See `ScopeValue` for the supported values.
631
632
  * The CLI `--scope` flag and the GitHub Action `scope` input set the same
632
633
  * thing; flags win over config.
633
634
  */
634
635
  scope?: ScopeValue;
635
636
  /**
636
- * Base git ref the `"files"` / `"changed"` / `"lines"` scopes compare
637
+ * Base git ref the `"files"` / `"changed"` / `"lines"` / `"contextual"` scopes compare
637
638
  * against. Auto-detected from the default branch / merge-base when unset.
638
639
  */
639
640
  base?: string;
@@ -661,6 +662,12 @@ interface ReactDoctorConfig {
661
662
  * one-time deprecation warning. Prefer `blocking`.
662
663
  */
663
664
  failOn?: BlockingLevel;
665
+ /**
666
+ * Disable ported rules by default. Explicit `rules` settings of `"warn"`
667
+ * or `"error"` enable selected ported rules, including legacy rule names.
668
+ * Category settings do not enable them. Project requirements and tag
669
+ * exclusions still apply, and the React Compiler plugin stays disabled.
670
+ */
664
671
  customRulesOnly?: boolean;
665
672
  share?: boolean;
666
673
  noScore?: boolean;
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]="d2b0583c-877f-57cf-8b0a-65519428807c")}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]="37548b47-5f50-5e20-9bae-7c0357f5e915")}catch(e){}}();
3
3
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
4
4
  import { createRequire } from "node:module";
5
5
  import * as fs$1$2 from "node:fs";
@@ -26,7 +26,7 @@ import { PassThrough } from "node:stream";
26
26
  import { convertToTSX } from "@astrojs/compiler/sync";
27
27
  import { STATUS_CODES } from "node:http";
28
28
  import { gzipSync } from "node:zlib";
29
- //#region ../core/dist/constants-E-ghW6VY.js
29
+ //#region ../core/dist/constants-D5VP3tO3.js
30
30
  const HTML_FILE_PATTERN = /\.html$/i;
31
31
  const SOURCE_FILE_PATTERN = /\.(?:astro|tsx?|jsx?|mts|mjs|[hH][tT][mM][lL])$/;
32
32
  const GENERATED_BUNDLE_FILE_PATTERN = /\.(iife|umd|global|min)\.m?js$/i;
@@ -46,6 +46,7 @@ const IGNORED_DIRECTORIES = new Set([
46
46
  ".angular",
47
47
  ".astro",
48
48
  ".cache",
49
+ ".cloudflare",
49
50
  ".contentlayer",
50
51
  ".direnv",
51
52
  ".docusaurus",
@@ -438,7 +439,7 @@ const isPlainObject = (value) => {
438
439
  //#region ../core/dist/react-compiler-detection-worker-protocol-Dp5LlrE8.js
439
440
  const isReactCompilerDetectionReply = (value) => typeof value === "object" && value !== null && "id" in value && typeof value.id === "number" && "hasReactCompiler" in value && (typeof value.hasReactCompiler === "boolean" || value.hasReactCompiler === null);
440
441
  //#endregion
441
- //#region ../core/dist/react-compiler-detection-client-fc698QTY.js
442
+ //#region ../core/dist/react-compiler-detection-client-_E6Lyqbg.js
442
443
  const pendingOutputsByRequestKey = /* @__PURE__ */ new Map();
443
444
  const toRequestKey = (request) => [
444
445
  request.directory,
@@ -2708,7 +2709,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2708
2709
  module.exports = picomatch;
2709
2710
  }));
2710
2711
  //#endregion
2711
- //#region ../core/dist/collect-unplugin-auto-import-global-scopes-D2Skzhl1.js
2712
+ //#region ../core/dist/collect-unplugin-auto-import-global-scopes-CSHedw9o.js
2712
2713
  var import_picomatch = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
2713
2714
  const pico = require_picomatch$1();
2714
2715
  const utils = require_utils();
@@ -3158,14 +3159,14 @@ const collectUnpluginAutoImportGlobalScopes = ({ rootDirectory, candidateFiles }
3158
3159
  return scopes.some((scope) => scope.names.length > 0) ? scopes : [];
3159
3160
  };
3160
3161
  //#endregion
3161
- //#region ../core/dist/detect-duplicate-jsx-subtrees-CzQouU4i.js
3162
+ //#region ../core/dist/detect-duplicate-jsx-subtrees-BWvh1lk5.js
3162
3163
  const yieldToEventLoop = () => new Promise((resolve) => {
3163
3164
  setImmediate(resolve);
3164
3165
  });
3165
3166
  const getTypescriptScriptKind = (fileName) => {
3166
3167
  if (fileName.endsWith(".tsx")) return typescriptBinding.ScriptKind.TSX;
3167
3168
  if (fileName.endsWith(".jsx")) return typescriptBinding.ScriptKind.JSX;
3168
- if (fileName.endsWith(".ts")) return typescriptBinding.ScriptKind.TS;
3169
+ if (/\.[cm]?ts$/.test(fileName)) return typescriptBinding.ScriptKind.TS;
3169
3170
  return typescriptBinding.ScriptKind.JS;
3170
3171
  };
3171
3172
  const resolveBoundedSourceReadBytes = (maximumLengthChars, sizeBytes) => Math.min(sizeBytes, maximumLengthChars * 3 + 1);
@@ -3715,7 +3716,7 @@ const detectDuplicateJsxSubtreesCooperative = async (sourceReader, options = {})
3715
3716
  });
3716
3717
  };
3717
3718
  //#endregion
3718
- //#region ../core/dist/detect-react-compiler-DIKiMJ1N.js
3719
+ //#region ../core/dist/detect-react-compiler-CP4BcCz0.js
3719
3720
  const NEXT_CONFIG_FILENAMES = [
3720
3721
  "next.config.js",
3721
3722
  "next.config.mjs",
@@ -73107,39 +73108,46 @@ var Files = class Files extends Service()("react-doctor/Files") {
73107
73108
  };
73108
73109
  };
73109
73110
  const HUNK_HEADER_PATTERN = /^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@/;
73110
- /**
73111
- * Parses a `git diff --unified=0` patch into the inclusive 1-based line ranges
73112
- * each file added or modified on the new side. Files are keyed by the path in
73113
- * the `+++ b/<path>` header (with `--relative`, relative to the diff's cwd).
73114
- * Added/renamed/modified files appear; pure deletions (`+++ /dev/null`) are
73115
- * skipped because they have no new-side line to report on.
73116
- */
73117
- const parseChangedLineRanges = (patch) => {
73118
- const rangesByFile = /* @__PURE__ */ new Map();
73119
- let currentRanges = null;
73111
+ const parseChangedLineRanges = (patch, includeDeletions = false) => {
73112
+ const changesByFile = /* @__PURE__ */ new Map();
73113
+ let currentChanges = null;
73120
73114
  for (const line of patch.split("\n")) {
73115
+ if (includeDeletions && line.startsWith("rename to ")) {
73116
+ const file = line.slice(10);
73117
+ changesByFile.set(file, {
73118
+ file,
73119
+ ranges: [],
73120
+ deletionLines: []
73121
+ });
73122
+ }
73121
73123
  if (line.startsWith("+++ ")) {
73122
73124
  const target = line.slice(4).trim();
73123
73125
  if (target === "/dev/null") {
73124
- currentRanges = null;
73126
+ currentChanges = null;
73125
73127
  continue;
73126
73128
  }
73127
73129
  const file = target.startsWith("b/") ? target.slice(2) : target;
73128
- currentRanges = rangesByFile.get(file) ?? [];
73129
- rangesByFile.set(file, currentRanges);
73130
+ currentChanges = changesByFile.get(file) ?? {
73131
+ file,
73132
+ ranges: [],
73133
+ deletionLines: []
73134
+ };
73135
+ changesByFile.set(file, currentChanges);
73130
73136
  continue;
73131
73137
  }
73132
- if (currentRanges === null) continue;
73138
+ if (currentChanges === null) continue;
73133
73139
  const hunk = HUNK_HEADER_PATTERN.exec(line);
73134
73140
  if (hunk === null) continue;
73135
73141
  const start = Number(hunk[1]);
73136
73142
  const lineCount = hunk[2] === void 0 ? 1 : Number(hunk[2]);
73137
- if (lineCount <= 0) continue;
73138
- currentRanges.push([start, start + lineCount - 1]);
73143
+ if (lineCount === 0) {
73144
+ if (includeDeletions) currentChanges.deletionLines.push(start);
73145
+ } else currentChanges.ranges.push([start, start + lineCount - 1]);
73139
73146
  }
73140
- return [...rangesByFile].filter(([, ranges]) => ranges.length > 0).map(([file, ranges]) => ({
73147
+ return [...changesByFile.values()].filter((entry) => entry.ranges.length > 0 || includeDeletions).map(({ file, ranges, deletionLines }) => ({
73141
73148
  file,
73142
- ranges
73149
+ ranges,
73150
+ ...deletionLines.length > 0 ? { deletionLines } : {}
73143
73151
  }));
73144
73152
  };
73145
73153
  const trimOrNull = (value) => {
@@ -73624,7 +73632,7 @@ var Git = class Git extends Service()("react-doctor/Git") {
73624
73632
  stdout: result.stdout
73625
73633
  };
73626
73634
  }).pipe(withSpan("Git.grep")),
73627
- changedLineRanges: ({ directory, baseRef, cached, files, includeUntracked = false }) => gen(function* () {
73635
+ changedLineRanges: ({ directory, baseRef, cached, files, includeUntracked = false, includeDeletions = false }) => gen(function* () {
73628
73636
  if (files.length === 0) return [];
73629
73637
  if (baseRef !== void 0 && !isSafeGitRevision(baseRef)) return null;
73630
73638
  const result = yield* runGit(directory, [
@@ -73639,7 +73647,7 @@ var Git = class Git extends Service()("react-doctor/Git") {
73639
73647
  ...files
73640
73648
  ]);
73641
73649
  if (result.status !== 0) return null;
73642
- const changedLineRanges = parseChangedLineRanges(result.stdout);
73650
+ const changedLineRanges = parseChangedLineRanges(result.stdout, includeDeletions);
73643
73651
  if (cached || !includeUntracked) return changedLineRanges;
73644
73652
  const untrackedFilePaths = yield* listUntrackedFilePaths(directory, files);
73645
73653
  if (untrackedFilePaths === null) return changedLineRanges;
@@ -74263,10 +74271,10 @@ const createOxlintConfig = ({ pluginPath, project, customRulesOnly = false, exte
74263
74271
  if (ruleSelection === "sidecar" && sidecarRuleIdFilter !== void 0 && !sidecarRuleIdFilter.has(registryEntry.id)) continue;
74264
74272
  if (rule.isScanRule || rule.isProjectRule === true) continue;
74265
74273
  if (registryEntry.id === "no-multi-component-file" && shouldUseExplicitNoMultiCompPolicy) continue;
74266
- if (customRulesOnly && registryEntry.originallyExternal) continue;
74267
74274
  if (rule.framework !== "global" && !rule.requires) continue;
74268
74275
  if (!shouldEnableRule(rule.requires, rule.tags, capabilities, ignoredTags, rule.disabledWhen, includedTags)) continue;
74269
74276
  const explicitRuleOverride = resolveRuleSeverityOverride({ ruleKey: registryEntry.key }, severityControls);
74277
+ if (customRulesOnly && registryEntry.originallyExternal && (explicitRuleOverride === void 0 || explicitRuleOverride === "off")) continue;
74270
74278
  if (!shouldEnableRuleByDefaultStatus({
74271
74279
  defaultEnabled: rule.defaultEnabled,
74272
74280
  includeTagDefaults,
@@ -79314,4 +79322,4 @@ const toJsonReport = (result, options) => buildJsonReport({
79314
79322
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
79315
79323
 
79316
79324
  //# sourceMappingURL=index.js.map
79317
- //# debugId=d2b0583c-877f-57cf-8b0a-65519428807c
79325
+ //# debugId=37548b47-5f50-5e20-9bae-7c0357f5e915
@@ -1,19 +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]="f74edf86-dd49-576f-b10e-446755280fb8")}catch(e){}}();
3
- import { N as discardPrefetchedGitCommands, T as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, lt as CANONICAL_GITHUB_URL, u as METRIC, w as STAGED_FILES_TEMP_DIR_PREFIX, xn as STAGED_FILES_PROJECT_CONFIG_FILENAMES } from "./constants-DHn5rUeg.js";
4
- import { At as highlighter, Ct as getDiffInfo, D as isCodingAgentEnvironment, E as isCiOrCodingAgentEnvironment, Gt as remainingDeadlineBudgetMs, Jt as resolveScanTarget, K as StagedFiles, Ot as hasSupportedFrameworkOrLibrary, Rn as messageFromUnknown, S as isDebugFlagEnabled, Sn as runPromise, Un as isPlainObject, Vn as isErrnoException, Vt as mapWithConcurrency, Z as buildJsonReport, _ as VERSION, bt as getBaselineDiffPlan, dn as JsonReport, dt as detectAiTrainingEnvironment, f as setJsonReportDirectory, fn as decodeUnknownSync, ft as discoverSupportedSubprojects, g as writeJsonReport, gt as findLegacyConfig, h as writeJsonErrorReport, j as Git, kn as provide, mn as gen, n as recordDistribution, p as setJsonReportMode, t as recordCount, tn as toRelativePath, u as enableJsonMode, xt as getChangedLineRanges, y as CliInputError, yn as provide$1, zt as listWorkspacePackages } from "./record-metric-8hUT9rDU.js";
5
- import { n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-BxGjZZLT.js";
6
- import { n as handleUserError, t as handleError } from "./handle-error-CgDR35_q.js";
7
- import { t as reportErrorToSentry } from "./report-error-SJqfye3w.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]="145f6413-b87d-5a3f-b141-ee1a902b45f4")}catch(e){}}();
3
+ import { N as discardPrefetchedGitCommands, T as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, lt as CANONICAL_GITHUB_URL, u as METRIC, w as STAGED_FILES_TEMP_DIR_PREFIX, xn as STAGED_FILES_PROJECT_CONFIG_FILENAMES } from "./constants-Bwylqy0B.js";
4
+ import { At as hasSupportedFrameworkOrLibrary, Bn as messageFromUnknown, Ct as getChangedLineRanges, D as isCodingAgentEnvironment, E as isCiOrCodingAgentEnvironment, Gn as isPlainObject, K as StagedFiles, Mt as highlighter, S as isDebugFlagEnabled, St as getBaselineDiffPlan, Tt as getDiffInfo, Un as isErrnoException, Ut as mapWithConcurrency, Vt as listWorkspacePackages, Xt as resolveScanTarget, Z as buildJsonReport, _ as VERSION, f as setJsonReportDirectory, ft as detectAiTrainingEnvironment, g as writeJsonReport, gn as gen, h as writeJsonErrorReport, j as Git, jn as provide, mn as decodeUnknownSync, n as recordDistribution, p as setJsonReportMode, pn as JsonReport, pt as discoverSupportedSubprojects, qt as remainingDeadlineBudgetMs, rn as toRelativePath, t as recordCount, u as enableJsonMode, vt as findLegacyConfig, wn as runPromise, xn as provide$1, y as CliInputError } from "./record-metric-DcSvz1k4.js";
5
+ import { n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-BufSIW3d.js";
6
+ import { n as handleUserError, t as handleError } from "./handle-error-qi-5p5I2.js";
7
+ import { t as reportErrorToSentry } from "./report-error-BmvMTKij.js";
8
8
  import { t as toForwardSlashes } from "./path-format-By20mo8A.js";
9
- import { N as cliLogger, c as spinner, i as hasDoctorScript, j as runGitRaw, k as runGit, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-CS0wqSeQ.js";
10
- import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-DsU8VVNa.js";
11
- import { c as openWorkflowPullRequest, i as warnDeprecatedDiff, l as stageWorkflowFile, r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-Cg8hXnUj.js";
12
- import { t as shouldSkipPrompts } from "./should-skip-prompts-C_uUzoop.js";
13
- import { A as createInvocationInspect, C as detectLaunchableAgents, D as buildHandoffPayload, E as launchCliAgent, M as resolveMergeBaseRef, N as printHeadlessReport, O as collectProjectSourceFiles, R as printDiagnosticsDump, S as setUpGitHubActions, T as copyToClipboard, U as buildEmptyReportMessage, V as filterDiagnosticsByCategories, W as resolveInvocationOxlintConcurrency, _ as retryMissingProjectScores, a as validateModeFlags, b as filterScansForSurface, c as partitionProjectScanOutcomes, d as buildCodeFrame, f as resolveProjectScan, g as resolveProjectRelativeDirectory, h as resolveProjectSourceFilePaths, i as validateIncludeUntrackedScope, j as inspect, k as deduplicateProjectScans, l as discoverWorkspacePackages, m as resolveProjectDiffIncludePaths, n as formatSkippedProjectsMessage, o as resolveExcludedProjectDirectories, p as resolveProjectChangedLineRanges, s as projectManifestChanged, t as shouldFailScanGate, u as selectProjects, v as resolveWorkspaceDeadCodeOwner, w as CLI_AGENT_BINARIES, x as countUniqueScannedFiles, y as resolveCliInspectOptions } from "./should-fail-scan-gate-CmYO2FQV.js";
14
- import { a as recordGate, g as loadAgentInstall, 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-BD1jsXf3.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-QFnMrZ2v.js";
16
- import { t as readObjectFile } from "./read-object-file-J8Q0GAh3.js";
9
+ import { N as cliLogger, c as spinner, i as hasDoctorScript, j as runGitRaw, k as runGit, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-CzA3N60N.js";
10
+ import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-DqIx2JgD.js";
11
+ import { c as openWorkflowPullRequest, i as warnDeprecatedDiff, l as stageWorkflowFile, r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-DIgYBn32.js";
12
+ import { t as shouldSkipPrompts } from "./should-skip-prompts-BX-idWyW.js";
13
+ import { A as createInvocationInspect, C as detectLaunchableAgents, D as buildHandoffPayload, E as launchCliAgent, M as resolveMergeBaseRef, N as printHeadlessReport, O as collectProjectSourceFiles, R as printDiagnosticsDump, S as setUpGitHubActions, T as copyToClipboard, U as buildEmptyReportMessage, V as filterDiagnosticsByCategories, W as resolveInvocationOxlintConcurrency, _ as retryMissingProjectScores, a as validateModeFlags, b as filterScansForSurface, c as partitionProjectScanOutcomes, d as buildCodeFrame, f as resolveProjectScan, g as resolveProjectRelativeDirectory, h as resolveProjectSourceFilePaths, i as validateIncludeUntrackedScope, j as inspect, k as deduplicateProjectScans, l as discoverWorkspacePackages, m as resolveProjectDiffIncludePaths, n as formatSkippedProjectsMessage, o as resolveExcludedProjectDirectories, p as resolveProjectChangedLineRanges, s as projectManifestChanged, t as resolveScanExitCode, u as selectProjects, v as resolveWorkspaceDeadCodeOwner, w as CLI_AGENT_BINARIES, x as countUniqueScannedFiles, y as resolveCliInspectOptions } from "./resolve-scan-exit-code-KDrMkTrJ.js";
14
+ import { a as recordGate, g as loadAgentInstall, 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-K7NFRSY6.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-BzFeAPsN.js";
16
+ import { t as readObjectFile } from "./read-object-file-Bl7a4v-9.js";
17
17
  import * as fs$1 from "node:fs";
18
18
  import fs from "node:fs";
19
19
  import * as path$1 from "node:path";
@@ -768,11 +768,14 @@ const finalizeCliScans = (input) => {
768
768
  baseline: outcome.baseline,
769
769
  baselineDegraded: outcome.baselineDegraded
770
770
  }));
771
- if (shouldFailScanGate({
771
+ const exitCode = resolveScanExitCode({
772
772
  scans: input.completedScans,
773
773
  blockingLevel: resolveBlockingLevel(input.flags, input.userConfig),
774
- diagnosticsAreGateExempt: input.isScoreOnly || outcome.baselineDegraded
775
- })) process.exitCode = 1;
774
+ diagnosticsAreGateExempt: input.isScoreOnly || outcome.baselineDegraded,
775
+ warningExitCode: input.flags.warningExitCode
776
+ });
777
+ if (input.flags.warningExitCode !== void 0) recordCount(METRIC.scanWarningExitCodeConfigured);
778
+ if (exitCode !== 0) process.exitCode = exitCode;
776
779
  };
777
780
  //#endregion
778
781
  //#region src/cli/utils/get-staged-files.ts
@@ -952,6 +955,7 @@ const scanStagedProject = async ({ input, projectRun, snapshotDirectory, stagedL
952
955
  includePaths: [...includePaths],
953
956
  configOverride: projectScan.projectConfig,
954
957
  configSourceDirectory: projectScan.projectConfigSourceDirectory ?? void 0,
958
+ contextual: resolveScope(input.flags, input.scanTarget.userConfig).scope === "contextual",
955
959
  changedLineRanges: stagedLineRanges === null ? void 0 : resolveProjectChangedLineRanges(rootDirectory, projectScan.scanDirectory, stagedLineRanges),
956
960
  suppressRendering: isMultiProject,
957
961
  concurrentScan: isMultiProject
@@ -1083,10 +1087,12 @@ const runStagedInspect = async (input) => {
1083
1087
  if (unselectedStagedFileCount > 0) cliLogger.dim(`${unselectedStagedFileCount} more staged file${unselectedStagedFileCount === 1 ? "" : "s"} outside the selected projects.`);
1084
1088
  cliLogger.break();
1085
1089
  }
1086
- const stagedWantsLines = resolveScope(flags, scanTarget.userConfig).scope === "lines";
1090
+ const stagedScope = resolveScope(flags, scanTarget.userConfig).scope;
1091
+ const stagedWantsLines = stagedScope === "lines" || stagedScope === "contextual";
1087
1092
  const stagedLineRanges = stagedWantsLines ? await getChangedLineRanges({
1088
1093
  directory: resolvedDirectory,
1089
1094
  cached: true,
1095
+ includeDeletions: stagedScope === "contextual",
1090
1096
  files: selectedStagedFiles
1091
1097
  }) : null;
1092
1098
  if (stagedWantsLines && stagedLineRanges === null && !input.isQuiet) {
@@ -1168,7 +1174,8 @@ const buildProjectInspectOptions = ({ context, projectScan, projectScanPlan, own
1168
1174
  baseFiles: projectScanPlan.projectBaselineBaseFiles,
1169
1175
  headFiles: projectScanPlan.projectBaselineHeadFiles
1170
1176
  } : void 0,
1171
- changedLineRanges: context.scope === "lines" && context.changedLineRanges !== null ? resolveProjectChangedLineRanges(context.resolvedDirectory, scanDirectory, context.changedLineRanges) : void 0,
1177
+ contextual: context.scope === "contextual",
1178
+ changedLineRanges: (context.scope === "lines" || context.scope === "contextual") && context.changedLineRanges !== null ? resolveProjectChangedLineRanges(context.resolvedDirectory, scanDirectory, context.changedLineRanges) : void 0,
1172
1179
  supplyChainManifestChanged: projectScanPlan.supplyChainManifestChanged
1173
1180
  };
1174
1181
  };
@@ -1366,15 +1373,16 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect", se
1366
1373
  const comparisonPlanRef = baselineRef ?? (savedBaseline?.schemaVersion === 3 ? savedBaseline.sourceRevision : void 0);
1367
1374
  const baselineDiffPlan = comparisonPlanRef ? await getBaselineDiffPlan(resolvedDirectory, comparisonPlanRef) : null;
1368
1375
  const linesBaseRef = diffInfo?.isCurrentChanges ? "HEAD" : comparisonBaseRef;
1369
- const changedLineRanges = scope === "lines" && diffInfo !== null && (diffInfo.isCurrentChanges || linesBaseRef !== null) && diffInfo !== null ? await getChangedLineRanges({
1376
+ const changedLineRanges = (scope === "lines" || scope === "contextual") && diffInfo !== null && (diffInfo.isCurrentChanges || linesBaseRef !== null) && diffInfo !== null ? await getChangedLineRanges({
1370
1377
  directory: resolvedDirectory,
1371
1378
  baseRef: linesBaseRef ?? void 0,
1379
+ includeDeletions: scope === "contextual",
1372
1380
  files: [...diffInfo.changedFiles],
1373
1381
  includeUntracked
1374
1382
  }) : null;
1375
1383
  scanStartupSpinner?.stop();
1376
1384
  scanStartupSpinner = null;
1377
- if (scope === "lines" && changedLineRanges === null && !isQuiet) {
1385
+ if ((scope === "lines" || scope === "contextual") && changedLineRanges === null && !isQuiet) {
1378
1386
  cliLogger.warn("Could not determine changed lines (no base ref or git diff failed); reporting all issues in changed files.");
1379
1387
  cliLogger.break();
1380
1388
  }
@@ -1520,5 +1528,5 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect", se
1520
1528
  //#endregion
1521
1529
  export { warnDeprecatedFailOn as n, runProjectMigrations as r, inspectAction as t };
1522
1530
 
1523
- //# sourceMappingURL=inspect-UkKIWtne.js.map
1524
- //# debugId=f74edf86-dd49-576f-b10e-446755280fb8
1531
+ //# sourceMappingURL=inspect-BJE38z7r.js.map
1532
+ //# debugId=145f6413-b87d-5a3f-b141-ee1a902b45f4
@@ -1,12 +1,12 @@
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]="e8d58edd-1928-5473-8344-5a231db799c6")}catch(e){}}();
3
- import { u as METRIC } from "./constants-DHn5rUeg.js";
4
- import { Cn as runSync, t as recordCount } from "./record-metric-8hUT9rDU.js";
5
- import { o as isExpectedUserError } from "./telemetry-runtime-BxGjZZLT.js";
6
- import { n as handleUserError, t as handleError } from "./handle-error-CgDR35_q.js";
7
- import { t as reportErrorToSentry } from "./report-error-SJqfye3w.js";
8
- import { t as printBrandedHeader } from "./print-branded-header-BBW3HfFx.js";
9
- import { n as runInstallReactDoctor } from "./install-react-doctor-QFnMrZ2v.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]="f5b5e275-4331-5e02-a227-0f8989001b21")}catch(e){}}();
3
+ import { u as METRIC } from "./constants-Bwylqy0B.js";
4
+ import { Tn as runSync, t as recordCount } from "./record-metric-DcSvz1k4.js";
5
+ import { o as isExpectedUserError } from "./telemetry-runtime-BufSIW3d.js";
6
+ import { n as handleUserError, t as handleError } from "./handle-error-qi-5p5I2.js";
7
+ import { t as reportErrorToSentry } from "./report-error-BmvMTKij.js";
8
+ import { t as printBrandedHeader } from "./print-branded-header-CO4r1oDZ.js";
9
+ import { n as runInstallReactDoctor } from "./install-react-doctor-BzFeAPsN.js";
10
10
  //#region src/cli/commands/install.ts
11
11
  const installAction = async (options, command) => {
12
12
  recordCount(METRIC.cliInvoked, 1, { command: "install" });
@@ -30,5 +30,5 @@ const installAction = async (options, command) => {
30
30
  //#endregion
31
31
  export { installAction };
32
32
 
33
- //# sourceMappingURL=install-DrNy4bq2.js.map
34
- //# debugId=e8d58edd-1928-5473-8344-5a231db799c6
33
+ //# sourceMappingURL=install-R-4Yhbnt.js.map
34
+ //# debugId=f5b5e275-4331-5e02-a227-0f8989001b21
@@ -1,7 +1,7 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7a4f1b36-b98c-58a5-a758-0834bdeeb284")}catch(e){}}();
3
- import { B as resolveGitCommand, g as RUN_GIT_MAX_BUFFER_BYTES } from "./constants-DHn5rUeg.js";
4
- import { At as highlighter, Cn as runSync, b as isNonInteractiveEnvironment, cn as log, ln as warn, on as error$1, sn as info$1 } from "./record-metric-8hUT9rDU.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]="602a1c29-f300-55ce-beb1-0253848b2ac3")}catch(e){}}();
3
+ import { B as resolveGitCommand, g as RUN_GIT_MAX_BUFFER_BYTES } from "./constants-Bwylqy0B.js";
4
+ import { Mt as highlighter, Tn as runSync, b as isNonInteractiveEnvironment, cn as error$1, dn as warn, ln as info$1, un as log } from "./record-metric-DcSvz1k4.js";
5
5
  import { a as chalk, i as stripAnsi, t as eastAsianWidth } from "./get-east-asian-width-DRPy7dqz.js";
6
6
  import * as fs$1 from "node:fs";
7
7
  import * as path$1 from "node:path";
@@ -78,7 +78,11 @@ const runGitRaw = (projectRoot, args) => {
78
78
  "pipe",
79
79
  "ignore"
80
80
  ],
81
- maxBuffer: RUN_GIT_MAX_BUFFER_BYTES
81
+ maxBuffer: RUN_GIT_MAX_BUFFER_BYTES,
82
+ env: {
83
+ ...process.env,
84
+ GIT_DIR: void 0
85
+ }
82
86
  });
83
87
  } catch {
84
88
  return null;
@@ -2814,5 +2818,5 @@ const installReactDoctorScriptStep = (projectRoot) => {
2814
2818
  //#endregion
2815
2819
  export { runGitAsync as A, isRecord as C, readPackageJson as D, packageHasRecordKey as E, writeJsonFile as M, cliLogger as N, 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, runGitRaw 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 };
2816
2820
 
2817
- //# sourceMappingURL=install-doctor-script-CS0wqSeQ.js.map
2818
- //# debugId=7a4f1b36-b98c-58a5-a758-0834bdeeb284
2821
+ //# sourceMappingURL=install-doctor-script-CzA3N60N.js.map
2822
+ //# debugId=602a1c29-f300-55ce-beb1-0253848b2ac3
@@ -1,8 +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]="cc45d75a-4c79-5b5c-9be4-7c97e15e79ac")}catch(e){}}();
3
- import { s as GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS } from "./constants-DHn5rUeg.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]="af4a652e-495c-5116-bf51-329b869e5e51")}catch(e){}}();
3
+ import { s as GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS } from "./constants-Bwylqy0B.js";
4
+ import { _t as findGitRepositoryRoot } from "./record-metric-DcSvz1k4.js";
4
5
  import { t as unrefStdin } from "./unref-stdin-D-NZBFpg.js";
5
- import { N as cliLogger } from "./install-doctor-script-CS0wqSeQ.js";
6
+ import { N as cliLogger } from "./install-doctor-script-CzA3N60N.js";
6
7
  import { createRequire } from "node:module";
7
8
  import * as fs$1 from "node:fs";
8
9
  import * as path$1 from "node:path";
@@ -191,13 +192,19 @@ jobs:
191
192
  # blocking: error # Gate level: "none" (advisory, the default) | "warning" | "error"
192
193
  # scope: full # On PRs, scan the whole project instead of just changed files
193
194
  # comment: false # Disable the sticky PR summary comment
195
+ # comment-on-clean: false # Skip new comments for clean scans
194
196
  # review-comments: false # Disable inline review comments on changed lines
195
197
  # commit-status: false # Disable the commit status (score + counts, links to the run)
196
198
  # version: "0.4.0" # Pin to a specific react-doctor version instead of "latest"
197
199
  # directory: apps/web # Scan a sub-directory (default: ".")
198
200
  # project: "web,admin" # In a monorepo, scan specific workspace project(s)
199
201
  `;
200
- const getReactDoctorWorkflowPath = (projectRoot) => path$1.join(projectRoot, ".github", "workflows", "react-doctor.yml");
202
+ const getGitRootWorkflowPath = (gitRoot) => path$1.join(gitRoot, ".github", "workflows", "react-doctor.yml");
203
+ const getReactDoctorWorkflowPath = (projectRoot) => {
204
+ const gitRoot = findGitRepositoryRoot(projectRoot);
205
+ if (gitRoot === null) return path$1.join(projectRoot, ".github", "workflows", "react-doctor.yml");
206
+ return getGitRootWorkflowPath(gitRoot);
207
+ };
201
208
  const isReactDoctorWorkflowInstalled = (projectRoot) => fs$1.existsSync(getReactDoctorWorkflowPath(projectRoot));
202
209
  const V1_FLOATING_ACTION_REF = String.raw`millionco/react-doctor@v1(?![\w.])`;
203
210
  const V2_FLOATING_ACTION_REF = "millionco/react-doctor@v2";
@@ -221,7 +228,13 @@ const upgradeWorkflowActionToV2 = (content) => {
221
228
  };
222
229
  };
223
230
  const installReactDoctorWorkflow = (projectRoot, defaultBranch = "main") => {
224
- const workflowPath = getReactDoctorWorkflowPath(projectRoot);
231
+ const gitRoot = findGitRepositoryRoot(projectRoot);
232
+ if (gitRoot === null) return {
233
+ status: "failed",
234
+ workflowPath: path$1.join(projectRoot, ".github", "workflows", "react-doctor.yml"),
235
+ error: "no-git-root"
236
+ };
237
+ const workflowPath = getGitRootWorkflowPath(gitRoot);
225
238
  if (fs$1.existsSync(workflowPath)) return {
226
239
  status: "exists",
227
240
  workflowPath
@@ -236,7 +249,8 @@ const installReactDoctorWorkflow = (projectRoot, defaultBranch = "main") => {
236
249
  } catch {
237
250
  return {
238
251
  status: "failed",
239
- workflowPath
252
+ workflowPath,
253
+ error: "write-failed"
240
254
  };
241
255
  }
242
256
  };
@@ -267,5 +281,5 @@ const upgradeReactDoctorWorkflowInPlace = (projectRoot) => {
267
281
  //#endregion
268
282
  export { readReactDoctorWorkflow as a, workflowUsesV1Action as c, detectDefaultBranch as d, runCommand as f, isReactDoctorWorkflowInstalled as i, prompts as l, getReactDoctorWorkflowPath as n, upgradeReactDoctorWorkflowInPlace as o, installReactDoctorWorkflow as r, upgradeWorkflowActionToV2 as s, buildWorkflowContent as t, isCommandAvailable as u };
269
283
 
270
- //# sourceMappingURL=install-github-workflow-DsU8VVNa.js.map
271
- //# debugId=cc45d75a-4c79-5b5c-9be4-7c97e15e79ac
284
+ //# sourceMappingURL=install-github-workflow-DqIx2JgD.js.map
285
+ //# debugId=af4a652e-495c-5116-bf51-329b869e5e51
@@ -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]="872c989a-adcc-54d4-94de-13057fe630f2")}catch(e){}}();
3
- import { kt as GITHUB_ACTIONS_SETUP_URL, o as CI_TRUST_COMPANIES, pn as SKILL_NAME, u as METRIC } from "./constants-DHn5rUeg.js";
4
- import { At as highlighter, Vn as isErrnoException, t as recordCount, y as CliInputError } from "./record-metric-8hUT9rDU.js";
5
- import { C as isRecord, D as readPackageJson, E as packageHasRecordKey, M as writeJsonFile, N 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, 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-CS0wqSeQ.js";
6
- 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-DsU8VVNa.js";
7
- import { t as shouldSkipPrompts } from "./should-skip-prompts-C_uUzoop.js";
8
- import { a as recordGate, c as ACTION_UPGRADE_EVENT, d as INSTALL_AGENTS_PREFERENCE_ID, g as loadAgentInstall, 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-BD1jsXf3.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]="efde77e5-42fb-55ed-8c79-24d4a07d0a83")}catch(e){}}();
3
+ import { kt as GITHUB_ACTIONS_SETUP_URL, o as CI_TRUST_COMPANIES, pn as SKILL_NAME, u as METRIC } from "./constants-Bwylqy0B.js";
4
+ import { Mt as highlighter, Un as isErrnoException, t as recordCount, y as CliInputError } from "./record-metric-DcSvz1k4.js";
5
+ import { C as isRecord, D as readPackageJson, E as packageHasRecordKey, M as writeJsonFile, N 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, 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-CzA3N60N.js";
6
+ 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-DqIx2JgD.js";
7
+ import { t as shouldSkipPrompts } from "./should-skip-prompts-BX-idWyW.js";
8
+ import { a as recordGate, c as ACTION_UPGRADE_EVENT, d as INSTALL_AGENTS_PREFERENCE_ID, g as loadAgentInstall, 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-K7NFRSY6.js";
9
9
  import * as fs$1 from "node:fs";
10
10
  import * as path$1 from "node:path";
11
11
  import { execFile } from "node:child_process";
@@ -1156,5 +1156,5 @@ const runInstallReactDoctor = async (options = {}) => {
1156
1156
  //#endregion
1157
1157
  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 };
1158
1158
 
1159
- //# sourceMappingURL=install-react-doctor-QFnMrZ2v.js.map
1160
- //# debugId=872c989a-adcc-54d4-94de-13057fe630f2
1159
+ //# sourceMappingURL=install-react-doctor-BzFeAPsN.js.map
1160
+ //# debugId=efde77e5-42fb-55ed-8c79-24d4a07d0a83
@@ -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]="f128b756-b9c0-5228-a3e4-73357dd868bb")}catch(e){}}();
3
- import { a as CACHE_DISABLED_VALUES } from "./constants-DHn5rUeg.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]="56e77dbd-5dbe-55ce-9d8e-d4f09e809431")}catch(e){}}();
3
+ import { a as CACHE_DISABLED_VALUES } from "./constants-Bwylqy0B.js";
4
4
  //#region src/cli/utils/is-cache-globally-disabled.ts
5
5
  const isCacheGloballyDisabled = () => CACHE_DISABLED_VALUES.has(process.env.REACT_DOCTOR_NO_CACHE?.toLowerCase() ?? "");
6
6
  //#endregion
7
7
  export { isCacheGloballyDisabled as t };
8
8
 
9
- //# sourceMappingURL=is-cache-globally-disabled-DDlh_f1u.js.map
10
- //# debugId=f128b756-b9c0-5228-a3e4-73357dd868bb
9
+ //# sourceMappingURL=is-cache-globally-disabled-BvdYcw6Q.js.map
10
+ //# debugId=56e77dbd-5dbe-55ce-9d8e-d4f09e809431
@@ -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]="0b6a7e53-a80d-5c07-a9f2-d7fced67d532")}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]="bd24ff20-a1cd-5c5f-8e86-e3b0237df8dd")}catch(e){}}();
3
3
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
4
- import { u as METRIC } from "./constants-DHn5rUeg.js";
5
- import { t as recordCount } from "./record-metric-8hUT9rDU.js";
6
- import { n as registerActiveTuiRenderer, t as exitGracefully } from "./exit-gracefully-DS2t5b9N.js";
4
+ import { u as METRIC } from "./constants-Bwylqy0B.js";
5
+ import { t as recordCount } from "./record-metric-DcSvz1k4.js";
6
+ import { n as registerActiveTuiRenderer, t as exitGracefully } from "./exit-gracefully-C8JRlcU-.js";
7
7
  import { a as chalk, i as stripAnsi, n as isFullWidth$1, r as isWide$1 } from "./get-east-asian-width-DRPy7dqz.js";
8
8
  import * as fs$1 from "node:fs";
9
9
  import fs from "node:fs";
@@ -25870,5 +25870,5 @@ var require_jsx_runtime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
25870
25870
  //#endregion
25871
25871
  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 };
25872
25872
 
25873
- //# sourceMappingURL=jsx-runtime-BSm-O9xP.js.map
25874
- //# debugId=0b6a7e53-a80d-5c07-a9f2-d7fced67d532
25873
+ //# sourceMappingURL=jsx-runtime-BkWtbZXO.js.map
25874
+ //# debugId=bd24ff20-a1cd-5c5f-8e86-e3b0237df8dd
@@ -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]="d3aa2a0a-60fa-56f5-8451-b22fc21475b4")}catch(e){}}();
3
- import { At as highlighter, _ as VERSION, cn as log, mn as gen } from "./record-metric-8hUT9rDU.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]="042e2f1f-ca1e-5a3d-9694-cf7b46c80fe7")}catch(e){}}();
3
+ import { Mt as highlighter, _ as VERSION, gn as gen, un as log } from "./record-metric-DcSvz1k4.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-BBW3HfFx.js.map
22
- //# debugId=d3aa2a0a-60fa-56f5-8451-b22fc21475b4
21
+ //# sourceMappingURL=print-branded-header-CO4r1oDZ.js.map
22
+ //# debugId=042e2f1f-ca1e-5a3d-9694-cf7b46c80fe7
@@ -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]="4496637f-334c-5bb1-a6c4-98825694a8ec")}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]="439e264d-0ec4-5639-af21-5271d86e2d98")}catch(e){}}();
3
3
  import { t as unrefStdin } from "./unref-stdin-D-NZBFpg.js";
4
- import { a as RUNTIME_SCAN_LOCAL_DEV_PORTS, t as sanitizeRuntimeUrl, u as RUNTIME_SCAN_MAX_STRING_LENGTH } from "./sanitize-runtime-url-DxaPQWde.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-BSm-O9xP.js";
4
+ import { a as RUNTIME_SCAN_LOCAL_DEV_PORTS, t as sanitizeRuntimeUrl, u as RUNTIME_SCAN_MAX_STRING_LENGTH } from "./sanitize-runtime-url-D_7VZU0F.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-BkWtbZXO.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-DEumRB6-.js.map
240
- //# debugId=4496637f-334c-5bb1-a6c4-98825694a8ec
239
+ //# sourceMappingURL=prompt-runtime-scan-url-sBG2_LDZ.js.map
240
+ //# debugId=439e264d-0ec4-5639-af21-5271d86e2d98
@@ -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]="e01e5f0a-1d89-5c49-8d9a-0ad13c855608")}catch(e){}}();
3
- import { Un as isPlainObject } from "./record-metric-8hUT9rDU.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]="6a4aaed4-756a-5cbe-9397-2764366e6d42")}catch(e){}}();
3
+ import { Gn as isPlainObject } from "./record-metric-DcSvz1k4.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-J8Q0GAh3.js.map
24
- //# debugId=e01e5f0a-1d89-5c49-8d9a-0ad13c855608
23
+ //# sourceMappingURL=read-object-file-Bl7a4v-9.js.map
24
+ //# debugId=6a4aaed4-756a-5cbe-9397-2764366e6d42