react-doctor 0.9.12-dev.a2b460d → 0.9.12-dev.adc3a91

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.
Files changed (50) hide show
  1. package/README.md +28 -1
  2. package/bin/react-doctor.js +1 -9
  3. package/dist/active-run-trace-dlIZeEvb.js +18 -0
  4. package/dist/active-scan-abort-registry-DwG6tSPy.js +28 -0
  5. package/dist/{build-section-divider-Vz879zXD.js → build-section-divider-Dv6m6j69.js} +10 -25
  6. package/dist/{ci-BVYrYekU.js → ci-Dcd3uL9T.js} +13 -12
  7. package/dist/cli.js +84 -32
  8. package/dist/{design-D-TYN_tr.js → design-BNyZe3w-.js} +4 -4
  9. package/dist/{devtools-DPRVRu3S.js → devtools-BiC-AP3B.js} +4 -4
  10. package/dist/{exit-gracefully-Cjv5kC_l.js → exit-gracefully-Dh5YXDbT.js} +15 -9
  11. package/dist/get-east-asian-width-Cglw13G7.js +444 -0
  12. package/dist/{report-error-1l7v6_dE.js → handle-error-dBFOogZg.js} +18 -68
  13. package/dist/index.d.ts +53 -42
  14. package/dist/index.js +55135 -54706
  15. package/dist/{inspect-kkvDHKDE.js → inspect-CyuCR1pv.js} +22 -20
  16. package/dist/{install-doctor-script-D58Hr1dM.js → install-doctor-script-CbqTpviA.js} +7 -449
  17. package/dist/{install-github-workflow-DkMicv8E.js → install-github-workflow-DLw7rmkB.js} +10 -6
  18. package/dist/{install-ZeYvD9Rw.js → install-hA22sIab.js} +9 -8
  19. package/dist/{install-react-doctor-CjgE52al.js → install-react-doctor-tvBM6Rfq.js} +47 -45
  20. package/dist/{run-scan-app-Ciq22jzp.js → jsx-runtime-Ckwofk1u.js} +281 -2759
  21. package/dist/{print-branded-header-D4QYSu-h.js → print-branded-header-C12WC-t7.js} +4 -4
  22. package/dist/project-analysis-worker.d.ts +1 -0
  23. package/dist/project-analysis-worker.js +51901 -0
  24. package/dist/prompt-runtime-scan-url-jie2F0Cp.js +240 -0
  25. package/dist/{read-object-file-OFRlvCAL.js → read-object-file-D3nE_zn5.js} +4 -4
  26. package/dist/{record-metric-CMe2d1Xv.js → record-metric-0CLCYZUM.js} +3273 -6036
  27. package/dist/report-error-BQQg-7YD.js +64 -0
  28. package/dist/{report-workflow-result-EagkH_v9.js → report-workflow-result-DtFfzMv7.js} +5 -5
  29. package/dist/{resolve-scope-CMNrOdDf.js → resolve-scope-Vfpv9BNM.js} +6 -6
  30. package/dist/{rules-CzR1qUru.js → rules--f7blLSe.js} +6 -6
  31. package/dist/run-scan-app-DmrHa81A.js +2510 -0
  32. package/dist/runtime-scan/browser-probe.iife.js +855 -0
  33. package/dist/runtime-scan-DhL9erRS.js +770 -0
  34. package/dist/sanitize-runtime-url-r1wId2Bs.js +76 -0
  35. package/dist/{scan-D4m5r4Rs.js → scan-B0UeUfKj.js} +10 -22
  36. package/dist/semver-DFtnEmN-.js +3219 -0
  37. package/dist/{should-fail-scan-gate-lMTlhEhE.js → should-fail-scan-gate-BscVoE6r.js} +153 -184
  38. package/dist/{should-skip-prompts-mXKZBNCz.js → should-skip-prompts-CLybciiZ.js} +4 -4
  39. package/dist/should-use-tui-Bxxe6pqm.js +25 -0
  40. package/dist/skills/improve-threejs/SKILL.md +102 -0
  41. package/dist/skills/performance/SKILL.md +113 -0
  42. package/dist/skills/react-doctor/SKILL.md +6 -0
  43. package/dist/{unref-stdin-Cxhw67r6.js → telemetry-runtime-k0WVe-zH.js} +57 -33
  44. package/dist/unref-stdin-BKT_s38a.js +12 -0
  45. package/dist/{version-CnvVY2VD.js → version-CpTdauSi.js} +4 -4
  46. package/dist/{why-BktDEhhH.js → why-CvFMs9O1.js} +4 -4
  47. package/dist/with-run-span-DYghG7i4.js +110 -0
  48. package/package.json +8 -9
  49. package/dist/chunk-q7NCDQ7-.js +0 -28
  50. package/dist/lsp.js +0 -81145
@@ -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]="d4d87b96-cc87-5774-9047-daf1166eebb9")}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-0CLCYZUM.js";
4
+ import { n as shutdownTelemetry, r as isExpectedUserError } from "./telemetry-runtime-k0WVe-zH.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-BQQg-7YD.js.map
64
+ //# debugId=d4d87b96-cc87-5774-9047-daf1166eebb9
@@ -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]="58b948e5-fd1e-5347-af35-6bb38cf4316b")}catch(e){}}();
3
- import { D as REACT_DOCTOR_CONFIG_PROJECT_NAME, t as recordCount, w as METRIC } from "./record-metric-CMe2d1Xv.js";
4
- import { u as isCommandAvailable } from "./install-github-workflow-DkMicv8E.js";
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]="92575f75-739d-5d82-8c80-a09ae5c194d5")}catch(e){}}();
3
+ import { O as REACT_DOCTOR_CONFIG_PROJECT_NAME, T as METRIC, t as recordCount } from "./record-metric-0CLCYZUM.js";
4
+ import { u as isCommandAvailable } from "./install-github-workflow-DLw7rmkB.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-EagkH_v9.js.map
279
- //# debugId=58b948e5-fd1e-5347-af35-6bb38cf4316b
278
+ //# sourceMappingURL=report-workflow-result-DtFfzMv7.js.map
279
+ //# debugId=92575f75-739d-5d82-8c80-a09ae5c194d5
@@ -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]="b23a6187-c78a-54c4-8c35-931d06f1c65d")}catch(e){}}();
3
- import { Jt as filterSourceFiles, Rn as toCanonicalPath, pn as isPathInsideDirectory } from "./record-metric-CMe2d1Xv.js";
4
- import { L as cliLogger } from "./install-doctor-script-D58Hr1dM.js";
5
- import { d as detectDefaultBranch, f as runCommand, l as prompts, u as isCommandAvailable } from "./install-github-workflow-DkMicv8E.js";
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]="68dd54cd-61e0-59c0-900c-9d02444296ca")}catch(e){}}();
3
+ import { Jt as isPathInsideDirectory, Nt as filterSourceFiles, wr as toCanonicalPath } from "./record-metric-0CLCYZUM.js";
4
+ import { M as cliLogger } from "./install-doctor-script-CbqTpviA.js";
5
+ import { d as detectDefaultBranch, f as runCommand, l as prompts, u as isCommandAvailable } from "./install-github-workflow-DLw7rmkB.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-CMNrOdDf.js.map
339
- //# debugId=b23a6187-c78a-54c4-8c35-931d06f1c65d
338
+ //# sourceMappingURL=resolve-scope-Vfpv9BNM.js.map
339
+ //# debugId=68dd54cd-61e0-59c0-900c-9d02444296ca
@@ -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]="dfaccccc-0f72-5a95-877d-7d307db09b22")}catch(e){}}();
3
- import { Bn as validateConfigTypes, Pt as buildRuleDocsUrl, Q as COMPILER_CLEANUP_RULE_KEYS, Rt as clearConfigCache, Sn as loadConfigWithSource, Z as COMPILER_CLEANUP_BUCKET, _n as isSameRuleKey, cn as highlighter, mn as isPlainObject, rn as getEquivalentRuleKeys, t as recordCount, w as METRIC } from "./record-metric-CMe2d1Xv.js";
4
- import { L as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-D58Hr1dM.js";
5
- import { t as readObjectFile } from "./read-object-file-OFRlvCAL.js";
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]="ef090747-6510-5289-b915-eac2a69930f2")}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-0CLCYZUM.js";
4
+ import { M as cliLogger, n as findNearestPackageDirectory } from "./install-doctor-script-CbqTpviA.js";
5
+ import { t as readObjectFile } from "./read-object-file-D3nE_zn5.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-CzR1qUru.js.map
581
- //# debugId=dfaccccc-0f72-5a95-877d-7d307db09b22
580
+ //# sourceMappingURL=rules--f7blLSe.js.map
581
+ //# debugId=ef090747-6510-5289-b915-eac2a69930f2