react-doctor 0.9.12-dev.afa1780 → 0.9.12-dev.cad6b5f
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-B9vlCDHV.js → build-section-divider-DSn_mPgb.js} +7 -7
- package/dist/{ci-rLzlDu2j.js → ci-BUdvRf-c.js} +12 -12
- package/dist/cli.js +24 -24
- package/dist/{design-CzVqEwWg.js → design-CoLGuy5S.js} +4 -4
- package/dist/{exit-gracefully-Bq-JF68q.js → exit-gracefully-bXME8cHp.js} +6 -6
- package/dist/{handle-error-DUSoFUPL.js → handle-error-DmROnRRs.js} +5 -5
- package/dist/index.js +175 -89
- package/dist/{inspect-CNeq8v8s.js → inspect-npBX73XH.js} +16 -16
- package/dist/{install-doctor-script-DbnMjPjQ.js → install-doctor-script-DYCVafXv.js} +4 -4
- package/dist/{install-github-workflow-CS_YO_OJ.js → install-github-workflow-B1RVnChC.js} +9 -5
- package/dist/{install-react-doctor-BTiagoIZ.js → install-react-doctor-BLY8CGQe.js} +8 -8
- package/dist/{install-DP8oO5sw.js → install-znLbjZ9d.js} +9 -9
- package/dist/{jsx-runtime-DGcmMln7.js → jsx-runtime-DA_1Hma_.js} +5 -5
- package/dist/{print-branded-header-bKbewJRI.js → print-branded-header-C3a4rWLc.js} +4 -4
- package/dist/project-analysis-worker.js +53 -52
- package/dist/{prompt-runtime-scan-url-CvsHajZD.js → prompt-runtime-scan-url-D-VxJdEV.js} +5 -5
- package/dist/{read-object-file-DIGDC3MB.js → read-object-file-CZ3jYY2n.js} +4 -4
- package/dist/{record-metric-C4-VKG9G.js → record-metric-o3jPUAlb.js} +171 -84
- package/dist/{report-error-1lrvJd3S.js → report-error-Q2foihSQ.js} +5 -5
- package/dist/{report-workflow-result-C42nztEL.js → report-workflow-result-DtNumNBo.js} +5 -5
- package/dist/{resolve-scope-YUP_rtf3.js → resolve-scope-BqQ7bkS9.js} +6 -6
- package/dist/{rules-BY4vq5-i.js → rules-BBFANx88.js} +6 -6
- package/dist/{run-scan-app-DHDnmfX6.js → run-scan-app-5nFtP_Q2.js} +15 -14
- package/dist/{runtime-scan-ClVvgojx.js → runtime-scan-DS3bDIZw.js} +9 -9
- package/dist/{sanitize-runtime-url-DVwfWWZy.js → sanitize-runtime-url-BXPjEywk.js} +4 -4
- package/dist/{scan-C9YMcGrG.js → scan-BsE9Z2jI.js} +9 -9
- package/dist/{should-fail-scan-gate-CtPrWy9N.js → should-fail-scan-gate-BoSm_UbG.js} +11 -11
- package/dist/{should-skip-prompts-b1KKh2nz.js → should-skip-prompts-DFGKV3BW.js} +4 -4
- package/dist/{should-use-tui-Dh_kmKLh.js → should-use-tui-Ce7rumUG.js} +4 -4
- package/dist/{telemetry-runtime-CDAL4uhm.js → telemetry-runtime-B7w82_85.js} +4 -4
- package/dist/{version-CDNMEvQU.js → version-nwFNPzMN.js} +4 -4
- package/dist/{why-fw7vWXR7.js → why-xMM2hBwY.js} +4 -4
- package/dist/{with-run-span-V4LjJBYW.js → with-run-span-DId1q6s-.js} +5 -5
- package/package.json +2 -2
|
@@ -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]="98b361a0-3811-59d7-bcea-c6d79bbebdbd")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
4
|
import { n as require_picomatch$2, t as require_semver } from "./semver-DFtnEmN-.js";
|
|
5
5
|
import { builtinModules } from "node:module";
|
|
@@ -9,12 +9,12 @@ import path, { basename, dirname, extname, isAbsolute, join, parse, posix, relat
|
|
|
9
9
|
import * as fs$1 from "node:fs";
|
|
10
10
|
import { existsSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
|
|
11
11
|
import ts from "typescript";
|
|
12
|
+
import { parseSync } from "oxc-parser";
|
|
12
13
|
import { ResolverFactory } from "oxc-resolver";
|
|
13
14
|
import { devNull } from "node:os";
|
|
14
15
|
import { parseJSONC, parseTOML, parseYAML } from "confbox";
|
|
15
16
|
import { readFile } from "node:fs/promises";
|
|
16
17
|
import { parse as parse$1 } from "@astrojs/compiler/sync";
|
|
17
|
-
import { parseSync } from "oxc-parser";
|
|
18
18
|
//#region ../core/src/project-analysis/constants.ts
|
|
19
19
|
const DEFAULT_EXTENSIONS = [
|
|
20
20
|
".ts",
|
|
@@ -38057,6 +38057,13 @@ const discoverMobileEntryPoints = (directory) => {
|
|
|
38057
38057
|
}
|
|
38058
38058
|
};
|
|
38059
38059
|
//#endregion
|
|
38060
|
+
//#region ../core/src/utils/unwrap-typescript-expression.ts
|
|
38061
|
+
const unwrapTypescriptExpression = (expression) => {
|
|
38062
|
+
let currentExpression = expression;
|
|
38063
|
+
while (ts.isParenthesizedExpression(currentExpression) || ts.isAsExpression(currentExpression) || ts.isSatisfiesExpression(currentExpression) || ts.isNonNullExpression(currentExpression) || ts.isTypeAssertionExpression(currentExpression)) currentExpression = currentExpression.expression;
|
|
38064
|
+
return currentExpression;
|
|
38065
|
+
};
|
|
38066
|
+
//#endregion
|
|
38060
38067
|
//#region ../core/src/project-analysis/collect/expo-config-plugin-entries.ts
|
|
38061
38068
|
const EXPO_CONFIG_FILE_GLOBS = ["app.config.{ts,mts,cts,js,mjs,cjs}", "app.json"];
|
|
38062
38069
|
const NESTED_EXPO_CONFIG_FILE_GLOBS = [
|
|
@@ -38102,11 +38109,6 @@ const addExpoPluginEntry = (entries, packageNamePlugins, rootDirectory, configDi
|
|
|
38102
38109
|
const getPropertyName$4 = (name) => {
|
|
38103
38110
|
if (ts.isIdentifier(name) || ts.isStringLiteral(name) || ts.isNumericLiteral(name)) return name.text;
|
|
38104
38111
|
};
|
|
38105
|
-
const unwrapExpression = (expression) => {
|
|
38106
|
-
let currentExpression = expression;
|
|
38107
|
-
while (ts.isParenthesizedExpression(currentExpression)) currentExpression = currentExpression.expression;
|
|
38108
|
-
return currentExpression;
|
|
38109
|
-
};
|
|
38110
38112
|
const collectExpoPluginPathsFromArray = (array, entries, packageNamePlugins, rootDirectory, configDirectory) => {
|
|
38111
38113
|
for (const element of array.elements) {
|
|
38112
38114
|
if (ts.isStringLiteral(element) || ts.isNoSubstitutionTemplateLiteral(element)) {
|
|
@@ -38129,14 +38131,14 @@ const collectExpoPluginPathsFromConfigObject = (objectLiteral, entries, packageN
|
|
|
38129
38131
|
};
|
|
38130
38132
|
const collectReturnedExpoConfigPluginPaths = (body, entries, packageNamePlugins, rootDirectory, configDirectory) => {
|
|
38131
38133
|
if (!ts.isBlock(body)) {
|
|
38132
|
-
const expression =
|
|
38134
|
+
const expression = unwrapTypescriptExpression(body);
|
|
38133
38135
|
if (ts.isObjectLiteralExpression(expression)) collectExpoPluginPathsFromConfigObject(expression, entries, packageNamePlugins, rootDirectory, configDirectory);
|
|
38134
38136
|
return;
|
|
38135
38137
|
}
|
|
38136
38138
|
const visit = (node) => {
|
|
38137
38139
|
if (ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node) || ts.isArrowFunction(node)) return;
|
|
38138
38140
|
if (ts.isReturnStatement(node) && node.expression) {
|
|
38139
|
-
const expression =
|
|
38141
|
+
const expression = unwrapTypescriptExpression(node.expression);
|
|
38140
38142
|
if (ts.isObjectLiteralExpression(expression)) collectExpoPluginPathsFromConfigObject(expression, entries, packageNamePlugins, rootDirectory, configDirectory);
|
|
38141
38143
|
return;
|
|
38142
38144
|
}
|
|
@@ -38145,7 +38147,7 @@ const collectReturnedExpoConfigPluginPaths = (body, entries, packageNamePlugins,
|
|
|
38145
38147
|
visit(body);
|
|
38146
38148
|
};
|
|
38147
38149
|
const collectExpoPluginPathsFromConfigExpression = (expression, entries, packageNamePlugins, rootDirectory, configDirectory, bindings, seenIdentifiers = /* @__PURE__ */ new Set()) => {
|
|
38148
|
-
const configExpression =
|
|
38150
|
+
const configExpression = unwrapTypescriptExpression(expression);
|
|
38149
38151
|
if (ts.isObjectLiteralExpression(configExpression)) {
|
|
38150
38152
|
collectExpoPluginPathsFromConfigObject(configExpression, entries, packageNamePlugins, rootDirectory, configDirectory);
|
|
38151
38153
|
return;
|
|
@@ -40999,13 +41001,6 @@ const extractSupabaseFunctionEntries = (rootDirectory) => import_out.default.syn
|
|
|
40999
41001
|
onlyFiles: true
|
|
41000
41002
|
});
|
|
41001
41003
|
//#endregion
|
|
41002
|
-
//#region ../core/src/utils/unwrap-typescript-expression.ts
|
|
41003
|
-
const unwrapTypescriptExpression = (expression) => {
|
|
41004
|
-
let currentExpression = expression;
|
|
41005
|
-
while (ts.isParenthesizedExpression(currentExpression) || ts.isAsExpression(currentExpression) || ts.isSatisfiesExpression(currentExpression) || ts.isNonNullExpression(currentExpression) || ts.isTypeAssertionExpression(currentExpression)) currentExpression = currentExpression.expression;
|
|
41006
|
-
return currentExpression;
|
|
41007
|
-
};
|
|
41008
|
-
//#endregion
|
|
41009
41004
|
//#region ../core/src/project-analysis/utils/is-path-inside-directory-or-equal.ts
|
|
41010
41005
|
const isPathInsideDirectoryOrEqual = (candidatePath, directoryPath) => {
|
|
41011
41006
|
const normalizedCandidatePath = posix.normalize(toPosixPath(candidatePath));
|
|
@@ -46087,47 +46082,53 @@ const collectPackageLockPackageMetadata = (searchRoots, resolutionDirectory, dec
|
|
|
46087
46082
|
return metadataByPackageName;
|
|
46088
46083
|
};
|
|
46089
46084
|
//#endregion
|
|
46090
|
-
//#region ../core/src/project-analysis/utils/collect-static-module-
|
|
46091
|
-
const
|
|
46092
|
-
|
|
46093
|
-
|
|
46094
|
-
|
|
46095
|
-
|
|
46096
|
-
|
|
46097
|
-
};
|
|
46098
|
-
const
|
|
46099
|
-
|
|
46100
|
-
|
|
46101
|
-
|
|
46085
|
+
//#region ../core/src/project-analysis/utils/collect-static-module-specifiers.ts
|
|
46086
|
+
const getStaticModuleSpecifier = (value) => {
|
|
46087
|
+
if (!isOxcAstNode(value)) return void 0;
|
|
46088
|
+
if (typeof value.value === "string") return value.value;
|
|
46089
|
+
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;
|
|
46090
|
+
};
|
|
46091
|
+
const collectStaticModuleSpecifiers = (sourceText, options = {}) => {
|
|
46092
|
+
const { filePath = "module.tsx", includeTypeOnly = true } = options;
|
|
46093
|
+
const parsedModule = parseSync(filePath, sourceText, { sourceType: "unambiguous" });
|
|
46094
|
+
const moduleSpecifiers = /* @__PURE__ */ new Set();
|
|
46095
|
+
const addSpecifier = (value) => {
|
|
46096
|
+
const moduleSpecifier = getStaticModuleSpecifier(value);
|
|
46097
|
+
if (moduleSpecifier) moduleSpecifiers.add(moduleSpecifier);
|
|
46102
46098
|
};
|
|
46103
|
-
|
|
46104
|
-
for (const staticExport of parsedModule.module.staticExports) for (const entry of staticExport.entries) if (entry.moduleRequest) addSpecifier(entry.moduleRequest.value);
|
|
46105
|
-
const visitNode = (value, isInTypeScriptModuleBlock = false) => {
|
|
46099
|
+
const visitNode = (value) => {
|
|
46106
46100
|
if (Array.isArray(value)) {
|
|
46107
|
-
for (const child of value) visitNode(child
|
|
46101
|
+
for (const child of value) visitNode(child);
|
|
46108
46102
|
return;
|
|
46109
46103
|
}
|
|
46110
46104
|
if (!isOxcAstNode(value)) return;
|
|
46111
|
-
if (
|
|
46112
|
-
const
|
|
46113
|
-
|
|
46114
|
-
|
|
46115
|
-
if (value.type === "
|
|
46116
|
-
const
|
|
46117
|
-
|
|
46118
|
-
|
|
46119
|
-
if (value.type === "
|
|
46120
|
-
|
|
46121
|
-
|
|
46122
|
-
|
|
46123
|
-
if (value.type === "
|
|
46124
|
-
|
|
46125
|
-
|
|
46126
|
-
}
|
|
46127
|
-
const childIsInTypeScriptModuleBlock = isInTypeScriptModuleBlock || value.type === "TSModuleBlock";
|
|
46128
|
-
for (const child of Object.values(value)) visitNode(child, childIsInTypeScriptModuleBlock);
|
|
46105
|
+
if (value.type === "ImportDeclaration") {
|
|
46106
|
+
const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
|
|
46107
|
+
const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.importKind !== "type");
|
|
46108
|
+
if (includeTypeOnly || value.importKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
|
|
46109
|
+
} else if (value.type === "ExportNamedDeclaration") {
|
|
46110
|
+
const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
|
|
46111
|
+
const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.exportKind !== "type");
|
|
46112
|
+
if (includeTypeOnly || value.exportKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
|
|
46113
|
+
} else if (value.type === "ExportAllDeclaration" || value.type === "ImportExpression") {
|
|
46114
|
+
if (includeTypeOnly || value.exportKind !== "type") addSpecifier(value.source);
|
|
46115
|
+
} else if (value.type === "TSImportType") {
|
|
46116
|
+
if (includeTypeOnly) addSpecifier(value.source);
|
|
46117
|
+
} else if (value.type === "TSExternalModuleReference") addSpecifier(value.expression);
|
|
46118
|
+
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]);
|
|
46119
|
+
for (const child of Object.values(value)) visitNode(child);
|
|
46129
46120
|
};
|
|
46130
46121
|
visitNode(parsedModule.program);
|
|
46122
|
+
return moduleSpecifiers;
|
|
46123
|
+
};
|
|
46124
|
+
//#endregion
|
|
46125
|
+
//#region ../core/src/project-analysis/utils/collect-static-module-package-names.ts
|
|
46126
|
+
const collectStaticModulePackageNames = (sourceText) => {
|
|
46127
|
+
const packageNames = /* @__PURE__ */ new Set();
|
|
46128
|
+
for (const specifier of collectStaticModuleSpecifiers(sourceText, { filePath: "package-reference.tsx" })) {
|
|
46129
|
+
const packageName = extractPackageName(specifier);
|
|
46130
|
+
if (packageName) packageNames.add(packageName);
|
|
46131
|
+
}
|
|
46131
46132
|
return packageNames;
|
|
46132
46133
|
};
|
|
46133
46134
|
//#endregion
|
|
@@ -51897,4 +51898,4 @@ startProjectAnalysisWorker();
|
|
|
51897
51898
|
export {};
|
|
51898
51899
|
|
|
51899
51900
|
//# sourceMappingURL=project-analysis-worker.js.map
|
|
51900
|
-
//# debugId=
|
|
51901
|
+
//# debugId=98b361a0-3811-59d7-bcea-c6d79bbebdbd
|
|
@@ -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]="94e94aa4-6ee2-5c75-9f4f-a7d4d5e914d9")}catch(e){}}();
|
|
3
3
|
import { t as unrefStdin } from "./unref-stdin-BKT_s38a.js";
|
|
4
|
-
import { a as RUNTIME_SCAN_LOCAL_DEV_PORTS, t as sanitizeRuntimeUrl, u as RUNTIME_SCAN_MAX_STRING_LENGTH } from "./sanitize-runtime-url-
|
|
5
|
-
import { a as useExitOnCtrlC, c as Spinner, d as useInput, h as Box, i as import_react, m as Text, n as registerMountedTuiRenderer, o as terminalSymbols, p as render, r as useStdoutDimensions, s as isPrintableInput, t as require_jsx_runtime } from "./jsx-runtime-
|
|
4
|
+
import { a as RUNTIME_SCAN_LOCAL_DEV_PORTS, t as sanitizeRuntimeUrl, u as RUNTIME_SCAN_MAX_STRING_LENGTH } from "./sanitize-runtime-url-BXPjEywk.js";
|
|
5
|
+
import { a as useExitOnCtrlC, c as Spinner, d as useInput, h as Box, i as import_react, m as Text, n as registerMountedTuiRenderer, o as terminalSymbols, p as render, r as useStdoutDimensions, s as isPrintableInput, t as require_jsx_runtime } from "./jsx-runtime-DA_1Hma_.js";
|
|
6
6
|
import * as http from "node:http";
|
|
7
7
|
//#region src/cli/runtime-scan/detect-local-runtime-urls.ts
|
|
8
8
|
const LOCAL_HTTP_HOSTS = ["127.0.0.1", "::1"];
|
|
@@ -236,5 +236,5 @@ const promptRuntimeScanUrl = () => new Promise((resolve) => {
|
|
|
236
236
|
//#endregion
|
|
237
237
|
export { promptRuntimeScanUrl };
|
|
238
238
|
|
|
239
|
-
//# sourceMappingURL=prompt-runtime-scan-url-
|
|
240
|
-
//# debugId=
|
|
239
|
+
//# sourceMappingURL=prompt-runtime-scan-url-D-VxJdEV.js.map
|
|
240
|
+
//# debugId=94e94aa4-6ee2-5c75-9f4f-a7d4d5e914d9
|
|
@@ -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 { Sr as isPlainObject } 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]="1a0dbe83-bb3d-5ec7-b5e5-429c56137486")}catch(e){}}();
|
|
3
|
+
import { Sr as isPlainObject } from "./record-metric-o3jPUAlb.js";
|
|
4
4
|
import * as fs$1 from "node:fs";
|
|
5
5
|
import { parseJSON5 } from "confbox";
|
|
6
6
|
//#region src/cli/utils/read-object-file.ts
|
|
@@ -20,5 +20,5 @@ const readObjectFile = (filePath) => {
|
|
|
20
20
|
//#endregion
|
|
21
21
|
export { readObjectFile as t };
|
|
22
22
|
|
|
23
|
-
//# sourceMappingURL=read-object-file-
|
|
24
|
-
//# debugId=
|
|
23
|
+
//# sourceMappingURL=read-object-file-CZ3jYY2n.js.map
|
|
24
|
+
//# debugId=1a0dbe83-bb3d-5ec7-b5e5-429c56137486
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
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]="69674118-ba52-503b-ad13-3b35fb25b7f2")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
4
|
import { n as require_picomatch, t as require_semver } from "./semver-DFtnEmN-.js";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import * as NodeChildProcess from "node:child_process";
|
|
7
7
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
8
8
|
import * as path$1$1 from "node:path";
|
|
9
|
-
import path from "node:path";
|
|
9
|
+
import path, { join, posix } from "node:path";
|
|
10
10
|
import * as fs$1$3 from "node:fs";
|
|
11
|
-
import fs from "node:fs";
|
|
11
|
+
import fs, { existsSync } from "node:fs";
|
|
12
12
|
import ts from "typescript";
|
|
13
|
+
import { parseSync } from "oxc-parser";
|
|
13
14
|
import { ALL_REACT_DOCTOR_RULE_KEYS, CROSS_FILE_DEPENDENCY_COLLECTORS, CROSS_FILE_RULE_IDS, FRAMEWORK_SPECIFIC_RULE_KEYS, FRAMEWORK_TOKENS, MOTION_LIBRARY_PACKAGES, REACT_COMPILER_RULES, REACT_DOCTOR_OPT_IN_PROJECT_RULE_IDS, REACT_DOCTOR_PROJECT_RULES, REACT_DOCTOR_RULES, REACT_DOCTOR_RULE_REGISTRY, REACT_DOCTOR_SCAN_RULES, classifySecurityScanFile, collectCrossFileDependencyProbes, resetManifestCaches, shouldReadSecurityScanContent } from "oxlint-plugin-react-doctor/core";
|
|
14
15
|
import * as Crypto from "node:crypto";
|
|
15
16
|
import crypto, { createHash, randomUUID } from "node:crypto";
|
|
@@ -19,14 +20,14 @@ import { fileURLToPath } from "node:url";
|
|
|
19
20
|
import * as OS from "node:os";
|
|
20
21
|
import os from "node:os";
|
|
21
22
|
import { createJiti } from "jiti";
|
|
22
|
-
import { parseJSON5 } from "confbox";
|
|
23
|
+
import { parseJSON5, parseJSONC } from "confbox";
|
|
23
24
|
import * as fs$1 from "node:fs/promises";
|
|
24
25
|
import { PassThrough } from "node:stream";
|
|
25
26
|
import { convertToTSX } from "@astrojs/compiler/sync";
|
|
26
27
|
import { STATUS_CODES } from "node:http";
|
|
27
28
|
import { gzipSync } from "node:zlib";
|
|
28
29
|
import { performance as performance$1 } from "node:perf_hooks";
|
|
29
|
-
//#region ../core/dist/collect-unplugin-auto-import-global-scopes-
|
|
30
|
+
//#region ../core/dist/collect-unplugin-auto-import-global-scopes-hOS9iAJg.js
|
|
30
31
|
var import_picomatch = /* @__PURE__ */ __toESM(require_picomatch(), 1);
|
|
31
32
|
const HTML_FILE_PATTERN = /\.html$/i;
|
|
32
33
|
const SOURCE_FILE_PATTERN = /\.(?:astro|tsx?|jsx?|mts|mjs|[hH][tT][mM][lL])$/;
|
|
@@ -571,6 +572,74 @@ const compileGlobPatternsLenient = (patterns, onInvalid) => {
|
|
|
571
572
|
}
|
|
572
573
|
return compiled;
|
|
573
574
|
};
|
|
575
|
+
const isOxcAstNode = (value) => Boolean(value) && typeof value === "object" && typeof value.type === "string";
|
|
576
|
+
const getStaticModuleSpecifier = (value) => {
|
|
577
|
+
if (!isOxcAstNode(value)) return void 0;
|
|
578
|
+
if (typeof value.value === "string") return value.value;
|
|
579
|
+
if (value.type === "TemplateLiteral" && Array.isArray(value.expressions) && value.expressions.length === 0 && Array.isArray(value.quasis) && isOxcAstNode(value.quasis[0]) && value.quasis[0].value && typeof value.quasis[0].value === "object" && "cooked" in value.quasis[0].value && typeof value.quasis[0].value.cooked === "string") return value.quasis[0].value.cooked;
|
|
580
|
+
};
|
|
581
|
+
const collectStaticModuleSpecifiers = (sourceText, options = {}) => {
|
|
582
|
+
const { filePath = "module.tsx", includeTypeOnly = true } = options;
|
|
583
|
+
const parsedModule = parseSync(filePath, sourceText, { sourceType: "unambiguous" });
|
|
584
|
+
const moduleSpecifiers = /* @__PURE__ */ new Set();
|
|
585
|
+
const addSpecifier = (value) => {
|
|
586
|
+
const moduleSpecifier = getStaticModuleSpecifier(value);
|
|
587
|
+
if (moduleSpecifier) moduleSpecifiers.add(moduleSpecifier);
|
|
588
|
+
};
|
|
589
|
+
const visitNode = (value) => {
|
|
590
|
+
if (Array.isArray(value)) {
|
|
591
|
+
for (const child of value) visitNode(child);
|
|
592
|
+
return;
|
|
593
|
+
}
|
|
594
|
+
if (!isOxcAstNode(value)) return;
|
|
595
|
+
if (value.type === "ImportDeclaration") {
|
|
596
|
+
const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
|
|
597
|
+
const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.importKind !== "type");
|
|
598
|
+
if (includeTypeOnly || value.importKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
|
|
599
|
+
} else if (value.type === "ExportNamedDeclaration") {
|
|
600
|
+
const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
|
|
601
|
+
const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.exportKind !== "type");
|
|
602
|
+
if (includeTypeOnly || value.exportKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
|
|
603
|
+
} else if (value.type === "ExportAllDeclaration" || value.type === "ImportExpression") {
|
|
604
|
+
if (includeTypeOnly || value.exportKind !== "type") addSpecifier(value.source);
|
|
605
|
+
} else if (value.type === "TSImportType") {
|
|
606
|
+
if (includeTypeOnly) addSpecifier(value.source);
|
|
607
|
+
} else if (value.type === "TSExternalModuleReference") addSpecifier(value.expression);
|
|
608
|
+
else if (value.type === "CallExpression" && isOxcAstNode(value.callee) && value.callee.type === "Identifier" && value.callee.name === "require" && Array.isArray(value.arguments) && value.arguments.length > 0) addSpecifier(value.arguments[0]);
|
|
609
|
+
for (const child of Object.values(value)) visitNode(child);
|
|
610
|
+
};
|
|
611
|
+
visitNode(parsedModule.program);
|
|
612
|
+
return moduleSpecifiers;
|
|
613
|
+
};
|
|
614
|
+
const toPosixPath = (filePath) => filePath.replace(/\\/g, "/");
|
|
615
|
+
const isPathInsideDirectoryOrEqual = (candidatePath, directoryPath) => {
|
|
616
|
+
const normalizedCandidatePath = posix.normalize(toPosixPath(candidatePath));
|
|
617
|
+
const normalizedDirectoryPath = posix.normalize(toPosixPath(directoryPath));
|
|
618
|
+
const relativePath = posix.relative(normalizedDirectoryPath, normalizedCandidatePath);
|
|
619
|
+
return relativePath === "" || relativePath !== ".." && !relativePath.startsWith("../") && !posix.isAbsolute(relativePath);
|
|
620
|
+
};
|
|
621
|
+
const RESOLVABLE_EXTENSIONS = [
|
|
622
|
+
".ts",
|
|
623
|
+
".tsx",
|
|
624
|
+
".js",
|
|
625
|
+
".jsx",
|
|
626
|
+
".mjs",
|
|
627
|
+
".mts",
|
|
628
|
+
".cjs",
|
|
629
|
+
".cts",
|
|
630
|
+
".es6"
|
|
631
|
+
];
|
|
632
|
+
const resolveEntryWithExtensions = (basePath) => {
|
|
633
|
+
if (existsSync(basePath)) return basePath;
|
|
634
|
+
for (const extension of RESOLVABLE_EXTENSIONS) {
|
|
635
|
+
const withExtension = basePath + extension;
|
|
636
|
+
if (existsSync(withExtension)) return withExtension;
|
|
637
|
+
}
|
|
638
|
+
for (const extension of RESOLVABLE_EXTENSIONS) {
|
|
639
|
+
const indexCandidate = join(basePath, `index${extension}`);
|
|
640
|
+
if (existsSync(indexCandidate)) return indexCandidate;
|
|
641
|
+
}
|
|
642
|
+
};
|
|
574
643
|
/**
|
|
575
644
|
* Resolves a path to its canonical, symlink-free form, falling back to
|
|
576
645
|
* the input when it cannot be realpath'd (broken symlink, permission
|
|
@@ -68035,18 +68104,58 @@ const METRO_CONFIG_FILE_NAMES = [
|
|
|
68035
68104
|
const EXPO_METRO_CONFIG_EXTEND_SIGNALS = [
|
|
68036
68105
|
"expo/metro-config",
|
|
68037
68106
|
"@sentry/react-native/metro",
|
|
68038
|
-
"getSentryExpoConfig"
|
|
68107
|
+
"getSentryExpoConfig",
|
|
68108
|
+
"posthog-react-native/metro",
|
|
68109
|
+
"getPostHogExpoConfig"
|
|
68039
68110
|
];
|
|
68111
|
+
const resolveLocalMetroConfigModule = (moduleSpecifier, importingFilePath, rootDirectory) => {
|
|
68112
|
+
if (!moduleSpecifier.startsWith(".")) return void 0;
|
|
68113
|
+
const importedPath = path$1$1.resolve(path$1$1.dirname(importingFilePath), moduleSpecifier);
|
|
68114
|
+
const candidateBasePaths = [
|
|
68115
|
+
importedPath,
|
|
68116
|
+
importedPath.replace(/\.[cm]?js$/, ""),
|
|
68117
|
+
path$1$1.join(importedPath, "index")
|
|
68118
|
+
];
|
|
68119
|
+
for (const candidateBasePath of candidateBasePaths) {
|
|
68120
|
+
const resolvedPath = resolveEntryWithExtensions(candidateBasePath);
|
|
68121
|
+
if (resolvedPath !== void 0 && isFile(resolvedPath) && isPathInsideDirectoryOrEqual(resolvedPath, rootDirectory)) return resolvedPath;
|
|
68122
|
+
}
|
|
68123
|
+
};
|
|
68124
|
+
const hasExpoMetroConfigSignal = (metroConfigPath, rootDirectory) => {
|
|
68125
|
+
const pendingFilePaths = [metroConfigPath];
|
|
68126
|
+
const visitedFilePaths = /* @__PURE__ */ new Set();
|
|
68127
|
+
while (pendingFilePaths.length > 0) {
|
|
68128
|
+
const currentFilePath = pendingFilePaths.pop();
|
|
68129
|
+
if (currentFilePath === void 0 || visitedFilePaths.has(currentFilePath)) continue;
|
|
68130
|
+
if (visitedFilePaths.size >= 100) return true;
|
|
68131
|
+
visitedFilePaths.add(currentFilePath);
|
|
68132
|
+
let contents;
|
|
68133
|
+
try {
|
|
68134
|
+
contents = fs$1$3.readFileSync(currentFilePath, "utf-8");
|
|
68135
|
+
} catch {
|
|
68136
|
+
return true;
|
|
68137
|
+
}
|
|
68138
|
+
if (EXPO_METRO_CONFIG_EXTEND_SIGNALS.some((signal) => contents.includes(signal))) return true;
|
|
68139
|
+
let moduleSpecifiers;
|
|
68140
|
+
try {
|
|
68141
|
+
moduleSpecifiers = collectStaticModuleSpecifiers(contents, {
|
|
68142
|
+
filePath: currentFilePath,
|
|
68143
|
+
includeTypeOnly: false
|
|
68144
|
+
});
|
|
68145
|
+
} catch {
|
|
68146
|
+
continue;
|
|
68147
|
+
}
|
|
68148
|
+
for (const moduleSpecifier of moduleSpecifiers) {
|
|
68149
|
+
const localModulePath = resolveLocalMetroConfigModule(moduleSpecifier, currentFilePath, rootDirectory);
|
|
68150
|
+
if (localModulePath !== void 0 && !visitedFilePaths.has(localModulePath)) pendingFilePaths.push(localModulePath);
|
|
68151
|
+
}
|
|
68152
|
+
}
|
|
68153
|
+
return false;
|
|
68154
|
+
};
|
|
68040
68155
|
const checkExpoMetroConfig = (context) => {
|
|
68041
68156
|
const metroConfigPath = METRO_CONFIG_FILE_NAMES.map((fileName) => path$1$1.join(context.rootDirectory, fileName)).find((candidatePath) => isFile(candidatePath));
|
|
68042
68157
|
if (metroConfigPath === void 0) return [];
|
|
68043
|
-
|
|
68044
|
-
try {
|
|
68045
|
-
contents = fs$1$3.readFileSync(metroConfigPath, "utf-8");
|
|
68046
|
-
} catch {
|
|
68047
|
-
return [];
|
|
68048
|
-
}
|
|
68049
|
-
if (EXPO_METRO_CONFIG_EXTEND_SIGNALS.some((signal) => contents.includes(signal))) return [];
|
|
68158
|
+
if (hasExpoMetroConfigSignal(metroConfigPath, context.rootDirectory)) return [];
|
|
68050
68159
|
return [buildExpoDiagnostic({
|
|
68051
68160
|
rule: "expo-metro-config",
|
|
68052
68161
|
filePath: path$1$1.basename(metroConfigPath),
|
|
@@ -71399,59 +71508,11 @@ const isLocalPathExtend = (entry) => {
|
|
|
71399
71508
|
for (const prefix of EXTENDS_LOCAL_PATH_PREFIXES) if (entry.startsWith(prefix)) return true;
|
|
71400
71509
|
return false;
|
|
71401
71510
|
};
|
|
71402
|
-
const stripJsoncComments = (raw) => {
|
|
71403
|
-
let result = "";
|
|
71404
|
-
let cursor = 0;
|
|
71405
|
-
let inString = false;
|
|
71406
|
-
let stringQuote = "";
|
|
71407
|
-
while (cursor < raw.length) {
|
|
71408
|
-
const character = raw[cursor];
|
|
71409
|
-
const nextCharacter = raw[cursor + 1];
|
|
71410
|
-
if (inString) {
|
|
71411
|
-
result += character;
|
|
71412
|
-
if (character === "\\" && cursor + 1 < raw.length) {
|
|
71413
|
-
result += nextCharacter;
|
|
71414
|
-
cursor += 2;
|
|
71415
|
-
continue;
|
|
71416
|
-
}
|
|
71417
|
-
if (character === stringQuote) inString = false;
|
|
71418
|
-
cursor += 1;
|
|
71419
|
-
continue;
|
|
71420
|
-
}
|
|
71421
|
-
if (character === "\"" || character === "'") {
|
|
71422
|
-
inString = true;
|
|
71423
|
-
stringQuote = character;
|
|
71424
|
-
result += character;
|
|
71425
|
-
cursor += 1;
|
|
71426
|
-
continue;
|
|
71427
|
-
}
|
|
71428
|
-
if (character === "/" && nextCharacter === "/") {
|
|
71429
|
-
const lineEndIndex = raw.indexOf("\n", cursor);
|
|
71430
|
-
cursor = lineEndIndex === -1 ? raw.length : lineEndIndex;
|
|
71431
|
-
continue;
|
|
71432
|
-
}
|
|
71433
|
-
if (character === "/" && nextCharacter === "*") {
|
|
71434
|
-
const blockEndIndex = raw.indexOf("*/", cursor + 2);
|
|
71435
|
-
cursor = blockEndIndex === -1 ? raw.length : blockEndIndex + 2;
|
|
71436
|
-
continue;
|
|
71437
|
-
}
|
|
71438
|
-
result += character;
|
|
71439
|
-
cursor += 1;
|
|
71440
|
-
}
|
|
71441
|
-
return result;
|
|
71442
|
-
};
|
|
71443
|
-
const parseJsonOrJsonc = (raw) => {
|
|
71444
|
-
try {
|
|
71445
|
-
return JSON.parse(raw);
|
|
71446
|
-
} catch {
|
|
71447
|
-
return JSON.parse(stripJsoncComments(raw));
|
|
71448
|
-
}
|
|
71449
|
-
};
|
|
71450
71511
|
const canOxlintExtendConfig = (configPath) => {
|
|
71451
71512
|
if (!configPath.endsWith(".eslintrc.json")) return true;
|
|
71452
71513
|
let parsed;
|
|
71453
71514
|
try {
|
|
71454
|
-
parsed =
|
|
71515
|
+
parsed = parseJSONC(fs$1$3.readFileSync(configPath, "utf-8"), { allowTrailingComma: true });
|
|
71455
71516
|
} catch {
|
|
71456
71517
|
return true;
|
|
71457
71518
|
}
|
|
@@ -71560,6 +71621,25 @@ const detectUserLintConfigPaths = (rootDirectory) => {
|
|
|
71560
71621
|
}
|
|
71561
71622
|
return [];
|
|
71562
71623
|
};
|
|
71624
|
+
const readAdoptedLintConfigSettings = (configPaths) => {
|
|
71625
|
+
const mergedSettings = /* @__PURE__ */ new Map();
|
|
71626
|
+
for (const configPath of configPaths) {
|
|
71627
|
+
let parsed;
|
|
71628
|
+
try {
|
|
71629
|
+
parsed = parseJSONC(fs$1$3.readFileSync(configPath, "utf-8"), { allowTrailingComma: true });
|
|
71630
|
+
} catch {
|
|
71631
|
+
continue;
|
|
71632
|
+
}
|
|
71633
|
+
if (!isPlainObject(parsed)) continue;
|
|
71634
|
+
const settings = parsed.settings;
|
|
71635
|
+
if (!isPlainObject(settings)) continue;
|
|
71636
|
+
for (const [pluginName, pluginSettings] of Object.entries(settings)) {
|
|
71637
|
+
if (pluginName === "react-doctor") continue;
|
|
71638
|
+
mergedSettings.set(pluginName, pluginSettings);
|
|
71639
|
+
}
|
|
71640
|
+
}
|
|
71641
|
+
return Object.fromEntries(mergedSettings);
|
|
71642
|
+
};
|
|
71563
71643
|
const DISABLE_DIRECTIVE_PATTERN = /(eslint|oxlint)-disable/;
|
|
71564
71644
|
const getBackupRootDirectory = (rootDirectory) => path$1$1.join(rootDirectory, ...DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS);
|
|
71565
71645
|
const getBackupPath = (rootDirectory, absolutePath) => {
|
|
@@ -71956,7 +72036,7 @@ const buildUserPluginRules = (userPlugin, severityControls) => {
|
|
|
71956
72036
|
}
|
|
71957
72037
|
return enabled;
|
|
71958
72038
|
};
|
|
71959
|
-
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 }) => {
|
|
72039
|
+
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 }) => {
|
|
71960
72040
|
const hasIncludedTags = includedTags.size > 0;
|
|
71961
72041
|
const reactHooksJsPlugin = disableReactHooksJsPlugin || ruleSelection === "sidecar" || hasIncludedTags ? null : resolveReactHooksJsPlugin(project.hasReactCompiler || project.hasReactCompilerLintPlugin === true, customRulesOnly);
|
|
71962
72042
|
const reactCompilerRules = reactHooksJsPlugin ? applyRuleSeverityControls(filterRulesToAvailable(REACT_COMPILER_RULES, "react-hooks-js", reactHooksJsPlugin.availableRuleNames), severityControls) : {};
|
|
@@ -72011,23 +72091,26 @@ const createOxlintConfig = ({ pluginPath, project, customRulesOnly = false, exte
|
|
|
72011
72091
|
},
|
|
72012
72092
|
plugins: [],
|
|
72013
72093
|
jsPlugins: [...jsPlugins, pluginPath],
|
|
72014
|
-
settings: {
|
|
72015
|
-
|
|
72016
|
-
|
|
72017
|
-
|
|
72018
|
-
|
|
72019
|
-
|
|
72020
|
-
|
|
72021
|
-
|
|
72022
|
-
unpluginAutoImportGlobalScopes
|
|
72023
|
-
|
|
72024
|
-
|
|
72025
|
-
|
|
72026
|
-
|
|
72027
|
-
|
|
72028
|
-
|
|
72029
|
-
|
|
72030
|
-
|
|
72094
|
+
settings: {
|
|
72095
|
+
...adoptedSettings,
|
|
72096
|
+
"react-doctor": {
|
|
72097
|
+
portedRuleMode: "curated",
|
|
72098
|
+
framework: project.framework,
|
|
72099
|
+
rootDirectory: settingsRootDirectory,
|
|
72100
|
+
capabilities: [...capabilities].sort(),
|
|
72101
|
+
...runtimeGlobals && runtimeGlobals.length > 0 ? { runtimeGlobals: [...runtimeGlobals] } : {},
|
|
72102
|
+
...unpluginAutoImportGlobalScopes && unpluginAutoImportGlobalScopes.length > 0 ? {
|
|
72103
|
+
unpluginAutoImportRootDirectories: [...new Set([settingsRootDirectory, project.rootDirectory])],
|
|
72104
|
+
unpluginAutoImportGlobalScopes: unpluginAutoImportGlobalScopes.map((scope) => ({
|
|
72105
|
+
directory: scope.directory,
|
|
72106
|
+
names: [...scope.names]
|
|
72107
|
+
}))
|
|
72108
|
+
} : {},
|
|
72109
|
+
...project.shopifyFlashListMajorVersion !== null ? { shopifyFlashListMajorVersion: project.shopifyFlashListMajorVersion } : {},
|
|
72110
|
+
...serverAuthFunctionNames && serverAuthFunctionNames.length > 0 ? { serverAuthFunctionNames: [...serverAuthFunctionNames] } : {},
|
|
72111
|
+
...projectIndexModuleSources !== void 0 ? { projectIndexModuleSources: [...projectIndexModuleSources] } : {}
|
|
72112
|
+
}
|
|
72113
|
+
},
|
|
72031
72114
|
rules: {
|
|
72032
72115
|
...reactCompilerRules,
|
|
72033
72116
|
...enabledReactDoctorRules,
|
|
@@ -74136,7 +74219,9 @@ const runOxlint = async (options) => {
|
|
|
74136
74219
|
return [];
|
|
74137
74220
|
}
|
|
74138
74221
|
const pluginPath = resolvePluginPath();
|
|
74139
|
-
const
|
|
74222
|
+
const detectedConfigPaths = adoptExistingLintConfig && !customRulesOnly ? detectUserLintConfigPaths(rootDirectory) : [];
|
|
74223
|
+
const extendsPaths = detectedConfigPaths.filter(canOxlintExtendConfig);
|
|
74224
|
+
const adoptedSettings = detectedConfigPaths.length > 0 ? readAdoptedLintConfigSettings(detectedConfigPaths) : {};
|
|
74140
74225
|
const userPlugins = includedTags.size > 0 ? [] : resolveUserPlugins(userConfig?.plugins, configSourceDirectory);
|
|
74141
74226
|
const restoreDisableDirectives = await neutralizeDisableDirectives(rootDirectory, includePaths ?? options.precomputedSourceFiles?.map((sourceFile) => sourceFile.path), { recoverOnly: respectInlineDisables });
|
|
74142
74227
|
const configDirectory = fs$1$3.mkdtempSync(path$1$1.join(os.tmpdir(), "react-doctor-oxlintrc-"));
|
|
@@ -74198,6 +74283,7 @@ const runOxlint = async (options) => {
|
|
|
74198
74283
|
serverAuthFunctionNames,
|
|
74199
74284
|
projectIndexModuleSources,
|
|
74200
74285
|
severityControls,
|
|
74286
|
+
adoptedSettings,
|
|
74201
74287
|
userPlugins,
|
|
74202
74288
|
disableReactHooksJsPlugin: overrides.disableReactHooksJsPlugin,
|
|
74203
74289
|
ruleSelection: overrides.ruleSelection,
|
|
@@ -76609,6 +76695,7 @@ const METRIC = {
|
|
|
76609
76695
|
tuiIssueStreamShown: "tui.issue_stream_shown",
|
|
76610
76696
|
tuiProjectPathContextShown: "tui.project_path_context_shown",
|
|
76611
76697
|
tuiProjectSelectShown: "tui.project_select_shown",
|
|
76698
|
+
tuiCiRecommendationShown: "tui.ci_recommendation_shown",
|
|
76612
76699
|
tuiReportActionSelected: "tui.report_action_selected",
|
|
76613
76700
|
tuiCancelled: "tui.cancelled",
|
|
76614
76701
|
tuiScanInlineShown: "tui.scan_inline_shown",
|
|
@@ -76657,7 +76744,7 @@ const makeNoopConsole = () => ({
|
|
|
76657
76744
|
});
|
|
76658
76745
|
//#endregion
|
|
76659
76746
|
//#region src/cli/utils/version.ts
|
|
76660
|
-
const VERSION = "0.9.12-dev.
|
|
76747
|
+
const VERSION = "0.9.12-dev.cad6b5f";
|
|
76661
76748
|
//#endregion
|
|
76662
76749
|
//#region src/cli/utils/json-mode.ts
|
|
76663
76750
|
let context = null;
|
|
@@ -77001,5 +77088,5 @@ const recordDistribution = (name, value, options = {}) => {
|
|
|
77001
77088
|
//#endregion
|
|
77002
77089
|
export { Linter as $, CANONICAL_DISCORD_URL as $n, layerObservability as $t, SCAN_RESULT_CACHE_FILENAME as A, gen as An, discoverSupportedSubprojects as At, isNonInteractiveEnvironment as B, sync as Bn, getDiffInfo as Bt, CI_TRUST_COMPANIES as C, error as Cn, messageFromUnknown as Cr, collectSourceFileCountsByDirectory as Ct, NANOSECONDS_PER_MILLISECOND as D, Diagnostic as Dn, createNodeReadFileLinesSync as Dt, MINIMUM_VTE_VERSION_FOR_HYPERLINKS as E, warn$1 as En, countOptInProjectRuleSelections as Et, STAGED_FILES_TEMP_DIR_PREFIX as F, provide as Fn, formatErrorChain as Ft, isCiEnvironment as G, provide$2 as Gn, hashFileContents as Gt, isDebugFlagEnabled as H, void_ as Hn, groupBy as Ht, STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES as I, provideContext as In, formatReactDoctorError as It, Config as J, makeUnsafe$5 as Jn, isPathInsideDirectory as Jt, isCiOrCodingAgentEnvironment as K, succeed$3 as Kn, highlighter as Kt, TUI_REPORT_COMPACT_MAX_ROWS as L, provideService as Ln, getBaselineDiffPlan as Lt, SENTRY_DSN as M, map$3 as Mn, filterPathsOutsideDirectories as Mt, SENTRY_FLUSH_TIMEOUT_MS as N, orElseSucceed as Nn, filterSourceFiles as Nt, REACT_DOCTOR_CONFIG_PROJECT_NAME as O, decodeUnknownSync as On, createOxlintSpawnSlots as Ot, SENTRY_RELEASE_PREFIX as P, promise as Pn, findLegacyConfig as Pt, LintPartialFailures as Q, AXIOM_DEFAULT_DOMAIN as Qn, isScanComplete as Qt, TUI_REPORT_DETAIL_WIDTH_FRACTION as R, runPromise as Rn, getChangedLineRanges as Rt, BASELINE_FILES_TEMP_DIR_PREFIX as S, Console as Sn, isPlainObject as Sr, clearConfigCache as St, METRIC as T, log as Tn, computeDiagnosticDelta as Tt, ACTION_INPUT_ENVIRONMENT_VARIABLES as U, buildWithScope as Un, hasPublishedFixRecipe as Ut, isGitHookEnvironment as V, try_ as Vn, getEquivalentRuleKeys as Vt, detectRunnerOs as W, mergeAll$1 as Wn, hasSupportedFrameworkOrLibrary as Wt, Git as X, void_$1 as Xn, isReactDoctorError as Xt, Files as Y, fail$5 as Yn, isProjectDiscoveryError as Yt, LEGACY_CONFIG_FILENAME as Z, ParentSpan as Zn, isSameRuleKey as Zt, VERSION as _, shouldUseMaintainabilityLayer as _n, STAGED_FILES_PROJECT_CONFIG_FILENAMES as _r, buildRuleSeverityControls as _t, isEnvFlagEnabled as a, materializeSourceTree as an, DIAGNOSTIC_CATEGORY_BUCKETS as ar, Progress as at, AXIOM_METRICS_DATASET as b, validateConfigTypes as bn, isErrnoException as br, canonicalizeUserRuleKey as bt, setSentryProjectInfo as c, resolveGithubActionsScoreMetadata as cn, GITHUB_ACTIONS_SETUP_URL as cr, Score as ct, isJsonModeActive as d, resolveScanConcurrency as dn, JSX_DUPLICATION_SOURCE_FILE_PATTERN as dr, SupplyChain as dt, listSourceFiles as en, CANONICAL_GITHUB_URL as er, Maintainability as et, setJsonReportDirectory as f, resolveScanTarget as fn, JSX_FILE_PATTERN as fr, anonymizeInPlace as ft, writeJsonReport as g, setColorEnabled as gn, SKILL_NAME as gr, buildRuleDocsUrl as gt, writeJsonErrorReport as h, scrubSensitivePaths as hn, SHARE_BASE_URL as hr, buildJsonReport as ht, isTelemetryEnabled as i, mapWithConcurrency as in, CONFIG_SCHEMA_URL as ir, PerFileLintCacheEnabled as it, SCAN_RESULT_CACHE_MAX_HASHED_FILE_SIZE_BYTES as j, makeSpan$1 as jn, filterDiagnosticsForSurface as jt, RUN_GIT_MAX_BUFFER_BYTES as k, make$30 as kn, detectAiTrainingEnvironment as kt, getRunId as l, resolveLintBatchOrdering as ln, GIT_SHOW_MAX_BUFFER_BYTES as lr, SidecarLintCacheEnabled as lt, writeJsonCancellationReport as m, runInspect as mn, OXLINT_NODE_REQUIREMENT as mr, atomicWriteJson as mt, recordDistribution as n, listWorkspacePackages as nn, COMPILER_CLEANUP_BUCKET as nr, OxlintConcurrency as nt, buildSentryScope as o, mergeReactDoctorConfigs as on, DOCS_URL as or, Project as ot, setJsonReportMode as p, restoreLegacyThrow as pn, MILLISECONDS_PER_SECOND as pr, anonymizeText as pt, isCodingAgentEnvironment as q, close as qn, isMonorepoRoot as qt, toSpanAttributes as r, loadConfigWithSource as rn, COMPILER_CLEANUP_RULE_KEYS as rr, OxlintSpawnSlots as rt, buildSentryProjectContext as s, remainingDeadlineBudgetMs as sn, ENTERPRISE_CONTACT_URL as sr, Reporter as st, recordCount as t, listSourceFilesCooperative as tn, CI_URL as tr, NodeResolver as tt, enableJsonMode as u, resolveReactDoctorCacheDir as un, HTML_FILE_PATTERN as ur, StagedFiles as ut, makeNoopConsole as v, summarizeDiagnostics as vn, getCategoryImpact as vr, buildSkippedChecks as vt, GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS as w, info as wn, toCanonicalPath as wr, computeConfigFingerprint as wt, AXIOM_TRACES_DATASET as x, yieldToEventLoop as xn, isFile as xr, classifyFileContext as xt, AXIOM_INGEST_TOKEN as y, toRelativePath as yn, isDirectory as yr, calculateScore as yt, CliInputError as z, runSync as zn, getDiagnosticRuleIdentity as zt };
|
|
77003
77090
|
|
|
77004
|
-
//# sourceMappingURL=record-metric-
|
|
77005
|
-
//# debugId=
|
|
77091
|
+
//# sourceMappingURL=record-metric-o3jPUAlb.js.map
|
|
77092
|
+
//# debugId=69674118-ba52-503b-ad13-3b35fb25b7f2
|
|
@@ -1,7 +1,7 @@
|
|
|
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 { N as SENTRY_FLUSH_TIMEOUT_MS, T as METRIC, Xt as isReactDoctorError, l as getRunId, o as buildSentryScope, t as recordCount } from "./record-metric-
|
|
4
|
-
import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-
|
|
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]="67f3b061-4203-5426-bfd8-fe29dc8ee6d5")}catch(e){}}();
|
|
3
|
+
import { N as SENTRY_FLUSH_TIMEOUT_MS, T as METRIC, Xt as isReactDoctorError, l as getRunId, o as buildSentryScope, t as recordCount } from "./record-metric-o3jPUAlb.js";
|
|
4
|
+
import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-B7w82_85.js";
|
|
5
5
|
import { r as recordRunTraceId, t as getActiveRunTrace } from "./active-run-trace-dlIZeEvb.js";
|
|
6
6
|
import * as Sentry from "@sentry/node";
|
|
7
7
|
//#region src/cli/utils/report-error.ts
|
|
@@ -60,5 +60,5 @@ const reportErrorToSentry = async (error) => {
|
|
|
60
60
|
//#endregion
|
|
61
61
|
export { reportErrorToSentry as t };
|
|
62
62
|
|
|
63
|
-
//# sourceMappingURL=report-error-
|
|
64
|
-
//# debugId=
|
|
63
|
+
//# sourceMappingURL=report-error-Q2foihSQ.js.map
|
|
64
|
+
//# debugId=67f3b061-4203-5426-bfd8-fe29dc8ee6d5
|
|
@@ -1,7 +1,7 @@
|
|
|
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 { O as REACT_DOCTOR_CONFIG_PROJECT_NAME, T as METRIC, t as recordCount } from "./record-metric-
|
|
4
|
-
import { u as isCommandAvailable } from "./install-github-workflow-
|
|
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]="5af3a0de-2b51-5f60-9fd7-c5b951c6e9d3")}catch(e){}}();
|
|
3
|
+
import { O as REACT_DOCTOR_CONFIG_PROJECT_NAME, T as METRIC, t as recordCount } from "./record-metric-o3jPUAlb.js";
|
|
4
|
+
import { u as isCommandAvailable } from "./install-github-workflow-B1RVnChC.js";
|
|
5
5
|
import { spawn } from "node:child_process";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
7
7
|
import process$1 from "node:process";
|
|
@@ -275,5 +275,5 @@ const reportWorkflowResult = (workflowSpinner, result, projectRoot) => {
|
|
|
275
275
|
//#endregion
|
|
276
276
|
export { recordGate as a, ACTION_UPGRADE_EVENT as c, INSTALL_AGENTS_PREFERENCE_ID as d, ONBOARDING_EVENT as f, detectAvailableAgents as h, readPreference as i, CI_PITCH_EVENT as l, computeDefaultSelectedAgents as m, openUrl as n, runMigrations as o, SETUP_HINT_EVENT as p, isGatePending as r, writePreference as s, reportWorkflowResult as t, HANDOFF_TARGET_PREFERENCE_ID as u };
|
|
277
277
|
|
|
278
|
-
//# sourceMappingURL=report-workflow-result-
|
|
279
|
-
//# debugId=
|
|
278
|
+
//# sourceMappingURL=report-workflow-result-DtNumNBo.js.map
|
|
279
|
+
//# debugId=5af3a0de-2b51-5f60-9fd7-c5b951c6e9d3
|