void 1.7.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-BfkJ_1PC.mjs → account-cmd-BEMOdwtl.mjs} +5 -5
- package/dist/{application-analysis-OV0CBJ80.mjs → application-analysis-3VVsflWZ.mjs} +28 -8
- package/dist/{application-routing-QpyC5G8z.mjs → application-routing-CJRlXCc2.mjs} +1 -1
- package/dist/{auth-CZrthGxs.d.mts → auth-CV9kXHKe.d.mts} +4 -2
- package/dist/{auth-DyWp-fSo.mjs → auth-aMuFOZeI.mjs} +8 -2
- package/dist/{auth-link-CW1Zh6FM.mjs → auth-link-B1IynRW5.mjs} +5 -5
- package/dist/{auth-router-CNBKnEZi.mjs → auth-router-DVaWJdRB.mjs} +3 -3
- package/dist/{better-auth-shared-CdVyCUou.mjs → better-auth-shared-C7LHvF4L.mjs} +1 -1
- package/dist/{better-auth-shared-C-0uZg8-.d.mts → better-auth-shared-ajs3LNrY.d.mts} +2 -2
- package/dist/boundary-plans-CRmWH68v.d.mts +25 -0
- package/dist/{build-cmd-C9qOKW9W.mjs → build-cmd-Dq8tdqQG.mjs} +4 -4
- package/dist/{cache-DVBBbWQL.mjs → cache-DGMnskX7.mjs} +4 -4
- package/dist/{cancel-deploy-COavnjud.mjs → cancel-deploy-96S5hD1E.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 +3 -3
- package/dist/{cli-main-DFteHrJI.mjs → cli-main-CQRLxZAu.mjs} +32 -32
- package/dist/client-66c0RLDM.mjs +1 -0
- package/dist/{client-BEZmTP6p.mjs → client-D6w5x7hM.mjs} +7 -7
- package/dist/{cloudflare-auth-DGIivpTb.mjs → cloudflare-auth-pNvmT6kL.mjs} +1 -1
- package/dist/{cloudflare-cmd-DJaxC-bc.mjs → cloudflare-cmd-BuuHUM4z.mjs} +5 -5
- package/dist/{cloudflare-config-DtOGAbeB.mjs → cloudflare-config-PxbinLLE.mjs} +2 -2
- package/dist/{cloudflare-connect-BjpWmglw.mjs → cloudflare-connect-D1QOosLd.mjs} +3 -3
- package/dist/{cloudflare-operations-k7wYUv56.mjs → cloudflare-operations-G5AObYzF.mjs} +6 -6
- package/dist/{cloudflare-operations-CZkjFrzH.mjs → cloudflare-operations-I4t3mt4R.mjs} +1 -1
- package/dist/{cloudflare-process-BcPvlMFd.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-j1F1C_rW.mjs → connect-4uImOwut.mjs} +6 -6
- package/dist/{create-project-CE3jOmd5.mjs → create-project-BaUzZnLZ.mjs} +4 -4
- package/dist/{create-project-DZH3aYGQ.mjs → create-project-CQMyzTvK.mjs} +1 -1
- package/dist/{db-DyLzzxvM.mjs → db-DEpDeDsi.mjs} +22 -22
- package/dist/{db-types-DdHHUVPy.mjs → db-types-BpPYAx0B.mjs} +4 -2
- package/dist/{delete-Dey6YoMA.mjs → delete-BVD2kI82.mjs} +4 -4
- package/dist/deploy-Dr_Qamzw.mjs +2 -0
- package/dist/{deploy-Ccw2D2lw.mjs → deploy-Dyeo5soA.mjs} +40 -81
- package/dist/{deploy-managed-static-BBVtpuGv.mjs → deploy-managed-static-Kn73R83A.mjs} +22 -22
- package/dist/{deploy-transport-Dt0IvSVW.mjs → deploy-transport-BpKBs_KR.mjs} +3 -3
- 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-pYaww76u.mjs → dispatch-BBfb519j.mjs} +8 -8
- 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-BTIdyUVk.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-DvrS-I0U.mjs} +10 -10
- package/dist/{email-cloudflare-CTt2n_W2.mjs → email-cloudflare-DAGpgzY1.mjs} +16 -11
- package/dist/{entry-Bw-G1VVx.mjs → entry-DMgR7XOf.mjs} +2 -2
- package/dist/{env-DkZzh_Dd.mjs → env-D7vORwpn.mjs} +6 -6
- 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-types-Dz9qkiOn.mjs → env-types-WEZw5D-r.mjs} +1 -1
- package/dist/{env-validation-C8NL3lEH.mjs → env-validation-DKDcpxbt.mjs} +1 -1
- package/dist/{env-validation-1snjKtDX.mjs → env-validation-DeYNRp1d.mjs} +5 -5
- package/dist/{gen-BZmFOGDQ.mjs → gen-DimkGNve.mjs} +6 -6
- package/dist/gen-DmEeVEs4.mjs +1 -0
- package/dist/{github-cmd-7Oky9qgH.mjs → github-cmd-D-zs6VQr.mjs} +4 -4
- package/dist/{handler-DjqciiDc.d.mts → handler-6fzr_ikp.d.mts} +5 -4
- 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-CimYIfQI.mjs → headers-Q0kZDpk8.mjs} +11 -2
- package/dist/{help-CNuUb47C.mjs → help-Cgdcd-SG.mjs} +6 -6
- package/dist/help-Cp3K5m1w.mjs +1 -0
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +257 -188
- package/dist/{info-DwB8IWIx.mjs → info-BbxQ34kk.mjs} +4 -4
- package/dist/{init-CUGSmcED.mjs → init-zyRj3QRw.mjs} +19 -20
- package/dist/{link-BlRTGHan.mjs → link-DAFXuIER.mjs} +5 -5
- package/dist/{list-iCg7d5Pa.mjs → list-BTIcC3W9.mjs} +5 -5
- package/dist/{live-zKGbRT4h.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-TA51e5Fw.mjs → login-DOE-MkeK.mjs} +4 -4
- package/dist/{logs-BlyAxlvx.mjs → logs-CUsjihc3.mjs} +4 -4
- package/dist/migrate-BYhoIK9R.mjs +1 -0
- package/dist/{migrate-BH6LCr00.mjs → migrate-DtoKdGas.mjs} +6 -6
- package/dist/nitro.mjs +3 -3
- package/dist/{node-B0otYjDv.mjs → node-D9dPyUr0.mjs} +4 -4
- package/dist/operator-ai-logging-DFTEp81Z.mjs +121 -0
- package/dist/{operator-args-DuKAQ3Ks.mjs → operator-args-BCCohcz3.mjs} +10 -1
- package/dist/{operator-cmd-CoHlJjcT.mjs → operator-cmd-CQOQrUiO.mjs} +27 -7
- package/dist/operator-cmd-xCACDtT1.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 +146 -27
- package/dist/pages/head.d.mts +2 -2
- package/dist/pages/head.mjs +1 -1
- package/dist/pages/index.d.mts +5 -4
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.d.mts +6 -2
- package/dist/pages/islands-plugin.mjs +18 -3
- 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-DfT8yQBF.mjs → platform-args-DtpHS_75.mjs} +1 -1
- package/dist/{platform-auth-config-MO0VdVs9.mjs → platform-auth-config-fLwIS5VG.mjs} +6 -6
- package/dist/{platform-auth-protection-Dv208eyL.mjs → platform-auth-protection-BTRI_YwD.mjs} +4 -4
- package/dist/{platform-auth-recovery-DvAQ674F.mjs → platform-auth-recovery-DPK2Mvmo.mjs} +4 -4
- package/dist/{platform-cmd-BpUA19r_.mjs → platform-cmd-BLy5uCa-.mjs} +1 -1
- package/dist/{platform-cmd-dlSxrcQ7.mjs → platform-cmd-HS_FSthn.mjs} +7 -7
- package/dist/{platform-domain-DSO4eUEw.mjs → platform-domain-CHpcq_qg.mjs} +4 -4
- package/dist/{platform-lifecycle-CfcFygHb.mjs → platform-lifecycle-B6LUBwjS.mjs} +1 -1
- package/dist/{platform-lifecycle-BSvsyB_x.mjs → platform-lifecycle-D2RS7DE0.mjs} +239 -29
- package/dist/{platform-management-BMdyt667.mjs → platform-management-C-T0ch4y.mjs} +1 -1
- package/dist/{platform-management-CrP1XhVd.mjs → platform-management-d3ETv3Dw.mjs} +15 -15
- package/dist/{platform-plans-config-CgDiwflR.mjs → platform-plans-config-B7yJQKf7.mjs} +116 -32
- package/dist/{platform-recovery-CHWwXVZ6.mjs → platform-recovery-DS5CAsly.mjs} +2 -2
- package/dist/{platform-setup-BTQVbnTC.mjs → platform-setup-Casiffqj.mjs} +2 -2
- package/dist/{plugin-inference-g66Q1Mx9.mjs → plugin-inference-DZHmVe1f.mjs} +4 -4
- package/dist/{prepare-DXduEwQp.mjs → prepare-AVM4Hj3T.mjs} +10 -10
- package/dist/prepare-BSXKz6m8.mjs +1 -0
- package/dist/{prepare-DJYHjpzq.mjs → prepare-DMk8NAO-.mjs} +3 -3
- 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-TQKAOTMV.mjs} +17 -17
- package/dist/{project-paths-G0yut6Zz.mjs → project-paths-CUhCPMpK.mjs} +33 -2
- package/dist/{project-team-BO2dyc7S.mjs → project-team-B1OKeb-T.mjs} +4 -4
- package/dist/{project-token-ByO2mEI2.mjs → project-token-RW_wpmN-.mjs} +4 -4
- package/dist/{project-tsconfig-nhnTWO_Y.mjs → project-tsconfig-MyRJgufB.mjs} +1 -1
- package/dist/{project-zero-trust-CoQfwRBR.mjs → project-zero-trust-TNc66p0_.mjs} +4 -4
- package/dist/{protocol-yxdHxFLN.mjs → protocol-IPSWHolJ.mjs} +233 -76
- package/dist/{protocol-xZMvWsrg.d.mts → protocol-YS3tbxWE.d.mts} +10 -3
- package/dist/{provision-CMH4-8ri.mjs → provision-BLdkpFT4.mjs} +1 -1
- package/dist/{provision-D5q-ptD3.mjs → provision-bgQTi5QZ.mjs} +2 -2
- package/dist/redirect-Dqb4fEc5.mjs +80 -0
- package/dist/{requests-CPOiDkjh.mjs → requests-Cj15-yrI.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-CYnkng7B.mjs} +4 -4
- package/dist/{route-types-Cl3x0Q8B.mjs → route-types-C6eAOmOj.mjs} +4 -3
- package/dist/routes-stub.d.mts +4 -3
- 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/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-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 +8 -3
- package/dist/runtime/routing.mjs +164 -23
- 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-L8OSv1f7.mjs → scan-4YOxDaw2.mjs} +230 -29
- package/dist/{secret-CuI6LTpD.mjs → secret-BSf7dgg_.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/url-DaehRGKR.mjs +106 -0
- 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-BGsi_uHs.mjs → wrapper-xJ4LP5A7.mjs} +3 -3
- package/dist/{ws-DB8Feytg.d.mts → ws-C2zy0QBf.d.mts} +2 -2
- package/docs/guide/ai.md +2 -1
- package/docs/guide/app-types.md +1 -0
- package/docs/guide/auth.md +23 -27
- package/docs/guide/database/d1.md +18 -1
- package/docs/guide/database/mysql.md +1 -0
- package/docs/guide/database/postgresql.md +1 -0
- package/docs/guide/database.md +30 -27
- package/docs/guide/deployment.md +3 -2
- package/docs/guide/durable-state.md +1 -0
- package/docs/guide/edge/headers.md +4 -3
- package/docs/guide/edge/prerendering.md +6 -5
- package/docs/guide/edge/redirects.md +2 -1
- package/docs/guide/edge/revalidation.md +6 -1
- package/docs/guide/edge/rewrites.md +2 -1
- package/docs/guide/edge/static-assets.md +5 -0
- package/docs/guide/email/domains.md +1 -0
- package/docs/guide/email/receiving.md +3 -2
- package/docs/guide/email/sending.md +7 -4
- 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 +2 -1
- package/docs/guide/pages-routing/actions-and-forms.md +58 -22
- package/docs/guide/pages-routing/errors.md +109 -0
- package/docs/guide/pages-routing/head.md +45 -1
- package/docs/guide/pages-routing/islands.md +4 -1
- package/docs/guide/pages-routing/layouts.md +4 -1
- package/docs/guide/pages-routing/loaders.md +4 -1
- package/docs/guide/pages-routing/markdown.md +6 -4
- package/docs/guide/pages-routing/overview.md +16 -20
- 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 +13 -2
- 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 +35 -1
- package/docs/guide/platform/administration/projects.md +16 -1
- 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 +12 -9
- 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 +8 -1
- package/docs/guide/platform/installation/prerequisites.md +1 -0
- package/docs/guide/platform/installation/setup.md +9 -7
- 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 +3 -2
- package/docs/guide/sse.md +2 -1
- package/docs/guide/ssg.md +18 -6
- package/docs/guide/ssr.md +1 -0
- package/docs/guide/storage.md +2 -1
- package/docs/guide/testing.md +64 -0
- package/docs/guide/type-safety.md +24 -21
- 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 +7 -2
- package/docs/integrations/frameworks/analog.md +1 -0
- package/docs/integrations/frameworks/astro.md +1 -0
- package/docs/integrations/frameworks/nuxt.md +2 -1
- 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 +22 -0
- package/docs/integrations/nodejs-bun-deno.md +5 -4
- package/docs/reference/api/auth.md +23 -4
- 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 +38 -16
- package/docs/reference/api/plugin.md +1 -0
- package/docs/reference/api/resources.md +2 -1
- package/docs/reference/api/rewrites.md +9 -4
- package/docs/reference/api/types.md +1 -0
- package/docs/reference/api.md +2 -1
- package/docs/reference/cli/auth.md +1 -0
- package/docs/reference/cli/database.md +1 -0
- package/docs/reference/cli/deploy.md +5 -2
- 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 +4 -3
- 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 +71 -1
- 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 +8 -3
- 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 +3 -1
- package/dist/action-key-XtKKbbsi.mjs +0 -25
- package/dist/client-BAxLpSKv.mjs +0 -1
- package/dist/deploy-DEZkUS77.mjs +0 -2
- package/dist/discover-1DJD4YXD.mjs +0 -1
- package/dist/gen-C6iknRdI.mjs +0 -1
- package/dist/help-C_cqTByy.mjs +0 -1
- package/dist/load-user-env-CSwdofj0.mjs +0 -48
- 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
- package/dist/url-CuoEn0o3.mjs +0 -43
- package/dist/wrangler-R3kMdJfw.mjs +0 -1
|
@@ -1,9 +1,46 @@
|
|
|
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 {
|
|
4
|
-
import {
|
|
3
|
+
import { a as hasActionKey, c as searchWithoutActionKey, t as decodePagePath } from "./url-DaehRGKR.mjs";
|
|
4
|
+
import { a as resolveHead, i as renderHtmlAttrs, n as renderBodyAttrs, r as renderHeadToString, t as absolutizeHead } from "./head-CWJhfUwV.mjs";
|
|
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 loaderNotFound = /* @__PURE__ */ new WeakSet();
|
|
9
|
+
const loaderBoundaries = /* @__PURE__ */ new WeakSet();
|
|
10
|
+
/** The loader already answered this URL with `c.notFound()`, so assets must not. */
|
|
11
|
+
function handlesPageLoaderNotFound(c) {
|
|
12
|
+
return loaderNotFound.has(c);
|
|
13
|
+
}
|
|
14
|
+
/** The active loader's not-found boundary renders instead of the fallback. */
|
|
15
|
+
function ownsLoaderNotFoundBoundary(c) {
|
|
16
|
+
return loaderBoundaries.has(c);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Record a loader's `c.notFound()` for the rest of the request.
|
|
20
|
+
*
|
|
21
|
+
* Hono resolves `c.notFound()` inside the loader call, so the marker has to be
|
|
22
|
+
* set before the fallback runs. It also has to outlive the loader: the loader
|
|
23
|
+
* returns the fallback's response, which must never be read as page props.
|
|
24
|
+
* Boundary ownership ends with the loader so outer middleware can render the
|
|
25
|
+
* root not-found page after `await next()`.
|
|
26
|
+
*/
|
|
27
|
+
async function withLoaderNotFoundDecision(c, ownBoundary, load) {
|
|
28
|
+
const notFound = c.notFound;
|
|
29
|
+
const alreadyOwned = loaderBoundaries.has(c);
|
|
30
|
+
c.notFound = () => {
|
|
31
|
+
if (!loaderNotFound.has(c)) {
|
|
32
|
+
loaderNotFound.add(c);
|
|
33
|
+
if (ownBoundary) loaderBoundaries.add(c);
|
|
34
|
+
}
|
|
35
|
+
return notFound.call(c);
|
|
36
|
+
};
|
|
37
|
+
try {
|
|
38
|
+
return await load();
|
|
39
|
+
} finally {
|
|
40
|
+
c.notFound = notFound;
|
|
41
|
+
if (!alreadyOwned) loaderBoundaries.delete(c);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
7
44
|
// src/pages/protocol.ts
|
|
8
45
|
const POWERED_BY = { "X-Powered-By": "Void" };
|
|
9
46
|
const RENDER_ERROR_ASSET_TAGS_KEY = "__voidPageAssetTags";
|
|
@@ -143,8 +180,16 @@ function pageJsonResponse(c, pageObj) {
|
|
|
143
180
|
...POWERED_BY
|
|
144
181
|
}) });
|
|
145
182
|
}
|
|
146
|
-
|
|
147
|
-
|
|
183
|
+
/**
|
|
184
|
+
* The URL in the address bar, which a rewrite keeps while it serves another
|
|
185
|
+
* route. The path is decoded like c.req.path.
|
|
186
|
+
*/
|
|
187
|
+
function requestPathWithSearch(c, withoutActionKey = false) {
|
|
188
|
+
const original = c.originalUrl?.();
|
|
189
|
+
const requestSearch = new URL(c.req.url).search;
|
|
190
|
+
if (!original) return c.req.path + (withoutActionKey ? searchWithoutActionKey(requestSearch) : requestSearch);
|
|
191
|
+
const search = withoutActionKey && original.search === requestSearch ? searchWithoutActionKey(original.search) : original.search;
|
|
192
|
+
return decodePagePath(original.pathname) + search;
|
|
148
193
|
}
|
|
149
194
|
function requestParams(c) {
|
|
150
195
|
return c.req.param();
|
|
@@ -167,17 +212,116 @@ async function extractProps(result) {
|
|
|
167
212
|
* 200s (file downloads, streams). JSON 200s are still extracted as props for
|
|
168
213
|
* backward compat with loaders using c.json().
|
|
169
214
|
*/
|
|
170
|
-
async function runLoader(handler, c, render) {
|
|
215
|
+
async function runLoader(handler, c, render, recover, ownsNotFoundBoundary = false) {
|
|
171
216
|
if (!handler) return render({});
|
|
172
217
|
return runPageHandler(handler, c, async (leaf) => {
|
|
173
|
-
|
|
218
|
+
let result;
|
|
219
|
+
try {
|
|
220
|
+
result = await withLoaderNotFoundDecision(c, ownsNotFoundBoundary, () => leaf(c));
|
|
221
|
+
} catch (error) {
|
|
222
|
+
const recovered = await recover?.(error);
|
|
223
|
+
if (recovered) return recovered;
|
|
224
|
+
throw error;
|
|
225
|
+
}
|
|
174
226
|
if (result instanceof Response && !isConvertedResponse(result)) {
|
|
227
|
+
if (result.status === 404 && !result.headers.get("Content-Disposition")?.includes("attachment")) {
|
|
228
|
+
const recovered = await recover?.(void 0, result);
|
|
229
|
+
if (recovered) return recovered;
|
|
230
|
+
}
|
|
175
231
|
const contentType = result.headers.get("content-type") || "";
|
|
176
232
|
if (result.status >= 300 || !contentType.includes("application/json")) return result;
|
|
177
233
|
}
|
|
178
|
-
|
|
234
|
+
let props;
|
|
235
|
+
try {
|
|
236
|
+
props = await extractProps(result);
|
|
237
|
+
} catch (error) {
|
|
238
|
+
const recovered = await recover?.(error);
|
|
239
|
+
if (recovered) return recovered;
|
|
240
|
+
throw error;
|
|
241
|
+
}
|
|
242
|
+
return render(props);
|
|
179
243
|
});
|
|
180
244
|
}
|
|
245
|
+
/** Recover one completed GET operation without replaying its middleware or loader. */
|
|
246
|
+
async function renderPageFailure(c, error, original, renderFn, getAssetTags, configHead, options) {
|
|
247
|
+
const httpError = error && typeof error === "object" && "getResponse" in error && typeof error.getResponse === "function";
|
|
248
|
+
const explicit = httpError ? error.getResponse() : original;
|
|
249
|
+
if (explicit && (explicit.status !== 404 || explicit.headers.has("Content-Disposition"))) return;
|
|
250
|
+
const notFound = explicit?.status === 404;
|
|
251
|
+
const candidates = notFound ? [options?.boundaries?.notFound, ...options?.boundaries?.notFoundErrors ?? options?.boundaries?.errors ?? []] : options?.boundaries?.errors;
|
|
252
|
+
if (!candidates?.[0]) return;
|
|
253
|
+
if (options?.renderMode !== "island") varyPagesResponse(c);
|
|
254
|
+
let status = notFound ? 404 : 500;
|
|
255
|
+
let message = notFound ? httpError && error instanceof Error ? error.message || "Not Found" : "Not Found" : "Internal Server Error";
|
|
256
|
+
if (!notFound && options?.dev && error instanceof Error) message = error.message;
|
|
257
|
+
if (error && !notFound) console.error(error);
|
|
258
|
+
const shared = c.get("shared") ?? {};
|
|
259
|
+
let head;
|
|
260
|
+
try {
|
|
261
|
+
head = resolveRequestHead(c, configHead, c.get("headDefaults"), void 0);
|
|
262
|
+
serializePageData({
|
|
263
|
+
shared,
|
|
264
|
+
head
|
|
265
|
+
});
|
|
266
|
+
} catch (cause) {
|
|
267
|
+
throw new Error("Unable to render Pages error boundary", { cause });
|
|
268
|
+
}
|
|
269
|
+
const attempted = /* @__PURE__ */ new Set();
|
|
270
|
+
for (const component of candidates) {
|
|
271
|
+
if (!component || attempted.has(component)) continue;
|
|
272
|
+
attempted.add(component);
|
|
273
|
+
const page = {
|
|
274
|
+
component,
|
|
275
|
+
props: { error: {
|
|
276
|
+
status,
|
|
277
|
+
message
|
|
278
|
+
} },
|
|
279
|
+
shared,
|
|
280
|
+
params: requestParams(c),
|
|
281
|
+
url: requestPathWithSearch(c),
|
|
282
|
+
errors: null,
|
|
283
|
+
head: {
|
|
284
|
+
...head,
|
|
285
|
+
title: head?.title ?? (status === 404 ? "Not Found" : "Internal Server Error")
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
try {
|
|
289
|
+
let response;
|
|
290
|
+
if (isPagesRequest(c) && options?.renderMode !== "island") response = pageJsonResponse(c, page);
|
|
291
|
+
else {
|
|
292
|
+
const { html, assetTags } = await renderPageHtml(c, page, component, options?.renderMode ?? "server", renderFn, getAssetTags);
|
|
293
|
+
response = renderedResponse(c, html, "text/html; charset=utf-8", assetTags);
|
|
294
|
+
}
|
|
295
|
+
const headers = new Headers(explicit?.headers);
|
|
296
|
+
for (const [key, value] of response.headers) if (key !== "set-cookie") headers.set(key, value);
|
|
297
|
+
for (const cookie of response.headers.getSetCookie()) if (!headers.getSetCookie().includes(cookie)) headers.append("Set-Cookie", cookie);
|
|
298
|
+
for (const key of [
|
|
299
|
+
"Content-Length",
|
|
300
|
+
"Content-Encoding",
|
|
301
|
+
"Content-Range",
|
|
302
|
+
"ETag",
|
|
303
|
+
"Last-Modified"
|
|
304
|
+
]) {
|
|
305
|
+
headers.delete(key);
|
|
306
|
+
c.header(key, void 0);
|
|
307
|
+
}
|
|
308
|
+
headers.set("Cache-Control", "no-store");
|
|
309
|
+
c.header("Cache-Control", "no-store");
|
|
310
|
+
c.header("Set-Cookie", void 0);
|
|
311
|
+
for (const cookie of headers.getSetCookie()) c.header("Set-Cookie", cookie, { append: true });
|
|
312
|
+
if (original) await original.body?.cancel();
|
|
313
|
+
return new Response(c.req.method === "HEAD" ? null : response.body, {
|
|
314
|
+
status,
|
|
315
|
+
headers
|
|
316
|
+
});
|
|
317
|
+
} catch (failure) {
|
|
318
|
+
console.error(failure);
|
|
319
|
+
status = 500;
|
|
320
|
+
message = options?.dev && failure instanceof Error ? failure.message : "Internal Server Error";
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
throw new Error("Unable to render Pages error boundary");
|
|
324
|
+
}
|
|
181
325
|
/**
|
|
182
326
|
* Per-route middleware from `defineHandler(middleware..., handler)` wraps the
|
|
183
327
|
* response `endpoint` builds from the leaf handler, as it wraps a route's
|
|
@@ -256,77 +400,92 @@ function asCloudContext(c) {
|
|
|
256
400
|
async function handlePageGet(handler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
|
|
257
401
|
return runPageGet(handler, headFn, asCloudContext(c), componentId, renderFn, getAssetTags, configHead, options);
|
|
258
402
|
}
|
|
403
|
+
/**
|
|
404
|
+
* Resolve the head for this request and make the crawler-only tags absolute.
|
|
405
|
+
* A prerender renders on a placeholder origin, so it keeps relative values.
|
|
406
|
+
*/
|
|
407
|
+
function resolveRequestHead(c, configHead, middlewareHead, pageHead) {
|
|
408
|
+
const head = resolveHead(configHead, middlewareHead, pageHead);
|
|
409
|
+
return absolutizeHead(head, c.env?.__VOID_PRERENDER === "1" ? void 0 : c.originalUrl?.()?.href ?? c.req.url);
|
|
410
|
+
}
|
|
259
411
|
async function runPageGet(handler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
|
|
260
412
|
const renderMode = options?.renderMode ?? "server";
|
|
261
413
|
if (renderMode !== "island" && needsPageReload(c)) return legacyPageResponse(c);
|
|
414
|
+
const recover = (error, response) => renderPageFailure(c, error, response, renderFn, getAssetTags, configHead, options);
|
|
262
415
|
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
|
-
if (
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
416
|
+
try {
|
|
417
|
+
const shared = c.get("shared") ?? {};
|
|
418
|
+
const pageHead = headFn ? headFn(c, props) : void 0;
|
|
419
|
+
const head = resolveRequestHead(c, configHead, c.get("headDefaults"), pageHead);
|
|
420
|
+
if (renderMode !== "island") varyPagesResponse(c);
|
|
421
|
+
const { immediateProps, deferredMap } = separateDeferred(props);
|
|
422
|
+
const hasDeferred = Object.keys(deferredMap).length > 0;
|
|
423
|
+
if (hasDeferred && (options?.boundaries?.notFound || options?.boundaries?.errors.length)) c.header("Cache-Control", "no-store");
|
|
424
|
+
const deferredKeys = {};
|
|
425
|
+
for (const [group, { keys }] of Object.entries(deferredMap)) for (const key of keys) deferredKeys[key] = group;
|
|
426
|
+
const pageObj = {
|
|
427
|
+
component: componentId,
|
|
428
|
+
props: immediateProps,
|
|
429
|
+
params: requestParams(c),
|
|
430
|
+
shared,
|
|
431
|
+
url: requestPathWithSearch(c),
|
|
432
|
+
errors: null,
|
|
433
|
+
...head && { head },
|
|
434
|
+
...hasDeferred && {
|
|
435
|
+
deferred: Object.keys(deferredMap),
|
|
436
|
+
deferredKeys
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
if (renderMode !== "island" && isPagesRequest(c)) {
|
|
440
|
+
if (c.req.header("purpose") === "prefetch" && hasDeferred) {
|
|
441
|
+
const resolvedProps = { ...immediateProps };
|
|
442
|
+
let deferredErrors;
|
|
443
|
+
await Promise.all(Object.entries(deferredMap).map(async ([group, { resolver, keys }]) => {
|
|
444
|
+
try {
|
|
445
|
+
const data = await resolver(c);
|
|
446
|
+
if (keys.length === 1) resolvedProps[keys[0]] = data ?? null;
|
|
447
|
+
else {
|
|
448
|
+
const obj = typeof data === "object" && data !== null ? data : {};
|
|
449
|
+
for (const key of keys) resolvedProps[key] = obj[key];
|
|
450
|
+
}
|
|
451
|
+
} catch (err) {
|
|
452
|
+
(deferredErrors ??= {})[group] = deferredErrorMessage(err, options?.dev === true);
|
|
453
|
+
for (const key of keys) delete resolvedProps[key];
|
|
296
454
|
}
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
455
|
+
}));
|
|
456
|
+
return pageJsonResponse(c, {
|
|
457
|
+
...pageObj,
|
|
458
|
+
props: resolvedProps,
|
|
459
|
+
deferred: void 0,
|
|
460
|
+
...deferredErrors && { deferredErrors }
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
if (!hasDeferred) return pageJsonResponse(c, pageObj);
|
|
464
|
+
c.header("X-VoidPages", "true");
|
|
465
|
+
c.header("X-VoidPages-Version", PAGES_PROTOCOL_VERSION);
|
|
466
|
+
return streamDeferredResponse(serializePageData(pageObj) + "\n", deferredMap, c, "application/x-ndjson", options?.dev === true, (group, data) => serializePageData({
|
|
467
|
+
__deferred: group,
|
|
468
|
+
data
|
|
469
|
+
}) + "\n", (group, error) => serializePageData({
|
|
470
|
+
__deferred: group,
|
|
471
|
+
error
|
|
472
|
+
}) + "\n");
|
|
308
473
|
}
|
|
309
|
-
|
|
310
|
-
c
|
|
311
|
-
c
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
474
|
+
const { html, assetTags } = await renderPageHtml(c, pageObj, componentId, renderMode, renderFn, getAssetTags);
|
|
475
|
+
if (!hasDeferred) return renderedResponse(c, html, "text/html; charset=utf-8", assetTags);
|
|
476
|
+
return streamDeferredResponse(html, deferredMap, c, "text/html; charset=utf-8", options?.dev === true, (group, data) => {
|
|
477
|
+
const g = safeJsonStringify(group);
|
|
478
|
+
return `\n<script>(function(d){window.__resolveDeferred?window.__resolveDeferred(${g},d,true):(window.__deferredQueue??=[]).push([${g},d,0,true])})(${serializePageData(data)})<\/script>`;
|
|
479
|
+
}, (group, error) => {
|
|
480
|
+
const g = safeJsonStringify(group);
|
|
481
|
+
return `\n<script>(function(e){window.__rejectDeferred?window.__rejectDeferred(${g},e):(window.__deferredQueue??=[]).push([${g},0,e])})(${safeJsonStringify(error)})<\/script>`;
|
|
482
|
+
}, assetTags);
|
|
483
|
+
} catch (error) {
|
|
484
|
+
const recovered = await recover(error);
|
|
485
|
+
if (recovered) return recovered;
|
|
486
|
+
throw error;
|
|
319
487
|
}
|
|
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
|
-
});
|
|
488
|
+
}, recover, options?.boundaries?.notFound !== void 0);
|
|
330
489
|
}
|
|
331
490
|
function isSameOriginAction(request) {
|
|
332
491
|
const origin = new URL(request.url).origin;
|
|
@@ -351,15 +510,13 @@ async function runPageMutation(mutationHandler, getHandler, headFn, c, component
|
|
|
351
510
|
const renderMode = options?.renderMode ?? "server";
|
|
352
511
|
function buildMutationPageObj(props, errors) {
|
|
353
512
|
const shared = c.get("shared") ?? {};
|
|
354
|
-
const
|
|
355
|
-
const pageHead = headFn ? headFn(c, props) : void 0;
|
|
356
|
-
const head = resolveHead(configHead, middlewareHead, pageHead);
|
|
513
|
+
const head = resolveRequestHead(c, configHead, c.get("headDefaults"), headFn ? headFn(c, props) : void 0);
|
|
357
514
|
return {
|
|
358
515
|
component: componentId,
|
|
359
516
|
props,
|
|
360
517
|
params: requestParams(c),
|
|
361
518
|
shared,
|
|
362
|
-
url:
|
|
519
|
+
url: requestPathWithSearch(c, hasActionKey(c.req.raw)),
|
|
363
520
|
errors,
|
|
364
521
|
...head && { head }
|
|
365
522
|
};
|
|
@@ -414,4 +571,4 @@ async function runPageMutation(mutationHandler, getHandler, headFn, c, component
|
|
|
414
571
|
throw e;
|
|
415
572
|
}
|
|
416
573
|
}
|
|
417
|
-
export { safeJsonStringify as i, handlePageGet as n, handlePageMutation as r, flattenValidationErrors as t };
|
|
574
|
+
export { handlesPageLoaderNotFound as a, safeJsonStringify as i, handlePageGet as n, ownsLoaderNotFoundBoundary as o, handlePageMutation as r, flattenValidationErrors as t };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { n as CloudBindings, r as CloudContext } from "./handler-
|
|
2
|
-
import { n as HeadDescriptor, t as HeadConfig } from "./head-
|
|
3
|
-
import {
|
|
1
|
+
import { n as CloudBindings, r as CloudContext } from "./handler-6fzr_ikp.mjs";
|
|
2
|
+
import { n as HeadDescriptor, t as HeadConfig } from "./head-CVO92KEx.mjs";
|
|
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 +1 @@
|
|
|
1
|
-
export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-
|
|
1
|
+
export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-bgQTi5QZ.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
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-
|
|
5
|
-
import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-
|
|
4
|
+
import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-wcnaQ5JG.mjs";
|
|
5
|
+
import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-B1gkT_wC.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";
|
|
8
8
|
import { isRecord } from "@void/deploy-core";
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { n as isSameOrigin } from "./url-DaehRGKR.mjs";
|
|
2
|
+
// src/pages/redirect.ts
|
|
3
|
+
const REDIRECT_HEADER = "X-VoidPages-Redirect";
|
|
4
|
+
const REDIRECT_STATUSES = /* @__PURE__ */ new Set([
|
|
5
|
+
301,
|
|
6
|
+
302,
|
|
7
|
+
303,
|
|
8
|
+
307,
|
|
9
|
+
308
|
|
10
|
+
]);
|
|
11
|
+
/** Opt-in transport: fetch hides redirect Location headers and drops fragments from response.url. */
|
|
12
|
+
function pagesRedirectResponse(request, response) {
|
|
13
|
+
if (!REDIRECT_STATUSES.has(response.status) || !response.headers.has("Location")) return response;
|
|
14
|
+
const headers = new Headers(response.headers);
|
|
15
|
+
headers.append("Vary", REDIRECT_HEADER);
|
|
16
|
+
if (request.headers.get(REDIRECT_HEADER) !== "manual") return new Response(response.body, {
|
|
17
|
+
status: response.status,
|
|
18
|
+
statusText: response.statusText,
|
|
19
|
+
headers
|
|
20
|
+
});
|
|
21
|
+
headers.set(REDIRECT_HEADER, String(response.status));
|
|
22
|
+
headers.set("Cache-Control", "no-store");
|
|
23
|
+
return new Response(response.body, {
|
|
24
|
+
status: 200,
|
|
25
|
+
headers
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/** Follow negotiated redirects with HTTP method rules and origin checks. */
|
|
29
|
+
async function fetchPages(url, options, followGetRedirects = true) {
|
|
30
|
+
const headers = {
|
|
31
|
+
...options.headers,
|
|
32
|
+
[REDIRECT_HEADER]: "manual"
|
|
33
|
+
};
|
|
34
|
+
const init = {
|
|
35
|
+
...options,
|
|
36
|
+
headers
|
|
37
|
+
};
|
|
38
|
+
let redirectedTo;
|
|
39
|
+
for (let redirects = 0; redirects <= 20; redirects++) {
|
|
40
|
+
const response = await fetch(url.split("#")[0], init);
|
|
41
|
+
const status = Number(response.headers.get(REDIRECT_HEADER));
|
|
42
|
+
const location = response.headers.get("Location");
|
|
43
|
+
if (response.status !== 200 || !REDIRECT_STATUSES.has(status) || location === null) {
|
|
44
|
+
if (response.redirected) {
|
|
45
|
+
const destination = new URL(response.url);
|
|
46
|
+
const hash = url.indexOf("#");
|
|
47
|
+
if (hash !== -1) destination.hash = url.slice(hash);
|
|
48
|
+
redirectedTo = destination.href;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
response,
|
|
52
|
+
redirectedTo
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
await response.body?.cancel();
|
|
56
|
+
const base = new URL(url, window.location.origin + window.location.pathname + window.location.search);
|
|
57
|
+
const destination = new URL(location, response.url || base.href);
|
|
58
|
+
if (![
|
|
59
|
+
"http:",
|
|
60
|
+
"https:",
|
|
61
|
+
"capacitor:"
|
|
62
|
+
].includes(destination.protocol)) throw new Error(`Void Pages: refusing to redirect to a ${destination.protocol} URL.`);
|
|
63
|
+
if (!location.includes("#")) destination.hash = base.hash;
|
|
64
|
+
redirectedTo = destination.href;
|
|
65
|
+
const method = (init.method ?? "GET").toUpperCase();
|
|
66
|
+
const get = status === 303 && method !== "GET" && method !== "HEAD" || (status === 301 || status === 302) && method === "POST";
|
|
67
|
+
if (!isSameOrigin(destination, window.location.origin) || !followGetRedirects && (get || method === "GET" || method === "HEAD")) return {
|
|
68
|
+
response,
|
|
69
|
+
redirectedTo
|
|
70
|
+
};
|
|
71
|
+
if (get) {
|
|
72
|
+
for (const name of Object.keys(headers)) if (/^content-(?:type|length|encoding|language|location)$/i.test(name)) delete headers[name];
|
|
73
|
+
init.method = "GET";
|
|
74
|
+
init.body = void 0;
|
|
75
|
+
}
|
|
76
|
+
url = destination.href;
|
|
77
|
+
}
|
|
78
|
+
throw new TypeError("Too many Pages redirects.");
|
|
79
|
+
}
|
|
80
|
+
export { pagesRedirectResponse as n, fetchPages as t };
|
|
@@ -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-D6w5x7hM.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-D6w5x7hM.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-I4t3mt4R.mjs");
|
|
78
78
|
const context = resolveCloudflareOperationContext(root);
|
|
79
79
|
const status = await readCloudflareWorkerStatus(context);
|
|
80
80
|
const deployedVersionIds = new Set(status.deployedVersionIds);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join, s as relative } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { i as writeFileIfChanged } from "./project-tsconfig-
|
|
2
|
+
import { i as writeFileIfChanged } from "./project-tsconfig-MyRJgufB.mjs";
|
|
3
3
|
import { existsSync, rmSync } from "node:fs";
|
|
4
4
|
// src/codegen/binding-types.ts
|
|
5
5
|
const bindingTypes = [
|
|
@@ -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-CV9kXHKe.mjs";
|
|
2
2
|
export { AuthInstance, AuthSession, AuthState, AuthUser, InferAuthInstance, InferAuthSession, VoidAuthConfig, VoidAuthConfigContext, VoidAuthTypes, authContext, defineAuth, getAuth, getSession, getUser, requireAuth };
|
package/dist/runtime/auth.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as authContext, n as defineAuth, r as getAuth, i as getSession, a as getUser, o as requireAuth } from "../auth-
|
|
1
|
+
export { t as authContext, n as defineAuth, r as getAuth, i as getSession, a as getUser, o as requireAuth } from "../auth-aMuFOZeI.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-
|
|
1
|
+
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-ajs3LNrY.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,5 +1,5 @@
|
|
|
1
1
|
import { i as mysqlMigrationRunner, t as applyMySqlAuthMigrations } from "../auth-migrations-DDeifS3v.mjs";
|
|
2
|
-
import { n as resolveConnectionString, t as createVoidAuthRuntime } from "../better-auth-shared-
|
|
2
|
+
import { n as resolveConnectionString, t as createVoidAuthRuntime } from "../better-auth-shared-C7LHvF4L.mjs";
|
|
3
3
|
// src/runtime/better-auth-mysql.ts
|
|
4
4
|
async function applyMigrations(env, migrationSchema) {
|
|
5
5
|
const { createConnection } = await import("mysql2/promise");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-
|
|
1
|
+
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-ajs3LNrY.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,5 +1,5 @@
|
|
|
1
1
|
import { a as pgMigrationRunner, n as applyPgAuthMigrations } from "../auth-migrations-DDeifS3v.mjs";
|
|
2
|
-
import { n as resolveConnectionString, t as createVoidAuthRuntime } from "../better-auth-shared-
|
|
2
|
+
import { n as resolveConnectionString, t as createVoidAuthRuntime } from "../better-auth-shared-C7LHvF4L.mjs";
|
|
3
3
|
import { t as disablePgPassFallback } from "../pg-DoyPxa_X.mjs";
|
|
4
4
|
// src/runtime/better-auth-pg.ts
|
|
5
5
|
async function applyMigrations(env, migrationSchema) {
|