void 1.8.0 → 1.9.0
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/{account-cmd-CZKntRH2.mjs → account-cmd-BEMOdwtl.mjs} +3 -3
- package/dist/{application-analysis-CyTagJQM.mjs → application-analysis-3VVsflWZ.mjs} +5 -5
- package/dist/{application-routing-BLrMVpqi.mjs → application-routing-CJRlXCc2.mjs} +1 -1
- package/dist/{auth-Bk9VGtQW.d.mts → auth-CV9kXHKe.d.mts} +3 -1
- package/dist/{auth-DyWp-fSo.mjs → auth-aMuFOZeI.mjs} +8 -2
- package/dist/{auth-link-BOaQWMKw.mjs → auth-link-B1IynRW5.mjs} +3 -3
- package/dist/{auth-router-D0-VcmDs.mjs → auth-router-DVaWJdRB.mjs} +2 -2
- package/dist/{better-auth-shared-CdVyCUou.mjs → better-auth-shared-C7LHvF4L.mjs} +1 -1
- package/dist/{better-auth-shared-CQFdtguU.d.mts → better-auth-shared-ajs3LNrY.d.mts} +1 -1
- package/dist/{build-cmd-JTsXXf2F.mjs → build-cmd-Dq8tdqQG.mjs} +1 -1
- package/dist/{cache-D0m3Z_Xf.mjs → cache-DGMnskX7.mjs} +1 -1
- package/dist/{cancel-deploy-Ce6Os4fa.mjs → cancel-deploy-96S5hD1E.mjs} +1 -1
- package/dist/cli/cli.mjs +1 -1
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/{cli-main-rkrJy2Ge.mjs → cli-main-CQRLxZAu.mjs} +28 -28
- package/dist/client-66c0RLDM.mjs +1 -0
- package/dist/{client-SZPyj4X_.mjs → client-D6w5x7hM.mjs} +7 -7
- package/dist/{cloudflare-auth-7jTqy9Bx.mjs → cloudflare-auth-pNvmT6kL.mjs} +1 -1
- package/dist/{cloudflare-cmd-ChPLQcTP.mjs → cloudflare-cmd-BuuHUM4z.mjs} +3 -3
- package/dist/{cloudflare-config-DtOGAbeB.mjs → cloudflare-config-PxbinLLE.mjs} +2 -2
- package/dist/{cloudflare-connect-Co93VYTo.mjs → cloudflare-connect-D1QOosLd.mjs} +2 -2
- package/dist/{cloudflare-operations-CXaDKYj2.mjs → cloudflare-operations-G5AObYzF.mjs} +5 -5
- package/dist/{cloudflare-operations-DATekLwI.mjs → cloudflare-operations-I4t3mt4R.mjs} +1 -1
- package/dist/{cloudflare-process-DmTxZR-N.mjs → cloudflare-process-wcnaQ5JG.mjs} +2 -2
- package/dist/{config-wo2EaH0X.mjs → config-C1DPf8EK.mjs} +1 -1
- package/dist/{config-CTlUaXWZ.d.mts → config-CCWVY7DY.d.mts} +1 -1
- package/dist/{config-5oSQhZNj.mjs → config-CzFdJYNA.mjs} +1 -1
- package/dist/{config-DcqUBGCb.mjs → config-DlWQ_hIJ.mjs} +3 -3
- package/dist/{config-eeDzKBS9.mjs → config-Do7gJI3T.mjs} +2 -2
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-DlvXt1JR.mjs → connect-4uImOwut.mjs} +4 -4
- package/dist/{create-project-CC_7hmYJ.mjs → create-project-BaUzZnLZ.mjs} +1 -1
- package/dist/{create-project-DzY05xqC.mjs → create-project-CQMyzTvK.mjs} +1 -1
- package/dist/{db-FhyYGcJJ.mjs → db-DEpDeDsi.mjs} +19 -19
- package/dist/{db-types-sVwEpyPR.mjs → db-types-BpPYAx0B.mjs} +1 -1
- package/dist/{delete-CModjyOC.mjs → delete-BVD2kI82.mjs} +1 -1
- package/dist/deploy-Dr_Qamzw.mjs +2 -0
- package/dist/{deploy-Cz9TEzZy.mjs → deploy-Dyeo5soA.mjs} +24 -75
- package/dist/{deploy-managed-static-DlxxXkAM.mjs → deploy-managed-static-Kn73R83A.mjs} +20 -20
- package/dist/{deploy-transport-DUvm6-CR.mjs → deploy-transport-BpKBs_KR.mjs} +2 -2
- package/dist/deploy.mjs +6 -6
- package/dist/discover-Diq0l6TZ.mjs +1 -0
- package/dist/{discover-CVFCWU7W.mjs → discover-Vd18lHsj.mjs} +1 -1
- package/dist/{dispatch-CCiaAnSK.mjs → dispatch-BBfb519j.mjs} +5 -5
- package/dist/{domain-DvdZPA50.mjs → domain-BTIdyUVk.mjs} +2 -2
- package/dist/{email-ASpNrfLd.mjs → email-DvrS-I0U.mjs} +7 -7
- package/dist/{email-cloudflare-kqoN9jst.mjs → email-cloudflare-DAGpgzY1.mjs} +3 -3
- package/dist/{entry-BweGTCgj.mjs → entry-DMgR7XOf.mjs} +1 -1
- package/dist/{env-Bpkg3G5i.mjs → env-D7vORwpn.mjs} +4 -4
- package/dist/{env-types-Dz9qkiOn.mjs → env-types-WEZw5D-r.mjs} +1 -1
- package/dist/{env-validation-CN386Utu.mjs → env-validation-DKDcpxbt.mjs} +1 -1
- package/dist/{env-validation-BpCCQE_6.mjs → env-validation-DeYNRp1d.mjs} +3 -3
- package/dist/{gen-upKJChvd.mjs → gen-DimkGNve.mjs} +4 -4
- package/dist/gen-DmEeVEs4.mjs +1 -0
- package/dist/{github-cmd-BvMOlb8Z.mjs → github-cmd-D-zs6VQr.mjs} +1 -1
- package/dist/{handler-BO7Od-z9.d.mts → handler-6fzr_ikp.d.mts} +3 -3
- package/dist/{head-MeF_5M_3.d.mts → head-CVO92KEx.d.mts} +14 -3
- package/dist/{head-5XPcnG-j.mjs → head-CWJhfUwV.mjs} +62 -3
- package/dist/{headers-COGEDoMN.mjs → headers-Q0kZDpk8.mjs} +1 -1
- package/dist/{help-TPCjTu6e.mjs → help-Cgdcd-SG.mjs} +4 -4
- package/dist/help-Cp3K5m1w.mjs +1 -0
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +23 -23
- package/dist/{info-EsDyihwf.mjs → info-BbxQ34kk.mjs} +4 -4
- package/dist/{init-a4lVagrb.mjs → init-zyRj3QRw.mjs} +14 -14
- package/dist/{link-CE55DDzS.mjs → link-DAFXuIER.mjs} +2 -2
- package/dist/{list-CxRthQks.mjs → list-BTIcC3W9.mjs} +2 -2
- package/dist/{live-Kc55iuOQ.d.mts → live-DBybyDt0.d.mts} +2 -2
- package/dist/{live-CYJ4KGoR.mjs → live-Dw7NF1t2.mjs} +1 -1
- package/dist/load-user-env-ztmIyiLx.mjs +34 -0
- package/dist/{local-d1-CFcH9Bx3.mjs → local-d1-BnVb7Fem.mjs} +1 -1
- package/dist/login-DBs8JuSl.mjs +1 -0
- package/dist/{login-AfcSGSmE.mjs → login-DOE-MkeK.mjs} +2 -2
- package/dist/{logs-BgRJuvb1.mjs → logs-CUsjihc3.mjs} +2 -2
- package/dist/migrate-BYhoIK9R.mjs +1 -0
- package/dist/{migrate-BNAh6m_C.mjs → migrate-DtoKdGas.mjs} +4 -4
- package/dist/nitro.mjs +3 -3
- package/dist/{node-CXFUw0Uz.mjs → node-D9dPyUr0.mjs} +2 -2
- package/dist/operator-ai-logging-DFTEp81Z.mjs +121 -0
- package/dist/{operator-args-DGTuCdSE.mjs → operator-args-BCCohcz3.mjs} +3 -2
- package/dist/{operator-cmd-C-viB7Si.mjs → operator-cmd-CQOQrUiO.mjs} +26 -6
- package/dist/operator-cmd-xCACDtT1.mjs +1 -0
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/client.mjs +15 -13
- package/dist/pages/head.d.mts +2 -2
- package/dist/pages/head.mjs +1 -1
- package/dist/pages/index.d.mts +2 -2
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.d.mts +5 -1
- package/dist/pages/islands-plugin.mjs +6 -2
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/platform-args-DSi4_M8n.mjs +1 -0
- package/dist/{platform-args-CiYeZmc5.mjs → platform-args-DtpHS_75.mjs} +1 -1
- package/dist/{platform-auth-config-Dt2qEc2w.mjs → platform-auth-config-fLwIS5VG.mjs} +3 -3
- package/dist/{platform-auth-protection-B7TaF-PZ.mjs → platform-auth-protection-BTRI_YwD.mjs} +2 -2
- package/dist/{platform-auth-recovery-suXSteJ6.mjs → platform-auth-recovery-DPK2Mvmo.mjs} +2 -2
- package/dist/{platform-cmd-DuAsIxbU.mjs → platform-cmd-BLy5uCa-.mjs} +1 -1
- package/dist/{platform-cmd-9rvYBBtr.mjs → platform-cmd-HS_FSthn.mjs} +5 -5
- package/dist/{platform-domain-DhH_vDr6.mjs → platform-domain-CHpcq_qg.mjs} +2 -2
- package/dist/{platform-lifecycle-3uI-E2bF.mjs → platform-lifecycle-B6LUBwjS.mjs} +1 -1
- package/dist/{platform-lifecycle-CXmXe2xt.mjs → platform-lifecycle-D2RS7DE0.mjs} +236 -26
- package/dist/{platform-management-PdrgDQTe.mjs → platform-management-C-T0ch4y.mjs} +1 -1
- package/dist/{platform-management-BBCHfwji.mjs → platform-management-d3ETv3Dw.mjs} +14 -14
- package/dist/{platform-plans-config-BGwkXYDM.mjs → platform-plans-config-B7yJQKf7.mjs} +114 -30
- package/dist/{platform-recovery-C8NxXGRR.mjs → platform-recovery-DS5CAsly.mjs} +2 -2
- package/dist/{plugin-inference-CErfTgEx.mjs → plugin-inference-DZHmVe1f.mjs} +3 -3
- package/dist/{prepare-BDKWZgfL.mjs → prepare-AVM4Hj3T.mjs} +8 -8
- package/dist/prepare-BSXKz6m8.mjs +1 -0
- package/dist/{prepare-BLrzXjIl.mjs → prepare-DMk8NAO-.mjs} +1 -1
- package/dist/{project-cmd-DzGvxXKH.mjs → project-cmd-TQKAOTMV.mjs} +15 -15
- package/dist/{project-paths-G0yut6Zz.mjs → project-paths-CUhCPMpK.mjs} +33 -2
- package/dist/{project-team-C5XtHbZk.mjs → project-team-B1OKeb-T.mjs} +1 -1
- package/dist/{project-token-B4D5yhHQ.mjs → project-token-RW_wpmN-.mjs} +1 -1
- package/dist/{project-tsconfig-nhnTWO_Y.mjs → project-tsconfig-MyRJgufB.mjs} +1 -1
- package/dist/{project-zero-trust--0LvktDg.mjs → project-zero-trust-TNc66p0_.mjs} +1 -1
- package/dist/{protocol-B1Tvc9-x.mjs → protocol-IPSWHolJ.mjs} +54 -19
- package/dist/{protocol-Cg2I81NA.d.mts → protocol-YS3tbxWE.d.mts} +2 -2
- package/dist/{provision-CAcrauvr.mjs → provision-BLdkpFT4.mjs} +1 -1
- package/dist/{provision-C3yiHdld.mjs → provision-bgQTi5QZ.mjs} +2 -2
- package/dist/redirect-Dqb4fEc5.mjs +80 -0
- package/dist/{requests-CrRiTgQA.mjs → requests-Cj15-yrI.mjs} +1 -1
- package/dist/{rollback-BsmQyj-Q.mjs → rollback-CYnkng7B.mjs} +2 -2
- package/dist/{route-types-CgtlFCDz.mjs → route-types-C6eAOmOj.mjs} +1 -1
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/auth.mjs +1 -1
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.mjs +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +1 -1
- package/dist/runtime/client-react.d.mts +1 -1
- package/dist/runtime/client-solid.d.mts +1 -1
- package/dist/runtime/client-svelte.d.mts +1 -1
- package/dist/runtime/client-vue.d.mts +1 -1
- package/dist/runtime/client.d.mts +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live-server.mjs +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/routing.d.mts +2 -2
- package/dist/runtime/routing.mjs +6 -5
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +3 -3
- package/dist/runtime/ws-server.mjs +1 -1
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{scan-BJ3bj6aP.mjs → scan-4YOxDaw2.mjs} +2 -2
- package/dist/{secret-D0g5oBsP.mjs → secret-BSf7dgg_.mjs} +3 -3
- package/dist/{action-key-ByZ6DDld.mjs → url-DaehRGKR.mjs} +43 -1
- package/dist/{version-metadata-eUd6Ar_U.mjs → version-metadata-CeftH0fQ.mjs} +1 -1
- package/dist/{wrangler-k40T7XTQ.mjs → wrangler-B1gkT_wC.mjs} +3 -3
- package/dist/wrangler-fNGvPTlO.mjs +1 -0
- package/dist/{wrapper-CVMZarxf.mjs → wrapper-xJ4LP5A7.mjs} +3 -3
- package/dist/{ws--U7QicYy.d.mts → ws-C2zy0QBf.d.mts} +2 -2
- package/docs/guide/ai.md +1 -1
- package/docs/guide/app-types.md +1 -1
- package/docs/guide/auth.md +22 -27
- package/docs/guide/database/d1.md +4 -2
- package/docs/guide/database.md +29 -27
- package/docs/guide/deployment.md +2 -2
- package/docs/guide/edge/headers.md +3 -3
- package/docs/guide/edge/prerendering.md +5 -5
- package/docs/guide/edge/redirects.md +1 -1
- package/docs/guide/edge/revalidation.md +4 -2
- package/docs/guide/edge/rewrites.md +1 -1
- package/docs/guide/edge/static-assets.md +4 -0
- package/docs/guide/email/sending.md +4 -2
- package/docs/guide/live.md +1 -1
- package/docs/guide/pages-routing/actions-and-forms.md +25 -7
- package/docs/guide/pages-routing/errors.md +17 -9
- package/docs/guide/pages-routing/head.md +44 -1
- package/docs/guide/pages-routing/islands.md +3 -1
- package/docs/guide/pages-routing/layouts.md +2 -2
- package/docs/guide/pages-routing/loaders.md +3 -1
- package/docs/guide/pages-routing/markdown.md +5 -3
- package/docs/guide/pages-routing/overview.md +14 -21
- package/docs/guide/platform/administration/connected-apps.md +10 -3
- package/docs/guide/platform/administration/email.md +1 -1
- package/docs/guide/platform/administration/plans.md +34 -1
- package/docs/guide/platform/administration/projects.md +6 -2
- package/docs/guide/platform/installation/credentials.md +12 -10
- package/docs/guide/platform/installation/maintenance.md +7 -1
- package/docs/guide/platform/installation/setup.md +8 -7
- package/docs/guide/queues.md +1 -1
- package/docs/guide/server-routing.md +2 -2
- package/docs/guide/sse.md +1 -1
- package/docs/guide/ssg.md +17 -6
- package/docs/guide/storage.md +1 -1
- package/docs/guide/testing.md +9 -7
- package/docs/guide/type-safety.md +23 -21
- package/docs/integrations/cloudflare.md +6 -2
- package/docs/integrations/frameworks/nuxt.md +1 -1
- package/docs/integrations/hono.md +21 -0
- package/docs/integrations/nodejs-bun-deno.md +4 -4
- package/docs/reference/api/auth.md +22 -4
- package/docs/reference/api/database.md +2 -2
- package/docs/reference/api/pages.md +17 -13
- package/docs/reference/api/resources.md +1 -1
- package/docs/reference/api/rewrites.md +8 -4
- package/docs/reference/api.md +1 -1
- package/docs/reference/cli/deploy.md +4 -2
- package/docs/reference/cli/platform-config.md +3 -3
- package/docs/reference/cli/platform-users.md +58 -11
- package/docs/reference/cli.md +1 -1
- package/docs/reference/config.md +7 -3
- package/package.json +7 -7
- package/skills/void/SKILL.md +1 -1
- package/dist/client-D1Vz1Zep.mjs +0 -1
- package/dist/deploy-DMieisRu.mjs +0 -2
- package/dist/discover-1DJD4YXD.mjs +0 -1
- package/dist/gen-M5fNQKfH.mjs +0 -1
- package/dist/help-CItQVDL4.mjs +0 -1
- package/dist/load-user-env-CSwdofj0.mjs +0 -48
- package/dist/login-ZHsAm-I6.mjs +0 -1
- package/dist/migrate-BflbbZQK.mjs +0 -1
- package/dist/operator-cmd-D6qNuJ_z.mjs +0 -1
- package/dist/platform-args-DJvF1-kl.mjs +0 -1
- package/dist/prepare-a1_5usAn.mjs +0 -1
- package/dist/url-CuoEn0o3.mjs +0 -43
- package/dist/wrangler-R3kMdJfw.mjs +0 -1
|
@@ -80,19 +80,62 @@ export default defineMiddleware(async (c, next) => {
|
|
|
80
80
|
});
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
+
`headDefaults` also accepts `titleTemplate`, which replaces the config's template for the requests the middleware runs on. Use it to give one section of the site its own title suffix:
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
// middleware/admin.ts
|
|
87
|
+
import { defineMiddleware } from 'void';
|
|
88
|
+
|
|
89
|
+
export default defineMiddleware(async (c, next) => {
|
|
90
|
+
if (c.req.path.startsWith('/admin')) {
|
|
91
|
+
c.set('headDefaults', { ...c.get('headDefaults'), titleTemplate: '%s | Admin' });
|
|
92
|
+
}
|
|
93
|
+
await next();
|
|
94
|
+
});
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
A page returning `{ title: "Users" }` under `/admin` produces `<title>Users | Admin</title>`. Other pages keep the config's template.
|
|
98
|
+
|
|
99
|
+
To drop the suffix entirely for a section, including the config's, set the template to an empty string: `c.set('headDefaults', { ...c.get('headDefaults'), titleTemplate: '' })`. A page returning `{ title: "Users" }` under `/admin` then produces `<title>Users</title>`.
|
|
100
|
+
|
|
83
101
|
## Precedence
|
|
84
102
|
|
|
85
103
|
When multiple layers provide head data, they merge with this precedence:
|
|
86
104
|
|
|
87
105
|
| Field | Behavior |
|
|
88
106
|
| ----------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
89
|
-
| `title` | Page wins. `titleTemplate` from config wraps the winning title.
|
|
107
|
+
| `title` | Page wins. `titleTemplate` from middleware, or else from config, wraps the winning title. |
|
|
90
108
|
| `meta` | Deduplicates by `name` or `property`. Page entries override matching keys, and non-conflicting entries are appended. |
|
|
91
109
|
| `link` | Concatenated: config first, then middleware, then page. |
|
|
92
110
|
| `script` | Concatenated: config first, then middleware, then page. |
|
|
93
111
|
| `htmlAttrs` | Shallow merge, page wins conflicts. |
|
|
94
112
|
| `bodyAttrs` | Shallow merge, page wins conflicts. |
|
|
95
113
|
|
|
114
|
+
## Absolute crawler URLs
|
|
115
|
+
|
|
116
|
+
Social crawlers and link previews only read an absolute URL. These meta tags are resolved against the request URL when their `content` is a relative path, so you can write them without knowing the origin:
|
|
117
|
+
|
|
118
|
+
- `og:image`, `og:image:url`, `og:image:secure_url`
|
|
119
|
+
- `og:video`, `og:video:url`, `og:video:secure_url`
|
|
120
|
+
- `og:audio`, `og:audio:url`, `og:audio:secure_url`
|
|
121
|
+
- `og:url`
|
|
122
|
+
- `twitter:image`
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
// void.config.ts
|
|
126
|
+
import { defineConfig } from 'void/config';
|
|
127
|
+
|
|
128
|
+
export default defineConfig({
|
|
129
|
+
head: {
|
|
130
|
+
meta: [{ property: 'og:image', content: '/og-image.jpg' }], // [!code highlight]
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
A request to `https://example.com/posts/hello` renders `<meta property="og:image" content="https://example.com/og-image.jpg">`. Values that are already absolute, and every other tag, are left as written. Config, middleware and page values resolve the same way, and the client receives the same absolute value on navigation.
|
|
136
|
+
|
|
137
|
+
Prerendered pages keep the value relative, because the build does not know the site's origin.
|
|
138
|
+
|
|
96
139
|
## HeadDescriptor
|
|
97
140
|
|
|
98
141
|
```ts
|
|
@@ -345,7 +345,9 @@ export default function PostForm() {
|
|
|
345
345
|
|
|
346
346
|
:::
|
|
347
347
|
|
|
348
|
-
`useIslandForm` provides the same form state as [`useForm`](./actions-and-forms#useform). Pass the action URL to `post`, `put`, `patch`, or `delete` to submit.
|
|
348
|
+
`useIslandForm` provides the same form state as [`useForm`](./actions-and-forms#useform). Pass the action URL to `post`, `put`, `patch`, or `delete` to submit.
|
|
349
|
+
|
|
350
|
+
With [`routing.typedRoutes`](../type-safety.md#checked-url-strings), the URL must match one of your routes. Use `routeUrl()` to build it, or `as RouteUrl` for a URL you validate at runtime. See [Checked URL strings](../type-safety.md#checked-url-strings).
|
|
349
351
|
|
|
350
352
|
Successful submissions reload the page; redirects navigate to their destination. A `422` response populates `errors` from `{ errors: { field: "message" } }`. Submit helpers return `Promise<void>`.
|
|
351
353
|
|
|
@@ -217,7 +217,7 @@ A named layout replaces the deepest default layout: in `[root, docs/layout]`, it
|
|
|
217
217
|
|
|
218
218
|
Void uses the closest matching `_layouts/` file in the page's directory or an ancestor. A missing named layout fails the build.
|
|
219
219
|
|
|
220
|
-
|
|
220
|
+
Export `layout` directly from the page as a string literal or `false`. Computed values and re-exports are ignored with a warning.
|
|
221
221
|
|
|
222
222
|
## Shared Data
|
|
223
223
|
|
|
@@ -255,4 +255,4 @@ export const action = defineHandler(async (c) => {
|
|
|
255
255
|
});
|
|
256
256
|
```
|
|
257
257
|
|
|
258
|
-
|
|
258
|
+
If an action changes the user's profile, update shared data there too, as above. Middleware won't run again until the next page request. You can also redirect with `c.redirect()` to load the page and shared data again.
|
|
@@ -27,7 +27,9 @@ export const loader = defineHandler(async (c) => {
|
|
|
27
27
|
|
|
28
28
|
`InferProps` infers the loader’s return type, so page props stay in sync with the data it returns.
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
Return data directly to preserve values such as `Date`, `Map`, `Set`, `bigint`, `RegExp`, `URL`, and `undefined`. Page props and shared data keep these types across rendering, hydration, navigation, and deferred loading, including repeated or cyclic references.
|
|
31
|
+
|
|
32
|
+
Returning `Response.json()` uses JSON conversion instead. Functions and custom class instances can't be sent as page data.
|
|
31
33
|
|
|
32
34
|
## Using the Data in Page Components
|
|
33
35
|
|
|
@@ -453,12 +453,14 @@ voidMarkdown({
|
|
|
453
453
|
shiki: {
|
|
454
454
|
themes: { light: 'github-light', dark: 'github-dark' },
|
|
455
455
|
},
|
|
456
|
+
copyLabel: 'Copy Code',
|
|
456
457
|
});
|
|
457
458
|
```
|
|
458
459
|
|
|
459
|
-
| Option | Type | Default | Description
|
|
460
|
-
| -------------- | -------------------------------- | ------------------------------------------------ |
|
|
461
|
-
| `shiki.themes` | `{ light: string; dark: string}` | `{ light: "github-light", dark: "github-dark" }` | Shiki color themes
|
|
460
|
+
| Option | Type | Default | Description |
|
|
461
|
+
| -------------- | -------------------------------- | ------------------------------------------------ | --------------------------------------------------------- |
|
|
462
|
+
| `shiki.themes` | `{ light: string; dark: string}` | `{ light: "github-light", dark: "github-dark" }` | Shiki color themes |
|
|
463
|
+
| `copyLabel` | `string` | `"Copy Code"` | Title of the code block copy button, for translated sites |
|
|
462
464
|
|
|
463
465
|
Code block languages load on demand from Shiki's bundled languages.
|
|
464
466
|
|
|
@@ -154,7 +154,7 @@ Render and prerender flags combine like this:
|
|
|
154
154
|
| Island page + `ssr = false` | Invalid. Island pages already use the island renderer. |
|
|
155
155
|
| `output: "static"` + `prerender` unset | Auto-prerender pages that have known paths, including client-only shells. |
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
Export `ssr` and `prerender` directly from `.server.ts` as `true` or `false`. Computed values and re-exports are ignored with a warning.
|
|
158
158
|
|
|
159
159
|
### Typed navigation
|
|
160
160
|
|
|
@@ -202,7 +202,7 @@ import { routeUrl } from 'void/routes';
|
|
|
202
202
|
|
|
203
203
|
:::
|
|
204
204
|
|
|
205
|
-
|
|
205
|
+
Enable [`routing.typedRoutes`](../type-safety.md#checked-url-strings) to catch misspelled URLs in links and router calls. Apps created with `void init` already have it enabled.
|
|
206
206
|
|
|
207
207
|
`Link` also supports query data, history replacement, full-page navigation, and cancellation:
|
|
208
208
|
|
|
@@ -308,7 +308,7 @@ import { Link } from '@void/solid';
|
|
|
308
308
|
|
|
309
309
|
`prefetch` and `reloadDocument` work only with GET links. GET `data` becomes query parameters; use scalar values or arrays.
|
|
310
310
|
|
|
311
|
-
|
|
311
|
+
After an update that changes the page-data format, open tabs reload on their next navigation.
|
|
312
312
|
|
|
313
313
|
For programmatic navigation, use `useRouter()`. Pass a typed destination object to `visit()`, `prefetch()`, or `flush()`:
|
|
314
314
|
|
|
@@ -443,7 +443,7 @@ A link is active only on its own path by default. Set `activeMatch="prefix"` to
|
|
|
443
443
|
|
|
444
444
|
`aria-current="page"` marks only the exact page, so select `[aria-current="page"]` to style it differently from its section. A link to `/` is active only on the home page.
|
|
445
445
|
|
|
446
|
-
|
|
446
|
+
Query parameters let you distinguish pagination links from filter tabs. A link is active when the current URL contains all of its query parameters with the same values. Extra parameters and their order don't matter, and a GET link's `data` counts as part of its query:
|
|
447
447
|
|
|
448
448
|
| Current URL | Link | Active |
|
|
449
449
|
| ---------------------------- | ------------------------------ | --------------- |
|
|
@@ -454,7 +454,9 @@ A link without a query ignores the current query, as `/users?page=2` shows above
|
|
|
454
454
|
|
|
455
455
|
On nested pages, `activeMatch="prefix"` compares only the path, so `href="/reports?range=30d"` has `data-void-active` on `/reports/42`.
|
|
456
456
|
|
|
457
|
-
Paths
|
|
457
|
+
Paths are case-sensitive and respect trailing slashes; hashes are ignored. External and non-GET links are never active.
|
|
458
|
+
|
|
459
|
+
To mark a default filter such as an "All" tab, set `aria-current` or `data-void-active` yourself. Your value overrides the computed one.
|
|
458
460
|
|
|
459
461
|
### Pending links
|
|
460
462
|
|
|
@@ -468,32 +470,23 @@ a[data-void-pending] {
|
|
|
468
470
|
}
|
|
469
471
|
```
|
|
470
472
|
|
|
471
|
-
A
|
|
473
|
+
A pending link matches the destination's path, query, and hash. A link to `/users?page=2` won't show as pending while page 3 loads. Non-GET links also match the request method. During `router.refresh()`, links to the current page are pending.
|
|
472
474
|
|
|
473
475
|
A `data-void-pending` you pass to `Link` replaces the computed value. For a loading indicator that covers the whole page, use [`useNavigation()`](../../reference/api/pages.md).
|
|
474
476
|
|
|
475
477
|
### Prefetching
|
|
476
478
|
|
|
477
|
-
Add `prefetch` to a `Link` to load its page before the user clicks
|
|
479
|
+
Add `prefetch` to a `Link` to load its page before the user clicks. This markup works in all four adapters:
|
|
478
480
|
|
|
479
|
-
```
|
|
480
|
-
<Link href="/dashboard" prefetch>
|
|
481
|
-
Dashboard
|
|
482
|
-
</Link>
|
|
481
|
+
```html
|
|
482
|
+
<Link href="/dashboard" prefetch>Dashboard</Link>
|
|
483
483
|
```
|
|
484
484
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
To give every `Link` a prefetch strategy, set `prefetch.defaultStrategy` in the adapter plugin. A `Link` that sets its own `prefetch` keeps it:
|
|
488
|
-
|
|
489
|
-
```ts
|
|
490
|
-
// vite.config.ts
|
|
491
|
-
voidReact({ prefetch: { defaultStrategy: 'hover' } });
|
|
492
|
-
```
|
|
485
|
+
The page loads on hover, keyboard focus, or touch. The next visit can use the cached data. Use `cacheFor` to choose how long to reuse it.
|
|
493
486
|
|
|
494
|
-
|
|
487
|
+
For an app-wide default, set `prefetch.defaultStrategy` in your [adapter plugin](../../reference/api/pages.md#prefetching). A link's own `prefetch` value overrides it. Prefer `'hover'` or `'click'`; `'mount'` and `'visible'` can load many pages in a long list.
|
|
495
488
|
|
|
496
|
-
`Link`
|
|
489
|
+
`Link` skips prefetching when the browser reports data saver or a 2G connection. Only Chromium-based browsers report these settings. See [Prefetching](../../reference/api/pages.md#prefetching) for all strategies and cache options.
|
|
497
490
|
|
|
498
491
|
Prefetching runs the destination's loader, so keep loaders free of side effects such as counting views.
|
|
499
492
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: '
|
|
2
|
+
description: 'Let users sign in to another app with their Void account and approve deployments to their projects.'
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# Connected apps
|
|
@@ -20,7 +20,7 @@ Local development permits exact HTTP callbacks on localhost when the platform's
|
|
|
20
20
|
|
|
21
21
|
The app sends users to Void's authorization page, where Void displays its registered name, operator, callback origin, and requested permission. Sign-in permits reading the user's ID and username. It does not provide an account token or project management access.
|
|
22
22
|
|
|
23
|
-
Users can disconnect
|
|
23
|
+
Users can disconnect apps at `<platform API URL>/oauth/connections`. Access tokens last one hour; apps can renew them with a refresh token for up to 30 days after the user's original sign-in. Revoking that sign-in or suspending the account ends access sooner. The app must then ask the user to sign in again.
|
|
24
24
|
|
|
25
25
|
## Private previews
|
|
26
26
|
|
|
@@ -52,7 +52,14 @@ Disabling the app or disconnecting its grant stops authorization for subsequent
|
|
|
52
52
|
|
|
53
53
|
Discover endpoints at `/.well-known/oauth-authorization-server` on the platform API origin. Use authorization code flow with `scope=profile`, a random `state`, and S256 PKCE. Authenticate token exchanges using HTTP Basic client authentication. Send access tokens as Bearer credentials to `/oauth/userinfo`; its response contains `sub`, `preferred_username`, and the consented `scope`.
|
|
54
54
|
|
|
55
|
-
The code exchange also returns a
|
|
55
|
+
The code exchange also returns a refresh token. To renew access:
|
|
56
|
+
|
|
57
|
+
1. POST `grant_type=refresh_token` and the `refresh_token` to `/oauth/token`, using client Basic authentication.
|
|
58
|
+
2. Save the returned access token and refresh token securely, replacing the old pair.
|
|
59
|
+
|
|
60
|
+
Send one refresh at a time per connection. Each refresh token works once; reusing it revokes the connection and requires the user to reconnect.
|
|
61
|
+
|
|
62
|
+
To request fewer permissions, pass a space-separated `scope`. Later refreshes cannot restore permissions you dropped. Publish tokens (`deploy:approve`) have no refresh token: each publish needs its own approval.
|
|
56
63
|
|
|
57
64
|
For publishing, package the built app with [`prepareDeployArtifact`](/reference/api/deploy). POST to `/oauth/deployment-requests` using the profile token:
|
|
58
65
|
|
|
@@ -16,7 +16,7 @@ Choose a plan to inspect or edit it, copy one into a new plan, or choose the def
|
|
|
16
16
|
|
|
17
17
|
## Use the Dashboard
|
|
18
18
|
|
|
19
|
-
Open **Plans** to see each plan's stable ID, account count, and signup default. Choose **Add plan** to copy an existing plan, or **Edit** to change its display name, limits, build size,
|
|
19
|
+
Open **Plans** to see each plan's stable ID, account count, and signup default. Choose **Add plan** to copy an existing plan, or **Edit** to change its display name, limits, build size, permission to use short project slugs, and [AI Gateway logging default](#ai-gateway-logging).
|
|
20
20
|
|
|
21
21
|
Choose **Review changes** to compare the current and proposed settings and see how many accounts are affected. Review any quota warnings, then choose **Apply changes**. If someone changed the catalog while you were reviewing, open the plan again and create a fresh review.
|
|
22
22
|
|
|
@@ -89,6 +89,39 @@ Storage figures shown for D1, R2, and KV are informational and cannot be edited
|
|
|
89
89
|
|
|
90
90
|
The preview shows the affected account count and checks a sample for accounts already above a proposed quota. Lowering a quota can restrict existing apps, including accounts outside that sample. Usage history and billing periods are preserved, so a plan change does not reset usage. Manual administrator suspensions remain in effect.
|
|
91
91
|
|
|
92
|
+
## AI Gateway Logging {#ai-gateway-logging}
|
|
93
|
+
|
|
94
|
+
Each plan can set how AI Gateway logs AI requests for its accounts' projects: `inherit`, `off`, `metadata`, or `full`. See [AI Gateway logging](../../../reference/cli/platform-users.md#ai-gateway-logging) for what each mode stores. Plans start with `inherit`, which follows the gateway's own setting.
|
|
95
|
+
|
|
96
|
+
A project's own setting from `void platform project ai-logging` always wins over the plan default. Accounts whose plan is not in the catalog use the signup default plan's setting.
|
|
97
|
+
|
|
98
|
+
In the dashboard, choose **Edit** on a plan and pick its **AI Gateway logging default**. In a plan file, set `aiLogging`:
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"aiLogging": "metadata"
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```sh
|
|
107
|
+
void platform config plans set team --file team-plan.json --plan
|
|
108
|
+
void platform config plans set team --file team-plan.json --yes
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
`"aiLogging": "inherit"` clears the plan default. Leaving `aiLogging` out keeps the current value. The interactive menu also offers **AI Gateway logging**. The preview shows the change, such as `AI Gateway logging: inherit → metadata`, and how many projects will receive it.
|
|
112
|
+
|
|
113
|
+
After applying, the CLI publishes the default to every project it affects, then prints:
|
|
114
|
+
|
|
115
|
+
```txt
|
|
116
|
+
AI logging published to 120 projects; expected by 14:03:20 UTC (normally within 2 minutes).
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
A plan default applies to a project once the command prints this line, then normally within 2 minutes. Until then, projects keep their previous behavior and `void platform project show <project-id>` reports `pending_plan_publish`. If publishing stops, the command exits with a nonzero status. Continue it with `void platform config plans sync --yes`, or choose **Continue AI logging publish** on the **Plans** page. The platform also continues it every hour.
|
|
120
|
+
|
|
121
|
+
Copying a plan copies its AI logging default. Changing the signup default also changes the setting for accounts whose plan is not in the catalog. When you remove a plan with a replacement, its accounts use the replacement plan's default. Moving a user to another plan, or transferring a project to a new owner, applies the new plan's default.
|
|
122
|
+
|
|
123
|
+
`void platform config plans show <plan-id>` and the user detail page in the dashboard show the plan's AI Gateway logging default. Plan defaults need a platform release that supports them. On an older platform, the CLI stops and asks you to run `void platform upgrade` first.
|
|
124
|
+
|
|
92
125
|
## Archive or Remove a Plan
|
|
93
126
|
|
|
94
127
|
Archive a plan to stop assigning it to new accounts while preserving its current accounts:
|
|
@@ -34,7 +34,11 @@ Keep prompt and response bodies out of a project's AI Gateway logs while retaini
|
|
|
34
34
|
void platform project ai-logging <project-id> metadata
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
Only platform administrators can change this setting. It
|
|
37
|
+
Only platform administrators can change this setting. It covers the project's AI requests through the platform, including calls with the app's own provider key and calls from `void dev`.
|
|
38
|
+
|
|
39
|
+
Use `inherit` for the gateway's own setting, `off` to store no log entry, or `full` to include bodies. A project's own setting wins over its plan's [AI Gateway logging default](./plans.md#ai-gateway-logging); `inherit` removes the project's own setting.
|
|
40
|
+
|
|
41
|
+
The command prints when new requests are expected to follow the change, normally within 2 minutes. Check it with `void platform project show <project-id>`, which reports a line such as `AI Gateway logging: metadata (from plan "pro") — applied`. The project page in the admin dashboard shows the same line. See [AI Gateway logging](../../../reference/cli/platform-users.md#ai-gateway-logging) for each state, what the setting covers, and billing and Logpush details.
|
|
38
42
|
|
|
39
43
|
### Transferring Project Ownership
|
|
40
44
|
|
|
@@ -47,7 +51,7 @@ void platform project owner <project-id> <new-owner-user-id> --yes
|
|
|
47
51
|
|
|
48
52
|
The preview shows both owners, their plans and suspension state, blockers, and the changes to routing and usage counters. Wait for active rollbacks and builds to finish. For an ordinary active deployment, wait or use `void platform deployment cancel <id>`; rollback deployments cannot be canceled. A managed Sandbox controller also blocks transfer until its cleanup completes, even if no Sandbox container is running; the preview identifies the deployment that owns it.
|
|
49
53
|
|
|
50
|
-
After the transfer, the former owner becomes a project administrator. Existing project-scoped CI deploy credentials are revoked; create replacements as the new owner. The new owner's plan and limits apply immediately. Usage before the transfer remains charged to the former owner; later usage is charged to the new owner. If an apply reports partial convergence, inspect the project and operator event log before repeating it.
|
|
54
|
+
After the transfer, the former owner becomes a project administrator. Existing project-scoped CI deploy credentials are revoked; create replacements as the new owner. The new owner's plan and limits apply immediately. Its AI Gateway logging default applies to new AI requests, normally within 2 minutes, unless the project has its own setting. Usage before the transfer remains charged to the former owner; later usage is charged to the new owner. If an apply reports partial convergence, inspect the project and operator event log before repeating it.
|
|
51
55
|
|
|
52
56
|
By default, new users on a self-hosted installation start with the `custom` profile, which
|
|
53
57
|
does not cap application requests, AI usage, deployment frequency, or retained
|
|
@@ -21,16 +21,18 @@ Keep one password-manager entry for this platform. Paste the saved values into t
|
|
|
21
21
|
|
|
22
22
|
## Cloudflare API Tokens {#runtime-token-permissions}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
For
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
workers.dev
|
|
24
|
+
Follow the installer's [token-creation links](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/) to create a runtime token. Void also asks for a separate management token when it creates a zone, adds wildcard DNS, or configures Access. The links select the permissions and suggest names based on your platform's name.
|
|
25
|
+
|
|
26
|
+
For a domain installation, choose the zone scope in Cloudflare's form:
|
|
27
|
+
|
|
28
|
+
- **Existing zone:** change **All Domains** to **Specified Domains** and select your zone.
|
|
29
|
+
- **New zone:** keep **All Domains** on both tokens. The zone doesn't exist yet, and the runtime token will need cache-purge access to it.
|
|
30
|
+
|
|
31
|
+
Save the tokens in your password manager and paste them into the masked CLI prompts.
|
|
32
|
+
|
|
33
|
+
Browser login can authorize workers.dev setup with the default API hostname. It also works for a domain installation with an existing proxied `*.<application domain>` record. If Void cannot read the account's Access requirements, it asks for a scoped Access token.
|
|
34
|
+
|
|
35
|
+
Configuring Access requires a management token, including on workers.dev. Protected apps and public apps under Default-Deny also need an ongoing app-management token, which Void stores encrypted. Skip zone permissions until you add a domain.
|
|
34
36
|
|
|
35
37
|
Browser login does not grant AI Gateway access. Include **Account → AI Gateway → Edit** on the runtime token so Void can verify and create that resource.
|
|
36
38
|
|
|
@@ -114,6 +114,8 @@ void platform upgrade [id]
|
|
|
114
114
|
|
|
115
115
|
An upgrade validates the runtime, applies supported pending migrations, deploys the Workers, and checks their health. Existing Worker secrets are preserved.
|
|
116
116
|
|
|
117
|
+
Install, upgrade, and repair also publish the saved [AI Gateway logging](/reference/cli/platform-users#ai-gateway-logging) settings (**Publishing AI logging settings**). For about 2 minutes afterward, `void platform project show` reports projects with a setting other than `inherit` as `pending`, as well as projects it switched back to `inherit`.
|
|
118
|
+
|
|
117
119
|
Before starting, Void checks access to the installation's Cloudflare account, Workers, and existing R2 buckets. If credentials are rejected, set `CLOUDFLARE_API_TOKEN` to a management token scoped to that account and retry. This overrides the installation's saved management token.
|
|
118
120
|
|
|
119
121
|
Some upgrades pause application traffic until the new version passes health checks. If a command fails while traffic is paused:
|
|
@@ -144,6 +146,8 @@ Keep the earlier runtime files if you need rollback. If the installed version is
|
|
|
144
146
|
|
|
145
147
|
Do not roll back to 0.26.0 or earlier after upgrading to a later release. Void does not refuse this rollback, but those releases reject the credentials that later releases give your apps. Every project deployed or rotated since the upgrade loses AI, email, ISR revalidation, remote D1, KV, and R2, and prerendering until you upgrade again. If you have rolled back that far, upgrade again, then run `void platform system rotate-proxy-tokens --all --yes` and check with `--plan` until nothing is pending or failed.
|
|
146
148
|
|
|
149
|
+
After a rollback to 1.8.0, plan [AI Gateway logging](/guide/platform/administration/plans#ai-gateway-logging) defaults are not applied: projects that follow a plan default use the gateway's own setting, which logs prompts and responses on a new installation. Project settings still apply. Plan defaults stay saved, and the next upgrade publishes them again. A rollback to a release before 1.8.0 applies no AI logging settings.
|
|
150
|
+
|
|
147
151
|
Let running rotations finish before you roll back. If an older proxy runs next to a newer API, prerendering and remote D1, KV, and R2 fail until both run the same release. After a rollback to the release just before credential rotation, projects deployed since the upgrade lose prerendering and remote D1, KV, and R2 until they are deployed again or you upgrade again. A rotated project deployed during any rollback stays broken after you upgrade again, and 0.26.0 and earlier also drop rotations that have not finished. After upgrading again from any rollback, run the same `rotate-proxy-tokens` commands.
|
|
148
152
|
|
|
149
153
|
:::
|
|
@@ -157,7 +161,9 @@ void platform upgrade [id] --runtime-logs minimal
|
|
|
157
161
|
void platform upgrade [id] --runtime-logs full
|
|
158
162
|
```
|
|
159
163
|
|
|
160
|
-
|
|
164
|
+
The setting also applies to existing project deployments, and later upgrades keep it. Previously stored logs remain until Cloudflare's retention period ends.
|
|
165
|
+
|
|
166
|
+
If updating project logs fails, the platform upgrade still completes and prints a recovery command. Run `void platform repair [id]` after switching to minimal, or repeat the upgrade after switching to full.
|
|
161
167
|
|
|
162
168
|
While runtime logs are minimal, `void platform rollback` refuses a runtime that does not support the setting. Run `void platform upgrade [id] --runtime-logs full` first.
|
|
163
169
|
|
|
@@ -13,7 +13,9 @@ For workers.dev testing, start the interactive install and choose your login met
|
|
|
13
13
|
void platform install --workers-dev
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Void asks for a management API token when it needs to create a zone, add wildcard DNS, or configure Access. Follow the token-creation link and paste the token into the masked prompt. For an existing domain, change **All Domains** to **Specified Domains** and select your zone.
|
|
17
|
+
|
|
18
|
+
Browser login can use an existing proxied `*.<application domain>` record, but cannot change DNS or configure Access. Interactive installation doesn't require shell environment variables.
|
|
17
19
|
|
|
18
20
|
::: details Use an existing management token from the shell
|
|
19
21
|
|
|
@@ -96,7 +98,7 @@ explicit app-management token; it never silently retains an installer-only token
|
|
|
96
98
|
|
|
97
99
|
## Choose what runtime logs record {#runtime-logs}
|
|
98
100
|
|
|
99
|
-
By default,
|
|
101
|
+
By default, runtime logs include request URLs, console output, and exception messages. Project owners read them with `void project logs`; administrators use `void platform deployment logs`. Logs stay in your Cloudflare account, in Workers Logs and the platform's log history.
|
|
100
102
|
|
|
101
103
|
If your apps can put personal data in URLs, logs, or error messages, install with minimal runtime logs:
|
|
102
104
|
|
|
@@ -106,10 +108,9 @@ void platform install --runtime-logs minimal
|
|
|
106
108
|
|
|
107
109
|
With minimal runtime logs:
|
|
108
110
|
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
- Log views say that messages and URLs are not recorded on this platform.
|
|
111
|
+
- Workers Logs is disabled for platform and project Workers.
|
|
112
|
+
- The platform's log history keeps request times, methods, statuses, outcomes, deployments, log levels, and exception names. URLs and message text are omitted.
|
|
113
|
+
- You can still filter by `--level` or search exception names with `--filter`. Log views show that URLs and messages aren't recorded.
|
|
113
114
|
|
|
114
115
|
The setting covers the whole platform. To change it later, see [Change runtime logs](/guide/platform/installation/maintenance#runtime-logs).
|
|
115
116
|
|
|
@@ -282,6 +283,6 @@ Resume restores your selected Hyperdrive. If that selection is missing from the
|
|
|
282
283
|
|
|
283
284
|
If Cloudflare rejects a saved runtime token, Void opens the token page and asks for a replacement. For a missing [email permission](/guide/platform/installation/credentials#enable-email), update the existing token's permissions and resume. If you supplied a token through an environment variable, update that variable.
|
|
284
285
|
|
|
285
|
-
To replace
|
|
286
|
+
To replace a revoked runtime token, set `VOID_PLATFORM_RUNTIME_CLOUDFLARE_API_TOKEN` to its replacement and resume. Void saves it and updates any platform Workers deployed by the interrupted run.
|
|
286
287
|
|
|
287
288
|
:::
|
package/docs/guide/queues.md
CHANGED
|
@@ -111,7 +111,7 @@ export default defineQueue<Message>(async (batch, env) => {
|
|
|
111
111
|
- `maxRetries`: maximum number of retries before delivery is exhausted (default `3`)
|
|
112
112
|
- `retryDelay`: seconds to wait between retries (default `0`)
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
Export each option directly from the queue file as a whole number, such as `export const maxRetries = 5`. Computed values and re-exports aren't supported; repeat shared settings in each queue file.
|
|
115
115
|
|
|
116
116
|
Void-managed queues do not configure a dead-letter queue. Cloudflare permanently
|
|
117
117
|
deletes messages that exhaust their retries without one; see
|
|
@@ -17,7 +17,7 @@ Dynamic segments use brackets: `[id]` becomes a route parameter and `[...slug]`
|
|
|
17
17
|
|
|
18
18
|
### Overlapping routes
|
|
19
19
|
|
|
20
|
-
When
|
|
20
|
+
When routes overlap, the most specific one handles the request. From left to right, static segments take priority over parameters. Catch-all routes run last:
|
|
21
21
|
|
|
22
22
|
```
|
|
23
23
|
routes/
|
|
@@ -27,7 +27,7 @@ routes/
|
|
|
27
27
|
[...path].ts → handles URLs no other route matches
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
Use one route for each pattern. `[id].ts` and `[slug].ts` match the same URLs; renaming a parameter doesn't change priority.
|
|
31
31
|
|
|
32
32
|
### Environment-only routes
|
|
33
33
|
|
package/docs/guide/sse.md
CHANGED
|
@@ -142,7 +142,7 @@ stream.close();
|
|
|
142
142
|
|
|
143
143
|
The client wraps native `EventSource`. It supports cookie credentials and typed event handlers, but it does not support request bodies or arbitrary headers. Use cookie auth, signed URLs, or a fetch-based streaming route when you need custom headers.
|
|
144
144
|
|
|
145
|
-
With [`routing.typedRoutes`](../reference/config.md#routing-typedroutes), the URL
|
|
145
|
+
With [`routing.typedRoutes`](../reference/config.md#routing-typedroutes), TypeScript checks the URL against your routes, such as `` `/api/jobs/${id}` ``. External `http://` and `https://` URLs also work. For a URL you validate at runtime, use `as RouteUrl` from `void/routes` to skip the type check.
|
|
146
146
|
|
|
147
147
|
JSON parsing is the default. Set `parse: 'text'` or pass a custom parser for non-JSON payloads:
|
|
148
148
|
|
package/docs/guide/ssg.md
CHANGED
|
@@ -33,9 +33,11 @@ export default defineConfig({
|
|
|
33
33
|
});
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
`/posts/`
|
|
36
|
+
Void writes `/posts/` to `posts/index.html` and `/posts/hello/` to `posts/hello/index.html`. Use trailing slashes in your links; generated route types follow this setting. In development and when served by Void, URLs without the slash redirect to it. API URLs stay the same.
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
The default is `false`, which writes `posts.html`. The error page stays at `404.html` in either mode.
|
|
39
|
+
|
|
40
|
+
On Cloudflare, use default HTML handling or `force-trailing-slash`, rather than `drop-trailing-slash`. Third-party frameworks use their own URL settings.
|
|
39
41
|
|
|
40
42
|
## Per-page overrides
|
|
41
43
|
|
|
@@ -46,7 +48,7 @@ Individual pages can opt out of prerendering:
|
|
|
46
48
|
export const prerender = false;
|
|
47
49
|
```
|
|
48
50
|
|
|
49
|
-
|
|
51
|
+
For dynamic pages, return the paths to render from `getPrerenderPaths()`. Annotate the return type with [`PageParams`](../reference/api/types.md#route-types) to check the parameter names:
|
|
50
52
|
|
|
51
53
|
```ts
|
|
52
54
|
// pages/blog/[slug].server.ts
|
|
@@ -57,7 +59,9 @@ export async function getPrerenderPaths(): Promise<PageParams<'/blog/[slug]'>[]>
|
|
|
57
59
|
}
|
|
58
60
|
```
|
|
59
61
|
|
|
60
|
-
|
|
62
|
+
Return every required parameter as a string or number. Void URL-encodes the values. For a value containing `/`, use a catch-all page such as `pages/docs/[...slug]` with `{ slug: 'guides/intro' }`.
|
|
63
|
+
|
|
64
|
+
TypeScript needs the annotation above to check the keys. Invalid entries stop the build with their server filename and index.
|
|
61
65
|
|
|
62
66
|
## 404 pages
|
|
63
67
|
|
|
@@ -80,8 +84,15 @@ With the default `output: "server"`, use `export const prerender = true` for dep
|
|
|
80
84
|
|
|
81
85
|
`void deploy` chooses the deployment automatically:
|
|
82
86
|
|
|
83
|
-
- **Fully static:**
|
|
84
|
-
- **Hybrid:**
|
|
87
|
+
- **Fully static:** every page is prerendered, with no API routes, middleware, cron jobs, or queues. Void deploys the built files as a static site.
|
|
88
|
+
- **Hybrid:** some pages need server rendering, such as a dynamic page without `getPrerenderPaths()` or a page with `prerender = false`. Void deploys a Worker for those routes and serves prerendered pages as static assets.
|
|
89
|
+
|
|
90
|
+
On direct Cloudflare deployments, static files can bypass the Worker:
|
|
91
|
+
|
|
92
|
+
- Fully static apps serve files directly. [Edge rules](./edge/headers.md), including `_headers` or `_redirects` in `public/`, require a small Worker on every request.
|
|
93
|
+
- Hybrid apps serve prerendered pages directly when they have no `.server.ts` companion. API routes, dynamic pages, and pages with server companions run in the Worker.
|
|
94
|
+
|
|
95
|
+
Every page uses the Worker if the app has middleware, auth, live updates, edge rules, a custom Vite `base`, a `routing.notFound` value other than `"none"`, or a dynamic page at the root of `pages/`, such as `pages/[slug].vue`. With these settings, prerendered requests also run through the Worker.
|
|
85
96
|
|
|
86
97
|
## Relationship to `inference.appType: "static"`
|
|
87
98
|
|
package/docs/guide/storage.md
CHANGED
|
@@ -69,7 +69,7 @@ Files your users upload can contain HTML or scripts. Store them under keys your
|
|
|
69
69
|
|
|
70
70
|
## Custom bindings
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
To use another R2 bucket, add it to `cloudflare.r2_buckets` in `void.config.ts`, for example `{ binding: 'MY_BUCKET', bucket_name: 'uploads' }`. Run `void prepare`, then pass the typed binding to `createStorage()`:
|
|
73
73
|
|
|
74
74
|
```ts
|
|
75
75
|
import { defineHandler } from 'void';
|