react-doctor 0.9.12-dev.1d3e4a6 → 0.9.12-dev.2133985
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-8MOZLIsm.js → build-section-divider-DQM0hZGG.js} +7 -7
- package/dist/{ci-BkncxruQ.js → ci-B7o1TYLf.js} +12 -12
- package/dist/cli.js +28 -27
- package/dist/{design-cWsjx19m.js → design-DL-dFjOh.js} +4 -4
- package/dist/{exit-gracefully-B9tEGAKH.js → exit-gracefully-A-YLrXTL.js} +6 -6
- package/dist/{handle-error-wbMFUdUK.js → handle-error-B6MY7nJt.js} +17 -12
- package/dist/index.js +209 -23
- package/dist/{inspect-Bz2rayph.js → inspect-BDh9LRzm.js} +16 -16
- package/dist/{install-DdckCi3Z.js → install-DyTkOJfe.js} +9 -9
- package/dist/{install-doctor-script-jOg4qbkK.js → install-doctor-script-1sBrw2pV.js} +4 -4
- package/dist/{install-github-workflow-C5OkC7nA.js → install-github-workflow-DHfC7l5M.js} +5 -5
- package/dist/{install-react-doctor-W8P-PVpX.js → install-react-doctor-C4TMh-1c.js} +8 -8
- package/dist/{jsx-runtime-0eiF0jis.js → jsx-runtime-dEetRYud.js} +5 -5
- package/dist/{print-branded-header-_cUJmAUD.js → print-branded-header-DA3lha5-.js} +4 -4
- package/dist/project-analysis-worker.js +53 -52
- package/dist/{prompt-runtime-scan-url-CV2AUqdk.js → prompt-runtime-scan-url-BiM1MLOR.js} +5 -5
- package/dist/{read-object-file-DOfcpaZX.js → read-object-file-BPlkYYY5.js} +4 -4
- package/dist/{record-metric-BA5ry-7d.js → record-metric-D-lvwUld.js} +205 -18
- package/dist/{report-error-CFe3r9gh.js → report-error-R7qwdCqP.js} +5 -5
- package/dist/{report-workflow-result-BoDN1Z77.js → report-workflow-result-CAvwgr8H.js} +5 -5
- package/dist/{resolve-scope-BVNh_icv.js → resolve-scope-Dzj_xz-v.js} +6 -6
- package/dist/{rules-CyIHtrnI.js → rules-CTgx-0Wm.js} +6 -6
- package/dist/{run-scan-app-BhUlnxaV.js → run-scan-app-DlH6tVzs.js} +15 -14
- package/dist/{runtime-scan-CUt6T5J3.js → runtime-scan-Bnh9_l_w.js} +9 -9
- package/dist/{sanitize-runtime-url-CWANxE3L.js → sanitize-runtime-url-CJXlzCnZ.js} +4 -4
- package/dist/{scan-DU_zcchs.js → scan-D5RrGccQ.js} +9 -9
- package/dist/{should-fail-scan-gate-CDwqCAPq.js → should-fail-scan-gate-xwJ4Hcnr.js} +11 -11
- package/dist/{should-skip-prompts-B9za5uX9.js → should-skip-prompts-JirKHNGh.js} +4 -4
- package/dist/{should-use-tui-BR82qmYC.js → should-use-tui-DFek4hnU.js} +4 -4
- package/dist/{telemetry-runtime-C9dZxrK_.js → telemetry-runtime-BMf4C2Ho.js} +55 -7
- package/dist/{version-yw_bHX_4.js → version-DHmyxBxT.js} +4 -4
- package/dist/{why-CdGev87Z.js → why-DwXvdA3f.js} +4 -4
- package/dist/{with-run-span-CCVNobt7.js → with-run-span-CRCw8uwE.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]="7b353b3c-4896-5752-a758-ed4ec522671c")}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-CJXlzCnZ.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-dEetRYud.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-BiM1MLOR.js.map
|
|
240
|
+
//# debugId=7b353b3c-4896-5752-a758-ed4ec522671c
|
|
@@ -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]="60777473-9c2f-5936-af6e-5ab81ffe407e")}catch(e){}}();
|
|
3
|
+
import { Sr as isPlainObject } from "./record-metric-D-lvwUld.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-BPlkYYY5.js.map
|
|
24
|
+
//# debugId=60777473-9c2f-5936-af6e-5ab81ffe407e
|
|
@@ -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]="fc80fe2b-9bf0-5cf1-8347-76a1bdb3d136")}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";
|
|
@@ -26,7 +27,7 @@ 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])$/;
|
|
@@ -311,6 +312,7 @@ const ES_TARGET_YEAR_BY_NAME = {
|
|
|
311
312
|
* compiler options — the root config first, then a monorepo base config.
|
|
312
313
|
*/
|
|
313
314
|
const TSCONFIG_FILENAMES = ["tsconfig.json", "tsconfig.base.json"];
|
|
315
|
+
const DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS = [".react-doctor", "audit-backups"];
|
|
314
316
|
/**
|
|
315
317
|
* Project-config files that `StagedFiles.materialize` copies into
|
|
316
318
|
* the temp directory alongside staged sources so oxlint resolves
|
|
@@ -570,6 +572,74 @@ const compileGlobPatternsLenient = (patterns, onInvalid) => {
|
|
|
570
572
|
}
|
|
571
573
|
return compiled;
|
|
572
574
|
};
|
|
575
|
+
const isOxcAstNode = (value) => Boolean(value) && typeof value === "object" && typeof value.type === "string";
|
|
576
|
+
const getStaticModuleSpecifier = (value) => {
|
|
577
|
+
if (!isOxcAstNode(value)) return void 0;
|
|
578
|
+
if (typeof value.value === "string") return value.value;
|
|
579
|
+
if (value.type === "TemplateLiteral" && Array.isArray(value.expressions) && value.expressions.length === 0 && Array.isArray(value.quasis) && isOxcAstNode(value.quasis[0]) && value.quasis[0].value && typeof value.quasis[0].value === "object" && "cooked" in value.quasis[0].value && typeof value.quasis[0].value.cooked === "string") return value.quasis[0].value.cooked;
|
|
580
|
+
};
|
|
581
|
+
const collectStaticModuleSpecifiers = (sourceText, options = {}) => {
|
|
582
|
+
const { filePath = "module.tsx", includeTypeOnly = true } = options;
|
|
583
|
+
const parsedModule = parseSync(filePath, sourceText, { sourceType: "unambiguous" });
|
|
584
|
+
const moduleSpecifiers = /* @__PURE__ */ new Set();
|
|
585
|
+
const addSpecifier = (value) => {
|
|
586
|
+
const moduleSpecifier = getStaticModuleSpecifier(value);
|
|
587
|
+
if (moduleSpecifier) moduleSpecifiers.add(moduleSpecifier);
|
|
588
|
+
};
|
|
589
|
+
const visitNode = (value) => {
|
|
590
|
+
if (Array.isArray(value)) {
|
|
591
|
+
for (const child of value) visitNode(child);
|
|
592
|
+
return;
|
|
593
|
+
}
|
|
594
|
+
if (!isOxcAstNode(value)) return;
|
|
595
|
+
if (value.type === "ImportDeclaration") {
|
|
596
|
+
const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
|
|
597
|
+
const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.importKind !== "type");
|
|
598
|
+
if (includeTypeOnly || value.importKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
|
|
599
|
+
} else if (value.type === "ExportNamedDeclaration") {
|
|
600
|
+
const specifiers = Array.isArray(value.specifiers) ? value.specifiers : [];
|
|
601
|
+
const hasRuntimeSpecifier = specifiers.some((specifier) => !isOxcAstNode(specifier) || specifier.exportKind !== "type");
|
|
602
|
+
if (includeTypeOnly || value.exportKind !== "type" && (specifiers.length === 0 || hasRuntimeSpecifier)) addSpecifier(value.source);
|
|
603
|
+
} else if (value.type === "ExportAllDeclaration" || value.type === "ImportExpression") {
|
|
604
|
+
if (includeTypeOnly || value.exportKind !== "type") addSpecifier(value.source);
|
|
605
|
+
} else if (value.type === "TSImportType") {
|
|
606
|
+
if (includeTypeOnly) addSpecifier(value.source);
|
|
607
|
+
} else if (value.type === "TSExternalModuleReference") addSpecifier(value.expression);
|
|
608
|
+
else if (value.type === "CallExpression" && isOxcAstNode(value.callee) && value.callee.type === "Identifier" && value.callee.name === "require" && Array.isArray(value.arguments) && value.arguments.length > 0) addSpecifier(value.arguments[0]);
|
|
609
|
+
for (const child of Object.values(value)) visitNode(child);
|
|
610
|
+
};
|
|
611
|
+
visitNode(parsedModule.program);
|
|
612
|
+
return moduleSpecifiers;
|
|
613
|
+
};
|
|
614
|
+
const toPosixPath = (filePath) => filePath.replace(/\\/g, "/");
|
|
615
|
+
const isPathInsideDirectoryOrEqual = (candidatePath, directoryPath) => {
|
|
616
|
+
const normalizedCandidatePath = posix.normalize(toPosixPath(candidatePath));
|
|
617
|
+
const normalizedDirectoryPath = posix.normalize(toPosixPath(directoryPath));
|
|
618
|
+
const relativePath = posix.relative(normalizedDirectoryPath, normalizedCandidatePath);
|
|
619
|
+
return relativePath === "" || relativePath !== ".." && !relativePath.startsWith("../") && !posix.isAbsolute(relativePath);
|
|
620
|
+
};
|
|
621
|
+
const RESOLVABLE_EXTENSIONS = [
|
|
622
|
+
".ts",
|
|
623
|
+
".tsx",
|
|
624
|
+
".js",
|
|
625
|
+
".jsx",
|
|
626
|
+
".mjs",
|
|
627
|
+
".mts",
|
|
628
|
+
".cjs",
|
|
629
|
+
".cts",
|
|
630
|
+
".es6"
|
|
631
|
+
];
|
|
632
|
+
const resolveEntryWithExtensions = (basePath) => {
|
|
633
|
+
if (existsSync(basePath)) return basePath;
|
|
634
|
+
for (const extension of RESOLVABLE_EXTENSIONS) {
|
|
635
|
+
const withExtension = basePath + extension;
|
|
636
|
+
if (existsSync(withExtension)) return withExtension;
|
|
637
|
+
}
|
|
638
|
+
for (const extension of RESOLVABLE_EXTENSIONS) {
|
|
639
|
+
const indexCandidate = join(basePath, `index${extension}`);
|
|
640
|
+
if (existsSync(indexCandidate)) return indexCandidate;
|
|
641
|
+
}
|
|
642
|
+
};
|
|
573
643
|
/**
|
|
574
644
|
* Resolves a path to its canonical, symlink-free form, falling back to
|
|
575
645
|
* the input when it cannot be realpath'd (broken symlink, permission
|
|
@@ -68034,18 +68104,58 @@ const METRO_CONFIG_FILE_NAMES = [
|
|
|
68034
68104
|
const EXPO_METRO_CONFIG_EXTEND_SIGNALS = [
|
|
68035
68105
|
"expo/metro-config",
|
|
68036
68106
|
"@sentry/react-native/metro",
|
|
68037
|
-
"getSentryExpoConfig"
|
|
68107
|
+
"getSentryExpoConfig",
|
|
68108
|
+
"posthog-react-native/metro",
|
|
68109
|
+
"getPostHogExpoConfig"
|
|
68038
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
|
+
};
|
|
68039
68155
|
const checkExpoMetroConfig = (context) => {
|
|
68040
68156
|
const metroConfigPath = METRO_CONFIG_FILE_NAMES.map((fileName) => path$1$1.join(context.rootDirectory, fileName)).find((candidatePath) => isFile(candidatePath));
|
|
68041
68157
|
if (metroConfigPath === void 0) return [];
|
|
68042
|
-
|
|
68043
|
-
try {
|
|
68044
|
-
contents = fs$1$3.readFileSync(metroConfigPath, "utf-8");
|
|
68045
|
-
} catch {
|
|
68046
|
-
return [];
|
|
68047
|
-
}
|
|
68048
|
-
if (EXPO_METRO_CONFIG_EXTEND_SIGNALS.some((signal) => contents.includes(signal))) return [];
|
|
68158
|
+
if (hasExpoMetroConfigSignal(metroConfigPath, context.rootDirectory)) return [];
|
|
68049
68159
|
return [buildExpoDiagnostic({
|
|
68050
68160
|
rule: "expo-metro-config",
|
|
68051
68161
|
filePath: path$1$1.basename(metroConfigPath),
|
|
@@ -71560,6 +71670,19 @@ const detectUserLintConfigPaths = (rootDirectory) => {
|
|
|
71560
71670
|
return [];
|
|
71561
71671
|
};
|
|
71562
71672
|
const DISABLE_DIRECTIVE_PATTERN = /(eslint|oxlint)-disable/;
|
|
71673
|
+
const getBackupRootDirectory = (rootDirectory) => path$1$1.join(rootDirectory, ...DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS);
|
|
71674
|
+
const getBackupPath = (rootDirectory, absolutePath) => {
|
|
71675
|
+
if (!isPathInsideDirectory(absolutePath, rootDirectory)) return null;
|
|
71676
|
+
return path$1$1.join(getBackupRootDirectory(rootDirectory), path$1$1.relative(rootDirectory, absolutePath));
|
|
71677
|
+
};
|
|
71678
|
+
const removeBackupRootIfEmpty = (rootDirectory) => {
|
|
71679
|
+
const backupRootDirectory = getBackupRootDirectory(rootDirectory);
|
|
71680
|
+
if (!walkSourceTreeFiles(backupRootDirectory).next().done) return;
|
|
71681
|
+
fs$1$3.rmSync(backupRootDirectory, {
|
|
71682
|
+
recursive: true,
|
|
71683
|
+
force: true
|
|
71684
|
+
});
|
|
71685
|
+
};
|
|
71563
71686
|
const neutralizedFileLeases = /* @__PURE__ */ new Map();
|
|
71564
71687
|
const activeNeutralizationInitializations = /* @__PURE__ */ new Set();
|
|
71565
71688
|
const directoriesOverlap = (left, right) => {
|
|
@@ -71651,8 +71774,50 @@ const collectNeutralizationCandidatePaths = (rootDirectory, discoveredRelativePa
|
|
|
71651
71774
|
}
|
|
71652
71775
|
return candidatePaths;
|
|
71653
71776
|
};
|
|
71777
|
+
const recoverOrphanedBackups = (rootDirectory) => {
|
|
71778
|
+
const blockedPaths = /* @__PURE__ */ new Set();
|
|
71779
|
+
const backupRootDirectory = getBackupRootDirectory(rootDirectory);
|
|
71780
|
+
for (const { absolutePath: backupPath } of walkSourceTreeFiles(backupRootDirectory)) {
|
|
71781
|
+
const originalPath = path$1$1.join(rootDirectory, path$1$1.relative(backupRootDirectory, backupPath));
|
|
71782
|
+
if (neutralizedFileLeases.has(originalPath)) continue;
|
|
71783
|
+
let backupContent;
|
|
71784
|
+
let currentContent;
|
|
71785
|
+
try {
|
|
71786
|
+
backupContent = fs$1$3.readFileSync(backupPath, "utf-8");
|
|
71787
|
+
currentContent = fs$1$3.readFileSync(originalPath, "utf-8");
|
|
71788
|
+
} catch (error) {
|
|
71789
|
+
process.stderr.write(`[react-doctor] Could not recover ${originalPath}: ${messageFromUnknown(error)}. The backup remains at ${backupPath}.\n`);
|
|
71790
|
+
blockedPaths.add(originalPath);
|
|
71791
|
+
continue;
|
|
71792
|
+
}
|
|
71793
|
+
if (currentContent === backupContent) {
|
|
71794
|
+
try {
|
|
71795
|
+
fs$1$3.rmSync(backupPath);
|
|
71796
|
+
} catch (error) {
|
|
71797
|
+
process.stderr.write(`[react-doctor] Failed to delete stale backup ${backupPath}: ${messageFromUnknown(error)}\n`);
|
|
71798
|
+
blockedPaths.add(originalPath);
|
|
71799
|
+
}
|
|
71800
|
+
continue;
|
|
71801
|
+
}
|
|
71802
|
+
if (currentContent !== neutralizeContent(backupContent)) {
|
|
71803
|
+
process.stderr.write(`[react-doctor] Did not overwrite changed file ${originalPath}. Recover it manually from ${backupPath}.\n`);
|
|
71804
|
+
blockedPaths.add(originalPath);
|
|
71805
|
+
continue;
|
|
71806
|
+
}
|
|
71807
|
+
try {
|
|
71808
|
+
fs$1$3.writeFileSync(originalPath, backupContent);
|
|
71809
|
+
fs$1$3.rmSync(backupPath);
|
|
71810
|
+
} catch (error) {
|
|
71811
|
+
process.stderr.write(`[react-doctor] Failed to restore ${originalPath} from backup: ${messageFromUnknown(error)}\n`);
|
|
71812
|
+
blockedPaths.add(originalPath);
|
|
71813
|
+
}
|
|
71814
|
+
}
|
|
71815
|
+
removeBackupRootIfEmpty(rootDirectory);
|
|
71816
|
+
return blockedPaths;
|
|
71817
|
+
};
|
|
71654
71818
|
const neutralizeDisableDirectives = async (rootDirectory, includePaths, options = {}) => {
|
|
71655
71819
|
const resolvedRootDirectory = fs$1$3.realpathSync(rootDirectory);
|
|
71820
|
+
const blockedPaths = /* @__PURE__ */ new Set();
|
|
71656
71821
|
const leasedPaths = /* @__PURE__ */ new Set();
|
|
71657
71822
|
let isRestored = false;
|
|
71658
71823
|
const restore = () => {
|
|
@@ -71665,16 +71830,24 @@ const neutralizeDisableDirectives = async (rootDirectory, includePaths, options
|
|
|
71665
71830
|
if (lease.referenceCount > 0) continue;
|
|
71666
71831
|
neutralizedFileLeases.delete(absolutePath);
|
|
71667
71832
|
try {
|
|
71668
|
-
fs$1$3.
|
|
71833
|
+
const currentContent = fs$1$3.readFileSync(absolutePath, "utf-8");
|
|
71834
|
+
if (currentContent !== lease.neutralizedContent && currentContent !== lease.originalContent) {
|
|
71835
|
+
process.stderr.write(`[react-doctor] Did not overwrite changed file ${absolutePath}. Recover it manually from ${lease.backupPath}.\n`);
|
|
71836
|
+
continue;
|
|
71837
|
+
}
|
|
71838
|
+
if (currentContent === lease.neutralizedContent) fs$1$3.writeFileSync(absolutePath, lease.originalContent);
|
|
71839
|
+
fs$1$3.rmSync(lease.backupPath, { force: true });
|
|
71669
71840
|
} catch (error) {
|
|
71670
|
-
process.stderr.write(`[react-doctor] Failed to restore inline disable directives in ${absolutePath}: ${messageFromUnknown(error)}
|
|
71841
|
+
process.stderr.write(`[react-doctor] Failed to restore inline disable directives in ${absolutePath}: ${messageFromUnknown(error)}. The backup remains at ${lease.backupPath}.\n`);
|
|
71671
71842
|
}
|
|
71672
71843
|
}
|
|
71844
|
+
removeBackupRootIfEmpty(resolvedRootDirectory);
|
|
71673
71845
|
};
|
|
71674
71846
|
const onExit = () => restore();
|
|
71675
71847
|
process.once("exit", onExit);
|
|
71676
71848
|
const leaseCandidatePath = (absolutePath) => {
|
|
71677
71849
|
if (leasedPaths.has(absolutePath)) return;
|
|
71850
|
+
if (blockedPaths.has(absolutePath)) return;
|
|
71678
71851
|
const existingLease = neutralizedFileLeases.get(absolutePath);
|
|
71679
71852
|
if (existingLease) {
|
|
71680
71853
|
existingLease.referenceCount += 1;
|
|
@@ -71689,9 +71862,20 @@ const neutralizeDisableDirectives = async (rootDirectory, includePaths, options
|
|
|
71689
71862
|
}
|
|
71690
71863
|
const neutralizedContent = neutralizeContent(originalContent);
|
|
71691
71864
|
if (neutralizedContent !== originalContent) {
|
|
71865
|
+
const backupPath = getBackupPath(resolvedRootDirectory, absolutePath);
|
|
71866
|
+
if (backupPath === null) return;
|
|
71867
|
+
try {
|
|
71868
|
+
fs$1$3.mkdirSync(path$1$1.dirname(backupPath), { recursive: true });
|
|
71869
|
+
fs$1$3.writeFileSync(backupPath, originalContent, { flag: "wx" });
|
|
71870
|
+
} catch (error) {
|
|
71871
|
+
process.stderr.write(`[react-doctor] Did not modify ${absolutePath}: ${messageFromUnknown(error)}. Check ${backupPath}.\n`);
|
|
71872
|
+
return;
|
|
71873
|
+
}
|
|
71692
71874
|
fs$1$3.writeFileSync(absolutePath, neutralizedContent);
|
|
71693
71875
|
neutralizedFileLeases.set(absolutePath, {
|
|
71876
|
+
backupPath,
|
|
71694
71877
|
originalContent,
|
|
71878
|
+
neutralizedContent,
|
|
71695
71879
|
referenceCount: 1
|
|
71696
71880
|
});
|
|
71697
71881
|
leasedPaths.add(absolutePath);
|
|
@@ -71699,6 +71883,8 @@ const neutralizeDisableDirectives = async (rootDirectory, includePaths, options
|
|
|
71699
71883
|
};
|
|
71700
71884
|
try {
|
|
71701
71885
|
await withOverlappingInitializationLock(resolvedRootDirectory, async () => {
|
|
71886
|
+
for (const blockedPath of recoverOrphanedBackups(resolvedRootDirectory)) blockedPaths.add(blockedPath);
|
|
71887
|
+
if (options.recoverOnly) return;
|
|
71702
71888
|
for (const absolutePath of collectNeutralizationCandidatePaths(resolvedRootDirectory, [], includePaths)) if (neutralizedFileLeases.has(absolutePath)) leaseCandidatePath(absolutePath);
|
|
71703
71889
|
const discoveredRelativePaths = await (options.findFiles ?? findFilesWithDisableDirectives)(resolvedRootDirectory, includePaths);
|
|
71704
71890
|
for (const absolutePath of collectNeutralizationCandidatePaths(resolvedRootDirectory, discoveredRelativePaths, includePaths)) leaseCandidatePath(absolutePath);
|
|
@@ -74061,7 +74247,7 @@ const runOxlint = async (options) => {
|
|
|
74061
74247
|
const pluginPath = resolvePluginPath();
|
|
74062
74248
|
const extendsPaths = (adoptExistingLintConfig && !customRulesOnly ? detectUserLintConfigPaths(rootDirectory) : []).filter(canOxlintExtendConfig);
|
|
74063
74249
|
const userPlugins = includedTags.size > 0 ? [] : resolveUserPlugins(userConfig?.plugins, configSourceDirectory);
|
|
74064
|
-
const restoreDisableDirectives =
|
|
74250
|
+
const restoreDisableDirectives = await neutralizeDisableDirectives(rootDirectory, includePaths ?? options.precomputedSourceFiles?.map((sourceFile) => sourceFile.path), { recoverOnly: respectInlineDisables });
|
|
74065
74251
|
const configDirectory = fs$1$3.mkdtempSync(path$1$1.join(os.tmpdir(), "react-doctor-oxlintrc-"));
|
|
74066
74252
|
const configPath = path$1$1.join(configDirectory, "oxlintrc.json");
|
|
74067
74253
|
try {
|
|
@@ -76532,6 +76718,7 @@ const METRIC = {
|
|
|
76532
76718
|
tuiIssueStreamShown: "tui.issue_stream_shown",
|
|
76533
76719
|
tuiProjectPathContextShown: "tui.project_path_context_shown",
|
|
76534
76720
|
tuiProjectSelectShown: "tui.project_select_shown",
|
|
76721
|
+
tuiCiRecommendationShown: "tui.ci_recommendation_shown",
|
|
76535
76722
|
tuiReportActionSelected: "tui.report_action_selected",
|
|
76536
76723
|
tuiCancelled: "tui.cancelled",
|
|
76537
76724
|
tuiScanInlineShown: "tui.scan_inline_shown",
|
|
@@ -76580,7 +76767,7 @@ const makeNoopConsole = () => ({
|
|
|
76580
76767
|
});
|
|
76581
76768
|
//#endregion
|
|
76582
76769
|
//#region src/cli/utils/version.ts
|
|
76583
|
-
const VERSION = "0.9.12-dev.
|
|
76770
|
+
const VERSION = "0.9.12-dev.2133985";
|
|
76584
76771
|
//#endregion
|
|
76585
76772
|
//#region src/cli/utils/json-mode.ts
|
|
76586
76773
|
let context = null;
|
|
@@ -76924,5 +77111,5 @@ const recordDistribution = (name, value, options = {}) => {
|
|
|
76924
77111
|
//#endregion
|
|
76925
77112
|
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 };
|
|
76926
77113
|
|
|
76927
|
-
//# sourceMappingURL=record-metric-
|
|
76928
|
-
//# debugId=
|
|
77114
|
+
//# sourceMappingURL=record-metric-D-lvwUld.js.map
|
|
77115
|
+
//# debugId=fc80fe2b-9bf0-5cf1-8347-76a1bdb3d136
|
|
@@ -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]="302a0953-4e36-5b0f-b05a-7abb9d147e12")}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-D-lvwUld.js";
|
|
4
|
+
import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-BMf4C2Ho.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-R7qwdCqP.js.map
|
|
64
|
+
//# debugId=302a0953-4e36-5b0f-b05a-7abb9d147e12
|
|
@@ -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]="eec84527-6b55-5e4d-9897-16b590253110")}catch(e){}}();
|
|
3
|
+
import { O as REACT_DOCTOR_CONFIG_PROJECT_NAME, T as METRIC, t as recordCount } from "./record-metric-D-lvwUld.js";
|
|
4
|
+
import { u as isCommandAvailable } from "./install-github-workflow-DHfC7l5M.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-CAvwgr8H.js.map
|
|
279
|
+
//# debugId=eec84527-6b55-5e4d-9897-16b590253110
|
|
@@ -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 { Jt as isPathInsideDirectory, Nt as filterSourceFiles, wr as toCanonicalPath } from "./record-metric-
|
|
4
|
-
import { M as cliLogger } from "./install-doctor-script-
|
|
5
|
-
import { d as detectDefaultBranch, f as runCommand, l as prompts, 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]="844c3a8a-191c-5def-9e9f-96f052fcc78f")}catch(e){}}();
|
|
3
|
+
import { Jt as isPathInsideDirectory, Nt as filterSourceFiles, wr as toCanonicalPath } from "./record-metric-D-lvwUld.js";
|
|
4
|
+
import { M as cliLogger } from "./install-doctor-script-1sBrw2pV.js";
|
|
5
|
+
import { d as detectDefaultBranch, f as runCommand, l as prompts, u as isCommandAvailable } from "./install-github-workflow-DHfC7l5M.js";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
7
7
|
//#region src/cli/utils/path-format.ts
|
|
8
8
|
const toForwardSlashes = (filePath) => filePath.replaceAll("\\", "/");
|
|
@@ -335,5 +335,5 @@ const finalizeScope = async ({ requested, diffInfo, skipPrompts, isQuiet }) => {
|
|
|
335
335
|
//#endregion
|
|
336
336
|
export { isValidBlockingLevel as a, openWorkflowPullRequest as c, warnDeprecatedDiff as i, stageWorkflowFile as l, isScopeValue as n, pickBlockingLevel as o, resolveScope as r, resolveBlockingLevel as s, finalizeScope as t, toForwardSlashes as u };
|
|
337
337
|
|
|
338
|
-
//# sourceMappingURL=resolve-scope-
|
|
339
|
-
//# debugId=
|
|
338
|
+
//# sourceMappingURL=resolve-scope-Dzj_xz-v.js.map
|
|
339
|
+
//# debugId=844c3a8a-191c-5def-9e9f-96f052fcc78f
|