react-doctor 0.9.12-dev.0b670aa → 0.9.12-dev.17eeeb5

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 (45) hide show
  1. package/README.md +27 -0
  2. package/dist/active-run-trace-dlIZeEvb.js +18 -0
  3. package/dist/active-scan-abort-registry-DwG6tSPy.js +28 -0
  4. package/dist/{build-section-divider-CJ7k-BvF.js → build-section-divider-BDYPL_eD.js} +8 -22
  5. package/dist/{ci-Dannv-cF.js → ci-CLweWoSO.js} +12 -11
  6. package/dist/cli.js +78 -25
  7. package/dist/{design-9x5DReyL.js → design-hvKp9nch.js} +4 -4
  8. package/dist/{devtools-D8NTVj81.js → devtools-BiC-AP3B.js} +3 -3
  9. package/dist/{exit-gracefully-ti2wONpM.js → exit-gracefully-B-1ENvv3.js} +15 -9
  10. package/dist/get-east-asian-width-Cglw13G7.js +444 -0
  11. package/dist/{report-error-BlOAg03W.js → handle-error-jFIvEp6w.js} +18 -68
  12. package/dist/index.d.ts +34 -2
  13. package/dist/index.js +541 -226
  14. package/dist/{inspect-C3itFiEW.js → inspect-zNSaV3x7.js} +17 -16
  15. package/dist/{install-CjIJL6S5.js → install-DOChsLa3.js} +9 -8
  16. package/dist/{install-doctor-script-0sdZ4SY8.js → install-doctor-script-CB3rzH2z.js} +7 -449
  17. package/dist/{install-github-workflow-DQ8_lhAW.js → install-github-workflow-4va-bXLD.js} +6 -6
  18. package/dist/{install-react-doctor-DRG8hdL4.js → install-react-doctor-DybBa66H.js} +8 -8
  19. package/dist/{run-scan-app-Cgn4ELJF.js → jsx-runtime-3Qslm5lp.js} +280 -2769
  20. package/dist/{print-branded-header-Dc1KdrcV.js → print-branded-header-CBz3phhz.js} +4 -4
  21. package/dist/project-analysis-worker.js +54 -53
  22. package/dist/prompt-runtime-scan-url-BEM1tLea.js +240 -0
  23. package/dist/{read-object-file-rblJxHxN.js → read-object-file-CiyabIJq.js} +4 -4
  24. package/dist/{record-metric-Dgg2b2LG.js → record-metric-CKATohPd.js} +538 -202
  25. package/dist/report-error-CLaeUz0Z.js +64 -0
  26. package/dist/{report-workflow-result-Dp4dCUxw.js → report-workflow-result-DETw1-uc.js} +5 -5
  27. package/dist/{resolve-scope-CbeXgE9z.js → resolve-scope-f50BTOG5.js} +6 -6
  28. package/dist/{rules-ClDrNCc3.js → rules-BFhRES4z.js} +6 -6
  29. package/dist/run-scan-app-DeFp4V_O.js +2509 -0
  30. package/dist/runtime-scan/browser-probe.iife.js +855 -0
  31. package/dist/runtime-scan-1RfHCWSQ.js +770 -0
  32. package/dist/sanitize-runtime-url-BwjI6NyA.js +76 -0
  33. package/dist/{scan-Caa_ogFB.js → scan-C3z3hNIf.js} +10 -22
  34. package/dist/{should-fail-scan-gate-BGzNJApW.js → should-fail-scan-gate-CvMuzyga.js} +23 -114
  35. package/dist/{should-skip-prompts-Bbl0ToUI.js → should-skip-prompts-D2e2bDpU.js} +4 -4
  36. package/dist/should-use-tui-CZZLd4FI.js +25 -0
  37. package/dist/skills/improve-threejs/SKILL.md +102 -0
  38. package/dist/skills/performance/SKILL.md +113 -0
  39. package/dist/skills/react-doctor/SKILL.md +6 -0
  40. package/dist/{unref-stdin-C7d7_3va.js → telemetry-runtime-DR5E6MwL.js} +55 -25
  41. package/dist/unref-stdin-BKT_s38a.js +12 -0
  42. package/dist/{version-Bjql-CLM.js → version-DSgMpAfY.js} +4 -4
  43. package/dist/{why-BqG2EML8.js → why-DYzc2wtg.js} +4 -4
  44. package/dist/with-run-span-CbGd8CLE.js +110 -0
  45. package/package.json +7 -4
@@ -1,15 +1,16 @@
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]="2be4cfbe-6b97-51f6-b632-227d36a7e5cf")}catch(e){}}();
3
- import { i as __toESM$1, r as __require, t as __commonJSMin$1 } from "./chunk-ChKA3wi6.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]="e95aac53-faf7-5068-ba74-9ec3861cf20c")}catch(e){}}();
3
+ import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
4
4
  import { n as require_picomatch, t as require_semver } from "./semver-DFtnEmN-.js";
5
5
  import { createRequire } from "node:module";
6
6
  import * as NodeChildProcess from "node:child_process";
7
7
  import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
8
8
  import * as path$1$1 from "node:path";
9
- import path from "node:path";
9
+ import path, { join, posix } from "node:path";
10
10
  import * as fs$1$3 from "node:fs";
11
- import fs from "node:fs";
11
+ import fs, { existsSync } from "node:fs";
12
12
  import ts from "typescript";
13
+ import { parseSync } from "oxc-parser";
13
14
  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";
14
15
  import * as Crypto from "node:crypto";
15
16
  import crypto, { createHash, randomUUID } from "node:crypto";
@@ -26,8 +27,8 @@ import { convertToTSX } from "@astrojs/compiler/sync";
26
27
  import { STATUS_CODES } from "node:http";
27
28
  import { gzipSync } from "node:zlib";
28
29
  import { performance as performance$1 } from "node:perf_hooks";
29
- //#region ../core/dist/collect-unplugin-auto-import-global-scopes-Dno9RW5R.js
30
- var import_picomatch = /* @__PURE__ */ __toESM$1(require_picomatch(), 1);
30
+ //#region ../core/dist/collect-unplugin-auto-import-global-scopes-hOS9iAJg.js
31
+ var import_picomatch = /* @__PURE__ */ __toESM(require_picomatch(), 1);
31
32
  const HTML_FILE_PATTERN = /\.html$/i;
32
33
  const SOURCE_FILE_PATTERN = /\.(?:astro|tsx?|jsx?|mts|mjs|[hH][tT][mM][lL])$/;
33
34
  const GENERATED_BUNDLE_FILE_PATTERN = /\.(iife|umd|global|min)\.m?js$/i;
@@ -311,6 +312,7 @@ const ES_TARGET_YEAR_BY_NAME = {
311
312
  * compiler options — the root config first, then a monorepo base config.
312
313
  */
313
314
  const TSCONFIG_FILENAMES = ["tsconfig.json", "tsconfig.base.json"];
315
+ const DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS = [".react-doctor", "audit-backups"];
314
316
  /**
315
317
  * Project-config files that `StagedFiles.materialize` copies into
316
318
  * the temp directory alongside staged sources so oxlint resolves
@@ -570,6 +572,74 @@ const compileGlobPatternsLenient = (patterns, onInvalid) => {
570
572
  }
571
573
  return compiled;
572
574
  };
575
+ const isOxcAstNode = (value) => Boolean(value) && typeof value === "object" && typeof value.type === "string";
576
+ const getStaticModuleSpecifier = (value) => {
577
+ if (!isOxcAstNode(value)) return void 0;
578
+ if (typeof value.value === "string") return value.value;
579
+ 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;
580
+ };
581
+ const collectStaticModuleSpecifiers = (sourceText, options = {}) => {
582
+ const { filePath = "module.tsx", includeTypeOnly = true } = options;
583
+ const parsedModule = parseSync(filePath, sourceText, { sourceType: "unambiguous" });
584
+ const moduleSpecifiers = /* @__PURE__ */ new Set();
585
+ const addSpecifier = (value) => {
586
+ const moduleSpecifier = getStaticModuleSpecifier(value);
587
+ if (moduleSpecifier) moduleSpecifiers.add(moduleSpecifier);
588
+ };
589
+ const visitNode = (value) => {
590
+ if (Array.isArray(value)) {
591
+ for (const child of value) visitNode(child);
592
+ return;
593
+ }
594
+ if (!isOxcAstNode(value)) return;
595
+ if (value.type === "ImportDeclaration") {
596
+ const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
597
+ const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.importKind !== "type");
598
+ if (includeTypeOnly || value.importKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
599
+ } else if (value.type === "ExportNamedDeclaration") {
600
+ const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
601
+ const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.exportKind !== "type");
602
+ if (includeTypeOnly || value.exportKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
603
+ } else if (value.type === "ExportAllDeclaration" || value.type === "ImportExpression") {
604
+ if (includeTypeOnly || value.exportKind !== "type") addSpecifier(value.source);
605
+ } else if (value.type === "TSImportType") {
606
+ if (includeTypeOnly) addSpecifier(value.source);
607
+ } else if (value.type === "TSExternalModuleReference") addSpecifier(value.expression);
608
+ 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]);
609
+ for (const child of Object.values(value)) visitNode(child);
610
+ };
611
+ visitNode(parsedModule.program);
612
+ return moduleSpecifiers;
613
+ };
614
+ const toPosixPath = (filePath) => filePath.replace(/\\/g, "/");
615
+ const isPathInsideDirectoryOrEqual = (candidatePath, directoryPath) => {
616
+ const normalizedCandidatePath = posix.normalize(toPosixPath(candidatePath));
617
+ const normalizedDirectoryPath = posix.normalize(toPosixPath(directoryPath));
618
+ const relativePath = posix.relative(normalizedDirectoryPath, normalizedCandidatePath);
619
+ return relativePath === "" || relativePath !== ".." && !relativePath.startsWith("../") && !posix.isAbsolute(relativePath);
620
+ };
621
+ const RESOLVABLE_EXTENSIONS = [
622
+ ".ts",
623
+ ".tsx",
624
+ ".js",
625
+ ".jsx",
626
+ ".mjs",
627
+ ".mts",
628
+ ".cjs",
629
+ ".cts",
630
+ ".es6"
631
+ ];
632
+ const resolveEntryWithExtensions = (basePath) => {
633
+ if (existsSync(basePath)) return basePath;
634
+ for (const extension of RESOLVABLE_EXTENSIONS) {
635
+ const withExtension = basePath + extension;
636
+ if (existsSync(withExtension)) return withExtension;
637
+ }
638
+ for (const extension of RESOLVABLE_EXTENSIONS) {
639
+ const indexCandidate = join(basePath, `index${extension}`);
640
+ if (existsSync(indexCandidate)) return indexCandidate;
641
+ }
642
+ };
573
643
  /**
574
644
  * Resolves a path to its canonical, symlink-free form, falling back to
575
645
  * the input when it cannot be realpath'd (broken symlink, permission
@@ -22136,7 +22206,7 @@ Union([
22136
22206
  ]);
22137
22207
  //#endregion
22138
22208
  //#region ../../node_modules/.pnpm/baseline-browser-mapping@2.9.19/node_modules/baseline-browser-mapping/dist/index.cjs
22139
- var require_dist = /* @__PURE__ */ __commonJSMin$1(((exports) => {
22209
+ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
22140
22210
  const s = {
22141
22211
  chrome: { releases: [
22142
22212
  [
@@ -41386,7 +41456,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin$1(((exports) => {
41386
41456
  }));
41387
41457
  //#endregion
41388
41458
  //#region ../../node_modules/.pnpm/node-releases@2.0.27/node_modules/node-releases/data/processed/envs.json
41389
- var require_envs = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
41459
+ var require_envs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41390
41460
  module.exports = [
41391
41461
  {
41392
41462
  "name": "nodejs",
@@ -44168,7 +44238,7 @@ var require_envs = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
44168
44238
  }));
44169
44239
  //#endregion
44170
44240
  //#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/data/browsers.js
44171
- var require_browsers$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
44241
+ var require_browsers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
44172
44242
  module.exports = {
44173
44243
  A: "ie",
44174
44244
  B: "edge",
@@ -44193,12 +44263,12 @@ var require_browsers$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
44193
44263
  }));
44194
44264
  //#endregion
44195
44265
  //#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/unpacker/browsers.js
44196
- var require_browsers = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
44266
+ var require_browsers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
44197
44267
  module.exports.browsers = require_browsers$1();
44198
44268
  }));
44199
44269
  //#endregion
44200
44270
  //#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/data/browserVersions.js
44201
- var require_browserVersions$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
44271
+ var require_browserVersions$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
44202
44272
  module.exports = {
44203
44273
  "0": "117",
44204
44274
  "1": "118",
@@ -44450,12 +44520,12 @@ var require_browserVersions$1 = /* @__PURE__ */ __commonJSMin$1(((exports, modul
44450
44520
  }));
44451
44521
  //#endregion
44452
44522
  //#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/unpacker/browserVersions.js
44453
- var require_browserVersions = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
44523
+ var require_browserVersions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
44454
44524
  module.exports.browserVersions = require_browserVersions$1();
44455
44525
  }));
44456
44526
  //#endregion
44457
44527
  //#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/data/agents.js
44458
- var require_agents$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
44528
+ var require_agents$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
44459
44529
  module.exports = {
44460
44530
  A: {
44461
44531
  A: {
@@ -48824,7 +48894,7 @@ var require_agents$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
48824
48894
  }));
48825
48895
  //#endregion
48826
48896
  //#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/unpacker/agents.js
48827
- var require_agents = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
48897
+ var require_agents = /* @__PURE__ */ __commonJSMin(((exports, module) => {
48828
48898
  const browsers = require_browsers().browsers;
48829
48899
  const versions = require_browserVersions().browserVersions;
48830
48900
  const agentsData = require_agents$1();
@@ -48857,7 +48927,7 @@ var require_agents = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
48857
48927
  }));
48858
48928
  //#endregion
48859
48929
  //#region ../../node_modules/.pnpm/electron-to-chromium@1.5.286/node_modules/electron-to-chromium/versions.js
48860
- var require_versions = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
48930
+ var require_versions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
48861
48931
  module.exports = {
48862
48932
  "0.20": "39",
48863
48933
  "0.21": "41",
@@ -49091,7 +49161,7 @@ var require_versions = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
49091
49161
  }));
49092
49162
  //#endregion
49093
49163
  //#region ../../node_modules/.pnpm/node-releases@2.0.27/node_modules/node-releases/data/release-schedule/release-schedule.json
49094
- var require_release_schedule = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
49164
+ var require_release_schedule = /* @__PURE__ */ __commonJSMin(((exports, module) => {
49095
49165
  module.exports = {
49096
49166
  "v0.8": {
49097
49167
  "start": "2012-06-25",
@@ -49248,7 +49318,7 @@ var require_release_schedule = /* @__PURE__ */ __commonJSMin$1(((exports, module
49248
49318
  }));
49249
49319
  //#endregion
49250
49320
  //#region ../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/error.js
49251
- var require_error = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
49321
+ var require_error = /* @__PURE__ */ __commonJSMin(((exports, module) => {
49252
49322
  function BrowserslistError(message) {
49253
49323
  this.name = "BrowserslistError";
49254
49324
  this.message = message;
@@ -49260,7 +49330,7 @@ var require_error = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
49260
49330
  }));
49261
49331
  //#endregion
49262
49332
  //#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/lib/statuses.js
49263
- var require_statuses = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
49333
+ var require_statuses = /* @__PURE__ */ __commonJSMin(((exports, module) => {
49264
49334
  module.exports = {
49265
49335
  1: "ls",
49266
49336
  2: "rec",
@@ -49273,7 +49343,7 @@ var require_statuses = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
49273
49343
  }));
49274
49344
  //#endregion
49275
49345
  //#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/lib/supported.js
49276
- var require_supported = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
49346
+ var require_supported = /* @__PURE__ */ __commonJSMin(((exports, module) => {
49277
49347
  module.exports = {
49278
49348
  y: 1,
49279
49349
  n: 2,
@@ -49286,7 +49356,7 @@ var require_supported = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
49286
49356
  }));
49287
49357
  //#endregion
49288
49358
  //#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/unpacker/feature.js
49289
- var require_feature = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
49359
+ var require_feature = /* @__PURE__ */ __commonJSMin(((exports, module) => {
49290
49360
  const statuses = require_statuses();
49291
49361
  const supported = require_supported();
49292
49362
  const browsers = require_browsers().browsers;
@@ -49329,7 +49399,7 @@ var require_feature = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
49329
49399
  }));
49330
49400
  //#endregion
49331
49401
  //#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/unpacker/region.js
49332
- var require_region = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
49402
+ var require_region = /* @__PURE__ */ __commonJSMin(((exports, module) => {
49333
49403
  const browsers = require_browsers().browsers;
49334
49404
  function unpackRegion(packed) {
49335
49405
  return Object.keys(packed).reduce((list, browser) => {
@@ -49348,7 +49418,7 @@ var require_region = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
49348
49418
  }));
49349
49419
  //#endregion
49350
49420
  //#region ../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/node.js
49351
- var require_node = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
49421
+ var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
49352
49422
  var feature = require_feature().default;
49353
49423
  var region = require_region().default;
49354
49424
  var fs$2 = __require("fs");
@@ -49641,7 +49711,7 @@ var require_node = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
49641
49711
  }));
49642
49712
  //#endregion
49643
49713
  //#region ../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/parse.js
49644
- var require_parse = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
49714
+ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
49645
49715
  var AND_REGEXP = /^\s+and\s+(.*)/i;
49646
49716
  var OR_REGEXP = /^(?:,\s*|\s+or\s+)(.*)/i;
49647
49717
  function flatten(array) {
@@ -49707,7 +49777,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
49707
49777
  }));
49708
49778
  //#endregion
49709
49779
  //#region ../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/index.js
49710
- var require_browserslist = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
49780
+ var require_browserslist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
49711
49781
  var bbm = require_dist();
49712
49782
  var jsReleases = require_envs();
49713
49783
  var agents = require_agents().agents;
@@ -50729,8 +50799,8 @@ var require_browserslist = /* @__PURE__ */ __commonJSMin$1(((exports, module) =>
50729
50799
  }));
50730
50800
  //#endregion
50731
50801
  //#region ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Brand.js
50732
- var import_semver = /* @__PURE__ */ __toESM$1(require_semver(), 1);
50733
- var import_browserslist = /* @__PURE__ */ __toESM$1(require_browserslist(), 1);
50802
+ var import_semver = /* @__PURE__ */ __toESM(require_semver(), 1);
50803
+ var import_browserslist = /* @__PURE__ */ __toESM(require_browserslist(), 1);
50734
50804
  /**
50735
50805
  * Returns a `Constructor` that **does not apply any runtime checks** and just
50736
50806
  * returns the provided value.
@@ -60327,6 +60397,72 @@ const warn$1 = (...args) => consoleWith((console) => sync$2(() => {
60327
60397
  }));
60328
60398
  //#endregion
60329
60399
  //#region ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Cache.js
60400
+ var import_picocolors = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
60401
+ let p = process || {}, argv = p.argv || [], env = p.env || {};
60402
+ let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
60403
+ let formatter = (open, close, replace = open) => (input) => {
60404
+ let string = "" + input, index = string.indexOf(close, open.length);
60405
+ return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
60406
+ };
60407
+ let replaceClose = (string, close, replace, index) => {
60408
+ let result = "", cursor = 0;
60409
+ do {
60410
+ result += string.substring(cursor, index) + replace;
60411
+ cursor = index + close.length;
60412
+ index = string.indexOf(close, cursor);
60413
+ } while (~index);
60414
+ return result + string.substring(cursor);
60415
+ };
60416
+ let createColors = (enabled = isColorSupported) => {
60417
+ let f = enabled ? formatter : () => String;
60418
+ return {
60419
+ isColorSupported: enabled,
60420
+ reset: f("\x1B[0m", "\x1B[0m"),
60421
+ bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
60422
+ dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
60423
+ italic: f("\x1B[3m", "\x1B[23m"),
60424
+ underline: f("\x1B[4m", "\x1B[24m"),
60425
+ inverse: f("\x1B[7m", "\x1B[27m"),
60426
+ hidden: f("\x1B[8m", "\x1B[28m"),
60427
+ strikethrough: f("\x1B[9m", "\x1B[29m"),
60428
+ black: f("\x1B[30m", "\x1B[39m"),
60429
+ red: f("\x1B[31m", "\x1B[39m"),
60430
+ green: f("\x1B[32m", "\x1B[39m"),
60431
+ yellow: f("\x1B[33m", "\x1B[39m"),
60432
+ blue: f("\x1B[34m", "\x1B[39m"),
60433
+ magenta: f("\x1B[35m", "\x1B[39m"),
60434
+ cyan: f("\x1B[36m", "\x1B[39m"),
60435
+ white: f("\x1B[37m", "\x1B[39m"),
60436
+ gray: f("\x1B[90m", "\x1B[39m"),
60437
+ bgBlack: f("\x1B[40m", "\x1B[49m"),
60438
+ bgRed: f("\x1B[41m", "\x1B[49m"),
60439
+ bgGreen: f("\x1B[42m", "\x1B[49m"),
60440
+ bgYellow: f("\x1B[43m", "\x1B[49m"),
60441
+ bgBlue: f("\x1B[44m", "\x1B[49m"),
60442
+ bgMagenta: f("\x1B[45m", "\x1B[49m"),
60443
+ bgCyan: f("\x1B[46m", "\x1B[49m"),
60444
+ bgWhite: f("\x1B[47m", "\x1B[49m"),
60445
+ blackBright: f("\x1B[90m", "\x1B[39m"),
60446
+ redBright: f("\x1B[91m", "\x1B[39m"),
60447
+ greenBright: f("\x1B[92m", "\x1B[39m"),
60448
+ yellowBright: f("\x1B[93m", "\x1B[39m"),
60449
+ blueBright: f("\x1B[94m", "\x1B[39m"),
60450
+ magentaBright: f("\x1B[95m", "\x1B[39m"),
60451
+ cyanBright: f("\x1B[96m", "\x1B[39m"),
60452
+ whiteBright: f("\x1B[97m", "\x1B[39m"),
60453
+ bgBlackBright: f("\x1B[100m", "\x1B[49m"),
60454
+ bgRedBright: f("\x1B[101m", "\x1B[49m"),
60455
+ bgGreenBright: f("\x1B[102m", "\x1B[49m"),
60456
+ bgYellowBright: f("\x1B[103m", "\x1B[49m"),
60457
+ bgBlueBright: f("\x1B[104m", "\x1B[49m"),
60458
+ bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
60459
+ bgCyanBright: f("\x1B[106m", "\x1B[49m"),
60460
+ bgWhiteBright: f("\x1B[107m", "\x1B[49m")
60461
+ };
60462
+ };
60463
+ module.exports = createColors();
60464
+ module.exports.createColors = createColors;
60465
+ })))(), 1);
60330
60466
  /**
60331
60467
  * Caches values loaded by an Effect lookup function.
60332
60468
  *
@@ -62296,34 +62432,13 @@ function traceSegmentInternal(segments, memo, line, column, bias) {
62296
62432
  }
62297
62433
  //#endregion
62298
62434
  //#region ../core/dist/index.js
62299
- var __create = Object.create;
62300
- var __defProp = Object.defineProperty;
62301
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
62302
- var __getOwnPropNames = Object.getOwnPropertyNames;
62303
- var __getProtoOf = Object.getPrototypeOf;
62304
- var __hasOwnProp = Object.prototype.hasOwnProperty;
62305
- var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
62306
- var __copyProps = (to, from, except, desc) => {
62307
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
62308
- key = keys[i];
62309
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
62310
- get: ((k) => from[k]).bind(null, key),
62311
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
62312
- });
62313
- }
62314
- return to;
62315
- };
62316
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
62317
- value: mod,
62318
- enumerable: true
62319
- }) : target, mod));
62320
62435
  var ProjectNotFoundError = class extends Error {
62321
62436
  name = "ProjectNotFoundError";
62322
62437
  directory;
62323
62438
  kind;
62324
62439
  constructor(directory, options) {
62325
62440
  const kind = options?.kind ?? "no-project";
62326
- super(kind === "missing-path" ? `Scan target "${directory}" does not exist. Check the path and try again.` : `No React project found in ${directory}. Expected a package.json at the directory root or a nested package.json with a React dependency.`, options);
62441
+ super(kind === "missing-path" ? `Scan target "${directory}" does not exist. Check the path and try again.` : `No React or Three.js project found in ${directory}. Expected a package.json at the directory root or a nested package.json with a React or Three.js dependency.`, options);
62327
62442
  this.directory = directory;
62328
62443
  this.kind = kind;
62329
62444
  }
@@ -62357,7 +62472,7 @@ var AmbiguousProjectError = class extends Error {
62357
62472
  directory;
62358
62473
  candidates;
62359
62474
  constructor(directory, candidates, options) {
62360
- super(`Multiple React projects found under ${directory} (${candidates.length} candidates): ${candidates.join(", ")}. Re-run diagnose() with one of those subdirectories, or iterate them yourself.`, options);
62475
+ super(`Multiple React or Three.js projects found under ${directory} (${candidates.length} candidates): ${candidates.join(", ")}. Re-run diagnose() with one of those subdirectories, or iterate them yourself.`, options);
62361
62476
  this.directory = directory;
62362
62477
  this.candidates = candidates;
62363
62478
  }
@@ -63691,15 +63806,29 @@ const detectPreES2023Target = (directory) => {
63691
63806
  }
63692
63807
  return false;
63693
63808
  };
63809
+ const SHADCN_CONFIG_FILE_NAME = "components.json";
63810
+ const detectShadcnUi = (directory) => {
63811
+ if (isFile(path$1$1.join(directory, SHADCN_CONFIG_FILE_NAME))) return true;
63812
+ if (isProjectBoundary(directory)) return false;
63813
+ let ancestorDirectory = path$1$1.dirname(directory);
63814
+ while (ancestorDirectory !== path$1$1.dirname(ancestorDirectory)) {
63815
+ if (isFile(path$1$1.join(ancestorDirectory, SHADCN_CONFIG_FILE_NAME))) return true;
63816
+ if (isProjectBoundary(ancestorDirectory)) return false;
63817
+ ancestorDirectory = path$1$1.dirname(ancestorDirectory);
63818
+ }
63819
+ return false;
63820
+ };
63694
63821
  const FRAMEWORK_PACKAGES = {
63695
63822
  next: "nextjs",
63696
63823
  "@tanstack/react-start": "tanstack-start",
63697
63824
  "@remix-run/react": "remix",
63698
63825
  gatsby: "gatsby",
63699
63826
  astro: "astro",
63827
+ "@astrojs/react": "astro",
63700
63828
  vite: "vite",
63701
63829
  "react-scripts": "cra",
63702
63830
  expo: "expo",
63831
+ "expo-router": "expo",
63703
63832
  "react-native": "react-native"
63704
63833
  };
63705
63834
  const detectFramework = (dependencies) => {
@@ -64191,20 +64320,39 @@ const getDependencyDeclaration = ({ packageJson, packageName, sections }) => {
64191
64320
  version: null
64192
64321
  };
64193
64322
  };
64194
- const REACT_DEPENDENCY_NAMES = new Set([
64323
+ const REACT_PROJECT_DEPENDENCY_NAMES = new Set([
64195
64324
  "react",
64325
+ "react-dom",
64196
64326
  "react-native",
64197
64327
  "next",
64198
- "preact"
64328
+ "preact",
64329
+ "expo",
64330
+ "expo-router",
64331
+ "gatsby",
64332
+ "@remix-run/react",
64333
+ "@tanstack/react-start",
64334
+ "react-scripts",
64335
+ "@astrojs/react"
64199
64336
  ]);
64337
+ const REACT_THREE_FIBER_DEPENDENCY_NAMES = ["@react-three/fiber", "react-three-fiber"];
64338
+ const REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES = [
64339
+ ...REACT_THREE_FIBER_DEPENDENCY_NAMES,
64340
+ "@react-three/drei",
64341
+ "@react-three/rapier",
64342
+ "@react-three/postprocessing",
64343
+ "@react-three/xr",
64344
+ "@react-three/cannon"
64345
+ ];
64346
+ const THREE_DEPENDENCY_NAMES = ["three", ...REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES];
64200
64347
  const hasReactDependency = (packageJson) => {
64201
64348
  const allDependencies = {
64202
64349
  ...packageJson.peerDependencies,
64203
64350
  ...packageJson.dependencies,
64204
64351
  ...packageJson.devDependencies
64205
64352
  };
64206
- return Object.keys(allDependencies).some((packageName) => REACT_DEPENDENCY_NAMES.has(packageName));
64353
+ return Object.keys(allDependencies).some((packageName) => REACT_PROJECT_DEPENDENCY_NAMES.has(packageName));
64207
64354
  };
64355
+ const hasSupportedProjectDependency = (packageJson) => hasReactDependency(packageJson) || getDependencySpec(packageJson, "remotion") !== null || THREE_DEPENDENCY_NAMES.some((packageName) => getDependencySpec(packageJson, packageName) !== null);
64208
64356
  const getPreactVersion = (packageJson) => getDependencySpec(packageJson, "preact");
64209
64357
  const resolveCatalogBackedDependencyVersion = ({ rootDirectory, rootPackageJson, packageName, sourceDirectory = rootDirectory, sourcePackageJson = rootPackageJson, version }) => {
64210
64358
  if (version === null || !isCatalogReference(version)) return version;
@@ -64395,7 +64543,7 @@ const listWorkspacePackages = (rootDirectory) => {
64395
64543
  seenDirectories.add(workspacePackage.directory);
64396
64544
  packages.push(workspacePackage);
64397
64545
  };
64398
- if (hasReactDependency(packageJson)) pushIfNew({
64546
+ if (hasSupportedProjectDependency(packageJson)) pushIfNew({
64399
64547
  name: packageJson.name ?? path$1$1.basename(rootDirectory),
64400
64548
  directory: rootDirectory
64401
64549
  });
@@ -64403,7 +64551,7 @@ const listWorkspacePackages = (rootDirectory) => {
64403
64551
  const directories = resolveWorkspaceDirectories(rootDirectory, pattern);
64404
64552
  for (const workspaceDirectory of directories) {
64405
64553
  const workspacePackageJson = readPackageJson(path$1$1.join(workspaceDirectory, "package.json"));
64406
- if (!hasReactDependency(workspacePackageJson)) continue;
64554
+ if (!hasSupportedProjectDependency(workspacePackageJson)) continue;
64407
64555
  pushIfNew({
64408
64556
  name: workspacePackageJson.name ?? path$1$1.basename(workspaceDirectory),
64409
64557
  directory: workspaceDirectory
@@ -64435,6 +64583,29 @@ const getTanStackQueryVersion = (packageJson) => {
64435
64583
  packageNames: TANSTACK_REACT_QUERY_PACKAGES
64436
64584
  });
64437
64585
  };
64586
+ const hasAnyDependency = (packageJson, packageNames) => {
64587
+ const allDependencies = {
64588
+ ...packageJson.peerDependencies,
64589
+ ...packageJson.dependencies,
64590
+ ...packageJson.devDependencies,
64591
+ ...packageJson.optionalDependencies
64592
+ };
64593
+ return packageNames.some((packageName) => allDependencies[packageName] !== void 0);
64594
+ };
64595
+ const BASE_UI_PACKAGES = ["@base-ui-components/react", "@base-ui/react"];
64596
+ const hasBaseUiDependency = (packageJson) => hasAnyDependency(packageJson, BASE_UI_PACKAGES);
64597
+ const RADIX_UNIFIED_PACKAGE = "radix-ui";
64598
+ const RADIX_PRIMITIVE_PACKAGE_PREFIX = "@radix-ui/react-";
64599
+ const RADIX_NON_PRIMITIVE_PACKAGES = new Set(["@radix-ui/react-icons"]);
64600
+ const hasRadixUiDependency = (packageJson) => {
64601
+ const allDependencies = {
64602
+ ...packageJson.peerDependencies,
64603
+ ...packageJson.dependencies,
64604
+ ...packageJson.devDependencies,
64605
+ ...packageJson.optionalDependencies
64606
+ };
64607
+ return Object.keys(allDependencies).some((packageName) => packageName === RADIX_UNIFIED_PACKAGE || packageName.startsWith(RADIX_PRIMITIVE_PACKAGE_PREFIX) && !RADIX_NON_PRIMITIVE_PACKAGES.has(packageName));
64608
+ };
64438
64609
  const STYLED_COMPONENTS_PACKAGES = ["styled-components"];
64439
64610
  const getStyledComponentsVersion = (packageJson) => {
64440
64611
  return getPreferredDependencyVersion({
@@ -64465,12 +64636,15 @@ const hasI18nDependency = (packageJson) => {
64465
64636
  };
64466
64637
  return I18N_PACKAGES.some((packageName) => allDependencies[packageName] !== void 0);
64467
64638
  };
64639
+ const REACT_ARIA_COMPONENT_PACKAGES = ["react-aria-components"];
64640
+ const TANSTACK_TABLE_PACKAGES = ["@tanstack/react-table"];
64641
+ const TANSTACK_VIRTUAL_PACKAGES = ["@tanstack/react-virtual"];
64642
+ const TANSTACK_FORM_PACKAGES = ["@tanstack/react-form"];
64468
64643
  const REANIMATED_DEPENDENCY_NAME = "react-native-reanimated";
64469
64644
  const MOBX_REACT_PACKAGE_NAME = "mobx-react";
64470
64645
  const MOBX_REACT_LITE_PACKAGE_NAME = "mobx-react-lite";
64471
64646
  const MOBX_STATE_TREE_PACKAGE_NAME = "mobx-state-tree";
64472
64647
  const MOBX_REACT_OBSERVER_PACKAGE_NAME = "mobx-react-observer";
64473
- const REACT_THREE_FIBER_DEPENDENCY_NAMES = ["@react-three/fiber", "react-three-fiber"];
64474
64648
  const REACT_THREE_FIBER_SECTIONS = [
64475
64649
  "dependencies",
64476
64650
  "peerDependencies",
@@ -64483,8 +64657,6 @@ const THREE_DEPENDENCY_SECTIONS = [
64483
64657
  "optionalDependencies",
64484
64658
  "devDependencies"
64485
64659
  ];
64486
- const REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES = [...REACT_THREE_FIBER_DEPENDENCY_NAMES, "@react-three/drei"];
64487
- const THREE_DEPENDENCY_NAMES = [...REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES, "three"];
64488
64660
  const REACT_ROUTER_DEPENDENCY_NAMES = [
64489
64661
  "@react-router/dev",
64490
64662
  "react-router-dom",
@@ -64658,6 +64830,13 @@ const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, roo
64658
64830
  });
64659
64831
  if (styledComponentsVersion && shouldReplaceStyledComponentsVersion(facts.styledComponentsVersion, styledComponentsVersion)) facts.styledComponentsVersion = styledComponentsVersion;
64660
64832
  facts.hasI18nLibrary = facts.hasI18nLibrary || hasI18nDependency(packageJson);
64833
+ facts.hasShadcnUi = facts.hasShadcnUi || detectShadcnUi(directory);
64834
+ facts.hasRadixUi = facts.hasRadixUi || hasRadixUiDependency(packageJson);
64835
+ facts.hasBaseUi = facts.hasBaseUi || hasBaseUiDependency(packageJson);
64836
+ facts.hasReactAriaComponents = facts.hasReactAriaComponents || hasAnyDependency(packageJson, REACT_ARIA_COMPONENT_PACKAGES);
64837
+ facts.hasTanstackTable = facts.hasTanstackTable || hasAnyDependency(packageJson, TANSTACK_TABLE_PACKAGES);
64838
+ facts.hasTanstackVirtual = facts.hasTanstackVirtual || hasAnyDependency(packageJson, TANSTACK_VIRTUAL_PACKAGES);
64839
+ facts.hasTanstackForm = facts.hasTanstackForm || hasAnyDependency(packageJson, TANSTACK_FORM_PACKAGES);
64661
64840
  for (const packageName of REACT_THREE_FIBER_DEPENDENCY_NAMES) {
64662
64841
  const version = resolveCatalogBackedDependencyVersion({
64663
64842
  rootDirectory,
@@ -64760,6 +64939,13 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
64760
64939
  tanstackQueryVersion: null,
64761
64940
  styledComponentsVersion: null,
64762
64941
  hasI18nLibrary: false,
64942
+ hasShadcnUi: false,
64943
+ hasRadixUi: false,
64944
+ hasBaseUi: false,
64945
+ hasReactAriaComponents: false,
64946
+ hasTanstackTable: false,
64947
+ hasTanstackVirtual: false,
64948
+ hasTanstackForm: false,
64763
64949
  hasReactNativeAwarePackage: false,
64764
64950
  hasReanimatedAwarePackage: false,
64765
64951
  hasSsrDependency: false,
@@ -64985,13 +65171,13 @@ const detectTargetBlankOpenerProtection = (directory, packageJson) => {
64985
65171
  if (browserslistRequirement === "noreferrer" || electronRequirement === "noreferrer") return "noreferrer";
64986
65172
  if (browserslistRequirement === "noopener" || electronRequirement === "noopener") return "noopener";
64987
65173
  };
64988
- const toReactWorkspacePackages = (directories) => {
65174
+ const toSupportedWorkspacePackages = (directories) => {
64989
65175
  const packages = [];
64990
65176
  for (const directory of directories) {
64991
65177
  const packageJsonPath = path$1$1.join(directory, "package.json");
64992
65178
  if (!isFile(packageJsonPath)) continue;
64993
65179
  const packageJson = readPackageJson(packageJsonPath);
64994
- if (!hasReactDependency(packageJson)) continue;
65180
+ if (!hasSupportedProjectDependency(packageJson)) continue;
64995
65181
  const name = packageJson.name ?? path$1$1.basename(directory);
64996
65182
  packages.push({
64997
65183
  name,
@@ -65004,7 +65190,7 @@ const listManifestWorkspacePackages = (rootDirectory) => {
65004
65190
  if (isFile(path$1$1.join(rootDirectory, "package.json"))) return listWorkspacePackages(rootDirectory);
65005
65191
  const patterns = parsePnpmWorkspacePatterns(rootDirectory);
65006
65192
  const nxPatterns = patterns.length > 0 ? [] : getNxWorkspaceDirectories(rootDirectory);
65007
- return toReactWorkspacePackages((patterns.length > 0 ? patterns : nxPatterns).flatMap((pattern) => resolveWorkspaceDirectories(rootDirectory, pattern)));
65193
+ return toSupportedWorkspacePackages((patterns.length > 0 ? patterns : nxPatterns).flatMap((pattern) => resolveWorkspaceDirectories(rootDirectory, pattern)));
65008
65194
  };
65009
65195
  const NON_PROJECT_DIRECTORIES = new Set([
65010
65196
  "AppData",
@@ -65012,7 +65198,7 @@ const NON_PROJECT_DIRECTORIES = new Set([
65012
65198
  "Library"
65013
65199
  ]);
65014
65200
  const MAX_SCAN_DEPTH = 6;
65015
- const discoverReactSubprojectsByFilesystem = (rootDirectory) => {
65201
+ const discoverSupportedSubprojectsByFilesystem = (rootDirectory) => {
65016
65202
  const packages = [];
65017
65203
  const pendingDirectories = [{
65018
65204
  directory: rootDirectory,
@@ -65025,7 +65211,7 @@ const discoverReactSubprojectsByFilesystem = (rootDirectory) => {
65025
65211
  const packageJsonPath = path$1$1.join(currentDirectory, "package.json");
65026
65212
  if (isFile(packageJsonPath)) {
65027
65213
  const packageJson = readPackageJson(packageJsonPath);
65028
- if (hasReactDependency(packageJson)) {
65214
+ if (hasSupportedProjectDependency(packageJson)) {
65029
65215
  const name = packageJson.name ?? path$1$1.basename(currentDirectory);
65030
65216
  packages.push({
65031
65217
  name,
@@ -65045,11 +65231,11 @@ const discoverReactSubprojectsByFilesystem = (rootDirectory) => {
65045
65231
  }
65046
65232
  return packages;
65047
65233
  };
65048
- const discoverReactSubprojects = (rootDirectory) => {
65234
+ const discoverSupportedSubprojects = (rootDirectory) => {
65049
65235
  if (!isDirectory(rootDirectory)) return [];
65050
65236
  const manifestPackages = listManifestWorkspacePackages(rootDirectory);
65051
65237
  if (manifestPackages.length > 0) return manifestPackages;
65052
- return discoverReactSubprojectsByFilesystem(rootDirectory);
65238
+ return discoverSupportedSubprojectsByFilesystem(rootDirectory);
65053
65239
  };
65054
65240
  const cachedProjectInfos = /* @__PURE__ */ new Map();
65055
65241
  /**
@@ -65104,6 +65290,12 @@ const discoverProjectWithoutPackageJson = (directory, options) => {
65104
65290
  remotionVersion: null,
65105
65291
  remotionMajorVersion: null,
65106
65292
  hasI18nLibrary: false,
65293
+ hasRadixUi: false,
65294
+ hasBaseUi: false,
65295
+ hasReactAriaComponents: false,
65296
+ hasTanstackTable: false,
65297
+ hasTanstackVirtual: false,
65298
+ hasTanstackForm: false,
65107
65299
  tanstackQueryVersion: null,
65108
65300
  styledComponentsVersion: null,
65109
65301
  hasThree: false,
@@ -65125,6 +65317,7 @@ const discoverProjectWithoutPackageJson = (directory, options) => {
65125
65317
  shopifyFlashListMajorVersion: null,
65126
65318
  hasReanimated: false,
65127
65319
  reanimatedVersion: null,
65320
+ hasShadcnUi: detectShadcnUi(directory),
65128
65321
  isPreES2023Target: hasOwnTsConfig && detectPreES2023Target(directory),
65129
65322
  isStaticExport: false,
65130
65323
  sourceFileCount
@@ -65287,6 +65480,12 @@ const discoverProject = (directory, options = {}) => {
65287
65480
  hasReactCompilerLintPlugin: detectReactCompilerLintPlugin(directory, packageJson),
65288
65481
  hasTanStackQuery: tanstackQueryVersion !== null,
65289
65482
  hasI18nLibrary: workspaceFacts.hasI18nLibrary,
65483
+ hasRadixUi: workspaceFacts.hasRadixUi,
65484
+ hasBaseUi: workspaceFacts.hasBaseUi,
65485
+ hasReactAriaComponents: workspaceFacts.hasReactAriaComponents,
65486
+ hasTanstackTable: workspaceFacts.hasTanstackTable,
65487
+ hasTanstackVirtual: workspaceFacts.hasTanstackVirtual,
65488
+ hasTanstackForm: workspaceFacts.hasTanstackForm,
65290
65489
  tanstackQueryVersion,
65291
65490
  styledComponentsVersion: workspaceFacts.styledComponentsVersion,
65292
65491
  valtioVersion,
@@ -65313,6 +65512,7 @@ const discoverProject = (directory, options = {}) => {
65313
65512
  shopifyFlashListMajorVersion: shopifyFlashListVersion === null ? null : getLowestDependencyMajor(shopifyFlashListVersion),
65314
65513
  hasReanimated,
65315
65514
  reanimatedVersion,
65515
+ hasShadcnUi: workspaceFacts.hasShadcnUi,
65316
65516
  isPreES2023Target,
65317
65517
  isStaticExport: framework === "nextjs" && detectNextjsStaticExport(workspaceFacts.next.sourceDirectory ?? directory),
65318
65518
  sourceFileCount
@@ -65320,16 +65520,31 @@ const discoverProject = (directory, options = {}) => {
65320
65520
  cachedProjectInfos.set(directory, projectInfo);
65321
65521
  return projectInfo;
65322
65522
  };
65523
+ const REACT_COMPATIBLE_FRAMEWORKS = new Set([
65524
+ "nextjs",
65525
+ "tanstack-start",
65526
+ "cra",
65527
+ "remix",
65528
+ "gatsby",
65529
+ "expo",
65530
+ "react-native",
65531
+ "preact"
65532
+ ]);
65323
65533
  /**
65324
- * A project is worth scanning when it has React/Preact (the framework-
65534
+ * Whether project discovery resolved a React-compatible runtime directly or
65535
+ * through a framework whose runtime is necessarily React-compatible.
65536
+ */
65537
+ const hasReactRuntime = (project) => project.reactVersion !== null || project.preactVersion !== null || REACT_COMPATIBLE_FRAMEWORKS.has(project.framework);
65538
+ /**
65539
+ * A project is worth scanning when it has a supported runtime (the runtime-
65325
65540
  * specific rules apply) OR it simply has source files to lint. The
65326
65541
  * second arm is what lets a plain TypeScript/JavaScript codebase — no
65327
65542
  * React dependency at all — run the framework-agnostic rules
65328
65543
  * (security, architecture, zod, bundle-size, …) instead of hard-failing
65329
- * with "No React dependency". Only a directory with neither React nor a
65330
- * single source file has nothing to analyze.
65544
+ * with "No React dependency". Only a directory with neither a supported
65545
+ * runtime nor a single source file has nothing to analyze.
65331
65546
  */
65332
- const isAnalyzableProject = (project) => project.reactVersion !== null || project.preactVersion !== null || project.sourceFileCount > 0;
65547
+ const isAnalyzableProject = (project) => hasReactRuntime(project) || project.hasThree === true || project.hasRemotion === true || project.sourceFileCount > 0;
65333
65548
  const LEGACY_RULE_KEY_TO_NATIVE_RULE_KEY = {
65334
65549
  "deslop/circular-dependency": "react-doctor/circular-dependency",
65335
65550
  "deslop/unused-dependency": "react-doctor/unused-dependency",
@@ -67503,11 +67718,11 @@ const resolveConfigRootDir = (config, configSourceDirectory) => {
67503
67718
  };
67504
67719
  const resolveDiagnoseTarget = (directory, options = {}) => {
67505
67720
  if (isFile(path$1$1.join(directory, "package.json"))) return directory;
67506
- const reactSubprojects = discoverReactSubprojects(directory);
67507
- if (reactSubprojects.length === 0) return null;
67508
- if (reactSubprojects.length === 1) return reactSubprojects[0].directory;
67721
+ const subprojects = discoverSupportedSubprojects(directory);
67722
+ if (subprojects.length === 0) return null;
67723
+ if (subprojects.length === 1) return subprojects[0].directory;
67509
67724
  if (options.allowAmbiguous === true) return null;
67510
- throw new AmbiguousProjectError(directory, reactSubprojects.map((subproject) => path$1$1.relative(directory, subproject.directory)).toSorted());
67725
+ throw new AmbiguousProjectError(directory, subprojects.map((subproject) => path$1$1.relative(directory, subproject.directory)).toSorted());
67511
67726
  };
67512
67727
  /**
67513
67728
  * The canonical entry-point translation shared by every public shell
@@ -67889,18 +68104,58 @@ const METRO_CONFIG_FILE_NAMES = [
67889
68104
  const EXPO_METRO_CONFIG_EXTEND_SIGNALS = [
67890
68105
  "expo/metro-config",
67891
68106
  "@sentry/react-native/metro",
67892
- "getSentryExpoConfig"
68107
+ "getSentryExpoConfig",
68108
+ "posthog-react-native/metro",
68109
+ "getPostHogExpoConfig"
67893
68110
  ];
68111
+ const resolveLocalMetroConfigModule = (moduleSpecifier, importingFilePath, rootDirectory) => {
68112
+ if (!moduleSpecifier.startsWith(".")) return void 0;
68113
+ const importedPath = path$1$1.resolve(path$1$1.dirname(importingFilePath), moduleSpecifier);
68114
+ const candidateBasePaths = [
68115
+ importedPath,
68116
+ importedPath.replace(/\.[cm]?js$/, ""),
68117
+ path$1$1.join(importedPath, "index")
68118
+ ];
68119
+ for (const candidateBasePath of candidateBasePaths) {
68120
+ const resolvedPath = resolveEntryWithExtensions(candidateBasePath);
68121
+ if (resolvedPath !== void 0 && isFile(resolvedPath) && isPathInsideDirectoryOrEqual(resolvedPath, rootDirectory)) return resolvedPath;
68122
+ }
68123
+ };
68124
+ const hasExpoMetroConfigSignal = (metroConfigPath, rootDirectory) => {
68125
+ const pendingFilePaths = [metroConfigPath];
68126
+ const visitedFilePaths = /* @__PURE__ */ new Set();
68127
+ while (pendingFilePaths.length > 0) {
68128
+ const currentFilePath = pendingFilePaths.pop();
68129
+ if (currentFilePath === void 0 || visitedFilePaths.has(currentFilePath)) continue;
68130
+ if (visitedFilePaths.size >= 100) return true;
68131
+ visitedFilePaths.add(currentFilePath);
68132
+ let contents;
68133
+ try {
68134
+ contents = fs$1$3.readFileSync(currentFilePath, "utf-8");
68135
+ } catch {
68136
+ return true;
68137
+ }
68138
+ if (EXPO_METRO_CONFIG_EXTEND_SIGNALS.some((signal) => contents.includes(signal))) return true;
68139
+ let moduleSpecifiers;
68140
+ try {
68141
+ moduleSpecifiers = collectStaticModuleSpecifiers(contents, {
68142
+ filePath: currentFilePath,
68143
+ includeTypeOnly: false
68144
+ });
68145
+ } catch {
68146
+ continue;
68147
+ }
68148
+ for (const moduleSpecifier of moduleSpecifiers) {
68149
+ const localModulePath = resolveLocalMetroConfigModule(moduleSpecifier, currentFilePath, rootDirectory);
68150
+ if (localModulePath !== void 0 && !visitedFilePaths.has(localModulePath)) pendingFilePaths.push(localModulePath);
68151
+ }
68152
+ }
68153
+ return false;
68154
+ };
67894
68155
  const checkExpoMetroConfig = (context) => {
67895
68156
  const metroConfigPath = METRO_CONFIG_FILE_NAMES.map((fileName) => path$1$1.join(context.rootDirectory, fileName)).find((candidatePath) => isFile(candidatePath));
67896
68157
  if (metroConfigPath === void 0) return [];
67897
- let contents;
67898
- try {
67899
- contents = fs$1$3.readFileSync(metroConfigPath, "utf-8");
67900
- } catch {
67901
- return [];
67902
- }
67903
- if (EXPO_METRO_CONFIG_EXTEND_SIGNALS.some((signal) => contents.includes(signal))) return [];
68158
+ if (hasExpoMetroConfigSignal(metroConfigPath, context.rootDirectory)) return [];
67904
68159
  return [buildExpoDiagnostic({
67905
68160
  rule: "expo-metro-config",
67906
68161
  filePath: path$1$1.basename(metroConfigPath),
@@ -69242,21 +69497,6 @@ function* collectSecurityScanFiles(rootDirectory, excludedDirectories = /* @__PU
69242
69497
  }
69243
69498
  }
69244
69499
  }
69245
- const REACT_COMPATIBLE_FRAMEWORKS = new Set([
69246
- "nextjs",
69247
- "tanstack-start",
69248
- "cra",
69249
- "remix",
69250
- "gatsby",
69251
- "expo",
69252
- "react-native",
69253
- "preact"
69254
- ]);
69255
- /**
69256
- * Whether project discovery resolved a React-compatible runtime directly or
69257
- * through a framework whose runtime is necessarily React-compatible.
69258
- */
69259
- const hasReactRuntime = (project) => project.reactVersion !== null || project.preactVersion !== null || REACT_COMPATIBLE_FRAMEWORKS.has(project.framework);
69260
69500
  const CLIENT_ONLY_FRAMEWORKS = new Set([
69261
69501
  "vite",
69262
69502
  "cra",
@@ -69317,6 +69557,13 @@ const buildCapabilities = (project) => {
69317
69557
  minor: 0
69318
69558
  })) capabilities.add("tailwind:4");
69319
69559
  }
69560
+ if (project.hasShadcnUi === true) capabilities.add("shadcn");
69561
+ if (project.hasRadixUi === true) capabilities.add("radix-ui");
69562
+ if (project.hasBaseUi === true) capabilities.add("base-ui");
69563
+ if (project.hasReactAriaComponents === true) capabilities.add("react-aria");
69564
+ if (project.hasTanstackTable === true) capabilities.add("tanstack-table");
69565
+ if (project.hasTanstackVirtual === true) capabilities.add("tanstack-virtual");
69566
+ if (project.hasTanstackForm === true) capabilities.add("tanstack-form");
69320
69567
  if (project.zodVersion !== null) capabilities.add("zod");
69321
69568
  if (project.zodMajorVersion !== null && project.zodMajorVersion >= 4) capabilities.add("zod:4");
69322
69569
  if (project.mobxVersion !== void 0 && project.mobxVersion !== null || project.hasMobxReact === true || project.hasMobxReactLite === true || project.hasMobxStateTree === true || project.hasMobxReactObserver === true) capabilities.add("mobx");
@@ -69494,72 +69741,6 @@ const checkSecurityScanCooperative = async (rootDirectory, options = {}) => {
69494
69741
  }
69495
69742
  return session.diagnostics;
69496
69743
  };
69497
- var import_picocolors = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
69498
- let p = process || {}, argv = p.argv || [], env = p.env || {};
69499
- let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
69500
- let formatter = (open, close, replace = open) => (input) => {
69501
- let string = "" + input, index = string.indexOf(close, open.length);
69502
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
69503
- };
69504
- let replaceClose = (string, close, replace, index) => {
69505
- let result = "", cursor = 0;
69506
- do {
69507
- result += string.substring(cursor, index) + replace;
69508
- cursor = index + close.length;
69509
- index = string.indexOf(close, cursor);
69510
- } while (~index);
69511
- return result + string.substring(cursor);
69512
- };
69513
- let createColors = (enabled = isColorSupported) => {
69514
- let f = enabled ? formatter : () => String;
69515
- return {
69516
- isColorSupported: enabled,
69517
- reset: f("\x1B[0m", "\x1B[0m"),
69518
- bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
69519
- dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
69520
- italic: f("\x1B[3m", "\x1B[23m"),
69521
- underline: f("\x1B[4m", "\x1B[24m"),
69522
- inverse: f("\x1B[7m", "\x1B[27m"),
69523
- hidden: f("\x1B[8m", "\x1B[28m"),
69524
- strikethrough: f("\x1B[9m", "\x1B[29m"),
69525
- black: f("\x1B[30m", "\x1B[39m"),
69526
- red: f("\x1B[31m", "\x1B[39m"),
69527
- green: f("\x1B[32m", "\x1B[39m"),
69528
- yellow: f("\x1B[33m", "\x1B[39m"),
69529
- blue: f("\x1B[34m", "\x1B[39m"),
69530
- magenta: f("\x1B[35m", "\x1B[39m"),
69531
- cyan: f("\x1B[36m", "\x1B[39m"),
69532
- white: f("\x1B[37m", "\x1B[39m"),
69533
- gray: f("\x1B[90m", "\x1B[39m"),
69534
- bgBlack: f("\x1B[40m", "\x1B[49m"),
69535
- bgRed: f("\x1B[41m", "\x1B[49m"),
69536
- bgGreen: f("\x1B[42m", "\x1B[49m"),
69537
- bgYellow: f("\x1B[43m", "\x1B[49m"),
69538
- bgBlue: f("\x1B[44m", "\x1B[49m"),
69539
- bgMagenta: f("\x1B[45m", "\x1B[49m"),
69540
- bgCyan: f("\x1B[46m", "\x1B[49m"),
69541
- bgWhite: f("\x1B[47m", "\x1B[49m"),
69542
- blackBright: f("\x1B[90m", "\x1B[39m"),
69543
- redBright: f("\x1B[91m", "\x1B[39m"),
69544
- greenBright: f("\x1B[92m", "\x1B[39m"),
69545
- yellowBright: f("\x1B[93m", "\x1B[39m"),
69546
- blueBright: f("\x1B[94m", "\x1B[39m"),
69547
- magentaBright: f("\x1B[95m", "\x1B[39m"),
69548
- cyanBright: f("\x1B[96m", "\x1B[39m"),
69549
- whiteBright: f("\x1B[97m", "\x1B[39m"),
69550
- bgBlackBright: f("\x1B[100m", "\x1B[49m"),
69551
- bgRedBright: f("\x1B[101m", "\x1B[49m"),
69552
- bgGreenBright: f("\x1B[102m", "\x1B[49m"),
69553
- bgYellowBright: f("\x1B[103m", "\x1B[49m"),
69554
- bgBlueBright: f("\x1B[104m", "\x1B[49m"),
69555
- bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
69556
- bgCyanBright: f("\x1B[106m", "\x1B[49m"),
69557
- bgWhiteBright: f("\x1B[107m", "\x1B[49m")
69558
- };
69559
- };
69560
- module.exports = createColors();
69561
- module.exports.createColors = createColors;
69562
- })))(), 1);
69563
69744
  const highlighter = {
69564
69745
  error: import_picocolors.default.red,
69565
69746
  warn: import_picocolors.default.yellow,
@@ -70975,7 +71156,11 @@ var Git = class Git extends Service()("react-doctor/Git") {
70975
71156
  const symref = yield* runGit(directory, ["symbolic-ref", "refs/remotes/origin/HEAD"]);
70976
71157
  if (symref.status === 0) {
70977
71158
  const trimmed = trimOrNull(symref.stdout);
70978
- if (trimmed !== null) return trimmed.replace("refs/remotes/origin/", "");
71159
+ if (trimmed !== null) {
71160
+ const branchName = trimmed.replace("refs/remotes/origin/", "");
71161
+ const remoteBranch = `origin/${branchName}`;
71162
+ return (yield* branchExists(directory, remoteBranch)) ? remoteBranch : branchName;
71163
+ }
70979
71164
  }
70980
71165
  const candidates = yield* runGit(directory, [
70981
71166
  "for-each-ref",
@@ -70983,7 +71168,10 @@ var Git = class Git extends Service()("react-doctor/Git") {
70983
71168
  ...DEFAULT_BRANCH_CANDIDATES.map((candidate) => `refs/heads/${candidate}`)
70984
71169
  ]);
70985
71170
  if (candidates.status !== 0) return null;
70986
- return trimOrNull(candidates.stdout.split("\n")[0] ?? "");
71171
+ const localBranch = trimOrNull(candidates.stdout.split("\n")[0] ?? "");
71172
+ if (localBranch === null) return null;
71173
+ const remoteBranch = `origin/${localBranch}`;
71174
+ return (yield* branchExists(directory, remoteBranch)) ? remoteBranch : localBranch;
70987
71175
  }).pipe(withSpan("Git.defaultBranch"));
70988
71176
  const branchExists = (directory, branch) => runGit(directory, [
70989
71177
  "rev-parse",
@@ -71482,6 +71670,19 @@ const detectUserLintConfigPaths = (rootDirectory) => {
71482
71670
  return [];
71483
71671
  };
71484
71672
  const DISABLE_DIRECTIVE_PATTERN = /(eslint|oxlint)-disable/;
71673
+ const getBackupRootDirectory = (rootDirectory) => path$1$1.join(rootDirectory, ...DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS);
71674
+ const getBackupPath = (rootDirectory, absolutePath) => {
71675
+ if (!isPathInsideDirectory(absolutePath, rootDirectory)) return null;
71676
+ return path$1$1.join(getBackupRootDirectory(rootDirectory), path$1$1.relative(rootDirectory, absolutePath));
71677
+ };
71678
+ const removeBackupRootIfEmpty = (rootDirectory) => {
71679
+ const backupRootDirectory = getBackupRootDirectory(rootDirectory);
71680
+ if (!walkSourceTreeFiles(backupRootDirectory).next().done) return;
71681
+ fs$1$3.rmSync(backupRootDirectory, {
71682
+ recursive: true,
71683
+ force: true
71684
+ });
71685
+ };
71485
71686
  const neutralizedFileLeases = /* @__PURE__ */ new Map();
71486
71687
  const activeNeutralizationInitializations = /* @__PURE__ */ new Set();
71487
71688
  const directoriesOverlap = (left, right) => {
@@ -71573,8 +71774,50 @@ const collectNeutralizationCandidatePaths = (rootDirectory, discoveredRelativePa
71573
71774
  }
71574
71775
  return candidatePaths;
71575
71776
  };
71777
+ const recoverOrphanedBackups = (rootDirectory) => {
71778
+ const blockedPaths = /* @__PURE__ */ new Set();
71779
+ const backupRootDirectory = getBackupRootDirectory(rootDirectory);
71780
+ for (const { absolutePath: backupPath } of walkSourceTreeFiles(backupRootDirectory)) {
71781
+ const originalPath = path$1$1.join(rootDirectory, path$1$1.relative(backupRootDirectory, backupPath));
71782
+ if (neutralizedFileLeases.has(originalPath)) continue;
71783
+ let backupContent;
71784
+ let currentContent;
71785
+ try {
71786
+ backupContent = fs$1$3.readFileSync(backupPath, "utf-8");
71787
+ currentContent = fs$1$3.readFileSync(originalPath, "utf-8");
71788
+ } catch (error) {
71789
+ process.stderr.write(`[react-doctor] Could not recover ${originalPath}: ${messageFromUnknown(error)}. The backup remains at ${backupPath}.\n`);
71790
+ blockedPaths.add(originalPath);
71791
+ continue;
71792
+ }
71793
+ if (currentContent === backupContent) {
71794
+ try {
71795
+ fs$1$3.rmSync(backupPath);
71796
+ } catch (error) {
71797
+ process.stderr.write(`[react-doctor] Failed to delete stale backup ${backupPath}: ${messageFromUnknown(error)}\n`);
71798
+ blockedPaths.add(originalPath);
71799
+ }
71800
+ continue;
71801
+ }
71802
+ if (currentContent !== neutralizeContent(backupContent)) {
71803
+ process.stderr.write(`[react-doctor] Did not overwrite changed file ${originalPath}. Recover it manually from ${backupPath}.\n`);
71804
+ blockedPaths.add(originalPath);
71805
+ continue;
71806
+ }
71807
+ try {
71808
+ fs$1$3.writeFileSync(originalPath, backupContent);
71809
+ fs$1$3.rmSync(backupPath);
71810
+ } catch (error) {
71811
+ process.stderr.write(`[react-doctor] Failed to restore ${originalPath} from backup: ${messageFromUnknown(error)}\n`);
71812
+ blockedPaths.add(originalPath);
71813
+ }
71814
+ }
71815
+ removeBackupRootIfEmpty(rootDirectory);
71816
+ return blockedPaths;
71817
+ };
71576
71818
  const neutralizeDisableDirectives = async (rootDirectory, includePaths, options = {}) => {
71577
71819
  const resolvedRootDirectory = fs$1$3.realpathSync(rootDirectory);
71820
+ const blockedPaths = /* @__PURE__ */ new Set();
71578
71821
  const leasedPaths = /* @__PURE__ */ new Set();
71579
71822
  let isRestored = false;
71580
71823
  const restore = () => {
@@ -71587,16 +71830,24 @@ const neutralizeDisableDirectives = async (rootDirectory, includePaths, options
71587
71830
  if (lease.referenceCount > 0) continue;
71588
71831
  neutralizedFileLeases.delete(absolutePath);
71589
71832
  try {
71590
- fs$1$3.writeFileSync(absolutePath, lease.originalContent);
71833
+ const currentContent = fs$1$3.readFileSync(absolutePath, "utf-8");
71834
+ if (currentContent !== lease.neutralizedContent && currentContent !== lease.originalContent) {
71835
+ process.stderr.write(`[react-doctor] Did not overwrite changed file ${absolutePath}. Recover it manually from ${lease.backupPath}.\n`);
71836
+ continue;
71837
+ }
71838
+ if (currentContent === lease.neutralizedContent) fs$1$3.writeFileSync(absolutePath, lease.originalContent);
71839
+ fs$1$3.rmSync(lease.backupPath, { force: true });
71591
71840
  } catch (error) {
71592
- process.stderr.write(`[react-doctor] Failed to restore inline disable directives in ${absolutePath}: ${messageFromUnknown(error)}\n[react-doctor] Run: git checkout -- ${absolutePath}\n`);
71841
+ process.stderr.write(`[react-doctor] Failed to restore inline disable directives in ${absolutePath}: ${messageFromUnknown(error)}. The backup remains at ${lease.backupPath}.\n`);
71593
71842
  }
71594
71843
  }
71844
+ removeBackupRootIfEmpty(resolvedRootDirectory);
71595
71845
  };
71596
71846
  const onExit = () => restore();
71597
71847
  process.once("exit", onExit);
71598
71848
  const leaseCandidatePath = (absolutePath) => {
71599
71849
  if (leasedPaths.has(absolutePath)) return;
71850
+ if (blockedPaths.has(absolutePath)) return;
71600
71851
  const existingLease = neutralizedFileLeases.get(absolutePath);
71601
71852
  if (existingLease) {
71602
71853
  existingLease.referenceCount += 1;
@@ -71611,9 +71862,20 @@ const neutralizeDisableDirectives = async (rootDirectory, includePaths, options
71611
71862
  }
71612
71863
  const neutralizedContent = neutralizeContent(originalContent);
71613
71864
  if (neutralizedContent !== originalContent) {
71865
+ const backupPath = getBackupPath(resolvedRootDirectory, absolutePath);
71866
+ if (backupPath === null) return;
71867
+ try {
71868
+ fs$1$3.mkdirSync(path$1$1.dirname(backupPath), { recursive: true });
71869
+ fs$1$3.writeFileSync(backupPath, originalContent, { flag: "wx" });
71870
+ } catch (error) {
71871
+ process.stderr.write(`[react-doctor] Did not modify ${absolutePath}: ${messageFromUnknown(error)}. Check ${backupPath}.\n`);
71872
+ return;
71873
+ }
71614
71874
  fs$1$3.writeFileSync(absolutePath, neutralizedContent);
71615
71875
  neutralizedFileLeases.set(absolutePath, {
71876
+ backupPath,
71616
71877
  originalContent,
71878
+ neutralizedContent,
71617
71879
  referenceCount: 1
71618
71880
  });
71619
71881
  leasedPaths.add(absolutePath);
@@ -71621,6 +71883,8 @@ const neutralizeDisableDirectives = async (rootDirectory, includePaths, options
71621
71883
  };
71622
71884
  try {
71623
71885
  await withOverlappingInitializationLock(resolvedRootDirectory, async () => {
71886
+ for (const blockedPath of recoverOrphanedBackups(resolvedRootDirectory)) blockedPaths.add(blockedPath);
71887
+ if (options.recoverOnly) return;
71624
71888
  for (const absolutePath of collectNeutralizationCandidatePaths(resolvedRootDirectory, [], includePaths)) if (neutralizedFileLeases.has(absolutePath)) leaseCandidatePath(absolutePath);
71625
71889
  const discoveredRelativePaths = await (options.findFiles ?? findFilesWithDisableDirectives)(resolvedRootDirectory, includePaths);
71626
71890
  for (const absolutePath of collectNeutralizationCandidatePaths(resolvedRootDirectory, discoveredRelativePaths, includePaths)) leaseCandidatePath(absolutePath);
@@ -72876,7 +73140,7 @@ const buildRelatedLocations = (labels, filePath, sourceBuffer) => {
72876
73140
  const isOxlintSpan = (value) => isRecord(value) && typeof value.offset === "number" && typeof value.length === "number" && typeof value.line === "number" && typeof value.column === "number";
72877
73141
  const isOxlintLabel = (value) => isRecord(value) && isOxlintSpan(value.span);
72878
73142
  const isMappableOxlintDiagnostic = (value) => isRecord(value) && typeof value.code === "string" && value.code.length > 0 && typeof value.filename === "string" && value.filename.length > 0 && (value.severity === "warning" || value.severity === "error") && Array.isArray(value.labels) && value.labels.every(isOxlintLabel);
72879
- const isEngineFailureDiagnostic = (value) => !isRecord(value) || typeof value.filename !== "string" || value.filename.length === 0;
73143
+ const isEngineFailureDiagnostic = (value) => !isRecord(value) || typeof value.filename !== "string" || value.filename.length === 0 || typeof value.message === "string" && value.message.startsWith("Error running JS plugin.") && (typeof value.code !== "string" || value.code.length === 0) && Array.isArray(value.labels) && value.labels.length === 0;
72880
73144
  const isOxlintOutput = (value) => isRecord(value) && Array.isArray(value.diagnostics);
72881
73145
  /**
72882
73146
  * Parses one oxlint subprocess's stdout into a flat `Diagnostic[]`.
@@ -73006,6 +73270,46 @@ const buildProfiledNodeArguments = (input) => [
73006
73270
  ...input.heapProfileDirectory ? ["--heap-prof", `--heap-prof-dir=${input.heapProfileDirectory}`] : [],
73007
73271
  ...input.argumentsList
73008
73272
  ];
73273
+ const buildOxlintTimingArguments = (argumentsList) => {
73274
+ const timingArguments = [...argumentsList];
73275
+ const formatFlagIndex = timingArguments.indexOf("--format");
73276
+ if (formatFlagIndex === -1 || formatFlagIndex + 1 >= timingArguments.length) throw new Error("Oxlint timing arguments require a --format value");
73277
+ timingArguments[formatFlagIndex + 1] = "default";
73278
+ timingArguments.push("--debug", "timings", "--quiet");
73279
+ return timingArguments;
73280
+ };
73281
+ const captureOxlintRuleTimings = (input) => new Promise((resolve, reject) => {
73282
+ const timingEnvironment = { ...input.environment };
73283
+ timingEnvironment.REACT_DOCTOR_RULE_TIMINGS_DIR = void 0;
73284
+ const timingChild = spawn(input.nodeBinaryPath, buildOxlintTimingArguments(input.argumentsList), {
73285
+ cwd: input.rootDirectory,
73286
+ env: timingEnvironment,
73287
+ stdio: [
73288
+ "ignore",
73289
+ "pipe",
73290
+ "pipe"
73291
+ ]
73292
+ });
73293
+ const stdoutBuffers = [];
73294
+ const stderrBuffers = [];
73295
+ timingChild.stdout.on("data", (buffer) => stdoutBuffers.push(buffer));
73296
+ timingChild.stderr.on("data", (buffer) => stderrBuffers.push(buffer));
73297
+ timingChild.on("error", reject);
73298
+ timingChild.on("close", (_code, signal) => {
73299
+ if (signal) {
73300
+ reject(/* @__PURE__ */ new Error(`Oxlint timing pass was killed by ${signal}`));
73301
+ return;
73302
+ }
73303
+ const timingOutput = `${Buffer.concat(stdoutBuffers).toString("utf8")}\n${Buffer.concat(stderrBuffers).toString("utf8")}`;
73304
+ if (!timingOutput.includes("Rule timings:")) {
73305
+ resolve();
73306
+ return;
73307
+ }
73308
+ fs$1$3.mkdirSync(input.timingDirectory, { recursive: true });
73309
+ fs$1$3.writeFileSync(path$1$1.join(input.timingDirectory, `oxlint-${timingChild.pid ?? process.pid}.timings.txt`), timingOutput);
73310
+ resolve();
73311
+ });
73312
+ });
73009
73313
  const lowerChildProcessPriority = (processId) => {
73010
73314
  if (processId === void 0) return;
73011
73315
  try {
@@ -73127,7 +73431,18 @@ const spawnOxlint = (args, rootDirectory, nodeBinaryPath, spawnTimeoutMs = OXLIN
73127
73431
  return;
73128
73432
  }
73129
73433
  }
73130
- resolve(output);
73434
+ const timingDirectory = SANITIZED_ENV.REACT_DOCTOR_OXLINT_TIMINGS_DIR;
73435
+ if (timingDirectory === void 0) {
73436
+ resolve(output);
73437
+ return;
73438
+ }
73439
+ captureOxlintRuleTimings({
73440
+ argumentsList: args,
73441
+ environment: SANITIZED_ENV,
73442
+ nodeBinaryPath,
73443
+ rootDirectory,
73444
+ timingDirectory
73445
+ }).then(() => resolve(output), reject);
73131
73446
  });
73132
73447
  });
73133
73448
  const PARALLELISM_EXHAUSTION_ERROR_CODES = new Set([
@@ -73932,7 +74247,7 @@ const runOxlint = async (options) => {
73932
74247
  const pluginPath = resolvePluginPath();
73933
74248
  const extendsPaths = (adoptExistingLintConfig && !customRulesOnly ? detectUserLintConfigPaths(rootDirectory) : []).filter(canOxlintExtendConfig);
73934
74249
  const userPlugins = includedTags.size > 0 ? [] : resolveUserPlugins(userConfig?.plugins, configSourceDirectory);
73935
- const restoreDisableDirectives = respectInlineDisables ? () => {} : await neutralizeDisableDirectives(rootDirectory, includePaths ?? options.precomputedSourceFiles?.map((sourceFile) => sourceFile.path));
74250
+ const restoreDisableDirectives = await neutralizeDisableDirectives(rootDirectory, includePaths ?? options.precomputedSourceFiles?.map((sourceFile) => sourceFile.path), { recoverOnly: respectInlineDisables });
73936
74251
  const configDirectory = fs$1$3.mkdtempSync(path$1$1.join(os.tmpdir(), "react-doctor-oxlintrc-"));
73937
74252
  const configPath = path$1$1.join(configDirectory, "oxlintrc.json");
73938
74253
  try {
@@ -76397,6 +76712,7 @@ const METRIC = {
76397
76712
  ciConfigured: "ci.configured",
76398
76713
  rulesChanged: "rules.changed",
76399
76714
  rulesQueried: "rules.queried",
76715
+ runtimeScanUrlPromptShown: "runtime_scan.url_prompt_shown",
76400
76716
  tuiCompactReportShown: "tui.compact_report_shown",
76401
76717
  tuiFindingNavigated: "tui.finding_navigated",
76402
76718
  tuiIssueStreamShown: "tui.issue_stream_shown",
@@ -76450,7 +76766,7 @@ const makeNoopConsole = () => ({
76450
76766
  });
76451
76767
  //#endregion
76452
76768
  //#region src/cli/utils/version.ts
76453
- const VERSION = "0.9.12-dev.0b670aa";
76769
+ const VERSION = "0.9.12-dev.17eeeb5";
76454
76770
  //#endregion
76455
76771
  //#region src/cli/utils/json-mode.ts
76456
76772
  let context = null;
@@ -76488,13 +76804,14 @@ const installSilentConsole = () => {
76488
76804
  "trace"
76489
76805
  ]) target[key] = source[key];
76490
76806
  };
76491
- const enableJsonMode = ({ compact, directory, outputFile }) => {
76807
+ const enableJsonMode = ({ compact, directory, outputFile, writeCancellationError }) => {
76492
76808
  context = {
76493
76809
  compact,
76494
76810
  directory,
76495
76811
  startTime: performance$1.now(),
76496
76812
  mode: "full",
76497
- outputFile: null
76813
+ outputFile: null,
76814
+ writeCancellationError
76498
76815
  };
76499
76816
  installSilentConsole();
76500
76817
  if (outputFile) {
@@ -76533,6 +76850,13 @@ const writeJsonErrorReport = (error, sentryEventId) => {
76533
76850
  process.stdout.write(INTERNAL_ERROR_JSON_FALLBACK);
76534
76851
  }
76535
76852
  };
76853
+ const writeJsonCancellationReport = () => {
76854
+ if (context?.writeCancellationError !== void 0) {
76855
+ context.writeCancellationError();
76856
+ return;
76857
+ }
76858
+ writeJsonErrorReport(/* @__PURE__ */ new Error("Scan cancelled by user (SIGINT/SIGTERM)"));
76859
+ };
76536
76860
  //#endregion
76537
76861
  //#region src/cli/utils/run-id.ts
76538
76862
  let cachedRunId;
@@ -76541,10 +76865,14 @@ const getRunId = () => {
76541
76865
  return cachedRunId;
76542
76866
  };
76543
76867
  //#endregion
76868
+ //#region src/cli/utils/scrub-run-arguments.ts
76869
+ const scrubRunArguments = (argumentsList) => anonymizeText(argumentsList.map((argument) => argument.replace(/^((?:--[^=]+=)?)(?:https?|wss?):\/\/.+$/i, "$1<url>")).join(" "));
76870
+ //#endregion
76544
76871
  //#region src/cli/utils/build-run-context.ts
76545
76872
  const ROOT_SUBCOMMANDS = new Set([
76546
76873
  "design",
76547
76874
  "install",
76875
+ "scan",
76548
76876
  "setup"
76549
76877
  ]);
76550
76878
  const detectInvokedVia = () => {
@@ -76585,7 +76913,7 @@ const buildRunContext = () => {
76585
76913
  runId: getRunId(),
76586
76914
  origin: detectOrigin(),
76587
76915
  command: detectCommand(userArguments),
76588
- argv: scrubSensitivePaths(userArguments.join(" ")),
76916
+ argv: scrubRunArguments(userArguments),
76589
76917
  cwd: scrubSensitivePaths(process.cwd()),
76590
76918
  node: process.version,
76591
76919
  nodeMajor: detectNodeMajor(),
@@ -76615,33 +76943,41 @@ const buildRunContext = () => {
76615
76943
  * omits `projectName` and `rootDirectory`, the two identifying fields, so the
76616
76944
  * project can't be tied back to a specific company/repo.
76617
76945
  */
76618
- const buildSentryProjectContext = (projectInfo) => ({
76619
- tags: {
76620
- "project.framework": projectInfo.framework,
76621
- "project.reactMajor": projectInfo.reactMajorVersion,
76622
- "project.typescript": projectInfo.hasTypeScript,
76623
- "project.reactCompiler": projectInfo.hasReactCompiler,
76624
- "project.expo": projectInfo.expoVersion !== null,
76625
- "project.reactNative": projectInfo.hasReactNativeWorkspace
76626
- },
76627
- context: {
76628
- framework: projectInfo.framework,
76629
- reactVersion: projectInfo.reactVersion,
76630
- reactMajorVersion: projectInfo.reactMajorVersion,
76631
- hasTypeScript: projectInfo.hasTypeScript,
76632
- hasReactCompiler: projectInfo.hasReactCompiler,
76633
- tanstackQueryVersion: projectInfo.tanstackQueryVersion,
76634
- mobxVersion: projectInfo.mobxVersion,
76635
- styledComponentsVersion: projectInfo.styledComponentsVersion,
76636
- tailwindVersion: projectInfo.tailwindVersion,
76637
- zodVersion: projectInfo.zodVersion,
76638
- preactVersion: projectInfo.preactVersion,
76639
- hasReactNativeWorkspace: projectInfo.hasReactNativeWorkspace,
76640
- expoVersion: projectInfo.expoVersion,
76641
- hasReanimated: projectInfo.hasReanimated,
76642
- sourceFileCount: projectInfo.sourceFileCount
76643
- }
76644
- });
76946
+ const buildSentryProjectContext = (projectInfo) => {
76947
+ const capabilities = buildCapabilities(projectInfo);
76948
+ const supportedRuntimes = [];
76949
+ if (capabilities.has("react")) supportedRuntimes.push("react");
76950
+ if (capabilities.has("three")) supportedRuntimes.push("three");
76951
+ if (capabilities.has("remotion")) supportedRuntimes.push("remotion");
76952
+ return {
76953
+ tags: {
76954
+ "project.framework": projectInfo.framework,
76955
+ "project.runtime": supportedRuntimes.join("+") || "unknown",
76956
+ "project.reactMajor": projectInfo.reactMajorVersion,
76957
+ "project.typescript": projectInfo.hasTypeScript,
76958
+ "project.reactCompiler": projectInfo.hasReactCompiler,
76959
+ "project.expo": projectInfo.expoVersion !== null,
76960
+ "project.reactNative": projectInfo.hasReactNativeWorkspace
76961
+ },
76962
+ context: {
76963
+ framework: projectInfo.framework,
76964
+ reactVersion: projectInfo.reactVersion,
76965
+ reactMajorVersion: projectInfo.reactMajorVersion,
76966
+ hasTypeScript: projectInfo.hasTypeScript,
76967
+ hasReactCompiler: projectInfo.hasReactCompiler,
76968
+ tanstackQueryVersion: projectInfo.tanstackQueryVersion,
76969
+ mobxVersion: projectInfo.mobxVersion,
76970
+ styledComponentsVersion: projectInfo.styledComponentsVersion,
76971
+ tailwindVersion: projectInfo.tailwindVersion,
76972
+ zodVersion: projectInfo.zodVersion,
76973
+ preactVersion: projectInfo.preactVersion,
76974
+ hasReactNativeWorkspace: projectInfo.hasReactNativeWorkspace,
76975
+ expoVersion: projectInfo.expoVersion,
76976
+ hasReanimated: projectInfo.hasReanimated,
76977
+ sourceFileCount: projectInfo.sourceFileCount
76978
+ }
76979
+ };
76980
+ };
76645
76981
  let currentProjectInfo = null;
76646
76982
  const setSentryProjectInfo = (projectInfo) => {
76647
76983
  currentProjectInfo = projectInfo;
@@ -76772,7 +77108,7 @@ const recordDistribution = (name, value, options = {}) => {
76772
77108
  } catch {}
76773
77109
  };
76774
77110
  //#endregion
76775
- export { Maintainability as $, CANONICAL_GITHUB_URL as $n, listSourceFiles as $t, SCAN_RESULT_CACHE_MAX_HASHED_FILE_SIZE_BYTES as A, makeSpan$1 as An, filterDiagnosticsForSurface as At, isGitHookEnvironment as B, try_ as Bn, getEquivalentRuleKeys as Bt, GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS as C, info as Cn, toCanonicalPath as Cr, computeConfigFingerprint as Ct, REACT_DOCTOR_CONFIG_PROJECT_NAME as D, decodeUnknownSync as Dn, createOxlintSpawnSlots as Dt, NANOSECONDS_PER_MILLISECOND as E, Diagnostic as En, createNodeReadFileLinesSync as Et, STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES as F, provideContext as Fn, formatReactDoctorError as Ft, isCiOrCodingAgentEnvironment as G, succeed$3 as Gn, highlighter as Gt, ACTION_INPUT_ENVIRONMENT_VARIABLES as H, buildWithScope as Hn, hasPublishedFixRecipe as Ht, TUI_REPORT_COMPACT_MAX_ROWS as I, provideService as In, getBaselineDiffPlan as It, Files as J, fail$5 as Jn, isProjectDiscoveryError as Jt, isCodingAgentEnvironment as K, close as Kn, isMonorepoRoot as Kt, TUI_REPORT_DETAIL_WIDTH_FRACTION as L, runPromise as Ln, getChangedLineRanges as Lt, SENTRY_FLUSH_TIMEOUT_MS as M, orElseSucceed as Mn, filterSourceFiles as Mt, SENTRY_RELEASE_PREFIX as N, promise as Nn, findLegacyConfig as Nt, RUN_GIT_MAX_BUFFER_BYTES as O, make$30 as On, detectAiTrainingEnvironment as Ot, STAGED_FILES_TEMP_DIR_PREFIX as P, provide as Pn, formatErrorChain as Pt, Linter as Q, CANONICAL_DISCORD_URL as Qn, layerObservability as Qt, CliInputError as R, runSync as Rn, getDiagnosticRuleIdentity as Rt, CI_TRUST_COMPANIES as S, error as Sn, messageFromUnknown as Sr, collectSourceFileCountsByDirectory as St, MINIMUM_VTE_VERSION_FOR_HYPERLINKS as T, warn$1 as Tn, countOptInProjectRuleSelections as Tt, detectRunnerOs as U, mergeAll$1 as Un, hasSupportedFrameworkOrLibrary as Ut, isDebugFlagEnabled as V, void_ as Vn, groupBy as Vt, isCiEnvironment as W, provide$2 as Wn, hashFileContents as Wt, LEGACY_CONFIG_FILENAME as X, ParentSpan as Xn, isSameRuleKey as Xt, Git as Y, void_$1 as Yn, isReactDoctorError as Yt, LintPartialFailures as Z, AXIOM_DEFAULT_DOMAIN as Zn, isScanComplete as Zt, makeNoopConsole as _, summarizeDiagnostics as _n, getCategoryImpact as _r, buildSkippedChecks as _t, isEnvFlagEnabled as a, mergeReactDoctorConfigs as an, DOCS_URL as ar, Project as at, AXIOM_TRACES_DATASET as b, yieldToEventLoop as bn, isFile as br, classifyFileContext as bt, setSentryProjectInfo as c, resolveLintBatchOrdering as cn, GIT_SHOW_MAX_BUFFER_BYTES as cr, SidecarLintCacheEnabled as ct, isJsonModeActive as d, resolveScanTarget as dn, JSX_FILE_PATTERN as dr, anonymizeInPlace as dt, listSourceFilesCooperative as en, CI_URL as er, NodeResolver as et, setJsonReportDirectory as f, restoreLegacyThrow as fn, MILLISECONDS_PER_SECOND as fr, anonymizeText as ft, VERSION as g, shouldUseMaintainabilityLayer as gn, STAGED_FILES_PROJECT_CONFIG_FILENAMES as gr, buildRuleSeverityControls as gt, writeJsonReport as h, setColorEnabled as hn, SKILL_NAME as hr, buildRuleDocsUrl as ht, isTelemetryEnabled as i, materializeSourceTree as in, DIAGNOSTIC_CATEGORY_BUCKETS as ir, Progress as it, SENTRY_DSN as j, map$3 as jn, filterPathsOutsideDirectories as jt, SCAN_RESULT_CACHE_FILENAME as k, gen as kn, discoverReactSubprojects as kt, getRunId as l, resolveReactDoctorCacheDir as ln, HTML_FILE_PATTERN as lr, StagedFiles as lt, writeJsonErrorReport as m, scrubSensitivePaths as mn, SHARE_BASE_URL as mr, buildJsonReport as mt, recordDistribution as n, loadConfigWithSource as nn, COMPILER_CLEANUP_RULE_KEYS as nr, OxlintSpawnSlots as nt, buildSentryScope as o, remainingDeadlineBudgetMs as on, ENTERPRISE_CONTACT_URL as or, Reporter as ot, setJsonReportMode as p, runInspect as pn, OXLINT_NODE_REQUIREMENT as pr, atomicWriteJson as pt, Config as q, makeUnsafe$5 as qn, isPathInsideDirectory as qt, toSpanAttributes as r, mapWithConcurrency as rn, CONFIG_SCHEMA_URL as rr, PerFileLintCacheEnabled as rt, buildSentryProjectContext as s, resolveGithubActionsScoreMetadata as sn, GITHUB_ACTIONS_SETUP_URL as sr, Score as st, recordCount as t, listWorkspacePackages as tn, COMPILER_CLEANUP_BUCKET as tr, OxlintConcurrency as tt, enableJsonMode as u, resolveScanConcurrency as un, JSX_DUPLICATION_SOURCE_FILE_PATTERN as ur, SupplyChain as ut, AXIOM_INGEST_TOKEN as v, toRelativePath as vn, isDirectory as vr, calculateScore as vt, METRIC as w, log as wn, computeDiagnosticDelta as wt, BASELINE_FILES_TEMP_DIR_PREFIX as x, Console as xn, isPlainObject as xr, clearConfigCache as xt, AXIOM_METRICS_DATASET as y, validateConfigTypes as yn, isErrnoException as yr, canonicalizeUserRuleKey as yt, isNonInteractiveEnvironment as z, sync as zn, getDiffInfo as zt };
77111
+ export { Linter as $, CANONICAL_DISCORD_URL as $n, layerObservability as $t, SCAN_RESULT_CACHE_FILENAME as A, gen as An, discoverSupportedSubprojects as At, isNonInteractiveEnvironment as B, sync as Bn, getDiffInfo as Bt, CI_TRUST_COMPANIES as C, error as Cn, messageFromUnknown as Cr, collectSourceFileCountsByDirectory as Ct, NANOSECONDS_PER_MILLISECOND as D, Diagnostic as Dn, createNodeReadFileLinesSync as Dt, MINIMUM_VTE_VERSION_FOR_HYPERLINKS as E, warn$1 as En, countOptInProjectRuleSelections as Et, STAGED_FILES_TEMP_DIR_PREFIX as F, provide as Fn, formatErrorChain as Ft, isCiEnvironment as G, provide$2 as Gn, hashFileContents as Gt, isDebugFlagEnabled as H, void_ as Hn, groupBy as Ht, STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES as I, provideContext as In, formatReactDoctorError as It, Config as J, makeUnsafe$5 as Jn, isPathInsideDirectory as Jt, isCiOrCodingAgentEnvironment as K, succeed$3 as Kn, highlighter as Kt, TUI_REPORT_COMPACT_MAX_ROWS as L, provideService as Ln, getBaselineDiffPlan as Lt, SENTRY_DSN as M, map$3 as Mn, filterPathsOutsideDirectories as Mt, SENTRY_FLUSH_TIMEOUT_MS as N, orElseSucceed as Nn, filterSourceFiles as Nt, REACT_DOCTOR_CONFIG_PROJECT_NAME as O, decodeUnknownSync as On, createOxlintSpawnSlots as Ot, SENTRY_RELEASE_PREFIX as P, promise as Pn, findLegacyConfig as Pt, LintPartialFailures as Q, AXIOM_DEFAULT_DOMAIN as Qn, isScanComplete as Qt, TUI_REPORT_DETAIL_WIDTH_FRACTION as R, runPromise as Rn, getChangedLineRanges as Rt, BASELINE_FILES_TEMP_DIR_PREFIX as S, Console as Sn, isPlainObject as Sr, clearConfigCache as St, METRIC as T, log as Tn, computeDiagnosticDelta as Tt, ACTION_INPUT_ENVIRONMENT_VARIABLES as U, buildWithScope as Un, hasPublishedFixRecipe as Ut, isGitHookEnvironment as V, try_ as Vn, getEquivalentRuleKeys as Vt, detectRunnerOs as W, mergeAll$1 as Wn, hasSupportedFrameworkOrLibrary as Wt, Git as X, void_$1 as Xn, isReactDoctorError as Xt, Files as Y, fail$5 as Yn, isProjectDiscoveryError as Yt, LEGACY_CONFIG_FILENAME as Z, ParentSpan as Zn, isSameRuleKey as Zt, VERSION as _, shouldUseMaintainabilityLayer as _n, STAGED_FILES_PROJECT_CONFIG_FILENAMES as _r, buildRuleSeverityControls as _t, isEnvFlagEnabled as a, materializeSourceTree as an, DIAGNOSTIC_CATEGORY_BUCKETS as ar, Progress as at, AXIOM_METRICS_DATASET as b, validateConfigTypes as bn, isErrnoException as br, canonicalizeUserRuleKey as bt, setSentryProjectInfo as c, resolveGithubActionsScoreMetadata as cn, GITHUB_ACTIONS_SETUP_URL as cr, Score as ct, isJsonModeActive as d, resolveScanConcurrency as dn, JSX_DUPLICATION_SOURCE_FILE_PATTERN as dr, SupplyChain as dt, listSourceFiles as en, CANONICAL_GITHUB_URL as er, Maintainability as et, setJsonReportDirectory as f, resolveScanTarget as fn, JSX_FILE_PATTERN as fr, anonymizeInPlace as ft, writeJsonReport as g, setColorEnabled as gn, SKILL_NAME as gr, buildRuleDocsUrl as gt, writeJsonErrorReport as h, scrubSensitivePaths as hn, SHARE_BASE_URL as hr, buildJsonReport as ht, isTelemetryEnabled as i, mapWithConcurrency as in, CONFIG_SCHEMA_URL as ir, PerFileLintCacheEnabled as it, SCAN_RESULT_CACHE_MAX_HASHED_FILE_SIZE_BYTES as j, makeSpan$1 as jn, filterDiagnosticsForSurface as jt, RUN_GIT_MAX_BUFFER_BYTES as k, make$30 as kn, detectAiTrainingEnvironment as kt, getRunId as l, resolveLintBatchOrdering as ln, GIT_SHOW_MAX_BUFFER_BYTES as lr, SidecarLintCacheEnabled as lt, writeJsonCancellationReport as m, runInspect as mn, OXLINT_NODE_REQUIREMENT as mr, atomicWriteJson as mt, recordDistribution as n, listWorkspacePackages as nn, COMPILER_CLEANUP_BUCKET as nr, OxlintConcurrency as nt, buildSentryScope as o, mergeReactDoctorConfigs as on, DOCS_URL as or, Project as ot, setJsonReportMode as p, restoreLegacyThrow as pn, MILLISECONDS_PER_SECOND as pr, anonymizeText as pt, isCodingAgentEnvironment as q, close as qn, isMonorepoRoot as qt, toSpanAttributes as r, loadConfigWithSource as rn, COMPILER_CLEANUP_RULE_KEYS as rr, OxlintSpawnSlots as rt, buildSentryProjectContext as s, remainingDeadlineBudgetMs as sn, ENTERPRISE_CONTACT_URL as sr, Reporter as st, recordCount as t, listSourceFilesCooperative as tn, CI_URL as tr, NodeResolver as tt, enableJsonMode as u, resolveReactDoctorCacheDir as un, HTML_FILE_PATTERN as ur, StagedFiles as ut, makeNoopConsole as v, summarizeDiagnostics as vn, getCategoryImpact as vr, buildSkippedChecks as vt, GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS as w, info as wn, toCanonicalPath as wr, computeConfigFingerprint as wt, AXIOM_TRACES_DATASET as x, yieldToEventLoop as xn, isFile as xr, classifyFileContext as xt, AXIOM_INGEST_TOKEN as y, toRelativePath as yn, isDirectory as yr, calculateScore as yt, CliInputError as z, runSync as zn, getDiagnosticRuleIdentity as zt };
76776
77112
 
76777
- //# sourceMappingURL=record-metric-Dgg2b2LG.js.map
76778
- //# debugId=2be4cfbe-6b97-51f6-b632-227d36a7e5cf
77113
+ //# sourceMappingURL=record-metric-CKATohPd.js.map
77114
+ //# debugId=e95aac53-faf7-5068-ba74-9ec3861cf20c