void 0.7.6 → 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.
Files changed (63) hide show
  1. package/dist/{auth-DrfOTMmr.d.mts → auth-DmuALf16.d.mts} +4 -4
  2. package/dist/{better-auth-shared-CZsIpjey.d.mts → better-auth-shared-HXlHRw02.d.mts} +15 -15
  3. package/dist/cli/cli.mjs +14 -14
  4. package/dist/{config-BIa9HwVX.mjs → config-DqkeX_Fa.mjs} +5 -5
  5. package/dist/{db-DvBg7Oc5.mjs → db-BnKZW1J7.mjs} +25 -21
  6. package/dist/{deploy-B5rTuzXw.mjs → deploy-D3t53kng.mjs} +8 -5
  7. package/dist/{domain-CDQhvYNZ.mjs → domain-ClDdX9I1.mjs} +24 -1
  8. package/dist/{dotenv-DwO4ti0Z.mjs → dotenv-zdFCCgFU.mjs} +26 -26
  9. package/dist/{env-CnrQY2b6.mjs → env-CU97_4YK.mjs} +1 -1
  10. package/dist/{env-helpers-CbeM_7-k.d.mts → env-helpers-Dw95CU8e.d.mts} +4 -4
  11. package/dist/{env-validation-DJKjR_8q.mjs → env-validation-Bc_aiBUm.mjs} +1 -1
  12. package/dist/{fetch-error-DflegrF3.d.mts → fetch-error-DZ868Xq4.d.mts} +4 -4
  13. package/dist/{gen-C0EY2k27.mjs → gen-CpeKIqlM.mjs} +2 -2
  14. package/dist/{handler-dKQWyF-G.d.mts → handler-DJTuxB10.d.mts} +24 -27
  15. package/dist/{head-CZGAunBV.d.mts → head-C7QW7UY1.d.mts} +5 -6
  16. package/dist/{headers-YVkHjOyq.mjs → headers-C7Yf6_CN.mjs} +1 -1
  17. package/dist/index.d.mts +3 -3
  18. package/dist/index.mjs +40 -31
  19. package/dist/{init-BiXWyKEf.mjs → init-CTtDfVVo.mjs} +2 -2
  20. package/dist/{node-DFqMcZR1.mjs → node-DHVCtkgt.mjs} +1 -1
  21. package/dist/pages/client.d.mts +35 -41
  22. package/dist/pages/head-client.d.mts +1 -1
  23. package/dist/pages/head.d.mts +1 -1
  24. package/dist/pages/head.mjs +4 -4
  25. package/dist/pages/index.d.mts +6 -6
  26. package/dist/pages/index.mjs +6 -6
  27. package/dist/pages/islands-plugin.d.mts +3 -3
  28. package/dist/pages/islands-plugin.mjs +1 -1
  29. package/dist/pages/prefetch.d.mts +5 -5
  30. package/dist/pages/protocol.d.mts +2 -2
  31. package/dist/pages/protocol.mjs +2 -2
  32. package/dist/{prepare-BrfiJBju.mjs → prepare-CKzO06-Z.mjs} +3 -3
  33. package/dist/{protocol-COz1NHxc.d.mts → protocol-D7r_deVZ.d.mts} +5 -5
  34. package/dist/{route-types-DReF1gUY.mjs → route-types-Cnqj_8a7.mjs} +2 -2
  35. package/dist/runtime/ai.d.mts +33 -40
  36. package/dist/runtime/auth.d.mts +1 -1
  37. package/dist/runtime/better-auth-pg.d.mts +1 -1
  38. package/dist/runtime/better-auth.d.mts +1 -1
  39. package/dist/runtime/client.d.mts +2 -2
  40. package/dist/runtime/env-helpers.d.mts +1 -1
  41. package/dist/runtime/env-helpers.mjs +3 -3
  42. package/dist/runtime/env-public-client.d.mts +3 -3
  43. package/dist/runtime/env-public.d.mts +7 -7
  44. package/dist/runtime/fetch-stream.d.mts +1 -1
  45. package/dist/runtime/fetch.d.mts +1 -1
  46. package/dist/runtime/handler.d.mts +1 -1
  47. package/dist/runtime/handler.mjs +3 -3
  48. package/dist/runtime/isr.d.mts +2 -2
  49. package/dist/runtime/kv.d.mts +12 -12
  50. package/dist/runtime/live-server.d.mts +4 -4
  51. package/dist/runtime/live.d.mts +2 -2
  52. package/dist/runtime/migration-handler.d.mts +6 -6
  53. package/dist/runtime/seed.d.mts +4 -4
  54. package/dist/runtime/validator.d.mts +1 -1
  55. package/dist/runtime/ws-server.d.mts +8 -8
  56. package/dist/runtime/ws.d.mts +21 -21
  57. package/dist/{scan-vv5u7rHu.mjs → scan-B8iEm8xn.mjs} +5 -5
  58. package/dist/{scan-Ba4hFwlH.mjs → scan-CWfLxtOe.mjs} +8 -8
  59. package/dist/{standard-schema-BfGDWXff.d.mts → standard-schema-D2qvCEYV.d.mts} +14 -14
  60. package/dist/sveltekit.d.mts +3 -5
  61. package/dist/types-DG_Ynnyd.d.mts +42 -0
  62. package/package.json +2 -2
  63. package/dist/types-D6AuY5Bf.d.mts +0 -65
@@ -1,11 +1,11 @@
1
1
  //#region src/pages/prefetch.d.ts
2
- interface CacheForResult {
2
+ type CacheForResult = {
3
3
  stale: number;
4
4
  expires: number;
5
- }
5
+ };
6
6
  type CacheForInput = number | string | [string, string];
7
7
  declare function parseCacheFor(value: CacheForInput): CacheForResult;
8
- interface CacheEntry {
8
+ type CacheEntry = {
9
9
  url: string;
10
10
  method: string;
11
11
  response: Promise<unknown>;
@@ -13,9 +13,9 @@ interface CacheEntry {
13
13
  expiresAt: number;
14
14
  singleUse: boolean;
15
15
  timer: ReturnType<typeof setTimeout> | null;
16
- }
16
+ };
17
17
  declare class PrefetchCache {
18
- private entries;
18
+ private readonly entries;
19
19
  private key;
20
20
  has(url: string, method?: string): boolean;
21
21
  get(url: string, method?: string): CacheEntry | null;
@@ -1,3 +1,3 @@
1
- import { S as ValidationError } from "../handler-dKQWyF-G.mjs";
2
- import { a as handlePageMutation, i as handlePageGet, n as PageRenderResult, o as safeJsonStringify, r as flattenValidationErrors, t as PageObject } from "../protocol-COz1NHxc.mjs";
1
+ import { S as ValidationError } from "../handler-DJTuxB10.mjs";
2
+ import { a as handlePageMutation, i as handlePageGet, n as PageRenderResult, o as safeJsonStringify, r as flattenValidationErrors, t as PageObject } from "../protocol-D7r_deVZ.mjs";
3
3
  export { PageObject, PageRenderResult, ValidationError, flattenValidationErrors, handlePageGet, handlePageMutation, safeJsonStringify };
@@ -176,8 +176,8 @@ async function handlePageGet(handler, headFn, c, componentId, renderFn, getAsset
176
176
  if (handler) {
177
177
  const result = await handler(c);
178
178
  if (result instanceof Response && !isConvertedResponse(result)) {
179
- const ct = result.headers.get("content-type") || "";
180
- if (result.status >= 300 || !ct.includes("application/json")) return result;
179
+ const contentType = result.headers.get("content-type") || "";
180
+ if (result.status >= 300 || !contentType.includes("application/json")) return result;
181
181
  }
182
182
  props = await extractProps(result);
183
183
  }
@@ -2,10 +2,10 @@ import { a as join } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
2
2
  import { n as cliTitle } from "./output-BwlcIYSR.mjs";
3
3
  import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-CvHtTM0q.mjs";
4
4
  import { c as R, g as ge, u as Se, y as ye } from "./dist-Dayj3gCK.mjs";
5
- import { c as getDatabaseDialect, f as readConfig } from "./config-BIa9HwVX.mjs";
6
- import { t as scanRoutes } from "./scan-vv5u7rHu.mjs";
5
+ import { c as getDatabaseDialect, f as readConfig } from "./config-DqkeX_Fa.mjs";
6
+ import { t as scanRoutes } from "./scan-B8iEm8xn.mjs";
7
7
  import { i as inferProjectBindings, n as FRAMEWORK_SCAN_DIRS, r as detectFramework } from "./plugin-inference-CXUuq0aC.mjs";
8
- import { i as generateDbDts, n as generateQueueTypes, t as generateRouteTypes } from "./route-types-DReF1gUY.mjs";
8
+ import { i as generateDbDts, n as generateQueueTypes, t as generateRouteTypes } from "./route-types-Cnqj_8a7.mjs";
9
9
  import { n as ensureProjectTsconfig } from "./project-tsconfig-DfkESbDL.mjs";
10
10
  import { t as discoverSchema } from "./discover-B7FkXBLB.mjs";
11
11
  import { n as generateEnvTypes, t as findEnvFile } from "./env-types-DknSA4SO.mjs";
@@ -1,11 +1,11 @@
1
- import { n as HeadDescriptor, t as HeadConfig } from "./head-CZGAunBV.mjs";
2
- import { n as CloudContext, t as CloudBindings } from "./handler-dKQWyF-G.mjs";
3
- import { t as DevCssAsset } from "./types-D6AuY5Bf.mjs";
1
+ import { n as HeadDescriptor, t as HeadConfig } from "./head-C7QW7UY1.mjs";
2
+ import { n as CloudContext, t as CloudBindings } from "./handler-DJTuxB10.mjs";
3
+ import { t as DevCssAsset } from "./types-DG_Ynnyd.mjs";
4
4
 
5
5
  //#region src/pages/protocol.d.ts
6
6
  /** Escape characters that are unsafe inside inline <script> tags to prevent XSS. */
7
7
  declare function safeJsonStringify(value: unknown): string;
8
- interface PageObject {
8
+ type PageObject = {
9
9
  component: string;
10
10
  props: Record<string, unknown>;
11
11
  params: Record<string, string>;
@@ -15,7 +15,7 @@ interface PageObject {
15
15
  head?: HeadDescriptor;
16
16
  deferred?: Array<string>;
17
17
  deferredKeys?: Record<string, string>;
18
- }
18
+ };
19
19
  type PageRenderResult = string | ReadableStream<Uint8Array>;
20
20
  type PageHandler = ((c: CloudContext) => unknown | Promise<unknown>) | undefined;
21
21
  type PageHeadHandler = ((c: CloudContext, props: Record<string, unknown>) => HeadDescriptor | undefined) | undefined;
@@ -90,14 +90,14 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir) {
90
90
  const lines = [];
91
91
  lines.push("// Auto-generated by void — do not edit");
92
92
  lines.push("export {}");
93
- lines.push("interface StandardSchemaV1<Input = unknown, Output = Input> {");
93
+ lines.push("type StandardSchemaV1<Input = unknown, Output = Input> = {");
94
94
  lines.push(" readonly \"~standard\": {");
95
95
  lines.push(" readonly version: 1;");
96
96
  lines.push(" readonly vendor: string;");
97
97
  lines.push(" readonly validate: (value: unknown) => unknown;");
98
98
  lines.push(" readonly types?: { readonly input: Input; readonly output: Output } | undefined;");
99
99
  lines.push(" };");
100
- lines.push("}");
100
+ lines.push("};");
101
101
  lines.push("declare namespace StandardSchemaV1 {");
102
102
  lines.push(" type InferInput<Schema extends StandardSchemaV1> = NonNullable<");
103
103
  lines.push(" Schema[\"~standard\"][\"types\"]");
@@ -11,11 +11,11 @@ type ChatContent = string | Array<{
11
11
  detail?: "auto" | "low" | "high";
12
12
  };
13
13
  }>;
14
- interface ChatMessage {
14
+ type ChatMessage = {
15
15
  role: "system" | "user" | "assistant";
16
16
  content: ChatContent;
17
- }
18
- interface ChatCompletionInputs {
17
+ };
18
+ type ChatCompletionInputs = {
19
19
  messages: Array<ChatMessage>;
20
20
  temperature?: number;
21
21
  max_tokens?: number;
@@ -24,26 +24,26 @@ interface ChatCompletionInputs {
24
24
  presence_penalty?: number;
25
25
  stop?: string | Array<string>;
26
26
  stream?: boolean;
27
- }
28
- interface ChatCompletionResponse {
27
+ };
28
+ type ChatCompletionResponse = {
29
29
  id: string;
30
30
  object: string;
31
31
  created: number;
32
32
  model: string;
33
33
  choices: Array<ChatCompletionChoice>;
34
34
  usage: ChatCompletionUsage;
35
- }
36
- interface ChatCompletionChoice {
35
+ };
36
+ type ChatCompletionChoice = {
37
37
  index: number;
38
38
  message: ChatMessage;
39
39
  finish_reason: string;
40
- }
41
- interface ChatCompletionUsage {
40
+ };
41
+ type ChatCompletionUsage = {
42
42
  prompt_tokens: number;
43
43
  completion_tokens: number;
44
44
  total_tokens: number;
45
- }
46
- interface ChatCompletionChunk {
45
+ };
46
+ type ChatCompletionChunk = {
47
47
  id: string;
48
48
  choices: Array<{
49
49
  index: number;
@@ -53,14 +53,14 @@ interface ChatCompletionChunk {
53
53
  };
54
54
  finish_reason: string | null;
55
55
  }>;
56
- }
56
+ };
57
57
  type ImageGatewayEndpoint = "images/generations" | "images/edits";
58
58
  type ImageFileInput = Blob | ArrayBuffer | ArrayBufferView | {
59
59
  data: string;
60
60
  name?: string;
61
61
  type?: string;
62
62
  };
63
- interface ImageGenerationInputs {
63
+ type ImageGenerationInputs = {
64
64
  prompt: string;
65
65
  n?: number;
66
66
  size?: string;
@@ -68,27 +68,27 @@ interface ImageGenerationInputs {
68
68
  response_format?: "url" | "b64_json";
69
69
  user?: string;
70
70
  [key: string]: unknown;
71
- }
72
- interface ImageGenerationData {
71
+ };
72
+ type ImageGenerationData = {
73
73
  url?: string;
74
74
  b64_json?: string;
75
75
  revised_prompt?: string;
76
- }
77
- interface ImageGenerationResponse {
76
+ };
77
+ type ImageGenerationResponse = {
78
78
  created?: number;
79
79
  data: Array<ImageGenerationData>;
80
80
  usage?: unknown;
81
81
  [key: string]: unknown;
82
- }
83
- interface ImageGenerationOptions {
82
+ };
83
+ type ImageGenerationOptions = {
84
84
  endpoint?: "images/generations";
85
85
  [key: string]: unknown;
86
- }
87
- interface ImageEditOptions {
86
+ };
87
+ type ImageEditOptions = {
88
88
  endpoint: "images/edits";
89
89
  [key: string]: unknown;
90
- }
91
- interface ImageEditInputs {
90
+ };
91
+ type ImageEditInputs = {
92
92
  prompt: string;
93
93
  image: ImageFileInput | Array<ImageFileInput>;
94
94
  mask?: ImageFileInput;
@@ -97,31 +97,24 @@ interface ImageEditInputs {
97
97
  response_format?: "url" | "b64_json";
98
98
  user?: string;
99
99
  [key: string]: unknown;
100
- }
100
+ };
101
101
  //#endregion
102
102
  //#region src/runtime/ai.d.ts
103
103
  /**
104
- * Extended AI interface with a convenience `stream()` method.
104
+ * Extended AI type with a convenience `stream()` method.
105
105
  *
106
106
  * `stream()` calls `ai.run()` with `stream: true` and wraps the result
107
107
  * in a `Response` with SSE headers — ready to return from a route handler.
108
108
  */
109
- interface VoidAi extends Omit<Ai, "run"> {
110
- /** Workers AI inference (existing) */
111
- run<Name extends keyof AiModels>(model: Name, inputs: AiModels[Name]["inputs"], options?: AiOptions): Promise<AiModels[Name]["postProcessedOutputs"]>;
112
- /** Third-party chat completions (OpenAI, Anthropic, etc.) */
113
- run(model: ThirdPartyModel, inputs: ChatCompletionInputs, options?: AiOptions): Promise<ChatCompletionResponse>;
114
- /** Image generation. Returns the proxy response so callers can return or parse it. */
115
- image<Name extends keyof AiModels>(model: Name, inputs: AiModels[Name]["inputs"], options?: ImageGenerationOptions): Promise<Response>;
116
- /** Third-party image generation or editing through AI Gateway. */
117
- image(model: ThirdPartyModel, inputs: ImageEditInputs, options: ImageEditOptions): Promise<Response>;
118
- /** Third-party image generation through AI Gateway. */
119
- image(model: ThirdPartyModel, inputs: ImageGenerationInputs, options?: ImageGenerationOptions): Promise<Response>;
120
- /** Stream Workers AI response as SSE */
121
- stream<Name extends keyof AiModels>(model: Name, inputs: Omit<AiModels[Name]["inputs"], "stream">, options?: AiOptions): Promise<Response>;
122
- /** Stream third-party chat completions as SSE */
109
+ type VoidAi = Omit<Ai, "run"> & {
110
+ /** Workers AI inference (existing) */run<Name extends keyof AiModels>(model: Name, inputs: AiModels[Name]["inputs"], options?: AiOptions): Promise<AiModels[Name]["postProcessedOutputs"]>; /** Third-party chat completions (OpenAI, Anthropic, etc.) */
111
+ run(model: ThirdPartyModel, inputs: ChatCompletionInputs, options?: AiOptions): Promise<ChatCompletionResponse>; /** Image generation. Returns the proxy response so callers can return or parse it. */
112
+ image<Name extends keyof AiModels>(model: Name, inputs: AiModels[Name]["inputs"], options?: ImageGenerationOptions): Promise<Response>; /** Third-party image generation or editing through AI Gateway. */
113
+ image(model: ThirdPartyModel, inputs: ImageEditInputs, options: ImageEditOptions): Promise<Response>; /** Third-party image generation through AI Gateway. */
114
+ image(model: ThirdPartyModel, inputs: ImageGenerationInputs, options?: ImageGenerationOptions): Promise<Response>; /** Stream Workers AI response as SSE */
115
+ stream<Name extends keyof AiModels>(model: Name, inputs: Omit<AiModels[Name]["inputs"], "stream">, options?: AiOptions): Promise<Response>; /** Stream third-party chat completions as SSE */
123
116
  stream(model: ThirdPartyModel, inputs: Omit<ChatCompletionInputs, "stream">, options?: AiOptions): Promise<Response>;
124
- }
117
+ };
125
118
  declare const ai: VoidAi;
126
119
  //#endregion
127
120
  export { type ChatCompletionChoice, type ChatCompletionChunk, type ChatCompletionInputs, type ChatCompletionResponse, type ChatCompletionUsage, type ChatContent, type ChatMessage, type ImageEditInputs, type ImageEditOptions, type ImageFileInput, type ImageGatewayEndpoint, type ImageGenerationData, type ImageGenerationInputs, type ImageGenerationOptions, type ImageGenerationResponse, type ThirdPartyModel, type ThirdPartyProvider, VoidAi, ai };
@@ -1,2 +1,2 @@
1
- import { a as VoidAuthConfigContext, c as getSession, i as VoidAuthConfig, l as getUser, n as AuthState, o as authContext, r as AuthUser, s as defineAuth, t as AuthSession, u as requireAuth } from "../auth-DrfOTMmr.mjs";
1
+ import { a as VoidAuthConfigContext, c as getSession, i as VoidAuthConfig, l as getUser, n as AuthState, o as authContext, r as AuthUser, s as defineAuth, t as AuthSession, u as requireAuth } from "../auth-DmuALf16.mjs";
2
2
  export { AuthSession, AuthState, AuthUser, VoidAuthConfig, VoidAuthConfigContext, authContext, defineAuth, getSession, getUser, requireAuth };
@@ -1,4 +1,4 @@
1
- import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv, r as VoidAuthRuntimeApi, t as VoidAuthDialect } from "../better-auth-shared-CZsIpjey.mjs";
1
+ import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv, r as VoidAuthRuntimeApi, t as VoidAuthDialect } from "../better-auth-shared-HXlHRw02.mjs";
2
2
 
3
3
  //#region src/runtime/better-auth-pg.d.ts
4
4
  declare const resolveVoidAuthOptions: VoidAuthRuntimeApi["resolveVoidAuthOptions"];
@@ -1,4 +1,4 @@
1
- import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv, r as VoidAuthRuntimeApi, t as VoidAuthDialect } from "../better-auth-shared-CZsIpjey.mjs";
1
+ import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv, r as VoidAuthRuntimeApi, t as VoidAuthDialect } from "../better-auth-shared-HXlHRw02.mjs";
2
2
 
3
3
  //#region src/runtime/better-auth.d.ts
4
4
  declare const resolveVoidAuthOptions: VoidAuthRuntimeApi["resolveVoidAuthOptions"];
@@ -1,6 +1,6 @@
1
- import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-DrfOTMmr.mjs";
1
+ import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-DmuALf16.mjs";
2
2
  import { auth, createAuthClient } from "./auth-client.mjs";
3
- import { t as FetchError } from "../fetch-error-DflegrF3.mjs";
3
+ import { t as FetchError } from "../fetch-error-DZ868Xq4.mjs";
4
4
  import { fetch } from "./fetch.mjs";
5
5
  import { fetchStream } from "./fetch-stream.mjs";
6
6
  export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,2 +1,2 @@
1
- import { a as getSecretOverride, c as oneOf, i as email, l as string, n as SECRET_OVERRIDE_SYMBOL, o as json, r as boolean, s as number, t as EnvSchema, u as url } from "../env-helpers-CbeM_7-k.mjs";
1
+ import { a as getSecretOverride, c as oneOf, i as email, l as string, n as SECRET_OVERRIDE_SYMBOL, o as json, r as boolean, s as number, t as EnvSchema, u as url } from "../env-helpers-Dw95CU8e.mjs";
2
2
  export { EnvSchema, SECRET_OVERRIDE_SYMBOL, boolean, email, getSecretOverride, json, number, oneOf, string, url };
@@ -94,12 +94,12 @@ function number() {
94
94
  /** Boolean env value. Accepts "true"/"false"/"1"/"0" (case-insensitive). */
95
95
  function boolean() {
96
96
  return build((raw) => {
97
- const lc = raw.toLowerCase();
98
- if (lc === "true" || lc === "1") return {
97
+ const lowercased = raw.toLowerCase();
98
+ if (lowercased === "true" || lowercased === "1") return {
99
99
  ok: true,
100
100
  value: true
101
101
  };
102
- if (lc === "false" || lc === "0") return {
102
+ if (lowercased === "false" || lowercased === "0") return {
103
103
  ok: true,
104
104
  value: false
105
105
  };
@@ -1,4 +1,4 @@
1
- import { c as oneOf, i as email, l as string, o as json, r as boolean, s as number, t as EnvSchema, u as url } from "../env-helpers-CbeM_7-k.mjs";
1
+ import { c as oneOf, i as email, l as string, o as json, r as boolean, s as number, t as EnvSchema, u as url } from "../env-helpers-Dw95CU8e.mjs";
2
2
 
3
3
  //#region src/runtime/env-public-client.d.ts
4
4
  declare const env: Record<string, unknown>;
@@ -11,10 +11,10 @@ declare const env: Record<string, unknown>;
11
11
  declare function defineEnv<S>(_schema: S): typeof env;
12
12
  declare class EnvValidationError extends Error {
13
13
  readonly key: string;
14
- readonly issues: ReadonlyArray<{
14
+ readonly issues: Array<{
15
15
  message: string;
16
16
  }>;
17
- constructor(key: string, issues: ReadonlyArray<{
17
+ constructor(key: string, issues: Array<{
18
18
  message: string;
19
19
  }>);
20
20
  }
@@ -1,10 +1,10 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
- import { t as StandardSchemaV1 } from "../standard-schema-BfGDWXff.mjs";
3
- import { c as oneOf, i as email, l as string, o as json, r as boolean, s as number, t as EnvSchema, u as url } from "../env-helpers-CbeM_7-k.mjs";
2
+ import { t as StandardSchemaV1 } from "../standard-schema-D2qvCEYV.mjs";
3
+ import { c as oneOf, i as email, l as string, o as json, r as boolean, s as number, t as EnvSchema, u as url } from "../env-helpers-Dw95CU8e.mjs";
4
4
  import * as _$_cloudflare_sandbox0 from "@cloudflare/sandbox";
5
5
 
6
6
  //#region src/runtime/env-public.d.ts
7
- interface AnyValidator extends StandardSchemaV1<unknown, unknown> {}
7
+ type AnyValidator = StandardSchemaV1<unknown, unknown>;
8
8
  type AnySchema = Record<string, AnyValidator>;
9
9
  /**
10
10
  * Type-only stub for the validated env shape. Augmented by the generated
@@ -74,8 +74,8 @@ declare function _hasRegisteredSchema(): boolean;
74
74
  declare function _getSchemaDefaults(): Record<string, string>;
75
75
  declare class EnvValidationError extends Error {
76
76
  readonly key: string;
77
- readonly issues: ReadonlyArray<StandardSchemaV1.Issue>;
78
- constructor(key: string, issues: ReadonlyArray<StandardSchemaV1.Issue>);
77
+ readonly issues: Array<StandardSchemaV1.Issue>;
78
+ constructor(key: string, issues: Array<StandardSchemaV1.Issue>);
79
79
  }
80
80
  /**
81
81
  * Typed env proxy. Reads from the runtime env, validating declared keys
@@ -90,7 +90,7 @@ declare class EnvValidationError extends Error {
90
90
  */
91
91
  declare const env: ValidatedEnv;
92
92
  /** Aggregate report from validating an entire env object against the schema. */
93
- interface EnvValidationReport {
93
+ type EnvValidationReport = {
94
94
  valid: boolean;
95
95
  missing: Array<string>;
96
96
  invalid: Array<{
@@ -103,7 +103,7 @@ interface EnvValidationReport {
103
103
  * cache.
104
104
  */
105
105
  values: Map<string, unknown>;
106
- }
106
+ };
107
107
  /**
108
108
  * Validate an env record (e.g. merged `.env*` + remote secret list) against
109
109
  * the registered schema. Used by the dev plugin (warnings), the deploy CLI
@@ -1,4 +1,4 @@
1
- import { t as FetchError } from "../fetch-error-DflegrF3.mjs";
1
+ import { t as FetchError } from "../fetch-error-DZ868Xq4.mjs";
2
2
  import { RouteMap } from "void/routes";
3
3
 
4
4
  //#region src/runtime/fetch-stream.d.ts
@@ -1,4 +1,4 @@
1
- import { t as FetchError } from "../fetch-error-DflegrF3.mjs";
1
+ import { t as FetchError } from "../fetch-error-DZ868Xq4.mjs";
2
2
  import { RouteMap } from "void/routes";
3
3
 
4
4
  //#region src/runtime/fetch.d.ts
@@ -1,3 +1,3 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
- import { C as HandlerInput, S as ValidationError, _ 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, t as CloudBindings, u as TypedQueueHandler, v as Deferred, w as ValidatorSlots, x as defer } from "../handler-dKQWyF-G.mjs";
2
+ import { C as HandlerInput, S as ValidationError, _ 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, t as CloudBindings, u as TypedQueueHandler, v as Deferred, w as ValidatorSlots, x as defer } from "../handler-DJTuxB10.mjs";
3
3
  export { CloudBindings, CloudContext, CloudContextVariables, CloudEnv, Deferred, HandlerInput, InferProps, QueueBatch, QueueMessage, QueueRetryOptions, RenderAssetTags, TypedHandler, TypedQueueHandler, ValidationError, ValidatorSlots, VoidAssetRewriteError, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
@@ -25,9 +25,9 @@ function defineHandler(...args) {
25
25
  let index = 0;
26
26
  const dispatch = async () => {
27
27
  if (index < middlewares.length) {
28
- const mw = middlewares[index++];
29
- const res = await mw(c, dispatch);
30
- if (res instanceof Response) c.res = res;
28
+ const middleware = middlewares[index++];
29
+ const middlewareResponse = await middleware(c, dispatch);
30
+ if (middlewareResponse instanceof Response) c.res = middlewareResponse;
31
31
  } else c.res = convertReturnValue(await handler(c));
32
32
  };
33
33
  await dispatch();
@@ -1,8 +1,8 @@
1
1
  //#region src/runtime/isr.d.ts
2
- interface RevalidateOptions {
2
+ type RevalidateOptions = {
3
3
  paths?: Array<string>;
4
4
  all?: boolean;
5
- }
5
+ };
6
6
  /**
7
7
  * Revalidate ISR-cached pages on demand.
8
8
  *
@@ -1,25 +1,25 @@
1
1
  //#region src/runtime/kv.d.ts
2
- interface PutOptions {
2
+ type PutOptions = {
3
3
  ttl?: number;
4
4
  expiration?: number;
5
5
  metadata?: Record<string, unknown>;
6
- }
7
- interface ListOptions {
6
+ };
7
+ type ListOptions = {
8
8
  prefix?: string;
9
9
  limit?: number;
10
10
  cursor?: string;
11
- }
12
- interface ListKey<M = unknown> {
11
+ };
12
+ type ListKey<M = unknown> = {
13
13
  name: string;
14
14
  expiration?: number;
15
15
  metadata?: M;
16
- }
17
- interface ListResult<M = unknown> {
16
+ };
17
+ type ListResult<M = unknown> = {
18
18
  keys: Array<ListKey<M>>;
19
19
  list_complete: boolean;
20
20
  cursor?: string;
21
- }
22
- interface KVMap<T> {
21
+ };
22
+ type KVMap<T> = {
23
23
  get(key: string): Promise<T | null>;
24
24
  put(key: string, value: T, options?: PutOptions): Promise<void>;
25
25
  delete(key: string): Promise<void>;
@@ -28,8 +28,8 @@ interface KVMap<T> {
28
28
  value: T | null;
29
29
  metadata: M | null;
30
30
  }>;
31
- }
32
- interface KVClient {
31
+ };
32
+ type KVClient = {
33
33
  get<T = string>(key: string): Promise<T | null>;
34
34
  put(key: string, value: unknown, options?: PutOptions): Promise<void>;
35
35
  delete(key: string): Promise<void>;
@@ -39,7 +39,7 @@ interface KVClient {
39
39
  metadata: M | null;
40
40
  }>;
41
41
  map<T = unknown>(prefix: string): KVMap<T>;
42
- }
42
+ };
43
43
  /** Create a KV client for a specific KVNamespace instance. */
44
44
  declare function createKV(namespace: KVNamespace): KVClient;
45
45
  /** Default KV client — resolves `KV` from the active runtime environment. */
@@ -1,13 +1,13 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
2
  //#region src/runtime/live-server.d.ts
3
3
  type LiveDurableObjectEnv = Record<string, unknown>;
4
- interface LiveDurableObjectInstance {
4
+ type LiveDurableObjectInstance = {
5
5
  fetch(request: Request): Promise<Response>;
6
6
  alarm?(): Promise<void>;
7
- }
8
- interface LiveDurableObjectClass {
7
+ };
8
+ type LiveDurableObjectClass = {
9
9
  new (state: DurableObjectState, env: LiveDurableObjectEnv): LiveDurableObjectInstance;
10
- }
10
+ };
11
11
  declare function createLiveDurableObject(): LiveDurableObjectClass;
12
12
  //#endregion
13
13
  export { LiveDurableObjectClass, LiveDurableObjectInstance, createLiveDurableObject };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
- import { r as AuthUser } from "../auth-DrfOTMmr.mjs";
3
- import { i as CloudEnv, n as CloudContext } from "../handler-dKQWyF-G.mjs";
2
+ import { r as AuthUser } from "../auth-DmuALf16.mjs";
3
+ import { i as CloudEnv, n as CloudContext } from "../handler-DJTuxB10.mjs";
4
4
 
5
5
  //#region src/runtime/live.d.ts
6
6
  type MaybePromise<T> = T | Promise<T>;
@@ -1,19 +1,19 @@
1
1
  //#region src/runtime/migration-handler.d.ts
2
- interface MigrationEntry {
2
+ type MigrationEntry = {
3
3
  name: string;
4
4
  sql: string;
5
- }
6
- interface MigrationResult {
5
+ };
6
+ type MigrationResult = {
7
7
  name: string;
8
8
  applied: boolean;
9
9
  durationMs: number;
10
10
  error?: string;
11
- }
12
- interface MigrationResponse {
11
+ };
12
+ type MigrationResponse = {
13
13
  ok: boolean;
14
14
  migrations: Array<MigrationResult>;
15
15
  error?: string;
16
- }
16
+ };
17
17
  declare function createMigrationHandler(env: Record<string, unknown>, migrations: Array<MigrationEntry> | undefined, _dialect: "sqlite" | "postgresql", runAuthMigrations?: () => Promise<void>): (request: Request) => Promise<Response>;
18
18
  //#endregion
19
19
  export { MigrationEntry, MigrationResponse, MigrationResult, createMigrationHandler };
@@ -2,16 +2,16 @@ import { NodePgDatabase } from "drizzle-orm/node-postgres";
2
2
  import { BetterSQLite3Database } from "drizzle-orm/better-sqlite3";
3
3
 
4
4
  //#region src/runtime/seed.d.ts
5
- interface SqliteSeedContext<TSchema extends Record<string, unknown> = Record<string, never>> {
5
+ type SqliteSeedContext<TSchema extends Record<string, unknown> = Record<string, never>> = {
6
6
  dialect: "sqlite";
7
7
  db: BetterSQLite3Database<TSchema>;
8
8
  schema: TSchema;
9
- }
10
- interface PostgresSeedContext<TSchema extends Record<string, unknown> = Record<string, never>> {
9
+ };
10
+ type PostgresSeedContext<TSchema extends Record<string, unknown> = Record<string, never>> = {
11
11
  dialect: "postgresql";
12
12
  db: NodePgDatabase<TSchema>;
13
13
  schema: TSchema;
14
- }
14
+ };
15
15
  type DrizzleTableForDialect<TDialect extends string> = {
16
16
  readonly _: {
17
17
  readonly config: {
@@ -1,2 +1,2 @@
1
- import { C as HandlerInput, T as runValidation, w as ValidatorSlots } from "../handler-dKQWyF-G.mjs";
1
+ import { C as HandlerInput, T as runValidation, w as ValidatorSlots } from "../handler-DJTuxB10.mjs";
2
2
  export { HandlerInput, ValidatorSlots, runValidation };
@@ -1,22 +1,22 @@
1
- import { n as AuthState } from "../auth-DrfOTMmr.mjs";
2
- import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv } from "../better-auth-shared-CZsIpjey.mjs";
1
+ import { n as AuthState } from "../auth-DmuALf16.mjs";
2
+ import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv } from "../better-auth-shared-HXlHRw02.mjs";
3
3
  import { AnyWebSocketDefinition } from "./ws.mjs";
4
4
 
5
5
  //#region src/runtime/ws-server.d.ts
6
- interface WebSocketRouteMeta {
6
+ type WebSocketRouteMeta = {
7
7
  pattern: string;
8
8
  params: Array<string>;
9
9
  className: string;
10
10
  bindingName: string;
11
- }
12
- interface WebSocketDurableObjectInstance {
11
+ };
12
+ type WebSocketDurableObjectInstance = {
13
13
  fetch(request: Request): Promise<Response>;
14
14
  webSocketMessage(webSocket: WebSocket, message: string | ArrayBuffer | ArrayBufferView): Promise<void>;
15
15
  webSocketClose(webSocket: WebSocket, code: number, reason: string, wasClean: boolean): Promise<void>;
16
- }
17
- interface WebSocketDurableObjectClass {
16
+ };
17
+ type WebSocketDurableObjectClass = {
18
18
  new (state: DurableObjectState, env: Record<string, unknown>): WebSocketDurableObjectInstance;
19
- }
19
+ };
20
20
  type ResolveVoidAuthState = (request: Request, env: VoidAuthEnv, runtime: VoidAuthRuntimeOptions) => Promise<AuthState | null>;
21
21
  declare function buildWebSocketInstanceId(route: Pick<WebSocketRouteMeta, "params">, params: Record<string, string>): string;
22
22
  declare function createWebSocketDurableObject(definition: AnyWebSocketDefinition, route: WebSocketRouteMeta, authRuntime?: VoidAuthRuntimeOptions, resolveAuthState?: ResolveVoidAuthState): WebSocketDurableObjectClass;