@shivaedev/server 0.24.0 → 0.24.1

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/CHANGELOG.md +10 -0
  2. package/README.md +2 -0
  3. package/package.json +13 -13
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.24.1 - 2026-11-04
4
+
5
+ ### Changed
6
+
7
+ - Update `@shivaedev/admin` from 0.20.0 to 0.20.1.
8
+ - Update `@shivaedev/identity` from 0.24.0 to 0.25.0.
9
+ - Update `@shivaedev/local-postgres` from 0.13.0 to 0.14.0.
10
+ - Update `@shivaedev/sql` from 0.37.0 to 0.38.0.
11
+ - Update `@shivaedev/test-sql` from 0.20.0 to 0.21.0.
12
+
3
13
  ## 0.24.0 - 2026-11-04
4
14
 
5
15
  ### Added
package/README.md CHANGED
@@ -266,6 +266,8 @@ To pass worker-release time in a story, build `hostTime()` from `@shivaedev/serv
266
266
 
267
267
  For a deployment behind a proxy, set `HOST=0.0.0.0` and `TRUSTED_PROXY` to a comma-separated list of proxy peer IPs or CIDR ranges (IPv4 or IPv6), or use `config.host` and `config.trustedProxy`. Only matching peers may supply `X-Forwarded-Host` and `X-Forwarded-Proto` (`http` or `https`) for the guard's same-origin check; the proxy must overwrite both headers and preserve Origin. A single authority is required, and comma-separated forwarding chains are refused. IPv4-mapped IPv6 peers match their IPv4 address. A session host bound to a non-loopback address refuses to boot without `TRUSTED_PROXY` or `config.trustedProxy`, with a typed `TrustedProxyRequired` error from `@shivaedev/server/TrustedProxyRequired.ts` naming both settings and how to supply proxy peer addresses or CIDR ranges. Local loopback hosts keep working without proxy trust; `policy: "loopback"` does not use proxy trust. Malformed addresses or ranges fail `appHost` startup with a typed `ConfigError`. The starter's Railway deployment works out of the box: its web configuration supplies `TRUSTED_PROXY=100.64.0.0/10` and `AUTH_CLIENT_IP_HEADER=x-real-ip`, so matching peers supply forwarded client IPs for auth and the HTTPS authority for RPC origin checks. Set `PUBLIC_URL` to the app's HTTPS URL for secure session cookies. NDJSON and the application's session Origin policy still apply. See the [deployment quickstart](https://github.com/ShivaeDev/platform/blob/main/docs/framework/quickstart.md#deploy).
268
268
 
269
+ When mounting Better Auth routes yourself on Railway, use `betterAuthMount(authOptions, { clientIp: "railway" })` from `@shivaedev/identity/server/better-auth/adapters/mount.ts` with `TRUSTED_PROXY=100.64.0.0/10`. The `clientIp` preset selects `X-Real-IP` for auth and ignores spoofed `X-Forwarded-For`, overriding `AUTH_CLIENT_IP_HEADER`. Untrusted peers and requests without `X-Real-IP` use the connection address.
270
+
269
271
  Build application handlers with `Api.application.toLayer(...)` (and `Api.application.of(...)` for an Effect-built handler map), then pass the full `Api` to the host and client. `Api.application` is the native RPC group without the reserved `$changes` stream; the host supplies that handler. The explicit `Api.omit("<namespace>.$changes")` form also works.
270
272
 
271
273
  Set `LISTEN_DATABASE_URL` to a direct or session-mode connection when `DATABASE_URL` uses a transaction pooler. `config.listenDatabaseUrl` overrides that setting; when neither is set, the listener shares the application pool. Both URLs must reach the same database. A separate listener pool reserves one connection; the application pool continues to own migrations, writes and heartbeat publication. Startup waits for the listener to receive its own heartbeat. A timeout fails the host with `PostgresListenerError` from `@shivaedev/sql/PostgresListenerError.ts`, naming the selected connection setting. Fix the URL before restarting; a startup timeout does not fall back to periodic reconnects. Established listeners retain their reconnect and Resync behavior.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shivaedev/server",
3
- "version": "0.24.0",
3
+ "version": "0.24.1",
4
4
  "description": "The Effect application host: HTTP and RPC serving, health, OTLP export, database and migrations, and development mode",
5
5
  "keywords": [
6
6
  "effect"
@@ -49,22 +49,22 @@
49
49
  "@shivaedev/contract": "0.36.0",
50
50
  "@shivaedev/errors": "0.9.0",
51
51
  "@shivaedev/http": "0.6.0",
52
- "@shivaedev/identity": "0.24.0",
53
- "@shivaedev/local-postgres": "0.13.0",
54
- "@shivaedev/sql": "0.37.0"
52
+ "@shivaedev/identity": "0.25.0",
53
+ "@shivaedev/local-postgres": "0.14.0",
54
+ "@shivaedev/sql": "0.38.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@effect/platform-node": "4.0.6",
58
58
  "@effect/sql-pg": "4.0.6",
59
59
  "@effect/vitest": "4.0.6",
60
60
  "@shivaedev/access": "0.5.0",
61
- "@shivaedev/admin": "0.20.0",
62
- "@shivaedev/jobs": "0.35.0",
63
- "@shivaedev/quality": "0.60.0",
64
- "@shivaedev/rate-limit": "0.4.0",
65
- "@shivaedev/test-kits": "0.3.0",
66
- "@shivaedev/test-sql": "0.20.0",
67
- "@shivaedev/test-story": "0.38.0",
61
+ "@shivaedev/admin": "0.20.1",
62
+ "@shivaedev/jobs": "0.35.1",
63
+ "@shivaedev/quality": "0.61.0",
64
+ "@shivaedev/rate-limit": "0.5.0",
65
+ "@shivaedev/test-kits": "0.3.1",
66
+ "@shivaedev/test-sql": "0.21.0",
67
+ "@shivaedev/test-story": "0.39.0",
68
68
  "@types/node": "24.19.2",
69
69
  "better-auth": "1.7.14",
70
70
  "effect": "4.0.6",
@@ -76,8 +76,8 @@
76
76
  "@effect/platform-node": "4.0.6",
77
77
  "@effect/sql-pg": "4.0.6",
78
78
  "@effect/vitest": "4.0.6",
79
- "@shivaedev/admin": "0.20.0",
80
- "@shivaedev/test-sql": "0.20.0",
79
+ "@shivaedev/admin": "0.20.1",
80
+ "@shivaedev/test-sql": "0.21.0",
81
81
  "better-auth": "1.7.14",
82
82
  "effect": "4.0.6"
83
83
  },