@shivaedev/platform 0.24.0 → 0.24.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.24.2 - 2026-10-24
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- Require Effect and its companion packages at exactly 4.0.5. Generated applications use the same versions.
|
|
8
|
+
|
|
9
|
+
## 0.24.1 - 2026-10-24
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Align published dependency and peer pins and the generated starter with React and React DOM 19.3.1, TanStack Router 1.170.45, Better Auth 1.7.10, happy-dom 21.0.3 and Vitest 5.0.5. The starter also uses pg-boss dashboard 1.12.1.
|
|
14
|
+
|
|
3
15
|
## 0.24.0 - 2026-10-21
|
|
4
16
|
|
|
5
17
|
### Added
|
package/README.md
CHANGED
|
@@ -142,6 +142,8 @@ Set `config.maxConnections` on `appDatabase` or a migrated `appHost` to bound th
|
|
|
142
142
|
|
|
143
143
|
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. Malformed addresses or ranges fail `appHost` startup with a typed `ConfigError`. 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).
|
|
144
144
|
|
|
145
|
+
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.
|
|
146
|
+
|
|
145
147
|
Database-backed hosts enable PostgreSQL change delivery by default and serve each contract's reserved change stream under its middleware. After a command handler succeeds, its declared invalidation keys publish without repeating keys already announced by repository commits. The handler keeps ownership of its transactions and error mapping. `config.changes.channel` overrides the app-derived default, and heartbeat and retry settings remain optional. Use the same application name or channel across web and worker processes. A worker can provide `appDatabase({ migrations, config })` without starting HTTP. See [commit-bound changes](https://github.com/ShivaeDev/platform/blob/main/docs/framework/changes.md) for defaults and limits.
|
|
146
148
|
|
|
147
149
|
### Public client configuration
|
|
@@ -757,7 +759,7 @@ Import the module that defines the name; there is no package-root entry. Paths b
|
|
|
757
759
|
### Install, setup and limits
|
|
758
760
|
|
|
759
761
|
```sh
|
|
760
|
-
pnpm add @shivaedev/platform effect@4.0.
|
|
762
|
+
pnpm add @shivaedev/platform effect@4.0.5
|
|
761
763
|
```
|
|
762
764
|
|
|
763
765
|
Effect is the only required peer. The peer-free implementation lives in the shared `errors/` and `rpc/` folders and the `server/node-http/`, `server/rpc-server/` and `server/runtime/` folders; a module's import path is its path under `src/`. The core errors, RPC declarations, server middleware, runtime and Node HTTP modules can be imported without the optional peers, including the Promise-based `betterAuthSessions` function. The runtime uses Node's `AsyncLocalStorage`; browser consumers import the shared `errors/` and `rpc/` modules.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Config, Effect } from "effect";
|
|
2
2
|
export function publicConfigLayer(declaration, path) {
|
|
3
|
-
const application = declaration.
|
|
3
|
+
const application = declaration.application;
|
|
4
4
|
return application.toLayer(Effect.gen(function* () {
|
|
5
5
|
const value = yield* Config.schema(declaration.declaration.queries[0].success, path);
|
|
6
6
|
return application.of({ "platform.publicConfig.get": () => Effect.succeed(value) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publicConfigLayer.js","sourceRoot":"","sources":["../../../src/server/rpc-server/publicConfigLayer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAuB,MAAM,EAAE,MAAM,QAAQ,CAAC;AAG7D,MAAM,UAAU,iBAAiB,CAAO,WAAkD,EAAE,IAAmC;IAC9H,MAAM,WAAW,GAAG,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"publicConfigLayer.js","sourceRoot":"","sources":["../../../src/server/rpc-server/publicConfigLayer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAuB,MAAM,EAAE,MAAM,QAAQ,CAAC;AAG7D,MAAM,UAAU,iBAAiB,CAAO,WAAkD,EAAE,IAAmC;IAC9H,MAAM,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC;IAC5C,OAAO,WAAW,CAAC,OAAO,CACzB,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QACnB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACrF,OAAO,WAAW,CAAC,EAAE,CAAC,EAAE,2BAA2B,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrF,CAAC,CAAC,CACF,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shivaedev/platform",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.2",
|
|
4
4
|
"description": "Opinionated Effect application infrastructure for ShivaeDev services",
|
|
5
5
|
"homepage": "https://github.com/ShivaeDev/platform/tree/main/packages/platform#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -40,47 +40,47 @@
|
|
|
40
40
|
"README.md"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@shivaedev/effect-contract": "0.
|
|
44
|
-
"@shivaedev/effect-sql": "0.13.
|
|
43
|
+
"@shivaedev/effect-contract": "0.11.0",
|
|
44
|
+
"@shivaedev/effect-sql": "0.13.1",
|
|
45
45
|
"@shivaedev/types": "0.2.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@effect/platform-node": "4.0.
|
|
49
|
-
"@effect/sql-pg": "4.0.
|
|
50
|
-
"@effect/vitest": "4.0.
|
|
48
|
+
"@effect/platform-node": "4.0.5",
|
|
49
|
+
"@effect/sql-pg": "4.0.5",
|
|
50
|
+
"@effect/vitest": "4.0.5",
|
|
51
51
|
"@prisma-next/adapter-postgres": "0.16.0",
|
|
52
52
|
"@prisma-next/contract": "0.16.0",
|
|
53
53
|
"@prisma-next/postgres": "0.16.0",
|
|
54
54
|
"@prisma-next/sql-contract": "0.16.0",
|
|
55
55
|
"@prisma-next/sql-orm-client": "0.16.0",
|
|
56
56
|
"@prisma-next/target-postgres": "0.16.0",
|
|
57
|
-
"@shivaedev/effect-prisma": "0.10.
|
|
58
|
-
"@shivaedev/effect-test": "0.7.
|
|
59
|
-
"@shivaedev/effect-test-sql": "0.8.
|
|
60
|
-
"@shivaedev/effect-trpc": "0.8.
|
|
61
|
-
"@shivaedev/quality": "0.
|
|
62
|
-
"@shivaedev/test-story": "0.18.
|
|
57
|
+
"@shivaedev/effect-prisma": "0.10.3",
|
|
58
|
+
"@shivaedev/effect-test": "0.7.2",
|
|
59
|
+
"@shivaedev/effect-test-sql": "0.8.3",
|
|
60
|
+
"@shivaedev/effect-trpc": "0.8.3",
|
|
61
|
+
"@shivaedev/quality": "0.34.0",
|
|
62
|
+
"@shivaedev/test-story": "0.18.2",
|
|
63
63
|
"@trpc/client": "11.19.0",
|
|
64
64
|
"@trpc/server": "11.19.0",
|
|
65
65
|
"@types/node": "24.19.2",
|
|
66
66
|
"@types/pg": "8.20.0",
|
|
67
|
-
"better-auth": "1.7.
|
|
68
|
-
"effect": "4.0.
|
|
67
|
+
"better-auth": "1.7.10",
|
|
68
|
+
"effect": "4.0.5",
|
|
69
69
|
"pg": "8.23.0",
|
|
70
70
|
"superjson": "2.2.6",
|
|
71
71
|
"typescript": "7.0.2",
|
|
72
|
-
"vitest": "5.0.
|
|
72
|
+
"vitest": "5.0.5"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@effect/platform-node": "4.0.
|
|
76
|
-
"@effect/sql-pg": "4.0.
|
|
77
|
-
"@effect/vitest": "4.0.
|
|
75
|
+
"@effect/platform-node": "4.0.5",
|
|
76
|
+
"@effect/sql-pg": "4.0.5",
|
|
77
|
+
"@effect/vitest": "4.0.5",
|
|
78
78
|
"@prisma-next/sql-orm-client": "0.16.0",
|
|
79
|
-
"@shivaedev/effect-prisma": "0.10.
|
|
80
|
-
"@shivaedev/effect-trpc": "0.8.
|
|
79
|
+
"@shivaedev/effect-prisma": "0.10.3",
|
|
80
|
+
"@shivaedev/effect-trpc": "0.8.3",
|
|
81
81
|
"@trpc/server": "11.19.0",
|
|
82
|
-
"better-auth": "1.7.
|
|
83
|
-
"effect": "4.0.
|
|
82
|
+
"better-auth": "1.7.10",
|
|
83
|
+
"effect": "4.0.5",
|
|
84
84
|
"pg": "8.23.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependenciesMeta": {
|
|
@@ -2,7 +2,7 @@ import { Config, type ConfigProvider, Effect } from "effect";
|
|
|
2
2
|
import type { publicConfig } from "#rpc/publicConfig.ts";
|
|
3
3
|
|
|
4
4
|
export function publicConfigLayer<T, E>(declaration: ReturnType<typeof publicConfig<T, E>>, path?: string | ConfigProvider.Path) {
|
|
5
|
-
const application = declaration.
|
|
5
|
+
const application = declaration.application;
|
|
6
6
|
return application.toLayer(
|
|
7
7
|
Effect.gen(function* () {
|
|
8
8
|
const value = yield* Config.schema(declaration.declaration.queries[0].success, path);
|