react-doctor 0.9.12-dev.ffc2d14 → 0.9.13-dev.1239043
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.
- package/README.md +33 -0
- package/dist/active-run-trace-dlIZeEvb.js +18 -0
- package/dist/active-scan-abort-registry-DwG6tSPy.js +28 -0
- package/dist/{build-section-divider-BuOtLrzK.js → build-section-divider-C09RcJrc.js} +8 -22
- package/dist/{ci-DVVsf25h.js → ci-CUgNjCr-.js} +12 -11
- package/dist/cli.js +116 -35
- package/dist/{design-Y1pcA2uj.js → design-CX2j8ubS.js} +4 -4
- package/dist/{devtools-D8NTVj81.js → devtools-CC2PAZ85.js} +3 -3
- package/dist/{exit-gracefully-DnXGONjj.js → exit-gracefully-cGJM2g3O.js} +15 -9
- package/dist/get-east-asian-width-Bv2TD3Xj.js +444 -0
- package/dist/{report-error-MGKyeIns.js → handle-error-BCI-Nv3P.js} +18 -68
- package/dist/index.d.ts +32 -0
- package/dist/index.js +628 -301
- package/dist/{inspect-g3_lzs3l.js → inspect-Dq5krKWG.js} +41 -29
- package/dist/{install-02Lq6wKC.js → install-C0aiZKgf.js} +9 -8
- package/dist/{install-doctor-script-DmEWQpVJ.js → install-doctor-script-CaTIms0r.js} +7 -449
- package/dist/{install-github-workflow-Dx6Pl9Wl.js → install-github-workflow-DjPgXVqg.js} +10 -6
- package/dist/{install-react-doctor-CMCXgenA.js → install-react-doctor-C-PVDWXv.js} +8 -8
- package/dist/{run-scan-app-CDDu7P32.js → jsx-runtime-D_A4d39v.js} +280 -2774
- package/dist/path-format-DnHpmJwG.js +9 -0
- package/dist/{print-branded-header-kbvWYuGv.js → print-branded-header-Dz0SwyHQ.js} +4 -4
- package/dist/project-analysis-worker.js +59 -54
- package/dist/prompt-runtime-scan-url-BXdY2Opw.js +240 -0
- package/dist/{read-object-file-Cwhr9OIi.js → read-object-file-CmMGK1uu.js} +4 -4
- package/dist/{record-metric-CFfsgcVs.js → record-metric-B6T_Ej33.js} +592 -250
- package/dist/report-error-DwL3b99q.js +64 -0
- package/dist/{report-workflow-result-DGg9xopH.js → report-workflow-result-5PueDIAr.js} +5 -5
- package/dist/{resolve-scope-CXS-5jLR.js → resolve-scope-CTlLl7e6.js} +8 -10
- package/dist/{rules-CThlosPx.js → rules-DEbHKRag.js} +6 -6
- package/dist/run-scan-app-D3huvmXJ.js +2517 -0
- package/dist/runtime-scan/browser-probe.iife.js +855 -0
- package/dist/runtime-scan-CHFAEYg3.js +770 -0
- package/dist/sanitize-runtime-url-Bbq40iIp.js +76 -0
- package/dist/scan-C7sCm7wi.js +47 -0
- package/dist/{should-fail-scan-gate-C0Bo5Gqy.js → should-fail-scan-gate-CfG_ppAV.js} +50 -117
- package/dist/{should-skip-prompts-BqrtVX4G.js → should-skip-prompts-BuNtAVEs.js} +4 -4
- package/dist/should-use-tui-B-lCjXVG.js +25 -0
- package/dist/skills/improve-threejs/SKILL.md +102 -0
- package/dist/skills/performance/SKILL.md +113 -0
- package/dist/skills/react-doctor/SKILL.md +6 -0
- package/dist/{unref-stdin-BxyvqsOy.js → telemetry-runtime-BF83aBFL.js} +55 -25
- package/dist/unref-stdin-SK3WfwxS.js +12 -0
- package/dist/{version-S-8vvWFi.js → version-C27gr4Qj.js} +4 -4
- package/dist/{why-DXfx0oL9.js → why-CYRkZ2VY.js} +4 -4
- package/dist/with-run-span-CdsXSJgE.js +110 -0
- package/package.json +9 -6
- package/dist/scan-4I1mvxBO.js +0 -53
|
@@ -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]="
|
|
3
|
-
import { i as __toESM
|
|
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]="1cdcd086-7195-554b-baff-59f165cb07bd")}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";
|
|
@@ -19,15 +20,15 @@ import { fileURLToPath } from "node:url";
|
|
|
19
20
|
import * as OS from "node:os";
|
|
20
21
|
import os from "node:os";
|
|
21
22
|
import { createJiti } from "jiti";
|
|
22
|
-
import { parseJSON5 } from "confbox";
|
|
23
|
+
import { parseJSON5, parseJSONC } from "confbox";
|
|
23
24
|
import * as fs$1 from "node:fs/promises";
|
|
24
25
|
import { PassThrough } from "node:stream";
|
|
25
26
|
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-
|
|
30
|
-
var import_picomatch = /* @__PURE__ */ __toESM
|
|
30
|
+
//#region ../core/dist/collect-unplugin-auto-import-global-scopes-BUQgAJ1L.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
|
|
@@ -418,7 +420,8 @@ const SUPPLY_CHAIN_OVERLAP_TIMEOUT_MS = 9e4;
|
|
|
418
420
|
const SUPPLY_CHAIN_CACHE_TTL_MS = 864e5;
|
|
419
421
|
const SUPPLY_CHAIN_CACHE_SUBDIR = "supply-chain";
|
|
420
422
|
const SUPPLY_CHAIN_IGNORED_PACKAGES = new Set(["next"]);
|
|
421
|
-
const JSX_DUPLICATION_SOURCE_FILE_PATTERN = /\.[cm]?
|
|
423
|
+
const JSX_DUPLICATION_SOURCE_FILE_PATTERN = /\.[cm]?(?:jsx?|tsx)$/;
|
|
424
|
+
const MAINTAINABILITY_SOURCE_FILE_PATTERN = /\.[cm]?[jt]sx?$/;
|
|
422
425
|
const MAINTAINABILITY_PLUGIN = "react-doctor";
|
|
423
426
|
const MAINTAINABILITY_DUPLICATE_JSX_RULE = "duplicate-jsx-subtree";
|
|
424
427
|
const MAINTAINABILITY_CATEGORY = "Maintainability";
|
|
@@ -570,6 +573,74 @@ const compileGlobPatternsLenient = (patterns, onInvalid) => {
|
|
|
570
573
|
}
|
|
571
574
|
return compiled;
|
|
572
575
|
};
|
|
576
|
+
const isOxcAstNode = (value) => Boolean(value) && typeof value === "object" && typeof value.type === "string";
|
|
577
|
+
const getStaticModuleSpecifier = (value) => {
|
|
578
|
+
if (!isOxcAstNode(value)) return void 0;
|
|
579
|
+
if (typeof value.value === "string") return value.value;
|
|
580
|
+
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;
|
|
581
|
+
};
|
|
582
|
+
const collectStaticModuleSpecifiers = (sourceText, options = {}) => {
|
|
583
|
+
const { filePath = "module.tsx", includeTypeOnly = true } = options;
|
|
584
|
+
const parsedModule = parseSync(filePath, sourceText, { sourceType: "unambiguous" });
|
|
585
|
+
const moduleSpecifiers = /* @__PURE__ */ new Set();
|
|
586
|
+
const addSpecifier = (value) => {
|
|
587
|
+
const moduleSpecifier = getStaticModuleSpecifier(value);
|
|
588
|
+
if (moduleSpecifier) moduleSpecifiers.add(moduleSpecifier);
|
|
589
|
+
};
|
|
590
|
+
const visitNode = (value) => {
|
|
591
|
+
if (Array.isArray(value)) {
|
|
592
|
+
for (const child of value) visitNode(child);
|
|
593
|
+
return;
|
|
594
|
+
}
|
|
595
|
+
if (!isOxcAstNode(value)) return;
|
|
596
|
+
if (value.type === "ImportDeclaration") {
|
|
597
|
+
const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
|
|
598
|
+
const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.importKind !== "type");
|
|
599
|
+
if (includeTypeOnly || value.importKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
|
|
600
|
+
} else if (value.type === "ExportNamedDeclaration") {
|
|
601
|
+
const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
|
|
602
|
+
const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.exportKind !== "type");
|
|
603
|
+
if (includeTypeOnly || value.exportKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
|
|
604
|
+
} else if (value.type === "ExportAllDeclaration" || value.type === "ImportExpression") {
|
|
605
|
+
if (includeTypeOnly || value.exportKind !== "type") addSpecifier(value.source);
|
|
606
|
+
} else if (value.type === "TSImportType") {
|
|
607
|
+
if (includeTypeOnly) addSpecifier(value.source);
|
|
608
|
+
} else if (value.type === "TSExternalModuleReference") addSpecifier(value.expression);
|
|
609
|
+
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]);
|
|
610
|
+
for (const child of Object.values(value)) visitNode(child);
|
|
611
|
+
};
|
|
612
|
+
visitNode(parsedModule.program);
|
|
613
|
+
return moduleSpecifiers;
|
|
614
|
+
};
|
|
615
|
+
const toPosixPath = (filePath) => filePath.replace(/\\/g, "/");
|
|
616
|
+
const isPathInsideDirectoryOrEqual = (candidatePath, directoryPath) => {
|
|
617
|
+
const normalizedCandidatePath = posix.normalize(toPosixPath(candidatePath));
|
|
618
|
+
const normalizedDirectoryPath = posix.normalize(toPosixPath(directoryPath));
|
|
619
|
+
const relativePath = posix.relative(normalizedDirectoryPath, normalizedCandidatePath);
|
|
620
|
+
return relativePath === "" || relativePath !== ".." && !relativePath.startsWith("../") && !posix.isAbsolute(relativePath);
|
|
621
|
+
};
|
|
622
|
+
const RESOLVABLE_EXTENSIONS = [
|
|
623
|
+
".ts",
|
|
624
|
+
".tsx",
|
|
625
|
+
".js",
|
|
626
|
+
".jsx",
|
|
627
|
+
".mjs",
|
|
628
|
+
".mts",
|
|
629
|
+
".cjs",
|
|
630
|
+
".cts",
|
|
631
|
+
".es6"
|
|
632
|
+
];
|
|
633
|
+
const resolveEntryWithExtensions = (basePath) => {
|
|
634
|
+
if (existsSync(basePath)) return basePath;
|
|
635
|
+
for (const extension of RESOLVABLE_EXTENSIONS) {
|
|
636
|
+
const withExtension = basePath + extension;
|
|
637
|
+
if (existsSync(withExtension)) return withExtension;
|
|
638
|
+
}
|
|
639
|
+
for (const extension of RESOLVABLE_EXTENSIONS) {
|
|
640
|
+
const indexCandidate = join(basePath, `index${extension}`);
|
|
641
|
+
if (existsSync(indexCandidate)) return indexCandidate;
|
|
642
|
+
}
|
|
643
|
+
};
|
|
573
644
|
/**
|
|
574
645
|
* Resolves a path to its canonical, symlink-free form, falling back to
|
|
575
646
|
* the input when it cannot be realpath'd (broken symlink, permission
|
|
@@ -22136,7 +22207,7 @@ Union([
|
|
|
22136
22207
|
]);
|
|
22137
22208
|
//#endregion
|
|
22138
22209
|
//#region ../../node_modules/.pnpm/baseline-browser-mapping@2.9.19/node_modules/baseline-browser-mapping/dist/index.cjs
|
|
22139
|
-
var require_dist = /* @__PURE__ */ __commonJSMin
|
|
22210
|
+
var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
22140
22211
|
const s = {
|
|
22141
22212
|
chrome: { releases: [
|
|
22142
22213
|
[
|
|
@@ -41386,7 +41457,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
41386
41457
|
}));
|
|
41387
41458
|
//#endregion
|
|
41388
41459
|
//#region ../../node_modules/.pnpm/node-releases@2.0.27/node_modules/node-releases/data/processed/envs.json
|
|
41389
|
-
var require_envs = /* @__PURE__ */ __commonJSMin
|
|
41460
|
+
var require_envs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
41390
41461
|
module.exports = [
|
|
41391
41462
|
{
|
|
41392
41463
|
"name": "nodejs",
|
|
@@ -44168,7 +44239,7 @@ var require_envs = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
44168
44239
|
}));
|
|
44169
44240
|
//#endregion
|
|
44170
44241
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/data/browsers.js
|
|
44171
|
-
var require_browsers$1 = /* @__PURE__ */ __commonJSMin
|
|
44242
|
+
var require_browsers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
44172
44243
|
module.exports = {
|
|
44173
44244
|
A: "ie",
|
|
44174
44245
|
B: "edge",
|
|
@@ -44193,12 +44264,12 @@ var require_browsers$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
44193
44264
|
}));
|
|
44194
44265
|
//#endregion
|
|
44195
44266
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/unpacker/browsers.js
|
|
44196
|
-
var require_browsers = /* @__PURE__ */ __commonJSMin
|
|
44267
|
+
var require_browsers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
44197
44268
|
module.exports.browsers = require_browsers$1();
|
|
44198
44269
|
}));
|
|
44199
44270
|
//#endregion
|
|
44200
44271
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/data/browserVersions.js
|
|
44201
|
-
var require_browserVersions$1 = /* @__PURE__ */ __commonJSMin
|
|
44272
|
+
var require_browserVersions$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
44202
44273
|
module.exports = {
|
|
44203
44274
|
"0": "117",
|
|
44204
44275
|
"1": "118",
|
|
@@ -44450,12 +44521,12 @@ var require_browserVersions$1 = /* @__PURE__ */ __commonJSMin$1(((exports, modul
|
|
|
44450
44521
|
}));
|
|
44451
44522
|
//#endregion
|
|
44452
44523
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/unpacker/browserVersions.js
|
|
44453
|
-
var require_browserVersions = /* @__PURE__ */ __commonJSMin
|
|
44524
|
+
var require_browserVersions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
44454
44525
|
module.exports.browserVersions = require_browserVersions$1();
|
|
44455
44526
|
}));
|
|
44456
44527
|
//#endregion
|
|
44457
44528
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/data/agents.js
|
|
44458
|
-
var require_agents$1 = /* @__PURE__ */ __commonJSMin
|
|
44529
|
+
var require_agents$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
44459
44530
|
module.exports = {
|
|
44460
44531
|
A: {
|
|
44461
44532
|
A: {
|
|
@@ -48824,7 +48895,7 @@ var require_agents$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
48824
48895
|
}));
|
|
48825
48896
|
//#endregion
|
|
48826
48897
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/unpacker/agents.js
|
|
48827
|
-
var require_agents = /* @__PURE__ */ __commonJSMin
|
|
48898
|
+
var require_agents = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
48828
48899
|
const browsers = require_browsers().browsers;
|
|
48829
48900
|
const versions = require_browserVersions().browserVersions;
|
|
48830
48901
|
const agentsData = require_agents$1();
|
|
@@ -48857,7 +48928,7 @@ var require_agents = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
48857
48928
|
}));
|
|
48858
48929
|
//#endregion
|
|
48859
48930
|
//#region ../../node_modules/.pnpm/electron-to-chromium@1.5.286/node_modules/electron-to-chromium/versions.js
|
|
48860
|
-
var require_versions = /* @__PURE__ */ __commonJSMin
|
|
48931
|
+
var require_versions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
48861
48932
|
module.exports = {
|
|
48862
48933
|
"0.20": "39",
|
|
48863
48934
|
"0.21": "41",
|
|
@@ -49091,7 +49162,7 @@ var require_versions = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
49091
49162
|
}));
|
|
49092
49163
|
//#endregion
|
|
49093
49164
|
//#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
|
|
49165
|
+
var require_release_schedule = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49095
49166
|
module.exports = {
|
|
49096
49167
|
"v0.8": {
|
|
49097
49168
|
"start": "2012-06-25",
|
|
@@ -49248,7 +49319,7 @@ var require_release_schedule = /* @__PURE__ */ __commonJSMin$1(((exports, module
|
|
|
49248
49319
|
}));
|
|
49249
49320
|
//#endregion
|
|
49250
49321
|
//#region ../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/error.js
|
|
49251
|
-
var require_error = /* @__PURE__ */ __commonJSMin
|
|
49322
|
+
var require_error = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49252
49323
|
function BrowserslistError(message) {
|
|
49253
49324
|
this.name = "BrowserslistError";
|
|
49254
49325
|
this.message = message;
|
|
@@ -49260,7 +49331,7 @@ var require_error = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
49260
49331
|
}));
|
|
49261
49332
|
//#endregion
|
|
49262
49333
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/lib/statuses.js
|
|
49263
|
-
var require_statuses = /* @__PURE__ */ __commonJSMin
|
|
49334
|
+
var require_statuses = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49264
49335
|
module.exports = {
|
|
49265
49336
|
1: "ls",
|
|
49266
49337
|
2: "rec",
|
|
@@ -49273,7 +49344,7 @@ var require_statuses = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
49273
49344
|
}));
|
|
49274
49345
|
//#endregion
|
|
49275
49346
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/lib/supported.js
|
|
49276
|
-
var require_supported = /* @__PURE__ */ __commonJSMin
|
|
49347
|
+
var require_supported = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49277
49348
|
module.exports = {
|
|
49278
49349
|
y: 1,
|
|
49279
49350
|
n: 2,
|
|
@@ -49286,7 +49357,7 @@ var require_supported = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
49286
49357
|
}));
|
|
49287
49358
|
//#endregion
|
|
49288
49359
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/unpacker/feature.js
|
|
49289
|
-
var require_feature = /* @__PURE__ */ __commonJSMin
|
|
49360
|
+
var require_feature = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49290
49361
|
const statuses = require_statuses();
|
|
49291
49362
|
const supported = require_supported();
|
|
49292
49363
|
const browsers = require_browsers().browsers;
|
|
@@ -49329,7 +49400,7 @@ var require_feature = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
49329
49400
|
}));
|
|
49330
49401
|
//#endregion
|
|
49331
49402
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/unpacker/region.js
|
|
49332
|
-
var require_region = /* @__PURE__ */ __commonJSMin
|
|
49403
|
+
var require_region = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49333
49404
|
const browsers = require_browsers().browsers;
|
|
49334
49405
|
function unpackRegion(packed) {
|
|
49335
49406
|
return Object.keys(packed).reduce((list, browser) => {
|
|
@@ -49348,7 +49419,7 @@ var require_region = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
49348
49419
|
}));
|
|
49349
49420
|
//#endregion
|
|
49350
49421
|
//#region ../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/node.js
|
|
49351
|
-
var require_node = /* @__PURE__ */ __commonJSMin
|
|
49422
|
+
var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49352
49423
|
var feature = require_feature().default;
|
|
49353
49424
|
var region = require_region().default;
|
|
49354
49425
|
var fs$2 = __require("fs");
|
|
@@ -49641,7 +49712,7 @@ var require_node = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
49641
49712
|
}));
|
|
49642
49713
|
//#endregion
|
|
49643
49714
|
//#region ../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/parse.js
|
|
49644
|
-
var require_parse = /* @__PURE__ */ __commonJSMin
|
|
49715
|
+
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49645
49716
|
var AND_REGEXP = /^\s+and\s+(.*)/i;
|
|
49646
49717
|
var OR_REGEXP = /^(?:,\s*|\s+or\s+)(.*)/i;
|
|
49647
49718
|
function flatten(array) {
|
|
@@ -49707,7 +49778,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
49707
49778
|
}));
|
|
49708
49779
|
//#endregion
|
|
49709
49780
|
//#region ../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/index.js
|
|
49710
|
-
var require_browserslist = /* @__PURE__ */ __commonJSMin
|
|
49781
|
+
var require_browserslist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49711
49782
|
var bbm = require_dist();
|
|
49712
49783
|
var jsReleases = require_envs();
|
|
49713
49784
|
var agents = require_agents().agents;
|
|
@@ -50729,8 +50800,8 @@ var require_browserslist = /* @__PURE__ */ __commonJSMin$1(((exports, module) =>
|
|
|
50729
50800
|
}));
|
|
50730
50801
|
//#endregion
|
|
50731
50802
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Brand.js
|
|
50732
|
-
var import_semver = /* @__PURE__ */ __toESM
|
|
50733
|
-
var import_browserslist = /* @__PURE__ */ __toESM
|
|
50803
|
+
var import_semver = /* @__PURE__ */ __toESM(require_semver(), 1);
|
|
50804
|
+
var import_browserslist = /* @__PURE__ */ __toESM(require_browserslist(), 1);
|
|
50734
50805
|
/**
|
|
50735
50806
|
* Returns a `Constructor` that **does not apply any runtime checks** and just
|
|
50736
50807
|
* returns the provided value.
|
|
@@ -60327,6 +60398,72 @@ const warn$1 = (...args) => consoleWith((console) => sync$2(() => {
|
|
|
60327
60398
|
}));
|
|
60328
60399
|
//#endregion
|
|
60329
60400
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Cache.js
|
|
60401
|
+
var import_picocolors = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
60402
|
+
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
60403
|
+
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);
|
|
60404
|
+
let formatter = (open, close, replace = open) => (input) => {
|
|
60405
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
60406
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
60407
|
+
};
|
|
60408
|
+
let replaceClose = (string, close, replace, index) => {
|
|
60409
|
+
let result = "", cursor = 0;
|
|
60410
|
+
do {
|
|
60411
|
+
result += string.substring(cursor, index) + replace;
|
|
60412
|
+
cursor = index + close.length;
|
|
60413
|
+
index = string.indexOf(close, cursor);
|
|
60414
|
+
} while (~index);
|
|
60415
|
+
return result + string.substring(cursor);
|
|
60416
|
+
};
|
|
60417
|
+
let createColors = (enabled = isColorSupported) => {
|
|
60418
|
+
let f = enabled ? formatter : () => String;
|
|
60419
|
+
return {
|
|
60420
|
+
isColorSupported: enabled,
|
|
60421
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
60422
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
60423
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
60424
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
60425
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
60426
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
60427
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
60428
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
60429
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
60430
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
60431
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
60432
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
60433
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
60434
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
60435
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
60436
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
60437
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
60438
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
60439
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
60440
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
60441
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
60442
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
60443
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
60444
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
60445
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
60446
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
60447
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
60448
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
60449
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
60450
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
60451
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
60452
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
60453
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
60454
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
60455
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
60456
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
60457
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
60458
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
60459
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
60460
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
60461
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
60462
|
+
};
|
|
60463
|
+
};
|
|
60464
|
+
module.exports = createColors();
|
|
60465
|
+
module.exports.createColors = createColors;
|
|
60466
|
+
})))(), 1);
|
|
60330
60467
|
/**
|
|
60331
60468
|
* Caches values loaded by an Effect lookup function.
|
|
60332
60469
|
*
|
|
@@ -62296,27 +62433,6 @@ function traceSegmentInternal(segments, memo, line, column, bias) {
|
|
|
62296
62433
|
}
|
|
62297
62434
|
//#endregion
|
|
62298
62435
|
//#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
62436
|
var ProjectNotFoundError = class extends Error {
|
|
62321
62437
|
name = "ProjectNotFoundError";
|
|
62322
62438
|
directory;
|
|
@@ -62446,6 +62562,14 @@ const isLargeMinifiedFile = (absolutePath, knownSizeBytes) => {
|
|
|
62446
62562
|
cachedIsLargeMinifiedByPath.set(absolutePath, result);
|
|
62447
62563
|
return result;
|
|
62448
62564
|
};
|
|
62565
|
+
const isMissingPath = (absolutePath) => {
|
|
62566
|
+
try {
|
|
62567
|
+
fs$1$3.statSync(absolutePath);
|
|
62568
|
+
return false;
|
|
62569
|
+
} catch (error) {
|
|
62570
|
+
return isErrnoException(error) && error.code === "ENOENT";
|
|
62571
|
+
}
|
|
62572
|
+
};
|
|
62449
62573
|
function* walkSourceTreeFiles(rootDirectory) {
|
|
62450
62574
|
const stack = [rootDirectory];
|
|
62451
62575
|
while (stack.length > 0) {
|
|
@@ -62467,16 +62591,21 @@ function* walkSourceTreeFiles(rootDirectory) {
|
|
|
62467
62591
|
const yieldToEventLoop = () => new Promise((resolve) => {
|
|
62468
62592
|
setImmediate(resolve);
|
|
62469
62593
|
});
|
|
62594
|
+
const toSizedSourceFileEntry = (rootDirectory, relativePath) => {
|
|
62595
|
+
const absolutePath = path$1$1.resolve(rootDirectory, relativePath);
|
|
62596
|
+
const sizeBytes = statSourceFileSize(absolutePath);
|
|
62597
|
+
if (sizeBytes === null && isMissingPath(absolutePath)) return null;
|
|
62598
|
+
if (isLargeMinifiedFile(absolutePath, sizeBytes)) return null;
|
|
62599
|
+
return {
|
|
62600
|
+
path: relativePath,
|
|
62601
|
+
sizeBytes: sizeBytes ?? 0
|
|
62602
|
+
};
|
|
62603
|
+
};
|
|
62470
62604
|
const collectSizedSourceFiles = (rootDirectory, relativePaths) => {
|
|
62471
62605
|
const entries = [];
|
|
62472
62606
|
for (const relativePath of relativePaths) {
|
|
62473
|
-
const
|
|
62474
|
-
|
|
62475
|
-
if (isLargeMinifiedFile(absolutePath, sizeBytes)) continue;
|
|
62476
|
-
entries.push({
|
|
62477
|
-
path: relativePath,
|
|
62478
|
-
sizeBytes: sizeBytes ?? 0
|
|
62479
|
-
});
|
|
62607
|
+
const entry = toSizedSourceFileEntry(rootDirectory, relativePath);
|
|
62608
|
+
if (entry !== null) entries.push(entry);
|
|
62480
62609
|
}
|
|
62481
62610
|
return entries;
|
|
62482
62611
|
};
|
|
@@ -62485,12 +62614,8 @@ const collectSizedSourceFilesCooperative = async (rootDirectory, relativePaths,
|
|
|
62485
62614
|
let sliceStartedAt = performance.now();
|
|
62486
62615
|
for (const relativePath of relativePaths) {
|
|
62487
62616
|
signal?.throwIfAborted();
|
|
62488
|
-
const
|
|
62489
|
-
|
|
62490
|
-
if (!isLargeMinifiedFile(absolutePath, sizeBytes)) entries.push({
|
|
62491
|
-
path: relativePath,
|
|
62492
|
-
sizeBytes: sizeBytes ?? 0
|
|
62493
|
-
});
|
|
62617
|
+
const entry = toSizedSourceFileEntry(rootDirectory, relativePath);
|
|
62618
|
+
if (entry !== null) entries.push(entry);
|
|
62494
62619
|
if (performance.now() - sliceStartedAt >= 12) {
|
|
62495
62620
|
await yieldToEventLoop();
|
|
62496
62621
|
sliceStartedAt = performance.now();
|
|
@@ -63320,12 +63445,27 @@ const analyzeConfigIdentifier = (identifier, analysis, allowCompilerTransform, i
|
|
|
63320
63445
|
const topLevelBinding = getTopLevelBinding(analysis.sourceFile, identifier.text);
|
|
63321
63446
|
return Boolean(topLevelBinding && analyzeConfigNode(topLevelBinding, analysis, allowCompilerTransform, isCompilerTransformCollection, overriddenPropertyNames));
|
|
63322
63447
|
};
|
|
63448
|
+
const hasReactCompilerConfigInSentryWrapperArgument = (callExpression, analysis, moduleSpecifier, exportName) => {
|
|
63449
|
+
if (moduleSpecifier !== "@sentry/nextjs" || exportName !== "withSentryConfig") return false;
|
|
63450
|
+
const [configArgument] = callExpression.arguments;
|
|
63451
|
+
return Boolean(configArgument && analyzeConfigNode(configArgument, analysis, false));
|
|
63452
|
+
};
|
|
63453
|
+
const hasEnabledCompilerOptionInVitePluginArgument = (callExpression, analysis, moduleSpecifier, exportName) => {
|
|
63454
|
+
if (moduleSpecifier !== "@vitejs/plugin-react" || exportName !== "default") return false;
|
|
63455
|
+
const [optionsArgument] = callExpression.arguments;
|
|
63456
|
+
if (!optionsArgument) return false;
|
|
63457
|
+
const compilerProperty = getSelectedObjectProperty(optionsArgument, "compiler", analysis);
|
|
63458
|
+
if (compilerProperty === null) return false;
|
|
63459
|
+
return !ts.isExpression(compilerProperty.node) || !isStaticallyDisabledConfigExpression(compilerProperty.node, compilerProperty.analysis);
|
|
63460
|
+
};
|
|
63461
|
+
const hasReactCompilerConfigInCallArguments = (callExpression, analysis, moduleSpecifier, exportName) => hasReactCompilerConfigInSentryWrapperArgument(callExpression, analysis, moduleSpecifier, exportName) || hasEnabledCompilerOptionInVitePluginArgument(callExpression, analysis, moduleSpecifier, exportName);
|
|
63323
63462
|
const analyzeConfigCallTarget = (callExpression, analysis, allowCompilerTransform) => {
|
|
63324
63463
|
const target = callExpression.expression;
|
|
63325
63464
|
const callableRequiredModuleSpecifier = getRequireModuleSpecifier(target);
|
|
63326
63465
|
if (callableRequiredModuleSpecifier !== null) {
|
|
63327
63466
|
if (ts.isCallExpression(target) && ts.isIdentifier(target.expression) && (analysis.localBindings.has(target.expression.text) || getScopedConfigBinding(target.expression).wasFound || hasTopLevelValueBinding(analysis.sourceFile, "require"))) return false;
|
|
63328
63467
|
if (allowCompilerTransform && isCompilerTransformModule(callableRequiredModuleSpecifier, "default")) return true;
|
|
63468
|
+
if (hasReactCompilerConfigInCallArguments(callExpression, analysis, callableRequiredModuleSpecifier, "default")) return true;
|
|
63329
63469
|
const hasCompilerTransform = analyzeImportedConfig({
|
|
63330
63470
|
analysis,
|
|
63331
63471
|
moduleSpecifier: callableRequiredModuleSpecifier,
|
|
@@ -63343,6 +63483,7 @@ const analyzeConfigCallTarget = (callExpression, analysis, allowCompilerTransfor
|
|
|
63343
63483
|
if (requiredModuleSpecifier !== null) {
|
|
63344
63484
|
if (ts.isCallExpression(target.expression) && ts.isIdentifier(target.expression.expression) && (analysis.localBindings.has(target.expression.expression.text) || getScopedConfigBinding(target.expression.expression).wasFound || hasTopLevelValueBinding(analysis.sourceFile, "require"))) return false;
|
|
63345
63485
|
if (allowCompilerTransform && isCompilerTransformModule(requiredModuleSpecifier, propertyName)) return true;
|
|
63486
|
+
if (hasReactCompilerConfigInCallArguments(callExpression, analysis, requiredModuleSpecifier, propertyName)) return true;
|
|
63346
63487
|
const hasCompilerTransform = analyzeImportedConfig({
|
|
63347
63488
|
analysis,
|
|
63348
63489
|
moduleSpecifier: requiredModuleSpecifier,
|
|
@@ -63357,6 +63498,7 @@ const analyzeConfigCallTarget = (callExpression, analysis, allowCompilerTransfor
|
|
|
63357
63498
|
const importBinding = analysis.localBindings.has(target.expression.text) || getScopedConfigBinding(target.expression).wasFound ? null : getImportBinding(analysis.sourceFile, target.expression.text);
|
|
63358
63499
|
if (importBinding?.isNamespace) {
|
|
63359
63500
|
if (allowCompilerTransform && isCompilerTransformModule(importBinding.moduleSpecifier, propertyName)) return true;
|
|
63501
|
+
if (hasReactCompilerConfigInCallArguments(callExpression, analysis, importBinding.moduleSpecifier, propertyName)) return true;
|
|
63360
63502
|
const hasCompilerTransform = analyzeImportedConfig({
|
|
63361
63503
|
analysis,
|
|
63362
63504
|
moduleSpecifier: importBinding.moduleSpecifier,
|
|
@@ -63458,6 +63600,7 @@ const analyzeConfigNode = (node, analysis, allowCompilerTransform, isCompilerTra
|
|
|
63458
63600
|
const importBinding = getImportBinding(analysis.sourceFile, node.expression.text);
|
|
63459
63601
|
if (importBinding) {
|
|
63460
63602
|
if (allowCompilerTransform && isCompilerTransformModule(importBinding.moduleSpecifier, importBinding.exportName)) return true;
|
|
63603
|
+
if (hasReactCompilerConfigInCallArguments(node, analysis, importBinding.moduleSpecifier, importBinding.exportName)) return true;
|
|
63461
63604
|
if (allowCompilerTransform && importBinding.moduleSpecifier === "@rolldown/plugin-babel" && importBinding.exportName === "default" && node.arguments.some((argument) => analyzeConfigNode(argument, analysis, false))) return true;
|
|
63462
63605
|
const hasCompilerTransform = analyzeImportedConfig({
|
|
63463
63606
|
analysis,
|
|
@@ -63691,6 +63834,18 @@ const detectPreES2023Target = (directory) => {
|
|
|
63691
63834
|
}
|
|
63692
63835
|
return false;
|
|
63693
63836
|
};
|
|
63837
|
+
const SHADCN_CONFIG_FILE_NAME = "components.json";
|
|
63838
|
+
const detectShadcnUi = (directory) => {
|
|
63839
|
+
if (isFile(path$1$1.join(directory, SHADCN_CONFIG_FILE_NAME))) return true;
|
|
63840
|
+
if (isProjectBoundary(directory)) return false;
|
|
63841
|
+
let ancestorDirectory = path$1$1.dirname(directory);
|
|
63842
|
+
while (ancestorDirectory !== path$1$1.dirname(ancestorDirectory)) {
|
|
63843
|
+
if (isFile(path$1$1.join(ancestorDirectory, SHADCN_CONFIG_FILE_NAME))) return true;
|
|
63844
|
+
if (isProjectBoundary(ancestorDirectory)) return false;
|
|
63845
|
+
ancestorDirectory = path$1$1.dirname(ancestorDirectory);
|
|
63846
|
+
}
|
|
63847
|
+
return false;
|
|
63848
|
+
};
|
|
63694
63849
|
const FRAMEWORK_PACKAGES = {
|
|
63695
63850
|
next: "nextjs",
|
|
63696
63851
|
"@tanstack/react-start": "tanstack-start",
|
|
@@ -64456,6 +64611,29 @@ const getTanStackQueryVersion = (packageJson) => {
|
|
|
64456
64611
|
packageNames: TANSTACK_REACT_QUERY_PACKAGES
|
|
64457
64612
|
});
|
|
64458
64613
|
};
|
|
64614
|
+
const hasAnyDependency = (packageJson, packageNames) => {
|
|
64615
|
+
const allDependencies = {
|
|
64616
|
+
...packageJson.peerDependencies,
|
|
64617
|
+
...packageJson.dependencies,
|
|
64618
|
+
...packageJson.devDependencies,
|
|
64619
|
+
...packageJson.optionalDependencies
|
|
64620
|
+
};
|
|
64621
|
+
return packageNames.some((packageName) => allDependencies[packageName] !== void 0);
|
|
64622
|
+
};
|
|
64623
|
+
const BASE_UI_PACKAGES = ["@base-ui-components/react", "@base-ui/react"];
|
|
64624
|
+
const hasBaseUiDependency = (packageJson) => hasAnyDependency(packageJson, BASE_UI_PACKAGES);
|
|
64625
|
+
const RADIX_UNIFIED_PACKAGE = "radix-ui";
|
|
64626
|
+
const RADIX_PRIMITIVE_PACKAGE_PREFIX = "@radix-ui/react-";
|
|
64627
|
+
const RADIX_NON_PRIMITIVE_PACKAGES = new Set(["@radix-ui/react-icons"]);
|
|
64628
|
+
const hasRadixUiDependency = (packageJson) => {
|
|
64629
|
+
const allDependencies = {
|
|
64630
|
+
...packageJson.peerDependencies,
|
|
64631
|
+
...packageJson.dependencies,
|
|
64632
|
+
...packageJson.devDependencies,
|
|
64633
|
+
...packageJson.optionalDependencies
|
|
64634
|
+
};
|
|
64635
|
+
return Object.keys(allDependencies).some((packageName) => packageName === RADIX_UNIFIED_PACKAGE || packageName.startsWith(RADIX_PRIMITIVE_PACKAGE_PREFIX) && !RADIX_NON_PRIMITIVE_PACKAGES.has(packageName));
|
|
64636
|
+
};
|
|
64459
64637
|
const STYLED_COMPONENTS_PACKAGES = ["styled-components"];
|
|
64460
64638
|
const getStyledComponentsVersion = (packageJson) => {
|
|
64461
64639
|
return getPreferredDependencyVersion({
|
|
@@ -64486,6 +64664,10 @@ const hasI18nDependency = (packageJson) => {
|
|
|
64486
64664
|
};
|
|
64487
64665
|
return I18N_PACKAGES.some((packageName) => allDependencies[packageName] !== void 0);
|
|
64488
64666
|
};
|
|
64667
|
+
const REACT_ARIA_COMPONENT_PACKAGES = ["react-aria-components"];
|
|
64668
|
+
const TANSTACK_TABLE_PACKAGES = ["@tanstack/react-table"];
|
|
64669
|
+
const TANSTACK_VIRTUAL_PACKAGES = ["@tanstack/react-virtual"];
|
|
64670
|
+
const TANSTACK_FORM_PACKAGES = ["@tanstack/react-form"];
|
|
64489
64671
|
const REANIMATED_DEPENDENCY_NAME = "react-native-reanimated";
|
|
64490
64672
|
const MOBX_REACT_PACKAGE_NAME = "mobx-react";
|
|
64491
64673
|
const MOBX_REACT_LITE_PACKAGE_NAME = "mobx-react-lite";
|
|
@@ -64676,6 +64858,13 @@ const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, roo
|
|
|
64676
64858
|
});
|
|
64677
64859
|
if (styledComponentsVersion && shouldReplaceStyledComponentsVersion(facts.styledComponentsVersion, styledComponentsVersion)) facts.styledComponentsVersion = styledComponentsVersion;
|
|
64678
64860
|
facts.hasI18nLibrary = facts.hasI18nLibrary || hasI18nDependency(packageJson);
|
|
64861
|
+
facts.hasShadcnUi = facts.hasShadcnUi || detectShadcnUi(directory);
|
|
64862
|
+
facts.hasRadixUi = facts.hasRadixUi || hasRadixUiDependency(packageJson);
|
|
64863
|
+
facts.hasBaseUi = facts.hasBaseUi || hasBaseUiDependency(packageJson);
|
|
64864
|
+
facts.hasReactAriaComponents = facts.hasReactAriaComponents || hasAnyDependency(packageJson, REACT_ARIA_COMPONENT_PACKAGES);
|
|
64865
|
+
facts.hasTanstackTable = facts.hasTanstackTable || hasAnyDependency(packageJson, TANSTACK_TABLE_PACKAGES);
|
|
64866
|
+
facts.hasTanstackVirtual = facts.hasTanstackVirtual || hasAnyDependency(packageJson, TANSTACK_VIRTUAL_PACKAGES);
|
|
64867
|
+
facts.hasTanstackForm = facts.hasTanstackForm || hasAnyDependency(packageJson, TANSTACK_FORM_PACKAGES);
|
|
64679
64868
|
for (const packageName of REACT_THREE_FIBER_DEPENDENCY_NAMES) {
|
|
64680
64869
|
const version = resolveCatalogBackedDependencyVersion({
|
|
64681
64870
|
rootDirectory,
|
|
@@ -64778,6 +64967,13 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
|
|
|
64778
64967
|
tanstackQueryVersion: null,
|
|
64779
64968
|
styledComponentsVersion: null,
|
|
64780
64969
|
hasI18nLibrary: false,
|
|
64970
|
+
hasShadcnUi: false,
|
|
64971
|
+
hasRadixUi: false,
|
|
64972
|
+
hasBaseUi: false,
|
|
64973
|
+
hasReactAriaComponents: false,
|
|
64974
|
+
hasTanstackTable: false,
|
|
64975
|
+
hasTanstackVirtual: false,
|
|
64976
|
+
hasTanstackForm: false,
|
|
64781
64977
|
hasReactNativeAwarePackage: false,
|
|
64782
64978
|
hasReanimatedAwarePackage: false,
|
|
64783
64979
|
hasSsrDependency: false,
|
|
@@ -65122,6 +65318,12 @@ const discoverProjectWithoutPackageJson = (directory, options) => {
|
|
|
65122
65318
|
remotionVersion: null,
|
|
65123
65319
|
remotionMajorVersion: null,
|
|
65124
65320
|
hasI18nLibrary: false,
|
|
65321
|
+
hasRadixUi: false,
|
|
65322
|
+
hasBaseUi: false,
|
|
65323
|
+
hasReactAriaComponents: false,
|
|
65324
|
+
hasTanstackTable: false,
|
|
65325
|
+
hasTanstackVirtual: false,
|
|
65326
|
+
hasTanstackForm: false,
|
|
65125
65327
|
tanstackQueryVersion: null,
|
|
65126
65328
|
styledComponentsVersion: null,
|
|
65127
65329
|
hasThree: false,
|
|
@@ -65143,6 +65345,7 @@ const discoverProjectWithoutPackageJson = (directory, options) => {
|
|
|
65143
65345
|
shopifyFlashListMajorVersion: null,
|
|
65144
65346
|
hasReanimated: false,
|
|
65145
65347
|
reanimatedVersion: null,
|
|
65348
|
+
hasShadcnUi: detectShadcnUi(directory),
|
|
65146
65349
|
isPreES2023Target: hasOwnTsConfig && detectPreES2023Target(directory),
|
|
65147
65350
|
isStaticExport: false,
|
|
65148
65351
|
sourceFileCount
|
|
@@ -65305,6 +65508,12 @@ const discoverProject = (directory, options = {}) => {
|
|
|
65305
65508
|
hasReactCompilerLintPlugin: detectReactCompilerLintPlugin(directory, packageJson),
|
|
65306
65509
|
hasTanStackQuery: tanstackQueryVersion !== null,
|
|
65307
65510
|
hasI18nLibrary: workspaceFacts.hasI18nLibrary,
|
|
65511
|
+
hasRadixUi: workspaceFacts.hasRadixUi,
|
|
65512
|
+
hasBaseUi: workspaceFacts.hasBaseUi,
|
|
65513
|
+
hasReactAriaComponents: workspaceFacts.hasReactAriaComponents,
|
|
65514
|
+
hasTanstackTable: workspaceFacts.hasTanstackTable,
|
|
65515
|
+
hasTanstackVirtual: workspaceFacts.hasTanstackVirtual,
|
|
65516
|
+
hasTanstackForm: workspaceFacts.hasTanstackForm,
|
|
65308
65517
|
tanstackQueryVersion,
|
|
65309
65518
|
styledComponentsVersion: workspaceFacts.styledComponentsVersion,
|
|
65310
65519
|
valtioVersion,
|
|
@@ -65331,6 +65540,7 @@ const discoverProject = (directory, options = {}) => {
|
|
|
65331
65540
|
shopifyFlashListMajorVersion: shopifyFlashListVersion === null ? null : getLowestDependencyMajor(shopifyFlashListVersion),
|
|
65332
65541
|
hasReanimated,
|
|
65333
65542
|
reanimatedVersion,
|
|
65543
|
+
hasShadcnUi: workspaceFacts.hasShadcnUi,
|
|
65334
65544
|
isPreES2023Target,
|
|
65335
65545
|
isStaticExport: framework === "nextjs" && detectNextjsStaticExport(workspaceFacts.next.sourceDirectory ?? directory),
|
|
65336
65546
|
sourceFileCount
|
|
@@ -65518,12 +65728,26 @@ const getEquivalentRuleKeys = (ruleKey) => {
|
|
|
65518
65728
|
const nativeRuleKey = canonicalizeRuleKey(ruleKey);
|
|
65519
65729
|
return [nativeRuleKey, ...getLegacyRuleKeysForNative(nativeRuleKey)];
|
|
65520
65730
|
};
|
|
65521
|
-
|
|
65522
|
-
|
|
65523
|
-
|
|
65524
|
-
|
|
65525
|
-
|
|
65731
|
+
/**
|
|
65732
|
+
* Resolves the absolute path to read for a diagnostic's `filePath`,
|
|
65733
|
+
* accounting for the various shapes oxlint emits:
|
|
65734
|
+
*
|
|
65735
|
+
* - `file://` URL — decode to an absolute filesystem path.
|
|
65736
|
+
* - Absolute POSIX (`/abs/path/file.tsx`) — pass through.
|
|
65737
|
+
* - Absolute Windows (`C:/...` or `C:\...`) — pass through.
|
|
65738
|
+
* - `./relative` or bare relative — join against `rootDirectory`.
|
|
65739
|
+
*
|
|
65740
|
+
* Shared between the streaming diagnostic pipeline and the legacy
|
|
65741
|
+
* array-shaped `mergeAndFilterDiagnostics` wrapper so file-line lookups
|
|
65742
|
+
* use one canonical resolution path.
|
|
65743
|
+
*/
|
|
65744
|
+
const resolveCandidateReadPath = (rootDirectory, filePath) => {
|
|
65745
|
+
if (filePath.startsWith("file://")) return fileURLToPath(filePath);
|
|
65746
|
+
const normalizedFile = filePath.replace(/\\/g, "/");
|
|
65747
|
+
if (normalizedFile.startsWith("/") || /^[a-zA-Z]:\//.test(normalizedFile) || /^[a-zA-Z]:\\/.test(filePath)) return filePath;
|
|
65748
|
+
return `${rootDirectory.replace(/\\/g, "/").replace(/\/$/, "")}/${normalizedFile.replace(/^\.\//, "")}`;
|
|
65526
65749
|
};
|
|
65750
|
+
const toNormalizedRelativePath = (filePath, rootDirectory) => path$1$1.relative(path$1$1.resolve(rootDirectory), path$1$1.resolve(resolveCandidateReadPath(rootDirectory, filePath))).replaceAll("\\", "/") || ".";
|
|
65527
65751
|
const warnConfigIssue = (message) => {
|
|
65528
65752
|
process.stderr.write(`[react-doctor] ${message}\n`);
|
|
65529
65753
|
};
|
|
@@ -65572,7 +65796,7 @@ const compileIgnoreOverrides = (userConfig) => {
|
|
|
65572
65796
|
};
|
|
65573
65797
|
const isDiagnosticIgnoredByOverrides = (diagnostic, rootDirectory, overrides) => {
|
|
65574
65798
|
if (overrides.length === 0) return false;
|
|
65575
|
-
const relativeFilePath =
|
|
65799
|
+
const relativeFilePath = toNormalizedRelativePath(diagnostic.filePath, rootDirectory);
|
|
65576
65800
|
const ruleIdentifier = `${diagnostic.plugin}/${diagnostic.rule}`;
|
|
65577
65801
|
return overrides.some((override) => override.filePatterns.some((pattern) => pattern.test(relativeFilePath)) && hasMatchingRuleOverride(override.ruleIds, ruleIdentifier));
|
|
65578
65802
|
};
|
|
@@ -65912,7 +66136,7 @@ const compileIgnoredFilePatterns = (userConfig) => {
|
|
|
65912
66136
|
};
|
|
65913
66137
|
const isFileIgnoredByPatterns = (filePath, rootDirectory, patterns) => {
|
|
65914
66138
|
if (patterns.length === 0) return false;
|
|
65915
|
-
const relativePath =
|
|
66139
|
+
const relativePath = toNormalizedRelativePath(filePath, rootDirectory);
|
|
65916
66140
|
return patterns.some((pattern) => pattern.test(relativePath));
|
|
65917
66141
|
};
|
|
65918
66142
|
const SCRIPT_EXTENSION_FRAGMENT = "[cm]?[jt]sx?";
|
|
@@ -66036,25 +66260,6 @@ const classifyPackageRole = (filename) => {
|
|
|
66036
66260
|
return result;
|
|
66037
66261
|
};
|
|
66038
66262
|
/**
|
|
66039
|
-
* Resolves the absolute path to read for a diagnostic's `filePath`,
|
|
66040
|
-
* accounting for the various shapes oxlint emits:
|
|
66041
|
-
*
|
|
66042
|
-
* - `file://` URL — decode to an absolute filesystem path.
|
|
66043
|
-
* - Absolute POSIX (`/abs/path/file.tsx`) — pass through.
|
|
66044
|
-
* - Absolute Windows (`C:/...` or `C:\...`) — pass through.
|
|
66045
|
-
* - `./relative` or bare relative — join against `rootDirectory`.
|
|
66046
|
-
*
|
|
66047
|
-
* Shared between the streaming diagnostic pipeline and the legacy
|
|
66048
|
-
* array-shaped `mergeAndFilterDiagnostics` wrapper so file-line lookups
|
|
66049
|
-
* use one canonical resolution path.
|
|
66050
|
-
*/
|
|
66051
|
-
const resolveCandidateReadPath = (rootDirectory, filePath) => {
|
|
66052
|
-
if (filePath.startsWith("file://")) return fileURLToPath(filePath);
|
|
66053
|
-
const normalizedFile = filePath.replace(/\\/g, "/");
|
|
66054
|
-
if (normalizedFile.startsWith("/") || /^[a-zA-Z]:\//.test(normalizedFile) || /^[a-zA-Z]:\\/.test(filePath)) return filePath;
|
|
66055
|
-
return `${rootDirectory.replace(/\\/g, "/").replace(/\/$/, "")}/${normalizedFile.replace(/^\.\//, "")}`;
|
|
66056
|
-
};
|
|
66057
|
-
/**
|
|
66058
66263
|
* Shared raw-line scanners that detect whether a diagnostic site is
|
|
66059
66264
|
* enclosed by a configured `textComponents` entry or a
|
|
66060
66265
|
* `rawTextWrapperComponents` entry. Both checks are used by the
|
|
@@ -67738,6 +67943,28 @@ const checkExpoEnvLocalFiles = (context) => {
|
|
|
67738
67943
|
help: `Add \`.env*.local\` to your .gitignore. If already committed, untrack with \`git rm --cached ${committedEnvFiles.join(" ")}\``
|
|
67739
67944
|
})];
|
|
67740
67945
|
};
|
|
67946
|
+
const JAVASCRIPT_MODULE_FILE_PATTERN = /\.[cm]?[jt]sx?$/;
|
|
67947
|
+
const hasStaticModuleSubpath = (rootDirectory, packageName) => {
|
|
67948
|
+
const packageSubpathPrefix = `${packageName}/`;
|
|
67949
|
+
for (const { absolutePath, name } of walkSourceTreeFiles(rootDirectory)) {
|
|
67950
|
+
if (!JAVASCRIPT_MODULE_FILE_PATTERN.test(name)) continue;
|
|
67951
|
+
let sourceText;
|
|
67952
|
+
try {
|
|
67953
|
+
sourceText = fs$1$3.readFileSync(absolutePath, "utf-8");
|
|
67954
|
+
} catch {
|
|
67955
|
+
continue;
|
|
67956
|
+
}
|
|
67957
|
+
if (!sourceText.includes(packageSubpathPrefix)) continue;
|
|
67958
|
+
let moduleSpecifiers;
|
|
67959
|
+
try {
|
|
67960
|
+
moduleSpecifiers = collectStaticModuleSpecifiers(sourceText, { filePath: absolutePath });
|
|
67961
|
+
} catch {
|
|
67962
|
+
continue;
|
|
67963
|
+
}
|
|
67964
|
+
for (const moduleSpecifier of moduleSpecifiers) if (moduleSpecifier.startsWith(packageSubpathPrefix)) return true;
|
|
67965
|
+
}
|
|
67966
|
+
return false;
|
|
67967
|
+
};
|
|
67741
67968
|
const isExpoSdkAtLeast = (expoSdkMajor, minMajor) => expoSdkMajor !== null && expoSdkMajor >= minMajor;
|
|
67742
67969
|
const UNIMODULES_HELP = "Remove every `@unimodules/*` and `react-native-unimodules` package — their functionality now lives in `expo-modules-core`. See https://expo.fyi/r/sdk-44-remove-unimodules";
|
|
67743
67970
|
const FIREBASE_HELP = "Use the Firebase JS SDK or React Native Firebase directly. See https://expo.fyi/firebase-migration-guide";
|
|
@@ -67791,7 +68018,8 @@ const FLAGGED_DEPENDENCIES = [
|
|
|
67791
68018
|
packageName: "@expo/metro-config",
|
|
67792
68019
|
rule: "expo-no-redundant-dependency",
|
|
67793
68020
|
message: "\"@expo/metro-config\" should not be a direct dependency. Expo pins the compatible Metro config, and a direct entry can drift to a version that breaks bundling",
|
|
67794
|
-
help: "Remove `@expo/metro-config` and import `expo/metro-config` in your metro.config.js"
|
|
68021
|
+
help: "Remove `@expo/metro-config` and import `expo/metro-config` in your metro.config.js",
|
|
68022
|
+
skipWhenSubpathImported: true
|
|
67795
68023
|
},
|
|
67796
68024
|
{
|
|
67797
68025
|
packageName: "@types/react-native",
|
|
@@ -67852,8 +68080,9 @@ const FLAGGED_DEPENDENCIES = [
|
|
|
67852
68080
|
];
|
|
67853
68081
|
const checkExpoFlaggedDependencies = (context) => FLAGGED_DEPENDENCIES.filter((flaggedDependency) => {
|
|
67854
68082
|
if (!context.directDependencyNames.has(flaggedDependency.packageName)) return false;
|
|
67855
|
-
if (flaggedDependency.minSdkMajor
|
|
67856
|
-
|
|
68083
|
+
if (flaggedDependency.minSdkMajor !== void 0 && !isExpoSdkAtLeast(context.expoSdkMajor, flaggedDependency.minSdkMajor)) return false;
|
|
68084
|
+
if (flaggedDependency.skipWhenSubpathImported && hasStaticModuleSubpath(context.rootDirectory, flaggedDependency.packageName)) return false;
|
|
68085
|
+
return true;
|
|
67857
68086
|
}).map((flaggedDependency) => buildExpoDiagnostic({
|
|
67858
68087
|
rule: flaggedDependency.rule,
|
|
67859
68088
|
message: flaggedDependency.message,
|
|
@@ -67922,18 +68151,58 @@ const METRO_CONFIG_FILE_NAMES = [
|
|
|
67922
68151
|
const EXPO_METRO_CONFIG_EXTEND_SIGNALS = [
|
|
67923
68152
|
"expo/metro-config",
|
|
67924
68153
|
"@sentry/react-native/metro",
|
|
67925
|
-
"getSentryExpoConfig"
|
|
68154
|
+
"getSentryExpoConfig",
|
|
68155
|
+
"posthog-react-native/metro",
|
|
68156
|
+
"getPostHogExpoConfig"
|
|
67926
68157
|
];
|
|
68158
|
+
const resolveLocalMetroConfigModule = (moduleSpecifier, importingFilePath, rootDirectory) => {
|
|
68159
|
+
if (!moduleSpecifier.startsWith(".")) return void 0;
|
|
68160
|
+
const importedPath = path$1$1.resolve(path$1$1.dirname(importingFilePath), moduleSpecifier);
|
|
68161
|
+
const candidateBasePaths = [
|
|
68162
|
+
importedPath,
|
|
68163
|
+
importedPath.replace(/\.[cm]?js$/, ""),
|
|
68164
|
+
path$1$1.join(importedPath, "index")
|
|
68165
|
+
];
|
|
68166
|
+
for (const candidateBasePath of candidateBasePaths) {
|
|
68167
|
+
const resolvedPath = resolveEntryWithExtensions(candidateBasePath);
|
|
68168
|
+
if (resolvedPath !== void 0 && isFile(resolvedPath) && isPathInsideDirectoryOrEqual(resolvedPath, rootDirectory)) return resolvedPath;
|
|
68169
|
+
}
|
|
68170
|
+
};
|
|
68171
|
+
const hasExpoMetroConfigSignal = (metroConfigPath, rootDirectory) => {
|
|
68172
|
+
const pendingFilePaths = [metroConfigPath];
|
|
68173
|
+
const visitedFilePaths = /* @__PURE__ */ new Set();
|
|
68174
|
+
while (pendingFilePaths.length > 0) {
|
|
68175
|
+
const currentFilePath = pendingFilePaths.pop();
|
|
68176
|
+
if (currentFilePath === void 0 || visitedFilePaths.has(currentFilePath)) continue;
|
|
68177
|
+
if (visitedFilePaths.size >= 100) return true;
|
|
68178
|
+
visitedFilePaths.add(currentFilePath);
|
|
68179
|
+
let contents;
|
|
68180
|
+
try {
|
|
68181
|
+
contents = fs$1$3.readFileSync(currentFilePath, "utf-8");
|
|
68182
|
+
} catch {
|
|
68183
|
+
return true;
|
|
68184
|
+
}
|
|
68185
|
+
if (EXPO_METRO_CONFIG_EXTEND_SIGNALS.some((signal) => contents.includes(signal))) return true;
|
|
68186
|
+
let moduleSpecifiers;
|
|
68187
|
+
try {
|
|
68188
|
+
moduleSpecifiers = collectStaticModuleSpecifiers(contents, {
|
|
68189
|
+
filePath: currentFilePath,
|
|
68190
|
+
includeTypeOnly: false
|
|
68191
|
+
});
|
|
68192
|
+
} catch {
|
|
68193
|
+
continue;
|
|
68194
|
+
}
|
|
68195
|
+
for (const moduleSpecifier of moduleSpecifiers) {
|
|
68196
|
+
const localModulePath = resolveLocalMetroConfigModule(moduleSpecifier, currentFilePath, rootDirectory);
|
|
68197
|
+
if (localModulePath !== void 0 && !visitedFilePaths.has(localModulePath)) pendingFilePaths.push(localModulePath);
|
|
68198
|
+
}
|
|
68199
|
+
}
|
|
68200
|
+
return false;
|
|
68201
|
+
};
|
|
67927
68202
|
const checkExpoMetroConfig = (context) => {
|
|
67928
68203
|
const metroConfigPath = METRO_CONFIG_FILE_NAMES.map((fileName) => path$1$1.join(context.rootDirectory, fileName)).find((candidatePath) => isFile(candidatePath));
|
|
67929
68204
|
if (metroConfigPath === void 0) return [];
|
|
67930
|
-
|
|
67931
|
-
try {
|
|
67932
|
-
contents = fs$1$3.readFileSync(metroConfigPath, "utf-8");
|
|
67933
|
-
} catch {
|
|
67934
|
-
return [];
|
|
67935
|
-
}
|
|
67936
|
-
if (EXPO_METRO_CONFIG_EXTEND_SIGNALS.some((signal) => contents.includes(signal))) return [];
|
|
68205
|
+
if (hasExpoMetroConfigSignal(metroConfigPath, context.rootDirectory)) return [];
|
|
67937
68206
|
return [buildExpoDiagnostic({
|
|
67938
68207
|
rule: "expo-metro-config",
|
|
67939
68208
|
filePath: path$1$1.basename(metroConfigPath),
|
|
@@ -69335,6 +69604,13 @@ const buildCapabilities = (project) => {
|
|
|
69335
69604
|
minor: 0
|
|
69336
69605
|
})) capabilities.add("tailwind:4");
|
|
69337
69606
|
}
|
|
69607
|
+
if (project.hasShadcnUi === true) capabilities.add("shadcn");
|
|
69608
|
+
if (project.hasRadixUi === true) capabilities.add("radix-ui");
|
|
69609
|
+
if (project.hasBaseUi === true) capabilities.add("base-ui");
|
|
69610
|
+
if (project.hasReactAriaComponents === true) capabilities.add("react-aria");
|
|
69611
|
+
if (project.hasTanstackTable === true) capabilities.add("tanstack-table");
|
|
69612
|
+
if (project.hasTanstackVirtual === true) capabilities.add("tanstack-virtual");
|
|
69613
|
+
if (project.hasTanstackForm === true) capabilities.add("tanstack-form");
|
|
69338
69614
|
if (project.zodVersion !== null) capabilities.add("zod");
|
|
69339
69615
|
if (project.zodMajorVersion !== null && project.zodMajorVersion >= 4) capabilities.add("zod:4");
|
|
69340
69616
|
if (project.mobxVersion !== void 0 && project.mobxVersion !== null || project.hasMobxReact === true || project.hasMobxReactLite === true || project.hasMobxStateTree === true || project.hasMobxReactObserver === true) capabilities.add("mobx");
|
|
@@ -69512,72 +69788,6 @@ const checkSecurityScanCooperative = async (rootDirectory, options = {}) => {
|
|
|
69512
69788
|
}
|
|
69513
69789
|
return session.diagnostics;
|
|
69514
69790
|
};
|
|
69515
|
-
var import_picocolors = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
69516
|
-
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
69517
|
-
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);
|
|
69518
|
-
let formatter = (open, close, replace = open) => (input) => {
|
|
69519
|
-
let string = "" + input, index = string.indexOf(close, open.length);
|
|
69520
|
-
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
69521
|
-
};
|
|
69522
|
-
let replaceClose = (string, close, replace, index) => {
|
|
69523
|
-
let result = "", cursor = 0;
|
|
69524
|
-
do {
|
|
69525
|
-
result += string.substring(cursor, index) + replace;
|
|
69526
|
-
cursor = index + close.length;
|
|
69527
|
-
index = string.indexOf(close, cursor);
|
|
69528
|
-
} while (~index);
|
|
69529
|
-
return result + string.substring(cursor);
|
|
69530
|
-
};
|
|
69531
|
-
let createColors = (enabled = isColorSupported) => {
|
|
69532
|
-
let f = enabled ? formatter : () => String;
|
|
69533
|
-
return {
|
|
69534
|
-
isColorSupported: enabled,
|
|
69535
|
-
reset: f("\x1B[0m", "\x1B[0m"),
|
|
69536
|
-
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
69537
|
-
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
69538
|
-
italic: f("\x1B[3m", "\x1B[23m"),
|
|
69539
|
-
underline: f("\x1B[4m", "\x1B[24m"),
|
|
69540
|
-
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
69541
|
-
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
69542
|
-
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
69543
|
-
black: f("\x1B[30m", "\x1B[39m"),
|
|
69544
|
-
red: f("\x1B[31m", "\x1B[39m"),
|
|
69545
|
-
green: f("\x1B[32m", "\x1B[39m"),
|
|
69546
|
-
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
69547
|
-
blue: f("\x1B[34m", "\x1B[39m"),
|
|
69548
|
-
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
69549
|
-
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
69550
|
-
white: f("\x1B[37m", "\x1B[39m"),
|
|
69551
|
-
gray: f("\x1B[90m", "\x1B[39m"),
|
|
69552
|
-
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
69553
|
-
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
69554
|
-
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
69555
|
-
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
69556
|
-
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
69557
|
-
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
69558
|
-
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
69559
|
-
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
69560
|
-
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
69561
|
-
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
69562
|
-
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
69563
|
-
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
69564
|
-
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
69565
|
-
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
69566
|
-
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
69567
|
-
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
69568
|
-
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
69569
|
-
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
69570
|
-
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
69571
|
-
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
69572
|
-
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
69573
|
-
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
69574
|
-
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
69575
|
-
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
69576
|
-
};
|
|
69577
|
-
};
|
|
69578
|
-
module.exports = createColors();
|
|
69579
|
-
module.exports.createColors = createColors;
|
|
69580
|
-
})))(), 1);
|
|
69581
69791
|
const highlighter = {
|
|
69582
69792
|
error: import_picocolors.default.red,
|
|
69583
69793
|
warn: import_picocolors.default.yellow,
|
|
@@ -69753,6 +69963,12 @@ const withProjectAnalysisWorkerSlot = async (task, abortSignal) => {
|
|
|
69753
69963
|
});
|
|
69754
69964
|
return projectAnalysisWorkerSlots.run(task, abortSignal);
|
|
69755
69965
|
};
|
|
69966
|
+
const toRelativePath = (filePath, rootDirectory) => {
|
|
69967
|
+
const normalizedFilePath = filePath.replace(/\\/g, "/");
|
|
69968
|
+
const normalizedRoot = rootDirectory.replace(/\\/g, "/").replace(/\/$/, "") + "/";
|
|
69969
|
+
if (normalizedFilePath.startsWith(normalizedRoot)) return normalizedFilePath.slice(normalizedRoot.length);
|
|
69970
|
+
return normalizedFilePath.replace(/^\.\//, "");
|
|
69971
|
+
};
|
|
69756
69972
|
const REACT_DOCTOR_TOOLCHAIN_PACKAGES = new Set([
|
|
69757
69973
|
"react-doctor",
|
|
69758
69974
|
"eslint-plugin-react-doctor",
|
|
@@ -70517,7 +70733,7 @@ const buildResult = (input) => {
|
|
|
70517
70733
|
const detectDuplicateJsxSubtreesCooperative = async (sourceReader, options = {}) => {
|
|
70518
70734
|
const resolvedOptions = resolveOptions$1(options);
|
|
70519
70735
|
const incompleteReasons = [];
|
|
70520
|
-
const sortedPaths =
|
|
70736
|
+
const sortedPaths = sourceReader.paths.filter((sourcePath) => JSX_DUPLICATION_SOURCE_FILE_PATTERN.test(sourcePath)).sort((left, right) => left.localeCompare(right));
|
|
70521
70737
|
if (sortedPaths.length > resolvedOptions.maxSourceFiles) incompleteReasons.push({
|
|
70522
70738
|
kind: "source-file-limit",
|
|
70523
70739
|
limit: resolvedOptions.maxSourceFiles,
|
|
@@ -70581,7 +70797,6 @@ const readTextFileUpToCharacterLimit = async (input) => {
|
|
|
70581
70797
|
input.signal?.throwIfAborted();
|
|
70582
70798
|
return buffer.subarray(0, readOffset).toString("utf-8");
|
|
70583
70799
|
};
|
|
70584
|
-
const toNormalizedRelativePath = (filePath, rootDirectory) => path$1$1.relative(path$1$1.resolve(rootDirectory), path$1$1.resolve(rootDirectory, filePath)).replaceAll("\\", "/") || ".";
|
|
70585
70800
|
const buildJsxSourceReader = async (input) => {
|
|
70586
70801
|
const ignoredFilePatterns = compileGlobPatternsLenient(input.ignorePatterns ?? [], (error) => warnConfigIssue(`ignore.files: ${error.message}`));
|
|
70587
70802
|
const sourceFiles = (await listSourceFilesWithSizeCooperative(input.rootDirectory, input.signal)).filter((sourceFile) => JSX_DUPLICATION_SOURCE_FILE_PATTERN.test(sourceFile.path) && classifyFileContext(sourceFile.path) === "production" && !isFileIgnoredByPatterns(sourceFile.path, input.rootDirectory, ignoredFilePatterns));
|
|
@@ -70993,7 +71208,11 @@ var Git = class Git extends Service()("react-doctor/Git") {
|
|
|
70993
71208
|
const symref = yield* runGit(directory, ["symbolic-ref", "refs/remotes/origin/HEAD"]);
|
|
70994
71209
|
if (symref.status === 0) {
|
|
70995
71210
|
const trimmed = trimOrNull(symref.stdout);
|
|
70996
|
-
if (trimmed !== null)
|
|
71211
|
+
if (trimmed !== null) {
|
|
71212
|
+
const branchName = trimmed.replace("refs/remotes/origin/", "");
|
|
71213
|
+
const remoteBranch = `origin/${branchName}`;
|
|
71214
|
+
return (yield* branchExists(directory, remoteBranch)) ? remoteBranch : branchName;
|
|
71215
|
+
}
|
|
70997
71216
|
}
|
|
70998
71217
|
const candidates = yield* runGit(directory, [
|
|
70999
71218
|
"for-each-ref",
|
|
@@ -71001,7 +71220,10 @@ var Git = class Git extends Service()("react-doctor/Git") {
|
|
|
71001
71220
|
...DEFAULT_BRANCH_CANDIDATES.map((candidate) => `refs/heads/${candidate}`)
|
|
71002
71221
|
]);
|
|
71003
71222
|
if (candidates.status !== 0) return null;
|
|
71004
|
-
|
|
71223
|
+
const localBranch = trimOrNull(candidates.stdout.split("\n")[0] ?? "");
|
|
71224
|
+
if (localBranch === null) return null;
|
|
71225
|
+
const remoteBranch = `origin/${localBranch}`;
|
|
71226
|
+
return (yield* branchExists(directory, remoteBranch)) ? remoteBranch : localBranch;
|
|
71005
71227
|
}).pipe(withSpan("Git.defaultBranch"));
|
|
71006
71228
|
const branchExists = (directory, branch) => runGit(directory, [
|
|
71007
71229
|
"rev-parse",
|
|
@@ -71338,59 +71560,11 @@ const isLocalPathExtend = (entry) => {
|
|
|
71338
71560
|
for (const prefix of EXTENDS_LOCAL_PATH_PREFIXES) if (entry.startsWith(prefix)) return true;
|
|
71339
71561
|
return false;
|
|
71340
71562
|
};
|
|
71341
|
-
const stripJsoncComments = (raw) => {
|
|
71342
|
-
let result = "";
|
|
71343
|
-
let cursor = 0;
|
|
71344
|
-
let inString = false;
|
|
71345
|
-
let stringQuote = "";
|
|
71346
|
-
while (cursor < raw.length) {
|
|
71347
|
-
const character = raw[cursor];
|
|
71348
|
-
const nextCharacter = raw[cursor + 1];
|
|
71349
|
-
if (inString) {
|
|
71350
|
-
result += character;
|
|
71351
|
-
if (character === "\\" && cursor + 1 < raw.length) {
|
|
71352
|
-
result += nextCharacter;
|
|
71353
|
-
cursor += 2;
|
|
71354
|
-
continue;
|
|
71355
|
-
}
|
|
71356
|
-
if (character === stringQuote) inString = false;
|
|
71357
|
-
cursor += 1;
|
|
71358
|
-
continue;
|
|
71359
|
-
}
|
|
71360
|
-
if (character === "\"" || character === "'") {
|
|
71361
|
-
inString = true;
|
|
71362
|
-
stringQuote = character;
|
|
71363
|
-
result += character;
|
|
71364
|
-
cursor += 1;
|
|
71365
|
-
continue;
|
|
71366
|
-
}
|
|
71367
|
-
if (character === "/" && nextCharacter === "/") {
|
|
71368
|
-
const lineEndIndex = raw.indexOf("\n", cursor);
|
|
71369
|
-
cursor = lineEndIndex === -1 ? raw.length : lineEndIndex;
|
|
71370
|
-
continue;
|
|
71371
|
-
}
|
|
71372
|
-
if (character === "/" && nextCharacter === "*") {
|
|
71373
|
-
const blockEndIndex = raw.indexOf("*/", cursor + 2);
|
|
71374
|
-
cursor = blockEndIndex === -1 ? raw.length : blockEndIndex + 2;
|
|
71375
|
-
continue;
|
|
71376
|
-
}
|
|
71377
|
-
result += character;
|
|
71378
|
-
cursor += 1;
|
|
71379
|
-
}
|
|
71380
|
-
return result;
|
|
71381
|
-
};
|
|
71382
|
-
const parseJsonOrJsonc = (raw) => {
|
|
71383
|
-
try {
|
|
71384
|
-
return JSON.parse(raw);
|
|
71385
|
-
} catch {
|
|
71386
|
-
return JSON.parse(stripJsoncComments(raw));
|
|
71387
|
-
}
|
|
71388
|
-
};
|
|
71389
71563
|
const canOxlintExtendConfig = (configPath) => {
|
|
71390
71564
|
if (!configPath.endsWith(".eslintrc.json")) return true;
|
|
71391
71565
|
let parsed;
|
|
71392
71566
|
try {
|
|
71393
|
-
parsed =
|
|
71567
|
+
parsed = parseJSONC(fs$1$3.readFileSync(configPath, "utf-8"), { allowTrailingComma: true });
|
|
71394
71568
|
} catch {
|
|
71395
71569
|
return true;
|
|
71396
71570
|
}
|
|
@@ -71499,7 +71673,39 @@ const detectUserLintConfigPaths = (rootDirectory) => {
|
|
|
71499
71673
|
}
|
|
71500
71674
|
return [];
|
|
71501
71675
|
};
|
|
71676
|
+
const readAdoptedLintConfigSettings = (configPaths) => {
|
|
71677
|
+
const mergedSettings = /* @__PURE__ */ new Map();
|
|
71678
|
+
for (const configPath of configPaths) {
|
|
71679
|
+
let parsed;
|
|
71680
|
+
try {
|
|
71681
|
+
parsed = parseJSONC(fs$1$3.readFileSync(configPath, "utf-8"), { allowTrailingComma: true });
|
|
71682
|
+
} catch {
|
|
71683
|
+
continue;
|
|
71684
|
+
}
|
|
71685
|
+
if (!isPlainObject(parsed)) continue;
|
|
71686
|
+
const settings = parsed.settings;
|
|
71687
|
+
if (!isPlainObject(settings)) continue;
|
|
71688
|
+
for (const [pluginName, pluginSettings] of Object.entries(settings)) {
|
|
71689
|
+
if (pluginName === "react-doctor") continue;
|
|
71690
|
+
mergedSettings.set(pluginName, pluginSettings);
|
|
71691
|
+
}
|
|
71692
|
+
}
|
|
71693
|
+
return Object.fromEntries(mergedSettings);
|
|
71694
|
+
};
|
|
71502
71695
|
const DISABLE_DIRECTIVE_PATTERN = /(eslint|oxlint)-disable/;
|
|
71696
|
+
const getBackupRootDirectory = (rootDirectory) => path$1$1.join(rootDirectory, ...DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS);
|
|
71697
|
+
const getBackupPath = (rootDirectory, absolutePath) => {
|
|
71698
|
+
if (!isPathInsideDirectory(absolutePath, rootDirectory)) return null;
|
|
71699
|
+
return path$1$1.join(getBackupRootDirectory(rootDirectory), path$1$1.relative(rootDirectory, absolutePath));
|
|
71700
|
+
};
|
|
71701
|
+
const removeBackupRootIfEmpty = (rootDirectory) => {
|
|
71702
|
+
const backupRootDirectory = getBackupRootDirectory(rootDirectory);
|
|
71703
|
+
if (!walkSourceTreeFiles(backupRootDirectory).next().done) return;
|
|
71704
|
+
fs$1$3.rmSync(backupRootDirectory, {
|
|
71705
|
+
recursive: true,
|
|
71706
|
+
force: true
|
|
71707
|
+
});
|
|
71708
|
+
};
|
|
71503
71709
|
const neutralizedFileLeases = /* @__PURE__ */ new Map();
|
|
71504
71710
|
const activeNeutralizationInitializations = /* @__PURE__ */ new Set();
|
|
71505
71711
|
const directoriesOverlap = (left, right) => {
|
|
@@ -71591,8 +71797,50 @@ const collectNeutralizationCandidatePaths = (rootDirectory, discoveredRelativePa
|
|
|
71591
71797
|
}
|
|
71592
71798
|
return candidatePaths;
|
|
71593
71799
|
};
|
|
71800
|
+
const recoverOrphanedBackups = (rootDirectory) => {
|
|
71801
|
+
const blockedPaths = /* @__PURE__ */ new Set();
|
|
71802
|
+
const backupRootDirectory = getBackupRootDirectory(rootDirectory);
|
|
71803
|
+
for (const { absolutePath: backupPath } of walkSourceTreeFiles(backupRootDirectory)) {
|
|
71804
|
+
const originalPath = path$1$1.join(rootDirectory, path$1$1.relative(backupRootDirectory, backupPath));
|
|
71805
|
+
if (neutralizedFileLeases.has(originalPath)) continue;
|
|
71806
|
+
let backupContent;
|
|
71807
|
+
let currentContent;
|
|
71808
|
+
try {
|
|
71809
|
+
backupContent = fs$1$3.readFileSync(backupPath, "utf-8");
|
|
71810
|
+
currentContent = fs$1$3.readFileSync(originalPath, "utf-8");
|
|
71811
|
+
} catch (error) {
|
|
71812
|
+
process.stderr.write(`[react-doctor] Could not recover ${originalPath}: ${messageFromUnknown(error)}. The backup remains at ${backupPath}.\n`);
|
|
71813
|
+
blockedPaths.add(originalPath);
|
|
71814
|
+
continue;
|
|
71815
|
+
}
|
|
71816
|
+
if (currentContent === backupContent) {
|
|
71817
|
+
try {
|
|
71818
|
+
fs$1$3.rmSync(backupPath);
|
|
71819
|
+
} catch (error) {
|
|
71820
|
+
process.stderr.write(`[react-doctor] Failed to delete stale backup ${backupPath}: ${messageFromUnknown(error)}\n`);
|
|
71821
|
+
blockedPaths.add(originalPath);
|
|
71822
|
+
}
|
|
71823
|
+
continue;
|
|
71824
|
+
}
|
|
71825
|
+
if (currentContent !== neutralizeContent(backupContent)) {
|
|
71826
|
+
process.stderr.write(`[react-doctor] Did not overwrite changed file ${originalPath}. Recover it manually from ${backupPath}.\n`);
|
|
71827
|
+
blockedPaths.add(originalPath);
|
|
71828
|
+
continue;
|
|
71829
|
+
}
|
|
71830
|
+
try {
|
|
71831
|
+
fs$1$3.writeFileSync(originalPath, backupContent);
|
|
71832
|
+
fs$1$3.rmSync(backupPath);
|
|
71833
|
+
} catch (error) {
|
|
71834
|
+
process.stderr.write(`[react-doctor] Failed to restore ${originalPath} from backup: ${messageFromUnknown(error)}\n`);
|
|
71835
|
+
blockedPaths.add(originalPath);
|
|
71836
|
+
}
|
|
71837
|
+
}
|
|
71838
|
+
removeBackupRootIfEmpty(rootDirectory);
|
|
71839
|
+
return blockedPaths;
|
|
71840
|
+
};
|
|
71594
71841
|
const neutralizeDisableDirectives = async (rootDirectory, includePaths, options = {}) => {
|
|
71595
71842
|
const resolvedRootDirectory = fs$1$3.realpathSync(rootDirectory);
|
|
71843
|
+
const blockedPaths = /* @__PURE__ */ new Set();
|
|
71596
71844
|
const leasedPaths = /* @__PURE__ */ new Set();
|
|
71597
71845
|
let isRestored = false;
|
|
71598
71846
|
const restore = () => {
|
|
@@ -71605,16 +71853,24 @@ const neutralizeDisableDirectives = async (rootDirectory, includePaths, options
|
|
|
71605
71853
|
if (lease.referenceCount > 0) continue;
|
|
71606
71854
|
neutralizedFileLeases.delete(absolutePath);
|
|
71607
71855
|
try {
|
|
71608
|
-
fs$1$3.
|
|
71856
|
+
const currentContent = fs$1$3.readFileSync(absolutePath, "utf-8");
|
|
71857
|
+
if (currentContent !== lease.neutralizedContent && currentContent !== lease.originalContent) {
|
|
71858
|
+
process.stderr.write(`[react-doctor] Did not overwrite changed file ${absolutePath}. Recover it manually from ${lease.backupPath}.\n`);
|
|
71859
|
+
continue;
|
|
71860
|
+
}
|
|
71861
|
+
if (currentContent === lease.neutralizedContent) fs$1$3.writeFileSync(absolutePath, lease.originalContent);
|
|
71862
|
+
fs$1$3.rmSync(lease.backupPath, { force: true });
|
|
71609
71863
|
} catch (error) {
|
|
71610
|
-
process.stderr.write(`[react-doctor] Failed to restore inline disable directives in ${absolutePath}: ${messageFromUnknown(error)}
|
|
71864
|
+
process.stderr.write(`[react-doctor] Failed to restore inline disable directives in ${absolutePath}: ${messageFromUnknown(error)}. The backup remains at ${lease.backupPath}.\n`);
|
|
71611
71865
|
}
|
|
71612
71866
|
}
|
|
71867
|
+
removeBackupRootIfEmpty(resolvedRootDirectory);
|
|
71613
71868
|
};
|
|
71614
71869
|
const onExit = () => restore();
|
|
71615
71870
|
process.once("exit", onExit);
|
|
71616
71871
|
const leaseCandidatePath = (absolutePath) => {
|
|
71617
71872
|
if (leasedPaths.has(absolutePath)) return;
|
|
71873
|
+
if (blockedPaths.has(absolutePath)) return;
|
|
71618
71874
|
const existingLease = neutralizedFileLeases.get(absolutePath);
|
|
71619
71875
|
if (existingLease) {
|
|
71620
71876
|
existingLease.referenceCount += 1;
|
|
@@ -71629,9 +71885,20 @@ const neutralizeDisableDirectives = async (rootDirectory, includePaths, options
|
|
|
71629
71885
|
}
|
|
71630
71886
|
const neutralizedContent = neutralizeContent(originalContent);
|
|
71631
71887
|
if (neutralizedContent !== originalContent) {
|
|
71888
|
+
const backupPath = getBackupPath(resolvedRootDirectory, absolutePath);
|
|
71889
|
+
if (backupPath === null) return;
|
|
71890
|
+
try {
|
|
71891
|
+
fs$1$3.mkdirSync(path$1$1.dirname(backupPath), { recursive: true });
|
|
71892
|
+
fs$1$3.writeFileSync(backupPath, originalContent, { flag: "wx" });
|
|
71893
|
+
} catch (error) {
|
|
71894
|
+
process.stderr.write(`[react-doctor] Did not modify ${absolutePath}: ${messageFromUnknown(error)}. Check ${backupPath}.\n`);
|
|
71895
|
+
return;
|
|
71896
|
+
}
|
|
71632
71897
|
fs$1$3.writeFileSync(absolutePath, neutralizedContent);
|
|
71633
71898
|
neutralizedFileLeases.set(absolutePath, {
|
|
71899
|
+
backupPath,
|
|
71634
71900
|
originalContent,
|
|
71901
|
+
neutralizedContent,
|
|
71635
71902
|
referenceCount: 1
|
|
71636
71903
|
});
|
|
71637
71904
|
leasedPaths.add(absolutePath);
|
|
@@ -71639,6 +71906,8 @@ const neutralizeDisableDirectives = async (rootDirectory, includePaths, options
|
|
|
71639
71906
|
};
|
|
71640
71907
|
try {
|
|
71641
71908
|
await withOverlappingInitializationLock(resolvedRootDirectory, async () => {
|
|
71909
|
+
for (const blockedPath of recoverOrphanedBackups(resolvedRootDirectory)) blockedPaths.add(blockedPath);
|
|
71910
|
+
if (options.recoverOnly) return;
|
|
71642
71911
|
for (const absolutePath of collectNeutralizationCandidatePaths(resolvedRootDirectory, [], includePaths)) if (neutralizedFileLeases.has(absolutePath)) leaseCandidatePath(absolutePath);
|
|
71643
71912
|
const discoveredRelativePaths = await (options.findFiles ?? findFilesWithDisableDirectives)(resolvedRootDirectory, includePaths);
|
|
71644
71913
|
for (const absolutePath of collectNeutralizationCandidatePaths(resolvedRootDirectory, discoveredRelativePaths, includePaths)) leaseCandidatePath(absolutePath);
|
|
@@ -71819,7 +72088,7 @@ const buildUserPluginRules = (userPlugin, severityControls) => {
|
|
|
71819
72088
|
}
|
|
71820
72089
|
return enabled;
|
|
71821
72090
|
};
|
|
71822
|
-
const createOxlintConfig = ({ pluginPath, project, customRulesOnly = false, extendsPaths = [], ignoredTags = /* @__PURE__ */ new Set(), includedTags = /* @__PURE__ */ new Set(), includeTagDefaults = false, runtimeGlobals, unpluginAutoImportGlobalScopes, serverAuthFunctionNames, projectIndexModuleSources, severityControls, userPlugins = [], disableReactHooksJsPlugin = false, ruleSelection, sidecarRuleIdFilter }) => {
|
|
72091
|
+
const createOxlintConfig = ({ pluginPath, project, customRulesOnly = false, extendsPaths = [], ignoredTags = /* @__PURE__ */ new Set(), includedTags = /* @__PURE__ */ new Set(), includeTagDefaults = false, runtimeGlobals, unpluginAutoImportGlobalScopes, serverAuthFunctionNames, projectIndexModuleSources, severityControls, adoptedSettings = {}, userPlugins = [], disableReactHooksJsPlugin = false, ruleSelection, sidecarRuleIdFilter }) => {
|
|
71823
72092
|
const hasIncludedTags = includedTags.size > 0;
|
|
71824
72093
|
const reactHooksJsPlugin = disableReactHooksJsPlugin || ruleSelection === "sidecar" || hasIncludedTags ? null : resolveReactHooksJsPlugin(project.hasReactCompiler || project.hasReactCompilerLintPlugin === true, customRulesOnly);
|
|
71825
72094
|
const reactCompilerRules = reactHooksJsPlugin ? applyRuleSeverityControls(filterRulesToAvailable(REACT_COMPILER_RULES, "react-hooks-js", reactHooksJsPlugin.availableRuleNames), severityControls) : {};
|
|
@@ -71874,23 +72143,26 @@ const createOxlintConfig = ({ pluginPath, project, customRulesOnly = false, exte
|
|
|
71874
72143
|
},
|
|
71875
72144
|
plugins: [],
|
|
71876
72145
|
jsPlugins: [...jsPlugins, pluginPath],
|
|
71877
|
-
settings: {
|
|
71878
|
-
|
|
71879
|
-
|
|
71880
|
-
|
|
71881
|
-
|
|
71882
|
-
|
|
71883
|
-
|
|
71884
|
-
|
|
71885
|
-
unpluginAutoImportGlobalScopes
|
|
71886
|
-
|
|
71887
|
-
|
|
71888
|
-
|
|
71889
|
-
|
|
71890
|
-
|
|
71891
|
-
|
|
71892
|
-
|
|
71893
|
-
|
|
72146
|
+
settings: {
|
|
72147
|
+
...adoptedSettings,
|
|
72148
|
+
"react-doctor": {
|
|
72149
|
+
portedRuleMode: "curated",
|
|
72150
|
+
framework: project.framework,
|
|
72151
|
+
rootDirectory: settingsRootDirectory,
|
|
72152
|
+
capabilities: [...capabilities].sort(),
|
|
72153
|
+
...runtimeGlobals && runtimeGlobals.length > 0 ? { runtimeGlobals: [...runtimeGlobals] } : {},
|
|
72154
|
+
...unpluginAutoImportGlobalScopes && unpluginAutoImportGlobalScopes.length > 0 ? {
|
|
72155
|
+
unpluginAutoImportRootDirectories: [...new Set([settingsRootDirectory, project.rootDirectory])],
|
|
72156
|
+
unpluginAutoImportGlobalScopes: unpluginAutoImportGlobalScopes.map((scope) => ({
|
|
72157
|
+
directory: scope.directory,
|
|
72158
|
+
names: [...scope.names]
|
|
72159
|
+
}))
|
|
72160
|
+
} : {},
|
|
72161
|
+
...project.shopifyFlashListMajorVersion !== null ? { shopifyFlashListMajorVersion: project.shopifyFlashListMajorVersion } : {},
|
|
72162
|
+
...serverAuthFunctionNames && serverAuthFunctionNames.length > 0 ? { serverAuthFunctionNames: [...serverAuthFunctionNames] } : {},
|
|
72163
|
+
...projectIndexModuleSources !== void 0 ? { projectIndexModuleSources: [...projectIndexModuleSources] } : {}
|
|
72164
|
+
}
|
|
72165
|
+
},
|
|
71894
72166
|
rules: {
|
|
71895
72167
|
...reactCompilerRules,
|
|
71896
72168
|
...enabledReactDoctorRules,
|
|
@@ -73024,6 +73296,46 @@ const buildProfiledNodeArguments = (input) => [
|
|
|
73024
73296
|
...input.heapProfileDirectory ? ["--heap-prof", `--heap-prof-dir=${input.heapProfileDirectory}`] : [],
|
|
73025
73297
|
...input.argumentsList
|
|
73026
73298
|
];
|
|
73299
|
+
const buildOxlintTimingArguments = (argumentsList) => {
|
|
73300
|
+
const timingArguments = [...argumentsList];
|
|
73301
|
+
const formatFlagIndex = timingArguments.indexOf("--format");
|
|
73302
|
+
if (formatFlagIndex === -1 || formatFlagIndex + 1 >= timingArguments.length) throw new Error("Oxlint timing arguments require a --format value");
|
|
73303
|
+
timingArguments[formatFlagIndex + 1] = "default";
|
|
73304
|
+
timingArguments.push("--debug", "timings", "--quiet");
|
|
73305
|
+
return timingArguments;
|
|
73306
|
+
};
|
|
73307
|
+
const captureOxlintRuleTimings = (input) => new Promise((resolve, reject) => {
|
|
73308
|
+
const timingEnvironment = { ...input.environment };
|
|
73309
|
+
timingEnvironment.REACT_DOCTOR_RULE_TIMINGS_DIR = void 0;
|
|
73310
|
+
const timingChild = spawn(input.nodeBinaryPath, buildOxlintTimingArguments(input.argumentsList), {
|
|
73311
|
+
cwd: input.rootDirectory,
|
|
73312
|
+
env: timingEnvironment,
|
|
73313
|
+
stdio: [
|
|
73314
|
+
"ignore",
|
|
73315
|
+
"pipe",
|
|
73316
|
+
"pipe"
|
|
73317
|
+
]
|
|
73318
|
+
});
|
|
73319
|
+
const stdoutBuffers = [];
|
|
73320
|
+
const stderrBuffers = [];
|
|
73321
|
+
timingChild.stdout.on("data", (buffer) => stdoutBuffers.push(buffer));
|
|
73322
|
+
timingChild.stderr.on("data", (buffer) => stderrBuffers.push(buffer));
|
|
73323
|
+
timingChild.on("error", reject);
|
|
73324
|
+
timingChild.on("close", (_code, signal) => {
|
|
73325
|
+
if (signal) {
|
|
73326
|
+
reject(/* @__PURE__ */ new Error(`Oxlint timing pass was killed by ${signal}`));
|
|
73327
|
+
return;
|
|
73328
|
+
}
|
|
73329
|
+
const timingOutput = `${Buffer.concat(stdoutBuffers).toString("utf8")}\n${Buffer.concat(stderrBuffers).toString("utf8")}`;
|
|
73330
|
+
if (!timingOutput.includes("Rule timings:")) {
|
|
73331
|
+
resolve();
|
|
73332
|
+
return;
|
|
73333
|
+
}
|
|
73334
|
+
fs$1$3.mkdirSync(input.timingDirectory, { recursive: true });
|
|
73335
|
+
fs$1$3.writeFileSync(path$1$1.join(input.timingDirectory, `oxlint-${timingChild.pid ?? process.pid}.timings.txt`), timingOutput);
|
|
73336
|
+
resolve();
|
|
73337
|
+
});
|
|
73338
|
+
});
|
|
73027
73339
|
const lowerChildProcessPriority = (processId) => {
|
|
73028
73340
|
if (processId === void 0) return;
|
|
73029
73341
|
try {
|
|
@@ -73145,7 +73457,18 @@ const spawnOxlint = (args, rootDirectory, nodeBinaryPath, spawnTimeoutMs = OXLIN
|
|
|
73145
73457
|
return;
|
|
73146
73458
|
}
|
|
73147
73459
|
}
|
|
73148
|
-
|
|
73460
|
+
const timingDirectory = SANITIZED_ENV.REACT_DOCTOR_OXLINT_TIMINGS_DIR;
|
|
73461
|
+
if (timingDirectory === void 0) {
|
|
73462
|
+
resolve(output);
|
|
73463
|
+
return;
|
|
73464
|
+
}
|
|
73465
|
+
captureOxlintRuleTimings({
|
|
73466
|
+
argumentsList: args,
|
|
73467
|
+
environment: SANITIZED_ENV,
|
|
73468
|
+
nodeBinaryPath,
|
|
73469
|
+
rootDirectory,
|
|
73470
|
+
timingDirectory
|
|
73471
|
+
}).then(() => resolve(output), reject);
|
|
73149
73472
|
});
|
|
73150
73473
|
});
|
|
73151
73474
|
const PARALLELISM_EXHAUSTION_ERROR_CODES = new Set([
|
|
@@ -73718,6 +74041,7 @@ const prepareLintSources = (rootDirectory, temporaryDirectory, candidateFiles) =
|
|
|
73718
74041
|
continue;
|
|
73719
74042
|
}
|
|
73720
74043
|
const absoluteSourcePath = path$1$1.isAbsolute(candidateFile) ? candidateFile : path$1$1.resolve(rootDirectory, candidateFile);
|
|
74044
|
+
if (isMissingPath(absoluteSourcePath)) continue;
|
|
73721
74045
|
const sourceBuffer = fs$1$3.readFileSync(absoluteSourcePath);
|
|
73722
74046
|
if (ASTRO_FILE_PATTERN.test(candidateFile)) {
|
|
73723
74047
|
const compilerSourcePath = absoluteSourcePath.replaceAll("\\", "/");
|
|
@@ -73948,9 +74272,11 @@ const runOxlint = async (options) => {
|
|
|
73948
74272
|
return [];
|
|
73949
74273
|
}
|
|
73950
74274
|
const pluginPath = resolvePluginPath();
|
|
73951
|
-
const
|
|
74275
|
+
const detectedConfigPaths = adoptExistingLintConfig && !customRulesOnly ? detectUserLintConfigPaths(rootDirectory) : [];
|
|
74276
|
+
const extendsPaths = detectedConfigPaths.filter(canOxlintExtendConfig);
|
|
74277
|
+
const adoptedSettings = detectedConfigPaths.length > 0 ? readAdoptedLintConfigSettings(detectedConfigPaths) : {};
|
|
73952
74278
|
const userPlugins = includedTags.size > 0 ? [] : resolveUserPlugins(userConfig?.plugins, configSourceDirectory);
|
|
73953
|
-
const restoreDisableDirectives =
|
|
74279
|
+
const restoreDisableDirectives = await neutralizeDisableDirectives(rootDirectory, includePaths ?? options.precomputedSourceFiles?.map((sourceFile) => sourceFile.path), { recoverOnly: respectInlineDisables });
|
|
73954
74280
|
const configDirectory = fs$1$3.mkdtempSync(path$1$1.join(os.tmpdir(), "react-doctor-oxlintrc-"));
|
|
73955
74281
|
const configPath = path$1$1.join(configDirectory, "oxlintrc.json");
|
|
73956
74282
|
try {
|
|
@@ -74010,6 +74336,7 @@ const runOxlint = async (options) => {
|
|
|
74010
74336
|
serverAuthFunctionNames,
|
|
74011
74337
|
projectIndexModuleSources,
|
|
74012
74338
|
severityControls,
|
|
74339
|
+
adoptedSettings,
|
|
74013
74340
|
userPlugins,
|
|
74014
74341
|
disableReactHooksJsPlugin: overrides.disableReactHooksJsPlugin,
|
|
74015
74342
|
ruleSelection: overrides.ruleSelection,
|
|
@@ -75793,8 +76120,9 @@ const findWorstScoredProject = (projects) => {
|
|
|
75793
76120
|
return worst;
|
|
75794
76121
|
};
|
|
75795
76122
|
const toJsonReportDiagnostic = (diagnostic, projectRoot, reportRoot) => {
|
|
75796
|
-
const
|
|
75797
|
-
const
|
|
76123
|
+
const resolvedFilePath = resolveCandidateReadPath(projectRoot, diagnostic.filePath);
|
|
76124
|
+
const normalizedFilePath = toNormalizedRelativePath(resolvedFilePath, projectRoot);
|
|
76125
|
+
const reportRelativeFilePath = toNormalizedRelativePath(resolvedFilePath, reportRoot);
|
|
75798
76126
|
const ruleIdentity = getDiagnosticRuleIdentity(diagnostic);
|
|
75799
76127
|
return {
|
|
75800
76128
|
...diagnostic,
|
|
@@ -76415,11 +76743,13 @@ const METRIC = {
|
|
|
76415
76743
|
ciConfigured: "ci.configured",
|
|
76416
76744
|
rulesChanged: "rules.changed",
|
|
76417
76745
|
rulesQueried: "rules.queried",
|
|
76746
|
+
runtimeScanUrlPromptShown: "runtime_scan.url_prompt_shown",
|
|
76418
76747
|
tuiCompactReportShown: "tui.compact_report_shown",
|
|
76419
76748
|
tuiFindingNavigated: "tui.finding_navigated",
|
|
76420
76749
|
tuiIssueStreamShown: "tui.issue_stream_shown",
|
|
76421
76750
|
tuiProjectPathContextShown: "tui.project_path_context_shown",
|
|
76422
76751
|
tuiProjectSelectShown: "tui.project_select_shown",
|
|
76752
|
+
tuiCiRecommendationShown: "tui.ci_recommendation_shown",
|
|
76423
76753
|
tuiReportActionSelected: "tui.report_action_selected",
|
|
76424
76754
|
tuiCancelled: "tui.cancelled",
|
|
76425
76755
|
tuiScanInlineShown: "tui.scan_inline_shown",
|
|
@@ -76468,7 +76798,7 @@ const makeNoopConsole = () => ({
|
|
|
76468
76798
|
});
|
|
76469
76799
|
//#endregion
|
|
76470
76800
|
//#region src/cli/utils/version.ts
|
|
76471
|
-
const VERSION = "0.9.
|
|
76801
|
+
const VERSION = "0.9.13-dev.1239043";
|
|
76472
76802
|
//#endregion
|
|
76473
76803
|
//#region src/cli/utils/json-mode.ts
|
|
76474
76804
|
let context = null;
|
|
@@ -76506,13 +76836,14 @@ const installSilentConsole = () => {
|
|
|
76506
76836
|
"trace"
|
|
76507
76837
|
]) target[key] = source[key];
|
|
76508
76838
|
};
|
|
76509
|
-
const enableJsonMode = ({ compact, directory, outputFile }) => {
|
|
76839
|
+
const enableJsonMode = ({ compact, directory, outputFile, writeCancellationError }) => {
|
|
76510
76840
|
context = {
|
|
76511
76841
|
compact,
|
|
76512
76842
|
directory,
|
|
76513
76843
|
startTime: performance$1.now(),
|
|
76514
76844
|
mode: "full",
|
|
76515
|
-
outputFile: null
|
|
76845
|
+
outputFile: null,
|
|
76846
|
+
writeCancellationError
|
|
76516
76847
|
};
|
|
76517
76848
|
installSilentConsole();
|
|
76518
76849
|
if (outputFile) {
|
|
@@ -76551,6 +76882,13 @@ const writeJsonErrorReport = (error, sentryEventId) => {
|
|
|
76551
76882
|
process.stdout.write(INTERNAL_ERROR_JSON_FALLBACK);
|
|
76552
76883
|
}
|
|
76553
76884
|
};
|
|
76885
|
+
const writeJsonCancellationReport = () => {
|
|
76886
|
+
if (context?.writeCancellationError !== void 0) {
|
|
76887
|
+
context.writeCancellationError();
|
|
76888
|
+
return;
|
|
76889
|
+
}
|
|
76890
|
+
writeJsonErrorReport(/* @__PURE__ */ new Error("Scan cancelled by user (SIGINT/SIGTERM)"));
|
|
76891
|
+
};
|
|
76554
76892
|
//#endregion
|
|
76555
76893
|
//#region src/cli/utils/run-id.ts
|
|
76556
76894
|
let cachedRunId;
|
|
@@ -76559,10 +76897,14 @@ const getRunId = () => {
|
|
|
76559
76897
|
return cachedRunId;
|
|
76560
76898
|
};
|
|
76561
76899
|
//#endregion
|
|
76900
|
+
//#region src/cli/utils/scrub-run-arguments.ts
|
|
76901
|
+
const scrubRunArguments = (argumentsList) => anonymizeText(argumentsList.map((argument) => argument.replace(/^((?:--[^=]+=)?)(?:https?|wss?):\/\/.+$/i, "$1<url>")).join(" "));
|
|
76902
|
+
//#endregion
|
|
76562
76903
|
//#region src/cli/utils/build-run-context.ts
|
|
76563
76904
|
const ROOT_SUBCOMMANDS = new Set([
|
|
76564
76905
|
"design",
|
|
76565
76906
|
"install",
|
|
76907
|
+
"scan",
|
|
76566
76908
|
"setup"
|
|
76567
76909
|
]);
|
|
76568
76910
|
const detectInvokedVia = () => {
|
|
@@ -76603,7 +76945,7 @@ const buildRunContext = () => {
|
|
|
76603
76945
|
runId: getRunId(),
|
|
76604
76946
|
origin: detectOrigin(),
|
|
76605
76947
|
command: detectCommand(userArguments),
|
|
76606
|
-
argv:
|
|
76948
|
+
argv: scrubRunArguments(userArguments),
|
|
76607
76949
|
cwd: scrubSensitivePaths(process.cwd()),
|
|
76608
76950
|
node: process.version,
|
|
76609
76951
|
nodeMajor: detectNodeMajor(),
|
|
@@ -76798,7 +77140,7 @@ const recordDistribution = (name, value, options = {}) => {
|
|
|
76798
77140
|
} catch {}
|
|
76799
77141
|
};
|
|
76800
77142
|
//#endregion
|
|
76801
|
-
export {
|
|
77143
|
+
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_FILE_PATTERN as dr, SupplyChain as dt, listSourceFiles as en, CANONICAL_GITHUB_URL as er, Maintainability as et, setJsonReportDirectory as f, resolveScanTarget as fn, MAINTAINABILITY_SOURCE_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 };
|
|
76802
77144
|
|
|
76803
|
-
//# sourceMappingURL=record-metric-
|
|
76804
|
-
//# debugId=
|
|
77145
|
+
//# sourceMappingURL=record-metric-B6T_Ej33.js.map
|
|
77146
|
+
//# debugId=1cdcd086-7195-554b-baff-59f165cb07bd
|