@runtime-inspector/transport-ws 0.1.0-alpha.1 → 0.1.0-alpha.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.
Files changed (2) hide show
  1. package/README.md +36 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # @runtime-inspector/transport-ws
2
+
3
+ Local WebSocket broker for the [Runtime Inspector Protocol](https://github.com/AmatoGiulio/runtime-inspector/blob/main/docs/protocol.md). It routes validated messages between runtime clients, panels, and workspace clients while retaining schemas for reconnecting panels.
4
+
5
+ Most app developers should use [@runtime-inspector/cli](https://www.npmjs.com/package/@runtime-inspector/cli), which starts this broker and serves the web panel automatically.
6
+
7
+ ## Install
8
+
9
+ ~~~bash
10
+ npm install @runtime-inspector/transport-ws@alpha
11
+ ~~~
12
+
13
+ ## Embedded usage
14
+
15
+ ~~~ts
16
+ import { startBroker } from "@runtime-inspector/transport-ws";
17
+
18
+ const broker = startBroker({
19
+ host: "127.0.0.1",
20
+ port: 4577,
21
+ token: process.env.RI_TOKEN
22
+ });
23
+
24
+ // On shutdown:
25
+ await broker.close();
26
+ ~~~
27
+
28
+ `startBroker` defaults to loopback (`127.0.0.1`) and port `4577` unless overridden. A configured token is checked for panel and workspace clients during handshake; runtime connections use the protocol handshake too.
29
+
30
+ Only expose the broker on a trusted development network. The protocol and broker do **not** provide a production remote-access security model.
31
+
32
+ ## Links
33
+
34
+ [Repository](https://github.com/AmatoGiulio/runtime-inspector) · [Protocol stability](https://github.com/AmatoGiulio/runtime-inspector/blob/main/docs/protocol-stability.md) · [Getting started](https://github.com/AmatoGiulio/runtime-inspector/blob/main/docs/getting-started.md)
35
+
36
+ **Status:** alpha, APIs may change. MIT license.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtime-inspector/transport-ws",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.1.0-alpha.2",
4
4
  "description": "Local WebSocket broker for Runtime Inspector.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "ws": "^8.18.0",
28
- "@runtime-inspector/protocol": "0.1.0-alpha.1"
28
+ "@runtime-inspector/protocol": "0.1.0-alpha.2"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/ws": "^8.5.13",