@streamotter/cli 0.1.0-rc.1 → 0.1.0-rc.2
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 +26 -9
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
The `streamotter` command: scaffold a project, validate its configuration, generate TypeScript channel types, run a development gateway with the local workbench, and start the production gateway.
|
|
4
4
|
|
|
5
|
-
> **Release candidate
|
|
5
|
+
> **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 and `configVersion: 1`.
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @streamotter/cli
|
|
8
|
+
npm install @streamotter/cli
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
Requires Node.js 24 or later. It installs [`@streamotter/gateway`](https://www.npmjs.com/package/@streamotter/gateway) and the workbench assets. Install it as a regular dependency, because `streamotter start` runs in production.
|
|
@@ -15,7 +15,7 @@ Requires Node.js 24 or later. It installs [`@streamotter/gateway`](https://www.n
|
|
|
15
15
|
```bash
|
|
16
16
|
mkdir live-jobs && cd live-jobs
|
|
17
17
|
npm init -y
|
|
18
|
-
npm install @streamotter/cli
|
|
18
|
+
npm install @streamotter/cli @streamotter/client
|
|
19
19
|
npx streamotter init .
|
|
20
20
|
```
|
|
21
21
|
|
|
@@ -64,10 +64,12 @@ npx streamotter generate --config streamotter.json --out generated
|
|
|
64
64
|
|
|
65
65
|
This writes `generated/streamotter.generated.ts` (`AppChannels`, the parameter and payload types, and `channelVersions`) and `generated/streamotter.client.example.ts`. The generator overwrites only files that carry its own marker. Use the types with [`@streamotter/client`](https://www.npmjs.com/package/@streamotter/client) in the browser and with `HandlerRegistry<AppChannels>` on the server. Numeric ranges and string lengths are still checked at runtime.
|
|
66
66
|
|
|
67
|
+
To see a real page update live, [Getting started](https://github.com/jfricano/StreamOtter/blob/main/docs/guides/getting-started.md) continues from here: it adds a development-only token to `authenticate` and serves `web/example.ts` with Vite.
|
|
68
|
+
|
|
67
69
|
## Go to production
|
|
68
70
|
|
|
69
71
|
1. Implement `authenticate` with your real session verification, and read snapshots from your authoritative store.
|
|
70
|
-
2. Replace the fixture source with a Kafka source over TLS (optionally with SASL); see
|
|
72
|
+
2. Replace the fixture source with a Kafka source over TLS (optionally with SASL); see [Connect to Kafka](https://github.com/jfricano/StreamOtter/blob/main/docs/guides/kafka.md).
|
|
71
73
|
3. Compile your handlers to JavaScript (the CLI loads compiled modules only and refuses `.ts` files).
|
|
72
74
|
4. Run exactly one gateway per project:
|
|
73
75
|
|
|
@@ -81,7 +83,7 @@ NODE_ENV=production npx streamotter start --config streamotter.json --handlers d
|
|
|
81
83
|
- missing secret environment variables or unreadable CA files, without printing their values;
|
|
82
84
|
- browser connections whose `Origin` is missing or not listed in `gateway.allowedOrigins` (no wildcards).
|
|
83
85
|
|
|
84
|
-
Startup waits until every source has joined its consumer group (30-second deadline). If a source fails, `start` prints staged diagnostics and exits.
|
|
86
|
+
Startup waits until every source has joined its consumer group (30-second deadline). If a source fails, `start` prints staged diagnostics and exits. Supervision, restarts after a crash, and the reverse-proxy recipe are in [Run in production](https://github.com/jfricano/StreamOtter/blob/main/docs/DEPLOYMENT.md).
|
|
85
87
|
|
|
86
88
|
## Commands and exit codes
|
|
87
89
|
|
|
@@ -95,10 +97,25 @@ Startup waits until every source has joined its consumer group (30-second deadli
|
|
|
95
97
|
|
|
96
98
|
Exit codes: `0` success, `2` invalid input or configuration, `1` startup or runtime failure. `SIGINT` and `SIGTERM` shut down gracefully (10-second deadline) and exit 0.
|
|
97
99
|
|
|
98
|
-
##
|
|
100
|
+
## Documentation
|
|
101
|
+
|
|
102
|
+
- [Getting started](https://github.com/jfricano/StreamOtter/blob/main/docs/guides/getting-started.md): this walkthrough, continued to a live web page
|
|
103
|
+
- [Add live state to an existing app](https://github.com/jfricano/StreamOtter/blob/main/docs/guides/existing-app.md)
|
|
104
|
+
- [Connect to Kafka](https://github.com/jfricano/StreamOtter/blob/main/docs/guides/kafka.md) and [Run in production](https://github.com/jfricano/StreamOtter/blob/main/docs/DEPLOYMENT.md)
|
|
105
|
+
- [Troubleshooting](https://github.com/jfricano/StreamOtter/blob/main/docs/guides/troubleshooting.md): every CLI refusal and what to do about it
|
|
106
|
+
- [V1 API specification](https://github.com/jfricano/StreamOtter/blob/main/docs/V1_API.md): configuration (§2), management and the workbench (§10), and the CLI (§11)
|
|
107
|
+
- [Repository](https://github.com/jfricano/StreamOtter) · [Issues](https://github.com/jfricano/StreamOtter/issues) · [Security policy](https://github.com/jfricano/StreamOtter/blob/main/SECURITY.md)
|
|
108
|
+
|
|
109
|
+
## StreamOtter packages
|
|
110
|
+
|
|
111
|
+
| Package | |
|
|
112
|
+
| --- | --- |
|
|
113
|
+
| [`@streamotter/cli`](https://www.npmjs.com/package/@streamotter/cli) | **This package.** Scaffold, validate, generate types, develop with the workbench, and run the production gateway |
|
|
114
|
+
| [`@streamotter/client`](https://www.npmjs.com/package/@streamotter/client) | The browser SDK: subscribe, render `live` and `stale`, and clean up |
|
|
115
|
+
| [`@streamotter/gateway`](https://www.npmjs.com/package/@streamotter/gateway) | Handler types, and running the gateway from your own Node.js code |
|
|
116
|
+
| [`@streamotter/contracts`](https://www.npmjs.com/package/@streamotter/contracts) | Shared types and configuration validation, for tooling authors |
|
|
117
|
+
| [`@streamotter/workbench`](https://www.npmjs.com/package/@streamotter/workbench) | The local workbench's assets, installed by the CLI |
|
|
99
118
|
|
|
100
|
-
|
|
101
|
-
- [V1 API specification](https://github.com/jfricano/StreamOtter/blob/main/docs/V1_API.md): configuration (§2), management and workbench (§10), CLI (§11)
|
|
102
|
-
- [Repository](https://github.com/jfricano/StreamOtter) · [Issues](https://github.com/jfricano/StreamOtter/issues)
|
|
119
|
+
All five are released together with the same version ([changelog](https://github.com/jfricano/StreamOtter/blob/main/CHANGELOG.md)).
|
|
103
120
|
|
|
104
121
|
MIT License © 2026 Orca Solutions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamotter/cli",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.2",
|
|
4
4
|
"description": "StreamOtter command-line interface: init, validate, generate, dev (with the local workbench), and start.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"streamotter",
|
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
"bin": {
|
|
29
29
|
"streamotter": "./bin/streamotter.js"
|
|
30
30
|
},
|
|
31
|
+
"main": "./dist/index.js",
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
31
33
|
"exports": {
|
|
32
34
|
".": {
|
|
33
35
|
"types": "./dist/index.d.ts",
|
|
@@ -46,9 +48,9 @@
|
|
|
46
48
|
"access": "public"
|
|
47
49
|
},
|
|
48
50
|
"dependencies": {
|
|
49
|
-
"@streamotter/contracts": "0.1.0-rc.
|
|
50
|
-
"@streamotter/gateway": "0.1.0-rc.
|
|
51
|
-
"@streamotter/workbench": "0.1.0-rc.
|
|
51
|
+
"@streamotter/contracts": "0.1.0-rc.2",
|
|
52
|
+
"@streamotter/gateway": "0.1.0-rc.2",
|
|
53
|
+
"@streamotter/workbench": "0.1.0-rc.2"
|
|
52
54
|
},
|
|
53
55
|
"devDependencies": {
|
|
54
56
|
"@types/node": "24.13.6"
|