@omnibuf/web 0.1.11 → 0.1.12

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 +25 -0
  2. package/package.json +4 -3
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # @omnibuf/web
2
+
3
+ Browser and Web-standards runtime helpers for OmniBuf: Web Streams framing, `Blob` and `Response` conversions, hex/base64/data-URL utilities, and packet inspection.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @omnibuf/web
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ import { fromResponse, inspectPacket, toBlob } from '@omnibuf/web';
15
+
16
+ // Fetch and inspect an OmniBuf binary response
17
+ const res = await fetch('/api/event', {
18
+ headers: { Accept: 'application/x-omnibuf' },
19
+ });
20
+ const packet = await fromResponse(res);
21
+ const inspection = inspectPacket(packet);
22
+
23
+ // Wrap raw OmniBuf bytes as a Blob
24
+ const blob = toBlob(packet);
25
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnibuf/web",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "OmniBuf for browsers and frontend runtimes - Web Streams, Blob/Response helpers, and interactive wire inspection",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -15,7 +15,8 @@
15
15
  },
16
16
  "files": [
17
17
  "dist",
18
- "LICENSE"
18
+ "LICENSE",
19
+ "README.md"
19
20
  ],
20
21
  "repository": {
21
22
  "type": "git",
@@ -23,7 +24,7 @@
23
24
  "directory": "packages/omnibuf-web"
24
25
  },
25
26
  "dependencies": {
26
- "@omnibuf/core": "0.1.11"
27
+ "@omnibuf/core": "0.1.12"
27
28
  },
28
29
  "peerDependencies": {
29
30
  "@bufbuild/protobuf": ">=1.0.0 || >=2.0.0"