void 0.7.5 → 0.7.7
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/{auth-DrfOTMmr.d.mts → auth-DmuALf16.d.mts} +4 -4
- package/dist/{better-auth-shared-CZsIpjey.d.mts → better-auth-shared-HXlHRw02.d.mts} +15 -15
- package/dist/cli/cli.mjs +14 -14
- package/dist/{config-BIa9HwVX.mjs → config-DqkeX_Fa.mjs} +5 -5
- package/dist/{db-RqxhOT2E.mjs → db-BnKZW1J7.mjs} +26 -22
- package/dist/{deploy-CRIz77mw.mjs → deploy-D3t53kng.mjs} +46 -16
- package/dist/{domain-CDQhvYNZ.mjs → domain-ClDdX9I1.mjs} +24 -1
- package/dist/{dotenv-DwO4ti0Z.mjs → dotenv-zdFCCgFU.mjs} +26 -26
- package/dist/{env-CnrQY2b6.mjs → env-CU97_4YK.mjs} +1 -1
- package/dist/{env-helpers-CbeM_7-k.d.mts → env-helpers-Dw95CU8e.d.mts} +4 -4
- package/dist/{env-validation-DJKjR_8q.mjs → env-validation-Bc_aiBUm.mjs} +1 -1
- package/dist/{fetch-error-DflegrF3.d.mts → fetch-error-DZ868Xq4.d.mts} +4 -4
- package/dist/{gen-C0EY2k27.mjs → gen-CpeKIqlM.mjs} +2 -2
- package/dist/{handler-dKQWyF-G.d.mts → handler-DJTuxB10.d.mts} +24 -27
- package/dist/{head-CZGAunBV.d.mts → head-C7QW7UY1.d.mts} +5 -6
- package/dist/{headers-YVkHjOyq.mjs → headers-C7Yf6_CN.mjs} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +501 -63
- package/dist/{init-FMZ29UZW.mjs → init-CTtDfVVo.mjs} +4 -4
- package/dist/{node-DFqMcZR1.mjs → node-DHVCtkgt.mjs} +1 -1
- package/dist/pages/client.d.mts +35 -41
- package/dist/pages/head-client.d.mts +1 -1
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/head.mjs +4 -4
- package/dist/pages/index.d.mts +6 -6
- package/dist/pages/index.mjs +6 -6
- package/dist/pages/islands-plugin.d.mts +4 -13
- package/dist/pages/islands-plugin.mjs +2 -64
- package/dist/pages/prefetch.d.mts +5 -5
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +98 -14
- package/dist/plugin-inference-CXUuq0aC.mjs +577 -0
- package/dist/{prepare-PqAbhLte.mjs → prepare-CKzO06-Z.mjs} +4 -4
- package/dist/{preset-jKn1hQwP.mjs → preset-BhnZpb7t.mjs} +1 -1
- package/dist/{protocol-DxGzKEz2.d.mts → protocol-D7r_deVZ.d.mts} +7 -4
- package/dist/{route-types-DReF1gUY.mjs → route-types-Cnqj_8a7.mjs} +2 -2
- package/dist/runtime/ai.d.mts +33 -40
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/client.d.mts +2 -2
- package/dist/runtime/env-helpers.d.mts +1 -1
- package/dist/runtime/env-helpers.mjs +3 -3
- package/dist/runtime/env-public-client.d.mts +3 -3
- package/dist/runtime/env-public.d.mts +7 -7
- package/dist/runtime/fetch-stream.d.mts +1 -1
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +3 -3
- package/dist/runtime/isr.d.mts +2 -2
- package/dist/runtime/kv.d.mts +12 -12
- package/dist/runtime/live-server.d.mts +4 -4
- package/dist/runtime/live.d.mts +2 -2
- package/dist/runtime/migration-handler.d.mts +6 -6
- package/dist/runtime/seed.d.mts +4 -4
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +8 -8
- package/dist/runtime/ws.d.mts +21 -21
- package/dist/{scan-QtRTdh94.mjs → scan-B8iEm8xn.mjs} +6 -6
- package/dist/{scan-Ba4hFwlH.mjs → scan-CWfLxtOe.mjs} +8 -8
- package/dist/{standard-schema-BfGDWXff.d.mts → standard-schema-D2qvCEYV.d.mts} +14 -14
- package/dist/sveltekit.d.mts +3 -5
- package/dist/types-DG_Ynnyd.d.mts +42 -0
- package/package.json +3 -3
- package/dist/plugin-inference-CCtRkt9O.mjs +0 -2476
- package/dist/types-AdKzPp2C.d.mts +0 -57
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { n as HeadDescriptor } from "./head-
|
|
2
|
-
import { r as AuthUser, t as AuthSession } from "./auth-
|
|
3
|
-
import { t as StandardSchemaV1 } from "./standard-schema-
|
|
1
|
+
import { n as HeadDescriptor } from "./head-C7QW7UY1.mjs";
|
|
2
|
+
import { r as AuthUser, t as AuthSession } from "./auth-DmuALf16.mjs";
|
|
3
|
+
import { t as StandardSchemaV1 } from "./standard-schema-D2qvCEYV.mjs";
|
|
4
4
|
import * as _$_cloudflare_sandbox0 from "@cloudflare/sandbox";
|
|
5
5
|
import { Context, Env, MiddlewareHandler } from "hono";
|
|
6
6
|
import { RewriteDestination } from "void/routes";
|
|
7
7
|
|
|
8
8
|
//#region src/runtime/validator.d.ts
|
|
9
|
-
|
|
9
|
+
type ValidatorSlots = {
|
|
10
10
|
body?: StandardSchemaV1;
|
|
11
11
|
query?: StandardSchemaV1;
|
|
12
12
|
params?: StandardSchemaV1;
|
|
13
|
-
}
|
|
14
|
-
|
|
13
|
+
};
|
|
14
|
+
type ValidationSuccess<V extends ValidatorSlots> = {
|
|
15
15
|
ok: true;
|
|
16
16
|
input: HandlerInput<V>;
|
|
17
|
-
}
|
|
18
|
-
|
|
17
|
+
};
|
|
18
|
+
type ValidationFailure = {
|
|
19
19
|
ok: false;
|
|
20
20
|
response: Response;
|
|
21
|
-
}
|
|
21
|
+
};
|
|
22
22
|
type HandlerInput<V extends ValidatorSlots> = { [K in keyof V as V[K] extends StandardSchemaV1 ? K : never]: V[K] extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<V[K]> : never };
|
|
23
23
|
declare function runValidation<V extends ValidatorSlots>(validators: V, c: CloudContext): Promise<ValidationSuccess<V> | ValidationFailure>;
|
|
24
24
|
//#endregion
|
|
@@ -98,10 +98,10 @@ interface CloudBindings {
|
|
|
98
98
|
SANDBOX: DurableObjectNamespace<_$_cloudflare_sandbox0.Sandbox>;
|
|
99
99
|
[key: string]: unknown;
|
|
100
100
|
}
|
|
101
|
-
|
|
101
|
+
type CloudEnv = Env & {
|
|
102
102
|
Bindings: CloudBindings;
|
|
103
103
|
Variables: CloudContextVariables;
|
|
104
|
-
}
|
|
104
|
+
};
|
|
105
105
|
declare module "hono" {
|
|
106
106
|
interface Context {
|
|
107
107
|
/**
|
|
@@ -163,14 +163,11 @@ type CloudContext = Context<CloudEnv>;
|
|
|
163
163
|
type HandlerFn = (c: CloudContext) => unknown | Promise<unknown>;
|
|
164
164
|
type MiddlewareFn = MiddlewareHandler<CloudEnv>;
|
|
165
165
|
/** Pre-rendered asset tags injected by the SSR build. */
|
|
166
|
-
|
|
167
|
-
/** CSS stylesheet links for `<head>`. */
|
|
168
|
-
|
|
169
|
-
/** JS modulepreload links for `<head>` (only when page needs JS). */
|
|
170
|
-
preloads: string;
|
|
171
|
-
/** Script tags for `</body>` (only when page needs JS). */
|
|
166
|
+
type RenderAssetTags = {
|
|
167
|
+
/** CSS stylesheet links for `<head>`. */css: string; /** JS modulepreload links for `<head>` (only when page needs JS). */
|
|
168
|
+
preloads: string; /** Script tags for `</body>` (only when page needs JS). */
|
|
172
169
|
body: string;
|
|
173
|
-
}
|
|
170
|
+
};
|
|
174
171
|
type RenderFn = (c: CloudContext, assetTags: RenderAssetTags) => Response | Promise<Response>;
|
|
175
172
|
type JobController = ScheduledController;
|
|
176
173
|
type JobExecutionContext = ExecutionContext;
|
|
@@ -200,20 +197,20 @@ type QueueFn<T = unknown> = (batch: QueueBatch<T>, env: CloudEnv["Bindings"]) =>
|
|
|
200
197
|
* `__payload` exists at the type level only —
|
|
201
198
|
* TypeScript's `typeof import(...)` reads it for codegen.
|
|
202
199
|
*/
|
|
203
|
-
|
|
200
|
+
type TypedQueueHandler<T = unknown> = {
|
|
204
201
|
(batch: QueueBatch<T>, env: CloudEnv["Bindings"]): void | Promise<void>;
|
|
205
202
|
readonly __payload: T;
|
|
206
|
-
}
|
|
203
|
+
};
|
|
207
204
|
/**
|
|
208
205
|
* A typed handler with phantom type carriers for validators and return type.
|
|
209
206
|
* `__validators` and `__output` exist at the type level only —
|
|
210
207
|
* TypeScript's `typeof import(...)` reads them for codegen.
|
|
211
208
|
*/
|
|
212
|
-
|
|
209
|
+
type TypedHandler<V extends ValidatorSlots = {}, R = unknown> = {
|
|
213
210
|
(c: CloudContext): Promise<Response> | Response | unknown | Promise<unknown>;
|
|
214
211
|
readonly __validators: V;
|
|
215
212
|
readonly __output: R;
|
|
216
|
-
}
|
|
213
|
+
};
|
|
217
214
|
/**
|
|
218
215
|
* Define a route handler, optionally composed with per-route middleware.
|
|
219
216
|
*
|
|
@@ -221,11 +218,11 @@ interface TypedHandler<V extends ValidatorSlots = {}, R = unknown> {
|
|
|
221
218
|
* Multiple arguments: middleware chain + final handler, composed at runtime.
|
|
222
219
|
*/
|
|
223
220
|
declare function defineHandler<R>(handler: (c: CloudContext) => R | Response | Promise<R | Response>): TypedHandler<{}, Exclude<Awaited<R>, Response>>;
|
|
224
|
-
declare function defineHandler(
|
|
225
|
-
declare function defineHandler(
|
|
226
|
-
declare function defineHandler(
|
|
227
|
-
declare function defineHandler(
|
|
228
|
-
declare function defineHandler(
|
|
221
|
+
declare function defineHandler(firstMiddleware: MiddlewareFn, handler: HandlerFn): TypedHandler;
|
|
222
|
+
declare function defineHandler(firstMiddleware: MiddlewareFn, secondMiddleware: MiddlewareFn, handler: HandlerFn): TypedHandler;
|
|
223
|
+
declare function defineHandler(firstMiddleware: MiddlewareFn, secondMiddleware: MiddlewareFn, thirdMiddleware: MiddlewareFn, handler: HandlerFn): TypedHandler;
|
|
224
|
+
declare function defineHandler(firstMiddleware: MiddlewareFn, secondMiddleware: MiddlewareFn, thirdMiddleware: MiddlewareFn, fourthMiddleware: MiddlewareFn, handler: HandlerFn): TypedHandler;
|
|
225
|
+
declare function defineHandler(firstMiddleware: MiddlewareFn, secondMiddleware: MiddlewareFn, thirdMiddleware: MiddlewareFn, fourthMiddleware: MiddlewareFn, fifthMiddleware: MiddlewareFn, handler: HandlerFn): TypedHandler;
|
|
229
226
|
/**
|
|
230
227
|
* Create a handler with input validation using Standard Schema validators.
|
|
231
228
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/pages/head.d.ts
|
|
2
2
|
/** Shape of a single page's head metadata. */
|
|
3
|
-
|
|
3
|
+
type HeadDescriptor = {
|
|
4
4
|
title?: string;
|
|
5
5
|
meta?: Array<{
|
|
6
6
|
name?: string;
|
|
@@ -20,12 +20,11 @@ interface HeadDescriptor {
|
|
|
20
20
|
}>;
|
|
21
21
|
htmlAttrs?: Record<string, string>;
|
|
22
22
|
bodyAttrs?: Record<string, string>;
|
|
23
|
-
}
|
|
23
|
+
};
|
|
24
24
|
/** Extended head config with template support (used in void.json). */
|
|
25
|
-
|
|
26
|
-
/** Title template — `%s` is replaced with the page title. */
|
|
27
|
-
|
|
28
|
-
}
|
|
25
|
+
type HeadConfig = HeadDescriptor & {
|
|
26
|
+
/** Title template — `%s` is replaced with the page title. */titleTemplate?: string;
|
|
27
|
+
};
|
|
29
28
|
/**
|
|
30
29
|
* Merge head descriptors with precedence: page > middleware > config.
|
|
31
30
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
|
|
2
|
-
import { a as convertRedirectsConfig, d as parseHostPrefixedSource, i as convertHeadersConfig, o as convertRewritesConfig, r as convertFallbacksConfig, s as countSplats, t as VALID_REDIRECT_STATUSES, u as isProtocolRelative } from "./config-
|
|
2
|
+
import { a as convertRedirectsConfig, d as parseHostPrefixedSource, i as convertHeadersConfig, o as convertRewritesConfig, r as convertFallbacksConfig, s as countSplats, t as VALID_REDIRECT_STATUSES, u as isProtocolRelative } from "./config-DqkeX_Fa.mjs";
|
|
3
3
|
import { i as voidWarn } from "./log-DXdqnmhF.mjs";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
//#region src/cli/headers.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as HeadDescriptor } from "./head-
|
|
2
|
-
import { r as AuthUser } from "./auth-
|
|
3
|
-
import { C as HandlerInput, _ as defineScheduled, a as QueueBatch, b as InferProps, c as RenderAssetTags, d as VoidAssetRewriteError, f as defineHandler, g as defineRender, h as defineQueue, i as CloudEnv, l as TypedHandler, m as defineMiddleware, n as CloudContext, o as QueueMessage, p as defineHead, r as CloudContextVariables, s as QueueRetryOptions, u as TypedQueueHandler, v as Deferred, w as ValidatorSlots, x as defer, y as DeferredState } from "./handler-
|
|
1
|
+
import { n as HeadDescriptor } from "./head-C7QW7UY1.mjs";
|
|
2
|
+
import { r as AuthUser } from "./auth-DmuALf16.mjs";
|
|
3
|
+
import { C as HandlerInput, _ as defineScheduled, a as QueueBatch, b as InferProps, c as RenderAssetTags, d as VoidAssetRewriteError, f as defineHandler, g as defineRender, h as defineQueue, i as CloudEnv, l as TypedHandler, m as defineMiddleware, n as CloudContext, o as QueueMessage, p as defineHead, r as CloudContextVariables, s as QueueRetryOptions, u as TypedQueueHandler, v as Deferred, w as ValidatorSlots, x as defer, y as DeferredState } from "./handler-DJTuxB10.mjs";
|
|
4
4
|
import { QueueMap } from "./runtime/queues.mjs";
|
|
5
5
|
import { PluginConfig } from "@cloudflare/vite-plugin";
|
|
6
6
|
import { Plugin } from "vite";
|