@solidjs/vite-plugin 3.0.0-next.28 → 3.0.0-next.29
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/LICENSE +21 -0
- package/README.md +56 -1
- package/dist/cjs/index.cjs +85 -10
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.mjs +85 -10
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/src/ssr/index.d.ts +5 -0
- package/package.json +1 -1
- package/virtual-solid-manifest.d.ts +21 -1
|
@@ -119,6 +119,11 @@ export interface StartOptions {
|
|
|
119
119
|
* only), so platform-injected vars work and secrets rotate without a
|
|
120
120
|
* rebuild — no secret exists in any dist artifact. Build-time server
|
|
121
121
|
* failures are a deferred-to-boot warning; dev failures stay hard.
|
|
122
|
+
* Boot validation is synchronous — the generated module carries no
|
|
123
|
+
* top-level await, so server bundles work on non-esnext targets
|
|
124
|
+
* (Nitro's node-server preset needs no `esnext` override) — which is
|
|
125
|
+
* why async validators are rejected for `server` keys at config time
|
|
126
|
+
* (`client` keys may stay async: they are awaited at build time).
|
|
122
127
|
*
|
|
123
128
|
* `true` requires the conventional file (error when missing); a string
|
|
124
129
|
* is an explicit schema path; `false` disables even the probing.
|
package/package.json
CHANGED
|
@@ -17,7 +17,17 @@ declare module "virtual:solid-server-function-handler" {
|
|
|
17
17
|
export const endpoint: string;
|
|
18
18
|
export function handleServerFunctionRequest(
|
|
19
19
|
request: Request,
|
|
20
|
-
options?:
|
|
20
|
+
options?: {
|
|
21
|
+
/**
|
|
22
|
+
* Extra fields spread into the request event at creation — the public
|
|
23
|
+
* wrapper→event extension seam, same as the SSR handler's
|
|
24
|
+
* `handleRequest`. Conventionally `nativeEvent` carries the platform's
|
|
25
|
+
* raw request object (the plugin's dev middleware and a Node server
|
|
26
|
+
* entry pass the Node `IncomingMessage`); read it back with
|
|
27
|
+
* `getRequestEvent()`.
|
|
28
|
+
*/
|
|
29
|
+
event?: Record<string, unknown>;
|
|
30
|
+
} & Record<string, unknown>,
|
|
21
31
|
): Promise<Response>;
|
|
22
32
|
}
|
|
23
33
|
|
|
@@ -39,6 +49,16 @@ declare module "virtual:solid-ssr-handler" {
|
|
|
39
49
|
context?: Record<string, unknown>;
|
|
40
50
|
/** Status/headers for the HTML response. */
|
|
41
51
|
responseInit?: ResponseInit;
|
|
52
|
+
/**
|
|
53
|
+
* Extra fields spread into the request event at creation — the public
|
|
54
|
+
* wrapper→event extension seam. Conventionally `nativeEvent` carries
|
|
55
|
+
* the platform's raw request object; the plugin's dev/preview
|
|
56
|
+
* middlewares (and, by convention, a custom Node server entry) pass
|
|
57
|
+
* the Node `IncomingMessage` here, so `getRequestEvent().nativeEvent`
|
|
58
|
+
* answers the same on every surface. Read it back anywhere inside the
|
|
59
|
+
* request scope with `getRequestEvent()`.
|
|
60
|
+
*/
|
|
61
|
+
event?: Record<string, unknown>;
|
|
42
62
|
/** Options forwarded to the server-function handler for endpoint requests. */
|
|
43
63
|
serverFunctions?: Record<string, unknown>;
|
|
44
64
|
},
|