react-doctor 0.9.12-dev.1d3e4a6 → 0.9.12-dev.2133985

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 (34) hide show
  1. package/dist/{build-section-divider-8MOZLIsm.js → build-section-divider-DQM0hZGG.js} +7 -7
  2. package/dist/{ci-BkncxruQ.js → ci-B7o1TYLf.js} +12 -12
  3. package/dist/cli.js +28 -27
  4. package/dist/{design-cWsjx19m.js → design-DL-dFjOh.js} +4 -4
  5. package/dist/{exit-gracefully-B9tEGAKH.js → exit-gracefully-A-YLrXTL.js} +6 -6
  6. package/dist/{handle-error-wbMFUdUK.js → handle-error-B6MY7nJt.js} +17 -12
  7. package/dist/index.js +209 -23
  8. package/dist/{inspect-Bz2rayph.js → inspect-BDh9LRzm.js} +16 -16
  9. package/dist/{install-DdckCi3Z.js → install-DyTkOJfe.js} +9 -9
  10. package/dist/{install-doctor-script-jOg4qbkK.js → install-doctor-script-1sBrw2pV.js} +4 -4
  11. package/dist/{install-github-workflow-C5OkC7nA.js → install-github-workflow-DHfC7l5M.js} +5 -5
  12. package/dist/{install-react-doctor-W8P-PVpX.js → install-react-doctor-C4TMh-1c.js} +8 -8
  13. package/dist/{jsx-runtime-0eiF0jis.js → jsx-runtime-dEetRYud.js} +5 -5
  14. package/dist/{print-branded-header-_cUJmAUD.js → print-branded-header-DA3lha5-.js} +4 -4
  15. package/dist/project-analysis-worker.js +53 -52
  16. package/dist/{prompt-runtime-scan-url-CV2AUqdk.js → prompt-runtime-scan-url-BiM1MLOR.js} +5 -5
  17. package/dist/{read-object-file-DOfcpaZX.js → read-object-file-BPlkYYY5.js} +4 -4
  18. package/dist/{record-metric-BA5ry-7d.js → record-metric-D-lvwUld.js} +205 -18
  19. package/dist/{report-error-CFe3r9gh.js → report-error-R7qwdCqP.js} +5 -5
  20. package/dist/{report-workflow-result-BoDN1Z77.js → report-workflow-result-CAvwgr8H.js} +5 -5
  21. package/dist/{resolve-scope-BVNh_icv.js → resolve-scope-Dzj_xz-v.js} +6 -6
  22. package/dist/{rules-CyIHtrnI.js → rules-CTgx-0Wm.js} +6 -6
  23. package/dist/{run-scan-app-BhUlnxaV.js → run-scan-app-DlH6tVzs.js} +15 -14
  24. package/dist/{runtime-scan-CUt6T5J3.js → runtime-scan-Bnh9_l_w.js} +9 -9
  25. package/dist/{sanitize-runtime-url-CWANxE3L.js → sanitize-runtime-url-CJXlzCnZ.js} +4 -4
  26. package/dist/{scan-DU_zcchs.js → scan-D5RrGccQ.js} +9 -9
  27. package/dist/{should-fail-scan-gate-CDwqCAPq.js → should-fail-scan-gate-xwJ4Hcnr.js} +11 -11
  28. package/dist/{should-skip-prompts-B9za5uX9.js → should-skip-prompts-JirKHNGh.js} +4 -4
  29. package/dist/{should-use-tui-BR82qmYC.js → should-use-tui-DFek4hnU.js} +4 -4
  30. package/dist/{telemetry-runtime-C9dZxrK_.js → telemetry-runtime-BMf4C2Ho.js} +55 -7
  31. package/dist/{version-yw_bHX_4.js → version-DHmyxBxT.js} +4 -4
  32. package/dist/{why-CdGev87Z.js → why-DwXvdA3f.js} +4 -4
  33. package/dist/{with-run-span-CCVNobt7.js → with-run-span-CRCw8uwE.js} +5 -5
  34. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,14 +1,15 @@
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]="8065a42b-3c73-5f92-8b4f-29cb68d77940")}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]="d37422e0-941a-5fe0-81e5-bc092d5cd66e")}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 path$1$1 from "node:path";
6
- import path from "node:path";
6
+ import path, { join, posix } from "node:path";
7
7
  import * as fs$1$3 from "node:fs";
8
- import fs from "node:fs";
8
+ import fs, { existsSync } from "node:fs";
9
9
  import * as NodeChildProcess from "node:child_process";
10
10
  import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
11
11
  import ts from "typescript";
12
+ import { parseSync } from "oxc-parser";
12
13
  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_OPT_IN_PROJECT_RULE_IDS, REACT_DOCTOR_PROJECT_RULES, REACT_DOCTOR_RULES, REACT_DOCTOR_RULE_REGISTRY, REACT_DOCTOR_SCAN_RULES, classifySecurityScanFile, collectCrossFileDependencyProbes, resetManifestCaches, shouldReadSecurityScanContent } from "oxlint-plugin-react-doctor/core";
13
14
  import * as Crypto from "node:crypto";
14
15
  import crypto, { createHash, randomUUID } from "node:crypto";
@@ -1883,7 +1884,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1883
1884
  module.exports = picomatch;
1884
1885
  }));
1885
1886
  //#endregion
1886
- //#region ../core/dist/collect-unplugin-auto-import-global-scopes-Dno9RW5R.js
1887
+ //#region ../core/dist/collect-unplugin-auto-import-global-scopes-hOS9iAJg.js
1887
1888
  var import_picomatch = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
1888
1889
  const pico = require_picomatch$1();
1889
1890
  const utils = require_utils();
@@ -2164,6 +2165,7 @@ const ES_TARGET_YEAR_BY_NAME = {
2164
2165
  * compiler options — the root config first, then a monorepo base config.
2165
2166
  */
2166
2167
  const TSCONFIG_FILENAMES = ["tsconfig.json", "tsconfig.base.json"];
2168
+ const DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS = [".react-doctor", "audit-backups"];
2167
2169
  /**
2168
2170
  * Project-config files that `StagedFiles.materialize` copies into
2169
2171
  * the temp directory alongside staged sources so oxlint resolves
@@ -2396,6 +2398,74 @@ const compileGlobPatternsLenient = (patterns, onInvalid) => {
2396
2398
  }
2397
2399
  return compiled;
2398
2400
  };
2401
+ const isOxcAstNode = (value) => Boolean(value) && typeof value === "object" && typeof value.type === "string";
2402
+ const getStaticModuleSpecifier = (value) => {
2403
+ if (!isOxcAstNode(value)) return void 0;
2404
+ if (typeof value.value === "string") return value.value;
2405
+ if (value.type === "TemplateLiteral" && Array.isArray(value.expressions) && value.expressions.length === 0 && Array.isArray(value.quasis) && isOxcAstNode(value.quasis[0]) && value.quasis[0].value && typeof value.quasis[0].value === "object" && "cooked" in value.quasis[0].value && typeof value.quasis[0].value.cooked === "string") return value.quasis[0].value.cooked;
2406
+ };
2407
+ const collectStaticModuleSpecifiers = (sourceText, options = {}) => {
2408
+ const { filePath = "module.tsx", includeTypeOnly = true } = options;
2409
+ const parsedModule = parseSync(filePath, sourceText, { sourceType: "unambiguous" });
2410
+ const moduleSpecifiers = /* @__PURE__ */ new Set();
2411
+ const addSpecifier = (value) => {
2412
+ const moduleSpecifier = getStaticModuleSpecifier(value);
2413
+ if (moduleSpecifier) moduleSpecifiers.add(moduleSpecifier);
2414
+ };
2415
+ const visitNode = (value) => {
2416
+ if (Array.isArray(value)) {
2417
+ for (const child of value) visitNode(child);
2418
+ return;
2419
+ }
2420
+ if (!isOxcAstNode(value)) return;
2421
+ if (value.type === "ImportDeclaration") {
2422
+ const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
2423
+ const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.importKind !== "type");
2424
+ if (includeTypeOnly || value.importKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
2425
+ } else if (value.type === "ExportNamedDeclaration") {
2426
+ const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
2427
+ const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.exportKind !== "type");
2428
+ if (includeTypeOnly || value.exportKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
2429
+ } else if (value.type === "ExportAllDeclaration" || value.type === "ImportExpression") {
2430
+ if (includeTypeOnly || value.exportKind !== "type") addSpecifier(value.source);
2431
+ } else if (value.type === "TSImportType") {
2432
+ if (includeTypeOnly) addSpecifier(value.source);
2433
+ } else if (value.type === "TSExternalModuleReference") addSpecifier(value.expression);
2434
+ else if (value.type === "CallExpression" && isOxcAstNode(value.callee) && value.callee.type === "Identifier" && value.callee.name === "require" && Array.isArray(value.arguments) && value.arguments.length > 0) addSpecifier(value.arguments[0]);
2435
+ for (const child of Object.values(value)) visitNode(child);
2436
+ };
2437
+ visitNode(parsedModule.program);
2438
+ return moduleSpecifiers;
2439
+ };
2440
+ const toPosixPath = (filePath) => filePath.replace(/\\/g, "/");
2441
+ const isPathInsideDirectoryOrEqual = (candidatePath, directoryPath) => {
2442
+ const normalizedCandidatePath = posix.normalize(toPosixPath(candidatePath));
2443
+ const normalizedDirectoryPath = posix.normalize(toPosixPath(directoryPath));
2444
+ const relativePath = posix.relative(normalizedDirectoryPath, normalizedCandidatePath);
2445
+ return relativePath === "" || relativePath !== ".." && !relativePath.startsWith("../") && !posix.isAbsolute(relativePath);
2446
+ };
2447
+ const RESOLVABLE_EXTENSIONS = [
2448
+ ".ts",
2449
+ ".tsx",
2450
+ ".js",
2451
+ ".jsx",
2452
+ ".mjs",
2453
+ ".mts",
2454
+ ".cjs",
2455
+ ".cts",
2456
+ ".es6"
2457
+ ];
2458
+ const resolveEntryWithExtensions = (basePath) => {
2459
+ if (existsSync(basePath)) return basePath;
2460
+ for (const extension of RESOLVABLE_EXTENSIONS) {
2461
+ const withExtension = basePath + extension;
2462
+ if (existsSync(withExtension)) return withExtension;
2463
+ }
2464
+ for (const extension of RESOLVABLE_EXTENSIONS) {
2465
+ const indexCandidate = join(basePath, `index${extension}`);
2466
+ if (existsSync(indexCandidate)) return indexCandidate;
2467
+ }
2468
+ };
2399
2469
  /**
2400
2470
  * Resolves a path to its canonical, symlink-free form, falling back to
2401
2471
  * the input when it cannot be realpath'd (broken symlink, permission
@@ -53516,7 +53586,7 @@ const await_ = fiberAwait;
53516
53586
  * @category combinators
53517
53587
  * @since 2.0.0
53518
53588
  */
53519
- const join = fiberJoin;
53589
+ const join$1 = fiberJoin;
53520
53590
  /**
53521
53591
  * Interrupts a fiber, causing it to stop executing and clean up any
53522
53592
  * acquired resources.
@@ -55513,7 +55583,7 @@ const mapEffectConcurrent = (self, f, options) => fromTransformBracket(fnUntrace
55513
55583
  const fiber = runFork(f(value, i++));
55514
55584
  trackFiber(fiber);
55515
55585
  fiber.addObserver(onExit);
55516
- return offer(effects, join(fiber));
55586
+ return offer(effects, join$1(fiber));
55517
55587
  }), forever({ disableYield: true }), catchCause$1((cause) => offer(effects, failCause$3(cause)).pipe(andThen(failCause$1(effects, cause)))), forkIn(forkedScope));
55518
55588
  }
55519
55589
  return take(queue);
@@ -55839,9 +55909,9 @@ const mergeAll = /* @__PURE__ */ dual(2, (channels, { bufferSize = 16, concurren
55839
55909
  if (semaphore) if (fibers.size < concurrencyN) yield* semaphore.take(1);
55840
55910
  else {
55841
55911
  pullFiber = yield* forkChild(pull);
55842
- yield* raceFirst(semaphore.take(1), andThen(join(pullFiber), never));
55912
+ yield* raceFirst(semaphore.take(1), andThen(join$1(pullFiber), never));
55843
55913
  }
55844
- const channel = pullFiber === void 0 ? yield* pull : yield* join(pullFiber);
55914
+ const channel = pullFiber === void 0 ? yield* pull : yield* join$1(pullFiber);
55845
55915
  const childScope = forkUnsafe(forkedScope);
55846
55916
  const childPull = yield* toTransform(channel)(upstream, childScope);
55847
55917
  while (fibers.size >= concurrencyN) {
@@ -69758,18 +69828,58 @@ const METRO_CONFIG_FILE_NAMES = [
69758
69828
  const EXPO_METRO_CONFIG_EXTEND_SIGNALS = [
69759
69829
  "expo/metro-config",
69760
69830
  "@sentry/react-native/metro",
69761
- "getSentryExpoConfig"
69831
+ "getSentryExpoConfig",
69832
+ "posthog-react-native/metro",
69833
+ "getPostHogExpoConfig"
69762
69834
  ];
69835
+ const resolveLocalMetroConfigModule = (moduleSpecifier, importingFilePath, rootDirectory) => {
69836
+ if (!moduleSpecifier.startsWith(".")) return void 0;
69837
+ const importedPath = path$1$1.resolve(path$1$1.dirname(importingFilePath), moduleSpecifier);
69838
+ const candidateBasePaths = [
69839
+ importedPath,
69840
+ importedPath.replace(/\.[cm]?js$/, ""),
69841
+ path$1$1.join(importedPath, "index")
69842
+ ];
69843
+ for (const candidateBasePath of candidateBasePaths) {
69844
+ const resolvedPath = resolveEntryWithExtensions(candidateBasePath);
69845
+ if (resolvedPath !== void 0 && isFile(resolvedPath) && isPathInsideDirectoryOrEqual(resolvedPath, rootDirectory)) return resolvedPath;
69846
+ }
69847
+ };
69848
+ const hasExpoMetroConfigSignal = (metroConfigPath, rootDirectory) => {
69849
+ const pendingFilePaths = [metroConfigPath];
69850
+ const visitedFilePaths = /* @__PURE__ */ new Set();
69851
+ while (pendingFilePaths.length > 0) {
69852
+ const currentFilePath = pendingFilePaths.pop();
69853
+ if (currentFilePath === void 0 || visitedFilePaths.has(currentFilePath)) continue;
69854
+ if (visitedFilePaths.size >= 100) return true;
69855
+ visitedFilePaths.add(currentFilePath);
69856
+ let contents;
69857
+ try {
69858
+ contents = fs$1$3.readFileSync(currentFilePath, "utf-8");
69859
+ } catch {
69860
+ return true;
69861
+ }
69862
+ if (EXPO_METRO_CONFIG_EXTEND_SIGNALS.some((signal) => contents.includes(signal))) return true;
69863
+ let moduleSpecifiers;
69864
+ try {
69865
+ moduleSpecifiers = collectStaticModuleSpecifiers(contents, {
69866
+ filePath: currentFilePath,
69867
+ includeTypeOnly: false
69868
+ });
69869
+ } catch {
69870
+ continue;
69871
+ }
69872
+ for (const moduleSpecifier of moduleSpecifiers) {
69873
+ const localModulePath = resolveLocalMetroConfigModule(moduleSpecifier, currentFilePath, rootDirectory);
69874
+ if (localModulePath !== void 0 && !visitedFilePaths.has(localModulePath)) pendingFilePaths.push(localModulePath);
69875
+ }
69876
+ }
69877
+ return false;
69878
+ };
69763
69879
  const checkExpoMetroConfig = (context) => {
69764
69880
  const metroConfigPath = METRO_CONFIG_FILE_NAMES.map((fileName) => path$1$1.join(context.rootDirectory, fileName)).find((candidatePath) => isFile(candidatePath));
69765
69881
  if (metroConfigPath === void 0) return [];
69766
- let contents;
69767
- try {
69768
- contents = fs$1$3.readFileSync(metroConfigPath, "utf-8");
69769
- } catch {
69770
- return [];
69771
- }
69772
- if (EXPO_METRO_CONFIG_EXTEND_SIGNALS.some((signal) => contents.includes(signal))) return [];
69882
+ if (hasExpoMetroConfigSignal(metroConfigPath, context.rootDirectory)) return [];
69773
69883
  return [buildExpoDiagnostic({
69774
69884
  rule: "expo-metro-config",
69775
69885
  filePath: path$1$1.basename(metroConfigPath),
@@ -73189,6 +73299,19 @@ const detectUserLintConfigPaths = (rootDirectory) => {
73189
73299
  return [];
73190
73300
  };
73191
73301
  const DISABLE_DIRECTIVE_PATTERN = /(eslint|oxlint)-disable/;
73302
+ const getBackupRootDirectory = (rootDirectory) => path$1$1.join(rootDirectory, ...DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS);
73303
+ const getBackupPath = (rootDirectory, absolutePath) => {
73304
+ if (!isPathInsideDirectory(absolutePath, rootDirectory)) return null;
73305
+ return path$1$1.join(getBackupRootDirectory(rootDirectory), path$1$1.relative(rootDirectory, absolutePath));
73306
+ };
73307
+ const removeBackupRootIfEmpty = (rootDirectory) => {
73308
+ const backupRootDirectory = getBackupRootDirectory(rootDirectory);
73309
+ if (!walkSourceTreeFiles(backupRootDirectory).next().done) return;
73310
+ fs$1$3.rmSync(backupRootDirectory, {
73311
+ recursive: true,
73312
+ force: true
73313
+ });
73314
+ };
73192
73315
  const neutralizedFileLeases = /* @__PURE__ */ new Map();
73193
73316
  const activeNeutralizationInitializations = /* @__PURE__ */ new Set();
73194
73317
  const directoriesOverlap = (left, right) => {
@@ -73280,8 +73403,50 @@ const collectNeutralizationCandidatePaths = (rootDirectory, discoveredRelativePa
73280
73403
  }
73281
73404
  return candidatePaths;
73282
73405
  };
73406
+ const recoverOrphanedBackups = (rootDirectory) => {
73407
+ const blockedPaths = /* @__PURE__ */ new Set();
73408
+ const backupRootDirectory = getBackupRootDirectory(rootDirectory);
73409
+ for (const { absolutePath: backupPath } of walkSourceTreeFiles(backupRootDirectory)) {
73410
+ const originalPath = path$1$1.join(rootDirectory, path$1$1.relative(backupRootDirectory, backupPath));
73411
+ if (neutralizedFileLeases.has(originalPath)) continue;
73412
+ let backupContent;
73413
+ let currentContent;
73414
+ try {
73415
+ backupContent = fs$1$3.readFileSync(backupPath, "utf-8");
73416
+ currentContent = fs$1$3.readFileSync(originalPath, "utf-8");
73417
+ } catch (error) {
73418
+ process.stderr.write(`[react-doctor] Could not recover ${originalPath}: ${messageFromUnknown(error)}. The backup remains at ${backupPath}.\n`);
73419
+ blockedPaths.add(originalPath);
73420
+ continue;
73421
+ }
73422
+ if (currentContent === backupContent) {
73423
+ try {
73424
+ fs$1$3.rmSync(backupPath);
73425
+ } catch (error) {
73426
+ process.stderr.write(`[react-doctor] Failed to delete stale backup ${backupPath}: ${messageFromUnknown(error)}\n`);
73427
+ blockedPaths.add(originalPath);
73428
+ }
73429
+ continue;
73430
+ }
73431
+ if (currentContent !== neutralizeContent(backupContent)) {
73432
+ process.stderr.write(`[react-doctor] Did not overwrite changed file ${originalPath}. Recover it manually from ${backupPath}.\n`);
73433
+ blockedPaths.add(originalPath);
73434
+ continue;
73435
+ }
73436
+ try {
73437
+ fs$1$3.writeFileSync(originalPath, backupContent);
73438
+ fs$1$3.rmSync(backupPath);
73439
+ } catch (error) {
73440
+ process.stderr.write(`[react-doctor] Failed to restore ${originalPath} from backup: ${messageFromUnknown(error)}\n`);
73441
+ blockedPaths.add(originalPath);
73442
+ }
73443
+ }
73444
+ removeBackupRootIfEmpty(rootDirectory);
73445
+ return blockedPaths;
73446
+ };
73283
73447
  const neutralizeDisableDirectives = async (rootDirectory, includePaths, options = {}) => {
73284
73448
  const resolvedRootDirectory = fs$1$3.realpathSync(rootDirectory);
73449
+ const blockedPaths = /* @__PURE__ */ new Set();
73285
73450
  const leasedPaths = /* @__PURE__ */ new Set();
73286
73451
  let isRestored = false;
73287
73452
  const restore = () => {
@@ -73294,16 +73459,24 @@ const neutralizeDisableDirectives = async (rootDirectory, includePaths, options
73294
73459
  if (lease.referenceCount > 0) continue;
73295
73460
  neutralizedFileLeases.delete(absolutePath);
73296
73461
  try {
73297
- fs$1$3.writeFileSync(absolutePath, lease.originalContent);
73462
+ const currentContent = fs$1$3.readFileSync(absolutePath, "utf-8");
73463
+ if (currentContent !== lease.neutralizedContent && currentContent !== lease.originalContent) {
73464
+ process.stderr.write(`[react-doctor] Did not overwrite changed file ${absolutePath}. Recover it manually from ${lease.backupPath}.\n`);
73465
+ continue;
73466
+ }
73467
+ if (currentContent === lease.neutralizedContent) fs$1$3.writeFileSync(absolutePath, lease.originalContent);
73468
+ fs$1$3.rmSync(lease.backupPath, { force: true });
73298
73469
  } catch (error) {
73299
- process.stderr.write(`[react-doctor] Failed to restore inline disable directives in ${absolutePath}: ${messageFromUnknown(error)}\n[react-doctor] Run: git checkout -- ${absolutePath}\n`);
73470
+ process.stderr.write(`[react-doctor] Failed to restore inline disable directives in ${absolutePath}: ${messageFromUnknown(error)}. The backup remains at ${lease.backupPath}.\n`);
73300
73471
  }
73301
73472
  }
73473
+ removeBackupRootIfEmpty(resolvedRootDirectory);
73302
73474
  };
73303
73475
  const onExit = () => restore();
73304
73476
  process.once("exit", onExit);
73305
73477
  const leaseCandidatePath = (absolutePath) => {
73306
73478
  if (leasedPaths.has(absolutePath)) return;
73479
+ if (blockedPaths.has(absolutePath)) return;
73307
73480
  const existingLease = neutralizedFileLeases.get(absolutePath);
73308
73481
  if (existingLease) {
73309
73482
  existingLease.referenceCount += 1;
@@ -73318,9 +73491,20 @@ const neutralizeDisableDirectives = async (rootDirectory, includePaths, options
73318
73491
  }
73319
73492
  const neutralizedContent = neutralizeContent(originalContent);
73320
73493
  if (neutralizedContent !== originalContent) {
73494
+ const backupPath = getBackupPath(resolvedRootDirectory, absolutePath);
73495
+ if (backupPath === null) return;
73496
+ try {
73497
+ fs$1$3.mkdirSync(path$1$1.dirname(backupPath), { recursive: true });
73498
+ fs$1$3.writeFileSync(backupPath, originalContent, { flag: "wx" });
73499
+ } catch (error) {
73500
+ process.stderr.write(`[react-doctor] Did not modify ${absolutePath}: ${messageFromUnknown(error)}. Check ${backupPath}.\n`);
73501
+ return;
73502
+ }
73321
73503
  fs$1$3.writeFileSync(absolutePath, neutralizedContent);
73322
73504
  neutralizedFileLeases.set(absolutePath, {
73505
+ backupPath,
73323
73506
  originalContent,
73507
+ neutralizedContent,
73324
73508
  referenceCount: 1
73325
73509
  });
73326
73510
  leasedPaths.add(absolutePath);
@@ -73328,6 +73512,8 @@ const neutralizeDisableDirectives = async (rootDirectory, includePaths, options
73328
73512
  };
73329
73513
  try {
73330
73514
  await withOverlappingInitializationLock(resolvedRootDirectory, async () => {
73515
+ for (const blockedPath of recoverOrphanedBackups(resolvedRootDirectory)) blockedPaths.add(blockedPath);
73516
+ if (options.recoverOnly) return;
73331
73517
  for (const absolutePath of collectNeutralizationCandidatePaths(resolvedRootDirectory, [], includePaths)) if (neutralizedFileLeases.has(absolutePath)) leaseCandidatePath(absolutePath);
73332
73518
  const discoveredRelativePaths = await (options.findFiles ?? findFilesWithDisableDirectives)(resolvedRootDirectory, includePaths);
73333
73519
  for (const absolutePath of collectNeutralizationCandidatePaths(resolvedRootDirectory, discoveredRelativePaths, includePaths)) leaseCandidatePath(absolutePath);
@@ -75690,7 +75876,7 @@ const runOxlint = async (options) => {
75690
75876
  const pluginPath = resolvePluginPath();
75691
75877
  const extendsPaths = (adoptExistingLintConfig && !customRulesOnly ? detectUserLintConfigPaths(rootDirectory) : []).filter(canOxlintExtendConfig);
75692
75878
  const userPlugins = includedTags.size > 0 ? [] : resolveUserPlugins(userConfig?.plugins, configSourceDirectory);
75693
- const restoreDisableDirectives = respectInlineDisables ? () => {} : await neutralizeDisableDirectives(rootDirectory, includePaths ?? options.precomputedSourceFiles?.map((sourceFile) => sourceFile.path));
75879
+ const restoreDisableDirectives = await neutralizeDisableDirectives(rootDirectory, includePaths ?? options.precomputedSourceFiles?.map((sourceFile) => sourceFile.path), { recoverOnly: respectInlineDisables });
75694
75880
  const configDirectory = fs$1$3.mkdtempSync(path$1$1.join(os.tmpdir(), "react-doctor-oxlintrc-"));
75695
75881
  const configPath = path$1$1.join(configDirectory, "oxlintrc.json");
75696
75882
  try {
@@ -77132,9 +77318,9 @@ const runInspect = (input, hooks = {}) => gen(function* () {
77132
77318
  if (!lintFailureState.didFail) if (maintainabilityFailureState.didFail) yield* scanProgress.fail(MAINTAINABILITY_FAIL_TEXT);
77133
77319
  else if (input.suppressScanSummary) yield* scanProgress.stop();
77134
77320
  else yield* scanProgress.succeed(`Scanned ${scannedFilesLabel} in ${scanElapsedSeconds}s${workerCountSuffix}`);
77135
- const supplyChainResult = yield* join(supplyChainFiber);
77321
+ const supplyChainResult = yield* join$1(supplyChainFiber);
77136
77322
  const supplyChainCollected = supplyChainResult.diagnostics;
77137
- const securityScanCollected = yield* join(securityScanFiber);
77323
+ const securityScanCollected = yield* join$1(securityScanFiber);
77138
77324
  yield* reporterService.finalize;
77139
77325
  const finalDiagnostics = sortDiagnosticsStable(assignFixGroups([
77140
77326
  ...envCollected,
@@ -77143,7 +77329,7 @@ const runInspect = (input, hooks = {}) => gen(function* () {
77143
77329
  ...lintCollected,
77144
77330
  ...maintainabilityCollected
77145
77331
  ]));
77146
- const githubViewerPermission = yield* join(githubViewerPermissionFiber);
77332
+ const githubViewerPermission = yield* join$1(githubViewerPermissionFiber);
77147
77333
  const scoreMetadata = {
77148
77334
  ...repo !== null ? { repo } : {},
77149
77335
  ...sha !== null ? { sha } : {},
@@ -77993,4 +78179,4 @@ const toJsonReport = (result, options) => buildJsonReport({
77993
78179
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
77994
78180
 
77995
78181
  //# sourceMappingURL=index.js.map
77996
- //# debugId=8065a42b-3c73-5f92-8b4f-29cb68d77940
78182
+ //# debugId=d37422e0-941a-5fe0-81e5-bc092d5cd66e
@@ -1,18 +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]="0ff2ff1e-32e5-536d-8d5a-7f1fcd2f9880")}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-BA5ry-7d.js";
4
- import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-C9dZxrK_.js";
5
- import { r as flushSentry } from "./build-section-divider-8MOZLIsm.js";
6
- import { n as handleUserError, t as handleError } from "./handle-error-wbMFUdUK.js";
7
- import { t as reportErrorToSentry } from "./report-error-CFe3r9gh.js";
8
- import { A as runGitRaw, M as cliLogger, c as spinner, i as hasDoctorScript, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-jOg4qbkK.js";
9
- import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-C5OkC7nA.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-BVNh_icv.js";
11
- import { t as shouldSkipPrompts } from "./should-skip-prompts-B9za5uX9.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-CDwqCAPq.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-BoDN1Z77.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-W8P-PVpX.js";
15
- import { t as readObjectFile } from "./read-object-file-DOfcpaZX.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]="775801e2-4989-53ed-9be5-9d7c25e4c334")}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-D-lvwUld.js";
4
+ import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-BMf4C2Ho.js";
5
+ import { r as flushSentry } from "./build-section-divider-DQM0hZGG.js";
6
+ import { n as handleUserError, t as handleError } from "./handle-error-B6MY7nJt.js";
7
+ import { t as reportErrorToSentry } from "./report-error-R7qwdCqP.js";
8
+ import { A as runGitRaw, M as cliLogger, c as spinner, i as hasDoctorScript, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-1sBrw2pV.js";
9
+ import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-DHfC7l5M.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-Dzj_xz-v.js";
11
+ import { t as shouldSkipPrompts } from "./should-skip-prompts-JirKHNGh.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-xwJ4Hcnr.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-CAvwgr8H.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-C4TMh-1c.js";
15
+ import { t as readObjectFile } from "./read-object-file-BPlkYYY5.js";
16
16
  import * as path$1 from "node:path";
17
17
  import * as fs$1 from "node:fs";
18
18
  import { tmpdir } from "node:os";
@@ -1441,5 +1441,5 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
1441
1441
  //#endregion
1442
1442
  export { warnDeprecatedFailOn as n, runProjectMigrations as r, inspectAction as t };
1443
1443
 
1444
- //# sourceMappingURL=inspect-Bz2rayph.js.map
1445
- //# debugId=0ff2ff1e-32e5-536d-8d5a-7f1fcd2f9880
1444
+ //# sourceMappingURL=inspect-BDh9LRzm.js.map
1445
+ //# debugId=775801e2-4989-53ed-9be5-9d7c25e4c334
@@ -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]="c959c04c-1fe7-5e2a-88b8-0620b649b80b")}catch(e){}}();
3
- import { T as METRIC, t as recordCount, zn as runSync } from "./record-metric-BA5ry-7d.js";
4
- import { r as isExpectedUserError } from "./telemetry-runtime-C9dZxrK_.js";
5
- import { n as handleUserError, t as handleError } from "./handle-error-wbMFUdUK.js";
6
- import { t as reportErrorToSentry } from "./report-error-CFe3r9gh.js";
7
- import { t as printBrandedHeader } from "./print-branded-header-_cUJmAUD.js";
8
- import { n as runInstallReactDoctor } from "./install-react-doctor-W8P-PVpX.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]="c8a0a212-d4aa-54d1-a0f6-eb4f5fcfe94b")}catch(e){}}();
3
+ import { T as METRIC, t as recordCount, zn as runSync } from "./record-metric-D-lvwUld.js";
4
+ import { r as isExpectedUserError } from "./telemetry-runtime-BMf4C2Ho.js";
5
+ import { n as handleUserError, t as handleError } from "./handle-error-B6MY7nJt.js";
6
+ import { t as reportErrorToSentry } from "./report-error-R7qwdCqP.js";
7
+ import { t as printBrandedHeader } from "./print-branded-header-DA3lha5-.js";
8
+ import { n as runInstallReactDoctor } from "./install-react-doctor-C4TMh-1c.js";
9
9
  //#region src/cli/commands/install.ts
10
10
  const installAction = async (options, command) => {
11
11
  recordCount(METRIC.cliInvoked, 1, { command: "install" });
@@ -29,5 +29,5 @@ const installAction = async (options, command) => {
29
29
  //#endregion
30
30
  export { installAction };
31
31
 
32
- //# sourceMappingURL=install-DdckCi3Z.js.map
33
- //# debugId=c959c04c-1fe7-5e2a-88b8-0620b649b80b
32
+ //# sourceMappingURL=install-DyTkOJfe.js.map
33
+ //# debugId=c8a0a212-d4aa-54d1-a0f6-eb4f5fcfe94b
@@ -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]="57867c48-777a-5ada-a6e5-24851fc876c5")}catch(e){}}();
3
- import { B as isNonInteractiveEnvironment, Cn as error$1, En as warn, Kt as highlighter, Tn as log, k as RUN_GIT_MAX_BUFFER_BYTES, wn as info$1, zn as runSync } from "./record-metric-BA5ry-7d.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]="189ed2dc-7aec-5caf-a85f-fbb997324e58")}catch(e){}}();
3
+ import { B as isNonInteractiveEnvironment, Cn as error$1, En as warn, Kt as highlighter, Tn as log, k as RUN_GIT_MAX_BUFFER_BYTES, wn as info$1, zn as runSync } from "./record-metric-D-lvwUld.js";
4
4
  import { a as chalk, i as stripAnsi, t as eastAsianWidth } from "./get-east-asian-width-Cglw13G7.js";
5
5
  import { execFileSync } from "node:child_process";
6
6
  import * as path$1 from "node:path";
@@ -2805,5 +2805,5 @@ const installReactDoctorScriptStep = (projectRoot) => {
2805
2805
  //#endregion
2806
2806
  export { runGitRaw as A, isRecord as C, readPackageJson as D, packageHasRecordKey as E, cliLogger as M, resolveGitPath as O, getPackageJsonPath as S, packageHasNestedRecordKey as T, REACT_DOCTOR_COMMAND as _, installReactDoctorScriptStep as a, VITE_PLUS_HOOKS_PATH as b, spinner as c, HUSKY_HOOKS_PATH as d, LEFTHOOK_CONFIG_FILES as f, PRE_COMMIT_CONFIG_FILE as g, OVERCOMMIT_CONFIG_FILE as h, hasDoctorScript as i, writeJsonFile as j, runGit as k, HOOK_FILE_NAME as l, NON_BLOCKING_REACT_DOCTOR_COMMAND as m, findNearestPackageDirectory as n, isSpinnerSilent as o, LEGACY_HOOK_RUNNER_RELATIVE_PATH as p, hasDoctorDependency as r, setSpinnerSilent as s, DOCTOR_PACKAGE_NAME as t, HOOK_RELATIVE_PATH as u, SIMPLE_GIT_HOOKS_CONFIG_FILE as v, packageHasDependency as w, ensureTrailingNewline as x, SIMPLE_GIT_HOOKS_PACKAGE_JSON_KEY as y };
2807
2807
 
2808
- //# sourceMappingURL=install-doctor-script-jOg4qbkK.js.map
2809
- //# debugId=57867c48-777a-5ada-a6e5-24851fc876c5
2808
+ //# sourceMappingURL=install-doctor-script-1sBrw2pV.js.map
2809
+ //# debugId=189ed2dc-7aec-5caf-a85f-fbb997324e58
@@ -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]="95134df8-f002-56ab-bbec-4c0006159414")}catch(e){}}();
3
- import { w as GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS } from "./record-metric-BA5ry-7d.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]="a80f813b-ba97-586c-b8da-812eea59e733")}catch(e){}}();
3
+ import { w as GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS } from "./record-metric-D-lvwUld.js";
4
4
  import { t as unrefStdin } from "./unref-stdin-BKT_s38a.js";
5
- import { M as cliLogger } from "./install-doctor-script-jOg4qbkK.js";
5
+ import { M as cliLogger } from "./install-doctor-script-1sBrw2pV.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-C5OkC7nA.js.map
267
- //# debugId=95134df8-f002-56ab-bbec-4c0006159414
266
+ //# sourceMappingURL=install-github-workflow-DHfC7l5M.js.map
267
+ //# debugId=a80f813b-ba97-586c-b8da-812eea59e733
@@ -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]="069dfd06-20be-524a-b16a-b9c44688df56")}catch(e){}}();
3
- import { C as CI_TRUST_COMPANIES, Kt as highlighter, T as METRIC, br as isErrnoException, cr as GITHUB_ACTIONS_SETUP_URL, gr as SKILL_NAME, t as recordCount, z as CliInputError } from "./record-metric-BA5ry-7d.js";
4
- import { C as isRecord, D as readPackageJson, E as packageHasRecordKey, M as cliLogger, O as resolveGitPath, S as getPackageJsonPath, T as packageHasNestedRecordKey, _ as REACT_DOCTOR_COMMAND, a as installReactDoctorScriptStep, b as VITE_PLUS_HOOKS_PATH, c as spinner, d as HUSKY_HOOKS_PATH, f as LEFTHOOK_CONFIG_FILES, g as PRE_COMMIT_CONFIG_FILE, h as OVERCOMMIT_CONFIG_FILE, j as writeJsonFile, k as runGit, l as HOOK_FILE_NAME, m as NON_BLOCKING_REACT_DOCTOR_COMMAND, n as findNearestPackageDirectory, p as LEGACY_HOOK_RUNNER_RELATIVE_PATH, r as hasDoctorDependency, t as DOCTOR_PACKAGE_NAME, u as HOOK_RELATIVE_PATH, w as packageHasDependency, x as ensureTrailingNewline } from "./install-doctor-script-jOg4qbkK.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-C5OkC7nA.js";
6
- import { t as shouldSkipPrompts } from "./should-skip-prompts-B9za5uX9.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-BoDN1Z77.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]="96fd1802-af3f-5979-9031-8ae27f944fef")}catch(e){}}();
3
+ import { C as CI_TRUST_COMPANIES, Kt as highlighter, T as METRIC, br as isErrnoException, cr as GITHUB_ACTIONS_SETUP_URL, gr as SKILL_NAME, t as recordCount, z as CliInputError } from "./record-metric-D-lvwUld.js";
4
+ import { C as isRecord, D as readPackageJson, E as packageHasRecordKey, M as cliLogger, O as resolveGitPath, S as getPackageJsonPath, T as packageHasNestedRecordKey, _ as REACT_DOCTOR_COMMAND, a as installReactDoctorScriptStep, b as VITE_PLUS_HOOKS_PATH, c as spinner, d as HUSKY_HOOKS_PATH, f as LEFTHOOK_CONFIG_FILES, g as PRE_COMMIT_CONFIG_FILE, h as OVERCOMMIT_CONFIG_FILE, j as writeJsonFile, k as runGit, l as HOOK_FILE_NAME, m as NON_BLOCKING_REACT_DOCTOR_COMMAND, n as findNearestPackageDirectory, p as LEGACY_HOOK_RUNNER_RELATIVE_PATH, r as hasDoctorDependency, t as DOCTOR_PACKAGE_NAME, u as HOOK_RELATIVE_PATH, w as packageHasDependency, x as ensureTrailingNewline } from "./install-doctor-script-1sBrw2pV.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-DHfC7l5M.js";
6
+ import { t as shouldSkipPrompts } from "./should-skip-prompts-JirKHNGh.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-CAvwgr8H.js";
8
8
  import { execFile } from "node:child_process";
9
9
  import * as path$1 from "node:path";
10
10
  import * as fs$1 from "node:fs";
@@ -1152,5 +1152,5 @@ const runInstallReactDoctor = async (options = {}) => {
1152
1152
  //#endregion
1153
1153
  export { askUpgradeActionVersion as a, recordCiPromptDecision as c, installReactDoctorAgentHooks as i, hasHandledActionUpgrade as l, runInstallReactDoctor as n, askAddToGitHubActions as o, findAgentsWithOutdatedReactDoctorHooks as r, hasHandledCiPrompt as s, getSkillSourceDirectory as t, recordActionUpgradeDecision as u };
1154
1154
 
1155
- //# sourceMappingURL=install-react-doctor-W8P-PVpX.js.map
1156
- //# debugId=069dfd06-20be-524a-b16a-b9c44688df56
1155
+ //# sourceMappingURL=install-react-doctor-C4TMh-1c.js.map
1156
+ //# debugId=96fd1802-af3f-5979-9031-8ae27f944fef
@@ -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]="98f319a0-7a80-548a-a24a-a4152d2fa8ec")}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]="5cb3e8e4-7ffb-5908-8720-787f1bc532fa")}catch(e){}}();
3
3
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
4
- import { T as METRIC, t as recordCount } from "./record-metric-BA5ry-7d.js";
5
- import { n as registerActiveTuiRenderer, t as exitGracefully } from "./exit-gracefully-B9tEGAKH.js";
4
+ import { T as METRIC, t as recordCount } from "./record-metric-D-lvwUld.js";
5
+ import { n as registerActiveTuiRenderer, t as exitGracefully } from "./exit-gracefully-A-YLrXTL.js";
6
6
  import { a as chalk, i as stripAnsi, n as isFullWidth$1, r as isWide$1 } from "./get-east-asian-width-Cglw13G7.js";
7
7
  import { EventEmitter } from "node:events";
8
8
  import { execFileSync } from "node:child_process";
@@ -25869,5 +25869,5 @@ var require_jsx_runtime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
25869
25869
  //#endregion
25870
25870
  export { useExitOnCtrlC as a, Spinner as c, useInput as d, Transform as f, Box as h, import_react as i, useStdout as l, Text as m, registerMountedTuiRenderer as n, terminalSymbols as o, render as p, useStdoutDimensions as r, isPrintableInput as s, require_jsx_runtime as t, useApp as u };
25871
25871
 
25872
- //# sourceMappingURL=jsx-runtime-0eiF0jis.js.map
25873
- //# debugId=98f319a0-7a80-548a-a24a-a4152d2fa8ec
25872
+ //# sourceMappingURL=jsx-runtime-dEetRYud.js.map
25873
+ //# debugId=5cb3e8e4-7ffb-5908-8720-787f1bc532fa
@@ -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]="f62d0690-4f31-5dc5-9bb6-df2bfd727803")}catch(e){}}();
3
- import { An as gen, Kt as highlighter, Tn as log, _ as VERSION } from "./record-metric-BA5ry-7d.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]="da70fccf-e903-5b71-b6b8-42b66d683ffe")}catch(e){}}();
3
+ import { An as gen, Kt as highlighter, Tn as log, _ as VERSION } from "./record-metric-D-lvwUld.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-_cUJmAUD.js.map
22
- //# debugId=f62d0690-4f31-5dc5-9bb6-df2bfd727803
21
+ //# sourceMappingURL=print-branded-header-DA3lha5-.js.map
22
+ //# debugId=da70fccf-e903-5b71-b6b8-42b66d683ffe