@sola-air-ui/relay 1.0.1 → 1.0.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 (3) hide show
  1. package/README.md +43 -0
  2. package/package.json +2 -2
  3. package/src/cli.js +1 -1
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # @sola-air-ui/relay
2
+
3
+ A local data proxy for [Sola AIR](https://sola-air.dev)'s `createData`/`$data` primitive — keeps database credentials on your own machine (or server) instead of shipping them to the browser, and streams live query results to Sola components over a local connection.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @sola-air-ui/relay
9
+ ```
10
+
11
+ ## Run
12
+
13
+ ```bash
14
+ npx sola-relay --db postgres://user:pass@localhost:5432/mydb
15
+ ```
16
+
17
+ By default this starts a local relay process that Sola's `createData()` calls connect to for real-time data sync — your Postgres/MySQL credentials never leave the process running the relay.
18
+
19
+ ## Supported data sources
20
+
21
+ - **PostgreSQL** (via `pg`)
22
+ - **MySQL** (via `mysql2`)
23
+ - Live updates pushed to connected clients over WebSocket (`ws`)
24
+
25
+ ## Usage from a component
26
+
27
+ ```html
28
+ <script>
29
+ let customers = $data('postgres-primary:customers', { sync: 'realtime' });
30
+ </script>
31
+
32
+ <Table rows={customers} />
33
+ ```
34
+
35
+ `postgres-primary` refers to the connection alias configured when you start the relay — see `sola-relay --help` for connection/alias options.
36
+
37
+ ## Security note
38
+
39
+ The relay is designed to run somewhere trusted (your dev machine, or a backend service you control) — never expose its port directly to the public internet without your own auth layer in front of it.
40
+
41
+ ## License
42
+
43
+ MIT — see the [repo root](https://github.com/rbm3267/sola-air) for the full license and [changelog](https://github.com/rbm3267/sola-air/blob/main/CHANGELOG.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sola-air-ui/relay",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Sola Relay — local data proxy that keeps credentials on-device and streams live data to Sola components",
5
5
  "type": "module",
6
6
  "bin": {
@@ -22,7 +22,7 @@
22
22
  "homepage": "https://sola-air.dev",
23
23
  "repository": {
24
24
  "type": "git",
25
- "url": "git+https://github.com/rbm3267/sola.git"
25
+ "url": "git+https://github.com/rbm3267/sola-air.git"
26
26
  },
27
27
  "dependencies": {
28
28
  "pg": "^8.11.0",
package/src/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  // ─── Sola Relay CLI ───
4
4
  // Usage: npx sola-relay [--port 4040]