react-doctor 0.9.12-dev.ffc2d14 → 0.9.13-dev.fd23edc
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 +33 -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-BuOtLrzK.js → build-section-divider-CUtO-gXD.js} +8 -22
- package/dist/{ci-DVVsf25h.js → ci-DjilJaw4.js} +12 -11
- package/dist/cli.js +116 -35
- package/dist/{design-Y1pcA2uj.js → design-CXLKbARh.js} +4 -4
- package/dist/{devtools-D8NTVj81.js → devtools-CC2PAZ85.js} +3 -3
- package/dist/{exit-gracefully-DnXGONjj.js → exit-gracefully-DTLgxZZ5.js} +15 -9
- package/dist/get-east-asian-width-Bv2TD3Xj.js +444 -0
- package/dist/{report-error-MGKyeIns.js → handle-error-BqaqFvmc.js} +18 -68
- package/dist/index.d.ts +32 -0
- package/dist/index.js +585 -286
- package/dist/{inspect-g3_lzs3l.js → inspect-BIfnzKGq.js} +38 -28
- package/dist/{install-doctor-script-DmEWQpVJ.js → install-doctor-script-B1U08lUD.js} +7 -449
- package/dist/{install-github-workflow-Dx6Pl9Wl.js → install-github-workflow-CkOl0wCn.js} +10 -6
- package/dist/{install-02Lq6wKC.js → install-nhJ65X-y.js} +9 -8
- package/dist/{install-react-doctor-CMCXgenA.js → install-react-doctor-Dm35Egex.js} +8 -8
- package/dist/{run-scan-app-CDDu7P32.js → jsx-runtime-C1t3eR6p.js} +280 -2774
- package/dist/path-format-DnHpmJwG.js +9 -0
- package/dist/{print-branded-header-kbvWYuGv.js → print-branded-header-qOJiGkuW.js} +4 -4
- package/dist/project-analysis-worker.js +54 -53
- package/dist/prompt-runtime-scan-url-m88LMtMP.js +240 -0
- package/dist/{read-object-file-Cwhr9OIi.js → read-object-file-Cv41FpZo.js} +4 -4
- package/dist/{record-metric-CFfsgcVs.js → record-metric-u8youmM2.js} +548 -235
- package/dist/report-error-CkFgxJTQ.js +64 -0
- package/dist/{report-workflow-result-DGg9xopH.js → report-workflow-result-Wh1SQuOu.js} +5 -5
- package/dist/{resolve-scope-CXS-5jLR.js → resolve-scope-CHCpJtks.js} +8 -10
- package/dist/{rules-CThlosPx.js → rules-C30QFptP.js} +6 -6
- package/dist/run-scan-app-yTBDucJ3.js +2511 -0
- package/dist/runtime-scan/browser-probe.iife.js +855 -0
- package/dist/runtime-scan-VH25Yf8H.js +770 -0
- package/dist/sanitize-runtime-url-crVHbQlW.js +76 -0
- package/dist/scan-CNSRWEtJ.js +47 -0
- package/dist/{should-fail-scan-gate-C0Bo5Gqy.js → should-fail-scan-gate-Cw6KeoRT.js} +20 -112
- package/dist/{should-skip-prompts-BqrtVX4G.js → should-skip-prompts-B5zkkkKR.js} +4 -4
- package/dist/should-use-tui-S9255AG_.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-BxyvqsOy.js → telemetry-runtime-B2rpGWMl.js} +55 -25
- package/dist/unref-stdin-SK3WfwxS.js +12 -0
- package/dist/{version-S-8vvWFi.js → version-KQbGQSGN.js} +4 -4
- package/dist/{why-DXfx0oL9.js → why-B-l2qTCV.js} +4 -4
- package/dist/with-run-span-Dk1M8cnH.js +110 -0
- package/package.json +9 -6
- package/dist/scan-4I1mvxBO.js +0 -53
|
@@ -0,0 +1,64 @@
|
|
|
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]="e1796673-35c6-524e-8a7c-4e2d431c5a18")}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-u8youmM2.js";
|
|
4
|
+
import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-B2rpGWMl.js";
|
|
5
|
+
import { r as recordRunTraceId, t as getActiveRunTrace } from "./active-run-trace-dlIZeEvb.js";
|
|
6
|
+
import * as Sentry from "@sentry/node";
|
|
7
|
+
//#region src/cli/utils/report-error.ts
|
|
8
|
+
/**
|
|
9
|
+
* Sends an error to Sentry — enriched with a fresh snapshot of the current run
|
|
10
|
+
* (version, platform, CI/agent, invocation, scanned project) and, when a run
|
|
11
|
+
* transaction is in flight, linked to its trace via the scope's propagation
|
|
12
|
+
* context so the crash and its transaction share a `trace_id` — then waits for
|
|
13
|
+
* delivery before the caller exits. The CLI tears down synchronously after
|
|
14
|
+
* rendering an error, so the awaited `flush` is what actually gets the event
|
|
15
|
+
* (and any in-flight transaction) off the machine.
|
|
16
|
+
*
|
|
17
|
+
* Returns the Sentry event id so the caller can surface it as a reference the
|
|
18
|
+
* user can quote when reporting the bug; returns `undefined` when Sentry was
|
|
19
|
+
* never initialized (`--no-score`, tests, or a missing DSN) or delivery failed.
|
|
20
|
+
* Swallows any transport failure so telemetry can never mask the user's
|
|
21
|
+
* original error.
|
|
22
|
+
*/
|
|
23
|
+
const reportErrorToSentry = async (error) => {
|
|
24
|
+
if (!Sentry.isInitialized()) return void 0;
|
|
25
|
+
if (isExpectedUserError(error)) return void 0;
|
|
26
|
+
try {
|
|
27
|
+
const { tags, contexts } = buildSentryScope();
|
|
28
|
+
let reason = "unknown";
|
|
29
|
+
if (isReactDoctorError(error)) reason = error.reason._tag;
|
|
30
|
+
else if (error instanceof Error) reason = error.name;
|
|
31
|
+
recordCount(METRIC.cliError, 1, {
|
|
32
|
+
command: typeof tags.command === "string" ? tags.command : void 0,
|
|
33
|
+
reason
|
|
34
|
+
});
|
|
35
|
+
const runTrace = getActiveRunTrace();
|
|
36
|
+
const eventId = Sentry.withScope((scope) => {
|
|
37
|
+
for (const [name, context] of Object.entries(contexts)) scope.setContext(name, context);
|
|
38
|
+
scope.setTags(tags);
|
|
39
|
+
if (runTrace) {
|
|
40
|
+
scope.setContext("axiom", {
|
|
41
|
+
traceId: runTrace.traceId,
|
|
42
|
+
runId: getRunId()
|
|
43
|
+
});
|
|
44
|
+
scope.setPropagationContext({
|
|
45
|
+
traceId: runTrace.traceId,
|
|
46
|
+
parentSpanId: runTrace.spanId,
|
|
47
|
+
sampled: runTrace.sampled,
|
|
48
|
+
sampleRand: Math.random()
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
recordRunTraceId(scope.getPropagationContext().traceId);
|
|
52
|
+
return Sentry.captureException(error);
|
|
53
|
+
});
|
|
54
|
+
await Promise.all([Sentry.flush(SENTRY_FLUSH_TIMEOUT_MS), shutdownTelemetry()]);
|
|
55
|
+
return eventId;
|
|
56
|
+
} catch {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
//#endregion
|
|
61
|
+
export { reportErrorToSentry as t };
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=report-error-CkFgxJTQ.js.map
|
|
64
|
+
//# debugId=e1796673-35c6-524e-8a7c-4e2d431c5a18
|
|
@@ -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 {
|
|
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]="dab94c07-c930-5e26-bd14-ab67fced3dd1")}catch(e){}}();
|
|
3
|
+
import { O as REACT_DOCTOR_CONFIG_PROJECT_NAME, T as METRIC, t as recordCount } from "./record-metric-u8youmM2.js";
|
|
4
|
+
import { u as isCommandAvailable } from "./install-github-workflow-CkOl0wCn.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-Wh1SQuOu.js.map
|
|
279
|
+
//# debugId=dab94c07-c930-5e26-bd14-ab67fced3dd1
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7f1513de-80f8-540d-b2ba-70a625935795")}catch(e){}}();
|
|
3
|
+
import { Jt as isPathInsideDirectory, Nt as filterSourceFiles, wr as toCanonicalPath } from "./record-metric-u8youmM2.js";
|
|
4
|
+
import { t as toForwardSlashes } from "./path-format-DnHpmJwG.js";
|
|
5
|
+
import { M as cliLogger } from "./install-doctor-script-B1U08lUD.js";
|
|
6
|
+
import { d as detectDefaultBranch, f as runCommand, l as prompts, u as isCommandAvailable } from "./install-github-workflow-CkOl0wCn.js";
|
|
6
7
|
import * as path$1 from "node:path";
|
|
7
|
-
//#region src/cli/utils/path-format.ts
|
|
8
|
-
const toForwardSlashes = (filePath) => filePath.replaceAll("\\", "/");
|
|
9
|
-
//#endregion
|
|
10
8
|
//#region src/cli/utils/open-workflow-pull-request.ts
|
|
11
9
|
const NEW_BRANCH_PREFIX = "react-doctor/add-github-actions";
|
|
12
10
|
const DEFAULT_COMMIT_MESSAGE = "ci: add React Doctor GitHub Actions workflow";
|
|
@@ -333,7 +331,7 @@ const finalizeScope = async ({ requested, diffInfo, skipPrompts, isQuiet }) => {
|
|
|
333
331
|
return scanScope === "changed" ? "changed" : "full";
|
|
334
332
|
};
|
|
335
333
|
//#endregion
|
|
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
|
|
334
|
+
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 };
|
|
337
335
|
|
|
338
|
-
//# sourceMappingURL=resolve-scope-
|
|
339
|
-
//# debugId=
|
|
336
|
+
//# sourceMappingURL=resolve-scope-CHCpJtks.js.map
|
|
337
|
+
//# debugId=7f1513de-80f8-540d-b2ba-70a625935795
|
|
@@ -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 {
|
|
4
|
-
import {
|
|
5
|
-
import { t as readObjectFile } from "./read-object-file-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2180e238-8b72-5638-8135-c7e5f2e3a6dc")}catch(e){}}();
|
|
3
|
+
import { Kt as highlighter, Sr as isPlainObject, St as clearConfigCache, T as METRIC, Vt as getEquivalentRuleKeys, Zt as isSameRuleKey, bn as validateConfigTypes, gt as buildRuleDocsUrl, nr as COMPILER_CLEANUP_BUCKET, rn as loadConfigWithSource, rr as COMPILER_CLEANUP_RULE_KEYS, t as recordCount } from "./record-metric-u8youmM2.js";
|
|
4
|
+
import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-B1U08lUD.js";
|
|
5
|
+
import { t as readObjectFile } from "./read-object-file-Cv41FpZo.js";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
7
7
|
import * as fs$1 from "node:fs";
|
|
8
8
|
import { REACT_DOCTOR_RULES } from "oxlint-plugin-react-doctor/core";
|
|
@@ -577,5 +577,5 @@ const rulesUnignoreTagAction = async (tag, options) => {
|
|
|
577
577
|
//#endregion
|
|
578
578
|
export { rulesCategoryAction, rulesDisableAction, rulesEnableAction, rulesExplainAction, rulesIgnoreTagAction, rulesListAction, rulesSetAction, rulesUnignoreTagAction };
|
|
579
579
|
|
|
580
|
-
//# sourceMappingURL=rules-
|
|
581
|
-
//# debugId=
|
|
580
|
+
//# sourceMappingURL=rules-C30QFptP.js.map
|
|
581
|
+
//# debugId=2180e238-8b72-5638-8135-c7e5f2e3a6dc
|