@shivaedev/server 0.24.1 → 0.25.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 +18 -0
- package/README.md +15 -9
- package/dist/AppHostFactory.d.ts +5 -5
- package/dist/AppHostFactory.d.ts.map +1 -1
- package/dist/AppHostInput.d.ts +16 -8
- package/dist/AppHostInput.d.ts.map +1 -1
- package/dist/appDatabase.d.ts +8 -3
- package/dist/appDatabase.d.ts.map +1 -1
- package/dist/appDatabase.js +16 -44
- package/dist/appDatabase.js.map +1 -1
- package/dist/appDatabaseHttp.d.ts +239 -0
- package/dist/appDatabaseHttp.d.ts.map +1 -0
- package/dist/appDatabaseHttp.js +10 -0
- package/dist/appDatabaseHttp.js.map +1 -0
- package/dist/appHost.d.ts +120 -18
- package/dist/appHost.d.ts.map +1 -1
- package/dist/appHost.js +7 -17
- package/dist/appHost.js.map +1 -1
- package/dist/appHostHttp.d.ts +0 -235
- package/dist/appHostHttp.d.ts.map +1 -1
- package/dist/appHostHttp.js +0 -7
- package/dist/appHostHttp.js.map +1 -1
- package/dist/hostOptions.d.ts +1 -2
- package/dist/hostOptions.d.ts.map +1 -1
- package/dist/hostPreflight.d.ts +9 -0
- package/dist/hostPreflight.d.ts.map +1 -0
- package/dist/hostPreflight.js +6 -0
- package/dist/hostPreflight.js.map +1 -0
- package/dist/prepareMigrations.d.ts +5 -0
- package/dist/prepareMigrations.d.ts.map +1 -0
- package/dist/prepareMigrations.js +46 -0
- package/dist/prepareMigrations.js.map +1 -0
- package/dist/workerHost.d.ts +1 -1
- package/dist/workerHost.d.ts.map +1 -1
- package/dist/workerHost.js.map +1 -1
- package/package.json +26 -26
- package/src/AppHostFactory.ts +5 -9
- package/src/AppHostInput.ts +53 -7
- package/src/appDatabase.ts +64 -54
- package/src/appDatabaseHttp.ts +78 -0
- package/src/appHost.ts +46 -79
- package/src/appHostHttp.ts +0 -74
- package/src/hostOptions.ts +1 -2
- package/src/hostPreflight.ts +22 -0
- package/src/prepareMigrations.ts +57 -0
- package/src/workerHost.ts +1 -2
package/dist/appHost.d.ts
CHANGED
|
@@ -1,24 +1,126 @@
|
|
|
1
|
+
import { Layer } from "effect";
|
|
1
2
|
import type { Rpc } from "effect/rpc";
|
|
2
|
-
import type { AppHostFactory } from "#AppHostFactory.ts";
|
|
3
|
-
import type { HostPreflight } from "#AppHostInput.ts";
|
|
4
|
-
import { type DatabaseConfig } from "#appDatabase.ts";
|
|
5
3
|
import type { HostCoreOptions, HostPolicy, HostRouteRequirements, HostRoutes } from "#hostOptions.ts";
|
|
6
|
-
import type {
|
|
7
|
-
export interface AppDatabaseOptions<R = never, E = never> {
|
|
8
|
-
readonly config?: DatabaseConfig;
|
|
9
|
-
readonly migrations: MigrationOptions<R, E>;
|
|
10
|
-
}
|
|
11
|
-
export type AppHostOptions<TRpcs extends Rpc.Any = never, THandlers = never, THandlerError = never, THandlerRequirements = never, TServices = never, TServiceError = never, TServiceRequirements = never, TMigrations = never, TPreflight = never, TPreflightError = never, TPreflightRequirements = never, TRouteError = never, TRouteRequirements = HostRouteRequirements, TMigrationError = never> = HostPreflight<TPreflight, TPreflightError, TPreflightRequirements> & HostCoreOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements> & HostRoutes<TRouteError, TRouteRequirements> & HostPolicy & {
|
|
12
|
-
readonly migrations: AppDatabaseOptions<TMigrations, TMigrationError>["migrations"];
|
|
13
|
-
readonly policy?: undefined;
|
|
14
|
-
};
|
|
15
|
-
export type AppLocalHostOptions<TRpcs extends Rpc.Any = never, THandlers = never, THandlerError = never, THandlerRequirements = never, TServices = never, TServiceError = never, TServiceRequirements = never, TMigrations = never, TPreflight = never, TPreflightError = never, TPreflightRequirements = never, TRouteError = never, TRouteRequirements = HostRouteRequirements, TMigrationError = never> = HostPreflight<TPreflight, TPreflightError, TPreflightRequirements> & HostCoreOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements> & HostRoutes<TRouteError, TRouteRequirements> & {
|
|
16
|
-
readonly migrations: AppDatabaseOptions<TMigrations, TMigrationError>["migrations"];
|
|
17
|
-
readonly policy: "loopback";
|
|
18
|
-
readonly sessions?: never;
|
|
19
|
-
};
|
|
4
|
+
import type { HostPreflight } from "#hostPreflight.ts";
|
|
20
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> = HostPreflight<TPreflight, TPreflightError, TPreflightRequirements> & HostCoreOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements> & HostRoutes<TRouteError, TRouteRequirements> & HostPolicy & {
|
|
21
6
|
readonly migrations?: undefined;
|
|
22
7
|
};
|
|
23
|
-
|
|
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>(options: AppHttpHostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TPreflight, TPreflightError, TPreflightRequirements, TRouteError, TRouteRequirements>): 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("@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>, Exclude<Exclude<TPreflightRequirements, never>, import("effect/Crypto").Crypto> | 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>, TPreflight>, import("effect/Crypto").Crypto> | 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("@shivaedev/identity/server/SessionPolicy.ts").SessionPolicy, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<TRouteRequirements, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<THandlerRequirements, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", 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
|
+
readonly _tag: `${string}.$changes`;
|
|
10
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", 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
|
+
readonly _tag: `${string}.$changes`;
|
|
12
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/rpc/RpcSerialization").RpcSerialization, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
13
|
+
readonly _tag: `${string}.$changes`;
|
|
14
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Rpc.Handler<"platform.hostVersion.watch">, import("effect/Context").Service.Identifier<TRpcs extends {
|
|
15
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
16
|
+
} ? Extract<TMiddleware, {
|
|
17
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
18
|
+
}> : never>>, import("effect/rpc/RpcSerialization").RpcSerialization>, import("effect/Scope").Scope>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
19
|
+
readonly _tag: `${string}.$changes`;
|
|
20
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/Scope").Scope, import("effect/Context").Service.Identifier<TRpcs extends {
|
|
21
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
22
|
+
} ? Extract<TMiddleware, {
|
|
23
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
24
|
+
}> : never>>, import("effect/rpc/RpcSerialization").RpcSerialization>, import("effect/Scope").Scope>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
25
|
+
readonly _tag: `${string}.$changes`;
|
|
26
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Rpc.ServicesServer<Rpc.AddMiddleware<Rpc.AddMiddleware<TRpcs, typeof import("@shivaedev/contract/CommandGuard.ts").CommandGuard>, typeof import("@shivaedev/identity/middleware.ts").RequestTracing>>, never>, import("@shivaedev/contract/CommandGuard.ts").CommandGuard>, import("effect/Context").Service.Identifier<TRpcs extends {
|
|
27
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
28
|
+
} ? Extract<TMiddleware, {
|
|
29
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
30
|
+
}> : never>>, import("effect/rpc/RpcSerialization").RpcSerialization>, import("effect/Scope").Scope>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
31
|
+
readonly _tag: `${string}.$changes`;
|
|
32
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Rpc.ToHandler<Rpc.AddMiddleware<Rpc.AddMiddleware<TRpcs, typeof import("@shivaedev/contract/CommandGuard.ts").CommandGuard>, typeof import("@shivaedev/identity/middleware.ts").RequestTracing>>, never>, import("@shivaedev/contract/CommandGuard.ts").CommandGuard>, import("effect/Context").Service.Identifier<TRpcs extends {
|
|
33
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
34
|
+
} ? Extract<TMiddleware, {
|
|
35
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
36
|
+
}> : never>>, import("effect/rpc/RpcSerialization").RpcSerialization>, import("effect/Scope").Scope>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
37
|
+
readonly _tag: `${string}.$changes`;
|
|
38
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | 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/Effect").Services<(TRpcs extends {
|
|
39
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
40
|
+
} ? Extract<TMiddleware, {
|
|
41
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
42
|
+
}> : never)["@shivaedev/contract/SubjectDeclaration"]["middleware"]>, import("effect/rpc/RpcSerialization").RpcSerialization>, import("effect/Scope").Scope>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
43
|
+
readonly _tag: `${string}.$changes`;
|
|
44
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"GlobalRequires", Exclude<Exclude<Exclude<Exclude<Exclude<Rpc.ExtractRequires<Extract<TRpcs, {
|
|
45
|
+
readonly _tag: `${string}.$changes`;
|
|
46
|
+
}>, `${string}.$changes`>, THandlers>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"Requires", Exclude<Exclude<Exclude<TRouteRequirements, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"Requires", Exclude<Exclude<Exclude<Exclude<THandlerRequirements, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"Requires", 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, {
|
|
47
|
+
readonly _tag: `${string}.$changes`;
|
|
48
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"Requires", 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, {
|
|
49
|
+
readonly _tag: `${string}.$changes`;
|
|
50
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"Requires", Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/rpc/RpcSerialization").RpcSerialization, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
51
|
+
readonly _tag: `${string}.$changes`;
|
|
52
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"Requires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Rpc.Handler<"platform.hostVersion.watch">, import("effect/Context").Service.Identifier<TRpcs extends {
|
|
53
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
54
|
+
} ? Extract<TMiddleware, {
|
|
55
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
56
|
+
}> : never>>, import("effect/rpc/RpcSerialization").RpcSerialization>, import("effect/Scope").Scope>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
57
|
+
readonly _tag: `${string}.$changes`;
|
|
58
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"Requires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/Scope").Scope, import("effect/Context").Service.Identifier<TRpcs extends {
|
|
59
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
60
|
+
} ? Extract<TMiddleware, {
|
|
61
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
62
|
+
}> : never>>, import("effect/rpc/RpcSerialization").RpcSerialization>, import("effect/Scope").Scope>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
63
|
+
readonly _tag: `${string}.$changes`;
|
|
64
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"Requires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Rpc.ServicesServer<Rpc.AddMiddleware<Rpc.AddMiddleware<TRpcs, typeof import("@shivaedev/contract/CommandGuard.ts").CommandGuard>, typeof import("@shivaedev/identity/middleware.ts").RequestTracing>>, never>, import("@shivaedev/contract/CommandGuard.ts").CommandGuard>, import("effect/Context").Service.Identifier<TRpcs extends {
|
|
65
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
66
|
+
} ? Extract<TMiddleware, {
|
|
67
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
68
|
+
}> : never>>, import("effect/rpc/RpcSerialization").RpcSerialization>, import("effect/Scope").Scope>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
69
|
+
readonly _tag: `${string}.$changes`;
|
|
70
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"Requires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Rpc.ToHandler<Rpc.AddMiddleware<Rpc.AddMiddleware<TRpcs, typeof import("@shivaedev/contract/CommandGuard.ts").CommandGuard>, typeof import("@shivaedev/identity/middleware.ts").RequestTracing>>, never>, import("@shivaedev/contract/CommandGuard.ts").CommandGuard>, import("effect/Context").Service.Identifier<TRpcs extends {
|
|
71
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
72
|
+
} ? Extract<TMiddleware, {
|
|
73
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
74
|
+
}> : never>>, import("effect/rpc/RpcSerialization").RpcSerialization>, import("effect/Scope").Scope>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
75
|
+
readonly _tag: `${string}.$changes`;
|
|
76
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"Requires", Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/Effect").Services<(TRpcs extends {
|
|
77
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
78
|
+
} ? Extract<TMiddleware, {
|
|
79
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
80
|
+
}> : never)["@shivaedev/contract/SubjectDeclaration"]["middleware"]>, import("effect/rpc/RpcSerialization").RpcSerialization>, import("effect/Scope").Scope>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
81
|
+
readonly _tag: `${string}.$changes`;
|
|
82
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Only<"Requires", Exclude<Exclude<Exclude<Exclude<Exclude<Rpc.ExtractRequires<Extract<TRpcs, {
|
|
83
|
+
readonly _tag: `${string}.$changes`;
|
|
84
|
+
}>, `${string}.$changes`>, THandlers>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Without<Exclude<Exclude<Exclude<TRouteRequirements, never>, never>, never>>, import("effect/http/HttpRouter").HttpRouter>, import("effect/Scope").Scope>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Without<Exclude<Exclude<Exclude<Exclude<THandlerRequirements, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, never>, never>>, import("effect/http/HttpRouter").HttpRouter>, import("effect/Scope").Scope>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Without<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, {
|
|
85
|
+
readonly _tag: `${string}.$changes`;
|
|
86
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, never>, never>>, import("effect/http/HttpRouter").HttpRouter>, import("effect/Scope").Scope>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Without<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, {
|
|
87
|
+
readonly _tag: `${string}.$changes`;
|
|
88
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, never>, never>>, import("effect/http/HttpRouter").HttpRouter>, import("effect/Scope").Scope>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Without<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/rpc/RpcSerialization").RpcSerialization, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
89
|
+
readonly _tag: `${string}.$changes`;
|
|
90
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, never>, never>>, import("effect/http/HttpRouter").HttpRouter>, import("effect/Scope").Scope>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Without<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Rpc.Handler<"platform.hostVersion.watch">, import("effect/Context").Service.Identifier<TRpcs extends {
|
|
91
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
92
|
+
} ? Extract<TMiddleware, {
|
|
93
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
94
|
+
}> : never>>, import("effect/rpc/RpcSerialization").RpcSerialization>, import("effect/Scope").Scope>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
95
|
+
readonly _tag: `${string}.$changes`;
|
|
96
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, never>, never>>, import("effect/http/HttpRouter").HttpRouter>, import("effect/Scope").Scope>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Without<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/Scope").Scope, import("effect/Context").Service.Identifier<TRpcs extends {
|
|
97
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
98
|
+
} ? Extract<TMiddleware, {
|
|
99
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
100
|
+
}> : never>>, import("effect/rpc/RpcSerialization").RpcSerialization>, import("effect/Scope").Scope>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
101
|
+
readonly _tag: `${string}.$changes`;
|
|
102
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, never>, never>>, import("effect/http/HttpRouter").HttpRouter>, import("effect/Scope").Scope>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Without<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Rpc.ServicesServer<Rpc.AddMiddleware<Rpc.AddMiddleware<TRpcs, typeof import("@shivaedev/contract/CommandGuard.ts").CommandGuard>, typeof import("@shivaedev/identity/middleware.ts").RequestTracing>>, never>, import("@shivaedev/contract/CommandGuard.ts").CommandGuard>, import("effect/Context").Service.Identifier<TRpcs extends {
|
|
103
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
104
|
+
} ? Extract<TMiddleware, {
|
|
105
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
106
|
+
}> : never>>, import("effect/rpc/RpcSerialization").RpcSerialization>, import("effect/Scope").Scope>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
107
|
+
readonly _tag: `${string}.$changes`;
|
|
108
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, never>, never>>, import("effect/http/HttpRouter").HttpRouter>, import("effect/Scope").Scope>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Without<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Rpc.ToHandler<Rpc.AddMiddleware<Rpc.AddMiddleware<TRpcs, typeof import("@shivaedev/contract/CommandGuard.ts").CommandGuard>, typeof import("@shivaedev/identity/middleware.ts").RequestTracing>>, never>, import("@shivaedev/contract/CommandGuard.ts").CommandGuard>, import("effect/Context").Service.Identifier<TRpcs extends {
|
|
109
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
110
|
+
} ? Extract<TMiddleware, {
|
|
111
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
112
|
+
}> : never>>, import("effect/rpc/RpcSerialization").RpcSerialization>, import("effect/Scope").Scope>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
113
|
+
readonly _tag: `${string}.$changes`;
|
|
114
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, never>, never>>, import("effect/http/HttpRouter").HttpRouter>, import("effect/Scope").Scope>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Without<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/Effect").Services<(TRpcs extends {
|
|
115
|
+
readonly middlewares: ReadonlySet<infer TMiddleware>;
|
|
116
|
+
} ? Extract<TMiddleware, {
|
|
117
|
+
readonly "@shivaedev/contract/SubjectDeclaration": import("@shivaedev/contract/subject.ts").SubjectDeclaration;
|
|
118
|
+
}> : never)["@shivaedev/contract/SubjectDeclaration"]["middleware"]>, import("effect/rpc/RpcSerialization").RpcSerialization>, import("effect/Scope").Scope>, THandlers | import("@shivaedev/identity/middleware.ts").RequestTracing | import("@shivaedev/identity/subject.ts").SubjectResolver | Rpc.ToHandler<Extract<TRpcs, {
|
|
119
|
+
readonly _tag: `${string}.$changes`;
|
|
120
|
+
}>>>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, never>, never>>, import("effect/http/HttpRouter").HttpRouter>, import("effect/Scope").Scope>, 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>, TPreflight>, import("effect/Crypto").Crypto> | Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<import("effect/http/HttpRouter").Request.Without<Exclude<Exclude<Exclude<Exclude<Exclude<Rpc.ExtractRequires<Extract<TRpcs, {
|
|
121
|
+
readonly _tag: `${string}.$changes`;
|
|
122
|
+
}>, `${string}.$changes`>, THandlers>, Rpc.Handler<"platform.hostVersion.watch">>, import("effect/rpc/RpcSerialization").RpcSerialization>, never>, never>>, import("effect/http/HttpRouter").HttpRouter>, import("effect/Scope").Scope>, 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>, TPreflight>, import("effect/Crypto").Crypto>>;
|
|
123
|
+
type HttpHostFactory = <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>(options: AppHttpHostOptions<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, TPreflight, TPreflightError, TPreflightRequirements, TRouteError, TRouteRequirements>) => ReturnType<typeof buildHttpHost<TRpcs, THandlers, THandlerError, THandlerRequirements, TServices, TServiceError, TServiceRequirements, NoInfer<TPreflight>, NoInfer<TPreflightError>, NoInfer<TPreflightRequirements>, TRouteError, TRouteRequirements>>;
|
|
124
|
+
export declare const appHost: HttpHostFactory;
|
|
125
|
+
export {};
|
|
24
126
|
//# sourceMappingURL=appHost.d.ts.map
|
package/dist/appHost.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appHost.d.ts","sourceRoot":"","sources":["../src/appHost.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"appHost.d.ts","sourceRoot":"","sources":["../src/appHost.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACtG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIvD,MAAM,MAAM,kBAAkB,CAC7B,KAAK,SAAS,GAAG,CAAC,GAAG,GAAG,KAAK,EAC7B,SAAS,GAAG,KAAK,EACjB,aAAa,GAAG,KAAK,EACrB,oBAAoB,GAAG,KAAK,EAC5B,SAAS,GAAG,KAAK,EACjB,aAAa,GAAG,KAAK,EACrB,oBAAoB,GAAG,KAAK,EAC5B,UAAU,GAAG,KAAK,EAClB,eAAe,GAAG,KAAK,EACvB,sBAAsB,GAAG,KAAK,EAC9B,WAAW,GAAG,KAAK,EACnB,kBAAkB,GAAG,qBAAqB,IACvC,aAAa,CAAC,UAAU,EAAE,eAAe,EAAE,sBAAsB,CAAC,GACrE,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,oBAAoB,EAAE,SAAS,EAAE,aAAa,EAAE,oBAAoB,CAAC,GACtH,UAAU,CAAC,WAAW,EAAE,kBAAkB,CAAC,GAC3C,UAAU,GAAG;IAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC;AAClD,iBAAS,aAAa,CACrB,KAAK,SAAS,GAAG,CAAC,GAAG,GAAG,KAAK,EAC7B,SAAS,GAAG,KAAK,EACjB,aAAa,GAAG,KAAK,EACrB,oBAAoB,GAAG,KAAK,EAC5B,SAAS,GAAG,KAAK,EACjB,aAAa,GAAG,KAAK,EACrB,oBAAoB,GAAG,KAAK,EAC5B,UAAU,GAAG,KAAK,EAClB,eAAe,GAAG,KAAK,EACvB,sBAAsB,GAAG,KAAK,EAC9B,WAAW,GAAG,KAAK,EACnB,kBAAkB,GAAG,qBAAqB,EAE1C,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,CAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uhBAGD;AAED,KAAK,eAAe,GAAG,CACtB,KAAK,SAAS,GAAG,CAAC,GAAG,GAAG,KAAK,EAC7B,SAAS,GAAG,KAAK,EACjB,aAAa,GAAG,KAAK,EACrB,oBAAoB,GAAG,KAAK,EAC5B,SAAS,GAAG,KAAK,EACjB,aAAa,GAAG,KAAK,EACrB,oBAAoB,GAAG,KAAK,EAC5B,UAAU,GAAG,KAAK,EAClB,eAAe,GAAG,KAAK,EACvB,sBAAsB,GAAG,KAAK,EAC9B,WAAW,GAAG,KAAK,EACnB,kBAAkB,GAAG,qBAAqB,EAE1C,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,CAClB,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,CAClB,CACD,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,eAA+B,CAAC"}
|
package/dist/appHost.js
CHANGED
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
import * as NodeCrypto from "@effect/platform-node/NodeCrypto";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { appHostHttp, deferredHost, migratedHost } from "#appHostHttp.ts";
|
|
2
|
+
import { Layer } from "effect";
|
|
3
|
+
import { appHostHttp } from "#appHostHttp.ts";
|
|
4
|
+
import { hostPreflight } from "#hostPreflight.ts";
|
|
6
5
|
import { hostSensitiveKeys } from "#hostSensitiveKeys.ts";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
? Layer.empty
|
|
12
|
-
: Layer.unwrap(Effect.map("application" in options ? Effect.succeed(isSensitiveKey) : hostSensitiveKeys(options), (sensitive) => startup.pipe(Layer.provide(redactingDiagnostics(sensitive)))));
|
|
13
|
-
if ("application" in options) {
|
|
14
|
-
return deferredHost(options.application, appDatabase(options)).pipe(Layer.provideMerge(preflight), Layer.provide(NodeCrypto.layer));
|
|
15
|
-
}
|
|
16
|
-
return options.migrations === undefined
|
|
17
|
-
? appHostHttp(options).pipe(Layer.provideMerge(preflight), Layer.provide(NodeCrypto.layer))
|
|
18
|
-
: migratedHost({ ...options, migrations: options.migrations }, appDatabase({ ...options, migrations: options.migrations })).pipe(Layer.provideMerge(preflight), Layer.provide(NodeCrypto.layer));
|
|
19
|
-
};
|
|
6
|
+
function buildHttpHost(options) {
|
|
7
|
+
return appHostHttp(options).pipe(Layer.provideMerge(hostPreflight(options.preflight, hostSensitiveKeys(options))), Layer.provide(NodeCrypto.layer));
|
|
8
|
+
}
|
|
9
|
+
export const appHost = buildHttpHost;
|
|
20
10
|
//# sourceMappingURL=appHost.js.map
|
package/dist/appHost.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appHost.js","sourceRoot":"","sources":["../src/appHost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"appHost.js","sourceRoot":"","sources":["../src/appHost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAmB1D,SAAS,aAAa,CAcrB,OAaC;IAED,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,OAAO,CAAC,SAAS,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;AACrJ,CAAC;AA+CD,MAAM,CAAC,MAAM,OAAO,GAAoB,aAAa,CAAC"}
|