@streamotter/client 0.1.0-rc.1 → 0.1.0-rc.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.
- package/README.md +25 -5
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
<p align="center"><img src="https://raw.githubusercontent.com/jfricano/StreamOtter/main/docs/assets/streamotter-logo.png" alt="StreamOtter" width="300"></p>
|
|
2
|
+
|
|
1
3
|
# @streamotter/client
|
|
2
4
|
|
|
3
5
|
The StreamOtter browser SDK. Subscribe to a **state channel** served by a [StreamOtter gateway](https://www.npmjs.com/package/@streamotter/gateway): each subscription gets an authoritative snapshot, then full-state updates in revision order. It also reports whether the view is verifiably current (`live`) or not (`stale`), so a screen is never silently wrong.
|
|
4
6
|
|
|
5
|
-
> **Release candidate
|
|
7
|
+
> **Release candidate** of StreamOtter `0.1.0`; the API may still change before `0.1.0`. Package versions follow SemVer independently of the V1 protocol (`protocolVersion: 1`).
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
|
-
npm install @streamotter/client
|
|
10
|
+
npm install @streamotter/client
|
|
9
11
|
```
|
|
10
12
|
|
|
13
|
+
Using the all-in-one [`streamotter`](https://www.npmjs.com/package/streamotter) package instead? Import from `streamotter/client`; everything on this page applies unchanged.
|
|
14
|
+
|
|
11
15
|
Transport: Socket.IO 4.8.3 over WebSocket only. Targets current evergreen browsers. ESM only, with TypeScript declarations included.
|
|
12
16
|
|
|
13
17
|
## Subscribe
|
|
@@ -112,10 +116,26 @@ export function useJobProgress(jobId: string) {
|
|
|
112
116
|
|
|
113
117
|
Pass a stable `getToken` (for example from `useCallback`) so the client is not recreated on every render. The [reference application](https://github.com/jfricano/StreamOtter/tree/main/examples/order-dashboard) has vanilla TypeScript and React versions of this pattern, including denied access and reconnection.
|
|
114
118
|
|
|
115
|
-
##
|
|
119
|
+
## Documentation
|
|
116
120
|
|
|
117
|
-
- [
|
|
121
|
+
- [Getting started](https://github.com/jfricano/StreamOtter/blob/main/docs/guides/getting-started.md): from `npm install` to a live page in about ten minutes
|
|
122
|
+
- [Add live state to an existing app](https://github.com/jfricano/StreamOtter/blob/main/docs/guides/existing-app.md): your sessions, handlers, and this SDK together
|
|
123
|
+
- [Troubleshooting](https://github.com/jfricano/StreamOtter/blob/main/docs/guides/troubleshooting.md): `FORBIDDEN`, `UNAUTHENTICATED`, `stale`, `resync-required`, and more
|
|
124
|
+
- [V1 API specification](https://github.com/jfricano/StreamOtter/blob/main/docs/V1_API.md): the SDK (§4), states and synchronization (§5), and errors (§9)
|
|
118
125
|
- [Implementation status](https://github.com/jfricano/StreamOtter/blob/main/docs/IMPLEMENTATION_STATUS.md): what is verified, and the known limitations (for example, automated browser checks cover Chromium only)
|
|
119
|
-
- [Repository](https://github.com/jfricano/StreamOtter) · [Issues](https://github.com/jfricano/StreamOtter/issues)
|
|
126
|
+
- [Repository](https://github.com/jfricano/StreamOtter) · [Issues](https://github.com/jfricano/StreamOtter/issues) · [Security policy](https://github.com/jfricano/StreamOtter/blob/main/SECURITY.md)
|
|
127
|
+
|
|
128
|
+
## StreamOtter packages
|
|
129
|
+
|
|
130
|
+
| Package | |
|
|
131
|
+
| --- | --- |
|
|
132
|
+
| [`streamotter`](https://www.npmjs.com/package/streamotter) | Everything below in one install, with the `streamotter` command |
|
|
133
|
+
| [`@streamotter/cli`](https://www.npmjs.com/package/@streamotter/cli) | Scaffold, validate, generate types, develop with the workbench, and run the production gateway |
|
|
134
|
+
| [`@streamotter/client`](https://www.npmjs.com/package/@streamotter/client) | **This package.** The browser SDK: subscribe, render `live` and `stale`, and clean up |
|
|
135
|
+
| [`@streamotter/gateway`](https://www.npmjs.com/package/@streamotter/gateway) | Handler types, and running the gateway from your own Node.js code |
|
|
136
|
+
| [`@streamotter/contracts`](https://www.npmjs.com/package/@streamotter/contracts) | Shared types and configuration validation, for tooling authors |
|
|
137
|
+
| [`@streamotter/workbench`](https://www.npmjs.com/package/@streamotter/workbench) | The local workbench's assets, installed by the CLI |
|
|
138
|
+
|
|
139
|
+
All six are released together with the same version ([changelog](https://github.com/jfricano/StreamOtter/blob/main/CHANGELOG.md)).
|
|
120
140
|
|
|
121
141
|
MIT License © 2026 Orca Solutions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamotter/client",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.3",
|
|
4
4
|
"description": "StreamOtter browser SDK: subscribe to state channels with authoritative snapshots, revision-ordered updates, and explicit live/stale states over Socket.IO.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"streamotter",
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
"author": "Orca Solutions",
|
|
27
27
|
"type": "module",
|
|
28
28
|
"sideEffects": false,
|
|
29
|
+
"main": "./dist/index.js",
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
29
31
|
"exports": {
|
|
30
32
|
".": {
|
|
31
33
|
"types": "./dist/index.d.ts",
|
|
@@ -41,6 +43,6 @@
|
|
|
41
43
|
},
|
|
42
44
|
"dependencies": {
|
|
43
45
|
"socket.io-client": "4.8.3",
|
|
44
|
-
"@streamotter/contracts": "0.1.0-rc.
|
|
46
|
+
"@streamotter/contracts": "0.1.0-rc.3"
|
|
45
47
|
}
|
|
46
48
|
}
|