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,24 +1,24 @@
1
- import { n as HeadDescriptor } from "./head-CZGAunBV.mjs";
2
- import { r as AuthUser, t as AuthSession } from "./auth-DrfOTMmr.mjs";
3
- import { t as StandardSchemaV1 } from "./standard-schema-BfGDWXff.mjs";
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
- interface ValidatorSlots {
9
+ type ValidatorSlots = {
10
10
  body?: StandardSchemaV1;
11
11
  query?: StandardSchemaV1;
12
12
  params?: StandardSchemaV1;
13
- }
14
- interface ValidationSuccess<V extends ValidatorSlots> {
13
+ };
14
+ type ValidationSuccess<V extends ValidatorSlots> = {
15
15
  ok: true;
16
16
  input: HandlerInput<V>;
17
- }
18
- interface ValidationFailure {
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
- interface CloudEnv extends Env {
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
- interface RenderAssetTags {
167
- /** CSS stylesheet links for `<head>`. */
168
- css: string;
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
- interface TypedQueueHandler<T = unknown> {
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
- interface TypedHandler<V extends ValidatorSlots = {}, R = unknown> {
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(m1: MiddlewareFn, handler: HandlerFn): TypedHandler;
225
- declare function defineHandler(m1: MiddlewareFn, m2: MiddlewareFn, handler: HandlerFn): TypedHandler;
226
- declare function defineHandler(m1: MiddlewareFn, m2: MiddlewareFn, m3: MiddlewareFn, handler: HandlerFn): TypedHandler;
227
- declare function defineHandler(m1: MiddlewareFn, m2: MiddlewareFn, m3: MiddlewareFn, m4: MiddlewareFn, handler: HandlerFn): TypedHandler;
228
- declare function defineHandler(m1: MiddlewareFn, m2: MiddlewareFn, m3: MiddlewareFn, m4: MiddlewareFn, m5: MiddlewareFn, handler: HandlerFn): TypedHandler;
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
- interface HeadDescriptor {
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
- interface HeadConfig extends HeadDescriptor {
26
- /** Title template — `%s` is replaced with the page title. */
27
- titleTemplate?: string;
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-BIa9HwVX.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-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-CZGAunBV.mjs";
2
- import { r as AuthUser } from "./auth-DrfOTMmr.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-dKQWyF-G.mjs";
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";
package/dist/index.mjs CHANGED
@@ -4,20 +4,20 @@ import { u as require_picocolors } from "./output-BwlcIYSR.mjs";
4
4
  import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-CvHtTM0q.mjs";
5
5
  import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
6
6
  import { c as getToken, u as isStagingMode } from "./client-DCqnMpDt.mjs";
7
- import { C as isSandboxEnabled, S as SANDBOX_MIGRATION_TAG, _ as normalizeWranglerCompatibilityFlags, a as prerenderPagesNode, b as resolveLiveBindingConfig, c as filterLoadedEnv, d as LIVE_MIGRATION_TAG, f as ensureWranglerCompat, g as nextDurableObjectMigrationTag, h as hasDurableObjectSqliteMigration, i as prerenderPages, l as resolveRemoteMode, m as ensureWranglerNodejsAlsFlag, n as resolveDistDir, o as DEFAULT_PROXY_URL, p as ensureWranglerCompatibilityDate, r as resolveWorkerDirName, s as STAGING_PROXY_URL, u as stripInternalEnvKeys, v as readExistingLiveBindingConfig, w as resolveSandboxConfig, x as syncWranglerBindings, y as readWranglerCompat } from "./deploy-B5rTuzXw.mjs";
8
- import { c as getDatabaseDialect, f as readConfig, l as isNodeTarget, p as resolveBindingNames } from "./config-BIa9HwVX.mjs";
9
- import { i as scanJobsSync, n as scanWebSocketRoutesSync, r as scanQueuesSync, t as scanRoutes } from "./scan-vv5u7rHu.mjs";
7
+ import { C as isSandboxEnabled, S as SANDBOX_MIGRATION_TAG, _ as normalizeWranglerCompatibilityFlags, a as prerenderPagesNode, b as resolveLiveBindingConfig, c as filterLoadedEnv, d as LIVE_MIGRATION_TAG, f as ensureWranglerCompat, g as nextDurableObjectMigrationTag, h as hasDurableObjectSqliteMigration, i as prerenderPages, l as resolveRemoteMode, m as ensureWranglerNodejsAlsFlag, n as resolveDistDir, o as DEFAULT_PROXY_URL, p as ensureWranglerCompatibilityDate, r as resolveWorkerDirName, s as STAGING_PROXY_URL, u as stripInternalEnvKeys, v as readExistingLiveBindingConfig, w as resolveSandboxConfig, x as syncWranglerBindings, y as readWranglerCompat } from "./deploy-D3t53kng.mjs";
8
+ import { c as getDatabaseDialect, f as readConfig, l as isNodeTarget, p as resolveBindingNames } from "./config-DqkeX_Fa.mjs";
9
+ import { i as scanJobsSync, n as scanWebSocketRoutesSync, r as scanQueuesSync, t as scanRoutes } from "./scan-B8iEm8xn.mjs";
10
10
  import { a as SSR_CLIENT_ENTRY_RELATIVE_PATHS, c as validateSsrEntries, f as isIdentifier, g as walk, i as inferProjectBindings, l as validateSsrEntry, m as isMemberExpression, n as FRAMEWORK_SCAN_DIRS, o as SSR_SERVER_ENTRY_RELATIVE_PATHS, p as isLiteral, r as detectFramework, t as DEFAULT_SCAN_DIRS, u as inferBindingsFromSource } from "./plugin-inference-CXUuq0aC.mjs";
11
11
  import { i as voidWarn, n as voidError, r as voidLog, t as setShowTimestamp } from "./log-DXdqnmhF.mjs";
12
- import { r as parseDotenvFile } from "./dotenv-DwO4ti0Z.mjs";
13
- import { i as generateDbDts, n as generateQueueTypes, r as DRIZZLE_OPERATORS, t as generateRouteTypes } from "./route-types-DReF1gUY.mjs";
12
+ import { r as parseDotenvFile } from "./dotenv-zdFCCgFU.mjs";
13
+ import { i as generateDbDts, n as generateQueueTypes, r as DRIZZLE_OPERATORS, t as generateRouteTypes } from "./route-types-Cnqj_8a7.mjs";
14
14
  import { n as ensureProjectTsconfig } from "./project-tsconfig-DfkESbDL.mjs";
15
15
  import { t as discoverSchema } from "./discover-B7FkXBLB.mjs";
16
16
  import { t as MagicString } from "./magic-string.es-D6g9UnIy.mjs";
17
17
  import { n as generateEnvTypes, t as findEnvFile } from "./env-types-DknSA4SO.mjs";
18
- import { a as loadUserEnvFile } from "./env-validation-DJKjR_8q.mjs";
19
- import { i as resolveLayoutIds } from "./scan-Ba4hFwlH.mjs";
20
- import { n as lintDuplicateSources, r as mergeRoutingRules, t as lintDestinationSplats } from "./headers-YVkHjOyq.mjs";
18
+ import { a as loadUserEnvFile } from "./env-validation-Bc_aiBUm.mjs";
19
+ import { i as resolveLayoutIds } from "./scan-CWfLxtOe.mjs";
20
+ import { n as lintDuplicateSources, r as mergeRoutingRules, t as lintDestinationSplats } from "./headers-C7Yf6_CN.mjs";
21
21
  import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-C-NRqGhx.mjs";
22
22
  import { t as INTERNAL_BINDING_PREFIXES } from "./env-raw-DtfQ9E31.mjs";
23
23
  import { n as defer } from "./defer-2ARBu8Et.mjs";
@@ -794,17 +794,17 @@ function buildOffsetIndex(code) {
794
794
  return { lineStarts };
795
795
  }
796
796
  function offsetToLineCol(index, offset) {
797
- const arr = index.lineStarts;
798
- let lo = 0;
799
- let hi = arr.length - 1;
800
- while (lo < hi) {
801
- const mid = lo + hi + 1 >>> 1;
802
- if (arr[mid] <= offset) lo = mid;
803
- else hi = mid - 1;
797
+ const lineStarts = index.lineStarts;
798
+ let lowerBound = 0;
799
+ let upperBound = lineStarts.length - 1;
800
+ while (lowerBound < upperBound) {
801
+ const midpoint = lowerBound + upperBound + 1 >>> 1;
802
+ if (lineStarts[midpoint] <= offset) lowerBound = midpoint;
803
+ else upperBound = midpoint - 1;
804
804
  }
805
805
  return {
806
- line: lo + 1,
807
- column: offset - arr[lo] + 1
806
+ line: lowerBound + 1,
807
+ column: offset - lineStarts[lowerBound] + 1
808
808
  };
809
809
  }
810
810
  /**
@@ -1097,10 +1097,10 @@ function frameworkTriggersPlugin(root, options) {
1097
1097
  };
1098
1098
  }
1099
1099
  function generateModule(root, jobs, queues, devTriggerToken) {
1100
- const jobImports = jobs.map((j, i) => `import __job${i} from ${JSON.stringify(join(root, "crons", j.filePath))};`).join("\n");
1101
- const queueImports = queues.map((q, i) => `import __queue${i} from ${JSON.stringify(join(root, "queues", q.filePath))};`).join("\n");
1102
- const jobTable = jobs.map((j, i) => ` { crons: ${JSON.stringify(j.crons)}, handler: __job${i} }`).join(",\n");
1103
- const queueTable = queues.map((q, i) => ` { name: ${JSON.stringify(q.name)}, handler: __queue${i} }`).join(",\n");
1100
+ const jobImports = jobs.map((job, jobIndex) => `import __job${jobIndex} from ${JSON.stringify(join(root, "crons", job.filePath))};`).join("\n");
1101
+ const queueImports = queues.map((queue, queueIndex) => `import __queue${queueIndex} from ${JSON.stringify(join(root, "queues", queue.filePath))};`).join("\n");
1102
+ const jobTable = jobs.map((job, jobIndex) => ` { crons: ${JSON.stringify(job.crons)}, handler: __job${jobIndex} }`).join(",\n");
1103
+ const queueTable = queues.map((queue, queueIndex) => ` { name: ${JSON.stringify(queue.name)}, handler: __queue${queueIndex} }`).join(",\n");
1104
1104
  return `// @ts-nocheck — Auto-generated by Void in dev. Do NOT edit. Regenerated on every config load.
1105
1105
  ${jobImports}
1106
1106
  ${queueImports}
@@ -1357,11 +1357,11 @@ export default defineEventHandler(async (event) => {
1357
1357
  */
1358
1358
  function analogDevTriggerInjectPlugin(root) {
1359
1359
  const routeDir = join(root, ANALOG_ROUTE_DIR_RELATIVE);
1360
- const routePaths = ANALOG_TRIGGERS.map((t) => ({
1361
- ...t,
1362
- path: join(routeDir, `${t.file}.ts`)
1360
+ const routePaths = ANALOG_TRIGGERS.map((trigger) => ({
1361
+ ...trigger,
1362
+ path: join(routeDir, `${trigger.file}.ts`)
1363
1363
  }));
1364
- const gitignoreLines = ANALOG_TRIGGERS.map((t) => `${ANALOG_ROUTE_DIR_RELATIVE}/${t.file}.ts`);
1364
+ const gitignoreLines = ANALOG_TRIGGERS.map((trigger) => `${ANALOG_ROUTE_DIR_RELATIVE}/${trigger.file}.ts`);
1365
1365
  const dispatchPath = frameworkTriggersDispatchPath(root);
1366
1366
  const ensureFiles = () => {
1367
1367
  mkdirSync(routeDir, { recursive: true });
@@ -1392,7 +1392,7 @@ function analogDevTriggerInjectPlugin(root) {
1392
1392
  return;
1393
1393
  }
1394
1394
  const path = req.url ?? "";
1395
- const match = ANALOG_TRIGGERS.find((t) => path === `/__void/${t.user}`);
1395
+ const match = ANALOG_TRIGGERS.find((trigger) => path === `/__void/${trigger.user}`);
1396
1396
  if (!match) {
1397
1397
  next();
1398
1398
  return;
@@ -1402,8 +1402,8 @@ function analogDevTriggerInjectPlugin(root) {
1402
1402
  for await (const chunk of req) chunks.push(chunk);
1403
1403
  const body = Buffer.concat(chunks);
1404
1404
  const headers = new Headers();
1405
- for (const [k, v] of Object.entries(req.headers)) if (typeof v === "string") headers.set(k, v);
1406
- else if (Array.isArray(v)) headers.set(k, v.join(", "));
1405
+ for (const [key, value] of Object.entries(req.headers)) if (typeof value === "string") headers.set(key, value);
1406
+ else if (Array.isArray(value)) headers.set(key, value.join(", "));
1407
1407
  const host = req.headers.host ?? "localhost";
1408
1408
  const upstream = await fetch(`http://${host}/api/__void/${match.file}`, {
1409
1409
  method: "POST",
@@ -1411,7 +1411,7 @@ function analogDevTriggerInjectPlugin(root) {
1411
1411
  body
1412
1412
  });
1413
1413
  res.statusCode = upstream.status;
1414
- upstream.headers.forEach((v, k) => res.setHeader(k, v));
1414
+ upstream.headers.forEach((value, key) => res.setHeader(key, value));
1415
1415
  res.end(Buffer.from(await upstream.arrayBuffer()));
1416
1416
  } catch (err) {
1417
1417
  next(err);
@@ -1568,7 +1568,7 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
1568
1568
  if (applied.length > 0) voidLog(`Applied ${applied.length} migration(s): ${applied.join(", ")}`);
1569
1569
  }
1570
1570
  if (auth?.enabled) {
1571
- const { runLocalVoidAuthMigrations } = await import("./node-DFqMcZR1.mjs");
1571
+ const { runLocalVoidAuthMigrations } = await import("./node-DHVCtkgt.mjs");
1572
1572
  await runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId, auth.configPath);
1573
1573
  voidLog("Applied Better Auth migrations");
1574
1574
  }
@@ -4498,6 +4498,15 @@ const SANDBOX_SDK_IMPORT = "@cloudflare/sandbox";
4498
4498
  const SANDBOX_SDK_IMPORT_FILTER = /^@cloudflare\/sandbox$/;
4499
4499
  const DEFAULT_WORKER_ENVIRONMENT_NAME = "void_worker";
4500
4500
  const DEFAULT_WORKER_OUT_DIR = "dist/ssr";
4501
+ const DEV_ASSET_ROUTING_EXCLUSIONS = [
4502
+ "!/@vite/*",
4503
+ "!/@id/*",
4504
+ "!/@fs/*",
4505
+ "!/@react-refresh",
4506
+ "!/@svelte/*",
4507
+ "!/node_modules/*",
4508
+ "!/__uno.css"
4509
+ ];
4501
4510
  function resolveSandboxSdkEntry() {
4502
4511
  return fileURLToPath(import.meta.resolve(SANDBOX_SDK_IMPORT));
4503
4512
  }
@@ -4920,7 +4929,7 @@ function voidPlugin(options) {
4920
4929
  ...env
4921
4930
  };
4922
4931
  const assets = workerConfig.assets;
4923
- if (command === "serve" && assets) delete assets.run_worker_first;
4932
+ if (command === "serve" && assets?.run_worker_first) assets.run_worker_first = [...DEV_ASSET_ROUTING_EXCLUSIONS, "/**"];
4924
4933
  const watchConfig = { server: { watch: { ignored } } };
4925
4934
  if (!isNodeTarget(config.target) && config.output !== "static") {
4926
4935
  const envNames = framework === "vinext-app" ? ["rsc", "ssr"] : ["ssr"];
@@ -3,9 +3,9 @@ import { n as cliTitle } from "./output-BwlcIYSR.mjs";
3
3
  import { _ as me, c as R, g as ge, i as Ee, u as Se, v as ue, x as q, y as ye } from "./dist-Dayj3gCK.mjs";
4
4
  import { a as writeProjectConfig, r as readProjectConfig } from "./project-TqORyHn8.mjs";
5
5
  import { c as getToken, n as PlatformClient, u as isStagingMode } from "./client-DCqnMpDt.mjs";
6
- import { c as getDatabaseDialect, f as readConfig } from "./config-BIa9HwVX.mjs";
6
+ import { c as getDatabaseDialect, f as readConfig } from "./config-DqkeX_Fa.mjs";
7
7
  import { r as detectFramework } from "./plugin-inference-CXUuq0aC.mjs";
8
- import { r as parseDotenvFile, t as expandDotenv } from "./dotenv-DwO4ti0Z.mjs";
8
+ import { r as parseDotenvFile, t as expandDotenv } from "./dotenv-zdFCCgFU.mjs";
9
9
  import { n as ensureProjectTsconfig, t as createProjectTsconfig } from "./project-tsconfig-DfkESbDL.mjs";
10
10
  import { t as MagicString } from "./magic-string.es-D6g9UnIy.mjs";
11
11
  import { n as writeDrizzleConfig } from "./config-BzM9Dy7T.mjs";
@@ -1,6 +1,6 @@
1
1
  import { a as join } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
2
2
  import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-CvHtTM0q.mjs";
3
- import { f as readConfig } from "./config-BIa9HwVX.mjs";
3
+ import { f as readConfig } from "./config-DqkeX_Fa.mjs";
4
4
  import { r as resolveVoidAuthMigrationSchema } from "./drizzle-C-NRqGhx.mjs";
5
5
  import { n as applySqliteAuthMigrations, t as applyPgAuthMigrations } from "./auth-migrations-BwLPwRgH.mjs";
6
6
  import { getMiniflareDatabasePath } from "./runner-BUPRnMFN.mjs";
@@ -1,4 +1,4 @@
1
- import { t as PageObject } from "../protocol-COz1NHxc.mjs";
1
+ import { t as PageObject } from "../protocol-D7r_deVZ.mjs";
2
2
  import { CacheForInput, CacheForResult } from "./prefetch.mjs";
3
3
 
4
4
  //#region src/pages/action-result.d.ts
@@ -32,39 +32,36 @@ declare function isCallSiteActionError(error: unknown): error is VoidActionError
32
32
  declare function isAbortError(error: unknown): boolean;
33
33
  //#endregion
34
34
  //#region src/pages/navigation-engine.d.ts
35
- interface PageComponentModule {
35
+ type PageComponentModule = {
36
36
  default: unknown;
37
- }
37
+ };
38
38
  type PageData = PageObject;
39
- interface VisitOptions$1 {
39
+ type VisitOptions$1 = {
40
40
  method?: string;
41
41
  data?: unknown;
42
42
  preserveScroll?: boolean;
43
43
  preserveState?: boolean;
44
44
  replace?: boolean;
45
- viewTransition?: boolean;
46
- /** @internal Used by React Actions to avoid waiting for a commit blocked by the action itself. */
47
- _resolveOnShell?: boolean;
48
- /** @internal Used by popstate handler to pass saved scroll position */
45
+ viewTransition?: boolean; /** @internal Used by React Actions to avoid waiting for a commit blocked by the action itself. */
46
+ _resolveOnShell?: boolean; /** @internal Used by popstate handler to pass saved scroll position */
49
47
  _scrollPosition?: {
50
48
  x: number;
51
49
  y: number;
52
- } | null;
53
- /** @internal Used by popstate handler to avoid writing history while traversing */
50
+ } | null; /** @internal Used by popstate handler to avoid writing history while traversing */
54
51
  _popstate?: boolean;
55
- }
56
- interface PrefetchOptions$1 {
52
+ };
53
+ type PrefetchOptions$1 = {
57
54
  method?: string;
58
55
  cacheFor?: CacheForInput;
59
- }
60
- interface VoidRouterAdapter$1 {
56
+ };
57
+ type VoidRouterAdapter$1 = {
61
58
  createDeferred(): unknown;
62
59
  resolveDeferred(ref: unknown, value: unknown): unknown;
63
60
  rejectDeferred(ref: unknown, error: string): unknown;
64
61
  isLoading(ref: unknown): boolean;
65
62
  onDeferredUpdate?(props: Record<string, unknown>): void;
66
- }
67
- interface PageNavigationEngineConfig {
63
+ };
64
+ type PageNavigationEngineConfig = {
68
65
  adapter: VoidRouterAdapter$1;
69
66
  components: Record<string, () => Promise<PageComponentModule>>;
70
67
  layoutTree: Record<string, Array<string>>;
@@ -77,13 +74,13 @@ interface PageNavigationEngineConfig {
77
74
  viewTransitions: boolean;
78
75
  prefetchHoverDelay: number;
79
76
  prefetchDefaultCacheFor: CacheForResult;
80
- }
81
- interface PageNavigationResult {
77
+ };
78
+ type PageNavigationResult = {
82
79
  pageData: PageData;
83
80
  component: unknown;
84
81
  layouts: Array<unknown>;
85
- }
86
- interface PageNavigationResource {
82
+ };
83
+ type PageNavigationResource = {
87
84
  id: number;
88
85
  url: string;
89
86
  fetchUrl: string;
@@ -95,8 +92,8 @@ interface PageNavigationResource {
95
92
  abort(): void;
96
93
  commit(): Promise<void>;
97
94
  dispose(): void;
98
- }
99
- interface PageNavigationEngine {
95
+ };
96
+ type PageNavigationEngine = {
100
97
  _hoverDelay: number;
101
98
  initialPageData: PageData;
102
99
  initialComponent: unknown;
@@ -107,42 +104,39 @@ interface PageNavigationEngine {
107
104
  flushAll(): void;
108
105
  setPopStateHandler(handler: (url: string, options: VisitOptions$1) => void): void;
109
106
  start(): void;
110
- }
107
+ };
111
108
  declare function createPageNavigationEngine(config: PageNavigationEngineConfig): Promise<PageNavigationEngine>;
112
109
  //#endregion
113
110
  //#region src/pages/form-value-equality.d.ts
114
111
  declare function isEqualFormValue(a: unknown, b: unknown): boolean;
115
112
  //#endregion
116
113
  //#region src/pages/client.d.ts
117
- interface VisitOptions {
114
+ type VisitOptions = {
118
115
  method?: string;
119
116
  data?: unknown;
120
117
  preserveScroll?: boolean;
121
118
  preserveState?: boolean;
122
119
  replace?: boolean;
123
- viewTransition?: boolean;
124
- /** @internal Used by React Actions to avoid waiting for a commit blocked by the action itself. */
125
- _resolveOnShell?: boolean;
126
- /** @internal Used by popstate handler to pass saved scroll position */
120
+ viewTransition?: boolean; /** @internal Used by React Actions to avoid waiting for a commit blocked by the action itself. */
121
+ _resolveOnShell?: boolean; /** @internal Used by popstate handler to pass saved scroll position */
127
122
  _scrollPosition?: {
128
123
  x: number;
129
124
  y: number;
130
- } | null;
131
- /** @internal Used by popstate handler to avoid writing history while traversing */
125
+ } | null; /** @internal Used by popstate handler to avoid writing history while traversing */
132
126
  _popstate?: boolean;
133
- }
134
- interface PrefetchOptions {
127
+ };
128
+ type PrefetchOptions = {
135
129
  method?: string;
136
130
  cacheFor?: CacheForInput;
137
- }
131
+ };
138
132
  type NavigationStateType = "idle" | "loading" | "submitting";
139
133
  type NavigationMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
140
- interface NavigationState {
134
+ type NavigationState = {
141
135
  state: NavigationStateType;
142
136
  location: URL | null;
143
137
  method: NavigationMethod | null;
144
- }
145
- interface VoidRouter {
138
+ };
139
+ type VoidRouter = {
146
140
  _hoverDelay: number;
147
141
  readonly url: URL;
148
142
  readonly path: string;
@@ -153,16 +147,16 @@ interface VoidRouter {
153
147
  prefetch(url: string | URL, options?: PrefetchOptions): Promise<unknown>;
154
148
  flush(url: string | URL, method?: string): void;
155
149
  flushAll(): void;
156
- }
157
- interface VoidRouterAdapter {
150
+ };
151
+ type VoidRouterAdapter = {
158
152
  createDeferred(): unknown;
159
153
  resolveDeferred(ref: unknown, value: unknown): unknown;
160
154
  rejectDeferred(ref: unknown, error: string): unknown;
161
155
  isLoading(ref: unknown): boolean;
162
156
  applyUpdate(pageData: PageData, component: unknown, layouts: Array<unknown>): void | Promise<void>;
163
157
  onDeferredUpdate?(props: Record<string, unknown>): void;
164
- }
165
- interface VoidRouterConfig {
158
+ };
159
+ type VoidRouterConfig = {
166
160
  adapter: VoidRouterAdapter;
167
161
  components: Record<string, () => Promise<PageComponentModule>>;
168
162
  layoutTree: Record<string, Array<string>>;
@@ -177,7 +171,7 @@ interface VoidRouterConfig {
177
171
  prefetchDefaultCacheFor: CacheForResult;
178
172
  onRouteChange?(url: string): void;
179
173
  onNavigationChange?(navigation: NavigationState): void;
180
- }
174
+ };
181
175
  declare function idleNavigationState(): NavigationState;
182
176
  declare function createRouterFacade(router: VoidRouter, getCurrentUrl: () => string, getCurrentParams?: () => Record<string, string>): VoidRouter;
183
177
  declare function createSsrRouter(url?: string, params?: Record<string, string>): VoidRouter;
@@ -1,4 +1,4 @@
1
- import { n as HeadDescriptor } from "../head-CZGAunBV.mjs";
1
+ import { n as HeadDescriptor } from "../head-C7QW7UY1.mjs";
2
2
 
3
3
  //#region src/pages/head-client.d.ts
4
4
  /**
@@ -1,2 +1,2 @@
1
- import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-CZGAunBV.mjs";
1
+ import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-C7QW7UY1.mjs";
2
2
  export { HeadConfig, HeadDescriptor, renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveHead };
@@ -85,12 +85,12 @@ function renderHeadToString(head) {
85
85
  parts.push(`<meta ${attrs.join(" ")}>`);
86
86
  }
87
87
  if (head.link) for (const entry of head.link) {
88
- const attrs = Object.entries(entry).filter(([, v]) => v != null).map(([k, v]) => `${k}="${escapeHtml(v)}"`).join(" ");
88
+ const attrs = Object.entries(entry).filter(([, value]) => value != null).map(([key, value]) => `${key}="${escapeHtml(value)}"`).join(" ");
89
89
  parts.push(`<link ${attrs}>`);
90
90
  }
91
91
  if (head.script) for (const entry of head.script) {
92
92
  const { innerHTML, ...rest } = entry;
93
- const attrs = Object.entries(rest).filter(([, v]) => v != null).map(([k, v]) => `${k}="${escapeHtml(v)}"`).join(" ");
93
+ const attrs = Object.entries(rest).filter(([, value]) => value != null).map(([key, value]) => `${key}="${escapeHtml(value)}"`).join(" ");
94
94
  if (innerHTML) parts.push(`<script${attrs ? " " + attrs : ""}>${innerHTML}<\/script>`);
95
95
  else if (attrs) parts.push(`<script ${attrs}><\/script>`);
96
96
  }
@@ -99,13 +99,13 @@ function renderHeadToString(head) {
99
99
  /** Serialize htmlAttrs to an attribute string (includes leading space). */
100
100
  function renderHtmlAttrs(head) {
101
101
  if (!head.htmlAttrs) return "";
102
- const attrs = Object.entries(head.htmlAttrs).map(([k, v]) => `${k}="${escapeHtml(v)}"`).join(" ");
102
+ const attrs = Object.entries(head.htmlAttrs).map(([key, value]) => `${key}="${escapeHtml(value)}"`).join(" ");
103
103
  return attrs ? " " + attrs : "";
104
104
  }
105
105
  /** Serialize bodyAttrs to an attribute string (includes leading space). */
106
106
  function renderBodyAttrs(head) {
107
107
  if (!head.bodyAttrs) return "";
108
- const attrs = Object.entries(head.bodyAttrs).map(([k, v]) => `${k}="${escapeHtml(v)}"`).join(" ");
108
+ const attrs = Object.entries(head.bodyAttrs).map(([key, value]) => `${key}="${escapeHtml(value)}"`).join(" ");
109
109
  return attrs ? " " + attrs : "";
110
110
  }
111
111
  //#endregion
@@ -1,5 +1,5 @@
1
- import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-CZGAunBV.mjs";
2
- import { a as PageScanResult, i as PageDefinition, n as LayoutDefinition, r as NamedLayoutDefinition } from "../types-D6AuY5Bf.mjs";
1
+ import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-C7QW7UY1.mjs";
2
+ import { a as PageScanResult, i as PageDefinition, n as LayoutDefinition, r as NamedLayoutDefinition } from "../types-DG_Ynnyd.mjs";
3
3
  import { serializePageData } from "./serialize.mjs";
4
4
 
5
5
  //#region src/pages/layout-resolution.d.ts
@@ -26,13 +26,13 @@ declare function scanPages(root: string, options?: {
26
26
  declare function generateComponentManifest(scan: PageScanResult, pagesDir: string): string;
27
27
  //#endregion
28
28
  //#region src/pages/static-data.d.ts
29
- interface StaticPageDataBuildOptions {
29
+ type StaticPageDataBuildOptions = {
30
30
  enabled: boolean;
31
31
  fastPath: boolean;
32
- }
33
- interface ResolveStaticPageDataBuildOptionsInput {
32
+ };
33
+ type ResolveStaticPageDataBuildOptionsInput = {
34
34
  publicDir?: string | false;
35
- }
35
+ };
36
36
  declare function resolveStaticPageDataBuildOptions(root: string, options?: ResolveStaticPageDataBuildOptionsInput): StaticPageDataBuildOptions;
37
37
  //#endregion
38
38
  export { type HeadConfig, type HeadDescriptor, type LayoutDefinition, type NamedLayoutDefinition, type PageDefinition, type PageScanResult, type StaticPageDataBuildOptions, generateComponentManifest, renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveEffectiveLayoutChain, resolveHead, resolveLayoutChain, resolveNamedLayout, resolveStaticPageDataBuildOptions, scanPages, serializePageData };
@@ -1,7 +1,7 @@
1
1
  import { a as join } from "../pathe.M-eThtNZ-D-kmWkCS.mjs";
2
- import { f as readConfig } from "../config-BIa9HwVX.mjs";
3
- import { a as resolveNamedLayout, i as resolveLayoutIds, n as resolveEffectiveLayoutChain, r as resolveLayoutChain, t as scanPages } from "../scan-Ba4hFwlH.mjs";
4
- import { i as parseRedirectsFile } from "../headers-YVkHjOyq.mjs";
2
+ import { f as readConfig } from "../config-DqkeX_Fa.mjs";
3
+ import { a as resolveNamedLayout, i as resolveLayoutIds, n as resolveEffectiveLayoutChain, r as resolveLayoutChain, t as scanPages } from "../scan-CWfLxtOe.mjs";
4
+ import { i as parseRedirectsFile } from "../headers-C7Yf6_CN.mjs";
5
5
  import { renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveHead } from "./head.mjs";
6
6
  import { serializePageData } from "./serialize.mjs";
7
7
  //#region src/pages/manifest.ts
@@ -21,9 +21,9 @@ function generateComponentManifest(scan, pagesDir) {
21
21
  const layoutId = layout.directory ? `${layout.directory}/layout` : "layout";
22
22
  lines.push(` ${JSON.stringify(layoutId)}: () => import(${JSON.stringify(importPath)}),`);
23
23
  }
24
- for (const nl of scan.namedLayouts) {
25
- const importPath = `${pagesDir}/${nl.filePath}`;
26
- const layoutId = nl.directory ? `${nl.directory}/_layouts/${nl.name}` : `_layouts/${nl.name}`;
24
+ for (const namedLayout of scan.namedLayouts) {
25
+ const importPath = `${pagesDir}/${namedLayout.filePath}`;
26
+ const layoutId = namedLayout.directory ? `${namedLayout.directory}/_layouts/${namedLayout.name}` : `_layouts/${namedLayout.name}`;
27
27
  lines.push(` ${JSON.stringify(layoutId)}: () => import(${JSON.stringify(importPath)}),`);
28
28
  }
29
29
  lines.push("};");
@@ -1,14 +1,14 @@
1
- import { a as PageScanResult } from "../types-D6AuY5Bf.mjs";
1
+ import { a as PageScanResult } from "../types-DG_Ynnyd.mjs";
2
2
  import { ResolvedConfig, ViteDevServer } from "vite";
3
3
 
4
4
  //#region src/pages/islands-plugin.d.ts
5
5
  declare const ISLANDS_RENDERER_ID = "virtual:void-islands-renderer";
6
6
  declare const ISLANDS_CLIENT_ENTRY_ID = "virtual:void-islands-client";
7
- interface IslandEntry {
7
+ type IslandEntry = {
8
8
  componentPath: string;
9
9
  islandId: string;
10
10
  hydrate: string;
11
- }
11
+ };
12
12
  /** Resolve a relative import specifier to an absolute path by checking extensions. */
13
13
  declare function resolveSpecifier(specifier: string, importerDir: string, extensions: Array<string>): string | null;
14
14
  /**
@@ -1,5 +1,5 @@
1
1
  import { n as dirname, s as resolve } from "../pathe.M-eThtNZ-D-kmWkCS.mjs";
2
- import { n as resolveEffectiveLayoutChain, t as scanPages } from "../scan-Ba4hFwlH.mjs";
2
+ import { n as resolveEffectiveLayoutChain, t as scanPages } from "../scan-CWfLxtOe.mjs";
3
3
  import { existsSync, readFileSync, readdirSync } from "node:fs";
4
4
  import { normalizePath } from "vite";
5
5
  //#region src/pages/islands-plugin.ts