@mushi-mushi/core 1.33.2 → 1.33.3

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 (2) hide show
  1. package/README.md +14 -0
  2. package/package.json +1 -1
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mushi-mushi/core",
3
- "version": "1.33.2",
3
+ "version": "1.33.3",
4
4
  "description": "Types, API client and pre-filter for Mushi SDKs. The bug mediator for AI-built apps: plain-English diagnosis + a ready fix, in your editor.",
5
5
  "license": "MIT",
6
6
  "type": "module",