void 1.9.0 → 1.9.1

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.
@@ -18,7 +18,7 @@ function resolveHead(configHead, middlewareHead, pageHead) {
18
18
  const title = pageHead?.title ?? middlewareHead?.title ?? configHead?.title;
19
19
  if (title !== void 0) {
20
20
  const template = middlewareHead?.titleTemplate ?? configHead?.titleTemplate;
21
- result.title = template ? template.replace("%s", title) : title;
21
+ result.title = template ? template.replace("%s", () => title) : title;
22
22
  }
23
23
  const metaMap = /* @__PURE__ */ new Map();
24
24
  for (const layer of layers) {
package/dist/index.mjs CHANGED
@@ -35,7 +35,7 @@ import { i as loadVoidAuthConfig, n as devAuthConfigImporter, o as viteAuthConfi
35
35
  import { a as resolveDistDir, n as collectRevalidate, o as resolveWorkerDirName, r as hasRevalidate, t as collectPages } from "./isr-config-Czzb4mIq.mjs";
36
36
  import { t as assertNoPrerenderFailures } from "./prerender-render-BAdYhivW.mjs";
37
37
  import { f as prerenderPages, n as SEND_EMAIL_BINDING, p as prerenderPagesNode } from "./email-cloudflare-DAGpgzY1.mjs";
38
- import { i as safeJsonStringify } from "./protocol-IPSWHolJ.mjs";
38
+ import { i as safeJsonStringify } from "./protocol-a3ZUQq5W.mjs";
39
39
  import { n as completeApplicationAnalysis } from "./application-routing-CJRlXCc2.mjs";
40
40
  import { a as validateSsrEntries, n as SSR_SERVER_ENTRY_RELATIVE_PATHS, o as validateSsrEntry, t as SSR_CLIENT_ENTRY_RELATIVE_PATHS } from "./entry-DMgR7XOf.mjs";
41
41
  import { r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-CeftH0fQ.mjs";
@@ -5120,7 +5120,7 @@ function routingPlugin(root, options) {
5120
5120
  hotUpdate() {
5121
5121
  if (this.environment.name === "void_auth_config") return [];
5122
5122
  },
5123
- configureServer(devServer) {
5123
+ async configureServer(devServer) {
5124
5124
  const authEnvironment = devServer.environments[AUTH_CONFIG_ENVIRONMENT];
5125
5125
  authConfigEnvironment = authEnvironment && isRunnableDevEnvironment(authEnvironment) ? authEnvironment : void 0;
5126
5126
  const watcher = devServer.watcher;
@@ -5204,6 +5204,11 @@ function routingPlugin(root, options) {
5204
5204
  watcher.on("change", handleRulesFileChange);
5205
5205
  watcher.on("unlink", handleRulesFileChange);
5206
5206
  }
5207
+ if (options.isAuthEnabled()) await regenerateInOrder(async () => {
5208
+ await rescan();
5209
+ resolveAuthCompileOptions();
5210
+ await writeAuthDatabaseFiles();
5211
+ });
5207
5212
  }
5208
5213
  };
5209
5214
  }
@@ -1 +1 @@
1
- export { t as absolutizeHead, n as renderBodyAttrs, r as renderHeadToString, i as renderHtmlAttrs, a as resolveHead } from "../head-CWJhfUwV.mjs";
1
+ export { t as absolutizeHead, n as renderBodyAttrs, r as renderHeadToString, i as renderHtmlAttrs, a as resolveHead } from "../head-0o0QoREY.mjs";
@@ -1,5 +1,5 @@
1
1
  import { l as resolveNamedLayout, n as scanPages, o as resolveEffectiveLayoutChain, r as generateComponentManifest, s as resolveLayoutChain, t as pageFileEnvironment } from "../scan-4YOxDaw2.mjs";
2
- import { a as resolveHead, i as renderHtmlAttrs, n as renderBodyAttrs, r as renderHeadToString } from "../head-CWJhfUwV.mjs";
2
+ import { a as resolveHead, i as renderHtmlAttrs, n as renderBodyAttrs, r as renderHeadToString } from "../head-0o0QoREY.mjs";
3
3
  import { a as join, n as dirname } from "../dist-DMYe8CZJ.mjs";
4
4
  import { n as assertLinkPrefetchValue } from "../prefetch-Dx2jIbtg.mjs";
5
5
  import { r as parseRedirectsFile } from "../headers-Q0kZDpk8.mjs";
@@ -1,3 +1,3 @@
1
1
  import { t as ValidationError } from "../validation-error-uAAjlsiW.mjs";
2
- import { i as safeJsonStringify, n as handlePageGet, r as handlePageMutation, t as flattenValidationErrors } from "../protocol-IPSWHolJ.mjs";
2
+ import { i as safeJsonStringify, n as handlePageGet, r as handlePageMutation, t as flattenValidationErrors } from "../protocol-a3ZUQq5W.mjs";
3
3
  export { ValidationError, flattenValidationErrors, handlePageGet, handlePageMutation, safeJsonStringify };
@@ -1,7 +1,7 @@
1
1
  import { a as executeComposedHandler, i as separateDeferred, n as DEFERRED, o as getHandlerComposition, t as ValidationError } from "./validation-error-uAAjlsiW.mjs";
2
2
  import { n as isConvertedResponse } from "./response-HmNjB30w.mjs";
3
3
  import { a as hasActionKey, c as searchWithoutActionKey, t as decodePagePath } from "./url-DaehRGKR.mjs";
4
- import { a as resolveHead, i as renderHtmlAttrs, n as renderBodyAttrs, r as renderHeadToString, t as absolutizeHead } from "./head-CWJhfUwV.mjs";
4
+ import { a as resolveHead, i as renderHtmlAttrs, n as renderBodyAttrs, r as renderHeadToString, t as absolutizeHead } from "./head-0o0QoREY.mjs";
5
5
  import { a as serializePageData, o as escapeScriptJson } from "./serialize-Pf-CIQK_.mjs";
6
6
  import { PAGES_PROTOCOL_VERSION } from "@void/edge";
7
7
  // src/pages/not-found-context.ts
@@ -256,9 +256,10 @@ async function renderPageFailure(c, error, original, renderFn, getAssetTags, con
256
256
  if (!notFound && options?.dev && error instanceof Error) message = error.message;
257
257
  if (error && !notFound) console.error(error);
258
258
  const shared = c.get("shared") ?? {};
259
+ const middlewareHead = c.get("headDefaults");
259
260
  let head;
260
261
  try {
261
- head = resolveRequestHead(c, configHead, c.get("headDefaults"), void 0);
262
+ head = resolveRequestHead(c, configHead, middlewareHead, void 0);
262
263
  serializePageData({
263
264
  shared,
264
265
  head
@@ -282,7 +283,7 @@ async function renderPageFailure(c, error, original, renderFn, getAssetTags, con
282
283
  errors: null,
283
284
  head: {
284
285
  ...head,
285
- title: head?.title ?? (status === 404 ? "Not Found" : "Internal Server Error")
286
+ title: head?.title ?? resolveHead(configHead, middlewareHead, { title: status === 404 ? "Not Found" : "Internal Server Error" })?.title
286
287
  }
287
288
  };
288
289
  try {
@@ -5,7 +5,7 @@ import { t as VoidAssetRewriteError } from "../handler-C9SnmeW1.mjs";
5
5
  import { t as convertReturnValue } from "../response-HmNjB30w.mjs";
6
6
  import { r as toUrlString, t as interpolateRouteParams } from "../route-url-CfCR4oMj.mjs";
7
7
  import { n as createClientAssetTags, r as createManifestLoader, t as ASSET_EXTENSIONS } from "../routing-assets-DJIVOrCh.mjs";
8
- import { a as handlesPageLoaderNotFound, n as handlePageGet, o as ownsLoaderNotFoundBoundary, r as handlePageMutation } from "../protocol-IPSWHolJ.mjs";
8
+ import { a as handlesPageLoaderNotFound, n as handlePageGet, o as ownsLoaderNotFoundBoundary, r as handlePageMutation } from "../protocol-a3ZUQq5W.mjs";
9
9
  import { t as renderDefaultErrorPage } from "../error-pages-COVBnzK7.mjs";
10
10
  import { AsyncLocalStorage } from "node:async_hooks";
11
11
  import { compilePattern, matchPattern, matchPatternCaptures, mergeQueryIntoLocation, redirectToHttps, substituteParams } from "@void/edge";
@@ -240,6 +240,8 @@ export default defineAuth(({ defaults }) => ({
240
240
 
241
241
  `defaults` already includes Void's conventions. Extend it explicitly instead of expecting a deep merge.
242
242
 
243
+ In `auth.ts`, load helpers that import `@auth-schema` inside the hook that uses them, with `await import('./server/users')`. This lets `void prepare` generate the authentication schema on a fresh clone. The same applies when a helper imports your app's database schema and that schema references authentication tables.
244
+
243
245
  For the full set of available options, see the official [Better Auth options reference](https://www.better-auth.com/docs/reference/options).
244
246
 
245
247
  ## Database and Migrations
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "void",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "Full-stack framework and deployment CLI for Cloudflare Workers, powered by Vite.",
5
5
  "homepage": "https://void.cloud",
6
6
  "bugs": {
@@ -352,11 +352,11 @@
352
352
  "@cloudflare/workers-types": "^5.20261110.1",
353
353
  "@cloudflare/workers-utils": "^0.53.1",
354
354
  "@napi-rs/keyring": "^2.1.2",
355
- "@void/deploy-cloudflare": "1.9.0",
356
- "@void/deploy-core": "1.9.0",
357
- "@void/edge": "1.9.0",
358
- "@void/isr": "1.9.0",
359
- "@void/platform": "1.9.0",
355
+ "@void/deploy-cloudflare": "1.9.1",
356
+ "@void/deploy-core": "1.9.1",
357
+ "@void/edge": "1.9.1",
358
+ "@void/isr": "1.9.1",
359
+ "@void/platform": "1.9.1",
360
360
  "better-auth": "^1.7.20",
361
361
  "better-sqlite3": "^13.0.3",
362
362
  "blake3-jit": "^1.1.0",
@@ -409,7 +409,7 @@
409
409
  "zod": "^4.6.7"
410
410
  },
411
411
  "peerDependencies": {
412
- "@void/md": "1.9.0",
412
+ "@void/md": "1.9.1",
413
413
  "arktype": ">=2.0.0",
414
414
  "valibot": ">=1.0.0-beta.7",
415
415
  "vite": "^8.0.0",