react-doctor 0.9.12-dev.013f737 → 0.9.12-dev.025d69d
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/dist/{build-section-divider-CU-16tRj.js → build-section-divider-Rtaiowhy.js} +7 -7
- package/dist/{ci-Dh7pP7KY.js → ci-BB3u5Gt7.js} +12 -12
- package/dist/cli.js +24 -24
- package/dist/{design-BzrSnwUm.js → design-DndYvifI.js} +4 -4
- package/dist/{exit-gracefully-D6bYEaJY.js → exit-gracefully-DShLWQuA.js} +6 -6
- package/dist/{handle-error-B-sefMQJ.js → handle-error-D1wDDJF-.js} +5 -5
- package/dist/index.js +202 -92
- package/dist/{inspect-B91jqgDd.js → inspect-FuGxonlI.js} +16 -16
- package/dist/{install-DwdDJZLo.js → install-DMK7JRVX.js} +9 -9
- package/dist/{install-doctor-script-C_02th1a.js → install-doctor-script-JE3JnnQc.js} +4 -4
- package/dist/{install-github-workflow-CtrzHuoG.js → install-github-workflow-BdY3qY2f.js} +9 -5
- package/dist/{install-react-doctor-Bxmp24zo.js → install-react-doctor-BMn0_WV6.js} +8 -8
- package/dist/{jsx-runtime-DvQYHYIV.js → jsx-runtime-pWsmwZGj.js} +5 -5
- package/dist/{print-branded-header-ZI6bzOzV.js → print-branded-header-BmI9tLH6.js} +4 -4
- package/dist/project-analysis-worker.js +43 -37
- package/dist/{prompt-runtime-scan-url-E76H6vtX.js → prompt-runtime-scan-url-BfBBYAfw.js} +5 -5
- package/dist/{read-object-file-DwgF3AUW.js → read-object-file-CRpKojJA.js} +4 -4
- package/dist/{record-metric-J1L5BmaF.js → record-metric-BM82PBSe.js} +198 -87
- package/dist/{report-error-CGlDARUr.js → report-error-CZHQUNh4.js} +5 -5
- package/dist/{report-workflow-result-BEhF-Fk5.js → report-workflow-result-xEGmAMA7.js} +5 -5
- package/dist/{resolve-scope-BryzWK4p.js → resolve-scope-Bnf4Y4EW.js} +6 -6
- package/dist/{rules-148RYdKo.js → rules-DzOjQMX6.js} +6 -6
- package/dist/{run-scan-app-YPqscslC.js → run-scan-app-BV3v34-X.js} +15 -14
- package/dist/{runtime-scan-DxEqnav4.js → runtime-scan-B85-DJZM.js} +9 -9
- package/dist/{sanitize-runtime-url-Dy4tyhb1.js → sanitize-runtime-url-CPjeveTJ.js} +4 -4
- package/dist/{scan-DjBH5dqT.js → scan-DuP6gdzt.js} +9 -9
- package/dist/{should-fail-scan-gate-Nw22UN5m.js → should-fail-scan-gate-DXLurKbC.js} +11 -11
- package/dist/{should-skip-prompts-C2oc3T4l.js → should-skip-prompts-CQyO96OW.js} +4 -4
- package/dist/{should-use-tui-BSvLC2-t.js → should-use-tui-CNPwNNtA.js} +4 -4
- package/dist/{telemetry-runtime-DlBJxPXW.js → telemetry-runtime-DbSLLSa0.js} +4 -4
- package/dist/{version-wYwu6AvJ.js → version-Zw_S1mCX.js} +4 -4
- package/dist/{why-CmDRbdLA.js → why-B-WcOS0C.js} +4 -4
- package/dist/{with-run-span--LC47bQS.js → with-run-span-CVyFHX3Z.js} +5 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
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]="99fcede8-f7dd-50eb-a707-599a7e94811f")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import * as path$1$1 from "node:path";
|
|
6
|
-
import path from "node:path";
|
|
6
|
+
import path, { join, posix } from "node:path";
|
|
7
7
|
import * as fs$1$3 from "node:fs";
|
|
8
|
-
import fs from "node:fs";
|
|
8
|
+
import fs, { existsSync } from "node:fs";
|
|
9
9
|
import * as NodeChildProcess from "node:child_process";
|
|
10
10
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
11
11
|
import ts from "typescript";
|
|
12
|
+
import { parseSync } from "oxc-parser";
|
|
12
13
|
import { ALL_REACT_DOCTOR_RULE_KEYS, CROSS_FILE_DEPENDENCY_COLLECTORS, CROSS_FILE_RULE_IDS, FRAMEWORK_SPECIFIC_RULE_KEYS, FRAMEWORK_TOKENS, MOTION_LIBRARY_PACKAGES, REACT_COMPILER_RULES, REACT_DOCTOR_OPT_IN_PROJECT_RULE_IDS, REACT_DOCTOR_PROJECT_RULES, REACT_DOCTOR_RULES, REACT_DOCTOR_RULE_REGISTRY, REACT_DOCTOR_SCAN_RULES, classifySecurityScanFile, collectCrossFileDependencyProbes, resetManifestCaches, shouldReadSecurityScanContent } from "oxlint-plugin-react-doctor/core";
|
|
13
14
|
import * as Crypto from "node:crypto";
|
|
14
15
|
import crypto, { createHash, randomUUID } from "node:crypto";
|
|
@@ -18,7 +19,7 @@ import { fileURLToPath } from "node:url";
|
|
|
18
19
|
import * as OS from "node:os";
|
|
19
20
|
import os from "node:os";
|
|
20
21
|
import { createJiti } from "jiti";
|
|
21
|
-
import { parseJSON5 } from "confbox";
|
|
22
|
+
import { parseJSON5, parseJSONC } from "confbox";
|
|
22
23
|
import * as fs$1 from "node:fs/promises";
|
|
23
24
|
import { PassThrough } from "node:stream";
|
|
24
25
|
import { convertToTSX } from "@astrojs/compiler/sync";
|
|
@@ -1883,7 +1884,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1883
1884
|
module.exports = picomatch;
|
|
1884
1885
|
}));
|
|
1885
1886
|
//#endregion
|
|
1886
|
-
//#region ../core/dist/collect-unplugin-auto-import-global-scopes-
|
|
1887
|
+
//#region ../core/dist/collect-unplugin-auto-import-global-scopes-hOS9iAJg.js
|
|
1887
1888
|
var import_picomatch = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1888
1889
|
const pico = require_picomatch$1();
|
|
1889
1890
|
const utils = require_utils();
|
|
@@ -2397,6 +2398,74 @@ const compileGlobPatternsLenient = (patterns, onInvalid) => {
|
|
|
2397
2398
|
}
|
|
2398
2399
|
return compiled;
|
|
2399
2400
|
};
|
|
2401
|
+
const isOxcAstNode = (value) => Boolean(value) && typeof value === "object" && typeof value.type === "string";
|
|
2402
|
+
const getStaticModuleSpecifier = (value) => {
|
|
2403
|
+
if (!isOxcAstNode(value)) return void 0;
|
|
2404
|
+
if (typeof value.value === "string") return value.value;
|
|
2405
|
+
if (value.type === "TemplateLiteral" && Array.isArray(value.expressions) && value.expressions.length === 0 && Array.isArray(value.quasis) && isOxcAstNode(value.quasis[0]) && value.quasis[0].value && typeof value.quasis[0].value === "object" && "cooked" in value.quasis[0].value && typeof value.quasis[0].value.cooked === "string") return value.quasis[0].value.cooked;
|
|
2406
|
+
};
|
|
2407
|
+
const collectStaticModuleSpecifiers = (sourceText, options = {}) => {
|
|
2408
|
+
const { filePath = "module.tsx", includeTypeOnly = true } = options;
|
|
2409
|
+
const parsedModule = parseSync(filePath, sourceText, { sourceType: "unambiguous" });
|
|
2410
|
+
const moduleSpecifiers = /* @__PURE__ */ new Set();
|
|
2411
|
+
const addSpecifier = (value) => {
|
|
2412
|
+
const moduleSpecifier = getStaticModuleSpecifier(value);
|
|
2413
|
+
if (moduleSpecifier) moduleSpecifiers.add(moduleSpecifier);
|
|
2414
|
+
};
|
|
2415
|
+
const visitNode = (value) => {
|
|
2416
|
+
if (Array.isArray(value)) {
|
|
2417
|
+
for (const child of value) visitNode(child);
|
|
2418
|
+
return;
|
|
2419
|
+
}
|
|
2420
|
+
if (!isOxcAstNode(value)) return;
|
|
2421
|
+
if (value.type === "ImportDeclaration") {
|
|
2422
|
+
const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
|
|
2423
|
+
const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.importKind !== "type");
|
|
2424
|
+
if (includeTypeOnly || value.importKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
|
|
2425
|
+
} else if (value.type === "ExportNamedDeclaration") {
|
|
2426
|
+
const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
|
|
2427
|
+
const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.exportKind !== "type");
|
|
2428
|
+
if (includeTypeOnly || value.exportKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
|
|
2429
|
+
} else if (value.type === "ExportAllDeclaration" || value.type === "ImportExpression") {
|
|
2430
|
+
if (includeTypeOnly || value.exportKind !== "type") addSpecifier(value.source);
|
|
2431
|
+
} else if (value.type === "TSImportType") {
|
|
2432
|
+
if (includeTypeOnly) addSpecifier(value.source);
|
|
2433
|
+
} else if (value.type === "TSExternalModuleReference") addSpecifier(value.expression);
|
|
2434
|
+
else if (value.type === "CallExpression" && isOxcAstNode(value.callee) && value.callee.type === "Identifier" && value.callee.name === "require" && Array.isArray(value.arguments) && value.arguments.length > 0) addSpecifier(value.arguments[0]);
|
|
2435
|
+
for (const child of Object.values(value)) visitNode(child);
|
|
2436
|
+
};
|
|
2437
|
+
visitNode(parsedModule.program);
|
|
2438
|
+
return moduleSpecifiers;
|
|
2439
|
+
};
|
|
2440
|
+
const toPosixPath = (filePath) => filePath.replace(/\\/g, "/");
|
|
2441
|
+
const isPathInsideDirectoryOrEqual = (candidatePath, directoryPath) => {
|
|
2442
|
+
const normalizedCandidatePath = posix.normalize(toPosixPath(candidatePath));
|
|
2443
|
+
const normalizedDirectoryPath = posix.normalize(toPosixPath(directoryPath));
|
|
2444
|
+
const relativePath = posix.relative(normalizedDirectoryPath, normalizedCandidatePath);
|
|
2445
|
+
return relativePath === "" || relativePath !== ".." && !relativePath.startsWith("../") && !posix.isAbsolute(relativePath);
|
|
2446
|
+
};
|
|
2447
|
+
const RESOLVABLE_EXTENSIONS = [
|
|
2448
|
+
".ts",
|
|
2449
|
+
".tsx",
|
|
2450
|
+
".js",
|
|
2451
|
+
".jsx",
|
|
2452
|
+
".mjs",
|
|
2453
|
+
".mts",
|
|
2454
|
+
".cjs",
|
|
2455
|
+
".cts",
|
|
2456
|
+
".es6"
|
|
2457
|
+
];
|
|
2458
|
+
const resolveEntryWithExtensions = (basePath) => {
|
|
2459
|
+
if (existsSync(basePath)) return basePath;
|
|
2460
|
+
for (const extension of RESOLVABLE_EXTENSIONS) {
|
|
2461
|
+
const withExtension = basePath + extension;
|
|
2462
|
+
if (existsSync(withExtension)) return withExtension;
|
|
2463
|
+
}
|
|
2464
|
+
for (const extension of RESOLVABLE_EXTENSIONS) {
|
|
2465
|
+
const indexCandidate = join(basePath, `index${extension}`);
|
|
2466
|
+
if (existsSync(indexCandidate)) return indexCandidate;
|
|
2467
|
+
}
|
|
2468
|
+
};
|
|
2400
2469
|
/**
|
|
2401
2470
|
* Resolves a path to its canonical, symlink-free form, falling back to
|
|
2402
2471
|
* the input when it cannot be realpath'd (broken symlink, permission
|
|
@@ -53517,7 +53586,7 @@ const await_ = fiberAwait;
|
|
|
53517
53586
|
* @category combinators
|
|
53518
53587
|
* @since 2.0.0
|
|
53519
53588
|
*/
|
|
53520
|
-
const join = fiberJoin;
|
|
53589
|
+
const join$1 = fiberJoin;
|
|
53521
53590
|
/**
|
|
53522
53591
|
* Interrupts a fiber, causing it to stop executing and clean up any
|
|
53523
53592
|
* acquired resources.
|
|
@@ -55514,7 +55583,7 @@ const mapEffectConcurrent = (self, f, options) => fromTransformBracket(fnUntrace
|
|
|
55514
55583
|
const fiber = runFork(f(value, i++));
|
|
55515
55584
|
trackFiber(fiber);
|
|
55516
55585
|
fiber.addObserver(onExit);
|
|
55517
|
-
return offer(effects, join(fiber));
|
|
55586
|
+
return offer(effects, join$1(fiber));
|
|
55518
55587
|
}), forever({ disableYield: true }), catchCause$1((cause) => offer(effects, failCause$3(cause)).pipe(andThen(failCause$1(effects, cause)))), forkIn(forkedScope));
|
|
55519
55588
|
}
|
|
55520
55589
|
return take(queue);
|
|
@@ -55840,9 +55909,9 @@ const mergeAll = /* @__PURE__ */ dual(2, (channels, { bufferSize = 16, concurren
|
|
|
55840
55909
|
if (semaphore) if (fibers.size < concurrencyN) yield* semaphore.take(1);
|
|
55841
55910
|
else {
|
|
55842
55911
|
pullFiber = yield* forkChild(pull);
|
|
55843
|
-
yield* raceFirst(semaphore.take(1), andThen(join(pullFiber), never));
|
|
55912
|
+
yield* raceFirst(semaphore.take(1), andThen(join$1(pullFiber), never));
|
|
55844
55913
|
}
|
|
55845
|
-
const channel = pullFiber === void 0 ? yield* pull : yield* join(pullFiber);
|
|
55914
|
+
const channel = pullFiber === void 0 ? yield* pull : yield* join$1(pullFiber);
|
|
55846
55915
|
const childScope = forkUnsafe(forkedScope);
|
|
55847
55916
|
const childPull = yield* toTransform(channel)(upstream, childScope);
|
|
55848
55917
|
while (fibers.size >= concurrencyN) {
|
|
@@ -69575,6 +69644,28 @@ const checkExpoEnvLocalFiles = (context) => {
|
|
|
69575
69644
|
help: `Add \`.env*.local\` to your .gitignore. If already committed, untrack with \`git rm --cached ${committedEnvFiles.join(" ")}\``
|
|
69576
69645
|
})];
|
|
69577
69646
|
};
|
|
69647
|
+
const JAVASCRIPT_MODULE_FILE_PATTERN = /\.[cm]?[jt]sx?$/;
|
|
69648
|
+
const hasStaticModuleSubpath = (rootDirectory, packageName) => {
|
|
69649
|
+
const packageSubpathPrefix = `${packageName}/`;
|
|
69650
|
+
for (const { absolutePath, name } of walkSourceTreeFiles(rootDirectory)) {
|
|
69651
|
+
if (!JAVASCRIPT_MODULE_FILE_PATTERN.test(name)) continue;
|
|
69652
|
+
let sourceText;
|
|
69653
|
+
try {
|
|
69654
|
+
sourceText = fs$1$3.readFileSync(absolutePath, "utf-8");
|
|
69655
|
+
} catch {
|
|
69656
|
+
continue;
|
|
69657
|
+
}
|
|
69658
|
+
if (!sourceText.includes(packageSubpathPrefix)) continue;
|
|
69659
|
+
let moduleSpecifiers;
|
|
69660
|
+
try {
|
|
69661
|
+
moduleSpecifiers = collectStaticModuleSpecifiers(sourceText, { filePath: absolutePath });
|
|
69662
|
+
} catch {
|
|
69663
|
+
continue;
|
|
69664
|
+
}
|
|
69665
|
+
for (const moduleSpecifier of moduleSpecifiers) if (moduleSpecifier.startsWith(packageSubpathPrefix)) return true;
|
|
69666
|
+
}
|
|
69667
|
+
return false;
|
|
69668
|
+
};
|
|
69578
69669
|
const isExpoSdkAtLeast = (expoSdkMajor, minMajor) => expoSdkMajor !== null && expoSdkMajor >= minMajor;
|
|
69579
69670
|
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";
|
|
69580
69671
|
const FIREBASE_HELP = "Use the Firebase JS SDK or React Native Firebase directly. See https://expo.fyi/firebase-migration-guide";
|
|
@@ -69628,7 +69719,8 @@ const FLAGGED_DEPENDENCIES = [
|
|
|
69628
69719
|
packageName: "@expo/metro-config",
|
|
69629
69720
|
rule: "expo-no-redundant-dependency",
|
|
69630
69721
|
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",
|
|
69631
|
-
help: "Remove `@expo/metro-config` and import `expo/metro-config` in your metro.config.js"
|
|
69722
|
+
help: "Remove `@expo/metro-config` and import `expo/metro-config` in your metro.config.js",
|
|
69723
|
+
skipWhenSubpathImported: true
|
|
69632
69724
|
},
|
|
69633
69725
|
{
|
|
69634
69726
|
packageName: "@types/react-native",
|
|
@@ -69689,8 +69781,9 @@ const FLAGGED_DEPENDENCIES = [
|
|
|
69689
69781
|
];
|
|
69690
69782
|
const checkExpoFlaggedDependencies = (context) => FLAGGED_DEPENDENCIES.filter((flaggedDependency) => {
|
|
69691
69783
|
if (!context.directDependencyNames.has(flaggedDependency.packageName)) return false;
|
|
69692
|
-
if (flaggedDependency.minSdkMajor
|
|
69693
|
-
|
|
69784
|
+
if (flaggedDependency.minSdkMajor !== void 0 && !isExpoSdkAtLeast(context.expoSdkMajor, flaggedDependency.minSdkMajor)) return false;
|
|
69785
|
+
if (flaggedDependency.skipWhenSubpathImported && hasStaticModuleSubpath(context.rootDirectory, flaggedDependency.packageName)) return false;
|
|
69786
|
+
return true;
|
|
69694
69787
|
}).map((flaggedDependency) => buildExpoDiagnostic({
|
|
69695
69788
|
rule: flaggedDependency.rule,
|
|
69696
69789
|
message: flaggedDependency.message,
|
|
@@ -69759,18 +69852,58 @@ const METRO_CONFIG_FILE_NAMES = [
|
|
|
69759
69852
|
const EXPO_METRO_CONFIG_EXTEND_SIGNALS = [
|
|
69760
69853
|
"expo/metro-config",
|
|
69761
69854
|
"@sentry/react-native/metro",
|
|
69762
|
-
"getSentryExpoConfig"
|
|
69855
|
+
"getSentryExpoConfig",
|
|
69856
|
+
"posthog-react-native/metro",
|
|
69857
|
+
"getPostHogExpoConfig"
|
|
69763
69858
|
];
|
|
69859
|
+
const resolveLocalMetroConfigModule = (moduleSpecifier, importingFilePath, rootDirectory) => {
|
|
69860
|
+
if (!moduleSpecifier.startsWith(".")) return void 0;
|
|
69861
|
+
const importedPath = path$1$1.resolve(path$1$1.dirname(importingFilePath), moduleSpecifier);
|
|
69862
|
+
const candidateBasePaths = [
|
|
69863
|
+
importedPath,
|
|
69864
|
+
importedPath.replace(/\.[cm]?js$/, ""),
|
|
69865
|
+
path$1$1.join(importedPath, "index")
|
|
69866
|
+
];
|
|
69867
|
+
for (const candidateBasePath of candidateBasePaths) {
|
|
69868
|
+
const resolvedPath = resolveEntryWithExtensions(candidateBasePath);
|
|
69869
|
+
if (resolvedPath !== void 0 && isFile(resolvedPath) && isPathInsideDirectoryOrEqual(resolvedPath, rootDirectory)) return resolvedPath;
|
|
69870
|
+
}
|
|
69871
|
+
};
|
|
69872
|
+
const hasExpoMetroConfigSignal = (metroConfigPath, rootDirectory) => {
|
|
69873
|
+
const pendingFilePaths = [metroConfigPath];
|
|
69874
|
+
const visitedFilePaths = /* @__PURE__ */ new Set();
|
|
69875
|
+
while (pendingFilePaths.length > 0) {
|
|
69876
|
+
const currentFilePath = pendingFilePaths.pop();
|
|
69877
|
+
if (currentFilePath === void 0 || visitedFilePaths.has(currentFilePath)) continue;
|
|
69878
|
+
if (visitedFilePaths.size >= 100) return true;
|
|
69879
|
+
visitedFilePaths.add(currentFilePath);
|
|
69880
|
+
let contents;
|
|
69881
|
+
try {
|
|
69882
|
+
contents = fs$1$3.readFileSync(currentFilePath, "utf-8");
|
|
69883
|
+
} catch {
|
|
69884
|
+
return true;
|
|
69885
|
+
}
|
|
69886
|
+
if (EXPO_METRO_CONFIG_EXTEND_SIGNALS.some((signal) => contents.includes(signal))) return true;
|
|
69887
|
+
let moduleSpecifiers;
|
|
69888
|
+
try {
|
|
69889
|
+
moduleSpecifiers = collectStaticModuleSpecifiers(contents, {
|
|
69890
|
+
filePath: currentFilePath,
|
|
69891
|
+
includeTypeOnly: false
|
|
69892
|
+
});
|
|
69893
|
+
} catch {
|
|
69894
|
+
continue;
|
|
69895
|
+
}
|
|
69896
|
+
for (const moduleSpecifier of moduleSpecifiers) {
|
|
69897
|
+
const localModulePath = resolveLocalMetroConfigModule(moduleSpecifier, currentFilePath, rootDirectory);
|
|
69898
|
+
if (localModulePath !== void 0 && !visitedFilePaths.has(localModulePath)) pendingFilePaths.push(localModulePath);
|
|
69899
|
+
}
|
|
69900
|
+
}
|
|
69901
|
+
return false;
|
|
69902
|
+
};
|
|
69764
69903
|
const checkExpoMetroConfig = (context) => {
|
|
69765
69904
|
const metroConfigPath = METRO_CONFIG_FILE_NAMES.map((fileName) => path$1$1.join(context.rootDirectory, fileName)).find((candidatePath) => isFile(candidatePath));
|
|
69766
69905
|
if (metroConfigPath === void 0) return [];
|
|
69767
|
-
|
|
69768
|
-
try {
|
|
69769
|
-
contents = fs$1$3.readFileSync(metroConfigPath, "utf-8");
|
|
69770
|
-
} catch {
|
|
69771
|
-
return [];
|
|
69772
|
-
}
|
|
69773
|
-
if (EXPO_METRO_CONFIG_EXTEND_SIGNALS.some((signal) => contents.includes(signal))) return [];
|
|
69906
|
+
if (hasExpoMetroConfigSignal(metroConfigPath, context.rootDirectory)) return [];
|
|
69774
69907
|
return [buildExpoDiagnostic({
|
|
69775
69908
|
rule: "expo-metro-config",
|
|
69776
69909
|
filePath: path$1$1.basename(metroConfigPath),
|
|
@@ -73025,59 +73158,11 @@ const isLocalPathExtend = (entry) => {
|
|
|
73025
73158
|
for (const prefix of EXTENDS_LOCAL_PATH_PREFIXES) if (entry.startsWith(prefix)) return true;
|
|
73026
73159
|
return false;
|
|
73027
73160
|
};
|
|
73028
|
-
const stripJsoncComments = (raw) => {
|
|
73029
|
-
let result = "";
|
|
73030
|
-
let cursor = 0;
|
|
73031
|
-
let inString = false;
|
|
73032
|
-
let stringQuote = "";
|
|
73033
|
-
while (cursor < raw.length) {
|
|
73034
|
-
const character = raw[cursor];
|
|
73035
|
-
const nextCharacter = raw[cursor + 1];
|
|
73036
|
-
if (inString) {
|
|
73037
|
-
result += character;
|
|
73038
|
-
if (character === "\\" && cursor + 1 < raw.length) {
|
|
73039
|
-
result += nextCharacter;
|
|
73040
|
-
cursor += 2;
|
|
73041
|
-
continue;
|
|
73042
|
-
}
|
|
73043
|
-
if (character === stringQuote) inString = false;
|
|
73044
|
-
cursor += 1;
|
|
73045
|
-
continue;
|
|
73046
|
-
}
|
|
73047
|
-
if (character === "\"" || character === "'") {
|
|
73048
|
-
inString = true;
|
|
73049
|
-
stringQuote = character;
|
|
73050
|
-
result += character;
|
|
73051
|
-
cursor += 1;
|
|
73052
|
-
continue;
|
|
73053
|
-
}
|
|
73054
|
-
if (character === "/" && nextCharacter === "/") {
|
|
73055
|
-
const lineEndIndex = raw.indexOf("\n", cursor);
|
|
73056
|
-
cursor = lineEndIndex === -1 ? raw.length : lineEndIndex;
|
|
73057
|
-
continue;
|
|
73058
|
-
}
|
|
73059
|
-
if (character === "/" && nextCharacter === "*") {
|
|
73060
|
-
const blockEndIndex = raw.indexOf("*/", cursor + 2);
|
|
73061
|
-
cursor = blockEndIndex === -1 ? raw.length : blockEndIndex + 2;
|
|
73062
|
-
continue;
|
|
73063
|
-
}
|
|
73064
|
-
result += character;
|
|
73065
|
-
cursor += 1;
|
|
73066
|
-
}
|
|
73067
|
-
return result;
|
|
73068
|
-
};
|
|
73069
|
-
const parseJsonOrJsonc = (raw) => {
|
|
73070
|
-
try {
|
|
73071
|
-
return JSON.parse(raw);
|
|
73072
|
-
} catch {
|
|
73073
|
-
return JSON.parse(stripJsoncComments(raw));
|
|
73074
|
-
}
|
|
73075
|
-
};
|
|
73076
73161
|
const canOxlintExtendConfig = (configPath) => {
|
|
73077
73162
|
if (!configPath.endsWith(".eslintrc.json")) return true;
|
|
73078
73163
|
let parsed;
|
|
73079
73164
|
try {
|
|
73080
|
-
parsed =
|
|
73165
|
+
parsed = parseJSONC(fs$1$3.readFileSync(configPath, "utf-8"), { allowTrailingComma: true });
|
|
73081
73166
|
} catch {
|
|
73082
73167
|
return true;
|
|
73083
73168
|
}
|
|
@@ -73189,6 +73274,25 @@ const detectUserLintConfigPaths = (rootDirectory) => {
|
|
|
73189
73274
|
}
|
|
73190
73275
|
return [];
|
|
73191
73276
|
};
|
|
73277
|
+
const readAdoptedLintConfigSettings = (configPaths) => {
|
|
73278
|
+
const mergedSettings = /* @__PURE__ */ new Map();
|
|
73279
|
+
for (const configPath of configPaths) {
|
|
73280
|
+
let parsed;
|
|
73281
|
+
try {
|
|
73282
|
+
parsed = parseJSONC(fs$1$3.readFileSync(configPath, "utf-8"), { allowTrailingComma: true });
|
|
73283
|
+
} catch {
|
|
73284
|
+
continue;
|
|
73285
|
+
}
|
|
73286
|
+
if (!isPlainObject(parsed)) continue;
|
|
73287
|
+
const settings = parsed.settings;
|
|
73288
|
+
if (!isPlainObject(settings)) continue;
|
|
73289
|
+
for (const [pluginName, pluginSettings] of Object.entries(settings)) {
|
|
73290
|
+
if (pluginName === "react-doctor") continue;
|
|
73291
|
+
mergedSettings.set(pluginName, pluginSettings);
|
|
73292
|
+
}
|
|
73293
|
+
}
|
|
73294
|
+
return Object.fromEntries(mergedSettings);
|
|
73295
|
+
};
|
|
73192
73296
|
const DISABLE_DIRECTIVE_PATTERN = /(eslint|oxlint)-disable/;
|
|
73193
73297
|
const getBackupRootDirectory = (rootDirectory) => path$1$1.join(rootDirectory, ...DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS);
|
|
73194
73298
|
const getBackupPath = (rootDirectory, absolutePath) => {
|
|
@@ -73585,7 +73689,7 @@ const buildUserPluginRules = (userPlugin, severityControls) => {
|
|
|
73585
73689
|
}
|
|
73586
73690
|
return enabled;
|
|
73587
73691
|
};
|
|
73588
|
-
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 }) => {
|
|
73692
|
+
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 }) => {
|
|
73589
73693
|
const hasIncludedTags = includedTags.size > 0;
|
|
73590
73694
|
const reactHooksJsPlugin = disableReactHooksJsPlugin || ruleSelection === "sidecar" || hasIncludedTags ? null : resolveReactHooksJsPlugin(project.hasReactCompiler || project.hasReactCompilerLintPlugin === true, customRulesOnly);
|
|
73591
73695
|
const reactCompilerRules = reactHooksJsPlugin ? applyRuleSeverityControls(filterRulesToAvailable(REACT_COMPILER_RULES, "react-hooks-js", reactHooksJsPlugin.availableRuleNames), severityControls) : {};
|
|
@@ -73640,23 +73744,26 @@ const createOxlintConfig = ({ pluginPath, project, customRulesOnly = false, exte
|
|
|
73640
73744
|
},
|
|
73641
73745
|
plugins: [],
|
|
73642
73746
|
jsPlugins: [...jsPlugins, pluginPath],
|
|
73643
|
-
settings: {
|
|
73644
|
-
|
|
73645
|
-
|
|
73646
|
-
|
|
73647
|
-
|
|
73648
|
-
|
|
73649
|
-
|
|
73650
|
-
|
|
73651
|
-
unpluginAutoImportGlobalScopes
|
|
73652
|
-
|
|
73653
|
-
|
|
73654
|
-
|
|
73655
|
-
|
|
73656
|
-
|
|
73657
|
-
|
|
73658
|
-
|
|
73659
|
-
|
|
73747
|
+
settings: {
|
|
73748
|
+
...adoptedSettings,
|
|
73749
|
+
"react-doctor": {
|
|
73750
|
+
portedRuleMode: "curated",
|
|
73751
|
+
framework: project.framework,
|
|
73752
|
+
rootDirectory: settingsRootDirectory,
|
|
73753
|
+
capabilities: [...capabilities].sort(),
|
|
73754
|
+
...runtimeGlobals && runtimeGlobals.length > 0 ? { runtimeGlobals: [...runtimeGlobals] } : {},
|
|
73755
|
+
...unpluginAutoImportGlobalScopes && unpluginAutoImportGlobalScopes.length > 0 ? {
|
|
73756
|
+
unpluginAutoImportRootDirectories: [...new Set([settingsRootDirectory, project.rootDirectory])],
|
|
73757
|
+
unpluginAutoImportGlobalScopes: unpluginAutoImportGlobalScopes.map((scope) => ({
|
|
73758
|
+
directory: scope.directory,
|
|
73759
|
+
names: [...scope.names]
|
|
73760
|
+
}))
|
|
73761
|
+
} : {},
|
|
73762
|
+
...project.shopifyFlashListMajorVersion !== null ? { shopifyFlashListMajorVersion: project.shopifyFlashListMajorVersion } : {},
|
|
73763
|
+
...serverAuthFunctionNames && serverAuthFunctionNames.length > 0 ? { serverAuthFunctionNames: [...serverAuthFunctionNames] } : {},
|
|
73764
|
+
...projectIndexModuleSources !== void 0 ? { projectIndexModuleSources: [...projectIndexModuleSources] } : {}
|
|
73765
|
+
}
|
|
73766
|
+
},
|
|
73660
73767
|
rules: {
|
|
73661
73768
|
...reactCompilerRules,
|
|
73662
73769
|
...enabledReactDoctorRules,
|
|
@@ -75765,7 +75872,9 @@ const runOxlint = async (options) => {
|
|
|
75765
75872
|
return [];
|
|
75766
75873
|
}
|
|
75767
75874
|
const pluginPath = resolvePluginPath();
|
|
75768
|
-
const
|
|
75875
|
+
const detectedConfigPaths = adoptExistingLintConfig && !customRulesOnly ? detectUserLintConfigPaths(rootDirectory) : [];
|
|
75876
|
+
const extendsPaths = detectedConfigPaths.filter(canOxlintExtendConfig);
|
|
75877
|
+
const adoptedSettings = detectedConfigPaths.length > 0 ? readAdoptedLintConfigSettings(detectedConfigPaths) : {};
|
|
75769
75878
|
const userPlugins = includedTags.size > 0 ? [] : resolveUserPlugins(userConfig?.plugins, configSourceDirectory);
|
|
75770
75879
|
const restoreDisableDirectives = await neutralizeDisableDirectives(rootDirectory, includePaths ?? options.precomputedSourceFiles?.map((sourceFile) => sourceFile.path), { recoverOnly: respectInlineDisables });
|
|
75771
75880
|
const configDirectory = fs$1$3.mkdtempSync(path$1$1.join(os.tmpdir(), "react-doctor-oxlintrc-"));
|
|
@@ -75827,6 +75936,7 @@ const runOxlint = async (options) => {
|
|
|
75827
75936
|
serverAuthFunctionNames,
|
|
75828
75937
|
projectIndexModuleSources,
|
|
75829
75938
|
severityControls,
|
|
75939
|
+
adoptedSettings,
|
|
75830
75940
|
userPlugins,
|
|
75831
75941
|
disableReactHooksJsPlugin: overrides.disableReactHooksJsPlugin,
|
|
75832
75942
|
ruleSelection: overrides.ruleSelection,
|
|
@@ -77209,9 +77319,9 @@ const runInspect = (input, hooks = {}) => gen(function* () {
|
|
|
77209
77319
|
if (!lintFailureState.didFail) if (maintainabilityFailureState.didFail) yield* scanProgress.fail(MAINTAINABILITY_FAIL_TEXT);
|
|
77210
77320
|
else if (input.suppressScanSummary) yield* scanProgress.stop();
|
|
77211
77321
|
else yield* scanProgress.succeed(`Scanned ${scannedFilesLabel} in ${scanElapsedSeconds}s${workerCountSuffix}`);
|
|
77212
|
-
const supplyChainResult = yield* join(supplyChainFiber);
|
|
77322
|
+
const supplyChainResult = yield* join$1(supplyChainFiber);
|
|
77213
77323
|
const supplyChainCollected = supplyChainResult.diagnostics;
|
|
77214
|
-
const securityScanCollected = yield* join(securityScanFiber);
|
|
77324
|
+
const securityScanCollected = yield* join$1(securityScanFiber);
|
|
77215
77325
|
yield* reporterService.finalize;
|
|
77216
77326
|
const finalDiagnostics = sortDiagnosticsStable(assignFixGroups([
|
|
77217
77327
|
...envCollected,
|
|
@@ -77220,7 +77330,7 @@ const runInspect = (input, hooks = {}) => gen(function* () {
|
|
|
77220
77330
|
...lintCollected,
|
|
77221
77331
|
...maintainabilityCollected
|
|
77222
77332
|
]));
|
|
77223
|
-
const githubViewerPermission = yield* join(githubViewerPermissionFiber);
|
|
77333
|
+
const githubViewerPermission = yield* join$1(githubViewerPermissionFiber);
|
|
77224
77334
|
const scoreMetadata = {
|
|
77225
77335
|
...repo !== null ? { repo } : {},
|
|
77226
77336
|
...sha !== null ? { sha } : {},
|
|
@@ -78070,4 +78180,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
78070
78180
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
78071
78181
|
|
|
78072
78182
|
//# sourceMappingURL=index.js.map
|
|
78073
|
-
//# debugId=
|
|
78183
|
+
//# debugId=99fcede8-f7dd-50eb-a707-599a7e94811f
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
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-
|
|
4
|
-
import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-
|
|
5
|
-
import { r as flushSentry } from "./build-section-divider-
|
|
6
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
7
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
8
|
-
import { A as runGitRaw, M as cliLogger, c as spinner, i as hasDoctorScript, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-
|
|
9
|
-
import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-
|
|
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-
|
|
11
|
-
import { t as shouldSkipPrompts } from "./should-skip-prompts-
|
|
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-
|
|
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-
|
|
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-
|
|
15
|
-
import { t as readObjectFile } from "./read-object-file-
|
|
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]="96644fd9-9de5-59f5-9d36-10b576f3d76b")}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-BM82PBSe.js";
|
|
4
|
+
import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-DbSLLSa0.js";
|
|
5
|
+
import { r as flushSentry } from "./build-section-divider-Rtaiowhy.js";
|
|
6
|
+
import { n as handleUserError, t as handleError } from "./handle-error-D1wDDJF-.js";
|
|
7
|
+
import { t as reportErrorToSentry } from "./report-error-CZHQUNh4.js";
|
|
8
|
+
import { A as runGitRaw, M as cliLogger, c as spinner, i as hasDoctorScript, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-JE3JnnQc.js";
|
|
9
|
+
import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-BdY3qY2f.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-Bnf4Y4EW.js";
|
|
11
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-CQyO96OW.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-DXLurKbC.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-xEGmAMA7.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-BMn0_WV6.js";
|
|
15
|
+
import { t as readObjectFile } from "./read-object-file-CRpKojJA.js";
|
|
16
16
|
import * as path$1 from "node:path";
|
|
17
17
|
import * as fs$1 from "node:fs";
|
|
18
18
|
import { tmpdir } from "node:os";
|
|
@@ -1441,5 +1441,5 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
|
|
|
1441
1441
|
//#endregion
|
|
1442
1442
|
export { warnDeprecatedFailOn as n, runProjectMigrations as r, inspectAction as t };
|
|
1443
1443
|
|
|
1444
|
-
//# sourceMappingURL=inspect-
|
|
1445
|
-
//# debugId=
|
|
1444
|
+
//# sourceMappingURL=inspect-FuGxonlI.js.map
|
|
1445
|
+
//# debugId=96644fd9-9de5-59f5-9d36-10b576f3d76b
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { T as METRIC, t as recordCount, zn as runSync } from "./record-metric-
|
|
4
|
-
import { r as isExpectedUserError } from "./telemetry-runtime-
|
|
5
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
6
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
7
|
-
import { t as printBrandedHeader } from "./print-branded-header-
|
|
8
|
-
import { n as runInstallReactDoctor } from "./install-react-doctor-
|
|
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]="0ffcb429-fe02-569d-8d27-a5b5f23bf210")}catch(e){}}();
|
|
3
|
+
import { T as METRIC, t as recordCount, zn as runSync } from "./record-metric-BM82PBSe.js";
|
|
4
|
+
import { r as isExpectedUserError } from "./telemetry-runtime-DbSLLSa0.js";
|
|
5
|
+
import { n as handleUserError, t as handleError } from "./handle-error-D1wDDJF-.js";
|
|
6
|
+
import { t as reportErrorToSentry } from "./report-error-CZHQUNh4.js";
|
|
7
|
+
import { t as printBrandedHeader } from "./print-branded-header-BmI9tLH6.js";
|
|
8
|
+
import { n as runInstallReactDoctor } from "./install-react-doctor-BMn0_WV6.js";
|
|
9
9
|
//#region src/cli/commands/install.ts
|
|
10
10
|
const installAction = async (options, command) => {
|
|
11
11
|
recordCount(METRIC.cliInvoked, 1, { command: "install" });
|
|
@@ -29,5 +29,5 @@ const installAction = async (options, command) => {
|
|
|
29
29
|
//#endregion
|
|
30
30
|
export { installAction };
|
|
31
31
|
|
|
32
|
-
//# sourceMappingURL=install-
|
|
33
|
-
//# debugId=
|
|
32
|
+
//# sourceMappingURL=install-DMK7JRVX.js.map
|
|
33
|
+
//# debugId=0ffcb429-fe02-569d-8d27-a5b5f23bf210
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { B as isNonInteractiveEnvironment, Cn as error$1, En as warn, Kt as highlighter, Tn as log, k as RUN_GIT_MAX_BUFFER_BYTES, wn as info$1, zn as runSync } from "./record-metric-
|
|
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]="028a8c54-9e6f-54af-90f9-9bf38ab866f1")}catch(e){}}();
|
|
3
|
+
import { B as isNonInteractiveEnvironment, Cn as error$1, En as warn, Kt as highlighter, Tn as log, k as RUN_GIT_MAX_BUFFER_BYTES, wn as info$1, zn as runSync } from "./record-metric-BM82PBSe.js";
|
|
4
4
|
import { a as chalk, i as stripAnsi, t as eastAsianWidth } from "./get-east-asian-width-Cglw13G7.js";
|
|
5
5
|
import { execFileSync } from "node:child_process";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
@@ -2805,5 +2805,5 @@ const installReactDoctorScriptStep = (projectRoot) => {
|
|
|
2805
2805
|
//#endregion
|
|
2806
2806
|
export { runGitRaw as A, isRecord as C, readPackageJson as D, packageHasRecordKey as E, cliLogger as M, resolveGitPath as O, getPackageJsonPath as S, packageHasNestedRecordKey as T, REACT_DOCTOR_COMMAND as _, installReactDoctorScriptStep as a, VITE_PLUS_HOOKS_PATH as b, spinner as c, HUSKY_HOOKS_PATH as d, LEFTHOOK_CONFIG_FILES as f, PRE_COMMIT_CONFIG_FILE as g, OVERCOMMIT_CONFIG_FILE as h, hasDoctorScript as i, writeJsonFile as j, runGit as k, HOOK_FILE_NAME as l, NON_BLOCKING_REACT_DOCTOR_COMMAND as m, findNearestPackageDirectory as n, isSpinnerSilent as o, LEGACY_HOOK_RUNNER_RELATIVE_PATH as p, hasDoctorDependency as r, setSpinnerSilent as s, DOCTOR_PACKAGE_NAME as t, HOOK_RELATIVE_PATH as u, SIMPLE_GIT_HOOKS_CONFIG_FILE as v, packageHasDependency as w, ensureTrailingNewline as x, SIMPLE_GIT_HOOKS_PACKAGE_JSON_KEY as y };
|
|
2807
2807
|
|
|
2808
|
-
//# sourceMappingURL=install-doctor-script-
|
|
2809
|
-
//# debugId=
|
|
2808
|
+
//# sourceMappingURL=install-doctor-script-JE3JnnQc.js.map
|
|
2809
|
+
//# debugId=028a8c54-9e6f-54af-90f9-9bf38ab866f1
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { w as GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS } from "./record-metric-
|
|
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]="c92e88ce-3e5c-5aa8-94cb-102feb9130a0")}catch(e){}}();
|
|
3
|
+
import { w as GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS } from "./record-metric-BM82PBSe.js";
|
|
4
4
|
import { t as unrefStdin } from "./unref-stdin-BKT_s38a.js";
|
|
5
|
-
import { M as cliLogger } from "./install-doctor-script-
|
|
5
|
+
import { M as cliLogger } from "./install-doctor-script-JE3JnnQc.js";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import { execFile } from "node:child_process";
|
|
8
8
|
import * as path$1 from "node:path";
|
|
@@ -183,6 +183,10 @@ jobs:
|
|
|
183
183
|
# the gate: uncomment the block below and set blocking to "error" (fail
|
|
184
184
|
# on new error-severity findings) or "warning" (fail on any finding).
|
|
185
185
|
# Full reference: https://www.react.doctor/ci
|
|
186
|
+
#
|
|
187
|
+
# Security: @v2 is a floating major tag that may move. For supply-chain-
|
|
188
|
+
# hardened CI, pin to a full commit SHA with a version comment instead:
|
|
189
|
+
# uses: millionco/react-doctor@<sha> # v2.x.x
|
|
186
190
|
# with:
|
|
187
191
|
# blocking: error # Gate level: "none" (advisory, the default) | "warning" | "error"
|
|
188
192
|
# scope: full # On PRs, scan the whole project instead of just changed files
|
|
@@ -263,5 +267,5 @@ const upgradeReactDoctorWorkflowInPlace = (projectRoot) => {
|
|
|
263
267
|
//#endregion
|
|
264
268
|
export { readReactDoctorWorkflow as a, workflowUsesV1Action as c, detectDefaultBranch as d, runCommand as f, isReactDoctorWorkflowInstalled as i, prompts as l, getReactDoctorWorkflowPath as n, upgradeReactDoctorWorkflowInPlace as o, installReactDoctorWorkflow as r, upgradeWorkflowActionToV2 as s, buildWorkflowContent as t, isCommandAvailable as u };
|
|
265
269
|
|
|
266
|
-
//# sourceMappingURL=install-github-workflow-
|
|
267
|
-
//# debugId=
|
|
270
|
+
//# sourceMappingURL=install-github-workflow-BdY3qY2f.js.map
|
|
271
|
+
//# debugId=c92e88ce-3e5c-5aa8-94cb-102feb9130a0
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { C as CI_TRUST_COMPANIES, Kt as highlighter, T as METRIC, br as isErrnoException, cr as GITHUB_ACTIONS_SETUP_URL, gr as SKILL_NAME, t as recordCount, z as CliInputError } from "./record-metric-
|
|
4
|
-
import { C as isRecord, D as readPackageJson, E as packageHasRecordKey, M as cliLogger, O as resolveGitPath, S as getPackageJsonPath, T as packageHasNestedRecordKey, _ as REACT_DOCTOR_COMMAND, a as installReactDoctorScriptStep, b as VITE_PLUS_HOOKS_PATH, c as spinner, d as HUSKY_HOOKS_PATH, f as LEFTHOOK_CONFIG_FILES, g as PRE_COMMIT_CONFIG_FILE, h as OVERCOMMIT_CONFIG_FILE, j as writeJsonFile, k as runGit, l as HOOK_FILE_NAME, m as NON_BLOCKING_REACT_DOCTOR_COMMAND, n as findNearestPackageDirectory, p as LEGACY_HOOK_RUNNER_RELATIVE_PATH, r as hasDoctorDependency, t as DOCTOR_PACKAGE_NAME, u as HOOK_RELATIVE_PATH, w as packageHasDependency, x as ensureTrailingNewline } from "./install-doctor-script-
|
|
5
|
-
import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, d as detectDefaultBranch, l as prompts, n as getReactDoctorWorkflowPath, o as upgradeReactDoctorWorkflowInPlace, r as installReactDoctorWorkflow } from "./install-github-workflow-
|
|
6
|
-
import { t as shouldSkipPrompts } from "./should-skip-prompts-
|
|
7
|
-
import { a as recordGate, c as ACTION_UPGRADE_EVENT, d as INSTALL_AGENTS_PREFERENCE_ID, h as detectAvailableAgents, i as readPreference, l as CI_PITCH_EVENT, m as computeDefaultSelectedAgents, n as openUrl, r as isGatePending, s as writePreference, t as reportWorkflowResult } from "./report-workflow-result-
|
|
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]="33e948e2-0b74-55ee-b184-b70989224976")}catch(e){}}();
|
|
3
|
+
import { C as CI_TRUST_COMPANIES, Kt as highlighter, T as METRIC, br as isErrnoException, cr as GITHUB_ACTIONS_SETUP_URL, gr as SKILL_NAME, t as recordCount, z as CliInputError } from "./record-metric-BM82PBSe.js";
|
|
4
|
+
import { C as isRecord, D as readPackageJson, E as packageHasRecordKey, M as cliLogger, O as resolveGitPath, S as getPackageJsonPath, T as packageHasNestedRecordKey, _ as REACT_DOCTOR_COMMAND, a as installReactDoctorScriptStep, b as VITE_PLUS_HOOKS_PATH, c as spinner, d as HUSKY_HOOKS_PATH, f as LEFTHOOK_CONFIG_FILES, g as PRE_COMMIT_CONFIG_FILE, h as OVERCOMMIT_CONFIG_FILE, j as writeJsonFile, k as runGit, l as HOOK_FILE_NAME, m as NON_BLOCKING_REACT_DOCTOR_COMMAND, n as findNearestPackageDirectory, p as LEGACY_HOOK_RUNNER_RELATIVE_PATH, r as hasDoctorDependency, t as DOCTOR_PACKAGE_NAME, u as HOOK_RELATIVE_PATH, w as packageHasDependency, x as ensureTrailingNewline } from "./install-doctor-script-JE3JnnQc.js";
|
|
5
|
+
import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, d as detectDefaultBranch, l as prompts, n as getReactDoctorWorkflowPath, o as upgradeReactDoctorWorkflowInPlace, r as installReactDoctorWorkflow } from "./install-github-workflow-BdY3qY2f.js";
|
|
6
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-CQyO96OW.js";
|
|
7
|
+
import { a as recordGate, c as ACTION_UPGRADE_EVENT, d as INSTALL_AGENTS_PREFERENCE_ID, h as detectAvailableAgents, i as readPreference, l as CI_PITCH_EVENT, m as computeDefaultSelectedAgents, n as openUrl, r as isGatePending, s as writePreference, t as reportWorkflowResult } from "./report-workflow-result-xEGmAMA7.js";
|
|
8
8
|
import { execFile } from "node:child_process";
|
|
9
9
|
import * as path$1 from "node:path";
|
|
10
10
|
import * as fs$1 from "node:fs";
|
|
@@ -1152,5 +1152,5 @@ const runInstallReactDoctor = async (options = {}) => {
|
|
|
1152
1152
|
//#endregion
|
|
1153
1153
|
export { askUpgradeActionVersion as a, recordCiPromptDecision as c, installReactDoctorAgentHooks as i, hasHandledActionUpgrade as l, runInstallReactDoctor as n, askAddToGitHubActions as o, findAgentsWithOutdatedReactDoctorHooks as r, hasHandledCiPrompt as s, getSkillSourceDirectory as t, recordActionUpgradeDecision as u };
|
|
1154
1154
|
|
|
1155
|
-
//# sourceMappingURL=install-react-doctor-
|
|
1156
|
-
//# debugId=
|
|
1155
|
+
//# sourceMappingURL=install-react-doctor-BMn0_WV6.js.map
|
|
1156
|
+
//# debugId=33e948e2-0b74-55ee-b184-b70989224976
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
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]="a329e542-01f9-5ef2-a316-8873ce41d83a")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import { T as METRIC, t as recordCount } from "./record-metric-
|
|
5
|
-
import { n as registerActiveTuiRenderer, t as exitGracefully } from "./exit-gracefully-
|
|
4
|
+
import { T as METRIC, t as recordCount } from "./record-metric-BM82PBSe.js";
|
|
5
|
+
import { n as registerActiveTuiRenderer, t as exitGracefully } from "./exit-gracefully-DShLWQuA.js";
|
|
6
6
|
import { a as chalk, i as stripAnsi, n as isFullWidth$1, r as isWide$1 } from "./get-east-asian-width-Cglw13G7.js";
|
|
7
7
|
import { EventEmitter } from "node:events";
|
|
8
8
|
import { execFileSync } from "node:child_process";
|
|
@@ -25869,5 +25869,5 @@ var require_jsx_runtime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
25869
25869
|
//#endregion
|
|
25870
25870
|
export { useExitOnCtrlC as a, Spinner as c, useInput as d, Transform as f, Box as h, import_react as i, useStdout as l, Text as m, registerMountedTuiRenderer as n, terminalSymbols as o, render as p, useStdoutDimensions as r, isPrintableInput as s, require_jsx_runtime as t, useApp as u };
|
|
25871
25871
|
|
|
25872
|
-
//# sourceMappingURL=jsx-runtime-
|
|
25873
|
-
//# debugId=
|
|
25872
|
+
//# sourceMappingURL=jsx-runtime-pWsmwZGj.js.map
|
|
25873
|
+
//# debugId=a329e542-01f9-5ef2-a316-8873ce41d83a
|