void 1.7.0 → 1.8.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-BfkJ_1PC.mjs → account-cmd-CZKntRH2.mjs} +5 -5
- package/dist/action-key-ByZ6DDld.mjs +64 -0
- package/dist/{application-analysis-OV0CBJ80.mjs → application-analysis-CyTagJQM.mjs} +25 -5
- package/dist/{application-routing-QpyC5G8z.mjs → application-routing-BLrMVpqi.mjs} +1 -1
- package/dist/{auth-CZrthGxs.d.mts → auth-Bk9VGtQW.d.mts} +1 -1
- package/dist/{auth-link-CW1Zh6FM.mjs → auth-link-BOaQWMKw.mjs} +5 -5
- package/dist/{auth-router-CNBKnEZi.mjs → auth-router-D0-VcmDs.mjs} +3 -3
- package/dist/{better-auth-shared-C-0uZg8-.d.mts → better-auth-shared-CQFdtguU.d.mts} +2 -2
- package/dist/boundary-plans-CRmWH68v.d.mts +25 -0
- package/dist/{build-cmd-C9qOKW9W.mjs → build-cmd-JTsXXf2F.mjs} +4 -4
- package/dist/{cache-DVBBbWQL.mjs → cache-D0m3Z_Xf.mjs} +4 -4
- package/dist/{cancel-deploy-COavnjud.mjs → cancel-deploy-Ce6Os4fa.mjs} +3 -3
- package/dist/cli/cli.mjs +1 -1
- package/dist/cli/cloudflare-operation-process.mjs +92 -19
- package/dist/cli/env-schema-probe.d.mts +1 -1
- package/dist/cli/env-schema-probe.mjs +2 -2
- package/dist/{cli-main-DFteHrJI.mjs → cli-main-rkrJy2Ge.mjs} +32 -32
- package/dist/client-D1Vz1Zep.mjs +1 -0
- package/dist/{client-BEZmTP6p.mjs → client-SZPyj4X_.mjs} +1 -1
- package/dist/{cloudflare-auth-DGIivpTb.mjs → cloudflare-auth-7jTqy9Bx.mjs} +1 -1
- package/dist/{cloudflare-cmd-DJaxC-bc.mjs → cloudflare-cmd-ChPLQcTP.mjs} +4 -4
- package/dist/{cloudflare-connect-BjpWmglw.mjs → cloudflare-connect-Co93VYTo.mjs} +2 -2
- package/dist/{cloudflare-operations-k7wYUv56.mjs → cloudflare-operations-CXaDKYj2.mjs} +4 -4
- package/dist/{cloudflare-operations-CZkjFrzH.mjs → cloudflare-operations-DATekLwI.mjs} +1 -1
- package/dist/{cloudflare-process-BcPvlMFd.mjs → cloudflare-process-DmTxZR-N.mjs} +1 -1
- package/dist/{connect-j1F1C_rW.mjs → connect-DlvXt1JR.mjs} +6 -6
- package/dist/{create-project-CE3jOmd5.mjs → create-project-CC_7hmYJ.mjs} +4 -4
- package/dist/{create-project-DZH3aYGQ.mjs → create-project-DzY05xqC.mjs} +1 -1
- package/dist/{db-DyLzzxvM.mjs → db-FhyYGcJJ.mjs} +13 -13
- package/dist/{db-types-DdHHUVPy.mjs → db-types-sVwEpyPR.mjs} +3 -1
- package/dist/{delete-Dey6YoMA.mjs → delete-CModjyOC.mjs} +4 -4
- package/dist/{deploy-Ccw2D2lw.mjs → deploy-Cz9TEzZy.mjs} +34 -24
- package/dist/deploy-DMieisRu.mjs +2 -0
- package/dist/{deploy-managed-static-BBVtpuGv.mjs → deploy-managed-static-DlxxXkAM.mjs} +10 -10
- package/dist/{deploy-transport-Dt0IvSVW.mjs → deploy-transport-DUvm6-CR.mjs} +2 -2
- package/dist/deploy.mjs +5 -5
- package/dist/{dispatch-pYaww76u.mjs → dispatch-CCiaAnSK.mjs} +4 -4
- package/dist/{dist-DeTdhbZc.mjs → dist-Cp4b1_T9.mjs} +1 -1
- package/dist/{dist-BQdgCVQF.mjs → dist-STQXl8ck.mjs} +86 -138
- package/dist/{domain-Dh3mG8Vs.mjs → domain-DvdZPA50.mjs} +5 -5
- package/dist/{drizzle-C8MPqt5m.mjs → drizzle-D4V_06-B.mjs} +1 -1
- package/dist/{drizzle-lFdzSEa9.mjs → drizzle-DBSpPpU1.mjs} +34 -8
- package/dist/{email-DKyMjOYM.mjs → email-ASpNrfLd.mjs} +7 -7
- package/dist/{email-cloudflare-CTt2n_W2.mjs → email-cloudflare-kqoN9jst.mjs} +13 -8
- package/dist/{entry-Bw-G1VVx.mjs → entry-BweGTCgj.mjs} +1 -1
- package/dist/{env-DkZzh_Dd.mjs → env-Bpkg3G5i.mjs} +5 -5
- package/dist/{env-CuzZZyjB.mjs → env-UqS-21xi.mjs} +8 -1
- package/dist/{env-public-CeNeO_AT.d.mts → env-public-DtJL_hZq.d.mts} +8 -7
- package/dist/{env-validation-1snjKtDX.mjs → env-validation-BpCCQE_6.mjs} +3 -3
- package/dist/{env-validation-C8NL3lEH.mjs → env-validation-CN386Utu.mjs} +1 -1
- package/dist/gen-M5fNQKfH.mjs +1 -0
- package/dist/{gen-BZmFOGDQ.mjs → gen-upKJChvd.mjs} +3 -3
- package/dist/{github-cmd-7Oky9qgH.mjs → github-cmd-BvMOlb8Z.mjs} +4 -4
- package/dist/{handler-DjqciiDc.d.mts → handler-BO7Od-z9.d.mts} +3 -2
- package/dist/{headers-CimYIfQI.mjs → headers-COGEDoMN.mjs} +10 -1
- package/dist/help-CItQVDL4.mjs +1 -0
- package/dist/{help-CNuUb47C.mjs → help-TPCjTu6e.mjs} +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +247 -178
- package/dist/{info-DwB8IWIx.mjs → info-EsDyihwf.mjs} +2 -2
- package/dist/{init-CUGSmcED.mjs → init-a4lVagrb.mjs} +13 -14
- package/dist/{link-BlRTGHan.mjs → link-CE55DDzS.mjs} +5 -5
- package/dist/{list-iCg7d5Pa.mjs → list-CxRthQks.mjs} +5 -5
- package/dist/{live-zKGbRT4h.d.mts → live-Kc55iuOQ.d.mts} +2 -2
- package/dist/{login-TA51e5Fw.mjs → login-AfcSGSmE.mjs} +4 -4
- package/dist/login-ZHsAm-I6.mjs +1 -0
- package/dist/{logs-BlyAxlvx.mjs → logs-BgRJuvb1.mjs} +4 -4
- package/dist/{migrate-BH6LCr00.mjs → migrate-BNAh6m_C.mjs} +2 -2
- package/dist/migrate-BflbbZQK.mjs +1 -0
- package/dist/nitro.mjs +2 -2
- package/dist/{node-B0otYjDv.mjs → node-CXFUw0Uz.mjs} +2 -2
- package/dist/{operator-args-DuKAQ3Ks.mjs → operator-args-DGTuCdSE.mjs} +8 -0
- package/dist/{operator-cmd-CoHlJjcT.mjs → operator-cmd-C-viB7Si.mjs} +4 -4
- package/dist/operator-cmd-D6qNuJ_z.mjs +1 -0
- package/dist/output-BsdnNpxa.mjs +1 -0
- package/dist/{output-CXJTIAtF.mjs → output-DNVILSz2.mjs} +1 -1
- package/dist/pages/client.d.mts +28 -3
- package/dist/pages/client.mjs +132 -15
- package/dist/pages/index.d.mts +3 -2
- package/dist/pages/index.mjs +2 -2
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/islands-plugin.mjs +13 -2
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/{platform-args-DfT8yQBF.mjs → platform-args-CiYeZmc5.mjs} +1 -1
- package/dist/platform-args-DJvF1-kl.mjs +1 -0
- package/dist/{platform-auth-config-MO0VdVs9.mjs → platform-auth-config-Dt2qEc2w.mjs} +6 -6
- package/dist/{platform-auth-protection-Dv208eyL.mjs → platform-auth-protection-B7TaF-PZ.mjs} +4 -4
- package/dist/{platform-auth-recovery-DvAQ674F.mjs → platform-auth-recovery-suXSteJ6.mjs} +4 -4
- package/dist/{platform-cmd-dlSxrcQ7.mjs → platform-cmd-9rvYBBtr.mjs} +7 -7
- package/dist/{platform-cmd-BpUA19r_.mjs → platform-cmd-DuAsIxbU.mjs} +1 -1
- package/dist/{platform-domain-DSO4eUEw.mjs → platform-domain-DhH_vDr6.mjs} +4 -4
- package/dist/{platform-lifecycle-CfcFygHb.mjs → platform-lifecycle-3uI-E2bF.mjs} +1 -1
- package/dist/{platform-lifecycle-BSvsyB_x.mjs → platform-lifecycle-CXmXe2xt.mjs} +13 -13
- package/dist/{platform-management-CrP1XhVd.mjs → platform-management-BBCHfwji.mjs} +3 -3
- package/dist/{platform-management-BMdyt667.mjs → platform-management-PdrgDQTe.mjs} +1 -1
- package/dist/{platform-plans-config-CgDiwflR.mjs → platform-plans-config-BGwkXYDM.mjs} +2 -2
- package/dist/{platform-recovery-CHWwXVZ6.mjs → platform-recovery-C8NxXGRR.mjs} +2 -2
- package/dist/{platform-setup-BTQVbnTC.mjs → platform-setup-Casiffqj.mjs} +2 -2
- package/dist/{plugin-inference-g66Q1Mx9.mjs → plugin-inference-CErfTgEx.mjs} +3 -3
- package/dist/{prepare-DXduEwQp.mjs → prepare-BDKWZgfL.mjs} +5 -5
- package/dist/{prepare-DJYHjpzq.mjs → prepare-BLrzXjIl.mjs} +3 -3
- package/dist/prepare-a1_5usAn.mjs +1 -0
- package/dist/{prerender-render-BN9Lmebs.mjs → prerender-render-BAdYhivW.mjs} +15 -2
- package/dist/prerender-render.d.mts +2 -0
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-cmd-Dfb1Sg8w.mjs → project-cmd-DzGvxXKH.mjs} +17 -17
- package/dist/{project-team-BO2dyc7S.mjs → project-team-C5XtHbZk.mjs} +4 -4
- package/dist/{project-token-ByO2mEI2.mjs → project-token-B4D5yhHQ.mjs} +4 -4
- package/dist/{project-zero-trust-CoQfwRBR.mjs → project-zero-trust--0LvktDg.mjs} +4 -4
- package/dist/{protocol-yxdHxFLN.mjs → protocol-B1Tvc9-x.mjs} +191 -69
- package/dist/{protocol-xZMvWsrg.d.mts → protocol-Cg2I81NA.d.mts} +9 -2
- package/dist/{provision-D5q-ptD3.mjs → provision-C3yiHdld.mjs} +1 -1
- package/dist/{provision-CMH4-8ri.mjs → provision-CAcrauvr.mjs} +1 -1
- package/dist/{requests-CPOiDkjh.mjs → requests-CrRiTgQA.mjs} +3 -3
- package/dist/resolve-project-C5wC-Hoi.mjs +1 -0
- package/dist/{resolve-project-ClvLMTI9.mjs → resolve-project-Da3OgCU1.mjs} +1 -1
- package/dist/{rollback-BfCs2la4.mjs → rollback-BsmQyj-Q.mjs} +4 -4
- package/dist/{route-types-Cl3x0Q8B.mjs → route-types-CgtlFCDz.mjs} +3 -2
- package/dist/routes-stub.d.mts +4 -3
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/client-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/db.d.mts +6 -3
- package/dist/runtime/db.mjs +2 -2
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/env-public.mjs +53 -39
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/routing.d.mts +8 -3
- package/dist/runtime/routing.mjs +161 -21
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +3 -3
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{scan-L8OSv1f7.mjs → scan-BJ3bj6aP.mjs} +228 -27
- package/dist/{secret-CuI6LTpD.mjs → secret-D0g5oBsP.mjs} +6 -6
- package/dist/{skills-BBO9wMjB.mjs → skills-CoBB9_Ao.mjs} +1 -1
- package/dist/{ast-bindings-BkivMJIo.mjs → static-exports-DFkzL-NX.mjs} +96 -33
- package/dist/{subcommand-prompt-BZMnCA8T.mjs → subcommand-prompt-0yIARXf2.mjs} +2 -2
- package/dist/{types-agfx0alu.d.mts → types-IPut3_Yx.d.mts} +15 -1
- package/dist/{wrapper-BGsi_uHs.mjs → wrapper-CVMZarxf.mjs} +1 -1
- package/dist/{ws-DB8Feytg.d.mts → ws--U7QicYy.d.mts} +2 -2
- package/docs/guide/ai.md +1 -0
- package/docs/guide/app-types.md +1 -0
- package/docs/guide/auth.md +1 -0
- package/docs/guide/database/d1.md +16 -1
- package/docs/guide/database/mysql.md +1 -0
- package/docs/guide/database/postgresql.md +1 -0
- package/docs/guide/database.md +1 -0
- package/docs/guide/deployment.md +1 -0
- package/docs/guide/durable-state.md +1 -0
- package/docs/guide/edge/headers.md +1 -0
- package/docs/guide/edge/prerendering.md +1 -0
- package/docs/guide/edge/redirects.md +1 -0
- package/docs/guide/edge/revalidation.md +3 -0
- package/docs/guide/edge/rewrites.md +1 -0
- package/docs/guide/edge/static-assets.md +1 -0
- package/docs/guide/email/domains.md +1 -0
- package/docs/guide/email/receiving.md +3 -2
- package/docs/guide/email/sending.md +3 -2
- package/docs/guide/email.md +1 -0
- package/docs/guide/env-vars.md +4 -0
- package/docs/guide/index.md +1 -0
- package/docs/guide/jobs.md +1 -0
- package/docs/guide/kv.md +1 -0
- package/docs/guide/live.md +1 -0
- package/docs/guide/pages-routing/actions-and-forms.md +36 -18
- package/docs/guide/pages-routing/errors.md +101 -0
- package/docs/guide/pages-routing/head.md +1 -0
- package/docs/guide/pages-routing/islands.md +1 -0
- package/docs/guide/pages-routing/layouts.md +3 -0
- package/docs/guide/pages-routing/loaders.md +1 -0
- package/docs/guide/pages-routing/markdown.md +1 -1
- package/docs/guide/pages-routing/overview.md +3 -0
- package/docs/guide/pages-routing/view-transitions.md +1 -0
- package/docs/guide/platform/administration/access.md +1 -0
- package/docs/guide/platform/administration/connected-apps.md +4 -0
- package/docs/guide/platform/administration/email.md +1 -0
- package/docs/guide/platform/administration/operations.md +1 -0
- package/docs/guide/platform/administration/plans.md +1 -0
- package/docs/guide/platform/administration/projects.md +11 -0
- package/docs/guide/platform/administration/zero-trust.md +1 -0
- package/docs/guide/platform/development/local.md +1 -0
- package/docs/guide/platform/development/runtime.md +1 -0
- package/docs/guide/platform/development/schema-ci.md +1 -0
- package/docs/guide/platform/installation/ci.md +1 -0
- package/docs/guide/platform/installation/credentials.md +1 -0
- package/docs/guide/platform/installation/domains.md +1 -0
- package/docs/guide/platform/installation/first-deployment.md +1 -0
- package/docs/guide/platform/installation/maintenance.md +1 -0
- package/docs/guide/platform/installation/prerequisites.md +1 -0
- package/docs/guide/platform/installation/setup.md +1 -0
- package/docs/guide/platform/installation/uninstall.md +1 -0
- package/docs/guide/platform-administration.md +1 -0
- package/docs/guide/platform-development.md +1 -0
- package/docs/guide/project-collaboration.md +1 -0
- package/docs/guide/queues.md +3 -0
- package/docs/guide/quickstart.md +3 -2
- package/docs/guide/remote-dev.md +1 -0
- package/docs/guide/sandboxes.md +1 -0
- package/docs/guide/self-hosted-platform.md +1 -0
- package/docs/guide/server-routing.md +1 -0
- package/docs/guide/sse.md +1 -0
- package/docs/guide/ssg.md +1 -0
- package/docs/guide/ssr.md +1 -0
- package/docs/guide/storage.md +1 -0
- package/docs/guide/testing.md +62 -0
- package/docs/guide/type-safety.md +1 -0
- package/docs/guide/typed-fetch.md +1 -0
- package/docs/guide/websockets.md +1 -0
- package/docs/index.md +1 -0
- package/docs/integrations/agents.md +1 -0
- package/docs/integrations/cloudflare.md +1 -0
- package/docs/integrations/frameworks/analog.md +1 -0
- package/docs/integrations/frameworks/astro.md +1 -0
- package/docs/integrations/frameworks/nuxt.md +1 -0
- package/docs/integrations/frameworks/overview.md +1 -0
- package/docs/integrations/frameworks/react-router.md +1 -0
- package/docs/integrations/frameworks/sveltekit.md +1 -0
- package/docs/integrations/frameworks/tanstack-start.md +1 -0
- package/docs/integrations/hono.md +1 -0
- package/docs/integrations/nodejs-bun-deno.md +1 -0
- package/docs/reference/api/auth.md +1 -0
- package/docs/reference/api/client.md +1 -0
- package/docs/reference/api/database.md +24 -1
- package/docs/reference/api/deploy.md +4 -0
- package/docs/reference/api/durable.md +1 -0
- package/docs/reference/api/env.md +1 -0
- package/docs/reference/api/handlers.md +1 -0
- package/docs/reference/api/pages.md +22 -4
- package/docs/reference/api/plugin.md +1 -0
- package/docs/reference/api/resources.md +1 -0
- package/docs/reference/api/rewrites.md +2 -1
- package/docs/reference/api/types.md +1 -0
- package/docs/reference/api.md +1 -0
- package/docs/reference/cli/auth.md +1 -0
- package/docs/reference/cli/database.md +1 -0
- package/docs/reference/cli/deploy.md +1 -0
- package/docs/reference/cli/domains.md +1 -0
- package/docs/reference/cli/email.md +1 -0
- package/docs/reference/cli/generate.md +1 -0
- package/docs/reference/cli/github.md +1 -0
- package/docs/reference/cli/platform-config.md +1 -0
- package/docs/reference/cli/platform-email.md +1 -0
- package/docs/reference/cli/platform-installation.md +1 -0
- package/docs/reference/cli/platform-operations.md +1 -0
- package/docs/reference/cli/platform-users.md +23 -0
- package/docs/reference/cli/platform-zero-trust.md +1 -0
- package/docs/reference/cli/platform.md +1 -0
- package/docs/reference/cli/project.md +1 -0
- package/docs/reference/cli/secrets.md +1 -0
- package/docs/reference/cli/setup.md +1 -0
- package/docs/reference/cli.md +3 -0
- package/docs/reference/config.md +1 -0
- package/docs/reference/resource-inference.md +1 -0
- package/docs/reference/structure.md +1 -0
- package/package.json +25 -25
- package/skills/void/SKILL.md +2 -0
- package/dist/action-key-XtKKbbsi.mjs +0 -25
- package/dist/client-BAxLpSKv.mjs +0 -1
- package/dist/deploy-DEZkUS77.mjs +0 -2
- package/dist/gen-C6iknRdI.mjs +0 -1
- package/dist/help-C_cqTByy.mjs +0 -1
- package/dist/login-C4q1S-5b.mjs +0 -1
- package/dist/migrate-CVBsSFhC.mjs +0 -1
- package/dist/operator-cmd-DnaCnCSP.mjs +0 -1
- package/dist/output-CNsMDEd2.mjs +0 -1
- package/dist/platform-args-B7-wQ0_B.mjs +0 -1
- package/dist/prepare-Bx4a8cb1.mjs +0 -1
- package/dist/resolve-project-BALVa9q0.mjs +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { H as outro, L as log } from "./dist-
|
|
1
|
+
import { H as outro, L as log } from "./dist-STQXl8ck.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-CCk9Seol.mjs";
|
|
3
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
-
import { h as sanitizeTerminalText, m as printSuccess, p as note } from "./output-
|
|
3
|
+
import { r as PlatformClient } from "./client-SZPyj4X_.mjs";
|
|
4
|
+
import { h as sanitizeTerminalText, m as printSuccess, p as note } from "./output-DNVILSz2.mjs";
|
|
5
5
|
import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
6
|
-
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-
|
|
6
|
+
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Da3OgCU1.mjs";
|
|
7
7
|
// src/cli/project-zero-trust.ts
|
|
8
8
|
async function resolveTarget(root, args) {
|
|
9
9
|
const token = getToken(root);
|
|
@@ -1,9 +1,24 @@
|
|
|
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
|
-
import {
|
|
3
|
+
import { o as searchWithoutActionKey, r as hasActionKey } from "./action-key-ByZ6DDld.mjs";
|
|
4
4
|
import { i as resolveHead, n as renderHeadToString, r as renderHtmlAttrs, t as renderBodyAttrs } from "./head-5XPcnG-j.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
|
+
// src/pages/not-found-context.ts
|
|
8
|
+
const loaderBoundaries = /* @__PURE__ */ new WeakSet();
|
|
9
|
+
function handlesPageLoaderNotFound(c) {
|
|
10
|
+
return loaderBoundaries.has(c);
|
|
11
|
+
}
|
|
12
|
+
/** Defer only Void's app fallback while a loader can select its own boundary. */
|
|
13
|
+
async function withLoaderNotFoundBoundary(c, load) {
|
|
14
|
+
const alreadyHandled = loaderBoundaries.has(c);
|
|
15
|
+
loaderBoundaries.add(c);
|
|
16
|
+
try {
|
|
17
|
+
return await load();
|
|
18
|
+
} finally {
|
|
19
|
+
if (!alreadyHandled) loaderBoundaries.delete(c);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
7
22
|
// src/pages/protocol.ts
|
|
8
23
|
const POWERED_BY = { "X-Powered-By": "Void" };
|
|
9
24
|
const RENDER_ERROR_ASSET_TAGS_KEY = "__voidPageAssetTags";
|
|
@@ -167,17 +182,116 @@ async function extractProps(result) {
|
|
|
167
182
|
* 200s (file downloads, streams). JSON 200s are still extracted as props for
|
|
168
183
|
* backward compat with loaders using c.json().
|
|
169
184
|
*/
|
|
170
|
-
async function runLoader(handler, c, render) {
|
|
185
|
+
async function runLoader(handler, c, render, recover, recoverNotFound = false) {
|
|
171
186
|
if (!handler) return render({});
|
|
172
187
|
return runPageHandler(handler, c, async (leaf) => {
|
|
173
|
-
|
|
188
|
+
let result;
|
|
189
|
+
try {
|
|
190
|
+
result = recoverNotFound ? await withLoaderNotFoundBoundary(c, () => leaf(c)) : await leaf(c);
|
|
191
|
+
} catch (error) {
|
|
192
|
+
const recovered = await recover?.(error);
|
|
193
|
+
if (recovered) return recovered;
|
|
194
|
+
throw error;
|
|
195
|
+
}
|
|
174
196
|
if (result instanceof Response && !isConvertedResponse(result)) {
|
|
197
|
+
if (result.status === 404 && !result.headers.get("Content-Disposition")?.includes("attachment")) {
|
|
198
|
+
const recovered = await recover?.(void 0, result);
|
|
199
|
+
if (recovered) return recovered;
|
|
200
|
+
}
|
|
175
201
|
const contentType = result.headers.get("content-type") || "";
|
|
176
202
|
if (result.status >= 300 || !contentType.includes("application/json")) return result;
|
|
177
203
|
}
|
|
178
|
-
|
|
204
|
+
let props;
|
|
205
|
+
try {
|
|
206
|
+
props = await extractProps(result);
|
|
207
|
+
} catch (error) {
|
|
208
|
+
const recovered = await recover?.(error);
|
|
209
|
+
if (recovered) return recovered;
|
|
210
|
+
throw error;
|
|
211
|
+
}
|
|
212
|
+
return render(props);
|
|
179
213
|
});
|
|
180
214
|
}
|
|
215
|
+
/** Recover one completed GET operation without replaying its middleware or loader. */
|
|
216
|
+
async function renderPageFailure(c, error, original, renderFn, getAssetTags, configHead, options) {
|
|
217
|
+
const httpError = error && typeof error === "object" && "getResponse" in error && typeof error.getResponse === "function";
|
|
218
|
+
const explicit = httpError ? error.getResponse() : original;
|
|
219
|
+
if (explicit && (explicit.status !== 404 || explicit.headers.has("Content-Disposition"))) return;
|
|
220
|
+
const notFound = explicit?.status === 404;
|
|
221
|
+
const candidates = notFound ? [options?.boundaries?.notFound, ...options?.boundaries?.notFoundErrors ?? options?.boundaries?.errors ?? []] : options?.boundaries?.errors;
|
|
222
|
+
if (!candidates?.[0]) return;
|
|
223
|
+
if (options?.renderMode !== "island") varyPagesResponse(c);
|
|
224
|
+
let status = notFound ? 404 : 500;
|
|
225
|
+
let message = notFound ? httpError && error instanceof Error ? error.message || "Not Found" : "Not Found" : "Internal Server Error";
|
|
226
|
+
if (!notFound && options?.dev && error instanceof Error) message = error.message;
|
|
227
|
+
if (error && !notFound) console.error(error);
|
|
228
|
+
const shared = c.get("shared") ?? {};
|
|
229
|
+
let head;
|
|
230
|
+
try {
|
|
231
|
+
head = resolveHead(configHead, c.get("headDefaults"), void 0);
|
|
232
|
+
serializePageData({
|
|
233
|
+
shared,
|
|
234
|
+
head
|
|
235
|
+
});
|
|
236
|
+
} catch (cause) {
|
|
237
|
+
throw new Error("Unable to render Pages error boundary", { cause });
|
|
238
|
+
}
|
|
239
|
+
const attempted = /* @__PURE__ */ new Set();
|
|
240
|
+
for (const component of candidates) {
|
|
241
|
+
if (!component || attempted.has(component)) continue;
|
|
242
|
+
attempted.add(component);
|
|
243
|
+
const page = {
|
|
244
|
+
component,
|
|
245
|
+
props: { error: {
|
|
246
|
+
status,
|
|
247
|
+
message
|
|
248
|
+
} },
|
|
249
|
+
shared,
|
|
250
|
+
params: requestParams(c),
|
|
251
|
+
url: requestPathWithSearch(c),
|
|
252
|
+
errors: null,
|
|
253
|
+
head: {
|
|
254
|
+
...head,
|
|
255
|
+
title: head?.title ?? (status === 404 ? "Not Found" : "Internal Server Error")
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
try {
|
|
259
|
+
let response;
|
|
260
|
+
if (isPagesRequest(c) && options?.renderMode !== "island") response = pageJsonResponse(c, page);
|
|
261
|
+
else {
|
|
262
|
+
const { html, assetTags } = await renderPageHtml(c, page, component, options?.renderMode ?? "server", renderFn, getAssetTags);
|
|
263
|
+
response = renderedResponse(c, html, "text/html; charset=utf-8", assetTags);
|
|
264
|
+
}
|
|
265
|
+
const headers = new Headers(explicit?.headers);
|
|
266
|
+
for (const [key, value] of response.headers) if (key !== "set-cookie") headers.set(key, value);
|
|
267
|
+
for (const cookie of response.headers.getSetCookie()) if (!headers.getSetCookie().includes(cookie)) headers.append("Set-Cookie", cookie);
|
|
268
|
+
for (const key of [
|
|
269
|
+
"Content-Length",
|
|
270
|
+
"Content-Encoding",
|
|
271
|
+
"Content-Range",
|
|
272
|
+
"ETag",
|
|
273
|
+
"Last-Modified"
|
|
274
|
+
]) {
|
|
275
|
+
headers.delete(key);
|
|
276
|
+
c.header(key, void 0);
|
|
277
|
+
}
|
|
278
|
+
headers.set("Cache-Control", "no-store");
|
|
279
|
+
c.header("Cache-Control", "no-store");
|
|
280
|
+
c.header("Set-Cookie", void 0);
|
|
281
|
+
for (const cookie of headers.getSetCookie()) c.header("Set-Cookie", cookie, { append: true });
|
|
282
|
+
if (original) await original.body?.cancel();
|
|
283
|
+
return new Response(c.req.method === "HEAD" ? null : response.body, {
|
|
284
|
+
status,
|
|
285
|
+
headers
|
|
286
|
+
});
|
|
287
|
+
} catch (failure) {
|
|
288
|
+
console.error(failure);
|
|
289
|
+
status = 500;
|
|
290
|
+
message = options?.dev && failure instanceof Error ? failure.message : "Internal Server Error";
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
throw new Error("Unable to render Pages error boundary");
|
|
294
|
+
}
|
|
181
295
|
/**
|
|
182
296
|
* Per-route middleware from `defineHandler(middleware..., handler)` wraps the
|
|
183
297
|
* response `endpoint` builds from the leaf handler, as it wraps a route's
|
|
@@ -259,74 +373,82 @@ async function handlePageGet(handler, headFn, c, componentId, renderFn, getAsset
|
|
|
259
373
|
async function runPageGet(handler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
|
|
260
374
|
const renderMode = options?.renderMode ?? "server";
|
|
261
375
|
if (renderMode !== "island" && needsPageReload(c)) return legacyPageResponse(c);
|
|
376
|
+
const recover = (error, response) => renderPageFailure(c, error, response, renderFn, getAssetTags, configHead, options);
|
|
262
377
|
return runLoader(handler, c, async (props) => {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
378
|
+
try {
|
|
379
|
+
const shared = c.get("shared") ?? {};
|
|
380
|
+
const pageHead = headFn ? headFn(c, props) : void 0;
|
|
381
|
+
const middlewareHead = c.get("headDefaults");
|
|
382
|
+
const head = resolveHead(configHead, middlewareHead, pageHead);
|
|
383
|
+
if (renderMode !== "island") varyPagesResponse(c);
|
|
384
|
+
const { immediateProps, deferredMap } = separateDeferred(props);
|
|
385
|
+
const hasDeferred = Object.keys(deferredMap).length > 0;
|
|
386
|
+
if (hasDeferred && (options?.boundaries?.notFound || options?.boundaries?.errors.length)) c.header("Cache-Control", "no-store");
|
|
387
|
+
const deferredKeys = {};
|
|
388
|
+
for (const [group, { keys }] of Object.entries(deferredMap)) for (const key of keys) deferredKeys[key] = group;
|
|
389
|
+
const pageObj = {
|
|
390
|
+
component: componentId,
|
|
391
|
+
props: immediateProps,
|
|
392
|
+
params: requestParams(c),
|
|
393
|
+
shared,
|
|
394
|
+
url: requestPathWithSearch(c),
|
|
395
|
+
errors: null,
|
|
396
|
+
...head && { head },
|
|
397
|
+
...hasDeferred && {
|
|
398
|
+
deferred: Object.keys(deferredMap),
|
|
399
|
+
deferredKeys
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
if (renderMode !== "island" && isPagesRequest(c)) {
|
|
403
|
+
if (c.req.header("purpose") === "prefetch" && hasDeferred) {
|
|
404
|
+
const resolvedProps = { ...immediateProps };
|
|
405
|
+
let deferredErrors;
|
|
406
|
+
await Promise.all(Object.entries(deferredMap).map(async ([group, { resolver, keys }]) => {
|
|
407
|
+
try {
|
|
408
|
+
const data = await resolver(c);
|
|
409
|
+
if (keys.length === 1) resolvedProps[keys[0]] = data ?? null;
|
|
410
|
+
else {
|
|
411
|
+
const obj = typeof data === "object" && data !== null ? data : {};
|
|
412
|
+
for (const key of keys) resolvedProps[key] = obj[key];
|
|
413
|
+
}
|
|
414
|
+
} catch (err) {
|
|
415
|
+
(deferredErrors ??= {})[group] = deferredErrorMessage(err, options?.dev === true);
|
|
416
|
+
for (const key of keys) delete resolvedProps[key];
|
|
296
417
|
}
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
418
|
+
}));
|
|
419
|
+
return pageJsonResponse(c, {
|
|
420
|
+
...pageObj,
|
|
421
|
+
props: resolvedProps,
|
|
422
|
+
deferred: void 0,
|
|
423
|
+
...deferredErrors && { deferredErrors }
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
if (!hasDeferred) return pageJsonResponse(c, pageObj);
|
|
427
|
+
c.header("X-VoidPages", "true");
|
|
428
|
+
c.header("X-VoidPages-Version", PAGES_PROTOCOL_VERSION);
|
|
429
|
+
return streamDeferredResponse(serializePageData(pageObj) + "\n", deferredMap, c, "application/x-ndjson", options?.dev === true, (group, data) => serializePageData({
|
|
430
|
+
__deferred: group,
|
|
431
|
+
data
|
|
432
|
+
}) + "\n", (group, error) => serializePageData({
|
|
433
|
+
__deferred: group,
|
|
434
|
+
error
|
|
435
|
+
}) + "\n");
|
|
308
436
|
}
|
|
309
|
-
|
|
310
|
-
c
|
|
311
|
-
c
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
437
|
+
const { html, assetTags } = await renderPageHtml(c, pageObj, componentId, renderMode, renderFn, getAssetTags);
|
|
438
|
+
if (!hasDeferred) return renderedResponse(c, html, "text/html; charset=utf-8", assetTags);
|
|
439
|
+
return streamDeferredResponse(html, deferredMap, c, "text/html; charset=utf-8", options?.dev === true, (group, data) => {
|
|
440
|
+
const g = safeJsonStringify(group);
|
|
441
|
+
return `\n<script>(function(d){window.__resolveDeferred?window.__resolveDeferred(${g},d,true):(window.__deferredQueue??=[]).push([${g},d,0,true])})(${serializePageData(data)})<\/script>`;
|
|
442
|
+
}, (group, error) => {
|
|
443
|
+
const g = safeJsonStringify(group);
|
|
444
|
+
return `\n<script>(function(e){window.__rejectDeferred?window.__rejectDeferred(${g},e):(window.__deferredQueue??=[]).push([${g},0,e])})(${safeJsonStringify(error)})<\/script>`;
|
|
445
|
+
}, assetTags);
|
|
446
|
+
} catch (error) {
|
|
447
|
+
const recovered = await recover(error);
|
|
448
|
+
if (recovered) return recovered;
|
|
449
|
+
throw error;
|
|
319
450
|
}
|
|
320
|
-
|
|
321
|
-
if (!hasDeferred) return renderedResponse(c, html, "text/html; charset=utf-8", assetTags);
|
|
322
|
-
return streamDeferredResponse(html, deferredMap, c, "text/html; charset=utf-8", options?.dev === true, (group, data) => {
|
|
323
|
-
const g = safeJsonStringify(group);
|
|
324
|
-
return `\n<script>(function(d){window.__resolveDeferred?window.__resolveDeferred(${g},d,true):(window.__deferredQueue??=[]).push([${g},d,0,true])})(${serializePageData(data)})<\/script>`;
|
|
325
|
-
}, (group, error) => {
|
|
326
|
-
const g = safeJsonStringify(group);
|
|
327
|
-
return `\n<script>(function(e){window.__rejectDeferred?window.__rejectDeferred(${g},e):(window.__deferredQueue??=[]).push([${g},0,e])})(${safeJsonStringify(error)})<\/script>`;
|
|
328
|
-
}, assetTags);
|
|
329
|
-
});
|
|
451
|
+
}, recover, options?.boundaries?.notFound !== void 0);
|
|
330
452
|
}
|
|
331
453
|
function isSameOriginAction(request) {
|
|
332
454
|
const origin = new URL(request.url).origin;
|
|
@@ -414,4 +536,4 @@ async function runPageMutation(mutationHandler, getHandler, headFn, c, component
|
|
|
414
536
|
throw e;
|
|
415
537
|
}
|
|
416
538
|
}
|
|
417
|
-
export { safeJsonStringify as i, handlePageGet as n, handlePageMutation as r, flattenValidationErrors as t };
|
|
539
|
+
export { handlesPageLoaderNotFound as a, safeJsonStringify as i, handlePageGet as n, handlePageMutation as r, flattenValidationErrors as t };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { n as CloudBindings, r as CloudContext } from "./handler-
|
|
1
|
+
import { n as CloudBindings, r as CloudContext } from "./handler-BO7Od-z9.mjs";
|
|
2
2
|
import { n as HeadDescriptor, t as HeadConfig } from "./head-MeF_5M_3.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { s as PageRenderMode, t as DevCssAsset } from "./types-IPut3_Yx.mjs";
|
|
4
4
|
import { Context } from "hono";
|
|
5
5
|
/** Escape characters that are unsafe inside inline <script> tags to prevent XSS. */
|
|
6
6
|
declare function safeJsonStringify(value: unknown): string;
|
|
7
7
|
type PageObject = {
|
|
8
|
+
/** Build-only server document; never bootstraps an interactive Pages root. */
|
|
9
|
+
documentOnly?: boolean;
|
|
8
10
|
component: string;
|
|
9
11
|
props: Record<string, unknown>;
|
|
10
12
|
params: Record<string, string>;
|
|
@@ -25,6 +27,11 @@ type PageRenderOptions = {
|
|
|
25
27
|
renderMode?: PageRenderMode;
|
|
26
28
|
/** Dev server build: rejected deferred props keep their raw error message. */
|
|
27
29
|
dev?: boolean;
|
|
30
|
+
boundaries?: {
|
|
31
|
+
notFound?: string;
|
|
32
|
+
notFoundErrors?: Array<string>;
|
|
33
|
+
errors: Array<string>;
|
|
34
|
+
};
|
|
28
35
|
};
|
|
29
36
|
type AssetTags = {
|
|
30
37
|
css: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as join, c as resolve$2, n as dirname, o as normalize, t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
2
2
|
import { i as voidWarn, r as voidLog } from "./log-D9hwSySP.mjs";
|
|
3
3
|
import { n as scanWranglerDotenvKeys } from "./dotenv-CEI8hapP.mjs";
|
|
4
|
-
import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-
|
|
4
|
+
import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-DmTxZR-N.mjs";
|
|
5
5
|
import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-k40T7XTQ.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import { closeSync, existsSync, fsyncSync, lstatSync, openSync, readFileSync, readlinkSync, realpathSync, renameSync, unlinkSync, writeSync } from "node:fs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-
|
|
1
|
+
export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-C3yiHdld.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as outro, L as log } from "./dist-
|
|
1
|
+
import { H as outro, L as log } from "./dist-STQXl8ck.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-CCk9Seol.mjs";
|
|
3
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
-
import { f as import_picocolors, i as dim } from "./output-
|
|
3
|
+
import { r as PlatformClient } from "./client-SZPyj4X_.mjs";
|
|
4
|
+
import { f as import_picocolors, i as dim } from "./output-DNVILSz2.mjs";
|
|
5
5
|
import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
6
6
|
// src/cli/requests.ts
|
|
7
7
|
async function runRequestsCommand(root, range, status) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as inferDefaultSlug } from "./resolve-project-Da3OgCU1.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as confirm, H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./dist-
|
|
1
|
+
import { A as confirm, H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./dist-STQXl8ck.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-CCk9Seol.mjs";
|
|
3
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
-
import { c as formatRelativeTime, i as dim, m as printSuccess, o as formatCount, r as createSpinner } from "./output-
|
|
3
|
+
import { r as PlatformClient } from "./client-SZPyj4X_.mjs";
|
|
4
|
+
import { c as formatRelativeTime, i as dim, m as printSuccess, o as formatCount, r as createSpinner } from "./output-DNVILSz2.mjs";
|
|
5
5
|
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
6
6
|
// src/cli/rollback.ts
|
|
7
7
|
async function runRollbackCommand(root, deployId, explicitPlatform) {
|
|
@@ -74,7 +74,7 @@ async function runRollbackCommand(root, deployId, explicitPlatform) {
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
async function runCloudflareRollback(root, deployId, restorePlatformFlag) {
|
|
77
|
-
const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-
|
|
77
|
+
const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-DATekLwI.mjs");
|
|
78
78
|
const context = resolveCloudflareOperationContext(root);
|
|
79
79
|
const status = await readCloudflareWorkerStatus(context);
|
|
80
80
|
const deployedVersionIds = new Set(status.deployedVersionIds);
|
|
@@ -471,7 +471,7 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
|
|
|
471
471
|
lines.push("");
|
|
472
472
|
lines.push(" export type ParseActionUrl<U extends string> = U extends `${infer Base}?${infer Action}` ? {");
|
|
473
473
|
lines.push(" base: Base;");
|
|
474
|
-
lines.push(" action: Action;");
|
|
474
|
+
lines.push(" action: Action extends `${infer Name}&${string}` ? Name : Action;");
|
|
475
475
|
lines.push(" } : {");
|
|
476
476
|
lines.push(" base: U;");
|
|
477
477
|
lines.push(" action: never;");
|
|
@@ -492,7 +492,7 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
|
|
|
492
492
|
lines.push(" type PageActionUrl<K extends string, P> = P extends { body: any }");
|
|
493
493
|
lines.push(" ? K");
|
|
494
494
|
lines.push(" : P extends { actions: infer A }");
|
|
495
|
-
lines.push(" ? `${K}?${keyof A & string}`");
|
|
495
|
+
lines.push(" ? `${K}?${keyof A & string}${'' | `&${string}`}`");
|
|
496
496
|
lines.push(" : never;");
|
|
497
497
|
lines.push("");
|
|
498
498
|
lines.push(" export type ResolveActionBody<U extends string> =");
|
|
@@ -516,6 +516,7 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
|
|
|
516
516
|
lines.push("");
|
|
517
517
|
lines.push(" type ActionFormBaseOptions = {");
|
|
518
518
|
lines.push(" resetOnSuccess?: boolean;");
|
|
519
|
+
lines.push(" throwOnError?: boolean;");
|
|
519
520
|
lines.push(" };");
|
|
520
521
|
lines.push("");
|
|
521
522
|
lines.push(" export type ActionFormOptions<U extends string> = ActionFormBaseOptions &");
|
package/dist/routes-stub.d.mts
CHANGED
|
@@ -32,10 +32,10 @@ export type RouteName = keyof RouteMap;
|
|
|
32
32
|
export type RewriteDestination = RouteName | (string & {});
|
|
33
33
|
/** Stub interface for page action types — augmented by generated routes.d.ts */
|
|
34
34
|
export interface PageActionMap {}
|
|
35
|
-
/** Parse "/path?action" into base path and action name */
|
|
35
|
+
/** Parse "/path?action&key=value" into base path and action name. */
|
|
36
36
|
export type ParseActionUrl<U extends string> = U extends `${infer Base}?${infer Action}` ? {
|
|
37
37
|
base: Base;
|
|
38
|
-
action: Action;
|
|
38
|
+
action: Action extends `${infer Name}&${string}` ? Name : Action;
|
|
39
39
|
} : {
|
|
40
40
|
base: U;
|
|
41
41
|
action: never;
|
|
@@ -60,6 +60,7 @@ export type ResolveActionParams<U extends string> = ParseActionUrl<U>["base"] ex
|
|
|
60
60
|
export type HasActionParams<U extends string> = [ResolveActionParams<U>] extends [never] ? false : ResolveActionParams<U> extends Record<string, string> ? true : false;
|
|
61
61
|
type ActionFormBaseOptions = {
|
|
62
62
|
resetOnSuccess?: boolean;
|
|
63
|
+
throwOnError?: boolean;
|
|
63
64
|
};
|
|
64
65
|
/** Form options type (requires params for dynamic routes) */
|
|
65
66
|
export type ActionFormOptions<U extends string> = ActionFormBaseOptions & (HasActionParams<U> extends true ? {
|
|
@@ -71,7 +72,7 @@ type PageActionUrl<K extends string, P> = P extends {
|
|
|
71
72
|
body: unknown;
|
|
72
73
|
} ? K : P extends {
|
|
73
74
|
actions: infer A;
|
|
74
|
-
} ? `${K}?${keyof A & string}` : never;
|
|
75
|
+
} ? `${K}?${keyof A & string}${"" | `&${string}`}` : never;
|
|
75
76
|
/** Valid useForm URLs — single-action pages + "page?name" combos + default actions */
|
|
76
77
|
export type ActionUrl = { [K in keyof PageActionMap]: PageActionUrl<K & string, PageActionMap[K]>; }[keyof PageActionMap];
|
|
77
78
|
export { type Href, type RouteDestination, type RouteOptions, type RoutePath, type RouteQuery, type RouteQueryValue, type RouteUrl, type RouteUrlInput, routeUrl };
|
package/dist/runtime/auth.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as InferAuthInstance, c as VoidAuthConfigContext, d as defineAuth, f as getAuth, h as requireAuth, i as AuthUser, l as VoidAuthTypes, m as getUser, n as AuthSession, o as InferAuthSession, p as getSession, r as AuthState, s as VoidAuthConfig, t as AuthInstance, u as authContext } from "../auth-
|
|
1
|
+
import { a as InferAuthInstance, c as VoidAuthConfigContext, d as defineAuth, f as getAuth, h as requireAuth, i as AuthUser, l as VoidAuthTypes, m as getUser, n as AuthSession, o as InferAuthSession, p as getSession, r as AuthState, s as VoidAuthConfig, t as AuthInstance, u as authContext } from "../auth-Bk9VGtQW.mjs";
|
|
2
2
|
export { AuthInstance, AuthSession, AuthState, AuthUser, InferAuthInstance, InferAuthSession, VoidAuthConfig, VoidAuthConfigContext, VoidAuthTypes, authContext, defineAuth, getAuth, getSession, getUser, requireAuth };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-
|
|
1
|
+
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-CQFdtguU.mjs";
|
|
2
2
|
export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
|
|
3
3
|
export declare const runVoidAuthMiddleware: VoidAuthRuntimeApi["runVoidAuthMiddleware"];
|
|
4
4
|
export declare const handleVoidAuthRequest: VoidAuthRuntimeApi["handleVoidAuthRequest"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-
|
|
1
|
+
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-CQFdtguU.mjs";
|
|
2
2
|
export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
|
|
3
3
|
export declare const runVoidAuthMiddleware: VoidAuthRuntimeApi["runVoidAuthMiddleware"];
|
|
4
4
|
export declare const handleVoidAuthRequest: VoidAuthRuntimeApi["handleVoidAuthRequest"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-
|
|
1
|
+
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-CQFdtguU.mjs";
|
|
2
2
|
export declare const resolveVoidAuthOptions: VoidAuthRuntimeApi["resolveVoidAuthOptions"];
|
|
3
3
|
export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
|
|
4
4
|
export declare const runVoidAuthMiddleware: VoidAuthRuntimeApi["runVoidAuthMiddleware"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
|
|
2
2
|
import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
|
|
3
3
|
import { n as createAuthClient, t as auth } from "../auth-client-react-DvQLe5Zb.mjs";
|
|
4
|
-
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-
|
|
4
|
+
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-Bk9VGtQW.mjs";
|
|
5
5
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
|
|
2
2
|
import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
|
|
3
3
|
import { n as createAuthClient, t as auth } from "../auth-client-solid-P9pEtKGp.mjs";
|
|
4
|
-
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-
|
|
4
|
+
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-Bk9VGtQW.mjs";
|
|
5
5
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
|
|
2
2
|
import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
|
|
3
3
|
import { n as createAuthClient, t as auth } from "../auth-client-svelte-B5j8irT6.mjs";
|
|
4
|
-
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-
|
|
4
|
+
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-Bk9VGtQW.mjs";
|
|
5
5
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
|
|
2
2
|
import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
|
|
3
3
|
import { n as createAuthClient, t as auth } from "../auth-client-vue-BEiAfavk.mjs";
|
|
4
|
-
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-
|
|
4
|
+
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-Bk9VGtQW.mjs";
|
|
5
5
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
|
|
2
2
|
import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
|
|
3
3
|
import { n as createAuthClient, t as auth } from "../auth-client-6-Ft9i9T.mjs";
|
|
4
|
-
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-
|
|
4
|
+
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-Bk9VGtQW.mjs";
|
|
5
5
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
package/dist/runtime/db.d.mts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { DrizzleD1Database, DrizzleD1Database as DrizzleD1Database$1 } from "drizzle-orm/d1";
|
|
2
|
-
import { and, asc, avg, between, count, desc, eq, exists, gt, gte, ilike, inArray, isNotNull, isNull, like, lt, lte, max, min, ne, not, notBetween, notExists, notInArray, notLike, or, sql, sum } from "drizzle-orm";
|
|
2
|
+
import { AnyColumn, SQL, SQLWrapper, and, asc, avg, between, count, desc, eq, exists, gt, gte, ilike, inArray, isNotNull, isNull, like, lt, lte, max, min, ne, not, notBetween, notExists, notInArray, notLike, or, sql, sum } from "drizzle-orm";
|
|
3
|
+
import { BatchItem } from "drizzle-orm/batch";
|
|
3
4
|
/**
|
|
4
5
|
* Create a Drizzle D1 instance from a custom D1 binding.
|
|
5
6
|
* Use this when you have multiple D1 databases or need a non-default binding.
|
|
6
7
|
*/
|
|
7
|
-
export declare function createDb(d1: D1Database
|
|
8
|
+
export declare function createDb(d1: D1Database, options?: {
|
|
9
|
+
session?: D1SessionConstraint;
|
|
10
|
+
}): DrizzleD1Database$1;
|
|
8
11
|
/**
|
|
9
12
|
* Default Drizzle D1 instance — resolves the `DB` binding from the runtime
|
|
10
13
|
* environment. When the Void plugin is active, this is replaced with a
|
|
11
14
|
* schema-aware instance via virtual module.
|
|
12
15
|
*/
|
|
13
16
|
export declare const db: DrizzleD1Database$1;
|
|
14
|
-
export { type DrizzleD1Database, and, asc, avg, between, count, desc, eq, exists, gt, gte, ilike, inArray, isNotNull, isNull, like, lt, lte, max, min, ne, not, notBetween, notExists, notInArray, notLike, or, sql, sum };
|
|
17
|
+
export { type AnyColumn, type BatchItem, type DrizzleD1Database, type SQL, type SQLWrapper, and, asc, avg, between, count, desc, eq, exists, gt, gte, ilike, inArray, isNotNull, isNull, like, lt, lte, max, min, ne, not, notBetween, notExists, notInArray, notLike, or, sql, sum };
|
package/dist/runtime/db.mjs
CHANGED
|
@@ -13,8 +13,8 @@ import { and, asc, avg, between, count, desc, eq, exists, gt, gte, ilike, inArra
|
|
|
13
13
|
* Create a Drizzle D1 instance from a custom D1 binding.
|
|
14
14
|
* Use this when you have multiple D1 databases or need a non-default binding.
|
|
15
15
|
*/
|
|
16
|
-
function createDb(d1) {
|
|
17
|
-
return drizzle(d1.withSession("first-unconstrained"));
|
|
16
|
+
function createDb(d1, options) {
|
|
17
|
+
return drizzle(d1.withSession(options?.session ?? "first-unconstrained"));
|
|
18
18
|
}
|
|
19
19
|
function createPrimaryDb(d1) {
|
|
20
20
|
return drizzle(d1.withSession("first-primary"));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
2
|
import { a as number, c as url, i as json, n as boolean, o as oneOf, r as email, s as string, t as EnvSchema } from "../env-helpers-U56xuFgL.mjs";
|
|
3
|
-
import { a as _getSchemaDefaults, c as defineEnv, i as _getRegisteredSchema, l as env, n as EnvValidationReport, o as _hasRegisteredSchema, r as ValidatedEnv, s as _validateEnvOnce, t as EnvValidationError, u as validateAllEnv } from "../env-public-
|
|
3
|
+
import { a as _getSchemaDefaults, c as defineEnv, i as _getRegisteredSchema, l as env, n as EnvValidationReport, o as _hasRegisteredSchema, r as ValidatedEnv, s as _validateEnvOnce, t as EnvValidationError, u as validateAllEnv } from "../env-public-DtJL_hZq.mjs";
|
|
4
4
|
export { type EnvSchema, EnvValidationError, EnvValidationReport, ValidatedEnv, _getRegisteredSchema, _getSchemaDefaults, _hasRegisteredSchema, _validateEnvOnce, boolean, defineEnv, email, env, json, number, oneOf, string, url, validateAllEnv };
|