@shivaedev/platform 0.13.0 → 0.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +25 -4
  3. package/dist/server/appHost.d.ts +9 -16
  4. package/dist/server/appHost.d.ts.map +1 -1
  5. package/dist/server/appHost.js +5 -2
  6. package/dist/server/appHost.js.map +1 -1
  7. package/dist/server/appHostHttp.d.ts +3 -2
  8. package/dist/server/appHostHttp.d.ts.map +1 -1
  9. package/dist/server/appHostHttp.js +5 -1
  10. package/dist/server/appHostHttp.js.map +1 -1
  11. package/dist/server/databaseLayer.d.ts +9 -2
  12. package/dist/server/databaseLayer.d.ts.map +1 -1
  13. package/dist/server/databaseLayer.js +5 -2
  14. package/dist/server/databaseLayer.js.map +1 -1
  15. package/dist/server/healthRoute.d.ts +3 -0
  16. package/dist/server/healthRoute.d.ts.map +1 -0
  17. package/dist/server/healthRoute.js +18 -0
  18. package/dist/server/healthRoute.js.map +1 -0
  19. package/dist/server/otlpHttpClient.d.ts +4 -0
  20. package/dist/server/otlpHttpClient.d.ts.map +1 -0
  21. package/dist/server/otlpHttpClient.js +24 -0
  22. package/dist/server/otlpHttpClient.js.map +1 -0
  23. package/dist/server/otlpTracing.d.ts.map +1 -1
  24. package/dist/server/otlpTracing.js +6 -3
  25. package/dist/server/otlpTracing.js.map +1 -1
  26. package/dist/server/redactOtlpUrl.d.ts +2 -0
  27. package/dist/server/redactOtlpUrl.d.ts.map +1 -0
  28. package/dist/server/redactOtlpUrl.js +41 -0
  29. package/dist/server/redactOtlpUrl.js.map +1 -0
  30. package/dist/server/safeOtlpSerialization.d.ts +2 -1
  31. package/dist/server/safeOtlpSerialization.d.ts.map +1 -1
  32. package/dist/server/safeOtlpSerialization.js +25 -16
  33. package/dist/server/safeOtlpSerialization.js.map +1 -1
  34. package/package.json +17 -7
  35. package/src/server/appHost.ts +41 -29
  36. package/src/server/appHostHttp.ts +26 -2
  37. package/src/server/databaseLayer.ts +17 -7
  38. package/src/server/healthRoute.ts +27 -0
  39. package/src/server/otlpHttpClient.ts +35 -0
  40. package/src/server/otlpTracing.ts +15 -5
  41. package/src/server/redactOtlpUrl.ts +48 -0
  42. package/src/server/safeOtlpSerialization.ts +42 -29
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.14.1 - 2026-10-17
4
+
5
+ ### Added
6
+
7
+ - `appHost({ application, migrations, config? })` evaluates a native Effect returning HTTP host options only after migrations or the schema-current check finishes. Construction keeps typed errors, requirements and scoped resources in the host Layer.
8
+
9
+ ### Fixed
10
+
11
+ - Honour OTLP protocol configuration, including the traces-specific override, with native Effect JSON and protobuf encoders and sensitive diagnostic redaction in both. Default to `http/protobuf` as recommended by OpenTelemetry and fail configuration for unsupported protocols.
12
+ - Name exported HTTP server spans with the method and matched route template, preserving `http.route` and incoming trace context; unmatched requests retain the method alone.
13
+ - Warn on the first failed OTLP export with the collector status and redacted answer, and include `OTEL_SERVICE_VERSION` as `service.version`.
14
+ - Security fix: `otlpTracing` redacts every URL query value, fragment and userinfo before exporting traces, including HTTP server and client spans, events and links. Paths and query parameter names remain readable. Platform 0.13.0 and 0.14.0 exported URL query values; apps with tracing enabled should upgrade.
15
+
16
+ ## 0.14.0 - 2026-10-17
17
+
18
+ ### Added
19
+
20
+ - `appHost` serves unauthenticated `GET /health` with an empty, uncached response: 200 when its database probe succeeds within two seconds, or 503 when SQL is absent, unavailable or times out.
21
+ - `appDatabase` and database-backed `appHost` accept `migrations.mode: "check"` to verify required migration IDs and names without applying migrations or creating a ledger. Missing or pending migrations fail startup with native `MigrationError`; the default migration mode is unchanged.
22
+
23
+ ### Fixed
24
+
25
+ - Align published contract, Prisma and tRPC dependencies with the current framework releases.
26
+
3
27
  ## 0.13.0 - 2026-10-17
4
28
 
5
29
  ### Added
package/README.md CHANGED
@@ -88,11 +88,32 @@ For local tools, use `policy: "loopback"` with contracts that do not use session
88
88
 
89
89
  Omit `migrations` to host an app without a database. This form creates no SQL pool and reads no `DATABASE_URL`; `AppHttpHostOptions` describes it. `AppHostOptions` retains its required migrations for existing typed callers. A service that needs SQL still requires a SQL Layer. Provide `appDatabase` to the application’s service Layer when it owns database composition, as Fleet's daemon does with its migration loader and namespace ledger. Real HTTP tests cover the custom route, session-free loopback guard and database-free startup; Fleet's PostgreSQL daemon tests cover the adopted composition.
90
90
 
91
- Set `OTEL_EXPORTER_OTLP_ENDPOINT` (the collector base URL; `/v1/traces` is appended) or `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` (the complete traces URL, which takes precedence) to export `appHost`'s Effect spans over OTLP/HTTP JSON. `OTEL_EXPORTER_OTLP_HEADERS` supplies comma-separated `key=value` exporter headers with URL-encoded values. `OTEL_SERVICE_NAME` sets the service name; `OTEL_RESOURCE_ATTRIBUTES` adds comma-separated, URL-encoded resource attributes and can supply `service.name` when no service name is set. The fallback name is `unknown_service`. Configuration is read through Effect Config. Without an endpoint, no exporter or export loop is built, even when service metadata is set.
91
+ `appHost` serves unauthenticated `GET /health`. It queries its SQL client on each request and returns `200` only when the query succeeds within two seconds; a missing SQL client, query failure or timeout returns `503`. Both responses have an empty body and `Cache-Control: no-store`. This route also works when the SQL client comes from the application’s `services` Layer. Use it for database readiness checks.
92
92
 
93
- Railway's per-service tracing setting provides these variables: enable it separately for the web service and worker. 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/platform/otlpTracing.ts` to its application Layer. It batches ended Effect spans and flushes during scoped shutdown with a three-second bound. Collector connection failures and HTTP errors leave requests, jobs and shutdown successful. HTTP receiver tests cover the host and the starter's PostgreSQL word-count worker; they do not establish delivery in a deployed collector.
93
+ Set `migrations.mode: "check"` on `appDatabase` or a database-backed `appHost` when a separate pre-deploy command owns migrations. Startup reads the ledger and fails with native `MigrationError` (`kind: "BadState"`) if any required migration ID or name is missing; it does not run migrations or create a ledger. Later ledger entries are allowed for rolling deployments. With `mode` omitted or `"migrate"`, the existing migration behavior remains: startup applies pending migrations with a five-second lock timeout unless `migrations.lockTimeout` overrides it.
94
94
 
95
- Export serialization applies the existing sensitive-key and credential-text redaction to span attributes, events, links, error details and resource attributes. Exporter headers stay in the collector request, outside the spans. Applications must still avoid placing secrets in span names, free text or custom attributes; a comprehensive application redaction policy and request/action correlation remain open.
95
+ When construction itself touches the schema, use `appHost({ migrations, config, application })`. `application` is a native Effect that returns the HTTP host options (`group`, handler and service Layers, session policy, and optional HTTP config). The host first builds `appDatabase`, then evaluates this Effect in the host scope with SQL, Reactivity and `AppChanges` available. A failed migration or schema-current check prevents construction. Initialization requirements and errors stay in the returned Layer's types, and acquired resources close with the host scope.
96
+
97
+ ```ts
98
+ const host = appHost({
99
+ config: { databaseUrl },
100
+ migrations: { loader: migrations, mode: "check" },
101
+ application: Effect.gen(function* () {
102
+ const { routes, sessions } = yield* makeAuth();
103
+ return { group: Api, handlers: Handlers, services: Services, routes, sessions };
104
+ }),
105
+ });
106
+ ```
107
+
108
+ 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.
109
+
110
+ Set `OTEL_EXPORTER_OTLP_ENDPOINT` (the collector base URL; `/v1/traces` is appended) or `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` (the complete traces URL, which takes precedence) to export `appHost`'s Effect spans over OTLP/HTTP. `OTEL_EXPORTER_OTLP_PROTOCOL` selects `http/protobuf` or `http/json`; `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL` takes precedence for traces. When neither protocol variable is set, the default is `http/protobuf`, following 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. `OTEL_EXPORTER_OTLP_HEADERS` supplies comma-separated `key=value` exporter headers with URL-encoded values. `OTEL_SERVICE_NAME` sets the service name and `OTEL_SERVICE_VERSION` sets `service.version`; `OTEL_RESOURCE_ATTRIBUTES` adds comma-separated, URL-encoded resource attributes and can supply `service.name` when no service name is set. The fallback name is `unknown_service`. Configuration is read through Effect Config. Without an endpoint, no exporter or export loop is built, even when service metadata is set.
111
+
112
+ On Railway, enable the per-service tracing setting separately for the web service and worker, and leave both exporter endpoint variables unset in your app's configuration. Railway 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/platform/otlpTracing.ts` to its application Layer. It batches ended Effect spans and flushes during scoped shutdown with a three-second bound. 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. HTTP receiver tests cover the host and the starter's PostgreSQL word-count worker; they do not establish delivery in a deployed collector.
113
+
114
+ Exported HTTP server spans use `{method} {route}` with `http.route` for matched RPC and router paths, including parameter templates; unmatched requests use the method alone. The production host continues incoming W3C `traceparent` context, including one sent by an edge proxy.
115
+
116
+ Both JSON and protobuf export serialization apply the existing sensitive-key and credential-text redaction to span attributes, events, links, error details and resource attributes. Exporter headers stay in the collector request, outside the spans. Applications must still avoid placing secrets in span names, free text or custom attributes; a comprehensive application redaction policy and request/action correlation remain open.
96
117
 
97
118
  Set `config.maxConnections` on `appDatabase` or a migrated `appHost` to bound the pool. A daemon with long-lived RPC streams can use `config.disablePreemptiveShutdown: true` to let scope closure interrupt those streams before closing the listener; omitting it keeps Node's native graceful-shutdown default. Fleet's daemon tests cover one bounded pool and scoped provider and listener cleanup, including follower reconnection after shutdown.
98
119
 
@@ -421,7 +442,7 @@ Import the module that defines the name; there is no package-root entry. Paths b
421
442
  | Module | Names and purpose |
422
443
  | --- | --- |
423
444
  | `otlpTracing.ts` | `otlpTracing`: scoped, opt-in Effect OTLP trace export configured through standard exporter variables; provide it to worker Layers. |
424
- | `appHost.ts` | `appHost({ group, handlers, services, migrations?, sessions?, policy?, rpcPath?, assets?, routes?, config? })`, `appDatabase({ migrations, config? })`, `AppChanges`, `AppHostOptions`, `AppHttpHostOptions`, `AppLocalHostOptions`, `AppDatabaseOptions`: scoped HTTP and PostgreSQL composition with loopback defaults and optional proxy trust. |
445
+ | `appHost.ts` | `appHost({ group, handlers, services, migrations?, sessions?, policy?, rpcPath?, assets?, routes?, config? })` or `appHost({ application, migrations, config? })`, `appDatabase({ migrations, config? })`, `AppChanges`, `AppHostOptions`, `AppHttpHostOptions`, `AppLocalHostOptions`, `AppDatabaseOptions`: scoped HTTP and PostgreSQL composition with loopback defaults and optional proxy trust. |
425
446
  | `errors/taxonomy.ts` | `NotFound`, `Unauthorized`, `Forbidden`, `BadRequest`, `Conflict`, `PreconditionFailed`, `TooManyRequests`, `AuthUnavailable`, `InternalServerError`, `ServiceUnavailable`: Schema tagged error classes with a `message`; `BadRequest` and `Conflict` also accept an optional `field`. |
426
447
  | `errors/rejected-field.ts` | `rejectedField(unknown): Option<RejectedField>`; `RejectedField` is `{ field: string, message: string }`. |
427
448
  | `rpc/identity.ts` | `RequestId`: string service. `Identity`: `IdentityValue`, `{ id: string }`. `OptionalIdentity`: `Option<IdentityValue>`. `SessionUser`: `SessionUserValue`, `{ id, name, email }`. |
@@ -1,10 +1,10 @@
1
- import { Context, type Duration, type Effect, type Redacted } from "effect";
1
+ import { Context, type Duration, type Effect } from "effect";
2
2
  import type { Rpc } from "effect/rpc";
3
3
  import type { Migrator } from "effect/sql";
4
- import type { PostgresChangesOptions } from "@shivaedev/effect-sql/postgresChanges.ts";
5
4
  import type { SessionPolicy, SessionShape } from "#rpc-server/session.ts";
6
- import { appHostHttp, migratedHost } from "./appHostHttp.ts";
7
- import type { HostOptions, HostPolicy } from "./hostOptions.ts";
5
+ import { appHostHttp, deferredHost } from "#server/appHostHttp.ts";
6
+ import { type DatabaseConfig } from "#server/databaseLayer.ts";
7
+ import type { HostOptions, HostPolicy } from "#server/hostOptions.ts";
8
8
  declare const AppChanges_base: Context.ServiceClass<AppChanges, "@shivaedev/platform/AppChanges", {
9
9
  resync: Effect.Effect<void, never, never>;
10
10
  stream: (keys: readonly import("@shivaedev/effect-contract/keys.ts").Key[]) => import("effect/Stream").Stream<{
@@ -24,14 +24,10 @@ declare const AppChanges_base: Context.ServiceClass<AppChanges, "@shivaedev/plat
24
24
  export declare class AppChanges extends AppChanges_base {
25
25
  }
26
26
  export interface AppDatabaseOptions<R = never> {
27
- readonly config?: {
28
- readonly databaseUrl?: Redacted.Redacted<string>;
29
- readonly applicationName?: string;
30
- readonly maxConnections?: number;
31
- readonly changes?: Omit<PostgresChangesOptions, "client" | "resync">;
32
- };
27
+ readonly config?: DatabaseConfig;
33
28
  readonly migrations: {
34
29
  readonly loader: Migrator.Loader<R>;
30
+ readonly mode?: "migrate" | "check";
35
31
  readonly table?: string;
36
32
  readonly lockTimeout?: Duration.Input;
37
33
  };
@@ -50,12 +46,9 @@ export type AppLocalHostOptions<TRpcs extends Rpc.Any, THandlers, THandlerError,
50
46
  export type AppHttpHostOptions<TRpcs extends Rpc.Any, THandlers, THandlerError, THandlerRequirements, TServices = never, TServiceError = never, TServiceRequirements = never, TSession extends SessionShape = SessionShape> = HostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements> & HostPolicy<TSession> & {
51
47
  readonly migrations?: undefined;
52
48
  };
53
- export declare function appHost<TRpcs extends Rpc.Any, THandlers, THandlerError, THandlerRequirements, TServices = never, TServiceError = never, TServiceRequirements = never, TMigrations = never, TSession extends SessionShape = SessionShape>(options: AppHostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TMigrations, TSession> | AppLocalHostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TMigrations>): ReturnType<typeof migratedHost<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TMigrations, TSession>>;
54
- export declare function appHost<TRpcs extends Rpc.Any, THandlers, THandlerError, THandlerRequirements, TServices = never, TServiceError = never, TServiceRequirements = never>(options: HostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements> & {
55
- readonly policy: "loopback";
56
- readonly sessions?: never;
57
- readonly migrations?: undefined;
58
- }): ReturnType<typeof appHostHttp<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, SessionShape>>;
49
+ export declare function appHost<TRpcs extends Rpc.Any, THandlers, THandlerError, THandlerRequirements, TServices = never, TServiceError = never, TServiceRequirements = never, TMigrations = never, TSession extends SessionShape = SessionShape, TApplicationError = never, TApplicationRequirements = never>(options: (AppDatabaseOptions<TMigrations> & {
50
+ readonly application: Effect.Effect<AppHttpHostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TSession>, TApplicationError, TApplicationRequirements>;
51
+ }) | AppHostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TMigrations, TSession> | AppLocalHostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TMigrations>): ReturnType<typeof deferredHost<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TMigrations, TSession, TApplicationError, TApplicationRequirements>>;
59
52
  export declare function appHost<TRpcs extends Rpc.Any, THandlers, THandlerError, THandlerRequirements, TServices = never, TServiceError = never, TServiceRequirements = never, TSession extends SessionShape = SessionShape>(options: AppHttpHostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TSession>): ReturnType<typeof appHostHttp<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TSession>>;
60
53
  export {};
61
54
  //# sourceMappingURL=appHost.d.ts.map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{ Context } from "effect";
2
- import { appHostHttp, migratedHost } from "./appHostHttp.js";
3
- import { databaseLayer } from "./databaseLayer.js";
2
+ import { appHostHttp, deferredHost, migratedHost } from "#server/appHostHttp.ts";
3
+ import { databaseLayer } from "#server/databaseLayer.ts";
4
4
  export class AppChanges extends Context.Service()("@shivaedev/platform/AppChanges") {
5
5
  }
6
6
  export function appDatabase(options) {
7
7
  return databaseLayer(options, AppChanges);
8
8
  }
9
9
  export function appHost(options) {
10
+ if ("application" in options) {
11
+ return deferredHost(options.application, appDatabase(options));
12
+ }
10
13
  return options.migrations === undefined
11
14
  ? appHostHttp(options)
12
15
  : migratedHost({ ...options, migrations: options.migrations }, appDatabase({ ...options, migrations: options.migrations }));
@@ -1 +1 @@
1
- {"version":3,"file":"appHost.js","sourceRoot":"","sources":["../../src/server/appHost.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA6C,MAAM,QAAQ,CAAC;AAM5E,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,MAAM,OAAO,UAAW,SAAQ,OAAO,CAAC,OAAO,EAAqD,CAAC,gCAAgC,CAAC;CAAG;AAezI,MAAM,UAAU,WAAW,CAAI,OAA8B;IAC5D,OAAO,aAAa,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AAC3C,CAAC;AA2FD,MAAM,UAAU,OAAO,CAWtB,OAGsI;IAEtI,OAAO,OAAO,CAAC,UAAU,KAAK,SAAS;QACtC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC;QACtB,CAAC,CAAC,YAAY,CAAC,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,EAAE,WAAW,CAAC,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;AAC9H,CAAC"}
1
+ {"version":3,"file":"appHost.js","sourceRoot":"","sources":["../../src/server/appHost.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA8B,MAAM,QAAQ,CAAC;AAK7D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAuB,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAG9E,MAAM,OAAO,UAAW,SAAQ,OAAO,CAAC,OAAO,EAAqD,CAAC,gCAAgC,CAAC;CAAG;AAWzI,MAAM,UAAU,WAAW,CAAI,OAA8B;IAC5D,OAAO,aAAa,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AAC3C,CAAC;AAgGD,MAAM,UAAU,OAAO,CAatB,OAUsI;IAEtI,IAAI,aAAa,IAAI,OAAO,EAAE,CAAC;QAC9B,OAAO,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,OAAO,CAAC,UAAU,KAAK,SAAS;QACtC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC;QACtB,CAAC,CAAC,YAAY,CAAC,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,EAAE,WAAW,CAAC,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;AAC9H,CAAC"}
@@ -1,12 +1,13 @@
1
1
  import { NodeServices } from "@effect/platform-node";
2
- import { Config, Layer } from "effect";
2
+ import { Config, Effect, Layer } from "effect";
3
3
  import { HttpRouter } from "effect/http";
4
4
  import { type Rpc, RpcSerialization } from "effect/rpc";
5
- import type { AppHostOptions, AppLocalHostOptions } from "#appHost.ts";
5
+ import type { AppHostOptions, AppHttpHostOptions, AppLocalHostOptions } from "#appHost.ts";
6
6
  import type { databaseLayer } from "#databaseLayer.ts";
7
7
  import type { HostOptions, HostPolicy } from "#hostOptions.ts";
8
8
  import type { RequestTracing } from "#rpc/middleware.ts";
9
9
  import { type SessionShape } from "#rpc-server/session.ts";
10
10
  export declare function appHostHttp<TRpcs extends Rpc.Any, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TSession extends SessionShape>(options: HostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements> & HostPolicy<TSession>): Layer.Layer<TServices | import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices, TServiceError | Config.ConfigError | import("effect/PlatformError").PlatformError | import("effect/http/HttpServerError").ServeError | HttpRouter.Request.Without<THandlerError>, Exclude<Exclude<Exclude<TServiceRequirements, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<import("effect/FileSystem").FileSystem, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpPlatform").HttpPlatform, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpServer").HttpServer, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<import("effect/Path").Path, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<THandlerRequirements, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<HttpRouter.HttpRouter, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<RpcSerialization.RpcSerialization, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Rpc.ServicesServer<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Rpc.ToHandler<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"Requires", Exclude<THandlerRequirements, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"Requires", Exclude<Exclude<HttpRouter.HttpRouter, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"Requires", Exclude<Exclude<RpcSerialization.RpcSerialization, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"Requires", Exclude<Exclude<Exclude<Rpc.ServicesServer<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"Requires", Exclude<Exclude<Exclude<Rpc.ToHandler<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Without<Exclude<THandlerRequirements, RpcSerialization.RpcSerialization>>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Without<Exclude<Exclude<HttpRouter.HttpRouter, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Without<Exclude<Exclude<RpcSerialization.RpcSerialization, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Without<Exclude<Exclude<Exclude<Rpc.ServicesServer<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Without<Exclude<Exclude<Exclude<Rpc.ToHandler<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>>;
11
11
  export declare function migratedHost<TRpcs extends Rpc.Any, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TMigrations, TSession extends SessionShape>(options: AppHostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TMigrations, TSession> | AppLocalHostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TMigrations>, database: ReturnType<typeof databaseLayer<TMigrations>>): Layer.Layer<TServices | import("#appHost.ts").AppChanges | import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient | NodeServices.NodeServices, TServiceError | Config.ConfigError | import("effect/sql/Migrator").MigrationError | import("effect/PlatformError").PlatformError | import("effect/http/HttpServerError").ServeError | import("effect/sql/SqlError").SqlError | HttpRouter.Request.Without<THandlerError>, Exclude<Exclude<Exclude<Exclude<TServiceRequirements, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<import("effect/FileSystem").FileSystem, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpPlatform").HttpPlatform, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpServer").HttpServer, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<import("effect/Path").Path, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<TMigrations, import("effect/Scope").Scope>, import("@effect/sql-pg/PgClient").PgClient | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<THandlerRequirements, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<HttpRouter.HttpRouter, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<RpcSerialization.RpcSerialization, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Rpc.ServicesServer<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Rpc.ToHandler<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"Requires", Exclude<THandlerRequirements, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"Requires", Exclude<Exclude<HttpRouter.HttpRouter, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"Requires", Exclude<Exclude<RpcSerialization.RpcSerialization, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"Requires", Exclude<Exclude<Exclude<Rpc.ServicesServer<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"Requires", Exclude<Exclude<Exclude<Rpc.ToHandler<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Without<Exclude<THandlerRequirements, RpcSerialization.RpcSerialization>>, HttpRouter.HttpRouter>, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Without<Exclude<Exclude<HttpRouter.HttpRouter, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.HttpRouter>, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Without<Exclude<Exclude<RpcSerialization.RpcSerialization, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.HttpRouter>, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Without<Exclude<Exclude<Exclude<Rpc.ServicesServer<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.HttpRouter>, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never> | Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Without<Exclude<Exclude<Exclude<Rpc.ToHandler<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.HttpRouter>, TServices | import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>>;
12
+ export declare function deferredHost<TRpcs extends Rpc.Any, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TMigrations, TSession extends SessionShape, TApplicationError, TApplicationRequirements>(application: Effect.Effect<AppHttpHostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TSession>, TApplicationError, TApplicationRequirements>, database: ReturnType<typeof databaseLayer<TMigrations>>): Layer.Layer<TServices | import("#appHost.ts").AppChanges | import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient | NodeServices.NodeServices, TApplicationError | TServiceError | Config.ConfigError | import("effect/sql/Migrator").MigrationError | import("effect/PlatformError").PlatformError | import("effect/http/HttpServerError").ServeError | import("effect/sql/SqlError").SqlError | HttpRouter.Request.Without<THandlerError>, Exclude<Exclude<TApplicationRequirements, import("effect/Scope").Scope>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<TMigrations, import("effect/Scope").Scope>, import("@effect/sql-pg/PgClient").PgClient | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<TServiceRequirements, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/FileSystem").FileSystem, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpPlatform").HttpPlatform, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpServer").HttpServer, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/Path").Path, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<THandlerRequirements, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<HttpRouter.HttpRouter, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<RpcSerialization.RpcSerialization, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Rpc.ServicesServer<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Rpc.ToHandler<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"Requires", Exclude<THandlerRequirements, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"Requires", Exclude<Exclude<HttpRouter.HttpRouter, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"Requires", Exclude<Exclude<RpcSerialization.RpcSerialization, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"Requires", Exclude<Exclude<Exclude<Rpc.ServicesServer<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Only<"Requires", Exclude<Exclude<Exclude<Rpc.ToHandler<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.GlobalProvided>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Without<Exclude<THandlerRequirements, RpcSerialization.RpcSerialization>>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Without<Exclude<Exclude<HttpRouter.HttpRouter, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Without<Exclude<Exclude<RpcSerialization.RpcSerialization, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Without<Exclude<Exclude<Exclude<Rpc.ServicesServer<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<HttpRouter.Request.Without<Exclude<Exclude<Exclude<Rpc.ToHandler<TRpcs>, import("effect/Scope").Scope>, THandlers | RequestTracing>, RpcSerialization.RpcSerialization>>, HttpRouter.HttpRouter>, TServices>, import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/http/HttpServer").HttpServer | NodeServices.NodeServices>, NodeServices.NodeServices>, never>, import("#appHost.ts").AppChanges | import("@effect/sql-pg/PgClient").PgClient | import("effect/reactivity/Reactivity").Reactivity | import("effect/sql/SqlClient").SqlClient>>;
12
13
  //# sourceMappingURL=appHostHttp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"appHostHttp.d.ts","sourceRoot":"","sources":["../../src/server/appHostHttp.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAY,MAAM,EAAU,KAAK,EAAkB,MAAM,QAAQ,CAAC;AACzE,OAAO,EAAuB,UAAU,EAAuC,MAAM,aAAa,CAAC;AACnG,OAAO,EAAE,KAAK,GAAG,EAAE,gBAAgB,EAAa,MAAM,YAAY,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iBAAi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AC3B,KAAK,SAAS,GAAG,CAAC,GAAG,EACrB,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,QAAQ,SAAS,YAAY,EAC7B,iBAAiB,EACjB,wBAAwB,EAExB,WAAW,EAAE,MAAM,CAAC,MAAM,CACzB,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,oBAAoB,EAAE,SAAS,EAAE,aAAa,EAAE,oBAAoB,EAAE,QAAQ,CAAC,EACnI,iBAAiB,EACjB,wBAAwB,CACxB,EACD,QAAQ,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,WAAW,CAAC,CAAC,wjZAGvD"}
@@ -9,6 +9,7 @@ import { localRpcGuard } from "#rpc-server/local.ts";
9
9
  import { authenticatedLayer, maybeAuthenticatedLayer } from "#rpc-server/session.ts";
10
10
  import { requestTracingLayer } from "#rpc-server/tracing.ts";
11
11
  import { TrustedProxy } from "#rpc-server/trustedProxy.ts";
12
+ import { healthRoute } from "#server/healthRoute.ts";
12
13
  export function appHostHttp(options) {
13
14
  return Layer.unwrap(Effect.gen(function* () {
14
15
  const maxBodySize = options.config?.maxBodySize ?? (yield* Config.Int("MAX_BODY_SIZE").pipe(Config.withDefault(1024 * 1024)));
@@ -43,11 +44,14 @@ export function appHostHttp(options) {
43
44
  : { disablePreemptiveShutdown: options.config.disablePreemptiveShutdown }),
44
45
  });
45
46
  }));
46
- return HttpRouter.serve(Layer.mergeAll(routes, assets, options.routes ?? Layer.empty), { disableLogger: true }).pipe(Layer.provideMerge(application), Layer.provideMerge(server), Layer.provide(NodeServices.layer));
47
+ return HttpRouter.serve(Layer.mergeAll(routes, healthRoute, assets, options.routes ?? Layer.empty), { disableLogger: true }).pipe(Layer.provideMerge(application), Layer.provideMerge(server), Layer.provide(NodeServices.layer));
47
48
  })).pipe(Layer.provide(otlpTracing));
48
49
  }
49
50
  export function migratedHost(options, database) {
50
51
  const services = Layer.mergeAll(options.services ?? Layer.empty);
51
52
  return appHostHttp({ ...options, services: services.pipe(Layer.provideMerge(database)) });
52
53
  }
54
+ export function deferredHost(application, database) {
55
+ return Layer.unwrap(Effect.map(application, (options) => appHostHttp(options))).pipe(Layer.provideMerge(database));
56
+ }
53
57
  //# sourceMappingURL=appHostHttp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"appHostHttp.js","sourceRoot":"","sources":["../../src/server/appHostHttp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACnG,OAAO,EAAY,gBAAgB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG1D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAqB,MAAM,wBAAwB,CAAC;AACxG,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,MAAM,UAAU,WAAW,CAU1B,OAAkJ;IAElJ,OAAO,KAAK,CAAC,MAAM,CAClB,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QACnB,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,WAAW,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,eAAe,CA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,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAChI,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,EAC/B,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,EAC1B,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CACjC,CAAC;IACH,CAAC,CAAC,CACF,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,YAAY,CAW3B,OAE0I,EAC1I,QAAuD;IAEvD,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;IACjE,OAAO,WAAW,CAAC,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;AAC3F,CAAC;AAED,MAAM,UAAU,YAAY,CAa3B,WAIC,EACD,QAAuD;IAEvD,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;AACpH,CAAC"}
@@ -1,6 +1,13 @@
1
1
  import * as PgClient from "@effect/sql-pg/PgClient";
2
- import { Config, Layer } from "effect";
2
+ import { Config, Layer, type Redacted } from "effect";
3
3
  import * as Reactivity from "effect/reactivity/Reactivity";
4
- import type { AppChanges, AppDatabaseOptions } from "./appHost.ts";
4
+ import { type PostgresChangesOptions } from "@shivaedev/effect-sql/postgresChanges.ts";
5
+ import type { AppChanges, AppDatabaseOptions } from "#server/appHost.ts";
6
+ export interface DatabaseConfig {
7
+ readonly applicationName?: string;
8
+ readonly changes?: Omit<PostgresChangesOptions, "client" | "resync">;
9
+ readonly databaseUrl?: Redacted.Redacted<string>;
10
+ readonly maxConnections?: number;
11
+ }
5
12
  export declare function databaseLayer<R>(options: AppDatabaseOptions<R>, changesService: typeof AppChanges): Layer.Layer<AppChanges | PgClient.PgClient | Reactivity.Reactivity | import("effect/sql/SqlClient").SqlClient, Config.ConfigError | import("effect/sql/Migrator").MigrationError | import("effect/sql/SqlError").SqlError, Exclude<Exclude<R, import("effect/Scope").Scope>, PgClient.PgClient | import("effect/sql/SqlClient").SqlClient>>;
6
13
  //# sourceMappingURL=databaseLayer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"databaseLayer.d.ts","sourceRoot":"","sources":["../../src/server/databaseLayer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAU,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,KAAK,UAAU,MAAM,8BAA8B,CAAC;AAI3D,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEnE,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,OAAO,UAAU,+UA2BjG"}
1
+ {"version":3,"file":"databaseLayer.d.ts","sourceRoot":"","sources":["../../src/server/databaseLayer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAU,KAAK,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,UAAU,MAAM,8BAA8B,CAAC;AAI3D,OAAO,EAAE,KAAK,sBAAsB,EAAmB,MAAM,0CAA0C,CAAC;AACxG,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEzE,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,QAAQ,GAAG,QAAQ,CAAC,CAAC;IACrE,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjD,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,OAAO,UAAU,+UA6BjG"}
@@ -2,6 +2,7 @@ import * as PgClient from "@effect/sql-pg/PgClient";
2
2
  import { Config, Effect, Layer } from "effect";
3
3
  import * as Reactivity from "effect/reactivity/Reactivity";
4
4
  import { makeLiveServer } from "@shivaedev/effect-contract/makeLiveServer.ts";
5
+ import { assertPostgresMigrations } from "@shivaedev/effect-sql/assertPostgresMigrations.ts";
5
6
  import { migratePostgres } from "@shivaedev/effect-sql/migrations.ts";
6
7
  import { postgresChanges } from "@shivaedev/effect-sql/postgresChanges.ts";
7
8
  export function databaseLayer(options, changesService) {
@@ -13,9 +14,11 @@ export function databaseLayer(options, changesService) {
13
14
  ...(options.config?.applicationName === undefined ? {} : { applicationName: options.config.applicationName }),
14
15
  });
15
16
  }));
16
- const migrated = Layer.effectDiscard(migratePostgres({ ...options.migrations, lockTimeout: options.migrations.lockTimeout ?? "5 seconds" })).pipe(Layer.provideMerge(pool));
17
+ const prepared = Layer.effectDiscard(options.migrations.mode === "check"
18
+ ? assertPostgresMigrations(options.migrations)
19
+ : migratePostgres({ ...options.migrations, lockTimeout: options.migrations.lockTimeout ?? "5 seconds" })).pipe(Layer.provideMerge(pool));
17
20
  const live = Layer.effect(changesService, makeLiveServer).pipe(Layer.provideMerge(Reactivity.layer));
18
- const base = Layer.merge(migrated, live);
21
+ const base = Layer.merge(prepared, live);
19
22
  const changes = options.config?.changes;
20
23
  if (changes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AAC,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IACrG,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC;IACxC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACb,CAAC;IACD,OAAO,KAAK,CAAC,MAAM,CAClB,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QACnB,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACxC,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,cAAc,CAAC;QACpC,OAAO,eAAe,CAAC,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IACtE,CAAC,CAAC,CACF,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { HttpRouter } from "effect/http";
2
+ export declare const healthRoute: import("effect/Layer").Layer<never, never, HttpRouter.HttpRouter>;
3
+ //# sourceMappingURL=healthRoute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"healthRoute.d.ts","sourceRoot":"","sources":["../../src/server/healthRoute.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAsB,MAAM,aAAa,CAAC;AAG7D,eAAO,MAAM,WAAW,mEAsBvB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { Effect, Fiber, Option } from "effect";
2
+ import { HttpRouter, HttpServerResponse } from "effect/http";
3
+ import { SqlClient } from "effect/sql";
4
+ export const healthRoute = HttpRouter.use((router) => Effect.gen(function* () {
5
+ const database = yield* Effect.serviceOption(SqlClient.SqlClient);
6
+ const scope = yield* Effect.scope;
7
+ const probe = Effect.gen(function* () {
8
+ if (Option.isNone(database)) {
9
+ return 503;
10
+ }
11
+ const query = yield* database.value `select 1`.pipe(Effect.forkIn(scope));
12
+ return yield* Fiber.join(query).pipe(Effect.timeout("2 seconds"),
13
+ // Driver cancellation may need network I/O; keep cleanup in the host scope without delaying the response.
14
+ Effect.ensuring(Fiber.interrupt(query).pipe(Effect.forkIn(scope), Effect.asVoid)), Effect.match({ onFailure: () => 503, onSuccess: () => 200 }));
15
+ });
16
+ yield* router.add("GET", "/health", Effect.map(probe, (status) => HttpServerResponse.empty({ headers: { "cache-control": "no-store" }, status })));
17
+ }));
18
+ //# sourceMappingURL=healthRoute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"healthRoute.js","sourceRoot":"","sources":["../../src/server/healthRoute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CACpD,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACnB,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAClE,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;IAClC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QACjC,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC7B,OAAO,GAAG,CAAC;QACZ,CAAC;QACD,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAA,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACzE,OAAO,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CACnC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC;QAC3B,0GAA0G;QAC1G,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EACjF,MAAM,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,CAC5D,CAAC;IACH,CAAC,CAAC,CAAC;IACH,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CAChB,KAAK,EACL,SAAS,EACT,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,CAC7G,CAAC;AACH,CAAC,CAAC,CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Layer } from "effect";
2
+ import { HttpClient } from "effect/http";
3
+ export declare const otlpHttpClient: Layer.Layer<HttpClient.HttpClient, never, never>;
4
+ //# sourceMappingURL=otlpHttpClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"otlpHttpClient.d.ts","sourceRoot":"","sources":["../../src/server/otlpHttpClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAmB,UAAU,EAAE,MAAM,aAAa,CAAC;AAG1D,eAAO,MAAM,cAAc,kDA8BiB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { Effect, Layer } from "effect";
2
+ import { FetchHttpClient, HttpClient } from "effect/http";
3
+ import { redactOtlpText } from "#safeOtlpSerialization.ts";
4
+ export const otlpHttpClient = Layer.effect(HttpClient.HttpClient, Effect.gen(function* () {
5
+ const client = yield* HttpClient.HttpClient;
6
+ let warned = false;
7
+ function warnOnce(diagnostic) {
8
+ return Effect.suspend(() => {
9
+ if (warned) {
10
+ return Effect.void;
11
+ }
12
+ warned = true;
13
+ return Effect.flatMap(diagnostic, (annotations) => Effect.logWarning("OTLP trace export failed").pipe(Effect.annotateLogs(annotations)));
14
+ });
15
+ }
16
+ return client.pipe(HttpClient.tap((response) => {
17
+ if (response.status >= 200 && response.status < 300) {
18
+ warned = false;
19
+ return Effect.void;
20
+ }
21
+ return warnOnce(response.text.pipe(Effect.orElseSucceed(() => "Unable to read collector response"), Effect.map((body) => ({ "otlp.response": redactOtlpText(body), "otlp.status": response.status }))));
22
+ }), HttpClient.tapError((error) => warnOnce(Effect.succeed({ "otlp.failure": error.reason._tag }))));
23
+ })).pipe(Layer.provide(FetchHttpClient.layer));
24
+ //# sourceMappingURL=otlpHttpClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"otlpHttpClient.js","sourceRoot":"","sources":["../../src/server/otlpHttpClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM,CACzC,UAAU,CAAC,UAAU,EACrB,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACnB,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;IAC5C,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,SAAS,QAAQ,CAAC,UAAkD;Q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C"}
@@ -1 +1 @@
1
- {"version":3,"file":"otlpTracing.d.ts","sourceRoot":"","sources":["../../src/server/otlpTracing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,KAAK,EAAU,MAAM,QAAQ,CAAC;AAKvD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,WAAW,CA4B9D,CAAC"}
1
+ {"version":3,"file":"otlpTracing.d.ts","sourceRoot":"","sources":["../../src/server/otlpTracing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,KAAK,EAAU,MAAM,QAAQ,CAAC;AAKvD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,WAAW,CAsC9D,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { Config, Effect, Layer, Schema } from "effect";
2
- import { FetchHttpClient } from "effect/http";
3
- import { OtlpTracer } from "effect/observability";
2
+ import { OtlpSerialization, OtlpTracer } from "effect/observability";
3
+ import { otlpHttpClient } from "#otlpHttpClient.ts";
4
4
  import { safeOtlpSerialization } from "#safeOtlpSerialization.ts";
5
5
  export const otlpTracing = Layer.unwrap(Effect.gen(function* () {
6
6
  const endpoint = yield* Config.URL("OTEL_EXPORTER_OTLP_TRACES_ENDPOINT").pipe(Config.orElse(() => Config.URL("OTEL_EXPORTER_OTLP_ENDPOINT").pipe(Config.map((url) => {
@@ -10,9 +10,12 @@ export const otlpTracing = Layer.unwrap(Effect.gen(function* () {
10
10
  if (endpoint === undefined) {
11
11
  return Layer.empty;
12
12
  }
13
+ const configuredProtocol = yield* Config.String("OTEL_EXPORTER_OTLP_TRACES_PROTOCOL").pipe(Config.orElse(() => Config.String("OTEL_EXPORTER_OTLP_PROTOCOL")), Config.withDefault("http/protobuf"));
14
+ const protocol = yield* Schema.decodeUnknownEffect(Schema.Literals(["http/protobuf", "http/json"]), { reportInput: true })(configuredProtocol).pipe(Effect.mapError((cause) => new Config.ConfigError(cause)));
13
15
  const attributes = yield* Config.Record(Schema.StringFromUriComponent, Schema.StringFromUriComponent, "OTEL_RESOURCE_ATTRIBUTES").pipe(Config.withDefault({}));
14
16
  const serviceName = yield* Config.String("OTEL_SERVICE_NAME").pipe(Config.withDefault(attributes["service.name"] ?? "unknown_service"));
17
+ const serviceVersion = yield* Config.String("OTEL_SERVICE_VERSION").pipe(Config.withDefault(undefined));
15
18
  const headers = yield* Config.Record(Schema.String, Schema.StringFromUriComponent, "OTEL_EXPORTER_OTLP_HEADERS").pipe(Config.withDefault({}));
16
- return OtlpTracer.layer({ headers, resource: { attributes, serviceName }, url: endpoint.toString() }).pipe(Layer.provide(safeOtlpSerialization), Layer.provide(FetchHttpClient.layer));
19
+ return OtlpTracer.layer({ headers, resource: { attributes, serviceName, serviceVersion }, url: endpoint.toString() }).pipe(Layer.provide(safeOtlpSerialization.pipe(Layer.provide(protocol === "http/protobuf" ? OtlpSerialization.layerProtobuf : OtlpSerialization.layerJson))), Layer.provide(otlpHttpClient));
17
20
  }));
18
21
  //# sourceMappingURL=otlpTracing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"otlpTracing.js","sourceRoot":"","sources":["../../src/server/otlpTracing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,MAAM,CAAC,MAAM,WAAW,GAA2C,KAAK,CAAC,MAAM,CAC9E,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACnB,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC,IAAI,CAC5E,MAAM,CAAC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,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,EAAE,GAAG,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CACzH,KAAK,CAAC,OAAO,CACZ,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,KAAK,eAAe,CAAC,CAAC,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CACvI,EACD,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,CAC7B,CAAC;AACH,CAAC,CAAC,CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function redactOtlpUrl(value: string, key?: string): string;
2
+ //# sourceMappingURL=redactOtlpUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redactOtlpUrl.d.ts","sourceRoot":"","sources":["../../src/server/redactOtlpUrl.ts"],"names":[],"mappings":"AA6BA,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAK,GAAG,MAAM,CAkB7D"}