@sjcx/vorma 0.0.0-pre.2 → 0.0.0-pre.4
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/dist/build/assemble-artifacts.d.ts +1 -1
- package/dist/build/bundle-client.d.ts +1 -1
- package/dist/build/cli.js +53 -44
- package/dist/build/compile-application.d.ts +2 -2
- package/dist/build/development-artifacts.d.ts +1 -1
- package/dist/build/development-build.d.ts +3 -6
- package/dist/build/development-server-process.d.ts +3 -3
- package/dist/build/development-work.d.ts +4 -3
- package/dist/build/generate-application.d.ts +4 -4
- package/dist/build/index.d.ts +2 -3
- package/dist/build/index.js +1 -1
- package/dist/build/inspect-projects.d.ts +3 -3
- package/dist/build/load-config.d.ts +17 -16
- package/dist/build/publish-artifacts.d.ts +1 -4
- package/dist/build/render-client-transport.d.ts +1 -1
- package/dist/build/render-server-generated.d.ts +1 -12
- package/dist/build/render-types.d.ts +1 -1
- package/dist/build/resolve-config.d.ts +6 -9
- package/dist/build/source-layout.d.ts +2 -2
- package/dist/build/typescript-projects.d.ts +5 -0
- package/dist/{build-DcP5_DUV.js → build-BeUTL6eX.js} +104 -301
- package/package.json +5 -36
- package/dist/build/compile-server.d.ts +0 -42
- package/dist/client/assembly.d.ts +0 -40
- package/dist/client/browser-http-client.d.ts +0 -10
- package/dist/client/client-loaders.d.ts +0 -93
- package/dist/client/commit.d.ts +0 -41
- package/dist/client/contracts.d.ts +0 -192
- package/dist/client/core.d.ts +0 -45
- package/dist/client/development.d.ts +0 -16
- package/dist/client/document-recovery.d.ts +0 -4
- package/dist/client/endpoints.d.ts +0 -54
- package/dist/client/errors.d.ts +0 -87
- package/dist/client/freshness.d.ts +0 -51
- package/dist/client/head.d.ts +0 -14
- package/dist/client/history.d.ts +0 -25
- package/dist/client/index.d.ts +0 -80
- package/dist/client/index.js +0 -150
- package/dist/client/links.d.ts +0 -48
- package/dist/client/materialize.d.ts +0 -21
- package/dist/client/modules.d.ts +0 -2
- package/dist/client/navigation.d.ts +0 -47
- package/dist/client/payload.d.ts +0 -54
- package/dist/client/prefetch.d.ts +0 -28
- package/dist/client/prepare.d.ts +0 -47
- package/dist/client/projections.d.ts +0 -26
- package/dist/client/queries.d.ts +0 -33
- package/dist/client/react/application.d.ts +0 -87
- package/dist/client/react/hooks.d.ts +0 -36
- package/dist/client/react/index.d.ts +0 -5
- package/dist/client/react/index.js +0 -3237
- package/dist/client/react/link.d.ts +0 -27
- package/dist/client/react/view.d.ts +0 -86
- package/dist/client/request.d.ts +0 -16
- package/dist/client/route-context.d.ts +0 -31
- package/dist/client/route-matching.d.ts +0 -22
- package/dist/client/route-synchronization.d.ts +0 -30
- package/dist/client/route-url.d.ts +0 -5
- package/dist/client/runtime.d.ts +0 -82
- package/dist/client/scroll.d.ts +0 -16
- package/dist/client/services.d.ts +0 -34
- package/dist/client/state.d.ts +0 -102
- package/dist/client/static-assets.d.ts +0 -3
- package/dist/client/stylesheets.d.ts +0 -7
- package/dist/client/transport-type-entries.d.ts +0 -2
- package/dist/client/types.d.ts +0 -152
- package/dist/client/view-definition.d.ts +0 -24
- package/dist/client/work-indicator.d.ts +0 -18
- package/dist/compile-Me8EOyMK.js +0 -870
- package/dist/development-B_rxuwY7.js +0 -128
- package/dist/hash-set-BPx3iXec.js +0 -141
- package/dist/href-Cqyax8Y0.js +0 -357
- package/dist/materialize-DZ7VSLFk.js +0 -739
- package/dist/metadata-BoPKo-G2.js +0 -32
- package/dist/primitives/tasks/index.d.ts +0 -1
- package/dist/primitives/tasks/index.js +0 -1
- package/dist/route-context-CtY_9U_W.js +0 -559
- package/dist/route-matching-D_uSG2P9.js +0 -33
- package/dist/search-parse-0f7oqVsG.js +0 -375
- package/dist/server/config/index.d.ts +0 -36
- package/dist/server/config/index.js +0 -30
- package/dist/server/development/metadata.d.ts +0 -11
- package/dist/server/document.d.ts +0 -37
- package/dist/server/form-data.d.ts +0 -21
- package/dist/server/graph/compile.d.ts +0 -118
- package/dist/server/graph/declarations.d.ts +0 -117
- package/dist/server/graph/literal-error-tag.d.ts +0 -14
- package/dist/server/graph/pattern-conflicts.d.ts +0 -36
- package/dist/server/graph/search-schema.d.ts +0 -13
- package/dist/server/graph/transport-schema.d.ts +0 -11
- package/dist/server/index.d.ts +0 -310
- package/dist/server/index.js +0 -2311
- package/dist/server/public-assets.d.ts +0 -18
- package/dist/server/runtime/application.d.ts +0 -15
- package/dist/server/runtime/assets.d.ts +0 -15
- package/dist/server/runtime/context.d.ts +0 -96
- package/dist/server/runtime/domain-errors.d.ts +0 -11
- package/dist/server/runtime/effects.d.ts +0 -83
- package/dist/server/runtime/execute.d.ts +0 -13
- package/dist/server/runtime/finalize.d.ts +0 -44
- package/dist/server/runtime/handler.d.ts +0 -106
- package/dist/server/runtime/head.d.ts +0 -22
- package/dist/server/runtime/payload.d.ts +0 -50
- package/dist/server/runtime/pipeline.d.ts +0 -27
- package/dist/server/runtime/plan.d.ts +0 -98
- package/dist/server/runtime/render-document.d.ts +0 -16
- package/dist/server/runtime/startup-error.d.ts +0 -11
- package/dist/server/runtime/transport-type-entries.d.ts +0 -2
- package/dist/server/runtime/vercel-deployment.d.ts +0 -2
- package/dist/server/url-pathname.d.ts +0 -13
- package/dist/static-assets-BrH3O0M8.js +0 -199
- package/dist/universal/generated-types.d.ts +0 -9
- package/dist/universal/href.d.ts +0 -17
- package/dist/universal/http-method.d.ts +0 -4
- package/dist/universal/json-transport.d.ts +0 -14
- package/dist/universal/null-prototype-record.d.ts +0 -7
- package/dist/universal/path-wire.d.ts +0 -71
- package/dist/universal/pattern-language.d.ts +0 -4
- package/dist/universal/protocol-schemas.d.ts +0 -99
- package/dist/universal/protocol.d.ts +0 -162
- package/dist/universal/search-grammar.d.ts +0 -7
- package/dist/universal/search-parse.d.ts +0 -22
- package/dist/universal/search-serialize.d.ts +0 -16
- package/dist/universal/search-shape.d.ts +0 -32
- package/dist/universal/static-assets.d.ts +0 -2
- package/dist/universal/transport-types/big-decimal.d.ts +0 -13
- package/dist/universal/transport-types/chunk.d.ts +0 -8
- package/dist/universal/transport-types/date-time-utc.d.ts +0 -13
- package/dist/universal/transport-types/date-time-zoned.d.ts +0 -13
- package/dist/universal/transport-types/duration.d.ts +0 -13
- package/dist/universal/transport-types/hash-map.d.ts +0 -8
- package/dist/universal/transport-types/hash-set.d.ts +0 -8
- package/dist/universal/transport-types/option.d.ts +0 -10
- package/dist/universal/transport-types/redacted.d.ts +0 -9
- package/dist/universal/value-transport.d.ts +0 -117
- package/dist/value-transport-Bst4Hk-n.js +0 -864
- /package/dist/{universal → build}/content-digest.d.ts +0 -0
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import type { Effect, Schema, Stream } from "effect";
|
|
2
|
-
import type * as HttpServerRequest from "effect/unstable/http/HttpServerRequest";
|
|
3
|
-
import type { HttpMethod } from "../../universal/http-method.ts";
|
|
4
|
-
import type { Attributes, Element } from "../document.ts";
|
|
5
|
-
/** A native schema; constructors retain the services required by executed codec operations. */
|
|
6
|
-
export type DeclaredSchema = Schema.Codec<unknown, unknown, unknown, unknown>;
|
|
7
|
-
/**
|
|
8
|
-
* A handler with its context type erased. The public constructors type the
|
|
9
|
-
* context per kind; the request pipeline builds that context and calls the
|
|
10
|
-
* function with it. The failure and requirement types are erased too: the
|
|
11
|
-
* failure is read back when the handler settles, and `Vorma.makeHandlers`
|
|
12
|
-
* requires the host to supply the services of every handler kind.
|
|
13
|
-
*/
|
|
14
|
-
export type HandlerFn = (context: never) => Effect.Effect<unknown, unknown, unknown>;
|
|
15
|
-
/** A stream handler with its context type erased, as `HandlerFn`. */
|
|
16
|
-
export type StreamHandlerFn = (context: never) => Stream.Stream<unknown, unknown, unknown>;
|
|
17
|
-
export type UiLoaderDeclaration = {
|
|
18
|
-
readonly _tag: "UiLoader";
|
|
19
|
-
readonly pattern: string;
|
|
20
|
-
/** Schema of the URL search parameters. Absent means the segment takes none. */
|
|
21
|
-
readonly input: DeclaredSchema | undefined;
|
|
22
|
-
readonly output: DeclaredSchema;
|
|
23
|
-
readonly fn: HandlerFn;
|
|
24
|
-
};
|
|
25
|
-
export type EndpointKind = "query" | "mutation" | "stream";
|
|
26
|
-
/**
|
|
27
|
-
* Where an endpoint's input arrives, read from its method and input schema.
|
|
28
|
-
* A GET reads the URL's search parameters. Any other method reads its body,
|
|
29
|
-
* parsed as a form when the input schema is `FormData` or derives from it,
|
|
30
|
-
* and as JSON otherwise.
|
|
31
|
-
*/
|
|
32
|
-
export type InputTransport = {
|
|
33
|
-
readonly kind: "none";
|
|
34
|
-
} | {
|
|
35
|
-
readonly kind: "search";
|
|
36
|
-
readonly schema: DeclaredSchema;
|
|
37
|
-
} | {
|
|
38
|
-
readonly kind: "json";
|
|
39
|
-
readonly schema: DeclaredSchema;
|
|
40
|
-
} | {
|
|
41
|
-
readonly kind: "formData";
|
|
42
|
-
readonly schema: DeclaredSchema;
|
|
43
|
-
};
|
|
44
|
-
export declare function getInputTransport(declaration: {
|
|
45
|
-
readonly method: HttpMethod;
|
|
46
|
-
readonly input: DeclaredSchema | undefined;
|
|
47
|
-
}): InputTransport;
|
|
48
|
-
/**
|
|
49
|
-
* One declared application failure: the schema its thrown values encode
|
|
50
|
-
* with, and the explicit HTTP status the rejection carries. Queries and
|
|
51
|
-
* mutations declare these; the build links each schema to its authored
|
|
52
|
-
* export, and the runtime encodes matching failures on the way out.
|
|
53
|
-
*/
|
|
54
|
-
export type EndpointErrorDeclaration = {
|
|
55
|
-
readonly schema: DeclaredSchema;
|
|
56
|
-
readonly status: number;
|
|
57
|
-
};
|
|
58
|
-
type EndpointDeclarationBase = {
|
|
59
|
-
readonly _tag: "Endpoint";
|
|
60
|
-
readonly method: HttpMethod;
|
|
61
|
-
readonly pattern: string;
|
|
62
|
-
readonly input: DeclaredSchema | undefined;
|
|
63
|
-
/** Declared application failures of a query or mutation. Empty for a stream. */
|
|
64
|
-
readonly errors: ReadonlyArray<EndpointErrorDeclaration>;
|
|
65
|
-
};
|
|
66
|
-
/** A query or mutation: one response, encoded through `output`. */
|
|
67
|
-
export type ResponseEndpointDeclaration = EndpointDeclarationBase & {
|
|
68
|
-
readonly kind: "query" | "mutation";
|
|
69
|
-
readonly output: DeclaredSchema;
|
|
70
|
-
readonly event: undefined;
|
|
71
|
-
readonly fn: HandlerFn;
|
|
72
|
-
};
|
|
73
|
-
/** A stream: a sequence of events, each encoded through `event`. */
|
|
74
|
-
export type StreamEndpointDeclaration = EndpointDeclarationBase & {
|
|
75
|
-
readonly kind: "stream";
|
|
76
|
-
readonly output: undefined;
|
|
77
|
-
readonly event: DeclaredSchema;
|
|
78
|
-
readonly fn: StreamHandlerFn;
|
|
79
|
-
};
|
|
80
|
-
export type EndpointDeclaration = ResponseEndpointDeclaration | StreamEndpointDeclaration;
|
|
81
|
-
export type { HttpMethod } from "../../universal/http-method.ts";
|
|
82
|
-
export type TaskMiddlewareDeclaration = {
|
|
83
|
-
readonly _tag: "TaskMiddleware";
|
|
84
|
-
readonly patterns: ReadonlyArray<string>;
|
|
85
|
-
readonly methods: ReadonlyArray<HttpMethod>;
|
|
86
|
-
readonly fn: HandlerFn;
|
|
87
|
-
};
|
|
88
|
-
export type HtmlDocumentContext = {
|
|
89
|
-
readonly request: HttpServerRequest.HttpServerRequest;
|
|
90
|
-
readonly clientBuildId: string | undefined;
|
|
91
|
-
readonly getCookie: (name: string) => string | undefined;
|
|
92
|
-
readonly getPublicUrl: (key: string) => string;
|
|
93
|
-
};
|
|
94
|
-
/**
|
|
95
|
-
* One head identity beyond the built-in rules: elements with this tag whose
|
|
96
|
-
* listed attributes match occupy one slot, and a later contribution replaces
|
|
97
|
-
* the earlier one. A string requires that exact value; `true` requires the
|
|
98
|
-
* attribute to be present with any value.
|
|
99
|
-
*/
|
|
100
|
-
export type HeadDeduplicationRule = {
|
|
101
|
-
readonly tag: string;
|
|
102
|
-
readonly attributes: Readonly<Record<string, string | true>>;
|
|
103
|
-
};
|
|
104
|
-
export type DocumentAttributes = {
|
|
105
|
-
readonly html: Attributes;
|
|
106
|
-
readonly head: Attributes;
|
|
107
|
-
readonly body: Attributes;
|
|
108
|
-
};
|
|
109
|
-
export type HtmlDocumentDeclaration = {
|
|
110
|
-
readonly _tag: "HtmlDocument";
|
|
111
|
-
/** Supplies attributes for the initial document's fixed HTML, head, and body elements. */
|
|
112
|
-
readonly attributesFn: (context: HtmlDocumentContext) => Effect.Effect<DocumentAttributes, unknown, unknown>;
|
|
113
|
-
/** Supplies managed head defaults independently for initial HTML and navigation. */
|
|
114
|
-
readonly defaultHeadFn: (context: HtmlDocumentContext) => Effect.Effect<ReadonlyArray<Element>, unknown, unknown>;
|
|
115
|
-
readonly headDeduplicationRules: ReadonlyArray<HeadDeduplicationRule>;
|
|
116
|
-
};
|
|
117
|
-
export type Declaration = UiLoaderDeclaration | EndpointDeclaration | TaskMiddlewareDeclaration | HtmlDocumentDeclaration;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Schema } from "effect";
|
|
2
|
-
export type LiteralErrorTag = {
|
|
3
|
-
readonly field: string;
|
|
4
|
-
readonly tag: string;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* The literal tag a schema discriminates on, when it carries exactly one
|
|
8
|
-
* usable one. A `_tag` field wins when several string literals are present,
|
|
9
|
-
* which is the `Schema.TaggedError` shape; anything else ambiguous, and a
|
|
10
|
-
* schema with no required string literal, has no static tag. Runtime matching
|
|
11
|
-
* validates values against the declared schemas, so this is only the static
|
|
12
|
-
* identity the build checks and the envelope carries.
|
|
13
|
-
*/
|
|
14
|
-
export declare function getLiteralErrorTag(schema: Schema.Top): LiteralErrorTag | undefined;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
type PatternConflictSegment = {
|
|
2
|
-
readonly kind: "static";
|
|
3
|
-
readonly value: string;
|
|
4
|
-
} | {
|
|
5
|
-
readonly kind: "dynamic";
|
|
6
|
-
readonly parameterName: string;
|
|
7
|
-
} | {
|
|
8
|
-
readonly kind: "splat";
|
|
9
|
-
} | {
|
|
10
|
-
readonly kind: "index";
|
|
11
|
-
};
|
|
12
|
-
type DynamicParameterConflict = {
|
|
13
|
-
readonly attemptedParameterName: string;
|
|
14
|
-
readonly existingParameterName: string;
|
|
15
|
-
};
|
|
16
|
-
/** Two patterns name the same dynamic branch differently; `pattern` is the one that arrived second. */
|
|
17
|
-
export type ConflictingDynamicParameterNameError = DynamicParameterConflict & {
|
|
18
|
-
readonly _tag: "ConflictingDynamicParameterName";
|
|
19
|
-
readonly pattern: string;
|
|
20
|
-
};
|
|
21
|
-
export type DynamicParameterNameConflict<Cause, Pattern> = {
|
|
22
|
-
readonly patterns: ReadonlyArray<Pattern>;
|
|
23
|
-
readonly attemptedPattern: Pattern;
|
|
24
|
-
readonly cause: Cause;
|
|
25
|
-
};
|
|
26
|
-
/** Attributes each shared dynamic-branch name clash to the authored pattern identities that produce it. */
|
|
27
|
-
export declare function findConflictingDynamicParameterNames<Pattern, Cause>(input: {
|
|
28
|
-
readonly patterns: ReadonlyArray<Pattern>;
|
|
29
|
-
readonly getMatcherPattern: (pattern: Pattern) => string;
|
|
30
|
-
readonly getSegments: (pattern: Pattern) => ReadonlyArray<PatternConflictSegment>;
|
|
31
|
-
readonly makeCause: (input: {
|
|
32
|
-
readonly conflict: DynamicParameterConflict;
|
|
33
|
-
readonly attemptedPattern: Pattern;
|
|
34
|
-
}) => Cause;
|
|
35
|
-
}): ReadonlyArray<DynamicParameterNameConflict<Cause, Pattern>>;
|
|
36
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Result, type Schema } from "effect";
|
|
2
|
-
import type { SearchContractDocument } from "../../universal/protocol-schemas.ts";
|
|
3
|
-
/** Effect schemas remain at the server boundary; the shared URL parser reads only SearchShape. */
|
|
4
|
-
export type UnsupportedSearchSchemaError = {
|
|
5
|
-
readonly _tag: "UnsupportedSearchSchema";
|
|
6
|
-
readonly path: string;
|
|
7
|
-
readonly reason: string;
|
|
8
|
-
};
|
|
9
|
-
export type DerivedSearchContract = {
|
|
10
|
-
readonly document: SearchContractDocument;
|
|
11
|
-
readonly fields: ReadonlySet<string>;
|
|
12
|
-
};
|
|
13
|
-
export declare function deriveSearchContract(schema: Schema.Top): Result.Result<DerivedSearchContract, UnsupportedSearchSchemaError>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Result, type Schema } from "effect";
|
|
2
|
-
export type TransportSchemaIssue = {
|
|
3
|
-
readonly _tag: "UntransportableSchema";
|
|
4
|
-
readonly path: string;
|
|
5
|
-
readonly reason: string;
|
|
6
|
-
};
|
|
7
|
-
export declare function checkTransportSchema(input: {
|
|
8
|
-
readonly schema: Schema.Top;
|
|
9
|
-
/** An error contract's root may be a class; its instance travels as its fields. */
|
|
10
|
-
readonly allowClassRoot: boolean;
|
|
11
|
-
}): Result.Result<void, TransportSchemaIssue>;
|
package/dist/server/index.d.ts
DELETED
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
import { TaskContext, TaskRuntime } from "@vorma/primitives/tasks";
|
|
2
|
-
import { Effect, Layer, type Stream } from "effect";
|
|
3
|
-
import { HttpRouter, HttpServerRequest, HttpServerResponse } from "effect/unstable/http";
|
|
4
|
-
import type { MissingGeneratedApplicationKey, MissingGeneratedApplicationTypes } from "../universal/generated-types.ts";
|
|
5
|
-
import type { VormaConfig } from "./config/index.ts";
|
|
6
|
-
import type { Element } from "./document.ts";
|
|
7
|
-
import type { FormInputServices } from "./form-data.ts";
|
|
8
|
-
import type { DocumentAttributes, HeadDeduplicationRule, DeclaredSchema, EndpointErrorDeclaration, EndpointKind, HtmlDocumentContext as UntypedHtmlDocumentContext, HtmlDocumentDeclaration, HttpMethod, ResponseEndpointDeclaration, StreamEndpointDeclaration, TaskMiddlewareDeclaration, UiLoaderDeclaration } from "./graph/declarations.ts";
|
|
9
|
-
import { makePublicAssetsFileMiddleware } from "./public-assets.ts";
|
|
10
|
-
import { APPLICATION_RUNTIME, type CompiledApplication } from "./runtime/application.ts";
|
|
11
|
-
import type { HeadOps, MiddlewareRequestFacts, RequestFacts, ResponseInputError, ResponseOps } from "./runtime/context.ts";
|
|
12
|
-
import type { RedirectStatus } from "./runtime/effects.ts";
|
|
13
|
-
import { type VormaStartupError } from "./runtime/startup-error.ts";
|
|
14
|
-
export { HandlerError } from "./runtime/handler.ts";
|
|
15
|
-
export { ResponseInputError } from "./runtime/context.ts";
|
|
16
|
-
export type { RedirectStatus } from "./runtime/effects.ts";
|
|
17
|
-
export type { EndpointKind } from "./graph/declarations.ts";
|
|
18
|
-
export type { ProductionMetadata } from "../universal/protocol.ts";
|
|
19
|
-
export type { VormaStartupError } from "./runtime/startup-error.ts";
|
|
20
|
-
export type { Attributes as HtmlAttributes, Element as HeadElement, } from "./document.ts";
|
|
21
|
-
export { escapeJsonForScript } from "./document.ts";
|
|
22
|
-
export type { DocumentAttributes, HeadDeduplicationRule, } from "./graph/declarations.ts";
|
|
23
|
-
export type ParamsOf<Pattern extends string> = Pattern extends `${string}:${infer Name}/${infer Rest}` ? {
|
|
24
|
-
readonly [K in Name | keyof ParamsOf<`/${Rest}`>]: string;
|
|
25
|
-
} : Pattern extends `${string}:${infer Name}` ? {
|
|
26
|
-
readonly [K in Name]: string;
|
|
27
|
-
} : {};
|
|
28
|
-
/** Filled in by the generated declaration: the application's patterns, route searches, and asset keys. */
|
|
29
|
-
export interface Register {
|
|
30
|
-
}
|
|
31
|
-
type RegisteredPattern = Register extends {
|
|
32
|
-
readonly patterns: infer V extends string;
|
|
33
|
-
} ? V : MissingGeneratedApplicationKey;
|
|
34
|
-
type RegisteredAssetKey = Register extends {
|
|
35
|
-
readonly assets: infer A extends string;
|
|
36
|
-
} ? A | `/${A}` : MissingGeneratedApplicationKey;
|
|
37
|
-
type RegisteredRouteSearch = Register extends {
|
|
38
|
-
readonly routeSearch: infer Search;
|
|
39
|
-
} ? Search : Readonly<Record<string, unknown>>;
|
|
40
|
-
type ParamsField<P extends string> = keyof ParamsOf<P> extends never ? {
|
|
41
|
-
readonly params?: never;
|
|
42
|
-
} : {
|
|
43
|
-
readonly params: ParamsOf<P>;
|
|
44
|
-
};
|
|
45
|
-
type SplatField<P extends string> = P extends `${string}/*` ? {
|
|
46
|
-
readonly splatValues: ReadonlyArray<string>;
|
|
47
|
-
} : {
|
|
48
|
-
readonly splatValues?: never;
|
|
49
|
-
};
|
|
50
|
-
type RequiredKeys<Value> = Value extends object ? {
|
|
51
|
-
[Key in keyof Value]-?: {} extends Pick<Value, Key> ? never : Key;
|
|
52
|
-
}[keyof Value] : never;
|
|
53
|
-
type RouteInputField<P extends RegisteredPattern> = P extends keyof RegisteredRouteSearch ? [RegisteredRouteSearch[P]] extends [undefined] ? {
|
|
54
|
-
readonly input?: never;
|
|
55
|
-
} : RequiredKeys<RegisteredRouteSearch[P]> extends never ? {
|
|
56
|
-
readonly input?: RegisteredRouteSearch[P];
|
|
57
|
-
} : {
|
|
58
|
-
readonly input: RegisteredRouteSearch[P];
|
|
59
|
-
} : {
|
|
60
|
-
readonly input?: unknown;
|
|
61
|
-
};
|
|
62
|
-
type DestinationPattern<P extends string> = P extends `${infer Prefix}/_index` ? P | (Prefix extends "" ? "/" : Prefix) : P;
|
|
63
|
-
/** A redirect target with generated parameters and decoded route input. */
|
|
64
|
-
export type PatternTarget = {
|
|
65
|
-
readonly [P in RegisteredPattern]: {
|
|
66
|
-
readonly pattern: DestinationPattern<P>;
|
|
67
|
-
readonly hash?: string;
|
|
68
|
-
} & ParamsField<P> & SplatField<P> & RouteInputField<P>;
|
|
69
|
-
}[RegisteredPattern];
|
|
70
|
-
type TypedFacts<Pattern extends string, Params, Input> = Omit<RequestFacts<Pattern, Params, Input>, "getPublicUrl"> & {
|
|
71
|
-
/** The hashed URL of a public asset, typed by the generated asset keys. Leading slash optional. */
|
|
72
|
-
readonly getPublicUrl: (key: RegisteredAssetKey) => string;
|
|
73
|
-
};
|
|
74
|
-
type TypedResponseOps = Omit<ResponseOps, "redirectToPattern"> & {
|
|
75
|
-
readonly redirectToPattern: (options: PatternTarget & {
|
|
76
|
-
readonly status: RedirectStatus;
|
|
77
|
-
}) => Effect.Effect<never, ResponseInputError>;
|
|
78
|
-
};
|
|
79
|
-
type TypedMiddlewareFacts = Omit<MiddlewareRequestFacts, "getPublicUrl"> & {
|
|
80
|
-
/** The hashed URL of a public asset, typed by the generated asset keys. Leading slash optional. */
|
|
81
|
-
readonly getPublicUrl: (key: RegisteredAssetKey) => string;
|
|
82
|
-
};
|
|
83
|
-
export type LoaderContext<Pattern extends string, Params, Input> = TypedFacts<Pattern, Params, Input> & TypedResponseOps & HeadOps;
|
|
84
|
-
export type EndpointContext<Pattern extends string, Params, Input> = TypedFacts<Pattern, Params, Input> & TypedResponseOps;
|
|
85
|
-
export type StreamContext<Pattern extends string, Params, Input> = TypedFacts<Pattern, Params, Input> & {
|
|
86
|
-
/** The event number a reconnecting client resumed from. */
|
|
87
|
-
readonly resumeCursor: number | undefined;
|
|
88
|
-
};
|
|
89
|
-
export type MiddlewareContext = TypedMiddlewareFacts & TypedResponseOps & HeadOps;
|
|
90
|
-
declare const DEFINITION_TYPES: unique symbol;
|
|
91
|
-
type HandlerTypes<Input, Output, Failure, Requirements> = {
|
|
92
|
-
readonly input: Input;
|
|
93
|
-
readonly output: Output;
|
|
94
|
-
readonly failure: Failure;
|
|
95
|
-
readonly requirements: Requirements;
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* A query's or mutation's handler types, its declared errors, each with its
|
|
99
|
-
* schema's decoded type, and the encoded side of its input, which identifies
|
|
100
|
-
* Effect's native multipart record for form transport.
|
|
101
|
-
*/
|
|
102
|
-
type EndpointHandlerTypes<Input, InputEncoded, Output, Failure, Requirements, Errors> = HandlerTypes<Input, Output, Failure, Requirements> & {
|
|
103
|
-
readonly inputEncoded: InputEncoded;
|
|
104
|
-
readonly errors: Errors;
|
|
105
|
-
};
|
|
106
|
-
type ServiceTypes<Failure, Requirements> = {
|
|
107
|
-
readonly failure: Failure;
|
|
108
|
-
readonly requirements: Requirements;
|
|
109
|
-
};
|
|
110
|
-
type WithDefinitionTypes<Types> = {
|
|
111
|
-
readonly [DEFINITION_TYPES]?: Types;
|
|
112
|
-
};
|
|
113
|
-
/** The static types a definition carries. */
|
|
114
|
-
type DefinitionTypesOf<Definition extends WithDefinitionTypes<unknown>> = NonNullable<Definition[typeof DEFINITION_TYPES]>;
|
|
115
|
-
export type UiLoaderDefinition<Pattern extends string = string, Input = unknown, Output = unknown, Failure = never, Requirements = never> = UiLoaderDeclaration & {
|
|
116
|
-
readonly pattern: Pattern;
|
|
117
|
-
} & WithDefinitionTypes<HandlerTypes<Input, Output, Failure, Requirements>>;
|
|
118
|
-
export type ResponseEndpointDefinition<Kind extends "query" | "mutation" = "query" | "mutation", Pattern extends string = string, Input = unknown, Output = unknown, Failure = never, Requirements = never, Errors extends ReadonlyArray<EndpointErrorDeclaration> = ReadonlyArray<EndpointErrorDeclaration>, Method extends HttpMethod = HttpMethod, InputEncoded = unknown> = ResponseEndpointDeclaration & {
|
|
119
|
-
readonly kind: Kind;
|
|
120
|
-
readonly method: Method;
|
|
121
|
-
readonly pattern: Pattern;
|
|
122
|
-
} & WithDefinitionTypes<EndpointHandlerTypes<Input, InputEncoded, Output, Failure, Requirements, Errors>>;
|
|
123
|
-
export type StreamEndpointDefinition<Pattern extends string = string, Input = unknown, Event = unknown, Failure = never, Requirements = never> = StreamEndpointDeclaration & {
|
|
124
|
-
readonly method: "GET";
|
|
125
|
-
readonly pattern: Pattern;
|
|
126
|
-
} & WithDefinitionTypes<HandlerTypes<Input, Event, Failure, Requirements>>;
|
|
127
|
-
export type MiddlewareDefinition<Failure = never, Requirements = never> = TaskMiddlewareDeclaration & WithDefinitionTypes<ServiceTypes<Failure, Requirements>>;
|
|
128
|
-
export type HtmlDocumentDefinition<Failure = never, Requirements = never> = HtmlDocumentDeclaration & WithDefinitionTypes<ServiceTypes<Failure, Requirements>>;
|
|
129
|
-
type LoaderFn<Pattern extends string, Input, Output, Failure, Requirements> = (context: LoaderContext<Pattern, ParamsOf<Pattern>, Input>) => Effect.Effect<Output, Failure, Requirements>;
|
|
130
|
-
declare function makeUiLoader<const Pattern extends string, InputSchema extends DeclaredSchema, OutputSchema extends DeclaredSchema, Failure, Requirements>(definition: {
|
|
131
|
-
readonly pattern: Pattern;
|
|
132
|
-
readonly input: InputSchema;
|
|
133
|
-
readonly output: OutputSchema;
|
|
134
|
-
readonly fn: LoaderFn<Pattern, InputSchema["Type"], OutputSchema["Type"], Failure, Requirements>;
|
|
135
|
-
}): UiLoaderDefinition<Pattern, InputSchema["Type"], OutputSchema["Type"], Failure, Requirements>;
|
|
136
|
-
declare function makeUiLoader<const Pattern extends string, OutputSchema extends DeclaredSchema, Failure, Requirements>(definition: {
|
|
137
|
-
readonly pattern: Pattern;
|
|
138
|
-
readonly output: OutputSchema;
|
|
139
|
-
readonly fn: LoaderFn<Pattern, undefined, OutputSchema["Type"], Failure, Requirements>;
|
|
140
|
-
}): UiLoaderDefinition<Pattern, undefined, OutputSchema["Type"], Failure, Requirements>;
|
|
141
|
-
export declare const UiLoader: {
|
|
142
|
-
readonly make: typeof makeUiLoader;
|
|
143
|
-
};
|
|
144
|
-
export { FormData } from "./form-data.ts";
|
|
145
|
-
type EndpointFn<Pattern extends string, Input, Output, Failure, Requirements> = (context: EndpointContext<Pattern, ParamsOf<Pattern>, Input>) => Effect.Effect<Output, Failure, Requirements>;
|
|
146
|
-
type StreamFn<Pattern extends string, Input, Event, Failure, Requirements> = (context: StreamContext<Pattern, ParamsOf<Pattern>, Input>) => Stream.Stream<Event, Failure, Requirements>;
|
|
147
|
-
/** A stream whose input schema decodes the search parameters. */
|
|
148
|
-
declare function makeStreamEndpoint<const Pattern extends string, InputSchema extends DeclaredSchema, EventSchema extends DeclaredSchema, Failure, Requirements>(definition: {
|
|
149
|
-
readonly method: "GET";
|
|
150
|
-
readonly pattern: Pattern;
|
|
151
|
-
readonly input: InputSchema;
|
|
152
|
-
readonly event: EventSchema;
|
|
153
|
-
readonly fn: StreamFn<Pattern, InputSchema["Type"], EventSchema["Type"], Failure, Requirements>;
|
|
154
|
-
}): StreamEndpointDefinition<Pattern, InputSchema["Type"], EventSchema["Type"], Failure, Requirements>;
|
|
155
|
-
/** A stream without input. */
|
|
156
|
-
declare function makeStreamEndpoint<const Pattern extends string, EventSchema extends DeclaredSchema, Failure, Requirements>(definition: {
|
|
157
|
-
readonly method: "GET";
|
|
158
|
-
readonly pattern: Pattern;
|
|
159
|
-
readonly event: EventSchema;
|
|
160
|
-
readonly fn: StreamFn<Pattern, undefined, EventSchema["Type"], Failure, Requirements>;
|
|
161
|
-
}): StreamEndpointDefinition<Pattern, undefined, EventSchema["Type"], Failure, Requirements>;
|
|
162
|
-
export declare const QueryEndpoint: {
|
|
163
|
-
readonly make: {
|
|
164
|
-
<const Pattern extends string, const Method extends HttpMethod, InputSchema extends DeclaredSchema, OutputSchema extends DeclaredSchema, Failure, Requirements, const Errors extends ReadonlyArray<EndpointErrorDeclaration> = readonly []>(definition: {
|
|
165
|
-
readonly method: Method;
|
|
166
|
-
readonly pattern: Pattern;
|
|
167
|
-
readonly input: InputSchema;
|
|
168
|
-
readonly output: OutputSchema;
|
|
169
|
-
/** Expected application failures: each entry's schema and explicit HTTP error status. */
|
|
170
|
-
readonly errors?: Errors;
|
|
171
|
-
readonly fn: EndpointFn<Pattern, InputSchema["Type"], OutputSchema["Type"], Failure, Requirements>;
|
|
172
|
-
}): ResponseEndpointDefinition<"query", Pattern, InputSchema["Type"], OutputSchema["Type"], Failure, Requirements | (Method extends "GET" ? never : FormInputServices<InputSchema>), Errors, Method, InputSchema["Encoded"]>;
|
|
173
|
-
<const Pattern extends string, const Method extends HttpMethod, OutputSchema extends DeclaredSchema, Failure, Requirements, const Errors extends ReadonlyArray<EndpointErrorDeclaration> = readonly []>(definition: {
|
|
174
|
-
readonly method: Method;
|
|
175
|
-
readonly pattern: Pattern;
|
|
176
|
-
readonly output: OutputSchema;
|
|
177
|
-
/** Expected application failures: each entry's schema and explicit HTTP error status. */
|
|
178
|
-
readonly errors?: Errors;
|
|
179
|
-
readonly fn: EndpointFn<Pattern, undefined, OutputSchema["Type"], Failure, Requirements>;
|
|
180
|
-
}): ResponseEndpointDefinition<"query", Pattern, undefined, OutputSchema["Type"], Failure, Requirements, Errors, Method, undefined>;
|
|
181
|
-
};
|
|
182
|
-
};
|
|
183
|
-
export declare const MutationEndpoint: {
|
|
184
|
-
readonly make: {
|
|
185
|
-
<const Pattern extends string, const Method extends HttpMethod, InputSchema extends DeclaredSchema, OutputSchema extends DeclaredSchema, Failure, Requirements, const Errors extends ReadonlyArray<EndpointErrorDeclaration> = readonly []>(definition: {
|
|
186
|
-
readonly method: Method;
|
|
187
|
-
readonly pattern: Pattern;
|
|
188
|
-
readonly input: InputSchema;
|
|
189
|
-
readonly output: OutputSchema;
|
|
190
|
-
/** Expected application failures: each entry's schema and explicit HTTP error status. */
|
|
191
|
-
readonly errors?: Errors;
|
|
192
|
-
readonly fn: EndpointFn<Pattern, InputSchema["Type"], OutputSchema["Type"], Failure, Requirements>;
|
|
193
|
-
}): ResponseEndpointDefinition<"mutation", Pattern, InputSchema["Type"], OutputSchema["Type"], Failure, Requirements | (Method extends "GET" ? never : FormInputServices<InputSchema>), Errors, Method, InputSchema["Encoded"]>;
|
|
194
|
-
<const Pattern extends string, const Method extends HttpMethod, OutputSchema extends DeclaredSchema, Failure, Requirements, const Errors extends ReadonlyArray<EndpointErrorDeclaration> = readonly []>(definition: {
|
|
195
|
-
readonly method: Method;
|
|
196
|
-
readonly pattern: Pattern;
|
|
197
|
-
readonly output: OutputSchema;
|
|
198
|
-
/** Expected application failures: each entry's schema and explicit HTTP error status. */
|
|
199
|
-
readonly errors?: Errors;
|
|
200
|
-
readonly fn: EndpointFn<Pattern, undefined, OutputSchema["Type"], Failure, Requirements>;
|
|
201
|
-
}): ResponseEndpointDefinition<"mutation", Pattern, undefined, OutputSchema["Type"], Failure, Requirements, Errors, Method, undefined>;
|
|
202
|
-
};
|
|
203
|
-
};
|
|
204
|
-
/** Unimplemented declaration scaffold. The build rejects registered stream endpoints. */
|
|
205
|
-
export declare const StreamEndpoint: {
|
|
206
|
-
readonly make: typeof makeStreamEndpoint;
|
|
207
|
-
};
|
|
208
|
-
declare function makeTaskMiddleware<Failure, Requirements>(definition: {
|
|
209
|
-
/** Which requests it selects. Written, never inferred: `"/*"` means every path. */
|
|
210
|
-
readonly patterns: ReadonlyArray<string>;
|
|
211
|
-
readonly methods: ReadonlyArray<HttpMethod>;
|
|
212
|
-
readonly fn: (context: MiddlewareContext) => Effect.Effect<void, Failure, Requirements>;
|
|
213
|
-
}): MiddlewareDefinition<Failure, Requirements>;
|
|
214
|
-
export declare const TaskMiddleware: {
|
|
215
|
-
readonly make: typeof makeTaskMiddleware;
|
|
216
|
-
};
|
|
217
|
-
export type HtmlDocumentContext = Omit<UntypedHtmlDocumentContext, "getPublicUrl"> & {
|
|
218
|
-
readonly getPublicUrl: (key: RegisteredAssetKey) => string;
|
|
219
|
-
};
|
|
220
|
-
declare function makeHtmlDocument<AttributesFailure, AttributesRequirements, HeadFailure, HeadRequirements>(definition: {
|
|
221
|
-
readonly attributesFn: (context: HtmlDocumentContext) => Effect.Effect<DocumentAttributes, AttributesFailure, AttributesRequirements>;
|
|
222
|
-
readonly defaultHeadFn: (context: HtmlDocumentContext) => Effect.Effect<ReadonlyArray<Element>, HeadFailure, HeadRequirements>;
|
|
223
|
-
readonly headDeduplicationRules?: ReadonlyArray<HeadDeduplicationRule>;
|
|
224
|
-
}): HtmlDocumentDefinition<AttributesFailure | HeadFailure, AttributesRequirements | HeadRequirements>;
|
|
225
|
-
export declare const HtmlDocument: {
|
|
226
|
-
readonly make: typeof makeHtmlDocument;
|
|
227
|
-
};
|
|
228
|
-
type AnyLoader = UiLoaderDefinition<any, any, any, any, any>;
|
|
229
|
-
type AnyEndpoint = ResponseEndpointDefinition<any, any, any, any, any, any, any, any, any> | StreamEndpointDefinition<any, any, any, any, any>;
|
|
230
|
-
type AnyMiddleware = MiddlewareDefinition<any, any>;
|
|
231
|
-
type AnyHtmlDocument = HtmlDocumentDefinition<any, any>;
|
|
232
|
-
declare const APPLICATION_TYPES: unique symbol;
|
|
233
|
-
type RegisteredDeclarations = Register extends {
|
|
234
|
-
readonly declarations: infer Declarations extends ReadonlyArray<RegisterableDeclaration>;
|
|
235
|
-
} ? Declarations : readonly [];
|
|
236
|
-
type GeneratedApplicationCheck = Register extends {
|
|
237
|
-
readonly declarations: ReadonlyArray<RegisterableDeclaration>;
|
|
238
|
-
} ? unknown : MissingGeneratedApplicationTypes;
|
|
239
|
-
export type Application<Loaders extends AnyLoader = AnyLoader, Endpoints extends AnyEndpoint = AnyEndpoint, Middleware extends AnyMiddleware = AnyMiddleware, HtmlDocument extends AnyHtmlDocument = AnyHtmlDocument> = {
|
|
240
|
-
readonly _tag: "Application";
|
|
241
|
-
readonly [APPLICATION_RUNTIME]: Layer.Layer<CompiledApplication, VormaStartupError>;
|
|
242
|
-
readonly [APPLICATION_TYPES]?: {
|
|
243
|
-
readonly loaders: Loaders;
|
|
244
|
-
readonly endpoints: Endpoints;
|
|
245
|
-
};
|
|
246
|
-
readonly document: HtmlDocument;
|
|
247
|
-
readonly middleware: ReadonlyArray<Middleware>;
|
|
248
|
-
};
|
|
249
|
-
export type UiLoadersOf<A> = A extends Application<infer L, any, any, any> ? L : never;
|
|
250
|
-
type EndpointsOf<A, Kind extends EndpointKind> = A extends Application<any, infer E, any, any> ? Extract<E, {
|
|
251
|
-
readonly kind: Kind;
|
|
252
|
-
}> : never;
|
|
253
|
-
/** Per kind: the union of services the handlers of that kind yield. */
|
|
254
|
-
export type LoaderRequirementsOf<A> = DefinitionTypesOf<UiLoadersOf<A>>["requirements"];
|
|
255
|
-
export type QueryRequirementsOf<A> = DefinitionTypesOf<EndpointsOf<A, "query">>["requirements"];
|
|
256
|
-
export type MutationRequirementsOf<A> = DefinitionTypesOf<EndpointsOf<A, "mutation">>["requirements"];
|
|
257
|
-
export type StreamRequirementsOf<A> = DefinitionTypesOf<EndpointsOf<A, "stream">>["requirements"];
|
|
258
|
-
export type MiddlewareRequirementsOf<A> = A extends Application<any, any, infer M, any> ? DefinitionTypesOf<M>["requirements"] : never;
|
|
259
|
-
export type HtmlDocumentRequirementsOf<A> = A extends Application<any, any, any, infer D> ? DefinitionTypesOf<D>["requirements"] : never;
|
|
260
|
-
/**
|
|
261
|
-
* One service-layer property, required exactly when the declarations of that
|
|
262
|
-
* kind require a service; otherwise optional, and omission supplies nothing.
|
|
263
|
-
*/
|
|
264
|
-
type ServiceLayer<Name extends string, Requirements, E, LayerRequirements, RequestServices> = [
|
|
265
|
-
Exclude<Requirements, TaskContext | TaskRuntime | HttpRouter.Provided | RequestServices>
|
|
266
|
-
] extends [never] ? {
|
|
267
|
-
readonly [K in Name]?: Layer.Layer<never, E, LayerRequirements>;
|
|
268
|
-
} : {
|
|
269
|
-
readonly [K in Name]: Layer.Layer<Exclude<Requirements, TaskContext | TaskRuntime | HttpRouter.Provided | RequestServices>, E, LayerRequirements>;
|
|
270
|
-
};
|
|
271
|
-
/** The services the document and each handler kind may use, as one layer per recipient. */
|
|
272
|
-
export type ServiceLayers<A, E, LayerRequirements, RequestServices = never> = ServiceLayer<"documentServices", HtmlDocumentRequirementsOf<A>, E, LayerRequirements, RequestServices> & ServiceLayer<"uiLoaderServices", LoaderRequirementsOf<A>, E, LayerRequirements, RequestServices> & ServiceLayer<"queryServices", QueryRequirementsOf<A>, E, LayerRequirements, RequestServices> & ServiceLayer<"mutationServices", MutationRequirementsOf<A>, E, LayerRequirements, RequestServices> & ServiceLayer<"streamServices", StreamRequirementsOf<A>, E, LayerRequirements, RequestServices> & ServiceLayer<"middlewareServices", MiddlewareRequirementsOf<A>, E, LayerRequirements, RequestServices>;
|
|
273
|
-
/** A declaration the build registers automatically: every export of the server project with one of these types. */
|
|
274
|
-
export type RegisterableDeclaration = AnyLoader | AnyEndpoint;
|
|
275
|
-
/**
|
|
276
|
-
* Connects configuration, the document, and ordered task middleware without
|
|
277
|
-
* starting execution. Explicit startup acquires the compiled declarations and
|
|
278
|
-
* metadata through one shared application Layer.
|
|
279
|
-
*/
|
|
280
|
-
declare function makeApplication<const Middleware extends ReadonlyArray<AnyMiddleware>, HtmlDocument extends AnyHtmlDocument>(input: {
|
|
281
|
-
readonly config: VormaConfig;
|
|
282
|
-
readonly document: HtmlDocument;
|
|
283
|
-
/** In execution order: a later middleware's non-terminal contributions replace an earlier one's, and the first terminal outcome wins. */
|
|
284
|
-
readonly middleware: Middleware;
|
|
285
|
-
} & GeneratedApplicationCheck): Application<Extract<RegisteredDeclarations[number], AnyLoader>, Extract<RegisteredDeclarations[number], AnyEndpoint>, Middleware[number], HtmlDocument>;
|
|
286
|
-
/**
|
|
287
|
-
* Acquires handlers for application-controlled mounting. Per-kind Layers provide
|
|
288
|
-
* application services, and the optional request Layer supplies request services.
|
|
289
|
-
*/
|
|
290
|
-
declare function makeHandlers<App extends Application<any, any, any, any>, E = never, LayerRequirements = never, RequestServices = never, RequestError = never, RequestRequirements = never>(options: {
|
|
291
|
-
readonly app: App;
|
|
292
|
-
/** Acquired once per request, within its task context and scope. Omission adds no request services. */
|
|
293
|
-
readonly requestServices?: Layer.Layer<RequestServices, RequestError, RequestRequirements | HttpServerRequest.HttpServerRequest | TaskContext | TaskRuntime>;
|
|
294
|
-
} & ServiceLayers<App, E, LayerRequirements, NoInfer<RequestServices>>): Effect.Effect<{
|
|
295
|
-
ui: Effect.Effect<HttpServerResponse.HttpServerResponse, RequestError | import("./development/metadata.ts").DevelopmentMetadataIssue | VormaStartupError | (import("effect/unstable/http/HttpServerError").HttpServerError | import("effect/unstable/http/Multipart").MultipartError), HttpServerRequest.HttpServerRequest | Exclude<Exclude<RequestRequirements, TaskContext>, TaskRuntime> | (import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("effect/Scope").Scope)>;
|
|
296
|
-
/** Base64 SHA-256 of the exact inline critical CSS; use it in a CSP hash source. */
|
|
297
|
-
getCriticalCssContentSha256: () => Effect.Effect<string, import("./development/metadata.ts").DevelopmentMetadataIssue, never>;
|
|
298
|
-
forEndpointMethod: (method: HttpMethod) => Effect.Effect<HttpServerResponse.HttpServerResponse, RequestError | import("./development/metadata.ts").DevelopmentMetadataIssue | VormaStartupError | (import("effect/unstable/http/HttpServerError").HttpServerError | import("effect/unstable/http/Multipart").MultipartError), HttpServerRequest.HttpServerRequest | Exclude<Exclude<RequestRequirements, TaskContext>, TaskRuntime> | (import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("effect/Scope").Scope)>;
|
|
299
|
-
}, E | VormaStartupError, import("effect/Scope").Scope | Exclude<LayerRequirements, CompiledApplication>>;
|
|
300
|
-
export declare const Vorma: {
|
|
301
|
-
/** Inert application construction from configuration, a document, and ordered task middleware. */
|
|
302
|
-
readonly makeApplication: typeof makeApplication;
|
|
303
|
-
/**
|
|
304
|
-
* Acquires UI and endpoint handlers. The application selects each native
|
|
305
|
-
* registration's method and path and owns serving and service composition.
|
|
306
|
-
*/
|
|
307
|
-
readonly makeHandlers: typeof makeHandlers;
|
|
308
|
-
/** Creates file-serving middleware that the application explicitly mounts. */
|
|
309
|
-
readonly makePublicAssetsFileMiddleware: typeof makePublicAssetsFileMiddleware;
|
|
310
|
-
};
|