react-doctor 0.9.12-dev.8c2f03a → 0.9.12-dev.905607f
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 +27 -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-DuozMmwU.js → build-section-divider-D5ATBfDJ.js} +8 -22
- package/dist/{ci-Bwd2LJZC.js → ci-DIlnBiUj.js} +12 -11
- package/dist/cli.js +77 -25
- package/dist/{design-Q4Umr_4T.js → design-C-uq3ow5.js} +4 -4
- package/dist/{devtools-D8NTVj81.js → devtools-BiC-AP3B.js} +3 -3
- package/dist/{exit-gracefully-vUI1H1zC.js → exit-gracefully-C64GRTOn.js} +15 -9
- package/dist/get-east-asian-width-Cglw13G7.js +444 -0
- package/dist/{report-error-CAp5cil9.js → handle-error-Cfcnsjyi.js} +6 -61
- package/dist/index.d.ts +34 -2
- package/dist/index.js +187 -44
- package/dist/{inspect-RxIsB8bi.js → inspect-BLX566wA.js} +21 -19
- package/dist/{install-CI0nvC_v.js → install-Dz8zcUxD.js} +9 -8
- package/dist/{install-doctor-script-BAmTZygh.js → install-doctor-script-CjxGMzIH.js} +6 -441
- package/dist/{install-github-workflow-Dg2sosDx.js → install-github-workflow-eYmQoXdI.js} +6 -6
- package/dist/{install-react-doctor-CIJcnTik.js → install-react-doctor-OIDTrbHz.js} +47 -45
- package/dist/{run-scan-app-CeNk17wq.js → jsx-runtime-BdBmuS_a.js} +280 -2769
- package/dist/{print-branded-header-kwnSGrfR.js → print-branded-header-BksixHcc.js} +4 -4
- package/dist/prompt-runtime-scan-url-CXJMNnAo.js +240 -0
- package/dist/{read-object-file-m5uVvcBp.js → read-object-file-BhV9TFsy.js} +4 -4
- package/dist/{record-metric-DospZkfP.js → record-metric-CdX-TQ5W.js} +241 -77
- package/dist/report-error-DsFo2sAk.js +64 -0
- package/dist/{report-workflow-result-D0GvvJtT.js → report-workflow-result-BSSkdwvd.js} +5 -5
- package/dist/{resolve-scope-eXawiGEH.js → resolve-scope-DRnGmF8O.js} +6 -6
- package/dist/{rules-C_xYDSz8.js → rules-C2g4a0X3.js} +6 -6
- package/dist/run-scan-app-Ch6yrLY9.js +2508 -0
- package/dist/runtime-scan/browser-probe.iife.js +855 -0
- package/dist/runtime-scan-Crfe35Ke.js +770 -0
- package/dist/sanitize-runtime-url-Dwa_-IKX.js +76 -0
- package/dist/{scan-DIwsgV6M.js → scan-DJnhifws.js} +10 -22
- package/dist/{should-fail-scan-gate-BWTNIU5h.js → should-fail-scan-gate-D4ZKKeXI.js} +23 -114
- package/dist/{should-skip-prompts-oK3MwWyB.js → should-skip-prompts-Cfocoh7G.js} +4 -4
- package/dist/should-use-tui-COX1uZWn.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-BGZVK4sJ.js → telemetry-runtime-C_D70xUE.js} +5 -23
- package/dist/unref-stdin-BKT_s38a.js +12 -0
- package/dist/{version-9-2T2YQf.js → version-BAhd6Zvv.js} +4 -4
- package/dist/{why-BOiuB_qy.js → why-MQHWHpeA.js} +4 -4
- package/dist/with-run-span-DmpUrF70.js +110 -0
- package/package.json +6 -4
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
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]="16798435-138f-5144-b75d-97aa7ae2907b")}catch(e){}}();
|
|
3
3
|
import { i as __toESM$1, r as __require, t as __commonJSMin$1 } from "./chunk-ChKA3wi6.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import * as path$1$1 from "node:path";
|
|
@@ -64290,7 +64290,7 @@ var ProjectNotFoundError = class extends Error {
|
|
|
64290
64290
|
kind;
|
|
64291
64291
|
constructor(directory, options) {
|
|
64292
64292
|
const kind = options?.kind ?? "no-project";
|
|
64293
|
-
super(kind === "missing-path" ? `Scan target "${directory}" does not exist. Check the path and try again.` : `No React project found in ${directory}. Expected a package.json at the directory root or a nested package.json with a React dependency.`, options);
|
|
64293
|
+
super(kind === "missing-path" ? `Scan target "${directory}" does not exist. Check the path and try again.` : `No React or Three.js project found in ${directory}. Expected a package.json at the directory root or a nested package.json with a React or Three.js dependency.`, options);
|
|
64294
64294
|
this.directory = directory;
|
|
64295
64295
|
this.kind = kind;
|
|
64296
64296
|
}
|
|
@@ -64324,7 +64324,7 @@ var AmbiguousProjectError = class extends Error {
|
|
|
64324
64324
|
directory;
|
|
64325
64325
|
candidates;
|
|
64326
64326
|
constructor(directory, candidates, options) {
|
|
64327
|
-
super(`Multiple React projects found under ${directory} (${candidates.length} candidates): ${candidates.join(", ")}. Re-run diagnose() with one of those subdirectories, or iterate them yourself.`, options);
|
|
64327
|
+
super(`Multiple React or Three.js projects found under ${directory} (${candidates.length} candidates): ${candidates.join(", ")}. Re-run diagnose() with one of those subdirectories, or iterate them yourself.`, options);
|
|
64328
64328
|
this.directory = directory;
|
|
64329
64329
|
this.candidates = candidates;
|
|
64330
64330
|
}
|
|
@@ -65664,15 +65664,29 @@ const detectPreES2023Target = (directory) => {
|
|
|
65664
65664
|
}
|
|
65665
65665
|
return false;
|
|
65666
65666
|
};
|
|
65667
|
+
const SHADCN_CONFIG_FILE_NAME = "components.json";
|
|
65668
|
+
const detectShadcnUi = (directory) => {
|
|
65669
|
+
if (isFile(path$1$1.join(directory, SHADCN_CONFIG_FILE_NAME))) return true;
|
|
65670
|
+
if (isProjectBoundary(directory)) return false;
|
|
65671
|
+
let ancestorDirectory = path$1$1.dirname(directory);
|
|
65672
|
+
while (ancestorDirectory !== path$1$1.dirname(ancestorDirectory)) {
|
|
65673
|
+
if (isFile(path$1$1.join(ancestorDirectory, SHADCN_CONFIG_FILE_NAME))) return true;
|
|
65674
|
+
if (isProjectBoundary(ancestorDirectory)) return false;
|
|
65675
|
+
ancestorDirectory = path$1$1.dirname(ancestorDirectory);
|
|
65676
|
+
}
|
|
65677
|
+
return false;
|
|
65678
|
+
};
|
|
65667
65679
|
const FRAMEWORK_PACKAGES = {
|
|
65668
65680
|
next: "nextjs",
|
|
65669
65681
|
"@tanstack/react-start": "tanstack-start",
|
|
65670
65682
|
"@remix-run/react": "remix",
|
|
65671
65683
|
gatsby: "gatsby",
|
|
65672
65684
|
astro: "astro",
|
|
65685
|
+
"@astrojs/react": "astro",
|
|
65673
65686
|
vite: "vite",
|
|
65674
65687
|
"react-scripts": "cra",
|
|
65675
65688
|
expo: "expo",
|
|
65689
|
+
"expo-router": "expo",
|
|
65676
65690
|
"react-native": "react-native"
|
|
65677
65691
|
};
|
|
65678
65692
|
const detectFramework = (dependencies) => {
|
|
@@ -66164,20 +66178,39 @@ const getDependencyDeclaration = ({ packageJson, packageName, sections }) => {
|
|
|
66164
66178
|
version: null
|
|
66165
66179
|
};
|
|
66166
66180
|
};
|
|
66167
|
-
const
|
|
66181
|
+
const REACT_PROJECT_DEPENDENCY_NAMES = new Set([
|
|
66168
66182
|
"react",
|
|
66183
|
+
"react-dom",
|
|
66169
66184
|
"react-native",
|
|
66170
66185
|
"next",
|
|
66171
|
-
"preact"
|
|
66186
|
+
"preact",
|
|
66187
|
+
"expo",
|
|
66188
|
+
"expo-router",
|
|
66189
|
+
"gatsby",
|
|
66190
|
+
"@remix-run/react",
|
|
66191
|
+
"@tanstack/react-start",
|
|
66192
|
+
"react-scripts",
|
|
66193
|
+
"@astrojs/react"
|
|
66172
66194
|
]);
|
|
66195
|
+
const REACT_THREE_FIBER_DEPENDENCY_NAMES = ["@react-three/fiber", "react-three-fiber"];
|
|
66196
|
+
const REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES = [
|
|
66197
|
+
...REACT_THREE_FIBER_DEPENDENCY_NAMES,
|
|
66198
|
+
"@react-three/drei",
|
|
66199
|
+
"@react-three/rapier",
|
|
66200
|
+
"@react-three/postprocessing",
|
|
66201
|
+
"@react-three/xr",
|
|
66202
|
+
"@react-three/cannon"
|
|
66203
|
+
];
|
|
66204
|
+
const THREE_DEPENDENCY_NAMES = ["three", ...REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES];
|
|
66173
66205
|
const hasReactDependency = (packageJson) => {
|
|
66174
66206
|
const allDependencies = {
|
|
66175
66207
|
...packageJson.peerDependencies,
|
|
66176
66208
|
...packageJson.dependencies,
|
|
66177
66209
|
...packageJson.devDependencies
|
|
66178
66210
|
};
|
|
66179
|
-
return Object.keys(allDependencies).some((packageName) =>
|
|
66211
|
+
return Object.keys(allDependencies).some((packageName) => REACT_PROJECT_DEPENDENCY_NAMES.has(packageName));
|
|
66180
66212
|
};
|
|
66213
|
+
const hasSupportedProjectDependency = (packageJson) => hasReactDependency(packageJson) || getDependencySpec(packageJson, "remotion") !== null || THREE_DEPENDENCY_NAMES.some((packageName) => getDependencySpec(packageJson, packageName) !== null);
|
|
66181
66214
|
const getPreactVersion = (packageJson) => getDependencySpec(packageJson, "preact");
|
|
66182
66215
|
const resolveCatalogBackedDependencyVersion = ({ rootDirectory, rootPackageJson, packageName, sourceDirectory = rootDirectory, sourcePackageJson = rootPackageJson, version }) => {
|
|
66183
66216
|
if (version === null || !isCatalogReference(version)) return version;
|
|
@@ -66368,7 +66401,7 @@ const listWorkspacePackages = (rootDirectory) => {
|
|
|
66368
66401
|
seenDirectories.add(workspacePackage.directory);
|
|
66369
66402
|
packages.push(workspacePackage);
|
|
66370
66403
|
};
|
|
66371
|
-
if (
|
|
66404
|
+
if (hasSupportedProjectDependency(packageJson)) pushIfNew({
|
|
66372
66405
|
name: packageJson.name ?? path$1$1.basename(rootDirectory),
|
|
66373
66406
|
directory: rootDirectory
|
|
66374
66407
|
});
|
|
@@ -66376,7 +66409,7 @@ const listWorkspacePackages = (rootDirectory) => {
|
|
|
66376
66409
|
const directories = resolveWorkspaceDirectories(rootDirectory, pattern);
|
|
66377
66410
|
for (const workspaceDirectory of directories) {
|
|
66378
66411
|
const workspacePackageJson = readPackageJson(path$1$1.join(workspaceDirectory, "package.json"));
|
|
66379
|
-
if (!
|
|
66412
|
+
if (!hasSupportedProjectDependency(workspacePackageJson)) continue;
|
|
66380
66413
|
pushIfNew({
|
|
66381
66414
|
name: workspacePackageJson.name ?? path$1$1.basename(workspaceDirectory),
|
|
66382
66415
|
directory: workspaceDirectory
|
|
@@ -66408,6 +66441,29 @@ const getTanStackQueryVersion = (packageJson) => {
|
|
|
66408
66441
|
packageNames: TANSTACK_REACT_QUERY_PACKAGES
|
|
66409
66442
|
});
|
|
66410
66443
|
};
|
|
66444
|
+
const hasAnyDependency = (packageJson, packageNames) => {
|
|
66445
|
+
const allDependencies = {
|
|
66446
|
+
...packageJson.peerDependencies,
|
|
66447
|
+
...packageJson.dependencies,
|
|
66448
|
+
...packageJson.devDependencies,
|
|
66449
|
+
...packageJson.optionalDependencies
|
|
66450
|
+
};
|
|
66451
|
+
return packageNames.some((packageName) => allDependencies[packageName] !== void 0);
|
|
66452
|
+
};
|
|
66453
|
+
const BASE_UI_PACKAGES = ["@base-ui-components/react", "@base-ui/react"];
|
|
66454
|
+
const hasBaseUiDependency = (packageJson) => hasAnyDependency(packageJson, BASE_UI_PACKAGES);
|
|
66455
|
+
const RADIX_UNIFIED_PACKAGE = "radix-ui";
|
|
66456
|
+
const RADIX_PRIMITIVE_PACKAGE_PREFIX = "@radix-ui/react-";
|
|
66457
|
+
const RADIX_NON_PRIMITIVE_PACKAGES = new Set(["@radix-ui/react-icons"]);
|
|
66458
|
+
const hasRadixUiDependency = (packageJson) => {
|
|
66459
|
+
const allDependencies = {
|
|
66460
|
+
...packageJson.peerDependencies,
|
|
66461
|
+
...packageJson.dependencies,
|
|
66462
|
+
...packageJson.devDependencies,
|
|
66463
|
+
...packageJson.optionalDependencies
|
|
66464
|
+
};
|
|
66465
|
+
return Object.keys(allDependencies).some((packageName) => packageName === RADIX_UNIFIED_PACKAGE || packageName.startsWith(RADIX_PRIMITIVE_PACKAGE_PREFIX) && !RADIX_NON_PRIMITIVE_PACKAGES.has(packageName));
|
|
66466
|
+
};
|
|
66411
66467
|
const STYLED_COMPONENTS_PACKAGES = ["styled-components"];
|
|
66412
66468
|
const getStyledComponentsVersion = (packageJson) => {
|
|
66413
66469
|
return getPreferredDependencyVersion({
|
|
@@ -66438,12 +66494,15 @@ const hasI18nDependency = (packageJson) => {
|
|
|
66438
66494
|
};
|
|
66439
66495
|
return I18N_PACKAGES.some((packageName) => allDependencies[packageName] !== void 0);
|
|
66440
66496
|
};
|
|
66497
|
+
const REACT_ARIA_COMPONENT_PACKAGES = ["react-aria-components"];
|
|
66498
|
+
const TANSTACK_TABLE_PACKAGES = ["@tanstack/react-table"];
|
|
66499
|
+
const TANSTACK_VIRTUAL_PACKAGES = ["@tanstack/react-virtual"];
|
|
66500
|
+
const TANSTACK_FORM_PACKAGES = ["@tanstack/react-form"];
|
|
66441
66501
|
const REANIMATED_DEPENDENCY_NAME = "react-native-reanimated";
|
|
66442
66502
|
const MOBX_REACT_PACKAGE_NAME = "mobx-react";
|
|
66443
66503
|
const MOBX_REACT_LITE_PACKAGE_NAME = "mobx-react-lite";
|
|
66444
66504
|
const MOBX_STATE_TREE_PACKAGE_NAME = "mobx-state-tree";
|
|
66445
66505
|
const MOBX_REACT_OBSERVER_PACKAGE_NAME = "mobx-react-observer";
|
|
66446
|
-
const REACT_THREE_FIBER_DEPENDENCY_NAMES = ["@react-three/fiber", "react-three-fiber"];
|
|
66447
66506
|
const REACT_THREE_FIBER_SECTIONS = [
|
|
66448
66507
|
"dependencies",
|
|
66449
66508
|
"peerDependencies",
|
|
@@ -66456,8 +66515,6 @@ const THREE_DEPENDENCY_SECTIONS = [
|
|
|
66456
66515
|
"optionalDependencies",
|
|
66457
66516
|
"devDependencies"
|
|
66458
66517
|
];
|
|
66459
|
-
const REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES = [...REACT_THREE_FIBER_DEPENDENCY_NAMES, "@react-three/drei"];
|
|
66460
|
-
const THREE_DEPENDENCY_NAMES = [...REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES, "three"];
|
|
66461
66518
|
const REACT_ROUTER_DEPENDENCY_NAMES = [
|
|
66462
66519
|
"@react-router/dev",
|
|
66463
66520
|
"react-router-dom",
|
|
@@ -66631,6 +66688,13 @@ const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, roo
|
|
|
66631
66688
|
});
|
|
66632
66689
|
if (styledComponentsVersion && shouldReplaceStyledComponentsVersion(facts.styledComponentsVersion, styledComponentsVersion)) facts.styledComponentsVersion = styledComponentsVersion;
|
|
66633
66690
|
facts.hasI18nLibrary = facts.hasI18nLibrary || hasI18nDependency(packageJson);
|
|
66691
|
+
facts.hasShadcnUi = facts.hasShadcnUi || detectShadcnUi(directory);
|
|
66692
|
+
facts.hasRadixUi = facts.hasRadixUi || hasRadixUiDependency(packageJson);
|
|
66693
|
+
facts.hasBaseUi = facts.hasBaseUi || hasBaseUiDependency(packageJson);
|
|
66694
|
+
facts.hasReactAriaComponents = facts.hasReactAriaComponents || hasAnyDependency(packageJson, REACT_ARIA_COMPONENT_PACKAGES);
|
|
66695
|
+
facts.hasTanstackTable = facts.hasTanstackTable || hasAnyDependency(packageJson, TANSTACK_TABLE_PACKAGES);
|
|
66696
|
+
facts.hasTanstackVirtual = facts.hasTanstackVirtual || hasAnyDependency(packageJson, TANSTACK_VIRTUAL_PACKAGES);
|
|
66697
|
+
facts.hasTanstackForm = facts.hasTanstackForm || hasAnyDependency(packageJson, TANSTACK_FORM_PACKAGES);
|
|
66634
66698
|
for (const packageName of REACT_THREE_FIBER_DEPENDENCY_NAMES) {
|
|
66635
66699
|
const version = resolveCatalogBackedDependencyVersion({
|
|
66636
66700
|
rootDirectory,
|
|
@@ -66733,6 +66797,13 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
|
|
|
66733
66797
|
tanstackQueryVersion: null,
|
|
66734
66798
|
styledComponentsVersion: null,
|
|
66735
66799
|
hasI18nLibrary: false,
|
|
66800
|
+
hasShadcnUi: false,
|
|
66801
|
+
hasRadixUi: false,
|
|
66802
|
+
hasBaseUi: false,
|
|
66803
|
+
hasReactAriaComponents: false,
|
|
66804
|
+
hasTanstackTable: false,
|
|
66805
|
+
hasTanstackVirtual: false,
|
|
66806
|
+
hasTanstackForm: false,
|
|
66736
66807
|
hasReactNativeAwarePackage: false,
|
|
66737
66808
|
hasReanimatedAwarePackage: false,
|
|
66738
66809
|
hasSsrDependency: false,
|
|
@@ -66961,13 +67032,13 @@ const detectTargetBlankOpenerProtection = (directory, packageJson) => {
|
|
|
66961
67032
|
if (browserslistRequirement === "noreferrer" || electronRequirement === "noreferrer") return "noreferrer";
|
|
66962
67033
|
if (browserslistRequirement === "noopener" || electronRequirement === "noopener") return "noopener";
|
|
66963
67034
|
};
|
|
66964
|
-
const
|
|
67035
|
+
const toSupportedWorkspacePackages = (directories) => {
|
|
66965
67036
|
const packages = [];
|
|
66966
67037
|
for (const directory of directories) {
|
|
66967
67038
|
const packageJsonPath = path$1$1.join(directory, "package.json");
|
|
66968
67039
|
if (!isFile(packageJsonPath)) continue;
|
|
66969
67040
|
const packageJson = readPackageJson(packageJsonPath);
|
|
66970
|
-
if (!
|
|
67041
|
+
if (!hasSupportedProjectDependency(packageJson)) continue;
|
|
66971
67042
|
const name = packageJson.name ?? path$1$1.basename(directory);
|
|
66972
67043
|
packages.push({
|
|
66973
67044
|
name,
|
|
@@ -66980,7 +67051,7 @@ const listManifestWorkspacePackages = (rootDirectory) => {
|
|
|
66980
67051
|
if (isFile(path$1$1.join(rootDirectory, "package.json"))) return listWorkspacePackages(rootDirectory);
|
|
66981
67052
|
const patterns = parsePnpmWorkspacePatterns(rootDirectory);
|
|
66982
67053
|
const nxPatterns = patterns.length > 0 ? [] : getNxWorkspaceDirectories(rootDirectory);
|
|
66983
|
-
return
|
|
67054
|
+
return toSupportedWorkspacePackages((patterns.length > 0 ? patterns : nxPatterns).flatMap((pattern) => resolveWorkspaceDirectories(rootDirectory, pattern)));
|
|
66984
67055
|
};
|
|
66985
67056
|
const NON_PROJECT_DIRECTORIES = new Set([
|
|
66986
67057
|
"AppData",
|
|
@@ -66988,7 +67059,7 @@ const NON_PROJECT_DIRECTORIES = new Set([
|
|
|
66988
67059
|
"Library"
|
|
66989
67060
|
]);
|
|
66990
67061
|
const MAX_SCAN_DEPTH = 6;
|
|
66991
|
-
const
|
|
67062
|
+
const discoverSupportedSubprojectsByFilesystem = (rootDirectory) => {
|
|
66992
67063
|
const packages = [];
|
|
66993
67064
|
const pendingDirectories = [{
|
|
66994
67065
|
directory: rootDirectory,
|
|
@@ -67001,7 +67072,7 @@ const discoverReactSubprojectsByFilesystem = (rootDirectory) => {
|
|
|
67001
67072
|
const packageJsonPath = path$1$1.join(currentDirectory, "package.json");
|
|
67002
67073
|
if (isFile(packageJsonPath)) {
|
|
67003
67074
|
const packageJson = readPackageJson(packageJsonPath);
|
|
67004
|
-
if (
|
|
67075
|
+
if (hasSupportedProjectDependency(packageJson)) {
|
|
67005
67076
|
const name = packageJson.name ?? path$1$1.basename(currentDirectory);
|
|
67006
67077
|
packages.push({
|
|
67007
67078
|
name,
|
|
@@ -67021,11 +67092,11 @@ const discoverReactSubprojectsByFilesystem = (rootDirectory) => {
|
|
|
67021
67092
|
}
|
|
67022
67093
|
return packages;
|
|
67023
67094
|
};
|
|
67024
|
-
const
|
|
67095
|
+
const discoverSupportedSubprojects = (rootDirectory) => {
|
|
67025
67096
|
if (!isDirectory(rootDirectory)) return [];
|
|
67026
67097
|
const manifestPackages = listManifestWorkspacePackages(rootDirectory);
|
|
67027
67098
|
if (manifestPackages.length > 0) return manifestPackages;
|
|
67028
|
-
return
|
|
67099
|
+
return discoverSupportedSubprojectsByFilesystem(rootDirectory);
|
|
67029
67100
|
};
|
|
67030
67101
|
const cachedProjectInfos = /* @__PURE__ */ new Map();
|
|
67031
67102
|
const clearProjectCache = () => {
|
|
@@ -67084,6 +67155,12 @@ const discoverProjectWithoutPackageJson = (directory, options) => {
|
|
|
67084
67155
|
remotionVersion: null,
|
|
67085
67156
|
remotionMajorVersion: null,
|
|
67086
67157
|
hasI18nLibrary: false,
|
|
67158
|
+
hasRadixUi: false,
|
|
67159
|
+
hasBaseUi: false,
|
|
67160
|
+
hasReactAriaComponents: false,
|
|
67161
|
+
hasTanstackTable: false,
|
|
67162
|
+
hasTanstackVirtual: false,
|
|
67163
|
+
hasTanstackForm: false,
|
|
67087
67164
|
tanstackQueryVersion: null,
|
|
67088
67165
|
styledComponentsVersion: null,
|
|
67089
67166
|
hasThree: false,
|
|
@@ -67105,6 +67182,7 @@ const discoverProjectWithoutPackageJson = (directory, options) => {
|
|
|
67105
67182
|
shopifyFlashListMajorVersion: null,
|
|
67106
67183
|
hasReanimated: false,
|
|
67107
67184
|
reanimatedVersion: null,
|
|
67185
|
+
hasShadcnUi: detectShadcnUi(directory),
|
|
67108
67186
|
isPreES2023Target: hasOwnTsConfig && detectPreES2023Target(directory),
|
|
67109
67187
|
isStaticExport: false,
|
|
67110
67188
|
sourceFileCount
|
|
@@ -67267,6 +67345,12 @@ const discoverProject = (directory, options = {}) => {
|
|
|
67267
67345
|
hasReactCompilerLintPlugin: detectReactCompilerLintPlugin(directory, packageJson),
|
|
67268
67346
|
hasTanStackQuery: tanstackQueryVersion !== null,
|
|
67269
67347
|
hasI18nLibrary: workspaceFacts.hasI18nLibrary,
|
|
67348
|
+
hasRadixUi: workspaceFacts.hasRadixUi,
|
|
67349
|
+
hasBaseUi: workspaceFacts.hasBaseUi,
|
|
67350
|
+
hasReactAriaComponents: workspaceFacts.hasReactAriaComponents,
|
|
67351
|
+
hasTanstackTable: workspaceFacts.hasTanstackTable,
|
|
67352
|
+
hasTanstackVirtual: workspaceFacts.hasTanstackVirtual,
|
|
67353
|
+
hasTanstackForm: workspaceFacts.hasTanstackForm,
|
|
67270
67354
|
tanstackQueryVersion,
|
|
67271
67355
|
styledComponentsVersion: workspaceFacts.styledComponentsVersion,
|
|
67272
67356
|
valtioVersion,
|
|
@@ -67293,6 +67377,7 @@ const discoverProject = (directory, options = {}) => {
|
|
|
67293
67377
|
shopifyFlashListMajorVersion: shopifyFlashListVersion === null ? null : getLowestDependencyMajor(shopifyFlashListVersion),
|
|
67294
67378
|
hasReanimated,
|
|
67295
67379
|
reanimatedVersion,
|
|
67380
|
+
hasShadcnUi: workspaceFacts.hasShadcnUi,
|
|
67296
67381
|
isPreES2023Target,
|
|
67297
67382
|
isStaticExport: framework === "nextjs" && detectNextjsStaticExport(workspaceFacts.next.sourceDirectory ?? directory),
|
|
67298
67383
|
sourceFileCount
|
|
@@ -67300,16 +67385,31 @@ const discoverProject = (directory, options = {}) => {
|
|
|
67300
67385
|
cachedProjectInfos.set(directory, projectInfo);
|
|
67301
67386
|
return projectInfo;
|
|
67302
67387
|
};
|
|
67388
|
+
const REACT_COMPATIBLE_FRAMEWORKS = new Set([
|
|
67389
|
+
"nextjs",
|
|
67390
|
+
"tanstack-start",
|
|
67391
|
+
"cra",
|
|
67392
|
+
"remix",
|
|
67393
|
+
"gatsby",
|
|
67394
|
+
"expo",
|
|
67395
|
+
"react-native",
|
|
67396
|
+
"preact"
|
|
67397
|
+
]);
|
|
67303
67398
|
/**
|
|
67304
|
-
*
|
|
67399
|
+
* Whether project discovery resolved a React-compatible runtime directly or
|
|
67400
|
+
* through a framework whose runtime is necessarily React-compatible.
|
|
67401
|
+
*/
|
|
67402
|
+
const hasReactRuntime = (project) => project.reactVersion !== null || project.preactVersion !== null || REACT_COMPATIBLE_FRAMEWORKS.has(project.framework);
|
|
67403
|
+
/**
|
|
67404
|
+
* A project is worth scanning when it has a supported runtime (the runtime-
|
|
67305
67405
|
* specific rules apply) OR it simply has source files to lint. The
|
|
67306
67406
|
* second arm is what lets a plain TypeScript/JavaScript codebase — no
|
|
67307
67407
|
* React dependency at all — run the framework-agnostic rules
|
|
67308
67408
|
* (security, architecture, zod, bundle-size, …) instead of hard-failing
|
|
67309
|
-
* with "No React dependency". Only a directory with neither
|
|
67310
|
-
* single source file has nothing to analyze.
|
|
67409
|
+
* with "No React dependency". Only a directory with neither a supported
|
|
67410
|
+
* runtime nor a single source file has nothing to analyze.
|
|
67311
67411
|
*/
|
|
67312
|
-
const isAnalyzableProject = (project) => project.
|
|
67412
|
+
const isAnalyzableProject = (project) => hasReactRuntime(project) || project.hasThree === true || project.hasRemotion === true || project.sourceFileCount > 0;
|
|
67313
67413
|
const LEGACY_RULE_KEY_TO_NATIVE_RULE_KEY = {
|
|
67314
67414
|
"deslop/circular-dependency": "react-doctor/circular-dependency",
|
|
67315
67415
|
"deslop/unused-dependency": "react-doctor/unused-dependency",
|
|
@@ -69227,11 +69327,11 @@ const resolveConfigRootDir = (config, configSourceDirectory) => {
|
|
|
69227
69327
|
};
|
|
69228
69328
|
const resolveDiagnoseTarget = (directory, options = {}) => {
|
|
69229
69329
|
if (isFile(path$1$1.join(directory, "package.json"))) return directory;
|
|
69230
|
-
const
|
|
69231
|
-
if (
|
|
69232
|
-
if (
|
|
69330
|
+
const subprojects = discoverSupportedSubprojects(directory);
|
|
69331
|
+
if (subprojects.length === 0) return null;
|
|
69332
|
+
if (subprojects.length === 1) return subprojects[0].directory;
|
|
69233
69333
|
if (options.allowAmbiguous === true) return null;
|
|
69234
|
-
throw new AmbiguousProjectError(directory,
|
|
69334
|
+
throw new AmbiguousProjectError(directory, subprojects.map((subproject) => path$1$1.relative(directory, subproject.directory)).toSorted());
|
|
69235
69335
|
};
|
|
69236
69336
|
/**
|
|
69237
69337
|
* The canonical entry-point translation shared by every public shell
|
|
@@ -70966,21 +71066,6 @@ function* collectSecurityScanFiles(rootDirectory, excludedDirectories = /* @__PU
|
|
|
70966
71066
|
}
|
|
70967
71067
|
}
|
|
70968
71068
|
}
|
|
70969
|
-
const REACT_COMPATIBLE_FRAMEWORKS = new Set([
|
|
70970
|
-
"nextjs",
|
|
70971
|
-
"tanstack-start",
|
|
70972
|
-
"cra",
|
|
70973
|
-
"remix",
|
|
70974
|
-
"gatsby",
|
|
70975
|
-
"expo",
|
|
70976
|
-
"react-native",
|
|
70977
|
-
"preact"
|
|
70978
|
-
]);
|
|
70979
|
-
/**
|
|
70980
|
-
* Whether project discovery resolved a React-compatible runtime directly or
|
|
70981
|
-
* through a framework whose runtime is necessarily React-compatible.
|
|
70982
|
-
*/
|
|
70983
|
-
const hasReactRuntime = (project) => project.reactVersion !== null || project.preactVersion !== null || REACT_COMPATIBLE_FRAMEWORKS.has(project.framework);
|
|
70984
71069
|
const CLIENT_ONLY_FRAMEWORKS = new Set([
|
|
70985
71070
|
"vite",
|
|
70986
71071
|
"cra",
|
|
@@ -71041,6 +71126,13 @@ const buildCapabilities = (project) => {
|
|
|
71041
71126
|
minor: 0
|
|
71042
71127
|
})) capabilities.add("tailwind:4");
|
|
71043
71128
|
}
|
|
71129
|
+
if (project.hasShadcnUi === true) capabilities.add("shadcn");
|
|
71130
|
+
if (project.hasRadixUi === true) capabilities.add("radix-ui");
|
|
71131
|
+
if (project.hasBaseUi === true) capabilities.add("base-ui");
|
|
71132
|
+
if (project.hasReactAriaComponents === true) capabilities.add("react-aria");
|
|
71133
|
+
if (project.hasTanstackTable === true) capabilities.add("tanstack-table");
|
|
71134
|
+
if (project.hasTanstackVirtual === true) capabilities.add("tanstack-virtual");
|
|
71135
|
+
if (project.hasTanstackForm === true) capabilities.add("tanstack-form");
|
|
71044
71136
|
if (project.zodVersion !== null) capabilities.add("zod");
|
|
71045
71137
|
if (project.zodMajorVersion !== null && project.zodMajorVersion >= 4) capabilities.add("zod:4");
|
|
71046
71138
|
if (project.mobxVersion !== void 0 && project.mobxVersion !== null || project.hasMobxReact === true || project.hasMobxReactLite === true || project.hasMobxStateTree === true || project.hasMobxReactObserver === true) capabilities.add("mobx");
|
|
@@ -74505,7 +74597,7 @@ const buildRelatedLocations = (labels, filePath, sourceBuffer) => {
|
|
|
74505
74597
|
const isOxlintSpan = (value) => isRecord(value) && typeof value.offset === "number" && typeof value.length === "number" && typeof value.line === "number" && typeof value.column === "number";
|
|
74506
74598
|
const isOxlintLabel = (value) => isRecord(value) && isOxlintSpan(value.span);
|
|
74507
74599
|
const isMappableOxlintDiagnostic = (value) => isRecord(value) && typeof value.code === "string" && value.code.length > 0 && typeof value.filename === "string" && value.filename.length > 0 && (value.severity === "warning" || value.severity === "error") && Array.isArray(value.labels) && value.labels.every(isOxlintLabel);
|
|
74508
|
-
const isEngineFailureDiagnostic = (value) => !isRecord(value) || typeof value.filename !== "string" || value.filename.length === 0;
|
|
74600
|
+
const isEngineFailureDiagnostic = (value) => !isRecord(value) || typeof value.filename !== "string" || value.filename.length === 0 || typeof value.message === "string" && value.message.startsWith("Error running JS plugin.") && (typeof value.code !== "string" || value.code.length === 0) && Array.isArray(value.labels) && value.labels.length === 0;
|
|
74509
74601
|
const isOxlintOutput = (value) => isRecord(value) && Array.isArray(value.diagnostics);
|
|
74510
74602
|
/**
|
|
74511
74603
|
* Parses one oxlint subprocess's stdout into a flat `Diagnostic[]`.
|
|
@@ -74635,6 +74727,46 @@ const buildProfiledNodeArguments = (input) => [
|
|
|
74635
74727
|
...input.heapProfileDirectory ? ["--heap-prof", `--heap-prof-dir=${input.heapProfileDirectory}`] : [],
|
|
74636
74728
|
...input.argumentsList
|
|
74637
74729
|
];
|
|
74730
|
+
const buildOxlintTimingArguments = (argumentsList) => {
|
|
74731
|
+
const timingArguments = [...argumentsList];
|
|
74732
|
+
const formatFlagIndex = timingArguments.indexOf("--format");
|
|
74733
|
+
if (formatFlagIndex === -1 || formatFlagIndex + 1 >= timingArguments.length) throw new Error("Oxlint timing arguments require a --format value");
|
|
74734
|
+
timingArguments[formatFlagIndex + 1] = "default";
|
|
74735
|
+
timingArguments.push("--debug", "timings", "--quiet");
|
|
74736
|
+
return timingArguments;
|
|
74737
|
+
};
|
|
74738
|
+
const captureOxlintRuleTimings = (input) => new Promise((resolve, reject) => {
|
|
74739
|
+
const timingEnvironment = { ...input.environment };
|
|
74740
|
+
timingEnvironment.REACT_DOCTOR_RULE_TIMINGS_DIR = void 0;
|
|
74741
|
+
const timingChild = spawn(input.nodeBinaryPath, buildOxlintTimingArguments(input.argumentsList), {
|
|
74742
|
+
cwd: input.rootDirectory,
|
|
74743
|
+
env: timingEnvironment,
|
|
74744
|
+
stdio: [
|
|
74745
|
+
"ignore",
|
|
74746
|
+
"pipe",
|
|
74747
|
+
"pipe"
|
|
74748
|
+
]
|
|
74749
|
+
});
|
|
74750
|
+
const stdoutBuffers = [];
|
|
74751
|
+
const stderrBuffers = [];
|
|
74752
|
+
timingChild.stdout.on("data", (buffer) => stdoutBuffers.push(buffer));
|
|
74753
|
+
timingChild.stderr.on("data", (buffer) => stderrBuffers.push(buffer));
|
|
74754
|
+
timingChild.on("error", reject);
|
|
74755
|
+
timingChild.on("close", (_code, signal) => {
|
|
74756
|
+
if (signal) {
|
|
74757
|
+
reject(/* @__PURE__ */ new Error(`Oxlint timing pass was killed by ${signal}`));
|
|
74758
|
+
return;
|
|
74759
|
+
}
|
|
74760
|
+
const timingOutput = `${Buffer.concat(stdoutBuffers).toString("utf8")}\n${Buffer.concat(stderrBuffers).toString("utf8")}`;
|
|
74761
|
+
if (!timingOutput.includes("Rule timings:")) {
|
|
74762
|
+
resolve();
|
|
74763
|
+
return;
|
|
74764
|
+
}
|
|
74765
|
+
fs$1$3.mkdirSync(input.timingDirectory, { recursive: true });
|
|
74766
|
+
fs$1$3.writeFileSync(path$1$1.join(input.timingDirectory, `oxlint-${timingChild.pid ?? process.pid}.timings.txt`), timingOutput);
|
|
74767
|
+
resolve();
|
|
74768
|
+
});
|
|
74769
|
+
});
|
|
74638
74770
|
const lowerChildProcessPriority = (processId) => {
|
|
74639
74771
|
if (processId === void 0) return;
|
|
74640
74772
|
try {
|
|
@@ -74756,7 +74888,18 @@ const spawnOxlint = (args, rootDirectory, nodeBinaryPath, spawnTimeoutMs = OXLIN
|
|
|
74756
74888
|
return;
|
|
74757
74889
|
}
|
|
74758
74890
|
}
|
|
74759
|
-
|
|
74891
|
+
const timingDirectory = SANITIZED_ENV.REACT_DOCTOR_OXLINT_TIMINGS_DIR;
|
|
74892
|
+
if (timingDirectory === void 0) {
|
|
74893
|
+
resolve(output);
|
|
74894
|
+
return;
|
|
74895
|
+
}
|
|
74896
|
+
captureOxlintRuleTimings({
|
|
74897
|
+
argumentsList: args,
|
|
74898
|
+
environment: SANITIZED_ENV,
|
|
74899
|
+
nodeBinaryPath,
|
|
74900
|
+
rootDirectory,
|
|
74901
|
+
timingDirectory
|
|
74902
|
+
}).then(() => resolve(output), reject);
|
|
74760
74903
|
});
|
|
74761
74904
|
});
|
|
74762
74905
|
const PARALLELISM_EXHAUSTION_ERROR_CODES = new Set([
|
|
@@ -77864,4 +78007,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
77864
78007
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
77865
78008
|
|
|
77866
78009
|
//# sourceMappingURL=index.js.map
|
|
77867
|
-
//# debugId=
|
|
78010
|
+
//# debugId=16798435-138f-5144-b75d-97aa7ae2907b
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { n as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { t as
|
|
11
|
-
import {
|
|
12
|
-
import { a as
|
|
13
|
-
import { a as
|
|
14
|
-
import { t as
|
|
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]="eebc9785-3b11-5577-bb1c-9f30f69bb86e")}catch(e){}}();
|
|
3
|
+
import { An as gen, At as discoverSupportedSubprojects, Bt as getDiffInfo, Cr as messageFromUnknown, F as STAGED_FILES_TEMP_DIR_PREFIX, Fn as provide$1, Gn as provide, H as isDebugFlagEnabled, I as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, Jt as isPathInsideDirectory, K as isCiOrCodingAgentEnvironment, Kt as highlighter, Lt as getBaselineDiffPlan, Pt as findLegacyConfig, Rn as runPromise, Rt as getChangedLineRanges, Sr as isPlainObject, T as METRIC, Wt as hasSupportedFrameworkOrLibrary, X as Git, _ as VERSION, _r as STAGED_FILES_PROJECT_CONFIG_FILENAMES, br as isErrnoException, er as CANONICAL_GITHUB_URL, f as setJsonReportDirectory, fn as resolveScanTarget, g as writeJsonReport, h as writeJsonErrorReport, ht as buildJsonReport, in as mapWithConcurrency, kt as detectAiTrainingEnvironment, n as recordDistribution, nn as listWorkspacePackages, p as setJsonReportMode, q as isCodingAgentEnvironment, sn as remainingDeadlineBudgetMs, t as recordCount, u as enableJsonMode, ut as StagedFiles, yn as toRelativePath, z as CliInputError } from "./record-metric-CdX-TQ5W.js";
|
|
4
|
+
import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-C_D70xUE.js";
|
|
5
|
+
import { r as flushSentry } from "./build-section-divider-D5ATBfDJ.js";
|
|
6
|
+
import { n as handleUserError, t as handleError } from "./handle-error-Cfcnsjyi.js";
|
|
7
|
+
import { t as reportErrorToSentry } from "./report-error-DsFo2sAk.js";
|
|
8
|
+
import { N as cliLogger, c as spinner, i as hasDoctorScript, j as runGitRaw, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-CjxGMzIH.js";
|
|
9
|
+
import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-eYmQoXdI.js";
|
|
10
|
+
import { c as openWorkflowPullRequest, i as warnDeprecatedDiff, l as stageWorkflowFile, r as resolveScope, s as resolveBlockingLevel, t as finalizeScope, u as toForwardSlashes } from "./resolve-scope-DRnGmF8O.js";
|
|
11
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-Cfocoh7G.js";
|
|
12
|
+
import { A as resolveMergeBaseRef, C as copyToClipboard, D as deduplicateProjectScans, E as collectProjectSourceFileCounts, I as printDiagnosticsDump, O as createInvocationInspect, S as CLI_AGENT_BINARIES, T as buildHandoffPayload, V as buildEmptyReportMessage, _ as resolveCliInspectOptions, a as projectManifestChanged, b as setUpGitHubActions, c as selectProjects, d as resolveProjectChangedLineRanges, f as resolveProjectDiffIncludePaths, g as resolveWorkspaceDeadCodeOwner, h as retryMissingProjectScores, i as validateModeFlags, j as printHeadlessReport, k as inspect, l as buildCodeFrame, m as resolveProjectRelativeDirectory, n as formatSkippedProjectsMessage, o as partitionProjectScanOutcomes, p as resolveProjectSourceFilePaths, r as validateIncludeUntrackedScope, t as shouldFailScanGate, u as resolveProjectScan, v as filterScansForSurface, w as launchCliAgent, x as detectLaunchableAgents, y as countUniqueScannedFiles, z as filterDiagnosticsByCategories } from "./should-fail-scan-gate-D4ZKKeXI.js";
|
|
13
|
+
import { a as recordGate, i as readPreference, o as runMigrations, p as SETUP_HINT_EVENT, r as isGatePending, s as writePreference, u as HANDOFF_TARGET_PREFERENCE_ID } from "./report-workflow-result-BSSkdwvd.js";
|
|
14
|
+
import { a as askUpgradeActionVersion, c as recordCiPromptDecision, i as installReactDoctorAgentHooks, l as hasHandledActionUpgrade, o as askAddToGitHubActions, r as findAgentsWithOutdatedReactDoctorHooks, s as hasHandledCiPrompt, t as getSkillSourceDirectory, u as recordActionUpgradeDecision } from "./install-react-doctor-OIDTrbHz.js";
|
|
15
|
+
import { t as readObjectFile } from "./read-object-file-BhV9TFsy.js";
|
|
15
16
|
import * as path$1 from "node:path";
|
|
16
17
|
import * as fs$1 from "node:fs";
|
|
17
18
|
import { tmpdir } from "node:os";
|
|
@@ -315,17 +316,18 @@ const PROJECT_MIGRATIONS = [
|
|
|
315
316
|
},
|
|
316
317
|
{
|
|
317
318
|
id: "agent-hooks-sh-to-mjs",
|
|
319
|
+
version: 2,
|
|
318
320
|
scope: "project",
|
|
319
321
|
run: ({ projectRoot }) => {
|
|
320
322
|
if (projectRoot === void 0) return false;
|
|
321
|
-
const agents =
|
|
323
|
+
const agents = findAgentsWithOutdatedReactDoctorHooks(projectRoot);
|
|
322
324
|
if (agents.length === 0) return false;
|
|
323
325
|
installReactDoctorAgentHooks({
|
|
324
326
|
projectRoot,
|
|
325
327
|
agents
|
|
326
328
|
});
|
|
327
|
-
cliLogger.success(`
|
|
328
|
-
cliLogger.dim("
|
|
329
|
+
cliLogger.success(`Moved React Doctor agent hooks to end-of-turn checks (${agents.join(", ")})`);
|
|
330
|
+
cliLogger.dim(" Hooks now scan changed and untracked files once when the agent stops. Review and commit the change.");
|
|
329
331
|
cliLogger.break();
|
|
330
332
|
return true;
|
|
331
333
|
}
|
|
@@ -474,7 +476,7 @@ const buildDiagnosticIssueUrl = (input) => {
|
|
|
474
476
|
const findOwningProjectDirectory = (rootDirectory, filePath) => {
|
|
475
477
|
const absoluteFile = path$1.isAbsolute(filePath) ? filePath : path$1.resolve(rootDirectory, filePath);
|
|
476
478
|
const workspacePackages = listWorkspacePackages(rootDirectory);
|
|
477
|
-
const candidates = workspacePackages.length > 0 ? workspacePackages :
|
|
479
|
+
const candidates = workspacePackages.length > 0 ? workspacePackages : discoverSupportedSubprojects(rootDirectory);
|
|
478
480
|
if (candidates.length === 0) return rootDirectory;
|
|
479
481
|
let bestMatch = null;
|
|
480
482
|
for (const candidate of candidates) {
|
|
@@ -1439,5 +1441,5 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
|
|
|
1439
1441
|
//#endregion
|
|
1440
1442
|
export { warnDeprecatedFailOn as n, runProjectMigrations as r, inspectAction as t };
|
|
1441
1443
|
|
|
1442
|
-
//# sourceMappingURL=inspect-
|
|
1443
|
-
//# debugId=
|
|
1444
|
+
//# sourceMappingURL=inspect-BLX566wA.js.map
|
|
1445
|
+
//# debugId=eebc9785-3b11-5577-bb1c-9f30f69bb86e
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
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]="25b9f61d-978e-516e-86fa-8c0cb5efd72f")}catch(e){}}();
|
|
3
|
+
import { T as METRIC, t as recordCount, zn as runSync } from "./record-metric-CdX-TQ5W.js";
|
|
4
|
+
import { r as isExpectedUserError } from "./telemetry-runtime-C_D70xUE.js";
|
|
5
|
+
import { n as handleUserError, t as handleError } from "./handle-error-Cfcnsjyi.js";
|
|
6
|
+
import { t as reportErrorToSentry } from "./report-error-DsFo2sAk.js";
|
|
7
|
+
import { t as printBrandedHeader } from "./print-branded-header-BksixHcc.js";
|
|
8
|
+
import { n as runInstallReactDoctor } from "./install-react-doctor-OIDTrbHz.js";
|
|
8
9
|
//#region src/cli/commands/install.ts
|
|
9
10
|
const installAction = async (options, command) => {
|
|
10
11
|
recordCount(METRIC.cliInvoked, 1, { command: "install" });
|
|
@@ -28,5 +29,5 @@ const installAction = async (options, command) => {
|
|
|
28
29
|
//#endregion
|
|
29
30
|
export { installAction };
|
|
30
31
|
|
|
31
|
-
//# sourceMappingURL=install-
|
|
32
|
-
//# debugId=
|
|
32
|
+
//# sourceMappingURL=install-Dz8zcUxD.js.map
|
|
33
|
+
//# debugId=25b9f61d-978e-516e-86fa-8c0cb5efd72f
|