react-doctor 0.9.12-dev.0b670aa → 0.9.12-dev.1d3e4a6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/dist/active-run-trace-dlIZeEvb.js +18 -0
- package/dist/active-scan-abort-registry-DwG6tSPy.js +28 -0
- package/dist/{build-section-divider-CJ7k-BvF.js → build-section-divider-8MOZLIsm.js} +8 -22
- package/dist/{ci-Dannv-cF.js → ci-BkncxruQ.js} +12 -11
- package/dist/cli.js +76 -24
- package/dist/{design-9x5DReyL.js → design-cWsjx19m.js} +4 -4
- package/dist/{devtools-D8NTVj81.js → devtools-BiC-AP3B.js} +3 -3
- package/dist/{exit-gracefully-ti2wONpM.js → exit-gracefully-B9tEGAKH.js} +15 -9
- package/dist/get-east-asian-width-Cglw13G7.js +444 -0
- package/dist/{report-error-BlOAg03W.js → handle-error-wbMFUdUK.js} +6 -61
- package/dist/index.d.ts +34 -2
- package/dist/index.js +334 -205
- package/dist/{inspect-C3itFiEW.js → inspect-Bz2rayph.js} +17 -16
- package/dist/{install-CjIJL6S5.js → install-DdckCi3Z.js} +9 -8
- package/dist/{install-doctor-script-0sdZ4SY8.js → install-doctor-script-jOg4qbkK.js} +7 -449
- package/dist/{install-github-workflow-DQ8_lhAW.js → install-github-workflow-C5OkC7nA.js} +6 -6
- package/dist/{install-react-doctor-DRG8hdL4.js → install-react-doctor-W8P-PVpX.js} +8 -8
- package/dist/{run-scan-app-Cgn4ELJF.js → jsx-runtime-0eiF0jis.js} +280 -2769
- package/dist/{print-branded-header-Dc1KdrcV.js → print-branded-header-_cUJmAUD.js} +4 -4
- package/dist/project-analysis-worker.js +3 -3
- package/dist/prompt-runtime-scan-url-CV2AUqdk.js +240 -0
- package/dist/{read-object-file-rblJxHxN.js → read-object-file-DOfcpaZX.js} +4 -4
- package/dist/{record-metric-Dgg2b2LG.js → record-metric-BA5ry-7d.js} +338 -188
- package/dist/report-error-CFe3r9gh.js +64 -0
- package/dist/{report-workflow-result-Dp4dCUxw.js → report-workflow-result-BoDN1Z77.js} +5 -5
- package/dist/{resolve-scope-CbeXgE9z.js → resolve-scope-BVNh_icv.js} +6 -6
- package/dist/{rules-ClDrNCc3.js → rules-CyIHtrnI.js} +6 -6
- package/dist/run-scan-app-BhUlnxaV.js +2509 -0
- package/dist/runtime-scan/browser-probe.iife.js +855 -0
- package/dist/runtime-scan-CUt6T5J3.js +770 -0
- package/dist/sanitize-runtime-url-CWANxE3L.js +76 -0
- package/dist/{scan-Caa_ogFB.js → scan-DU_zcchs.js} +10 -22
- package/dist/{should-fail-scan-gate-BGzNJApW.js → should-fail-scan-gate-CDwqCAPq.js} +23 -114
- package/dist/{should-skip-prompts-Bbl0ToUI.js → should-skip-prompts-B9za5uX9.js} +4 -4
- package/dist/should-use-tui-BR82qmYC.js +25 -0
- package/dist/skills/improve-threejs/SKILL.md +102 -0
- package/dist/skills/performance/SKILL.md +113 -0
- package/dist/skills/react-doctor/SKILL.md +6 -0
- package/dist/{unref-stdin-C7d7_3va.js → telemetry-runtime-C9dZxrK_.js} +5 -23
- package/dist/unref-stdin-BKT_s38a.js +12 -0
- package/dist/{version-Bjql-CLM.js → version-yw_bHX_4.js} +4 -4
- package/dist/{why-BqG2EML8.js → why-CdGev87Z.js} +4 -4
- package/dist/with-run-span-CCVNobt7.js +110 -0
- package/package.json +9 -6
|
@@ -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 { i as __toESM
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0f26b2a2-cc81-5777-adad-9ad6ba2720c0")}catch(e){}}();
|
|
3
|
+
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
4
|
import { n as require_picomatch, t as require_semver } from "./semver-DFtnEmN-.js";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import * as NodeChildProcess from "node:child_process";
|
|
@@ -27,7 +27,7 @@ import { STATUS_CODES } from "node:http";
|
|
|
27
27
|
import { gzipSync } from "node:zlib";
|
|
28
28
|
import { performance as performance$1 } from "node:perf_hooks";
|
|
29
29
|
//#region ../core/dist/collect-unplugin-auto-import-global-scopes-Dno9RW5R.js
|
|
30
|
-
var import_picomatch = /* @__PURE__ */ __toESM
|
|
30
|
+
var import_picomatch = /* @__PURE__ */ __toESM(require_picomatch(), 1);
|
|
31
31
|
const HTML_FILE_PATTERN = /\.html$/i;
|
|
32
32
|
const SOURCE_FILE_PATTERN = /\.(?:astro|tsx?|jsx?|mts|mjs|[hH][tT][mM][lL])$/;
|
|
33
33
|
const GENERATED_BUNDLE_FILE_PATTERN = /\.(iife|umd|global|min)\.m?js$/i;
|
|
@@ -22136,7 +22136,7 @@ Union([
|
|
|
22136
22136
|
]);
|
|
22137
22137
|
//#endregion
|
|
22138
22138
|
//#region ../../node_modules/.pnpm/baseline-browser-mapping@2.9.19/node_modules/baseline-browser-mapping/dist/index.cjs
|
|
22139
|
-
var require_dist = /* @__PURE__ */ __commonJSMin
|
|
22139
|
+
var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
22140
22140
|
const s = {
|
|
22141
22141
|
chrome: { releases: [
|
|
22142
22142
|
[
|
|
@@ -41386,7 +41386,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
41386
41386
|
}));
|
|
41387
41387
|
//#endregion
|
|
41388
41388
|
//#region ../../node_modules/.pnpm/node-releases@2.0.27/node_modules/node-releases/data/processed/envs.json
|
|
41389
|
-
var require_envs = /* @__PURE__ */ __commonJSMin
|
|
41389
|
+
var require_envs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
41390
41390
|
module.exports = [
|
|
41391
41391
|
{
|
|
41392
41392
|
"name": "nodejs",
|
|
@@ -44168,7 +44168,7 @@ var require_envs = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
44168
44168
|
}));
|
|
44169
44169
|
//#endregion
|
|
44170
44170
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/data/browsers.js
|
|
44171
|
-
var require_browsers$1 = /* @__PURE__ */ __commonJSMin
|
|
44171
|
+
var require_browsers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
44172
44172
|
module.exports = {
|
|
44173
44173
|
A: "ie",
|
|
44174
44174
|
B: "edge",
|
|
@@ -44193,12 +44193,12 @@ var require_browsers$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
44193
44193
|
}));
|
|
44194
44194
|
//#endregion
|
|
44195
44195
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/unpacker/browsers.js
|
|
44196
|
-
var require_browsers = /* @__PURE__ */ __commonJSMin
|
|
44196
|
+
var require_browsers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
44197
44197
|
module.exports.browsers = require_browsers$1();
|
|
44198
44198
|
}));
|
|
44199
44199
|
//#endregion
|
|
44200
44200
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/data/browserVersions.js
|
|
44201
|
-
var require_browserVersions$1 = /* @__PURE__ */ __commonJSMin
|
|
44201
|
+
var require_browserVersions$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
44202
44202
|
module.exports = {
|
|
44203
44203
|
"0": "117",
|
|
44204
44204
|
"1": "118",
|
|
@@ -44450,12 +44450,12 @@ var require_browserVersions$1 = /* @__PURE__ */ __commonJSMin$1(((exports, modul
|
|
|
44450
44450
|
}));
|
|
44451
44451
|
//#endregion
|
|
44452
44452
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/unpacker/browserVersions.js
|
|
44453
|
-
var require_browserVersions = /* @__PURE__ */ __commonJSMin
|
|
44453
|
+
var require_browserVersions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
44454
44454
|
module.exports.browserVersions = require_browserVersions$1();
|
|
44455
44455
|
}));
|
|
44456
44456
|
//#endregion
|
|
44457
44457
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/data/agents.js
|
|
44458
|
-
var require_agents$1 = /* @__PURE__ */ __commonJSMin
|
|
44458
|
+
var require_agents$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
44459
44459
|
module.exports = {
|
|
44460
44460
|
A: {
|
|
44461
44461
|
A: {
|
|
@@ -48824,7 +48824,7 @@ var require_agents$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
48824
48824
|
}));
|
|
48825
48825
|
//#endregion
|
|
48826
48826
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/unpacker/agents.js
|
|
48827
|
-
var require_agents = /* @__PURE__ */ __commonJSMin
|
|
48827
|
+
var require_agents = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
48828
48828
|
const browsers = require_browsers().browsers;
|
|
48829
48829
|
const versions = require_browserVersions().browserVersions;
|
|
48830
48830
|
const agentsData = require_agents$1();
|
|
@@ -48857,7 +48857,7 @@ var require_agents = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
48857
48857
|
}));
|
|
48858
48858
|
//#endregion
|
|
48859
48859
|
//#region ../../node_modules/.pnpm/electron-to-chromium@1.5.286/node_modules/electron-to-chromium/versions.js
|
|
48860
|
-
var require_versions = /* @__PURE__ */ __commonJSMin
|
|
48860
|
+
var require_versions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
48861
48861
|
module.exports = {
|
|
48862
48862
|
"0.20": "39",
|
|
48863
48863
|
"0.21": "41",
|
|
@@ -49091,7 +49091,7 @@ var require_versions = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
49091
49091
|
}));
|
|
49092
49092
|
//#endregion
|
|
49093
49093
|
//#region ../../node_modules/.pnpm/node-releases@2.0.27/node_modules/node-releases/data/release-schedule/release-schedule.json
|
|
49094
|
-
var require_release_schedule = /* @__PURE__ */ __commonJSMin
|
|
49094
|
+
var require_release_schedule = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49095
49095
|
module.exports = {
|
|
49096
49096
|
"v0.8": {
|
|
49097
49097
|
"start": "2012-06-25",
|
|
@@ -49248,7 +49248,7 @@ var require_release_schedule = /* @__PURE__ */ __commonJSMin$1(((exports, module
|
|
|
49248
49248
|
}));
|
|
49249
49249
|
//#endregion
|
|
49250
49250
|
//#region ../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/error.js
|
|
49251
|
-
var require_error = /* @__PURE__ */ __commonJSMin
|
|
49251
|
+
var require_error = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49252
49252
|
function BrowserslistError(message) {
|
|
49253
49253
|
this.name = "BrowserslistError";
|
|
49254
49254
|
this.message = message;
|
|
@@ -49260,7 +49260,7 @@ var require_error = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
49260
49260
|
}));
|
|
49261
49261
|
//#endregion
|
|
49262
49262
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/lib/statuses.js
|
|
49263
|
-
var require_statuses = /* @__PURE__ */ __commonJSMin
|
|
49263
|
+
var require_statuses = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49264
49264
|
module.exports = {
|
|
49265
49265
|
1: "ls",
|
|
49266
49266
|
2: "rec",
|
|
@@ -49273,7 +49273,7 @@ var require_statuses = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
49273
49273
|
}));
|
|
49274
49274
|
//#endregion
|
|
49275
49275
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/lib/supported.js
|
|
49276
|
-
var require_supported = /* @__PURE__ */ __commonJSMin
|
|
49276
|
+
var require_supported = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49277
49277
|
module.exports = {
|
|
49278
49278
|
y: 1,
|
|
49279
49279
|
n: 2,
|
|
@@ -49286,7 +49286,7 @@ var require_supported = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
49286
49286
|
}));
|
|
49287
49287
|
//#endregion
|
|
49288
49288
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/unpacker/feature.js
|
|
49289
|
-
var require_feature = /* @__PURE__ */ __commonJSMin
|
|
49289
|
+
var require_feature = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49290
49290
|
const statuses = require_statuses();
|
|
49291
49291
|
const supported = require_supported();
|
|
49292
49292
|
const browsers = require_browsers().browsers;
|
|
@@ -49329,7 +49329,7 @@ var require_feature = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
49329
49329
|
}));
|
|
49330
49330
|
//#endregion
|
|
49331
49331
|
//#region ../../node_modules/.pnpm/caniuse-lite@1.0.30001769/node_modules/caniuse-lite/dist/unpacker/region.js
|
|
49332
|
-
var require_region = /* @__PURE__ */ __commonJSMin
|
|
49332
|
+
var require_region = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49333
49333
|
const browsers = require_browsers().browsers;
|
|
49334
49334
|
function unpackRegion(packed) {
|
|
49335
49335
|
return Object.keys(packed).reduce((list, browser) => {
|
|
@@ -49348,7 +49348,7 @@ var require_region = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
49348
49348
|
}));
|
|
49349
49349
|
//#endregion
|
|
49350
49350
|
//#region ../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/node.js
|
|
49351
|
-
var require_node = /* @__PURE__ */ __commonJSMin
|
|
49351
|
+
var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49352
49352
|
var feature = require_feature().default;
|
|
49353
49353
|
var region = require_region().default;
|
|
49354
49354
|
var fs$2 = __require("fs");
|
|
@@ -49641,7 +49641,7 @@ var require_node = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
49641
49641
|
}));
|
|
49642
49642
|
//#endregion
|
|
49643
49643
|
//#region ../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/parse.js
|
|
49644
|
-
var require_parse = /* @__PURE__ */ __commonJSMin
|
|
49644
|
+
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49645
49645
|
var AND_REGEXP = /^\s+and\s+(.*)/i;
|
|
49646
49646
|
var OR_REGEXP = /^(?:,\s*|\s+or\s+)(.*)/i;
|
|
49647
49647
|
function flatten(array) {
|
|
@@ -49707,7 +49707,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
49707
49707
|
}));
|
|
49708
49708
|
//#endregion
|
|
49709
49709
|
//#region ../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/index.js
|
|
49710
|
-
var require_browserslist = /* @__PURE__ */ __commonJSMin
|
|
49710
|
+
var require_browserslist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49711
49711
|
var bbm = require_dist();
|
|
49712
49712
|
var jsReleases = require_envs();
|
|
49713
49713
|
var agents = require_agents().agents;
|
|
@@ -50729,8 +50729,8 @@ var require_browserslist = /* @__PURE__ */ __commonJSMin$1(((exports, module) =>
|
|
|
50729
50729
|
}));
|
|
50730
50730
|
//#endregion
|
|
50731
50731
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Brand.js
|
|
50732
|
-
var import_semver = /* @__PURE__ */ __toESM
|
|
50733
|
-
var import_browserslist = /* @__PURE__ */ __toESM
|
|
50732
|
+
var import_semver = /* @__PURE__ */ __toESM(require_semver(), 1);
|
|
50733
|
+
var import_browserslist = /* @__PURE__ */ __toESM(require_browserslist(), 1);
|
|
50734
50734
|
/**
|
|
50735
50735
|
* Returns a `Constructor` that **does not apply any runtime checks** and just
|
|
50736
50736
|
* returns the provided value.
|
|
@@ -60327,6 +60327,72 @@ const warn$1 = (...args) => consoleWith((console) => sync$2(() => {
|
|
|
60327
60327
|
}));
|
|
60328
60328
|
//#endregion
|
|
60329
60329
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Cache.js
|
|
60330
|
+
var import_picocolors = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
60331
|
+
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
60332
|
+
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
60333
|
+
let formatter = (open, close, replace = open) => (input) => {
|
|
60334
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
60335
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
60336
|
+
};
|
|
60337
|
+
let replaceClose = (string, close, replace, index) => {
|
|
60338
|
+
let result = "", cursor = 0;
|
|
60339
|
+
do {
|
|
60340
|
+
result += string.substring(cursor, index) + replace;
|
|
60341
|
+
cursor = index + close.length;
|
|
60342
|
+
index = string.indexOf(close, cursor);
|
|
60343
|
+
} while (~index);
|
|
60344
|
+
return result + string.substring(cursor);
|
|
60345
|
+
};
|
|
60346
|
+
let createColors = (enabled = isColorSupported) => {
|
|
60347
|
+
let f = enabled ? formatter : () => String;
|
|
60348
|
+
return {
|
|
60349
|
+
isColorSupported: enabled,
|
|
60350
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
60351
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
60352
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
60353
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
60354
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
60355
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
60356
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
60357
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
60358
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
60359
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
60360
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
60361
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
60362
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
60363
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
60364
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
60365
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
60366
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
60367
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
60368
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
60369
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
60370
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
60371
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
60372
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
60373
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
60374
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
60375
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
60376
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
60377
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
60378
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
60379
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
60380
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
60381
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
60382
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
60383
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
60384
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
60385
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
60386
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
60387
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
60388
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
60389
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
60390
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
60391
|
+
};
|
|
60392
|
+
};
|
|
60393
|
+
module.exports = createColors();
|
|
60394
|
+
module.exports.createColors = createColors;
|
|
60395
|
+
})))(), 1);
|
|
60330
60396
|
/**
|
|
60331
60397
|
* Caches values loaded by an Effect lookup function.
|
|
60332
60398
|
*
|
|
@@ -62296,34 +62362,13 @@ function traceSegmentInternal(segments, memo, line, column, bias) {
|
|
|
62296
62362
|
}
|
|
62297
62363
|
//#endregion
|
|
62298
62364
|
//#region ../core/dist/index.js
|
|
62299
|
-
var __create = Object.create;
|
|
62300
|
-
var __defProp = Object.defineProperty;
|
|
62301
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
62302
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
62303
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
62304
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
62305
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
62306
|
-
var __copyProps = (to, from, except, desc) => {
|
|
62307
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
62308
|
-
key = keys[i];
|
|
62309
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
62310
|
-
get: ((k) => from[k]).bind(null, key),
|
|
62311
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
62312
|
-
});
|
|
62313
|
-
}
|
|
62314
|
-
return to;
|
|
62315
|
-
};
|
|
62316
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
62317
|
-
value: mod,
|
|
62318
|
-
enumerable: true
|
|
62319
|
-
}) : target, mod));
|
|
62320
62365
|
var ProjectNotFoundError = class extends Error {
|
|
62321
62366
|
name = "ProjectNotFoundError";
|
|
62322
62367
|
directory;
|
|
62323
62368
|
kind;
|
|
62324
62369
|
constructor(directory, options) {
|
|
62325
62370
|
const kind = options?.kind ?? "no-project";
|
|
62326
|
-
super(kind === "missing-path" ? `Scan target "${directory}" does not exist. Check the path and try again.` : `No React project found in ${directory}. Expected a package.json at the directory root or a nested package.json with a React dependency.`, options);
|
|
62371
|
+
super(kind === "missing-path" ? `Scan target "${directory}" does not exist. Check the path and try again.` : `No React or Three.js project found in ${directory}. Expected a package.json at the directory root or a nested package.json with a React or Three.js dependency.`, options);
|
|
62327
62372
|
this.directory = directory;
|
|
62328
62373
|
this.kind = kind;
|
|
62329
62374
|
}
|
|
@@ -62357,7 +62402,7 @@ var AmbiguousProjectError = class extends Error {
|
|
|
62357
62402
|
directory;
|
|
62358
62403
|
candidates;
|
|
62359
62404
|
constructor(directory, candidates, options) {
|
|
62360
|
-
super(`Multiple React projects found under ${directory} (${candidates.length} candidates): ${candidates.join(", ")}. Re-run diagnose() with one of those subdirectories, or iterate them yourself.`, options);
|
|
62405
|
+
super(`Multiple React or Three.js projects found under ${directory} (${candidates.length} candidates): ${candidates.join(", ")}. Re-run diagnose() with one of those subdirectories, or iterate them yourself.`, options);
|
|
62361
62406
|
this.directory = directory;
|
|
62362
62407
|
this.candidates = candidates;
|
|
62363
62408
|
}
|
|
@@ -63691,15 +63736,29 @@ const detectPreES2023Target = (directory) => {
|
|
|
63691
63736
|
}
|
|
63692
63737
|
return false;
|
|
63693
63738
|
};
|
|
63739
|
+
const SHADCN_CONFIG_FILE_NAME = "components.json";
|
|
63740
|
+
const detectShadcnUi = (directory) => {
|
|
63741
|
+
if (isFile(path$1$1.join(directory, SHADCN_CONFIG_FILE_NAME))) return true;
|
|
63742
|
+
if (isProjectBoundary(directory)) return false;
|
|
63743
|
+
let ancestorDirectory = path$1$1.dirname(directory);
|
|
63744
|
+
while (ancestorDirectory !== path$1$1.dirname(ancestorDirectory)) {
|
|
63745
|
+
if (isFile(path$1$1.join(ancestorDirectory, SHADCN_CONFIG_FILE_NAME))) return true;
|
|
63746
|
+
if (isProjectBoundary(ancestorDirectory)) return false;
|
|
63747
|
+
ancestorDirectory = path$1$1.dirname(ancestorDirectory);
|
|
63748
|
+
}
|
|
63749
|
+
return false;
|
|
63750
|
+
};
|
|
63694
63751
|
const FRAMEWORK_PACKAGES = {
|
|
63695
63752
|
next: "nextjs",
|
|
63696
63753
|
"@tanstack/react-start": "tanstack-start",
|
|
63697
63754
|
"@remix-run/react": "remix",
|
|
63698
63755
|
gatsby: "gatsby",
|
|
63699
63756
|
astro: "astro",
|
|
63757
|
+
"@astrojs/react": "astro",
|
|
63700
63758
|
vite: "vite",
|
|
63701
63759
|
"react-scripts": "cra",
|
|
63702
63760
|
expo: "expo",
|
|
63761
|
+
"expo-router": "expo",
|
|
63703
63762
|
"react-native": "react-native"
|
|
63704
63763
|
};
|
|
63705
63764
|
const detectFramework = (dependencies) => {
|
|
@@ -64191,20 +64250,39 @@ const getDependencyDeclaration = ({ packageJson, packageName, sections }) => {
|
|
|
64191
64250
|
version: null
|
|
64192
64251
|
};
|
|
64193
64252
|
};
|
|
64194
|
-
const
|
|
64253
|
+
const REACT_PROJECT_DEPENDENCY_NAMES = new Set([
|
|
64195
64254
|
"react",
|
|
64255
|
+
"react-dom",
|
|
64196
64256
|
"react-native",
|
|
64197
64257
|
"next",
|
|
64198
|
-
"preact"
|
|
64258
|
+
"preact",
|
|
64259
|
+
"expo",
|
|
64260
|
+
"expo-router",
|
|
64261
|
+
"gatsby",
|
|
64262
|
+
"@remix-run/react",
|
|
64263
|
+
"@tanstack/react-start",
|
|
64264
|
+
"react-scripts",
|
|
64265
|
+
"@astrojs/react"
|
|
64199
64266
|
]);
|
|
64267
|
+
const REACT_THREE_FIBER_DEPENDENCY_NAMES = ["@react-three/fiber", "react-three-fiber"];
|
|
64268
|
+
const REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES = [
|
|
64269
|
+
...REACT_THREE_FIBER_DEPENDENCY_NAMES,
|
|
64270
|
+
"@react-three/drei",
|
|
64271
|
+
"@react-three/rapier",
|
|
64272
|
+
"@react-three/postprocessing",
|
|
64273
|
+
"@react-three/xr",
|
|
64274
|
+
"@react-three/cannon"
|
|
64275
|
+
];
|
|
64276
|
+
const THREE_DEPENDENCY_NAMES = ["three", ...REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES];
|
|
64200
64277
|
const hasReactDependency = (packageJson) => {
|
|
64201
64278
|
const allDependencies = {
|
|
64202
64279
|
...packageJson.peerDependencies,
|
|
64203
64280
|
...packageJson.dependencies,
|
|
64204
64281
|
...packageJson.devDependencies
|
|
64205
64282
|
};
|
|
64206
|
-
return Object.keys(allDependencies).some((packageName) =>
|
|
64283
|
+
return Object.keys(allDependencies).some((packageName) => REACT_PROJECT_DEPENDENCY_NAMES.has(packageName));
|
|
64207
64284
|
};
|
|
64285
|
+
const hasSupportedProjectDependency = (packageJson) => hasReactDependency(packageJson) || getDependencySpec(packageJson, "remotion") !== null || THREE_DEPENDENCY_NAMES.some((packageName) => getDependencySpec(packageJson, packageName) !== null);
|
|
64208
64286
|
const getPreactVersion = (packageJson) => getDependencySpec(packageJson, "preact");
|
|
64209
64287
|
const resolveCatalogBackedDependencyVersion = ({ rootDirectory, rootPackageJson, packageName, sourceDirectory = rootDirectory, sourcePackageJson = rootPackageJson, version }) => {
|
|
64210
64288
|
if (version === null || !isCatalogReference(version)) return version;
|
|
@@ -64395,7 +64473,7 @@ const listWorkspacePackages = (rootDirectory) => {
|
|
|
64395
64473
|
seenDirectories.add(workspacePackage.directory);
|
|
64396
64474
|
packages.push(workspacePackage);
|
|
64397
64475
|
};
|
|
64398
|
-
if (
|
|
64476
|
+
if (hasSupportedProjectDependency(packageJson)) pushIfNew({
|
|
64399
64477
|
name: packageJson.name ?? path$1$1.basename(rootDirectory),
|
|
64400
64478
|
directory: rootDirectory
|
|
64401
64479
|
});
|
|
@@ -64403,7 +64481,7 @@ const listWorkspacePackages = (rootDirectory) => {
|
|
|
64403
64481
|
const directories = resolveWorkspaceDirectories(rootDirectory, pattern);
|
|
64404
64482
|
for (const workspaceDirectory of directories) {
|
|
64405
64483
|
const workspacePackageJson = readPackageJson(path$1$1.join(workspaceDirectory, "package.json"));
|
|
64406
|
-
if (!
|
|
64484
|
+
if (!hasSupportedProjectDependency(workspacePackageJson)) continue;
|
|
64407
64485
|
pushIfNew({
|
|
64408
64486
|
name: workspacePackageJson.name ?? path$1$1.basename(workspaceDirectory),
|
|
64409
64487
|
directory: workspaceDirectory
|
|
@@ -64435,6 +64513,29 @@ const getTanStackQueryVersion = (packageJson) => {
|
|
|
64435
64513
|
packageNames: TANSTACK_REACT_QUERY_PACKAGES
|
|
64436
64514
|
});
|
|
64437
64515
|
};
|
|
64516
|
+
const hasAnyDependency = (packageJson, packageNames) => {
|
|
64517
|
+
const allDependencies = {
|
|
64518
|
+
...packageJson.peerDependencies,
|
|
64519
|
+
...packageJson.dependencies,
|
|
64520
|
+
...packageJson.devDependencies,
|
|
64521
|
+
...packageJson.optionalDependencies
|
|
64522
|
+
};
|
|
64523
|
+
return packageNames.some((packageName) => allDependencies[packageName] !== void 0);
|
|
64524
|
+
};
|
|
64525
|
+
const BASE_UI_PACKAGES = ["@base-ui-components/react", "@base-ui/react"];
|
|
64526
|
+
const hasBaseUiDependency = (packageJson) => hasAnyDependency(packageJson, BASE_UI_PACKAGES);
|
|
64527
|
+
const RADIX_UNIFIED_PACKAGE = "radix-ui";
|
|
64528
|
+
const RADIX_PRIMITIVE_PACKAGE_PREFIX = "@radix-ui/react-";
|
|
64529
|
+
const RADIX_NON_PRIMITIVE_PACKAGES = new Set(["@radix-ui/react-icons"]);
|
|
64530
|
+
const hasRadixUiDependency = (packageJson) => {
|
|
64531
|
+
const allDependencies = {
|
|
64532
|
+
...packageJson.peerDependencies,
|
|
64533
|
+
...packageJson.dependencies,
|
|
64534
|
+
...packageJson.devDependencies,
|
|
64535
|
+
...packageJson.optionalDependencies
|
|
64536
|
+
};
|
|
64537
|
+
return Object.keys(allDependencies).some((packageName) => packageName === RADIX_UNIFIED_PACKAGE || packageName.startsWith(RADIX_PRIMITIVE_PACKAGE_PREFIX) && !RADIX_NON_PRIMITIVE_PACKAGES.has(packageName));
|
|
64538
|
+
};
|
|
64438
64539
|
const STYLED_COMPONENTS_PACKAGES = ["styled-components"];
|
|
64439
64540
|
const getStyledComponentsVersion = (packageJson) => {
|
|
64440
64541
|
return getPreferredDependencyVersion({
|
|
@@ -64465,12 +64566,15 @@ const hasI18nDependency = (packageJson) => {
|
|
|
64465
64566
|
};
|
|
64466
64567
|
return I18N_PACKAGES.some((packageName) => allDependencies[packageName] !== void 0);
|
|
64467
64568
|
};
|
|
64569
|
+
const REACT_ARIA_COMPONENT_PACKAGES = ["react-aria-components"];
|
|
64570
|
+
const TANSTACK_TABLE_PACKAGES = ["@tanstack/react-table"];
|
|
64571
|
+
const TANSTACK_VIRTUAL_PACKAGES = ["@tanstack/react-virtual"];
|
|
64572
|
+
const TANSTACK_FORM_PACKAGES = ["@tanstack/react-form"];
|
|
64468
64573
|
const REANIMATED_DEPENDENCY_NAME = "react-native-reanimated";
|
|
64469
64574
|
const MOBX_REACT_PACKAGE_NAME = "mobx-react";
|
|
64470
64575
|
const MOBX_REACT_LITE_PACKAGE_NAME = "mobx-react-lite";
|
|
64471
64576
|
const MOBX_STATE_TREE_PACKAGE_NAME = "mobx-state-tree";
|
|
64472
64577
|
const MOBX_REACT_OBSERVER_PACKAGE_NAME = "mobx-react-observer";
|
|
64473
|
-
const REACT_THREE_FIBER_DEPENDENCY_NAMES = ["@react-three/fiber", "react-three-fiber"];
|
|
64474
64578
|
const REACT_THREE_FIBER_SECTIONS = [
|
|
64475
64579
|
"dependencies",
|
|
64476
64580
|
"peerDependencies",
|
|
@@ -64483,8 +64587,6 @@ const THREE_DEPENDENCY_SECTIONS = [
|
|
|
64483
64587
|
"optionalDependencies",
|
|
64484
64588
|
"devDependencies"
|
|
64485
64589
|
];
|
|
64486
|
-
const REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES = [...REACT_THREE_FIBER_DEPENDENCY_NAMES, "@react-three/drei"];
|
|
64487
|
-
const THREE_DEPENDENCY_NAMES = [...REACT_THREE_FIBER_ECOSYSTEM_DEPENDENCY_NAMES, "three"];
|
|
64488
64590
|
const REACT_ROUTER_DEPENDENCY_NAMES = [
|
|
64489
64591
|
"@react-router/dev",
|
|
64490
64592
|
"react-router-dom",
|
|
@@ -64658,6 +64760,13 @@ const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, roo
|
|
|
64658
64760
|
});
|
|
64659
64761
|
if (styledComponentsVersion && shouldReplaceStyledComponentsVersion(facts.styledComponentsVersion, styledComponentsVersion)) facts.styledComponentsVersion = styledComponentsVersion;
|
|
64660
64762
|
facts.hasI18nLibrary = facts.hasI18nLibrary || hasI18nDependency(packageJson);
|
|
64763
|
+
facts.hasShadcnUi = facts.hasShadcnUi || detectShadcnUi(directory);
|
|
64764
|
+
facts.hasRadixUi = facts.hasRadixUi || hasRadixUiDependency(packageJson);
|
|
64765
|
+
facts.hasBaseUi = facts.hasBaseUi || hasBaseUiDependency(packageJson);
|
|
64766
|
+
facts.hasReactAriaComponents = facts.hasReactAriaComponents || hasAnyDependency(packageJson, REACT_ARIA_COMPONENT_PACKAGES);
|
|
64767
|
+
facts.hasTanstackTable = facts.hasTanstackTable || hasAnyDependency(packageJson, TANSTACK_TABLE_PACKAGES);
|
|
64768
|
+
facts.hasTanstackVirtual = facts.hasTanstackVirtual || hasAnyDependency(packageJson, TANSTACK_VIRTUAL_PACKAGES);
|
|
64769
|
+
facts.hasTanstackForm = facts.hasTanstackForm || hasAnyDependency(packageJson, TANSTACK_FORM_PACKAGES);
|
|
64661
64770
|
for (const packageName of REACT_THREE_FIBER_DEPENDENCY_NAMES) {
|
|
64662
64771
|
const version = resolveCatalogBackedDependencyVersion({
|
|
64663
64772
|
rootDirectory,
|
|
@@ -64760,6 +64869,13 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
|
|
|
64760
64869
|
tanstackQueryVersion: null,
|
|
64761
64870
|
styledComponentsVersion: null,
|
|
64762
64871
|
hasI18nLibrary: false,
|
|
64872
|
+
hasShadcnUi: false,
|
|
64873
|
+
hasRadixUi: false,
|
|
64874
|
+
hasBaseUi: false,
|
|
64875
|
+
hasReactAriaComponents: false,
|
|
64876
|
+
hasTanstackTable: false,
|
|
64877
|
+
hasTanstackVirtual: false,
|
|
64878
|
+
hasTanstackForm: false,
|
|
64763
64879
|
hasReactNativeAwarePackage: false,
|
|
64764
64880
|
hasReanimatedAwarePackage: false,
|
|
64765
64881
|
hasSsrDependency: false,
|
|
@@ -64985,13 +65101,13 @@ const detectTargetBlankOpenerProtection = (directory, packageJson) => {
|
|
|
64985
65101
|
if (browserslistRequirement === "noreferrer" || electronRequirement === "noreferrer") return "noreferrer";
|
|
64986
65102
|
if (browserslistRequirement === "noopener" || electronRequirement === "noopener") return "noopener";
|
|
64987
65103
|
};
|
|
64988
|
-
const
|
|
65104
|
+
const toSupportedWorkspacePackages = (directories) => {
|
|
64989
65105
|
const packages = [];
|
|
64990
65106
|
for (const directory of directories) {
|
|
64991
65107
|
const packageJsonPath = path$1$1.join(directory, "package.json");
|
|
64992
65108
|
if (!isFile(packageJsonPath)) continue;
|
|
64993
65109
|
const packageJson = readPackageJson(packageJsonPath);
|
|
64994
|
-
if (!
|
|
65110
|
+
if (!hasSupportedProjectDependency(packageJson)) continue;
|
|
64995
65111
|
const name = packageJson.name ?? path$1$1.basename(directory);
|
|
64996
65112
|
packages.push({
|
|
64997
65113
|
name,
|
|
@@ -65004,7 +65120,7 @@ const listManifestWorkspacePackages = (rootDirectory) => {
|
|
|
65004
65120
|
if (isFile(path$1$1.join(rootDirectory, "package.json"))) return listWorkspacePackages(rootDirectory);
|
|
65005
65121
|
const patterns = parsePnpmWorkspacePatterns(rootDirectory);
|
|
65006
65122
|
const nxPatterns = patterns.length > 0 ? [] : getNxWorkspaceDirectories(rootDirectory);
|
|
65007
|
-
return
|
|
65123
|
+
return toSupportedWorkspacePackages((patterns.length > 0 ? patterns : nxPatterns).flatMap((pattern) => resolveWorkspaceDirectories(rootDirectory, pattern)));
|
|
65008
65124
|
};
|
|
65009
65125
|
const NON_PROJECT_DIRECTORIES = new Set([
|
|
65010
65126
|
"AppData",
|
|
@@ -65012,7 +65128,7 @@ const NON_PROJECT_DIRECTORIES = new Set([
|
|
|
65012
65128
|
"Library"
|
|
65013
65129
|
]);
|
|
65014
65130
|
const MAX_SCAN_DEPTH = 6;
|
|
65015
|
-
const
|
|
65131
|
+
const discoverSupportedSubprojectsByFilesystem = (rootDirectory) => {
|
|
65016
65132
|
const packages = [];
|
|
65017
65133
|
const pendingDirectories = [{
|
|
65018
65134
|
directory: rootDirectory,
|
|
@@ -65025,7 +65141,7 @@ const discoverReactSubprojectsByFilesystem = (rootDirectory) => {
|
|
|
65025
65141
|
const packageJsonPath = path$1$1.join(currentDirectory, "package.json");
|
|
65026
65142
|
if (isFile(packageJsonPath)) {
|
|
65027
65143
|
const packageJson = readPackageJson(packageJsonPath);
|
|
65028
|
-
if (
|
|
65144
|
+
if (hasSupportedProjectDependency(packageJson)) {
|
|
65029
65145
|
const name = packageJson.name ?? path$1$1.basename(currentDirectory);
|
|
65030
65146
|
packages.push({
|
|
65031
65147
|
name,
|
|
@@ -65045,11 +65161,11 @@ const discoverReactSubprojectsByFilesystem = (rootDirectory) => {
|
|
|
65045
65161
|
}
|
|
65046
65162
|
return packages;
|
|
65047
65163
|
};
|
|
65048
|
-
const
|
|
65164
|
+
const discoverSupportedSubprojects = (rootDirectory) => {
|
|
65049
65165
|
if (!isDirectory(rootDirectory)) return [];
|
|
65050
65166
|
const manifestPackages = listManifestWorkspacePackages(rootDirectory);
|
|
65051
65167
|
if (manifestPackages.length > 0) return manifestPackages;
|
|
65052
|
-
return
|
|
65168
|
+
return discoverSupportedSubprojectsByFilesystem(rootDirectory);
|
|
65053
65169
|
};
|
|
65054
65170
|
const cachedProjectInfos = /* @__PURE__ */ new Map();
|
|
65055
65171
|
/**
|
|
@@ -65104,6 +65220,12 @@ const discoverProjectWithoutPackageJson = (directory, options) => {
|
|
|
65104
65220
|
remotionVersion: null,
|
|
65105
65221
|
remotionMajorVersion: null,
|
|
65106
65222
|
hasI18nLibrary: false,
|
|
65223
|
+
hasRadixUi: false,
|
|
65224
|
+
hasBaseUi: false,
|
|
65225
|
+
hasReactAriaComponents: false,
|
|
65226
|
+
hasTanstackTable: false,
|
|
65227
|
+
hasTanstackVirtual: false,
|
|
65228
|
+
hasTanstackForm: false,
|
|
65107
65229
|
tanstackQueryVersion: null,
|
|
65108
65230
|
styledComponentsVersion: null,
|
|
65109
65231
|
hasThree: false,
|
|
@@ -65125,6 +65247,7 @@ const discoverProjectWithoutPackageJson = (directory, options) => {
|
|
|
65125
65247
|
shopifyFlashListMajorVersion: null,
|
|
65126
65248
|
hasReanimated: false,
|
|
65127
65249
|
reanimatedVersion: null,
|
|
65250
|
+
hasShadcnUi: detectShadcnUi(directory),
|
|
65128
65251
|
isPreES2023Target: hasOwnTsConfig && detectPreES2023Target(directory),
|
|
65129
65252
|
isStaticExport: false,
|
|
65130
65253
|
sourceFileCount
|
|
@@ -65287,6 +65410,12 @@ const discoverProject = (directory, options = {}) => {
|
|
|
65287
65410
|
hasReactCompilerLintPlugin: detectReactCompilerLintPlugin(directory, packageJson),
|
|
65288
65411
|
hasTanStackQuery: tanstackQueryVersion !== null,
|
|
65289
65412
|
hasI18nLibrary: workspaceFacts.hasI18nLibrary,
|
|
65413
|
+
hasRadixUi: workspaceFacts.hasRadixUi,
|
|
65414
|
+
hasBaseUi: workspaceFacts.hasBaseUi,
|
|
65415
|
+
hasReactAriaComponents: workspaceFacts.hasReactAriaComponents,
|
|
65416
|
+
hasTanstackTable: workspaceFacts.hasTanstackTable,
|
|
65417
|
+
hasTanstackVirtual: workspaceFacts.hasTanstackVirtual,
|
|
65418
|
+
hasTanstackForm: workspaceFacts.hasTanstackForm,
|
|
65290
65419
|
tanstackQueryVersion,
|
|
65291
65420
|
styledComponentsVersion: workspaceFacts.styledComponentsVersion,
|
|
65292
65421
|
valtioVersion,
|
|
@@ -65313,6 +65442,7 @@ const discoverProject = (directory, options = {}) => {
|
|
|
65313
65442
|
shopifyFlashListMajorVersion: shopifyFlashListVersion === null ? null : getLowestDependencyMajor(shopifyFlashListVersion),
|
|
65314
65443
|
hasReanimated,
|
|
65315
65444
|
reanimatedVersion,
|
|
65445
|
+
hasShadcnUi: workspaceFacts.hasShadcnUi,
|
|
65316
65446
|
isPreES2023Target,
|
|
65317
65447
|
isStaticExport: framework === "nextjs" && detectNextjsStaticExport(workspaceFacts.next.sourceDirectory ?? directory),
|
|
65318
65448
|
sourceFileCount
|
|
@@ -65320,16 +65450,31 @@ const discoverProject = (directory, options = {}) => {
|
|
|
65320
65450
|
cachedProjectInfos.set(directory, projectInfo);
|
|
65321
65451
|
return projectInfo;
|
|
65322
65452
|
};
|
|
65453
|
+
const REACT_COMPATIBLE_FRAMEWORKS = new Set([
|
|
65454
|
+
"nextjs",
|
|
65455
|
+
"tanstack-start",
|
|
65456
|
+
"cra",
|
|
65457
|
+
"remix",
|
|
65458
|
+
"gatsby",
|
|
65459
|
+
"expo",
|
|
65460
|
+
"react-native",
|
|
65461
|
+
"preact"
|
|
65462
|
+
]);
|
|
65463
|
+
/**
|
|
65464
|
+
* Whether project discovery resolved a React-compatible runtime directly or
|
|
65465
|
+
* through a framework whose runtime is necessarily React-compatible.
|
|
65466
|
+
*/
|
|
65467
|
+
const hasReactRuntime = (project) => project.reactVersion !== null || project.preactVersion !== null || REACT_COMPATIBLE_FRAMEWORKS.has(project.framework);
|
|
65323
65468
|
/**
|
|
65324
|
-
* A project is worth scanning when it has
|
|
65469
|
+
* A project is worth scanning when it has a supported runtime (the runtime-
|
|
65325
65470
|
* specific rules apply) OR it simply has source files to lint. The
|
|
65326
65471
|
* second arm is what lets a plain TypeScript/JavaScript codebase — no
|
|
65327
65472
|
* React dependency at all — run the framework-agnostic rules
|
|
65328
65473
|
* (security, architecture, zod, bundle-size, …) instead of hard-failing
|
|
65329
|
-
* with "No React dependency". Only a directory with neither
|
|
65330
|
-
* single source file has nothing to analyze.
|
|
65474
|
+
* with "No React dependency". Only a directory with neither a supported
|
|
65475
|
+
* runtime nor a single source file has nothing to analyze.
|
|
65331
65476
|
*/
|
|
65332
|
-
const isAnalyzableProject = (project) => project.
|
|
65477
|
+
const isAnalyzableProject = (project) => hasReactRuntime(project) || project.hasThree === true || project.hasRemotion === true || project.sourceFileCount > 0;
|
|
65333
65478
|
const LEGACY_RULE_KEY_TO_NATIVE_RULE_KEY = {
|
|
65334
65479
|
"deslop/circular-dependency": "react-doctor/circular-dependency",
|
|
65335
65480
|
"deslop/unused-dependency": "react-doctor/unused-dependency",
|
|
@@ -67503,11 +67648,11 @@ const resolveConfigRootDir = (config, configSourceDirectory) => {
|
|
|
67503
67648
|
};
|
|
67504
67649
|
const resolveDiagnoseTarget = (directory, options = {}) => {
|
|
67505
67650
|
if (isFile(path$1$1.join(directory, "package.json"))) return directory;
|
|
67506
|
-
const
|
|
67507
|
-
if (
|
|
67508
|
-
if (
|
|
67651
|
+
const subprojects = discoverSupportedSubprojects(directory);
|
|
67652
|
+
if (subprojects.length === 0) return null;
|
|
67653
|
+
if (subprojects.length === 1) return subprojects[0].directory;
|
|
67509
67654
|
if (options.allowAmbiguous === true) return null;
|
|
67510
|
-
throw new AmbiguousProjectError(directory,
|
|
67655
|
+
throw new AmbiguousProjectError(directory, subprojects.map((subproject) => path$1$1.relative(directory, subproject.directory)).toSorted());
|
|
67511
67656
|
};
|
|
67512
67657
|
/**
|
|
67513
67658
|
* The canonical entry-point translation shared by every public shell
|
|
@@ -69242,21 +69387,6 @@ function* collectSecurityScanFiles(rootDirectory, excludedDirectories = /* @__PU
|
|
|
69242
69387
|
}
|
|
69243
69388
|
}
|
|
69244
69389
|
}
|
|
69245
|
-
const REACT_COMPATIBLE_FRAMEWORKS = new Set([
|
|
69246
|
-
"nextjs",
|
|
69247
|
-
"tanstack-start",
|
|
69248
|
-
"cra",
|
|
69249
|
-
"remix",
|
|
69250
|
-
"gatsby",
|
|
69251
|
-
"expo",
|
|
69252
|
-
"react-native",
|
|
69253
|
-
"preact"
|
|
69254
|
-
]);
|
|
69255
|
-
/**
|
|
69256
|
-
* Whether project discovery resolved a React-compatible runtime directly or
|
|
69257
|
-
* through a framework whose runtime is necessarily React-compatible.
|
|
69258
|
-
*/
|
|
69259
|
-
const hasReactRuntime = (project) => project.reactVersion !== null || project.preactVersion !== null || REACT_COMPATIBLE_FRAMEWORKS.has(project.framework);
|
|
69260
69390
|
const CLIENT_ONLY_FRAMEWORKS = new Set([
|
|
69261
69391
|
"vite",
|
|
69262
69392
|
"cra",
|
|
@@ -69317,6 +69447,13 @@ const buildCapabilities = (project) => {
|
|
|
69317
69447
|
minor: 0
|
|
69318
69448
|
})) capabilities.add("tailwind:4");
|
|
69319
69449
|
}
|
|
69450
|
+
if (project.hasShadcnUi === true) capabilities.add("shadcn");
|
|
69451
|
+
if (project.hasRadixUi === true) capabilities.add("radix-ui");
|
|
69452
|
+
if (project.hasBaseUi === true) capabilities.add("base-ui");
|
|
69453
|
+
if (project.hasReactAriaComponents === true) capabilities.add("react-aria");
|
|
69454
|
+
if (project.hasTanstackTable === true) capabilities.add("tanstack-table");
|
|
69455
|
+
if (project.hasTanstackVirtual === true) capabilities.add("tanstack-virtual");
|
|
69456
|
+
if (project.hasTanstackForm === true) capabilities.add("tanstack-form");
|
|
69320
69457
|
if (project.zodVersion !== null) capabilities.add("zod");
|
|
69321
69458
|
if (project.zodMajorVersion !== null && project.zodMajorVersion >= 4) capabilities.add("zod:4");
|
|
69322
69459
|
if (project.mobxVersion !== void 0 && project.mobxVersion !== null || project.hasMobxReact === true || project.hasMobxReactLite === true || project.hasMobxStateTree === true || project.hasMobxReactObserver === true) capabilities.add("mobx");
|
|
@@ -69494,72 +69631,6 @@ const checkSecurityScanCooperative = async (rootDirectory, options = {}) => {
|
|
|
69494
69631
|
}
|
|
69495
69632
|
return session.diagnostics;
|
|
69496
69633
|
};
|
|
69497
|
-
var import_picocolors = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
69498
|
-
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
69499
|
-
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
69500
|
-
let formatter = (open, close, replace = open) => (input) => {
|
|
69501
|
-
let string = "" + input, index = string.indexOf(close, open.length);
|
|
69502
|
-
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
69503
|
-
};
|
|
69504
|
-
let replaceClose = (string, close, replace, index) => {
|
|
69505
|
-
let result = "", cursor = 0;
|
|
69506
|
-
do {
|
|
69507
|
-
result += string.substring(cursor, index) + replace;
|
|
69508
|
-
cursor = index + close.length;
|
|
69509
|
-
index = string.indexOf(close, cursor);
|
|
69510
|
-
} while (~index);
|
|
69511
|
-
return result + string.substring(cursor);
|
|
69512
|
-
};
|
|
69513
|
-
let createColors = (enabled = isColorSupported) => {
|
|
69514
|
-
let f = enabled ? formatter : () => String;
|
|
69515
|
-
return {
|
|
69516
|
-
isColorSupported: enabled,
|
|
69517
|
-
reset: f("\x1B[0m", "\x1B[0m"),
|
|
69518
|
-
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
69519
|
-
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
69520
|
-
italic: f("\x1B[3m", "\x1B[23m"),
|
|
69521
|
-
underline: f("\x1B[4m", "\x1B[24m"),
|
|
69522
|
-
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
69523
|
-
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
69524
|
-
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
69525
|
-
black: f("\x1B[30m", "\x1B[39m"),
|
|
69526
|
-
red: f("\x1B[31m", "\x1B[39m"),
|
|
69527
|
-
green: f("\x1B[32m", "\x1B[39m"),
|
|
69528
|
-
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
69529
|
-
blue: f("\x1B[34m", "\x1B[39m"),
|
|
69530
|
-
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
69531
|
-
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
69532
|
-
white: f("\x1B[37m", "\x1B[39m"),
|
|
69533
|
-
gray: f("\x1B[90m", "\x1B[39m"),
|
|
69534
|
-
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
69535
|
-
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
69536
|
-
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
69537
|
-
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
69538
|
-
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
69539
|
-
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
69540
|
-
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
69541
|
-
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
69542
|
-
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
69543
|
-
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
69544
|
-
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
69545
|
-
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
69546
|
-
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
69547
|
-
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
69548
|
-
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
69549
|
-
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
69550
|
-
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
69551
|
-
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
69552
|
-
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
69553
|
-
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
69554
|
-
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
69555
|
-
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
69556
|
-
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
69557
|
-
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
69558
|
-
};
|
|
69559
|
-
};
|
|
69560
|
-
module.exports = createColors();
|
|
69561
|
-
module.exports.createColors = createColors;
|
|
69562
|
-
})))(), 1);
|
|
69563
69634
|
const highlighter = {
|
|
69564
69635
|
error: import_picocolors.default.red,
|
|
69565
69636
|
warn: import_picocolors.default.yellow,
|
|
@@ -70975,7 +71046,11 @@ var Git = class Git extends Service()("react-doctor/Git") {
|
|
|
70975
71046
|
const symref = yield* runGit(directory, ["symbolic-ref", "refs/remotes/origin/HEAD"]);
|
|
70976
71047
|
if (symref.status === 0) {
|
|
70977
71048
|
const trimmed = trimOrNull(symref.stdout);
|
|
70978
|
-
if (trimmed !== null)
|
|
71049
|
+
if (trimmed !== null) {
|
|
71050
|
+
const branchName = trimmed.replace("refs/remotes/origin/", "");
|
|
71051
|
+
const remoteBranch = `origin/${branchName}`;
|
|
71052
|
+
return (yield* branchExists(directory, remoteBranch)) ? remoteBranch : branchName;
|
|
71053
|
+
}
|
|
70979
71054
|
}
|
|
70980
71055
|
const candidates = yield* runGit(directory, [
|
|
70981
71056
|
"for-each-ref",
|
|
@@ -70983,7 +71058,10 @@ var Git = class Git extends Service()("react-doctor/Git") {
|
|
|
70983
71058
|
...DEFAULT_BRANCH_CANDIDATES.map((candidate) => `refs/heads/${candidate}`)
|
|
70984
71059
|
]);
|
|
70985
71060
|
if (candidates.status !== 0) return null;
|
|
70986
|
-
|
|
71061
|
+
const localBranch = trimOrNull(candidates.stdout.split("\n")[0] ?? "");
|
|
71062
|
+
if (localBranch === null) return null;
|
|
71063
|
+
const remoteBranch = `origin/${localBranch}`;
|
|
71064
|
+
return (yield* branchExists(directory, remoteBranch)) ? remoteBranch : localBranch;
|
|
70987
71065
|
}).pipe(withSpan("Git.defaultBranch"));
|
|
70988
71066
|
const branchExists = (directory, branch) => runGit(directory, [
|
|
70989
71067
|
"rev-parse",
|
|
@@ -72876,7 +72954,7 @@ const buildRelatedLocations = (labels, filePath, sourceBuffer) => {
|
|
|
72876
72954
|
const isOxlintSpan = (value) => isRecord(value) && typeof value.offset === "number" && typeof value.length === "number" && typeof value.line === "number" && typeof value.column === "number";
|
|
72877
72955
|
const isOxlintLabel = (value) => isRecord(value) && isOxlintSpan(value.span);
|
|
72878
72956
|
const isMappableOxlintDiagnostic = (value) => isRecord(value) && typeof value.code === "string" && value.code.length > 0 && typeof value.filename === "string" && value.filename.length > 0 && (value.severity === "warning" || value.severity === "error") && Array.isArray(value.labels) && value.labels.every(isOxlintLabel);
|
|
72879
|
-
const isEngineFailureDiagnostic = (value) => !isRecord(value) || typeof value.filename !== "string" || value.filename.length === 0;
|
|
72957
|
+
const isEngineFailureDiagnostic = (value) => !isRecord(value) || typeof value.filename !== "string" || value.filename.length === 0 || typeof value.message === "string" && value.message.startsWith("Error running JS plugin.") && (typeof value.code !== "string" || value.code.length === 0) && Array.isArray(value.labels) && value.labels.length === 0;
|
|
72880
72958
|
const isOxlintOutput = (value) => isRecord(value) && Array.isArray(value.diagnostics);
|
|
72881
72959
|
/**
|
|
72882
72960
|
* Parses one oxlint subprocess's stdout into a flat `Diagnostic[]`.
|
|
@@ -73006,6 +73084,46 @@ const buildProfiledNodeArguments = (input) => [
|
|
|
73006
73084
|
...input.heapProfileDirectory ? ["--heap-prof", `--heap-prof-dir=${input.heapProfileDirectory}`] : [],
|
|
73007
73085
|
...input.argumentsList
|
|
73008
73086
|
];
|
|
73087
|
+
const buildOxlintTimingArguments = (argumentsList) => {
|
|
73088
|
+
const timingArguments = [...argumentsList];
|
|
73089
|
+
const formatFlagIndex = timingArguments.indexOf("--format");
|
|
73090
|
+
if (formatFlagIndex === -1 || formatFlagIndex + 1 >= timingArguments.length) throw new Error("Oxlint timing arguments require a --format value");
|
|
73091
|
+
timingArguments[formatFlagIndex + 1] = "default";
|
|
73092
|
+
timingArguments.push("--debug", "timings", "--quiet");
|
|
73093
|
+
return timingArguments;
|
|
73094
|
+
};
|
|
73095
|
+
const captureOxlintRuleTimings = (input) => new Promise((resolve, reject) => {
|
|
73096
|
+
const timingEnvironment = { ...input.environment };
|
|
73097
|
+
timingEnvironment.REACT_DOCTOR_RULE_TIMINGS_DIR = void 0;
|
|
73098
|
+
const timingChild = spawn(input.nodeBinaryPath, buildOxlintTimingArguments(input.argumentsList), {
|
|
73099
|
+
cwd: input.rootDirectory,
|
|
73100
|
+
env: timingEnvironment,
|
|
73101
|
+
stdio: [
|
|
73102
|
+
"ignore",
|
|
73103
|
+
"pipe",
|
|
73104
|
+
"pipe"
|
|
73105
|
+
]
|
|
73106
|
+
});
|
|
73107
|
+
const stdoutBuffers = [];
|
|
73108
|
+
const stderrBuffers = [];
|
|
73109
|
+
timingChild.stdout.on("data", (buffer) => stdoutBuffers.push(buffer));
|
|
73110
|
+
timingChild.stderr.on("data", (buffer) => stderrBuffers.push(buffer));
|
|
73111
|
+
timingChild.on("error", reject);
|
|
73112
|
+
timingChild.on("close", (_code, signal) => {
|
|
73113
|
+
if (signal) {
|
|
73114
|
+
reject(/* @__PURE__ */ new Error(`Oxlint timing pass was killed by ${signal}`));
|
|
73115
|
+
return;
|
|
73116
|
+
}
|
|
73117
|
+
const timingOutput = `${Buffer.concat(stdoutBuffers).toString("utf8")}\n${Buffer.concat(stderrBuffers).toString("utf8")}`;
|
|
73118
|
+
if (!timingOutput.includes("Rule timings:")) {
|
|
73119
|
+
resolve();
|
|
73120
|
+
return;
|
|
73121
|
+
}
|
|
73122
|
+
fs$1$3.mkdirSync(input.timingDirectory, { recursive: true });
|
|
73123
|
+
fs$1$3.writeFileSync(path$1$1.join(input.timingDirectory, `oxlint-${timingChild.pid ?? process.pid}.timings.txt`), timingOutput);
|
|
73124
|
+
resolve();
|
|
73125
|
+
});
|
|
73126
|
+
});
|
|
73009
73127
|
const lowerChildProcessPriority = (processId) => {
|
|
73010
73128
|
if (processId === void 0) return;
|
|
73011
73129
|
try {
|
|
@@ -73127,7 +73245,18 @@ const spawnOxlint = (args, rootDirectory, nodeBinaryPath, spawnTimeoutMs = OXLIN
|
|
|
73127
73245
|
return;
|
|
73128
73246
|
}
|
|
73129
73247
|
}
|
|
73130
|
-
|
|
73248
|
+
const timingDirectory = SANITIZED_ENV.REACT_DOCTOR_OXLINT_TIMINGS_DIR;
|
|
73249
|
+
if (timingDirectory === void 0) {
|
|
73250
|
+
resolve(output);
|
|
73251
|
+
return;
|
|
73252
|
+
}
|
|
73253
|
+
captureOxlintRuleTimings({
|
|
73254
|
+
argumentsList: args,
|
|
73255
|
+
environment: SANITIZED_ENV,
|
|
73256
|
+
nodeBinaryPath,
|
|
73257
|
+
rootDirectory,
|
|
73258
|
+
timingDirectory
|
|
73259
|
+
}).then(() => resolve(output), reject);
|
|
73131
73260
|
});
|
|
73132
73261
|
});
|
|
73133
73262
|
const PARALLELISM_EXHAUSTION_ERROR_CODES = new Set([
|
|
@@ -76397,6 +76526,7 @@ const METRIC = {
|
|
|
76397
76526
|
ciConfigured: "ci.configured",
|
|
76398
76527
|
rulesChanged: "rules.changed",
|
|
76399
76528
|
rulesQueried: "rules.queried",
|
|
76529
|
+
runtimeScanUrlPromptShown: "runtime_scan.url_prompt_shown",
|
|
76400
76530
|
tuiCompactReportShown: "tui.compact_report_shown",
|
|
76401
76531
|
tuiFindingNavigated: "tui.finding_navigated",
|
|
76402
76532
|
tuiIssueStreamShown: "tui.issue_stream_shown",
|
|
@@ -76450,7 +76580,7 @@ const makeNoopConsole = () => ({
|
|
|
76450
76580
|
});
|
|
76451
76581
|
//#endregion
|
|
76452
76582
|
//#region src/cli/utils/version.ts
|
|
76453
|
-
const VERSION = "0.9.12-dev.
|
|
76583
|
+
const VERSION = "0.9.12-dev.1d3e4a6";
|
|
76454
76584
|
//#endregion
|
|
76455
76585
|
//#region src/cli/utils/json-mode.ts
|
|
76456
76586
|
let context = null;
|
|
@@ -76488,13 +76618,14 @@ const installSilentConsole = () => {
|
|
|
76488
76618
|
"trace"
|
|
76489
76619
|
]) target[key] = source[key];
|
|
76490
76620
|
};
|
|
76491
|
-
const enableJsonMode = ({ compact, directory, outputFile }) => {
|
|
76621
|
+
const enableJsonMode = ({ compact, directory, outputFile, writeCancellationError }) => {
|
|
76492
76622
|
context = {
|
|
76493
76623
|
compact,
|
|
76494
76624
|
directory,
|
|
76495
76625
|
startTime: performance$1.now(),
|
|
76496
76626
|
mode: "full",
|
|
76497
|
-
outputFile: null
|
|
76627
|
+
outputFile: null,
|
|
76628
|
+
writeCancellationError
|
|
76498
76629
|
};
|
|
76499
76630
|
installSilentConsole();
|
|
76500
76631
|
if (outputFile) {
|
|
@@ -76533,6 +76664,13 @@ const writeJsonErrorReport = (error, sentryEventId) => {
|
|
|
76533
76664
|
process.stdout.write(INTERNAL_ERROR_JSON_FALLBACK);
|
|
76534
76665
|
}
|
|
76535
76666
|
};
|
|
76667
|
+
const writeJsonCancellationReport = () => {
|
|
76668
|
+
if (context?.writeCancellationError !== void 0) {
|
|
76669
|
+
context.writeCancellationError();
|
|
76670
|
+
return;
|
|
76671
|
+
}
|
|
76672
|
+
writeJsonErrorReport(/* @__PURE__ */ new Error("Scan cancelled by user (SIGINT/SIGTERM)"));
|
|
76673
|
+
};
|
|
76536
76674
|
//#endregion
|
|
76537
76675
|
//#region src/cli/utils/run-id.ts
|
|
76538
76676
|
let cachedRunId;
|
|
@@ -76541,10 +76679,14 @@ const getRunId = () => {
|
|
|
76541
76679
|
return cachedRunId;
|
|
76542
76680
|
};
|
|
76543
76681
|
//#endregion
|
|
76682
|
+
//#region src/cli/utils/scrub-run-arguments.ts
|
|
76683
|
+
const scrubRunArguments = (argumentsList) => anonymizeText(argumentsList.map((argument) => argument.replace(/^((?:--[^=]+=)?)(?:https?|wss?):\/\/.+$/i, "$1<url>")).join(" "));
|
|
76684
|
+
//#endregion
|
|
76544
76685
|
//#region src/cli/utils/build-run-context.ts
|
|
76545
76686
|
const ROOT_SUBCOMMANDS = new Set([
|
|
76546
76687
|
"design",
|
|
76547
76688
|
"install",
|
|
76689
|
+
"scan",
|
|
76548
76690
|
"setup"
|
|
76549
76691
|
]);
|
|
76550
76692
|
const detectInvokedVia = () => {
|
|
@@ -76585,7 +76727,7 @@ const buildRunContext = () => {
|
|
|
76585
76727
|
runId: getRunId(),
|
|
76586
76728
|
origin: detectOrigin(),
|
|
76587
76729
|
command: detectCommand(userArguments),
|
|
76588
|
-
argv:
|
|
76730
|
+
argv: scrubRunArguments(userArguments),
|
|
76589
76731
|
cwd: scrubSensitivePaths(process.cwd()),
|
|
76590
76732
|
node: process.version,
|
|
76591
76733
|
nodeMajor: detectNodeMajor(),
|
|
@@ -76615,33 +76757,41 @@ const buildRunContext = () => {
|
|
|
76615
76757
|
* omits `projectName` and `rootDirectory`, the two identifying fields, so the
|
|
76616
76758
|
* project can't be tied back to a specific company/repo.
|
|
76617
76759
|
*/
|
|
76618
|
-
const buildSentryProjectContext = (projectInfo) =>
|
|
76619
|
-
|
|
76620
|
-
|
|
76621
|
-
|
|
76622
|
-
|
|
76623
|
-
|
|
76624
|
-
|
|
76625
|
-
|
|
76626
|
-
|
|
76627
|
-
|
|
76628
|
-
|
|
76629
|
-
|
|
76630
|
-
|
|
76631
|
-
|
|
76632
|
-
|
|
76633
|
-
|
|
76634
|
-
|
|
76635
|
-
|
|
76636
|
-
|
|
76637
|
-
|
|
76638
|
-
|
|
76639
|
-
|
|
76640
|
-
|
|
76641
|
-
|
|
76642
|
-
|
|
76643
|
-
|
|
76644
|
-
|
|
76760
|
+
const buildSentryProjectContext = (projectInfo) => {
|
|
76761
|
+
const capabilities = buildCapabilities(projectInfo);
|
|
76762
|
+
const supportedRuntimes = [];
|
|
76763
|
+
if (capabilities.has("react")) supportedRuntimes.push("react");
|
|
76764
|
+
if (capabilities.has("three")) supportedRuntimes.push("three");
|
|
76765
|
+
if (capabilities.has("remotion")) supportedRuntimes.push("remotion");
|
|
76766
|
+
return {
|
|
76767
|
+
tags: {
|
|
76768
|
+
"project.framework": projectInfo.framework,
|
|
76769
|
+
"project.runtime": supportedRuntimes.join("+") || "unknown",
|
|
76770
|
+
"project.reactMajor": projectInfo.reactMajorVersion,
|
|
76771
|
+
"project.typescript": projectInfo.hasTypeScript,
|
|
76772
|
+
"project.reactCompiler": projectInfo.hasReactCompiler,
|
|
76773
|
+
"project.expo": projectInfo.expoVersion !== null,
|
|
76774
|
+
"project.reactNative": projectInfo.hasReactNativeWorkspace
|
|
76775
|
+
},
|
|
76776
|
+
context: {
|
|
76777
|
+
framework: projectInfo.framework,
|
|
76778
|
+
reactVersion: projectInfo.reactVersion,
|
|
76779
|
+
reactMajorVersion: projectInfo.reactMajorVersion,
|
|
76780
|
+
hasTypeScript: projectInfo.hasTypeScript,
|
|
76781
|
+
hasReactCompiler: projectInfo.hasReactCompiler,
|
|
76782
|
+
tanstackQueryVersion: projectInfo.tanstackQueryVersion,
|
|
76783
|
+
mobxVersion: projectInfo.mobxVersion,
|
|
76784
|
+
styledComponentsVersion: projectInfo.styledComponentsVersion,
|
|
76785
|
+
tailwindVersion: projectInfo.tailwindVersion,
|
|
76786
|
+
zodVersion: projectInfo.zodVersion,
|
|
76787
|
+
preactVersion: projectInfo.preactVersion,
|
|
76788
|
+
hasReactNativeWorkspace: projectInfo.hasReactNativeWorkspace,
|
|
76789
|
+
expoVersion: projectInfo.expoVersion,
|
|
76790
|
+
hasReanimated: projectInfo.hasReanimated,
|
|
76791
|
+
sourceFileCount: projectInfo.sourceFileCount
|
|
76792
|
+
}
|
|
76793
|
+
};
|
|
76794
|
+
};
|
|
76645
76795
|
let currentProjectInfo = null;
|
|
76646
76796
|
const setSentryProjectInfo = (projectInfo) => {
|
|
76647
76797
|
currentProjectInfo = projectInfo;
|
|
@@ -76772,7 +76922,7 @@ const recordDistribution = (name, value, options = {}) => {
|
|
|
76772
76922
|
} catch {}
|
|
76773
76923
|
};
|
|
76774
76924
|
//#endregion
|
|
76775
|
-
export {
|
|
76925
|
+
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 };
|
|
76776
76926
|
|
|
76777
|
-
//# sourceMappingURL=record-metric-
|
|
76778
|
-
//# debugId=
|
|
76927
|
+
//# sourceMappingURL=record-metric-BA5ry-7d.js.map
|
|
76928
|
+
//# debugId=0f26b2a2-cc81-5777-adad-9ad6ba2720c0
|