foldkit 0.146.0 → 0.148.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/README.md +5 -2
- package/dist/buildToken.d.ts +3 -0
- package/dist/buildToken.d.ts.map +1 -0
- package/dist/buildToken.js +21 -0
- package/dist/controlledDomState.d.ts +25 -0
- package/dist/controlledDomState.d.ts.map +1 -0
- package/dist/controlledDomState.js +240 -0
- package/dist/cssStyleProperties.d.ts +6 -0
- package/dist/cssStyleProperties.d.ts.map +1 -0
- package/dist/cssStyleProperties.js +91 -0
- package/dist/customElement/index.d.ts.map +1 -1
- package/dist/customElement/index.js +23 -0
- package/dist/domReflection.d.ts +73 -0
- package/dist/domReflection.d.ts.map +1 -0
- package/dist/domReflection.js +557 -0
- package/dist/experimental/index.d.ts +1 -0
- package/dist/experimental/index.d.ts.map +1 -1
- package/dist/experimental/index.js +1 -0
- package/dist/experimental/machine/machine.d.ts +22 -3
- package/dist/experimental/machine/machine.d.ts.map +1 -1
- package/dist/experimental/machine/machine.js +8 -0
- package/dist/experimental/server/entry.d.ts +73 -0
- package/dist/experimental/server/entry.d.ts.map +1 -0
- package/dist/experimental/server/entry.js +41 -0
- package/dist/experimental/server/host.d.ts +136 -0
- package/dist/experimental/server/host.d.ts.map +1 -0
- package/dist/experimental/server/host.js +359 -0
- package/dist/experimental/server/index.d.ts +5 -0
- package/dist/experimental/server/index.d.ts.map +1 -0
- package/dist/experimental/server/index.js +4 -0
- package/dist/experimental/server/public.d.ts +3 -0
- package/dist/experimental/server/public.d.ts.map +1 -0
- package/dist/experimental/server/public.js +1 -0
- package/dist/experimental/server/serialize.d.ts +43 -0
- package/dist/experimental/server/serialize.d.ts.map +1 -0
- package/dist/experimental/server/serialize.js +786 -0
- package/dist/experimental/server/server.d.ts +242 -0
- package/dist/experimental/server/server.d.ts.map +1 -0
- package/dist/experimental/server/server.js +946 -0
- package/dist/experimental/server/template.d.ts +53 -0
- package/dist/experimental/server/template.d.ts.map +1 -0
- package/dist/experimental/server/template.js +617 -0
- package/dist/html/index.d.ts +5 -0
- package/dist/html/index.d.ts.map +1 -1
- package/dist/html/index.js +474 -33
- package/dist/hydrate.d.ts +4 -0
- package/dist/hydrate.d.ts.map +1 -0
- package/dist/hydrate.js +850 -0
- package/dist/hydrationMarker.d.ts +10 -0
- package/dist/hydrationMarker.d.ts.map +1 -0
- package/dist/hydrationMarker.js +9 -0
- package/dist/hydrationMarkers.d.ts +15 -0
- package/dist/hydrationMarkers.d.ts.map +1 -0
- package/dist/hydrationMarkers.js +70 -0
- package/dist/nativeInnerHtml.d.ts +13 -0
- package/dist/nativeInnerHtml.d.ts.map +1 -0
- package/dist/nativeInnerHtml.js +30 -0
- package/dist/propertyProvenance.d.ts +33 -0
- package/dist/propertyProvenance.d.ts.map +1 -0
- package/dist/propertyProvenance.js +78 -0
- package/dist/propsModule.d.ts.map +1 -1
- package/dist/propsModule.js +149 -15
- package/dist/runtime/public.d.ts +2 -2
- package/dist/runtime/public.d.ts.map +1 -1
- package/dist/runtime/public.js +1 -1
- package/dist/runtime/runtime.d.ts +99 -36
- package/dist/runtime/runtime.d.ts.map +1 -1
- package/dist/runtime/runtime.js +412 -71
- package/dist/snabbdom/attributes.d.ts.map +1 -1
- package/dist/snabbdom/attributes.js +65 -37
- package/dist/snabbdom/h.d.ts +1 -0
- package/dist/snabbdom/h.d.ts.map +1 -1
- package/dist/snabbdom/h.js +85 -4
- package/dist/snabbdom/style.d.ts.map +1 -1
- package/dist/snabbdom/style.js +53 -34
- package/dist/snabbdom/tovnode.d.ts.map +1 -1
- package/dist/snabbdom/tovnode.js +5 -1
- package/dist/tagName.d.ts +6 -0
- package/dist/tagName.d.ts.map +1 -0
- package/dist/tagName.js +11 -0
- package/dist/test/apps/attributes.d.ts +1 -0
- package/dist/test/apps/attributes.d.ts.map +1 -1
- package/dist/test/apps/attributes.js +8 -1
- package/dist/test/apps/login.js +1 -1
- package/dist/test/matchers.d.ts.map +1 -1
- package/dist/test/matchers.js +2 -1
- package/dist/test/scene.d.ts.map +1 -1
- package/dist/test/scene.js +2 -1
- package/dist/vdom.d.ts.map +1 -1
- package/dist/vdom.js +25 -1
- package/package.json +9 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../../../src/experimental/machine/machine.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,MAAM,EAGN,MAAM,EAEP,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAIrD,8FAA8F;AAC9F,MAAM,MAAM,MAAM,GAAG,QAAQ,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAE/C,sDAAsD;AACtD,MAAM,MAAM,KAAK,CAAC,KAAK,SAAS,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,CAAA;AAEvD,mEAAmE;AACnE,MAAM,MAAM,OAAO,CAAC,KAAK,SAAS,MAAM,EAAE,GAAG,SAAS,KAAK,CAAC,KAAK,CAAC,IAAI,OAAO,CAC3E,KAAK,EACL,QAAQ,CAAC;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE,CAAC,CACxB,CAAA;AAID,OAAO,CAAC,MAAM,oBAAoB,EAAE,OAAO,MAAM,CAAA;AAEjD;;;;;GAKG;AACH,MAAM,MAAM,SAAS,CACnB,WAAW,SAAS,MAAM,EAC1B,cAAc,SAAS,MAAM,EAC7B,UAAU,GAAG,IAAI,IACf,QAAQ,CAAC;IACX,KAAK,EAAE,WAAW,CAAA;IAClB,OAAO,EAAE,cAAc,CAAA;IACvB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAC,CAAA;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,IAAI,CACd,KAAK,SAAS,MAAM,EACpB,OAAO,SAAS,MAAM,EACtB,WAAW,SAAS,KAAK,EACzB,cAAc,SAAS,OAAO,EAC9B,UAAU,GAAG,IAAI,E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AAO,EAAE,CAAC,CAmT3B,CAAA"}
|
|
@@ -25,6 +25,8 @@ const makeEdge = (target, build, commands) => {
|
|
|
25
25
|
*
|
|
26
26
|
* Only meaningful inside a {@link TransitionTable}: the source and trigger
|
|
27
27
|
* types flow in from the table position contextually.
|
|
28
|
+
*
|
|
29
|
+
* @experimental Ships from `foldkit/experimental/machine`; expect breaking changes while the API settles.
|
|
28
30
|
*/
|
|
29
31
|
export const to = (target, build, commands) => makeEdge(target, build, commands);
|
|
30
32
|
/**
|
|
@@ -37,6 +39,8 @@ export const to = (target, build, commands) => makeEdge(target, build, commands)
|
|
|
37
39
|
*
|
|
38
40
|
* The state and Message parameters are `NoInfer` so they resolve from the
|
|
39
41
|
* guard list's table position alone.
|
|
42
|
+
*
|
|
43
|
+
* @experimental Ships from `foldkit/experimental/machine`; expect breaking changes while the API settles.
|
|
40
44
|
*/
|
|
41
45
|
export const when = (guard, target, build, commands) => ({
|
|
42
46
|
_tag: 'When',
|
|
@@ -55,6 +59,8 @@ export const when = (guard, target, build, commands) => ({
|
|
|
55
59
|
* The unconditional fallback at the end of a guard list. Its edge may carry
|
|
56
60
|
* Commands whose Effects need services, threading their requirements into the
|
|
57
61
|
* Machine's `R` the same way {@link to} and {@link when} do.
|
|
62
|
+
*
|
|
63
|
+
* @experimental Ships from `foldkit/experimental/machine`; expect breaking changes while the API settles.
|
|
58
64
|
*/
|
|
59
65
|
export const otherwise = (edge) => ({
|
|
60
66
|
_tag: 'Otherwise',
|
|
@@ -114,6 +120,8 @@ const extractMemberTag = (member) => pipe(Option.some(member), Option.filter(Pre
|
|
|
114
120
|
* })
|
|
115
121
|
* // machine.transition(...) returns Commands typed with UploadsClient in R.
|
|
116
122
|
* ```
|
|
123
|
+
*
|
|
124
|
+
* @experimental Ships from `foldkit/experimental/machine`; expect breaking changes while the API settles.
|
|
117
125
|
*/
|
|
118
126
|
export const define = (schemas) => (definition) => {
|
|
119
127
|
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { RenderedApplication } from './server.js';
|
|
2
|
+
import { type InjectIntoTemplateOptions } from './template.js';
|
|
3
|
+
/** Optional HTTP metadata for a rendered application.
|
|
4
|
+
*
|
|
5
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
6
|
+
*/
|
|
7
|
+
export type ResponseOptions = Readonly<{
|
|
8
|
+
status?: number;
|
|
9
|
+
headers?: HeadersInit;
|
|
10
|
+
}>;
|
|
11
|
+
/** A server entry result whose application markup still needs to be placed in
|
|
12
|
+
* the host's HTML template.
|
|
13
|
+
*
|
|
14
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
15
|
+
*/
|
|
16
|
+
export type Rendered = Readonly<{
|
|
17
|
+
_tag: 'Rendered';
|
|
18
|
+
application: RenderedApplication;
|
|
19
|
+
status?: number;
|
|
20
|
+
headers?: HeadersInit;
|
|
21
|
+
}>;
|
|
22
|
+
/** Constructs a rendered server entry result with optional HTTP status and
|
|
23
|
+
* headers.
|
|
24
|
+
*
|
|
25
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
26
|
+
*/
|
|
27
|
+
export declare const Rendered: (application: RenderedApplication, options?: ResponseOptions) => Rendered;
|
|
28
|
+
/** A server entry result that bypasses application rendering and returns a
|
|
29
|
+
* complete Web `Response`, such as a redirect or another non-page response to
|
|
30
|
+
* a page request. A dedicated data API belongs on a separate backend rather
|
|
31
|
+
* than the render host; this is for responses the page request itself
|
|
32
|
+
* resolves without rendering the shell.
|
|
33
|
+
*
|
|
34
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
35
|
+
*/
|
|
36
|
+
export type Responded = Readonly<{
|
|
37
|
+
_tag: 'Responded';
|
|
38
|
+
response: Response;
|
|
39
|
+
}>;
|
|
40
|
+
/** Constructs a complete Web `Response` server entry result.
|
|
41
|
+
*
|
|
42
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
43
|
+
*/
|
|
44
|
+
export declare const Responded: (response: Response) => Responded;
|
|
45
|
+
/** The result of handling one request through a Foldkit server entry.
|
|
46
|
+
*
|
|
47
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
48
|
+
*/
|
|
49
|
+
export type EntryResult = Rendered | Responded;
|
|
50
|
+
/** The module shape a Foldkit server entry exports for hosts to call: one Web
|
|
51
|
+
* `Request` in, one delivery result out.
|
|
52
|
+
*
|
|
53
|
+
* The outer boundary is a `Promise` so Vite, build scripts, serverless
|
|
54
|
+
* functions, and long-running HTTP hosts can call it without owning the
|
|
55
|
+
* application's Effect requirements. The entry may use Effect internally and
|
|
56
|
+
* settles that work before returning. Rendering itself must run in the same
|
|
57
|
+
* Foldkit module instance as the application's view because the HTML builder's
|
|
58
|
+
* render frame is module-local.
|
|
59
|
+
*
|
|
60
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
61
|
+
*/
|
|
62
|
+
export type EntryModule = Readonly<{
|
|
63
|
+
renderPage: (request: Request) => Promise<EntryResult>;
|
|
64
|
+
}>;
|
|
65
|
+
/** Turns a server entry result into the Web `Response` a host sends. Rendered
|
|
66
|
+
* applications are injected into the supplied template and default to status
|
|
67
|
+
* 200 with a UTF-8 HTML content type. Complete responses pass through
|
|
68
|
+
* unchanged.
|
|
69
|
+
*
|
|
70
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
71
|
+
*/
|
|
72
|
+
export declare const toResponse: (template: string, result: EntryResult, options?: InjectIntoTemplateOptions) => Response;
|
|
73
|
+
//# sourceMappingURL=entry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../../../src/experimental/server/entry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,eAAe,CAAA;AAEtB;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,WAAW,CAAA;CACtB,CAAC,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;IAC9B,IAAI,EAAE,UAAU,CAAA;IAChB,WAAW,EAAE,mBAAmB,CAAA;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,WAAW,CAAA;CACtB,CAAC,CAAA;AAEF;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GACnB,aAAa,mBAAmB,EAChC,UAAU,eAAe,KACxB,QAKD,CAAA;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC;IAC/B,IAAI,EAAE,WAAW,CAAA;IACjB,QAAQ,EAAE,QAAQ,CAAA;CACnB,CAAC,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,UAAU,QAAQ,KAAG,SAG7C,CAAA;AAEF;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAA;AAE9C;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,WAAW,CAAC,CAAA;CACvD,CAAC,CAAA;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GACrB,UAAU,MAAM,EAChB,QAAQ,WAAW,EACnB,UAAU,yBAAyB,KAClC,QAmBA,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Match as M } from 'effect';
|
|
2
|
+
import { injectIntoTemplate, } from './template.js';
|
|
3
|
+
/** Constructs a rendered server entry result with optional HTTP status and
|
|
4
|
+
* headers.
|
|
5
|
+
*
|
|
6
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
7
|
+
*/
|
|
8
|
+
export const Rendered = (application, options) => ({
|
|
9
|
+
_tag: 'Rendered',
|
|
10
|
+
application,
|
|
11
|
+
...(options?.status !== undefined ? { status: options.status } : {}),
|
|
12
|
+
...(options?.headers !== undefined ? { headers: options.headers } : {}),
|
|
13
|
+
});
|
|
14
|
+
/** Constructs a complete Web `Response` server entry result.
|
|
15
|
+
*
|
|
16
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
17
|
+
*/
|
|
18
|
+
export const Responded = (response) => ({
|
|
19
|
+
_tag: 'Responded',
|
|
20
|
+
response,
|
|
21
|
+
});
|
|
22
|
+
/** Turns a server entry result into the Web `Response` a host sends. Rendered
|
|
23
|
+
* applications are injected into the supplied template and default to status
|
|
24
|
+
* 200 with a UTF-8 HTML content type. Complete responses pass through
|
|
25
|
+
* unchanged.
|
|
26
|
+
*
|
|
27
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
28
|
+
*/
|
|
29
|
+
export const toResponse = (template, result, options) => M.value(result).pipe(M.tagsExhaustive({
|
|
30
|
+
Responded: ({ response }) => response,
|
|
31
|
+
Rendered: rendered => {
|
|
32
|
+
const headers = new Headers(rendered.headers);
|
|
33
|
+
if (!headers.has('content-type')) {
|
|
34
|
+
headers.set('content-type', 'text/html; charset=utf-8');
|
|
35
|
+
}
|
|
36
|
+
return new Response(injectIntoTemplate(template, rendered.application, options), {
|
|
37
|
+
status: rendered.status ?? 200,
|
|
38
|
+
headers,
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
}));
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decides whether a client accepts an HTML response, given its `Accept`
|
|
3
|
+
* header. An absent or empty header accepts anything. Otherwise the most
|
|
4
|
+
* specific media range that covers `text/html` (`text/html`, then `text/*`,
|
|
5
|
+
* then `*/*`) decides, using its `q` value, so `text/html;q=0` is refused
|
|
6
|
+
* even alongside `*/*`.
|
|
7
|
+
*
|
|
8
|
+
* A page host renders the application for a request that accepts HTML and
|
|
9
|
+
* serves a non-page response otherwise, so this is the negotiation a host runs
|
|
10
|
+
* before falling through to a render.
|
|
11
|
+
*
|
|
12
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
13
|
+
*/
|
|
14
|
+
export declare const acceptsHtml: (acceptHeader: string | undefined) => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Merges a field name into an existing `Vary` header value, parsing it as a
|
|
17
|
+
* comma-separated, case-insensitive list of field names. `Vary: *` already
|
|
18
|
+
* varies on everything and is returned unchanged, a token already present (in
|
|
19
|
+
* any case, and distinct from a longer name that merely starts with it, such as
|
|
20
|
+
* `Accept-Language` beside `Accept`) is not duplicated, and otherwise the field
|
|
21
|
+
* name is appended.
|
|
22
|
+
*
|
|
23
|
+
* A host whose response depends on a request header must declare that header in
|
|
24
|
+
* `Vary` so a shared cache does not serve one client's representation to
|
|
25
|
+
* another. The dev host, reference server, and scaffold merge through this one
|
|
26
|
+
* helper rather than assigning `Vary`, which would drop the fields already
|
|
27
|
+
* there.
|
|
28
|
+
*
|
|
29
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
30
|
+
*/
|
|
31
|
+
export declare const varyWith: (existing: string | undefined, fieldName: string) => string;
|
|
32
|
+
/**
|
|
33
|
+
* Merges the `Accept` field name into an existing `Vary` header value.
|
|
34
|
+
*
|
|
35
|
+
* A page host that negotiates HTML on the `Accept` header must declare that in
|
|
36
|
+
* `Vary` so a shared cache does not serve one representation in place of the
|
|
37
|
+
* other.
|
|
38
|
+
*
|
|
39
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
40
|
+
*/
|
|
41
|
+
export declare const varyWithAccept: (existing: string | undefined) => string;
|
|
42
|
+
/**
|
|
43
|
+
* Resolves a request target against the origin the host serves, returning the
|
|
44
|
+
* absolute URL to hand the server entry, or `undefined` when the target names
|
|
45
|
+
* a different origin.
|
|
46
|
+
*
|
|
47
|
+
* A request target is not a URL. HTTP allows origin-form (`/page?q=1`) and
|
|
48
|
+
* absolute-form (`http://host/page`), and a client can send a network-path
|
|
49
|
+
* reference (`//elsewhere.example/page`) that resolves against no scheme at
|
|
50
|
+
* all. Resolving one of those against the host origin silently adopts the
|
|
51
|
+
* origin the client wrote, so an entry that derives redirects, canonical URLs,
|
|
52
|
+
* cookie domains, or tenant selection from `Request.url` would take them from
|
|
53
|
+
* the request rather than from the deployment. Only a target that resolves to
|
|
54
|
+
* the host's own origin is accepted; a host behind a proxy that must serve a
|
|
55
|
+
* different public origin passes that origin in explicitly.
|
|
56
|
+
*
|
|
57
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
58
|
+
*/
|
|
59
|
+
export declare const resolveRequestUrl: (requestTarget: string, origin: string) => string | undefined;
|
|
60
|
+
/** How a host should read a request that no static file answered.
|
|
61
|
+
*
|
|
62
|
+
* `PathAsset`: the path names an asset, whatever the request headers say, so a
|
|
63
|
+
* refusal is the same for every client and needs no `Vary`.
|
|
64
|
+
*
|
|
65
|
+
* `DestinationAsset`: the path could be a page, and only the request's
|
|
66
|
+
* `Sec-Fetch-Dest` says otherwise. A refusal here depends on that header, so it
|
|
67
|
+
* has to declare it in `Vary` before a shared cache may store it: a cross-site
|
|
68
|
+
* script request would otherwise seed a cached 404 for a real page.
|
|
69
|
+
*
|
|
70
|
+
* `Page`: nothing marks it as an asset, so the usual `Accept` negotiation
|
|
71
|
+
* decides.
|
|
72
|
+
*
|
|
73
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
74
|
+
*/
|
|
75
|
+
export type RequestClassification = 'PathAsset' | 'DestinationAsset' | 'Page';
|
|
76
|
+
/**
|
|
77
|
+
* Classifies a request that no static file answered, from its path and, when
|
|
78
|
+
* the client sent one, its `Sec-Fetch-Dest`.
|
|
79
|
+
*
|
|
80
|
+
* A host answers a static miss by content negotiation, and a browser requests
|
|
81
|
+
* scripts, stylesheets, and images with `Accept: */*`, which accepts HTML. A
|
|
82
|
+
* request for a hashed asset that is no longer deployed would therefore be
|
|
83
|
+
* answered with the application shell at 200, so a stale bundle reads as a
|
|
84
|
+
* blank page rather than the 404 it is.
|
|
85
|
+
*
|
|
86
|
+
* The path is read first, so a request the URL alone settles is never made to
|
|
87
|
+
* depend on a header the client may or may not send.
|
|
88
|
+
*
|
|
89
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
90
|
+
*/
|
|
91
|
+
export declare const classifyRequest: (requestUrl: string, fetchDestination?: string) => RequestClassification;
|
|
92
|
+
/**
|
|
93
|
+
* Decides whether a request path resolves to the `index.html` template, the
|
|
94
|
+
* way a static file server resolves it: percent-decoded, backslashes and
|
|
95
|
+
* repeated separators collapsed, and dot segments resolved. A host renders the
|
|
96
|
+
* application for such a request rather than serving the raw, unfilled
|
|
97
|
+
* template, so `/`, `/index.html`, `/%2findex.html`, and `/foo/../index.html`
|
|
98
|
+
* all resolve to it. An undecodable or null-byte path resolves to nothing.
|
|
99
|
+
*
|
|
100
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
101
|
+
*/
|
|
102
|
+
export declare const resolvesToIndexHtml: (requestUrl: string) => boolean;
|
|
103
|
+
/**
|
|
104
|
+
* The answer a host gives for the methods it cannot hand to a server entry.
|
|
105
|
+
*
|
|
106
|
+
* The WHATWG `Request` constructor rejects `CONNECT`, `TRACE`, and `TRACK`, so
|
|
107
|
+
* an entry can never be handed one: forwarding it turns a malformed request
|
|
108
|
+
* into a 500. A host refuses them itself, with `405` and an `Allow` header
|
|
109
|
+
* naming what it does forward.
|
|
110
|
+
*
|
|
111
|
+
* On Node only `TRACE` reaches this rule. The HTTP parser rejects `TRACK` with
|
|
112
|
+
* a 400 before any handler runs, and `CONNECT` arrives on its own event rather
|
|
113
|
+
* than as an ordinary request. Both are named anyway, so a host on another
|
|
114
|
+
* runtime refuses them rather than handing one to `new Request`.
|
|
115
|
+
*
|
|
116
|
+
* Every other method reaches the entry, `OPTIONS` included. A preflight is a
|
|
117
|
+
* question about a resource, so the application answers it: the entry can allow
|
|
118
|
+
* one origin for one route and refuse it for another, which no host-level
|
|
119
|
+
* policy could express. The Vite dev host applies Vite's CORS option only to
|
|
120
|
+
* Vite-owned modules and assets. An application preflight therefore reaches
|
|
121
|
+
* the entry rather than middleware a deployed host has no counterpart for.
|
|
122
|
+
*
|
|
123
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
124
|
+
*/
|
|
125
|
+
export declare const HOST_METHOD_ANSWERS: Readonly<{
|
|
126
|
+
refusedStatus: number;
|
|
127
|
+
allow: string;
|
|
128
|
+
}>;
|
|
129
|
+
/**
|
|
130
|
+
* Whether a host refuses this method itself instead of calling the server
|
|
131
|
+
* entry. See {@link HOST_METHOD_ANSWERS}.
|
|
132
|
+
*
|
|
133
|
+
* @experimental Ships from `foldkit/experimental/server`; expect breaking changes while the API settles.
|
|
134
|
+
*/
|
|
135
|
+
export declare const isHostSettledMethod: (method: string) => boolean;
|
|
136
|
+
//# sourceMappingURL=host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../../src/experimental/server/host.ts"],"names":[],"mappings":"AA+DA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,GAAI,cAAc,MAAM,GAAG,SAAS,KAAG,OAqB9D,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,QAAQ,GACnB,UAAU,MAAM,GAAG,SAAS,EAC5B,WAAW,MAAM,KAChB,MAgBF,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,GAAG,SAAS,KAAG,MAChC,CAAA;AAE9B;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB,GAC5B,eAAe,MAAM,EACrB,QAAQ,MAAM,KACb,MAAM,GAAG,SAqBX,CAAA;AA4ED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,kBAAkB,GAAG,MAAM,CAAA;AAE7E;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,GAC1B,YAAY,MAAM,EAClB,mBAAmB,MAAM,KACxB,qBA+BF,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,GAAI,YAAY,MAAM,KAAG,OAkBxD,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC;IACzC,aAAa,EAAE,MAAM,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;CACd,CAGA,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,KAAG,OAKpD,CAAA"}
|