@shivaedev/server 0.36.0 → 0.38.0
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 +30 -0
- package/README.md +33 -14
- package/dist/AppModule.d.ts +3 -2
- package/dist/AppModule.d.ts.map +1 -1
- package/dist/adapters/migrationsIn.d.ts +5 -0
- package/dist/adapters/migrationsIn.d.ts.map +1 -0
- package/dist/adapters/migrationsIn.js +8 -0
- package/dist/adapters/migrationsIn.js.map +1 -0
- package/dist/appDatabaseHttp.d.ts +10 -2
- package/dist/appDatabaseHttp.d.ts.map +1 -1
- package/dist/appHost.d.ts +5 -1
- package/dist/appHost.d.ts.map +1 -1
- package/dist/appHostHttp.d.ts +5 -1
- package/dist/appHostHttp.d.ts.map +1 -1
- package/dist/appHostHttp.js +3 -7
- package/dist/appHostHttp.js.map +1 -1
- package/dist/appModules.d.ts +7 -5
- package/dist/appModules.d.ts.map +1 -1
- package/dist/appModules.js +9 -6
- package/dist/appModules.js.map +1 -1
- package/dist/hostRpc.d.ts +5 -1
- package/dist/hostRpc.d.ts.map +1 -1
- package/dist/hostRpcRoutes.d.ts +5 -1
- package/dist/hostRpcRoutes.d.ts.map +1 -1
- package/dist/providedModules.d.ts +24 -0
- package/dist/providedModules.d.ts.map +1 -0
- package/dist/providedModules.js +2 -0
- package/dist/providedModules.js.map +1 -0
- package/dist/redactedHost.d.ts +11 -0
- package/dist/redactedHost.d.ts.map +1 -0
- package/dist/redactedHost.js +11 -0
- package/dist/redactedHost.js.map +1 -0
- package/dist/workerHost.d.ts +6 -2
- package/dist/workerHost.d.ts.map +1 -1
- package/dist/workerHost.js +5 -2
- package/dist/workerHost.js.map +1 -1
- package/package.json +29 -29
- package/src/AppModule.ts +5 -4
- package/src/adapters/migrationsIn.ts +8 -0
- package/src/appHostHttp.ts +29 -40
- package/src/appModules.ts +21 -12
- package/src/providedModules.ts +38 -0
- package/src/redactedHost.ts +26 -0
- package/src/workerHost.ts +17 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.38.0 - 2026-11-20
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- `migrationsIn(directory)` finds the `migrations` folder in `directory` through `migrationsFromDirectory` from `@shivaedev/sql/migrationsFromDirectory.ts`, so a module registration and a runner outside the host share one discovery path and one folder convention.
|
|
8
|
+
|
|
9
|
+
### Breaking
|
|
10
|
+
|
|
11
|
+
- `appModules` refuses, at compile time, a registration list in which a defined module's operation yields a service that no registration's `services`, `ports` or `requestServices` provide and the host does not provide. The message names the problem as `OperationServicesNotProvided<"<module>", "<operation>", <Service>>` from `@shivaedev/server/providedModules.ts`. A service an application used to provide around the host, or only through `replacements`, moves into a registration's `services` or `ports`.
|
|
12
|
+
|
|
13
|
+
## 0.37.0 - 2026-11-20
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `migrationsIn(directory)` from `@shivaedev/server/adapters/migrationsIn.ts` returns an `AppModule` `migrations` value whose loader reads the `migrations` folder in `directory` with `MigratorFileSystem.fromFileSystem` under `NodeServices.layer`, so a registration writes `migrations: migrationsIn(import.meta.dirname)`. It needs the optional peer `@effect/platform-node`.
|
|
18
|
+
- `AppModule.migrations` is optional. A module without migrations leaves it out, and `appModules` combines the loaders and schema components of the modules that declare them.
|
|
19
|
+
- `workerHost` masks its logs, the causes its installed error reporters receive and its exported spans with the application host's policy: the built-in credential-shaped name rules, `config.sensitiveKeys`, and the names of fields that the models of the repositories it builds mark sensitive (`sensitive: true` or a Redacted schema). Its `config` takes `sensitiveKeys` beside the database settings, typed as the new `WorkerHostConfig`. A worker serves no RPC group, so no RPC schema adds names.
|
|
20
|
+
- `workerHost` logs `Worker ready to take jobs` once its workers are registered, inside its redaction and trace export.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- Require Effect 4.1.4 and its matching platform packages.
|
|
25
|
+
- closing `appDatabase`, and interrupting a host that waits for migrations, end the pool's connections without waiting for PostgreSQL's disconnect acknowledgements.
|
|
26
|
+
- `appModules` names a defined module by its own name in `DuplicateModuleQueue`.
|
|
27
|
+
|
|
28
|
+
### Breaking
|
|
29
|
+
|
|
30
|
+
- A registration with `module:` no longer accepts `name`: the module already carries its name, and a second one could disagree with it. Delete the `name` line from each `module:` registration. A `group` plus `handlers` registration still requires `name`.
|
|
31
|
+
- `workerHost` exports traces through `otlpTracing` itself, as `appHost` does, so the export masks the worker's whole policy, and its Layer's error type now includes `SensitiveFieldConflict` and `InvalidRedactionMask`. Remove `Layer.provide(otlpTracing)` from around `workerHost`; keeping it builds a second exporter and diagnostics pipeline around the worker. Remove an application's own readiness log around `workerHost` too, such as `Layer.tap(() => Effect.logInfo("Worker ready to take jobs"))`: the host now writes it, and an effect composed around the host's Layer runs outside its redaction and exporter.
|
|
32
|
+
|
|
3
33
|
## 0.36.0 - 2026-11-19
|
|
4
34
|
|
|
5
35
|
### Added
|
package/README.md
CHANGED
|
@@ -84,7 +84,7 @@ Host option types include this HTTP-only shape. A wrapper that reads native RPC
|
|
|
84
84
|
|
|
85
85
|
`appHost` is the server entry point for an Effect app. For a PostgreSQL app, supply the native RPC group, handler and service Layers, migration loader, session policy and static asset directory. The host completes migrations before acquiring application services, starts Node HTTP with native Effect RPC over a WebSocket upgrade at `/rpc`, and provides SQL, Reactivity and `LiveServer` from `@shivaedev/contract/live-server/service.ts` to those Layers.
|
|
86
86
|
|
|
87
|
-
For feature modules, install the optional peer `@shivaedev/admin` and declare each registration with `satisfies AppModule` from `@shivaedev/server/AppModule.ts`. Each module supplies
|
|
87
|
+
For feature modules, install the optional peer `@shivaedev/admin` and declare each registration with `satisfies AppModule` from `@shivaedev/server/AppModule.ts`. Each module supplies its operations, `services` and, when it owns tables, `migrations: { loader, components? }`; a module without migrations leaves the field out. A defined module takes its name from the module itself and its registration gives none, so the two cannot disagree; a `group` plus `handlers` registration supplies a `name`, because nothing else names it. `migrationsIn(directory)` from `@shivaedev/server/adapters/migrationsIn.ts` returns `{ loader }` for the `migrations` folder in `directory`, found by `migrationsFromDirectory` from `@shivaedev/sql/migrationsFromDirectory.ts` under Node's `NodeServices.layer`, so a registration writes `migrations: migrationsIn(import.meta.dirname)` and needs the optional peer `@effect/platform-node`. Register caller-dependent Layers in the optional `requestServices` slot beside global `services`. Keep default adapters in its optional `ports` Layer, put an optional `registerAdmin` result in `admin`, and declare owned `queues` and a `workers` Layer on the module. `jobModule` from `@shivaedev/jobs/server/jobModule.ts` supplies those two fields from a jobs registration list.
|
|
88
88
|
|
|
89
89
|
```ts
|
|
90
90
|
import { Effect } from "effect";
|
|
@@ -102,24 +102,24 @@ const hosts = Effect.gen(function* () {
|
|
|
102
102
|
});
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
A module defined with `defineModule` from `@shivaedev/contract/defineModule.ts` registers as `module:`, and the host builds its group and its handlers with `moduleHandlers`. Its
|
|
105
|
+
A module defined with `defineModule` from `@shivaedev/contract/defineModule.ts` registers as `module:`, and the host builds its group and its handlers with `moduleHandlers`. Its handlers need the services its operations' `run` and read policies yield, less what its middleware and subject provide per call; the registration's `services` and `ports` provide them, except the SQL client and the other services the host provides. An RPC group that is not a defined module, such as a contract served by hand-written handlers, registers as `group` plus `handlers` instead, and both kinds sit in one application's module list:
|
|
106
106
|
|
|
107
107
|
```ts
|
|
108
108
|
import { Layer } from "effect";
|
|
109
|
-
import { Migrator, SqlClient } from "effect/sql";
|
|
110
109
|
import { defineModule } from "@shivaedev/contract/defineModule.ts";
|
|
110
|
+
import { migrationsIn } from "@shivaedev/server/adapters/migrationsIn.ts";
|
|
111
111
|
import type { AppModule } from "@shivaedev/server/AppModule.ts";
|
|
112
|
+
import { notesWire } from "#generated/modules/notes/Notes.ts";
|
|
112
113
|
import { Create, Get } from "./notes/operations.ts";
|
|
113
114
|
import { Drafts, readDraft } from "./drafts.ts";
|
|
114
115
|
|
|
115
|
-
export const Notes = defineModule({ name: "notes", operations: [Create, Get],
|
|
116
|
+
export const Notes = defineModule({ name: "notes", operations: [Create, Get], wire: notesWire });
|
|
116
117
|
|
|
117
|
-
export const notes = { migrations:
|
|
118
|
+
export const notes = { migrations: migrationsIn(import.meta.dirname), module: Notes, services: Layer.empty } satisfies AppModule;
|
|
118
119
|
|
|
119
120
|
export const drafts = {
|
|
120
121
|
group: Drafts,
|
|
121
122
|
handlers: Drafts.application.toLayer({ "drafts.read": readDraft }),
|
|
122
|
-
migrations: { loader: Migrator.fromRecord({}) },
|
|
123
123
|
name: "drafts",
|
|
124
124
|
services: Layer.empty,
|
|
125
125
|
} satisfies AppModule;
|
|
@@ -127,9 +127,16 @@ export const drafts = {
|
|
|
127
127
|
|
|
128
128
|
A defined module's generated handlers check each query's read policy with the module's services. Hand-written handlers would move that check to the host's read-policy guard, in the handlers' own context, so a defined module would have two paths. `AppModule` refuses a defined module as `group` at compile time, and the host refuses to start when any query of a defined module is served by another handler: it fails with `HandWrittenModuleHandlers` from `@shivaedev/server/HandWrittenModuleHandlers.ts`, whose `module`, `queries` and `message` name the module, each affected query and the `module:` registration to use instead. Fakes in this repository's own stories opt out through `replacedModuleHandlers` in the package's test support, which is not published.
|
|
129
129
|
|
|
130
|
-
`appModules`
|
|
130
|
+
`appModules` refuses a registration list in which a defined module's operation yields a service that no registration's `services`, `ports` or `requestServices` provide and the host does not provide, as it provides the SQL client and `Reactivity`. The second line of the compiler's message names the module, the operation and each missing service:
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
```
|
|
133
|
+
src/test-support/compiler-fixtures/unprovidedService.ts(26,12): error TS2345: Argument of type '[{ module: Module<"imports", readonly [ServedCommand<"importTitle", Struct<{ id: Number; }>, String, Flat<Automatic>, Effect<string, never, NoteSource>>] & readonly ModuleOperation[], ModuleRequirements<...>, never, undefined, undefined>; services: Layer<...>; }]' is not assignable to parameter of type 'readonly [{ module: Module<"imports", readonly [ServedCommand<"importTitle", Struct<{ id: Number; }>, String, Flat<Automatic>, Effect<string, never, NoteSource>>] & readonly ModuleOperation[], ModuleRequirements<...>, never, undefined, undefined>; services: Layer<...>; }] & { ...; } & OperationServicesNotProvided<...>'.
|
|
134
|
+
Type '[{ module: Module<"imports", readonly [ServedCommand<"importTitle", Struct<{ id: Number; }>, String, Flat<Automatic>, Effect<string, never, NoteSource>>] & readonly ModuleOperation[], ModuleRequirements<...>, never, undefined, undefined>; services: Layer<...>; }]' is not assignable to type 'OperationServicesNotProvided<"imports", "importTitle", NoteSource>'.
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
A service may come from another registration in the same list. The `replacements` Layer only overrides default ports, so a service that only the replacements provide is refused too: give it a default in a registration's `ports`. A service the application provides around the host instead belongs in a registration. The check reads each module's services from its registration's own type, so it refuses a registration typed as `AppModule`, returned by a helper typed that way, or whose `module` is typed as `RegisteredModule`: that type has lost the services the module's handlers need. A `group` plus `handlers` registration typed as `AppModule` is refused too, because its type is the same. Declare the registration with `satisfies AppModule` instead.
|
|
138
|
+
|
|
139
|
+
`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; repeating a name within one module 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.
|
|
133
140
|
|
|
134
141
|
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 contract's identity middleware 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.
|
|
135
142
|
|
|
@@ -137,6 +144,17 @@ A `defineService` declares its dependencies in `requires` and its operations yie
|
|
|
137
144
|
|
|
138
145
|
Pass `{ replacements: Layer.succeed(MyPort, implementation) }` as the second argument to `appModules`. Replacements take precedence over the combined default `ports` before module `services` acquire dependencies. Leave these ports unprovided in the module's service Layer; an adapter already captured by `Layer.provide` inside that Layer cannot be replaced from outside it. Missing ports and replacement Layer requirements remain in the host's requirement type. `workerHost` takes the same composition, provides its services to all module workers after database preparation, and scopes their lifetime to the returned Layer. Supply the shared `PgBoss` client through the service Layer in each process; the host and worker use the same module ports and replacements.
|
|
139
146
|
|
|
147
|
+
`workerHost` builds its database, services and workers inside the same redaction policy as `appHost`, and exports through the same OTLP pipeline, so do not provide `otlpTracing` around it. Once its workers are registered it logs `Worker ready to take jobs` inside that pipeline, so the application writes no readiness log of its own. Anything an application composes around the Layer that `workerHost` or `appHost` returns, such as `Layer.tap(() => Effect.logInfo(...))`, runs outside the host's redaction and exporter; put startup work in `services` or `workers` instead. Its logs, the causes its installed error reporters receive and its exported spans mask three sources: the built-in credential-shaped name rules from `@shivaedev/errors`, the names in `config.sensitiveKeys`, and the names of fields that the models of the repositories it builds mark sensitive with `sensitive: true` or a Redacted schema. A worker serves no RPC group, so no RPC schema adds names and no failure frame is masked. A job handler logs a stored row with that field as `<redacted>`, while what the job writes keeps the value. The jobs package neither logs nor reports a job's defect itself; a handler that wants one logged or reported does so in its own Effect, as `Effect.tapCause(Effect.logError)` and `Effect.withErrorReporting` do, and the worker masks both.
|
|
148
|
+
|
|
149
|
+
```ts
|
|
150
|
+
workerHost({
|
|
151
|
+
...modules,
|
|
152
|
+
postgresSettings: {},
|
|
153
|
+
config: { sensitiveKeys: ["customerReference"] },
|
|
154
|
+
migrations: { ...modules.migrations, mode: "wait" },
|
|
155
|
+
});
|
|
156
|
+
```
|
|
157
|
+
|
|
140
158
|
```ts
|
|
141
159
|
import { NodeRuntime } from "@effect/platform-node";
|
|
142
160
|
import { Layer } from "effect";
|
|
@@ -160,7 +178,7 @@ NodeRuntime.runMain(Layer.launch(Server));
|
|
|
160
178
|
|
|
161
179
|
The `sessions` Layer provides one identity `SessionPolicy` to handler middleware, sockets, change subscriptions and application routes. Construct it with `Layer.succeed(SessionPolicy, { origin, provider, roles })`; policy readers take no policy argument.
|
|
162
180
|
|
|
163
|
-
A session host also installs identity's subject resolver for contracts with `subject: selfSubject` or `subject:
|
|
181
|
+
A session host also installs identity's subject resolver for contracts with `subject: selfSubject`, `subject: accountSubject(...)` or `subject: delegatedSubject(...)`, whose rule's service the host's `services` must provide or the host fails to start. It resolves the session account or authorizes the account a call names in its `x-platform-subject` message header, falling back to that header on the transport, before the handler runs and again at each stream recheck, supplies the branded `Subject` plus the actor's `Identity` and `SessionUser` to the request, and returns the declared typed refusal when delegation is denied. Business payloads do not carry an owner id. See [declared request subjects](https://github.com/ShivaeDev/platform/tree/main/packages/identity#declared-request-subjects) for declarations and session profile requirements.
|
|
164
182
|
|
|
165
183
|
Omit `services` when the app has no service Layer of its own. The host uses `Layer.empty`; handler requirements remain explicit, and a migrated host still provides its database services to handlers. Annotated options that declare service outputs, errors or requirements must supply a `services` Layer.
|
|
166
184
|
|
|
@@ -283,7 +301,7 @@ const host = appHost({
|
|
|
283
301
|
|
|
284
302
|
Construct Better Auth inside `application`, since its constructor starts schema validation. Keep validation enabled so a current migration ledger with missing auth columns still reports drift. The starter uses this form after its pre-deploy migrations.
|
|
285
303
|
|
|
286
|
-
Railway tracing is the default error and trace destination. The starter enables tracing for both services in `.railway/railway.ts`; Railway injects the endpoint, authentication headers and service identity. `appHost`
|
|
304
|
+
Railway tracing is the default error and trace destination. The starter enables tracing for both services in `.railway/railway.ts`; Railway injects the endpoint, authentication headers and service identity. `appHost` and `workerHost` export through the redacting Effect OTLP/HTTP pipeline. Leave exporter endpoints unset on Railway so its injected configuration takes effect. Outside development mode, without an endpoint, no exporter or export loop is built, even when service metadata is set. The `http/protobuf` default follows the [OpenTelemetry recommendation](https://opentelemetry.io/docs/specs/otel/protocol/exporter/#specify-protocol); unsupported protocols, including `grpc`, fail startup with a `ConfigError` naming the value. Header and resource-attribute values are `key=value` pairs with URL-encoded values. Configuration is read through Effect Config.
|
|
287
305
|
|
|
288
306
|
The supported tracing variables and defaults are:
|
|
289
307
|
|
|
@@ -305,13 +323,12 @@ The supported tracing variables and defaults are:
|
|
|
305
323
|
|
|
306
324
|
Timeouts fail through the HTTP client's typed transport-error channel and use the same warning path as other transport failures. Effect retains its native retry policy; the request timeout applies to each attempt. The batch defaults follow Effect's `OtlpTracer.layer`. Its options cannot express a separate batch-operation deadline or a queue capacity, so `OTEL_BSP_EXPORT_TIMEOUT` controls shutdown only and `OTEL_BSP_MAX_QUEUE_SIZE` is unsupported. Other `OTEL_BSP_*` variables are unsupported.
|
|
307
325
|
|
|
308
|
-
For existing Railway services, enable manual tracing per service and environment, then redeploy. The starter does this through `tracing: { enabled: true, autoInstrumentation: false }` in its infrastructure configuration (Railway CLI 5.63.0 or newer). Railway documents that it injects the `OTEL_*` variables, including `OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf`, only when the app sets no endpoint of its own. The framework exports through Effect's own `effect/observability` OTLP tracer; eBPF auto-instrumentation is outside this path. For a worker, provide `otlpTracing` from `@shivaedev/server/otlpTracing.ts` to its application Layer. Railway accepts traces only: logs become `effect.log` spans with a `log` event, and Effect `ErrorReporter` reports become failed `effect.error` spans with exception events. Both use the same exporter and redaction as application spans; no OTLP logs endpoint is used. Exported diagnostic annotations mask the entire `rpc.payload`, since a request value can repeat a sensitive error field under a public payload key. The exporter batches ended Effect spans and flushes during scoped shutdown with a three-second bound by default. The first failed export logs a warning with the collector status and redacted response body, or the transport failure kind when no response arrives. Repeated failures stay quiet until a successful export. Collector connection failures and HTTP errors leave requests, jobs and shutdown successful.
|
|
326
|
+
For existing Railway services, enable manual tracing per service and environment, then redeploy. The starter does this through `tracing: { enabled: true, autoInstrumentation: false }` in its infrastructure configuration (Railway CLI 5.63.0 or newer). Railway documents that it injects the `OTEL_*` variables, including `OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf`, only when the app sets no endpoint of its own. The framework exports through Effect's own `effect/observability` OTLP tracer; eBPF auto-instrumentation is outside this path. `appHost` and `workerHost` export through this pipeline themselves. For a process composed without either, such as a worker built on `appDatabase` alone, provide `otlpTracing` from `@shivaedev/server/otlpTracing.ts` to its application Layer; it masks only the built-in name rules unless `RedactionPolicy` supplies a wider policy. Railway accepts traces only: logs become `effect.log` spans with a `log` event, and Effect `ErrorReporter` reports become failed `effect.error` spans with exception events. Both use the same exporter and redaction as application spans; no OTLP logs endpoint is used. Exported diagnostic annotations mask the entire `rpc.payload`, since a request value can repeat a sensitive error field under a public payload key. The exporter batches ended Effect spans and flushes during scoped shutdown with a three-second bound by default. The first failed export logs a warning with the collector status and redacted response body, or the transport failure kind when no response arrives. Repeated failures stay quiet until a successful export. Collector connection failures and HTTP errors leave requests, jobs and shutdown successful.
|
|
309
327
|
|
|
310
328
|
`appHost` mounts `POST /_platform/errors`. Mount `useBrowserErrors` from `@shivaedev/react/client/adapters/useBrowserErrors.ts` once in the root component to forward uncaught browser errors and unhandled rejections, including before sign-in. The route accepts `{ kind: "error" | "unhandledrejection", message, stack?, url }`, returns 202, and reports through the server redaction and `ErrorReporter` pipeline at Error severity. Quoted literals in browser messages and stacks are masked before reporting; diagnostic text and stack frames remain readable. It accepts at most 20 reports per minute per client IP per process, returning 429 afterwards. Railway's `x-real-ip` is used only from a configured trusted proxy; otherwise the socket peer identifies the client. Foreign origins return 403. Invalid JSON or reports over 16 KiB return 400. Limits reset with the process and are independent across replicas.
|
|
311
329
|
|
|
312
330
|
Set `browserErrors: { log: true, includeUserId: true, requireSession: true }` on `appHost` for the recommended signed-in application setting. `log` writes one Error log with the masked message and stack per accepted report, including when OTLP export is off. `includeUserId` resolves the session and adds `user.id` to the HTTP span and error report when signed in. `requireSession` rejects signed-out reports with 401; a session-provider outage returns 503. Session lookups use the host's session and origin policy. With no session policy, requiring a session rejects reports. All three options default to false, preserving reports before sign-in without session lookups or an extra log line. `browserErrorRoute(trustedProxy?, options?)` accepts the same options when composed directly.
|
|
313
331
|
|
|
314
|
-
|
|
315
332
|
With `NODE_ENV=development` and no OTLP endpoint, `appHost` and `otlpTracing` record to `node_modules/.cache/@shivaedev/server/traces.db` in the working directory using Node's SQLite support, so the store stays out of Git through the ignore entry the application already has for `node_modules`. `runDevelopment` sets this mode for its child processes. A working directory without a `node_modules` folder gets none: the store is then `traces.db` in a folder of the system's temporary directory, and a log line at startup names the file. The folder's name carries the user's id and a hash of the working directory, so it stays the same across restarts, and it is created for its owner alone. When that name is taken by a link, by another user's folder or by a folder that others can reach, the host records in a newly made private folder instead and the log line names both. Set `PLATFORM_TRACE_STORE` to choose another file and `PLATFORM_TRACE_INDEXED_ATTRIBUTES=orderId,projectId` to index application attributes. Indexed values use the same redaction as the stored spans. An explicit OTLP endpoint takes precedence; other modes without an endpoint keep export disabled.
|
|
316
333
|
|
|
317
334
|
Records flush every second on a live maintenance clock and when their scope closes. Application clock jumps do not replay flush intervals. The store retains the latest five completed recorder runs, deleting older spans, logs and attribute indexes when a recorder closes. Active recorders remain writable until their scopes close. Logs use the existing `effect.log` diagnostic spans; the `logs` view exposes their parent span ID and trace ID. Open the file with any SQLite viewer, or inspect it directly:
|
|
@@ -340,7 +357,7 @@ For a deployment behind a proxy, set `HOST=0.0.0.0` and `TRUSTED_PROXY` to a com
|
|
|
340
357
|
|
|
341
358
|
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.
|
|
342
359
|
|
|
343
|
-
|
|
360
|
+
A host given an RPC group directly, rather than the `appModules` result, takes handlers for that group: build them 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.
|
|
344
361
|
|
|
345
362
|
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.
|
|
346
363
|
|
|
@@ -561,13 +578,15 @@ Import the module that defines the name; there is no package-root entry. Paths b
|
|
|
561
578
|
| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
562
579
|
| `appHost.ts` | `appHost`: scoped HTTP and PostgreSQL composition with loopback defaults and optional proxy trust. |
|
|
563
580
|
| `appDatabase.ts` | `appDatabase`, `DatabaseConfig`: PostgreSQL composition with migrations, Reactivity and contract's `LiveServer`. |
|
|
581
|
+
| `workerHost.ts` | `workerHost`, `WorkerHostConfig`: scoped PostgreSQL, services and job workers with the host's redaction and OTLP export. |
|
|
564
582
|
| `setupDatabases.ts` | `setupDatabases()`: prepare the local development and test databases. |
|
|
565
583
|
| `development.ts` | `development({ server, worker, conditions? })`, `runDevelopment(options)`: run the server, worker and Vite in watch mode. |
|
|
566
584
|
| `rpc-server/publicConfigLayer.ts` | `publicConfigLayer(declaration, path?)`: serve a `publicConfig` declaration from native Config. |
|
|
567
585
|
| `localTracing.ts` | `localTracing(options?)`: scoped local SQLite spans and correlated logs with configurable attribute indexes and run retention. |
|
|
568
|
-
| `otlpTracing.ts` | `otlpTracing`: redacting Railway OTLP export
|
|
586
|
+
| `otlpTracing.ts` | `otlpTracing`: redacting Railway OTLP export of spans, logs and error reports for a process composed without `appHost` or `workerHost`. |
|
|
569
587
|
| `RedactionPolicy.ts` | `RedactionPolicy`: provide the app's diagnostic key predicate derived by errors. |
|
|
570
588
|
| `adapters/redactingDiagnostics.ts`, `redactingTracer.ts`, `redactingRpcSerialization.ts` | `redactingDiagnostics(sensitive)`, `redactingTracer(sensitive)`, `redactingRpcSerialization(sensitive)`: compose native diagnostic and NDJSON boundaries. `redactingRpcSerialization` reads `RpcSerialization` from the Effect environment. |
|
|
589
|
+
| `adapters/migrationsIn.ts` | `migrationsIn(directory)`: an `AppModule` `migrations` value that loads the `migrations` folder in `directory` under Node. |
|
|
571
590
|
| `adapters/makePlatformRuntime.ts` | `makePlatformRuntime(layer, { developmentCacheKey? })`. |
|
|
572
591
|
| `adapters/subscriptionSignal.ts` | `nodeSubscriptionSignal({ nodeRequest?, request?, signals? })`, returning `{ signal, dispose }`. |
|
|
573
592
|
|
package/dist/AppModule.d.ts
CHANGED
|
@@ -9,8 +9,7 @@ export type ModuleAdmin = AnyAdminRegistry & {
|
|
|
9
9
|
};
|
|
10
10
|
interface ModuleParts {
|
|
11
11
|
readonly admin?: ModuleAdmin;
|
|
12
|
-
readonly migrations
|
|
13
|
-
readonly name: string;
|
|
12
|
+
readonly migrations?: Pick<MigrationOptions<unknown, unknown>, "loader" | "components">;
|
|
14
13
|
readonly ports?: ModuleLayer;
|
|
15
14
|
readonly queues?: readonly {
|
|
16
15
|
readonly name: string;
|
|
@@ -25,10 +24,12 @@ export type AppModule = (ModuleParts & {
|
|
|
25
24
|
};
|
|
26
25
|
readonly handlers: ModuleLayer;
|
|
27
26
|
readonly module?: never;
|
|
27
|
+
readonly name: string;
|
|
28
28
|
}) | (ModuleParts & {
|
|
29
29
|
readonly group?: never;
|
|
30
30
|
readonly handlers?: never;
|
|
31
31
|
readonly module: RegisteredModule;
|
|
32
|
+
readonly name?: never;
|
|
32
33
|
});
|
|
33
34
|
export type RegisteredModule = RpcGroup.Any & Pick<AnyModule, "application" | "declaration"> & {
|
|
34
35
|
readonly "~requires": unknown;
|
package/dist/AppModule.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppModule.d.ts","sourceRoot":"","sources":["../src/AppModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,GAAG,GAAG,QAAQ,CAAC,QAAQ,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG;IAAE,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAA;CAAE,CAAC;AAEhF,UAAU,WAAW;IACpB,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,YAAY,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"AppModule.d.ts","sourceRoot":"","sources":["../src/AppModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC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AQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC;AAGnI,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,GAAG,GAAG,IAAI,CAAC,SAAS,EAAE,aAAa,GAAG,aAAa,CAAC,GAAG;IAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
export declare function migrationsIn(directory: string): {
|
|
3
|
+
loader: Effect.Effect<readonly import("effect/sql/Migrator").ResolvedMigration[], import("effect/sql/Migrator").MigrationError, never>;
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=migrationsIn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrationsIn.d.ts","sourceRoot":"","sources":["../../src/adapters/migrationsIn.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM;IACpC,MAAM;EACf"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as NodeServices from "@effect/platform-node/NodeServices";
|
|
2
|
+
import { Effect } from "effect";
|
|
3
|
+
import { migrationsFromDirectory } from "@shivaedev/sql/migrationsFromDirectory.ts";
|
|
4
|
+
// Node supplies the file system here, so a registration's migrations need nothing from the host that runs them.
|
|
5
|
+
export function migrationsIn(directory) {
|
|
6
|
+
return { loader: migrationsFromDirectory(directory).pipe(Effect.provide(NodeServices.layer)) };
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=migrationsIn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrationsIn.js","sourceRoot":"","sources":["../../src/adapters/migrationsIn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAEpF,gHAAgH;AAChH,MAAM,UAAU,YAAY,CAAC,SAAiB;IAC7C,OAAO,EAAE,MAAM,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;AAChG,CAAC"}
|
|
@@ -6,7 +6,11 @@ import type { HostOptions, HostPolicy, HostRouteRequirements } from "#hostOption
|
|
|
6
6
|
import type { MigrationOptions } from "#MigrationOptions.ts";
|
|
7
7
|
export declare function migratedHost<TRpcs extends Rpc.Any, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TMigrations, TRouteError = never, TRouteRequirements = HostRouteRequirements, TMigrationError = never, TRequestServices = never, TRequestRequirements = never>(options: HostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TRouteError, TRouteRequirements, TRequestServices, TRequestRequirements> & HostPolicy & {
|
|
8
8
|
readonly migrations: MigrationOptions<TMigrations, TMigrationError>;
|
|
9
|
-
}, database: ReturnType<typeof appDatabase<TMigrations, TMigrationError>>): Layer.Layer<"@shivaedev/contract/LiveServer" | TServices | import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient | import("@effect/platform-node/NodeServices").NodeServices, TMigrationError | TServiceError | import("effect/Config").ConfigError | Error | import("./HandWrittenModuleHandlers.ts").HandWrittenModuleHandlers | import("@shivaedev/errors/wireMask.ts").InvalidRedactionMask | import("effect/sql/Migrator").MigrationError | import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicies | import("effect/PlatformError").PlatformError | import("@shivaedev/sql/PostgresListenerError.ts").PostgresListenerError | import("effect/Schema").SchemaError | import("@shivaedev/errors/schemaFieldScope.ts").SensitiveFieldConflict | import("effect/sql/SqlError").SqlError | import("./TrustedProxyRequired.ts").TrustedProxyRequired | import("effect/http/HttpRouter").Request.Without<THandlerError> | import("effect/http/HttpRouter").Request.Without<TRouteError
|
|
9
|
+
}, database: ReturnType<typeof appDatabase<TMigrations, TMigrationError>>): Layer.Layer<"@shivaedev/contract/LiveServer" | TServices | import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient | import("@effect/platform-node/NodeServices").NodeServices, TMigrationError | TServiceError | import("effect/Config").ConfigError | Error | import("./HandWrittenModuleHandlers.ts").HandWrittenModuleHandlers | import("@shivaedev/errors/wireMask.ts").InvalidRedactionMask | import("effect/sql/Migrator").MigrationError | import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicies | import("effect/PlatformError").PlatformError | import("@shivaedev/sql/PostgresListenerError.ts").PostgresListenerError | import("effect/Schema").SchemaError | import("@shivaedev/errors/schemaFieldScope.ts").SensitiveFieldConflict | import("effect/sql/SqlError").SqlError | import("./TrustedProxyRequired.ts").TrustedProxyRequired | import("effect/http/HttpRouter").Request.Without<THandlerError> | import("effect/http/HttpRouter").Request.Without<TRouteError> | import("effect/http/HttpRouter").Request.Without<Effect.Error<(TRpcs extends {
|
|
10
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
11
|
+
} ? Extract<TMiddleware, {
|
|
12
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
13
|
+
}> : never)["@shivaedev/contract/SubjectDeclaration"]["middleware"]>>, import("effect/crypto/Digest").Digest | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<TServiceRequirements, "@shivaedev/contract/LiveServer" | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpPlatform").HttpPlatform, "@shivaedev/contract/LiveServer" | TServices | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/crypto/SecureRandom").SecureRandom, "@shivaedev/contract/LiveServer" | TServices | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<TMigrations, import("effect/Scope").Scope>, "@shivaedev/contract/LiveServer" | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<THandlerRequirements, TRequestServices>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, "@shivaedev/contract/LiveServer" | TServices | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy, TRequestRequirements | TRequestServices>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, "@shivaedev/contract/LiveServer" | TServices | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<TRouteRequirements, never>, never>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, "@shivaedev/contract/LiveServer" | TServices | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<THandlerRequirements, Rpc.Handler<"platform.hostVersion.watch">>, Rpc.Handler<"platform.liveSync.request">>, import("effect/rpc/RpcSerialization").RpcSerialization>, TRequestRequirements | TRequestServices>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, "@shivaedev/contract/LiveServer" | TServices | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").HttpRouter, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
10
14
|
readonly _tag: `${string}.$changes`;
|
|
11
15
|
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, Rpc.Handler<"platform.liveSync.request">>, import("effect/rpc/RpcSerialization").RpcSerialization>, TRequestRequirements | TRequestServices>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, "@shivaedev/contract/LiveServer" | TServices | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request<"Requires", import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
12
16
|
readonly _tag: `${string}.$changes`;
|
|
@@ -145,7 +149,11 @@ export declare function migratedHost<TRpcs extends Rpc.Any, THandlers, THandlerE
|
|
|
145
149
|
}>, `${string}.$changes`>, THandlers>, Rpc.Handler<"platform.hostVersion.watch">>, Rpc.Handler<"platform.liveSync.request">>, import("effect/rpc/RpcSerialization").RpcSerialization>, TRequestRequirements | TRequestServices>, never>, never>>, import("effect/http/HttpRouter").HttpRouter>, import("effect/Scope").Scope>, "@shivaedev/contract/LiveServer" | TServices | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Without<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Rpc.ToHandler<Exclude<TRpcs, {
|
|
146
150
|
readonly _tag: `${string}.$changes`;
|
|
147
151
|
}>>, THandlers>, Rpc.Handler<"platform.hostVersion.watch">>, Rpc.Handler<"platform.liveSync.request">>, import("effect/rpc/RpcSerialization").RpcSerialization>, TRequestRequirements | TRequestServices>, never>, never>>, import("effect/http/HttpRouter").HttpRouter>, import("effect/Scope").Scope>, "@shivaedev/contract/LiveServer" | TServices | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Without<Exclude<Exclude<import("./requestServices.ts").RequestRequirements<TRpcs, TRequestRequirements>, never>, never>>, import("effect/http/HttpRouter").HttpRouter>, import("effect/Scope").Scope>, "@shivaedev/contract/LiveServer" | TServices | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never>>;
|
|
148
|
-
export declare function deferredHost<TRpcs extends Rpc.Any, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TMigrations, TApplicationError, TApplicationRequirements, TRouteError = never, TRouteRequirements = HostRouteRequirements, TMigrationError = never, TRequestServices = never, TRequestRequirements = never>(application: Effect.Effect<AppHttpHostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, never, never, never, TRouteError, TRouteRequirements, TRequestServices, TRequestRequirements>, TApplicationError, TApplicationRequirements>, database: ReturnType<typeof appDatabase<TMigrations, TMigrationError>>): Layer.Layer<"@shivaedev/contract/LiveServer" | TServices | import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient | import("@effect/platform-node/NodeServices").NodeServices, TApplicationError | TMigrationError | TServiceError | import("effect/Config").ConfigError | Error | import("./HandWrittenModuleHandlers.ts").HandWrittenModuleHandlers | import("@shivaedev/errors/wireMask.ts").InvalidRedactionMask | import("effect/sql/Migrator").MigrationError | import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicies | import("effect/PlatformError").PlatformError | import("@shivaedev/sql/PostgresListenerError.ts").PostgresListenerError | import("effect/Schema").SchemaError | import("@shivaedev/errors/schemaFieldScope.ts").SensitiveFieldConflict | import("effect/sql/SqlError").SqlError | import("./TrustedProxyRequired.ts").TrustedProxyRequired | import("effect/http/HttpRouter").Request.Without<THandlerError> | import("effect/http/HttpRouter").Request.Without<TRouteError
|
|
152
|
+
export declare function deferredHost<TRpcs extends Rpc.Any, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TMigrations, TApplicationError, TApplicationRequirements, TRouteError = never, TRouteRequirements = HostRouteRequirements, TMigrationError = never, TRequestServices = never, TRequestRequirements = never>(application: Effect.Effect<AppHttpHostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, never, never, never, TRouteError, TRouteRequirements, TRequestServices, TRequestRequirements>, TApplicationError, TApplicationRequirements>, database: ReturnType<typeof appDatabase<TMigrations, TMigrationError>>): Layer.Layer<"@shivaedev/contract/LiveServer" | TServices | import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient | import("@effect/platform-node/NodeServices").NodeServices, TApplicationError | TMigrationError | TServiceError | import("effect/Config").ConfigError | Error | import("./HandWrittenModuleHandlers.ts").HandWrittenModuleHandlers | import("@shivaedev/errors/wireMask.ts").InvalidRedactionMask | import("effect/sql/Migrator").MigrationError | import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicies | import("effect/PlatformError").PlatformError | import("@shivaedev/sql/PostgresListenerError.ts").PostgresListenerError | import("effect/Schema").SchemaError | import("@shivaedev/errors/schemaFieldScope.ts").SensitiveFieldConflict | import("effect/sql/SqlError").SqlError | import("./TrustedProxyRequired.ts").TrustedProxyRequired | import("effect/http/HttpRouter").Request.Without<THandlerError> | import("effect/http/HttpRouter").Request.Without<TRouteError> | import("effect/http/HttpRouter").Request.Without<Effect.Error<(TRpcs extends {
|
|
153
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
154
|
+
} ? Extract<TMiddleware, {
|
|
155
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
156
|
+
}> : never)["@shivaedev/contract/SubjectDeclaration"]["middleware"]>>, import("effect/crypto/Digest").Digest | Exclude<Exclude<TApplicationRequirements, import("effect/Scope").Scope>, "@shivaedev/contract/LiveServer" | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<TMigrations, import("effect/Scope").Scope>, "@shivaedev/contract/LiveServer" | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<TServiceRequirements, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never>, "@shivaedev/contract/LiveServer" | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpPlatform").HttpPlatform, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never>, "@shivaedev/contract/LiveServer" | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/crypto/SecureRandom").SecureRandom, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never>, "@shivaedev/contract/LiveServer" | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<THandlerRequirements, TRequestServices>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never>, "@shivaedev/contract/LiveServer" | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy, TRequestRequirements | TRequestServices>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never>, "@shivaedev/contract/LiveServer" | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<TRouteRequirements, never>, never>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never>, "@shivaedev/contract/LiveServer" | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<THandlerRequirements, Rpc.Handler<"platform.hostVersion.watch">>, Rpc.Handler<"platform.liveSync.request">>, import("effect/rpc/RpcSerialization").RpcSerialization>, TRequestRequirements | TRequestServices>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never>, "@shivaedev/contract/LiveServer" | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").HttpRouter, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
149
157
|
readonly _tag: `${string}.$changes`;
|
|
150
158
|
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, Rpc.Handler<"platform.liveSync.request">>, import("effect/rpc/RpcSerialization").RpcSerialization>, TRequestRequirements | TRequestServices>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never>, "@shivaedev/contract/LiveServer" | import("@effect/sql-pg/PgClient").PgClient | import("@effect/sql-pg/PgPool").PgPool | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request<"Requires", import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
151
159
|
readonly _tag: `${string}.$changes`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appDatabaseHttp.d.ts","sourceRoot":"","sources":["../src/appDatabaseHttp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,wBAAgB,YAAY,CAC3B,KAAK,SAAS,GAAG,CAAC,GAAG,EACrB,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,WAAW,GAAG,KAAK,EACnB,kBAAkB,GAAG,qBAAqB,EAC1C,eAAe,GAAG,KAAK,EACvB,gBAAgB,GAAG,KAAK,EACxB,oBAAoB,GAAG,KAAK,EAE5B,OAAO,EAAE,WAAW,CACnB,KAAK,EACL,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,CACpB,GACA,UAAU,GAAG;IACZ,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;CACpE,EACF,QAAQ,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"appDatabaseHttp.d.ts","sourceRoot":"","sources":["../src/appDatabaseHttp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,Y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ACxB,WAAW,GAAG,KAAK,EACnB,kBAAkB,GAAG,qBAAqB,EAC1C,eAAe,GAAG,KAAK,EACvB,gBAAgB,GAAG,KAAK,EACxB,oBAAoB,GAAG,KAAK,EAE5B,WAAW,EAAE,MAAM,CAAC,MAAM,CACzB,kBAAkB,CACjB,KAAK,EACL,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,KAAK,EACL,KAAK,EACL,KAAK,EACL,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,CACpB,EACD,iBAAiB,EACjB,wBAAwB,CACxB,EACD,QAAQ,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wiDAGtE"}
|
package/dist/appHost.d.ts
CHANGED
|
@@ -5,7 +5,11 @@ import type { HostPreflight } from "#hostPreflight.ts";
|
|
|
5
5
|
export type AppHttpHostOptions<TRpcs extends Rpc.Any = never, THandlers = never, THandlerError = never, THandlerRequirements = never, TServices = never, TServiceError = never, TServiceRequirements = never, TPreflight = never, TPreflightError = never, TPreflightRequirements = never, TRouteError = never, TRouteRequirements = HostRouteRequirements, TRequestServices = never, TRequestRequirements = never> = HostPreflight<TPreflight, TPreflightError, TPreflightRequirements> & HostCoreOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TRequestServices, TRequestRequirements> & HostRoutes<TRouteError, TRouteRequirements> & HostPolicy & {
|
|
6
6
|
readonly migrations?: undefined;
|
|
7
7
|
};
|
|
8
|
-
declare function buildHttpHost<TRpcs extends Rpc.Any = never, THandlers = never, THandlerError = never, THandlerRequirements = never, TServices = never, TServiceError = never, TServiceRequirements = never, TPreflight = never, TPreflightError = never, TPreflightRequirements = never, TRouteError = never, TRouteRequirements = HostRouteRequirements, TRequestServices = never, TRequestRequirements = never>(options: AppHttpHostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TPreflight, TPreflightError, TPreflightRequirements, TRouteError, TRouteRequirements, TRequestServices, TRequestRequirements>): Layer.Layer<TPreflight | TServices | import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices, TPreflightError | TServiceError | import("effect/Config").ConfigError | Error | import("./HandWrittenModuleHandlers.ts").HandWrittenModuleHandlers | import("@shivaedev/errors/wireMask.ts").InvalidRedactionMask | import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicies | import("effect/PlatformError").PlatformError | import("@shivaedev/errors/schemaFieldScope.ts").SensitiveFieldConflict | import("./TrustedProxyRequired.ts").TrustedProxyRequired | import("effect/http/HttpRouter").Request.Without<THandlerError> | import("effect/http/HttpRouter").Request.Without<TRouteError
|
|
8
|
+
declare function buildHttpHost<TRpcs extends Rpc.Any = never, THandlers = never, THandlerError = never, THandlerRequirements = never, TServices = never, TServiceError = never, TServiceRequirements = never, TPreflight = never, TPreflightError = never, TPreflightRequirements = never, TRouteError = never, TRouteRequirements = HostRouteRequirements, TRequestServices = never, TRequestRequirements = never>(options: AppHttpHostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TPreflight, TPreflightError, TPreflightRequirements, TRouteError, TRouteRequirements, TRequestServices, TRequestRequirements>): Layer.Layer<TPreflight | TServices | import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices, TPreflightError | TServiceError | import("effect/Config").ConfigError | Error | import("./HandWrittenModuleHandlers.ts").HandWrittenModuleHandlers | import("@shivaedev/errors/wireMask.ts").InvalidRedactionMask | import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicies | import("effect/PlatformError").PlatformError | import("@shivaedev/errors/schemaFieldScope.ts").SensitiveFieldConflict | import("./TrustedProxyRequired.ts").TrustedProxyRequired | import("effect/http/HttpRouter").Request.Without<THandlerError> | import("effect/http/HttpRouter").Request.Without<TRouteError> | import("effect/http/HttpRouter").Request.Without<import("effect/Effect").Error<(TRpcs extends {
|
|
9
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
10
|
+
} ? Extract<TMiddleware, {
|
|
11
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
12
|
+
}> : never)["@shivaedev/contract/SubjectDeclaration"]["middleware"]>>, Exclude<Exclude<TPreflightRequirements, never>, import("effect/crypto/Aead").Aead | import("effect/crypto/Cipher").Cipher | import("effect/crypto/Digest").Digest | import("effect/crypto/Kdf").Kdf | import("effect/crypto/KeyAgreement").KeyAgreement | import("effect/crypto/KeyWrap").KeyWrap | import("effect/crypto/Mac").Mac | import("effect/crypto/SecureRandom").SecureRandom | import("effect/crypto/Signature").Signature> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<TServiceRequirements, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never>, TPreflight>, import("effect/crypto/Aead").Aead | import("effect/crypto/Cipher").Cipher | import("effect/crypto/Digest").Digest | import("effect/crypto/Kdf").Kdf | import("effect/crypto/KeyAgreement").KeyAgreement | import("effect/crypto/KeyWrap").KeyWrap | import("effect/crypto/Mac").Mac | import("effect/crypto/SecureRandom").SecureRandom | import("effect/crypto/Signature").Signature> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpPlatform").HttpPlatform, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never>, TPreflight>, import("effect/crypto/Aead").Aead | import("effect/crypto/Cipher").Cipher | import("effect/crypto/Digest").Digest | import("effect/crypto/Kdf").Kdf | import("effect/crypto/KeyAgreement").KeyAgreement | import("effect/crypto/KeyWrap").KeyWrap | import("effect/crypto/Mac").Mac | import("effect/crypto/SecureRandom").SecureRandom | import("effect/crypto/Signature").Signature> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/crypto/SecureRandom").SecureRandom, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never>, TPreflight>, import("effect/crypto/Aead").Aead | import("effect/crypto/Cipher").Cipher | import("effect/crypto/Digest").Digest | import("effect/crypto/Kdf").Kdf | import("effect/crypto/KeyAgreement").KeyAgreement | import("effect/crypto/KeyWrap").KeyWrap | import("effect/crypto/Mac").Mac | import("effect/crypto/SecureRandom").SecureRandom | import("effect/crypto/Signature").Signature> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<THandlerRequirements, TRequestServices>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never>, TPreflight>, import("effect/crypto/Aead").Aead | import("effect/crypto/Cipher").Cipher | import("effect/crypto/Digest").Digest | import("effect/crypto/Kdf").Kdf | import("effect/crypto/KeyAgreement").KeyAgreement | import("effect/crypto/KeyWrap").KeyWrap | import("effect/crypto/Mac").Mac | import("effect/crypto/SecureRandom").SecureRandom | import("effect/crypto/Signature").Signature> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy, TRequestRequirements | TRequestServices>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never>, TPreflight>, import("effect/crypto/Aead").Aead | import("effect/crypto/Cipher").Cipher | import("effect/crypto/Digest").Digest | import("effect/crypto/Kdf").Kdf | import("effect/crypto/KeyAgreement").KeyAgreement | import("effect/crypto/KeyWrap").KeyWrap | import("effect/crypto/Mac").Mac | import("effect/crypto/SecureRandom").SecureRandom | import("effect/crypto/Signature").Signature> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<TRouteRequirements, never>, never>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never>, TPreflight>, import("effect/crypto/Aead").Aead | import("effect/crypto/Cipher").Cipher | import("effect/crypto/Digest").Digest | import("effect/crypto/Kdf").Kdf | import("effect/crypto/KeyAgreement").KeyAgreement | import("effect/crypto/KeyWrap").KeyWrap | import("effect/crypto/Mac").Mac | import("effect/crypto/SecureRandom").SecureRandom | import("effect/crypto/Signature").Signature> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<THandlerRequirements, Rpc.Handler<"platform.hostVersion.watch">>, Rpc.Handler<"platform.liveSync.request">>, import("effect/rpc/RpcSerialization").RpcSerialization>, TRequestRequirements | TRequestServices>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never>, TPreflight>, import("effect/crypto/Aead").Aead | import("effect/crypto/Cipher").Cipher | import("effect/crypto/Digest").Digest | import("effect/crypto/Kdf").Kdf | import("effect/crypto/KeyAgreement").KeyAgreement | import("effect/crypto/KeyWrap").KeyWrap | import("effect/crypto/Mac").Mac | import("effect/crypto/SecureRandom").SecureRandom | import("effect/crypto/Signature").Signature> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").HttpRouter, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
9
13
|
readonly _tag: `${string}.$changes`;
|
|
10
14
|
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, Rpc.Handler<"platform.liveSync.request">>, import("effect/rpc/RpcSerialization").RpcSerialization>, TRequestRequirements | TRequestServices>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never>, TPreflight>, import("effect/crypto/Aead").Aead | import("effect/crypto/Cipher").Cipher | import("effect/crypto/Digest").Digest | import("effect/crypto/Kdf").Kdf | import("effect/crypto/KeyAgreement").KeyAgreement | import("effect/crypto/KeyWrap").KeyWrap | import("effect/crypto/Mac").Mac | import("effect/crypto/SecureRandom").SecureRandom | import("effect/crypto/Signature").Signature> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request<"Requires", import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
11
15
|
readonly _tag: `${string}.$changes`;
|
package/dist/appHost.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appHost.d.ts","sourceRoot":"","sources":["../src/appHost.ts"],"names":[],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Ae,GAAG,KAAK,EACvB,sBAAsB,GAAG,KAAK,EAC9B,WAAW,GAAG,KAAK,EACnB,kBAAkB,GAAG,qBAAqB,EAC1C,gBAAgB,GAAG,KAAK,EACxB,oBAAoB,GAAG,KAAK,EAE5B,OAAO,EAAE,kBAAkB,CAC1B,KAAK,EACL,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,UAAU,EACV,eAAe,EACf,sBAAsB,EACtB,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,CACpB,KACG,UAAU,CACd,OAAO,aAAa,CACnB,KAAK,EACL,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,OAAO,CAAC,UAAU,CAAC,EACnB,OAAO,CAAC,eAAe,CAAC,EACxB,OAAO,CAAC,sBAAsB,CAAC,EAC/B,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,CACpB,CACD,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,eAA+B,CAAC"}
|
package/dist/appHostHttp.d.ts
CHANGED
|
@@ -2,7 +2,11 @@ import { Effect, Layer } from "effect";
|
|
|
2
2
|
import { HttpRouter, HttpServer } from "effect/http";
|
|
3
3
|
import type { Rpc } from "effect/rpc";
|
|
4
4
|
import type { HostOptions, HostPolicy, HostRouteRequirements } from "#hostOptions.ts";
|
|
5
|
-
export declare function appHostHttp<TRpcs extends Rpc.Any, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TRouteError = never, TRouteRequirements = HostRouteRequirements, TRequestServices = never, TRequestRequirements = never>(options: HostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TRouteError, TRouteRequirements, TRequestServices, TRequestRequirements> & HostPolicy): Layer.Layer<TServices | import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | HttpServer.HttpServer | import("@effect/platform-node/NodeServices").NodeServices, TServiceError | import("effect/Config").ConfigError | Error | import("./HandWrittenModuleHandlers.ts").HandWrittenModuleHandlers | import("@shivaedev/errors/wireMask.ts").InvalidRedactionMask | import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicies | import("effect/PlatformError").PlatformError | import("@shivaedev/errors/schemaFieldScope.ts").SensitiveFieldConflict | import("./TrustedProxyRequired.ts").TrustedProxyRequired | HttpRouter.Request.Without<THandlerError> | HttpRouter.Request.Without<TRouteError
|
|
5
|
+
export declare function appHostHttp<TRpcs extends Rpc.Any, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TRouteError = never, TRouteRequirements = HostRouteRequirements, TRequestServices = never, TRequestRequirements = never>(options: HostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TRouteError, TRouteRequirements, TRequestServices, TRequestRequirements> & HostPolicy): Layer.Layer<TServices | import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | HttpServer.HttpServer | import("@effect/platform-node/NodeServices").NodeServices, TServiceError | import("effect/Config").ConfigError | Error | import("./HandWrittenModuleHandlers.ts").HandWrittenModuleHandlers | import("@shivaedev/errors/wireMask.ts").InvalidRedactionMask | import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicies | import("effect/PlatformError").PlatformError | import("@shivaedev/errors/schemaFieldScope.ts").SensitiveFieldConflict | import("./TrustedProxyRequired.ts").TrustedProxyRequired | HttpRouter.Request.Without<THandlerError> | HttpRouter.Request.Without<TRouteError> | HttpRouter.Request.Without<Effect.Error<(TRpcs extends {
|
|
6
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
7
|
+
} ? Extract<TMiddleware, {
|
|
8
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
9
|
+
}> : never)["@shivaedev/contract/SubjectDeclaration"]["middleware"]>>, Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<TServiceRequirements, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpPlatform").HttpPlatform, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/crypto/SecureRandom").SecureRandom, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<THandlerRequirements, TRequestServices>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | HttpServer.HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy, TRequestRequirements | TRequestServices>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | HttpServer.HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<TRouteRequirements, never>, never>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | HttpServer.HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<THandlerRequirements, Rpc.Handler<"platform.hostVersion.watch">>, Rpc.Handler<"platform.liveSync.request">>, import("effect/rpc/RpcSerialization").RpcSerialization>, TRequestRequirements | TRequestServices>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | HttpServer.HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.HttpRouter, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
6
10
|
readonly _tag: `${string}.$changes`;
|
|
7
11
|
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, Rpc.Handler<"platform.liveSync.request">>, import("effect/rpc/RpcSerialization").RpcSerialization>, TRequestRequirements | TRequestServices>, never>, never>>, import("effect/http/HttpServerRequest").HttpServerRequest | import("effect/Scope").Scope>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | HttpServer.HttpServer | import("@effect/platform-node/NodeServices").NodeServices>, TServices>, import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("@effect/platform-node/NodeServices").NodeServices>, never>, never>, never>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request<"Requires", import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
8
12
|
readonly _tag: `${string}.$changes`;
|