@mushi-mushi/core 1.33.2 → 1.33.4

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 CHANGED
@@ -6,6 +6,20 @@ The shared types, API client and utilities under every [Mushi Mushi](https://git
6
6
 
7
7
  **You probably don't need to install this directly.** Run `npx mushi-mushi` and the wizard installs the SDK for your framework ([`react`](https://npmjs.com/package/@mushi-mushi/react), [`vue`](https://npmjs.com/package/@mushi-mushi/vue), [`svelte`](https://npmjs.com/package/@mushi-mushi/svelte), [`angular`](https://npmjs.com/package/@mushi-mushi/angular), [`react-native`](https://npmjs.com/package/@mushi-mushi/react-native), [`capacitor`](https://npmjs.com/package/@mushi-mushi/capacitor) or [`web`](https://npmjs.com/package/@mushi-mushi/web)), which depends on this one. Reach for `core` when you build your own adapter or need the types.
8
8
 
9
+ ```bash
10
+ npm install @mushi-mushi/core
11
+ ```
12
+
13
+ ```ts
14
+ import { createPreFilter, captureEnvironment } from '@mushi-mushi/core';
15
+
16
+ const filter = createPreFilter();
17
+ filter.check('asdf'); // { passed: false, reason: 'Too short (min 10 characters)' }
18
+ const env = captureEnvironment(); // viewport, user agent, connection, page timing
19
+ ```
20
+
21
+ Docs: [Core SDK reference](https://kensaur.us/mushi-mushi/docs/sdks/core)
22
+
9
23
  ```mermaid
10
24
  flowchart LR
11
25
  A["Framework SDK<br/>react, vue, web…"] --> B["@mushi-mushi/core<br/>types · API client · queue"] --> C["Mushi API"]
package/dist/index.cjs CHANGED
@@ -2318,12 +2318,18 @@ var MUSHI_EVENTS = {
2318
2318
  key_minted: { surface: "server", required: ["project_id"] },
2319
2319
  first_report_received: { surface: "server", required: ["project_id"] },
2320
2320
  first_diagnosis_ready: { surface: "server", required: ["project_id"] },
2321
+ // Once per organization: its first real end-user report from a deployed
2322
+ // app (not a dev server) that got a diagnosis (_shared/activation.ts).
2323
+ activated: { surface: "server", required: ["project_id"] },
2321
2324
  fix_merged: { surface: "server", required: ["project_id"] },
2322
2325
  upgrade_completed: { surface: "server", required: ["project_id", "plan"] },
2323
2326
  repo_digest_created: { surface: "server", required: ["project_id"] },
2324
2327
  repo_diagram_generated: { surface: "server", required: ["project_id"] },
2325
2328
  repo_diagram_published: { surface: "server", required: ["project_id"] },
2326
2329
  public_diagram_viewed: { surface: "server", required: ["project_id"] },
2330
+ // Free Production Check on the docs site (/check); project_id is Mushi's own.
2331
+ production_check_started: { surface: "server", required: ["project_id"] },
2332
+ production_check_finished: { surface: "server", required: ["project_id", "outcome"] },
2327
2333
  // ── Growth loop (widget "Bug reports by Mushi" mark) ─────────────────────
2328
2334
  loop_impression: { surface: "web", required: [] },
2329
2335
  loop_click: { surface: "web", required: [] },