@streamotter/contracts 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 +23 -5
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
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/contracts
|
|
2
4
|
|
|
3
5
|
The public types, protocol constants, error vocabulary, and runtime validation shared by the StreamOtter gateway and browser SDK. Both are built on this package.
|
|
4
6
|
|
|
5
7
|
**Most applications don't install it directly.** [`@streamotter/client`](https://www.npmjs.com/package/@streamotter/client) and [`@streamotter/gateway`](https://www.npmjs.com/package/@streamotter/gateway) re-export the types you need. Install this package when you build tooling around StreamOtter: editors, linters, or deployment checks for `streamotter.json`, or anything that must agree exactly with the gateway's rules.
|
|
6
8
|
|
|
7
|
-
> **Release candidate
|
|
9
|
+
> **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 (`PROTOCOL_VERSION = 1`) and `configVersion: 1`.
|
|
8
10
|
|
|
9
11
|
```bash
|
|
10
|
-
npm install @streamotter/contracts
|
|
12
|
+
npm install @streamotter/contracts
|
|
11
13
|
```
|
|
12
14
|
|
|
15
|
+
The all-in-one [`streamotter`](https://www.npmjs.com/package/streamotter) package also exposes this package as `streamotter/contracts`.
|
|
16
|
+
|
|
13
17
|
ESM only, with TypeScript declarations included. It has no dependencies and runs in browsers and Node.js.
|
|
14
18
|
|
|
15
19
|
## Validate a configuration
|
|
@@ -42,9 +46,23 @@ This is the same validator `defineProject()`, the CLI, and the workbench use. Va
|
|
|
42
46
|
|
|
43
47
|
The types are the public contract that the [V1 API specification](https://github.com/jfricano/StreamOtter/blob/main/docs/V1_API.md) describes. Where the specification and the types differ, this package is authoritative for types (see its §13).
|
|
44
48
|
|
|
45
|
-
##
|
|
49
|
+
## Documentation
|
|
50
|
+
|
|
51
|
+
- [V1 API specification](https://github.com/jfricano/StreamOtter/blob/main/docs/V1_API.md): configuration and schemas (§2), the protocol (§8), errors (§9), and management (§10)
|
|
52
|
+
- [Getting started](https://github.com/jfricano/StreamOtter/blob/main/docs/guides/getting-started.md), if you are here to build an application
|
|
53
|
+
- [Repository](https://github.com/jfricano/StreamOtter) · [Issues](https://github.com/jfricano/StreamOtter/issues) · [Security policy](https://github.com/jfricano/StreamOtter/blob/main/SECURITY.md)
|
|
46
54
|
|
|
47
|
-
|
|
48
|
-
|
|
55
|
+
## StreamOtter packages
|
|
56
|
+
|
|
57
|
+
| Package | |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| [`streamotter`](https://www.npmjs.com/package/streamotter) | Everything below in one install, with the `streamotter` command |
|
|
60
|
+
| [`@streamotter/cli`](https://www.npmjs.com/package/@streamotter/cli) | Scaffold, validate, generate types, develop with the workbench, and run the production gateway |
|
|
61
|
+
| [`@streamotter/client`](https://www.npmjs.com/package/@streamotter/client) | The browser SDK: subscribe, render `live` and `stale`, and clean up |
|
|
62
|
+
| [`@streamotter/gateway`](https://www.npmjs.com/package/@streamotter/gateway) | Handler types, and running the gateway from your own Node.js code |
|
|
63
|
+
| [`@streamotter/contracts`](https://www.npmjs.com/package/@streamotter/contracts) | **This package.** Shared types and configuration validation, for tooling authors |
|
|
64
|
+
| [`@streamotter/workbench`](https://www.npmjs.com/package/@streamotter/workbench) | The local workbench's assets, installed by the CLI |
|
|
65
|
+
|
|
66
|
+
All six are released together with the same version ([changelog](https://github.com/jfricano/StreamOtter/blob/main/CHANGELOG.md)).
|
|
49
67
|
|
|
50
68
|
MIT License © 2026 Orca Solutions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamotter/contracts",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.3",
|
|
4
4
|
"description": "StreamOtter public types, protocol constants, and runtime validation shared by the gateway and browser SDK.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"streamotter",
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
"author": "Orca Solutions",
|
|
25
25
|
"type": "module",
|
|
26
26
|
"sideEffects": false,
|
|
27
|
+
"main": "./dist/index.js",
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
27
29
|
"exports": {
|
|
28
30
|
".": {
|
|
29
31
|
"types": "./dist/index.d.ts",
|