@shivaedev/server 0.46.0 → 0.46.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,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.46.2 - 2026-11-21
4
+
5
+ ### Changed
6
+
7
+ - Update `@shivaedev/admin` from 0.29.7 to 0.29.8.
8
+ - Update `@shivaedev/contract` from 0.58.0 to 0.59.0.
9
+ - Update `@shivaedev/identity` from 0.44.0 to 0.44.1.
10
+
11
+ ## 0.46.1 - 2026-11-21
12
+
13
+ ### Changed
14
+
15
+ - Update `@shivaedev/admin` from 0.29.6 to 0.29.7.
16
+ - Update `@shivaedev/identity` from 0.43.0 to 0.44.0.
17
+
3
18
  ## 0.46.0 - 2026-11-21
4
19
 
5
20
  ### Added
package/README.md CHANGED
@@ -143,7 +143,7 @@ A service may come from another registration in the same list. The `replacements
143
143
 
144
144
  `appModules` returns an Effect that rejects duplicate queue names before building any host. `DuplicateModuleQueue` from `@shivaedev/server/DuplicateModuleQueue.ts` identifies `queue`, `firstModule` and `secondModule`, naming a defined module by its own name, and `firstAdminPage` and `secondAdminPage`, the first admin page id of a registration without a name. Its message names a registration without a name by that page, or else says it has no name and to give it one. Repeating a name within one registration also fails. It combines the native RPC groups, handler Layers, the migration loaders and schema components of the modules that declare `migrations`, skipping the rest. It includes each admin registration's group and handlers and exposes their merged registry as `modules.admin`. Migration numbers belong to one application-wide sequence. Existing hosts can continue to supply their groups, handlers, services and migrations directly.
145
145
 
146
- The host builds `services` once for its lifetime and builds `requestServices` once per RPC call, including each call on a persistent WebSocket connection. Native RPC middleware supplies the request services after the identity middleware of the module or contract resolves the caller. Declare `selfSubject` or `accountSubject` on contracts whose request services require `Subject`, `SessionUser` and `Identity`. Request services yield global dependencies from the enclosing environment; leave those global Layers out of the request Layer so they are reused. `appModules` rejects global services that require caller context or a service registered in the request slot.
146
+ The host builds `services` once for its lifetime and builds `requestServices` once per RPC call, including each call on a persistent WebSocket connection. Native RPC middleware supplies the request services after the identity middleware of the module or contract resolves the caller. The request Layer wraps every RPC the host serves, admin pages' RPCs included, whichever registration supplied it. A request service therefore needs every served RPC to provide what it requires: a service that requires `Subject` needs `selfSubject` or `accountSubject` on every contract, and one that requires `SessionUser` or `Identity` needs an identity middleware, such as `AuthenticatedUser` or an admin page's permission, on every contract. Otherwise the host's Layer still requires that service and the application cannot launch it. A service that answers for accounts named in its arguments, as identity's `AccountClock` does, requires no caller and belongs in global `services`. Request services yield global dependencies from the enclosing environment; leave those global Layers out of the request Layer so they are reused. `appModules` rejects global services that require caller context or a service registered in the request slot.
147
147
 
148
148
  A `defineService` declares its dependencies in `requires` and its operations yield them. Keep each operation in an `Effect.fn` file beside `service.ts`, with a span named for the final segment of the PascalCase service ID and the operation: `RequestViewService.read` for a service ID ending in `/RequestViewService`. Register its Layer in `requestServices` when those dependencies include the caller. Its initializer can capture caller values and allocate an `Effect.cached` value: repeated reads share that value within one request, and the next request computes it again. Operations yield the service and call its methods. Register an infallible acquisition Layer in this slot; operation failures keep their contract's typed error channel. The host-version stream does not acquire application request services.
149
149
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shivaedev/server",
3
- "version": "0.46.0",
3
+ "version": "0.46.2",
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"
@@ -47,10 +47,10 @@
47
47
  ],
48
48
  "dependencies": {
49
49
  "@shivaedev/changes": "0.14.1",
50
- "@shivaedev/contract": "0.58.0",
50
+ "@shivaedev/contract": "0.59.0",
51
51
  "@shivaedev/errors": "0.14.1",
52
52
  "@shivaedev/http": "0.9.2",
53
- "@shivaedev/identity": "0.43.0",
53
+ "@shivaedev/identity": "0.44.1",
54
54
  "@shivaedev/local-postgres": "0.17.0",
55
55
  "@shivaedev/sql": "0.55.0"
56
56
  },
@@ -59,14 +59,14 @@
59
59
  "@effect/sql-pg": "4.1.4",
60
60
  "@effect/vitest": "4.1.4",
61
61
  "@shivaedev/access": "0.7.0",
62
- "@shivaedev/admin": "0.29.6",
62
+ "@shivaedev/admin": "0.29.8",
63
63
  "@shivaedev/jobs": "0.44.1",
64
- "@shivaedev/quality": "0.84.0",
64
+ "@shivaedev/quality": "0.84.2",
65
65
  "@shivaedev/rate-limit": "0.8.1",
66
66
  "@shivaedev/service": "0.9.2",
67
- "@shivaedev/test-kits": "0.16.10",
67
+ "@shivaedev/test-kits": "0.16.12",
68
68
  "@shivaedev/test-sql": "0.26.1",
69
- "@shivaedev/test-story": "0.52.5",
69
+ "@shivaedev/test-story": "0.52.6",
70
70
  "@types/node": "24.19.2",
71
71
  "better-auth": "1.7.23",
72
72
  "effect": "4.1.4",
@@ -78,7 +78,7 @@
78
78
  "@effect/platform-node": "4.1.4",
79
79
  "@effect/sql-pg": "4.1.4",
80
80
  "@effect/vitest": "4.1.4",
81
- "@shivaedev/admin": "0.29.6",
81
+ "@shivaedev/admin": "0.29.8",
82
82
  "better-auth": "1.7.23",
83
83
  "effect": "4.1.4"
84
84
  },