void 0.25.0 → 0.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS_TEMPLATE.md +1 -3
- package/README.md +19 -9
- package/dist/{account-cmd-DcR1ywt8.mjs → account-cmd-CfUXh_nU.mjs} +8 -7
- package/dist/{application-analysis-BVsVqc11.mjs → application-analysis-DKy02UY0.mjs} +21 -32
- package/dist/{application-routing-B7QEjqSR.mjs → application-routing-DQyUh_5S.mjs} +1 -1
- package/dist/{auth-7wuZ5ob8.mjs → auth-B5_tZLxT.mjs} +9 -9
- package/dist/{auth-CdgZ9uag.mjs → auth-BgX2qYSY.mjs} +1 -1
- package/dist/{auth-link-Z6E5DYvM.mjs → auth-link-D5RmKnzh.mjs} +5 -5
- package/dist/{auth-migrations-9vif1uj8.mjs → auth-migrations-BwHgeEsD.mjs} +8 -18
- package/dist/{auth-router-BdM4avI8.mjs → auth-router-Bap-pvbn.mjs} +6 -19
- package/dist/{better-auth-shared-BVkjZ3vM.d.mts → better-auth-shared-CPvWD3nG.d.mts} +0 -4
- package/dist/{better-auth-shared-hy6RPh9W.mjs → better-auth-shared-DPpj8zxc.mjs} +94 -16
- package/dist/{build-cmd-CEE7D-hM.mjs → build-cmd-B58c8iS8.mjs} +8 -7
- package/dist/{cache-TcZnBLtH.mjs → cache-Bo52trKF.mjs} +8 -8
- package/dist/{cancel-deploy-CYoZmcmR.mjs → cancel-deploy-BZNz3Q26.mjs} +6 -5
- package/dist/{cf-access-AHKBzmuu.mjs → cf-access-ngGqZpHZ.mjs} +11 -12
- package/dist/{cf-build-output-U8o1Gl6X.mjs → cf-build-output-DjvB_872.mjs} +62 -85
- package/dist/cf-build-output-H9a97vME.mjs +2 -0
- package/dist/cli/cli.mjs +48 -83
- package/dist/cli/cloudflare-operation-process.mjs +71 -77
- package/dist/cli/env-schema-probe.d.mts +1 -1
- package/dist/cli/env-schema-probe.mjs +5 -6
- package/dist/client-By4JjMw_.mjs +2 -0
- package/dist/{client-RsPo8wsP.mjs → client-C2Prx_Bi.mjs} +30 -8
- package/dist/{cloudflare-auth-Qdc7tw8F.mjs → cloudflare-auth-CuxfF6OA.mjs} +9 -17
- package/dist/{cloudflare-cmd-bhwCxAN6.mjs → cloudflare-cmd-lHqNlJGW.mjs} +6 -5
- package/dist/{cloudflare-config-Bktvwtpf.mjs → cloudflare-config-BmhBv3HV.mjs} +1 -1
- package/dist/{cloudflare-connect-CuhRgk3k.mjs → cloudflare-connect-2G3rL2rP.mjs} +4 -4
- package/dist/{cloudflare-operations-BhbK6yTq.mjs → cloudflare-operations-BlYLlowZ.mjs} +1 -1
- package/dist/{cloudflare-operations-CjaV4lZi.mjs → cloudflare-operations-CwI1bChl.mjs} +41 -70
- package/dist/{cloudflare-process-B-wekeR6.mjs → cloudflare-process-2-TfIEzB.mjs} +20 -22
- package/dist/{config-CyQ-wVd7.mjs → config-5r-YpMC-.mjs} +1 -1
- package/dist/{config-C_XRIPx2.mjs → config-B_ggY-IO.mjs} +3 -3
- package/dist/config-BtSFvXZx.mjs +2 -0
- package/dist/config-CLYAosnQ.mjs +78 -0
- package/dist/{config-BMHb8RCj.d.mts → config-CSa15FvD.d.mts} +1 -1
- package/dist/{config-Br_JZD6u.mjs → config-DiowPT80.mjs} +24 -30
- package/dist/config-entry.d.mts +1 -1
- package/dist/{config-write-B1f88wJA.mjs → config-write-AHGesphx.mjs} +8 -7
- package/dist/{connect-DCvUmPXY.mjs → connect-X0MUA1gk.mjs} +12 -11
- package/dist/{create-project-eAPgYq35.mjs → create-project-DxiyW6iX.mjs} +7 -7
- package/dist/{create-project-C734I-Mu.mjs → create-project-iwkbqiBU.mjs} +1 -1
- package/dist/{db-C07GEdKF.mjs → db-XnVMHzoV.mjs} +101 -133
- package/dist/{delete-pKMVsrpJ.mjs → delete-esYlMiSJ.mjs} +8 -8
- package/dist/{deploy-DfsAe-T0.mjs → deploy-BsEvnlJl.mjs} +2377 -2512
- package/dist/deploy-C1d-YTfp.mjs +2 -0
- package/dist/{dev-inbox-D64ZKUod.mjs → dev-inbox-CK-UuPob.mjs} +7 -16
- package/dist/{discover-BcPPiF1o.mjs → discover-CkCYv9T_.mjs} +1 -2
- package/dist/discover-EDUf6JJw.mjs +2 -0
- package/dist/{prompts-ZAuJlyCj.mjs → dist-Bx1z6Eva.mjs} +1 -1
- package/dist/{dist-AoCzRTJE.mjs → dist-Cegxq8gs.mjs} +8 -8
- package/dist/{prompts-6OSVA7DJ.mjs → dist-D3m88sjf.mjs} +10 -53
- package/dist/{domain-D3uA9ize.mjs → domain-CbbBWhWE.mjs} +29 -30
- package/dist/{dotenv-VQxupEUv.mjs → dotenv-BfU6eqFt.mjs} +20 -32
- package/dist/{drizzle-Beb2Am5S.mjs → drizzle-CF84FOVM.mjs} +16 -13
- package/dist/{email-z3o2cwjH.mjs → email-CpuT42g7.mjs} +24 -19
- package/dist/{email--tEtMoj_.mjs → email-d_Aux1vM.mjs} +1 -1
- package/dist/{entry-CF5wvH4w.mjs → entry-CMAkqBmU.mjs} +6 -6
- package/dist/{env-_v349JBd.mjs → env-BxocywBB.mjs} +25 -6
- package/dist/{env-D5liuQYR.mjs → env-DMA3cXZt.mjs} +1 -1
- package/dist/{env-public-BX_r8HR6.d.mts → env-public-DR7ZM6d-.d.mts} +1 -1
- package/dist/{env-raw-Cx8ElDdj.mjs → env-raw-jZpP5n47.mjs} +1 -2
- package/dist/{env-types-D5kds_OZ.mjs → env-types-CwXgeMgL.mjs} +1 -1
- package/dist/{env-validation-cZBvGWaP.mjs → env-validation-CrVNjsPm.mjs} +1 -1
- package/dist/{env-validation-vBSQ8gw5.mjs → env-validation-Dxdx_5wo.mjs} +17 -21
- package/dist/{env-3Q8-_2IH.mjs → env-w9jOyGZn.mjs} +10 -9
- package/dist/{fetch-_SeGZao9.d.mts → fetch-BPCYVi3H.d.mts} +20 -1
- package/dist/{fetch-BIZJh7vR.mjs → fetch-sAcwjzLO.mjs} +1 -1
- package/dist/{fetch-stream-IvCYKyQL.mjs → fetch-stream-PGgz4uGz.mjs} +26 -24
- package/dist/{fetch-stream-Bjf0hoZb.d.mts → fetch-stream-obvZ7fvO.d.mts} +1 -16
- package/dist/{gen-NjwoG9FK.mjs → gen-DtkQhvQg.mjs} +40 -57
- package/dist/gen-dA9hW7AV.mjs +2 -0
- package/dist/{github-cmd-DquUq-b1.mjs → github-cmd-D_FsOFxq.mjs} +65 -164
- package/dist/{handler-DghKr6dU.mjs → handler-BHAn2fZJ.mjs} +1 -0
- package/dist/{handler-CZ4nAylQ.d.mts → handler-CNAwjRcW.d.mts} +5 -12
- package/dist/{head-Do8P4puT.d.mts → head-C8K_iGe6.d.mts} +1 -1
- package/dist/{head-D_QRR5Yd.mjs → head-D2VF4ApL.mjs} +29 -51
- package/dist/{headers-2rKda9Y6.mjs → headers-DlfR78Nu.mjs} +3 -3
- package/dist/{help-DRZXC4fj.mjs → help-CVFBTmBx.mjs} +23 -38
- package/dist/help-DzKUrQvk.mjs +2 -0
- package/dist/{inbound-fRkqcXaC.mjs → inbound-PfQDLXc5.mjs} +23 -24
- package/dist/index.d.mts +19 -2
- package/dist/index.mjs +632 -532
- package/dist/{info-BmA3_IFZ.mjs → info-PYWwkWyt.mjs} +4 -4
- package/dist/{init-DT7yuuyl.mjs → init-Bw-fRKGp.mjs} +161 -197
- package/dist/{limits-Bq5LG8Id.d.mts → limits-CFsDKQvU.d.mts} +1 -10
- package/dist/{limits-Cjuk2VPm.mjs → limits-D0vD1M9A.mjs} +1 -22
- package/dist/{link-CXOlqh2F.mjs → link-DlPG8iX3.mjs} +10 -10
- package/dist/{list-eEWVJEPn.mjs → list-2GN7_ueV.mjs} +11 -9
- package/dist/{live-CB1y5IuC.mjs → live-CgQuTpqD.mjs} +15 -16
- package/dist/{live-Chw1eIMv.d.mts → live-Du8jXwOW.d.mts} +4 -2
- package/dist/{local-d1-Df4XpwhW.mjs → local-d1-ga5O_idV.mjs} +2 -2
- package/dist/{login-pWQHYVu2.mjs → login-D-Q4xw3Q.mjs} +7 -7
- package/dist/login-Dc-wuTDq.mjs +2 -0
- package/dist/{logs-DnxVX7TR.mjs → logs-rd8J-OFh.mjs} +28 -11
- package/dist/migrate-BHp07yJE.mjs +2 -0
- package/dist/{migrate-CV1on-yJ.mjs → migrate-NLsjBbuM.mjs} +34 -20
- package/dist/{mime-D5Nmdzf7.mjs → mime-DxCznlJq.mjs} +45 -95
- package/dist/{node-BkyRWRx8.mjs → node-DJicPvPj.mjs} +5 -5
- package/dist/{operator-args-CAVcmwUt.mjs → operator-args-BNsW5gfp.mjs} +10 -1
- package/dist/{operator-auth-CkmTE3rt.mjs → operator-auth-AzVLbrr3.mjs} +4 -8
- package/dist/{operator-client-LmwjxT6q.mjs → operator-client-BQtzyG-g.mjs} +3 -3
- package/dist/{operator-cmd-d-IEKgNk.mjs → operator-cmd-B6f6Cg9Z.mjs} +45 -14
- package/dist/operator-cmd-Cwn50lOV.mjs +2 -0
- package/dist/{output-BBsUwdyT.mjs → output-C50ag2r3.mjs} +44 -2
- package/dist/pages/client.d.mts +19 -51
- package/dist/pages/client.mjs +204 -225
- package/dist/pages/head-client.d.mts +1 -1
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/head.mjs +1 -1
- package/dist/pages/index.d.mts +2 -2
- package/dist/pages/index.mjs +6 -12
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/islands-plugin.mjs +21 -25
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -2
- package/dist/{plan-NPpwZ_kc.mjs → plan-BhLO2p4w.mjs} +4 -3
- package/dist/plan-CH2G51je.mjs +2 -0
- package/dist/{platform-args-Bzf8JPc2.mjs → platform-args-BoZkWQnJ.mjs} +4 -2
- package/dist/platform-args-DYgITk0D.mjs +2 -0
- package/dist/{platform-auth-config-0V0lA3pF.mjs → platform-auth-config-n603OANg.mjs} +45 -40
- package/dist/{platform-auth-protection-DFeJ-JkK.mjs → platform-auth-protection-zxDr0hWW.mjs} +9 -8
- package/dist/{platform-auth-recovery-ICy4muq6.mjs → platform-auth-recovery-tw9lgtgE.mjs} +8 -7
- package/dist/{platform-cmd-D7vSWMvV.mjs → platform-cmd-B8-bCb7t.mjs} +48 -23
- package/dist/{platform-cmd-BPySFOew.mjs → platform-cmd-C00YM14r.mjs} +1 -1
- package/dist/{platform-discovery-DDDUvnqp.mjs → platform-discovery-BC0HCKYt.mjs} +18 -4
- package/dist/{platform-domain-CUdY064e.mjs → platform-domain-p0kobLV8.mjs} +6 -5
- package/dist/{platform-lifecycle-Dm09JNkn.mjs → platform-lifecycle-D_QEY32D.mjs} +906 -389
- package/dist/{platform-lifecycle-BaUdTRPU.mjs → platform-lifecycle-vFqtNPPa.mjs} +1 -1
- package/dist/{platform-management-BSEc_ZeG.mjs → platform-management-BdYblvvE.mjs} +175 -32
- package/dist/{platform-management-Bp6aoH2C.mjs → platform-management-oi-SvI3f.mjs} +1 -1
- package/dist/{platform-plans-config-B0pOVQyW.mjs → platform-plans-config-CjiFv5J4.mjs} +5 -4
- package/dist/{platform-recovery-WOZ95Uze.mjs → platform-recovery-PvNS9Nl2.mjs} +3 -3
- package/dist/{platform-registry-KfNEF84O.mjs → platform-registry-P387v42A.mjs} +17 -10
- package/dist/platform-setup-DVe42Ws7.mjs +299 -0
- package/dist/{plugin-inference-CXWnn79A.mjs → plugin-inference-BlQbOL0P.mjs} +43 -42
- package/dist/prepare-DRUV-g3X.mjs +2 -0
- package/dist/{prepare-DnaKBi--.mjs → prepare-Do96654b.mjs} +8 -8
- package/dist/{prepare-39EvOhI6.mjs → prepare-Dq9hTIbo.mjs} +4 -3
- package/dist/{prerender-render-D9qbLs2f.mjs → prerender-render-Ct20jftc.mjs} +17 -3
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-IOjBU8R6.mjs → project-BiaPQ7ur.mjs} +1 -1
- package/dist/{project-BkbfDs0V.mjs → project-DQstYTxO.mjs} +1 -1
- package/dist/{project-cmd-Bs5A392E.mjs → project-cmd-ti8_yTcA.mjs} +19 -19
- package/dist/{project-team-ohAWWaew.mjs → project-team-CDPE1Tsg.mjs} +15 -18
- package/dist/{project-token-CP01Jna6.mjs → project-token-CkZ1cN0Z.mjs} +14 -17
- package/dist/{project-tsconfig-B8GeM0RM.mjs → project-tsconfig-CVJhNMxs.mjs} +2 -1
- package/dist/{project-zero-trust-BzkVgx35.mjs → project-zero-trust-DdjLR61k.mjs} +12 -9
- package/dist/{protocol-CjF_iI9X.d.mts → protocol-BPZaNqBo.d.mts} +4 -2
- package/dist/{protocol-U7bfjHmA.mjs → protocol-CfaUwNs8.mjs} +46 -49
- package/dist/{providers-CJlNS3kT.mjs → providers-BXuhmuub.mjs} +1 -12
- package/dist/{provision-Btj1jppf.mjs → provision-BfaLiWbj.mjs} +51 -42
- package/dist/{provision-BEv0k-qz.mjs → provision-Wu9ZBk9L.mjs} +2 -3
- package/dist/{requests-B3PBuGlX.mjs → requests-DFAqyYy8.mjs} +5 -5
- package/dist/resolve-project-BIeYs9Cw.mjs +2 -0
- package/dist/{resolve-project-BG5ORGID.mjs → resolve-project-CP8rZs_p.mjs} +6 -1
- package/dist/{rollback-DDub9GsO.mjs → rollback-BKYXBduI.mjs} +30 -37
- package/dist/{route-types-Clm4WD0B.mjs → route-types-CbtsIeFn.mjs} +1 -1
- package/dist/route-url-BgPja1GS.d.mts +5 -0
- package/dist/route-url-BjGv_KKY.mjs +28 -0
- package/dist/runner-9wjsSZx-.mjs +2 -0
- package/dist/{runner-Ol0TNjk6.mjs → runner-DMBKSrRk.mjs} +2 -2
- package/dist/{runner-mysql-DmWchSWJ.mjs → runner-mysql-CEzKtmFb.mjs} +8 -8
- package/dist/{runner-mysql-CEG5JozK.mjs → runner-mysql-CkFqZ6CE.mjs} +1 -1
- package/dist/{runner-pg-Bh4AgZdj.mjs → runner-pg-BGYRFdRp.mjs} +1 -1
- package/dist/runtime/ai.d.mts +11 -12
- package/dist/runtime/ai.mjs +47 -113
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.mjs +4 -9
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +5 -10
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +3 -3
- package/dist/runtime/client-react.d.mts +2 -3
- package/dist/runtime/client-react.mjs +2 -2
- package/dist/runtime/client-solid.d.mts +2 -3
- package/dist/runtime/client-solid.mjs +2 -2
- package/dist/runtime/client-svelte.d.mts +2 -3
- package/dist/runtime/client-svelte.mjs +2 -2
- package/dist/runtime/client-vue.d.mts +2 -3
- package/dist/runtime/client-vue.mjs +2 -2
- package/dist/runtime/client.d.mts +2 -3
- package/dist/runtime/client.mjs +2 -2
- package/dist/runtime/db.mjs +1 -1
- package/dist/runtime/durable.mjs +3 -10
- package/dist/runtime/email/testing.mjs +5 -5
- package/dist/runtime/email.d.mts +2 -1
- package/dist/runtime/email.mjs +11 -27
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/env-public.mjs +15 -20
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/fetch-stream.d.mts +2 -2
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.d.mts +2 -3
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +2 -2
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/kv.mjs +10 -11
- package/dist/runtime/limits.d.mts +2 -2
- package/dist/runtime/limits.mjs +2 -2
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live-client.mjs +12 -22
- package/dist/runtime/live-server.mjs +27 -35
- package/dist/runtime/live.d.mts +2 -2
- package/dist/runtime/live.mjs +2 -2
- package/dist/runtime/migration-handler.mjs +35 -86
- package/dist/runtime/queues.mjs +1 -1
- package/dist/runtime/remote/binding-handler.d.mts +2 -2
- package/dist/runtime/remote/binding-handler.mjs +8 -9
- package/dist/runtime/remote/index.mjs +27 -77
- package/dist/runtime/route-url.d.mts +2 -4
- package/dist/runtime/route-url.mjs +1 -1
- package/dist/runtime/routing.d.mts +1 -1
- package/dist/runtime/routing.mjs +15 -26
- package/dist/runtime/sandbox.d.mts +1 -1
- package/dist/runtime/sandbox.mjs +14 -24
- package/dist/runtime/sse.mjs +1 -1
- package/dist/runtime/storage.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +2 -2
- package/dist/runtime/ws-server.mjs +30 -61
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/runtime/ws.mjs +1 -1
- package/dist/{sandbox-XZAqzFlG.d.mts → sandbox-C5LFoJMf.d.mts} +7 -7
- package/dist/{scan-C7okrLyM.mjs → scan-C3uDzz6J.mjs} +21 -18
- package/dist/{secret-3c72lY1U.mjs → secret-BAt2KMmO.mjs} +15 -15
- package/dist/{skills-BPQUGClu.mjs → skills-BgVMvQdy.mjs} +2 -2
- package/dist/{sse-CQNaDFFV.mjs → sse-CMvCgjNk.mjs} +1 -1
- package/dist/{subcommand-prompt-Dhom39bd.mjs → subcommand-prompt-BSlnD1fI.mjs} +2 -2
- package/dist/sveltekit.d.mts +0 -2
- package/dist/terminal-log-text-D9ACPOuG.mjs +32 -0
- package/dist/validate-BJr9LfXy.mjs +2 -0
- package/dist/{validate-ctOrgiS3.mjs → validate-C9qJArv7.mjs} +9 -28
- package/dist/{defer-YsYDUoii.mjs → validation-error-Dg9Recn1.mjs} +11 -11
- package/dist/{wrangler-DhUerFkW.mjs → wrangler-D9KTuqnv.mjs} +89 -194
- package/dist/{ws-CL1w7GXU.d.mts → ws-CChrrAU-.d.mts} +1 -1
- package/dist/{yarn-pnp-BV4AzNul.mjs → yarn-pnp-CUX_iTPA.mjs} +19 -27
- package/{skills/void/docs → docs}/guide/ai.md +69 -64
- package/{skills/void/docs → docs}/guide/app-types.md +1 -1
- package/{skills/void/docs → docs}/guide/auth.md +37 -1
- package/{skills/void/docs → docs}/guide/database/postgresql.md +2 -2
- package/{skills/void/docs → docs}/guide/database.md +23 -8
- package/{skills/void/docs → docs}/guide/edge/revalidation.md +1 -1
- package/{skills/void/docs → docs}/guide/edge/rewrites.md +2 -4
- package/{skills/void/docs → docs}/guide/email/receiving.md +2 -2
- package/{skills/void/docs → docs}/guide/email/sending.md +0 -2
- package/{skills/void/docs → docs}/guide/env-vars.md +4 -0
- package/{skills/void/docs → docs}/guide/jobs.md +2 -2
- package/{skills/void/docs → docs}/guide/live.md +12 -5
- package/{skills/void/docs → docs}/guide/pages-routing/actions-and-forms.md +21 -9
- package/{skills/void/docs → docs}/guide/pages-routing/loaders.md +7 -3
- package/{skills/void/docs → docs}/guide/pages-routing/markdown.md +15 -23
- package/{skills/void/docs → docs}/guide/pages-routing/overview.md +6 -4
- package/{skills/void/docs → docs}/guide/platform/administration/access.md +2 -10
- package/{skills/void/docs → docs}/guide/platform/administration/operations.md +3 -12
- package/{skills/void/docs → docs}/guide/platform/administration/projects.md +1 -1
- package/{skills/void/docs → docs}/guide/platform/development/local.md +4 -2
- package/{skills/void/docs → docs}/guide/platform/development/runtime.md +1 -1
- package/{skills/void/docs → docs}/guide/platform/development/schema-ci.md +1 -1
- package/{skills/void/docs → docs}/guide/platform/installation/credentials.md +2 -2
- package/{skills/void/docs → docs}/guide/platform/installation/domains.md +3 -1
- package/{skills/void/docs → docs}/guide/platform/installation/first-deployment.md +8 -2
- package/{skills/void/docs → docs}/guide/platform/installation/maintenance.md +7 -1
- package/{skills/void/docs → docs}/guide/platform/installation/setup.md +1 -1
- package/docs/guide/platform/installation/uninstall.md +102 -0
- package/{skills/void/docs → docs}/guide/project-collaboration.md +6 -2
- package/{skills/void/docs → docs}/guide/queues.md +0 -2
- package/{skills/void/docs → docs}/guide/remote-dev.md +5 -5
- package/{skills/void/docs → docs}/guide/sandboxes.md +41 -22
- package/{skills/void/docs → docs}/guide/sse.md +0 -2
- package/{skills/void/docs → docs}/guide/storage.md +7 -2
- package/{skills/void/docs → docs}/guide/websockets.md +4 -0
- package/docs/integrations/agents.md +37 -0
- package/{skills/void/docs → docs}/integrations/frameworks/astro.md +3 -3
- package/{skills/void/docs → docs}/integrations/frameworks/nuxt.md +6 -2
- package/{skills/void/docs → docs}/integrations/hono.md +15 -7
- package/{skills/void/docs → docs}/integrations/nodejs-bun-deno.md +1 -0
- package/{skills/void/docs → docs}/reference/api/auth.md +1 -1
- package/{skills/void/docs → docs}/reference/api/handlers.md +4 -2
- package/{skills/void/docs → docs}/reference/api/pages.md +4 -0
- package/{skills/void/docs → docs}/reference/api/resources.md +11 -14
- package/{skills/void/docs → docs}/reference/api.md +35 -34
- package/{skills/void/docs → docs}/reference/cli/auth.md +3 -6
- package/{skills/void/docs → docs}/reference/cli/database.md +3 -4
- package/{skills/void/docs → docs}/reference/cli/generate.md +1 -1
- package/{skills/void/docs → docs}/reference/cli/github.md +3 -12
- package/{skills/void/docs → docs}/reference/cli/platform-config.md +3 -3
- package/{skills/void/docs → docs}/reference/cli/platform-email.md +2 -3
- package/{skills/void/docs → docs}/reference/cli/platform-installation.md +15 -13
- package/{skills/void/docs → docs}/reference/cli/platform-operations.md +3 -0
- package/{skills/void/docs → docs}/reference/cli/platform-users.md +2 -2
- package/{skills/void/docs → docs}/reference/cli/platform.md +4 -2
- package/{skills/void/docs → docs}/reference/cli/project.md +5 -4
- package/{skills/void/docs → docs}/reference/cli/secrets.md +3 -3
- package/{skills/void/docs → docs}/reference/cli/setup.md +9 -11
- package/{skills/void/docs → docs}/reference/cli.md +2 -2
- package/{skills/void/docs → docs}/reference/config.md +13 -13
- package/{skills/void/docs → docs}/reference/resource-inference.md +2 -16
- package/package.json +34 -30
- package/schema.json +1 -1
- package/skills/migrate-vite-cloudflare-to-void/SKILL.md +4 -1
- package/skills/void/SKILL.md +11 -5
- package/dist/cf-build-output-ChY6-XWP.mjs +0 -2
- package/dist/client-B4Me-9HE.mjs +0 -2
- package/dist/config-0acf1oys.mjs +0 -2
- package/dist/config-D8MOgiQV.mjs +0 -32
- package/dist/deploy-BDu1vhSH.mjs +0 -2
- package/dist/discover-AMCBXivQ.mjs +0 -2
- package/dist/fetch-error-Sp1R4mZv.d.mts +0 -20
- package/dist/gen-ById9r2j.mjs +0 -2
- package/dist/help-DPGBwomV.mjs +0 -2
- package/dist/login-C98-sw79.mjs +0 -2
- package/dist/migrate-CEu2X5DB.mjs +0 -2
- package/dist/plan-D1Q5rf-r.mjs +0 -2
- package/dist/platform-args-Cq6EjQro.mjs +0 -2
- package/dist/prepare-CnjcTV2s.mjs +0 -2
- package/dist/resolve-project-DtbidV4y.mjs +0 -2
- package/dist/route-url-CG7U-cRN.mjs +0 -15
- package/dist/runner-CXA9Fh8h.mjs +0 -2
- package/dist/validate-Dq_L3s0S.mjs +0 -2
- package/skills/void/docs/guide/platform/installation/uninstall.md +0 -69
- package/skills/void/docs/integrations/agents.md +0 -26
- package/dist/{runner-pg-D4OPlil-.mjs → runner-pg-DV8p_zjA.mjs} +4 -4
- package/{skills/void/docs → docs}/guide/database/d1.md +2 -2
- package/{skills/void/docs → docs}/guide/database/mysql.md +0 -0
- package/{skills/void/docs → docs}/guide/deployment.md +0 -0
- package/{skills/void/docs → docs}/guide/durable-state.md +0 -0
- package/{skills/void/docs → docs}/guide/edge/headers.md +0 -0
- package/{skills/void/docs → docs}/guide/edge/prerendering.md +0 -0
- package/{skills/void/docs → docs}/guide/edge/redirects.md +0 -0
- package/{skills/void/docs → docs}/guide/edge/static-assets.md +0 -0
- package/{skills/void/docs → docs}/guide/email/domains.md +0 -0
- package/{skills/void/docs → docs}/guide/email.md +0 -0
- package/{skills/void/docs → docs}/guide/index.md +0 -0
- package/{skills/void/docs → docs}/guide/kv.md +0 -0
- package/{skills/void/docs → docs}/guide/pages-routing/head.md +0 -0
- package/{skills/void/docs → docs}/guide/pages-routing/islands.md +2 -2
- package/{skills/void/docs → docs}/guide/pages-routing/layouts.md +0 -0
- package/{skills/void/docs → docs}/guide/pages-routing/view-transitions.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/administration/email.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/administration/plans.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/administration/zero-trust.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/installation/ci.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/installation/prerequisites.md +0 -0
- package/{skills/void/docs → docs}/guide/platform-administration.md +0 -0
- package/{skills/void/docs → docs}/guide/platform-development.md +0 -0
- package/{skills/void/docs → docs}/guide/quickstart.md +0 -0
- package/{skills/void/docs → docs}/guide/self-hosted-platform.md +0 -0
- package/{skills/void/docs → docs}/guide/server-routing.md +3 -3
- package/{skills/void/docs → docs}/guide/ssg.md +0 -0
- package/{skills/void/docs → docs}/guide/ssr.md +0 -0
- package/{skills/void/docs → docs}/guide/type-safety.md +0 -0
- package/{skills/void/docs → docs}/guide/typed-fetch.md +0 -0
- package/{skills/void/docs → docs}/index.md +0 -0
- package/{skills/void/docs → docs}/integrations/cloudflare.md +0 -0
- package/{skills/void/docs → docs}/integrations/frameworks/analog.md +3 -3
- package/{skills/void/docs → docs}/integrations/frameworks/overview.md +0 -0
- package/{skills/void/docs → docs}/integrations/frameworks/react-router.md +3 -3
- package/{skills/void/docs → docs}/integrations/frameworks/sveltekit.md +1 -1
- package/{skills/void/docs → docs}/integrations/frameworks/tanstack-start.md +2 -2
- package/{skills/void/docs → docs}/reference/api/client.md +0 -0
- package/{skills/void/docs → docs}/reference/api/database.md +2 -2
- /package/{skills/void/docs → docs}/reference/api/durable.md +0 -0
- /package/{skills/void/docs → docs}/reference/api/env.md +0 -0
- /package/{skills/void/docs → docs}/reference/api/plugin.md +0 -0
- /package/{skills/void/docs → docs}/reference/api/rewrites.md +0 -0
- /package/{skills/void/docs → docs}/reference/api/types.md +0 -0
- /package/{skills/void/docs → docs}/reference/cli/deploy.md +0 -0
- /package/{skills/void/docs → docs}/reference/cli/domains.md +0 -0
- /package/{skills/void/docs → docs}/reference/cli/email.md +0 -0
- /package/{skills/void/docs → docs}/reference/cli/platform-zero-trust.md +0 -0
- /package/{skills/void/docs → docs}/reference/structure.md +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as eventStream } from "../sse-
|
|
2
|
-
import { t as __getLiveBindingName } from "../live-
|
|
1
|
+
import { n as eventStream } from "../sse-CMvCgjNk.mjs";
|
|
2
|
+
import { t as __getLiveBindingName } from "../live-CgQuTpqD.mjs";
|
|
3
3
|
//#region src/runtime/live-server.ts
|
|
4
4
|
const GENERATION_KEY = "connection:generation";
|
|
5
5
|
const TOPIC_PRUNE_ALARM_DELAY_MS = 6e4;
|
|
@@ -185,13 +185,7 @@ function createLiveDurableObject() {
|
|
|
185
185
|
if (this.connection === connection) this.connection = null;
|
|
186
186
|
return new Response("connection queue full", { status: 410 });
|
|
187
187
|
}
|
|
188
|
-
const event =
|
|
189
|
-
subscriptionId: row.subscriptionId,
|
|
190
|
-
topic: message.topic,
|
|
191
|
-
...message.type !== void 0 && { type: message.type },
|
|
192
|
-
...message.eventId !== void 0 && { eventId: message.eventId },
|
|
193
|
-
data: message.data
|
|
194
|
-
};
|
|
188
|
+
const event = liveEvent(row.subscriptionId, message);
|
|
195
189
|
if (encodedLiveEventSize(event) > connection.limits.maxEncodedEventSize) return payloadTooLargeResponse(connection.limits.maxEncodedEventSize);
|
|
196
190
|
connection.queued++;
|
|
197
191
|
const activeConnection = connection;
|
|
@@ -247,23 +241,8 @@ function createLiveDurableObject() {
|
|
|
247
241
|
return Response.json({ ok: true });
|
|
248
242
|
}
|
|
249
243
|
async publish(message) {
|
|
250
|
-
const
|
|
251
|
-
const grouped
|
|
252
|
-
for (const [key, row] of rows) {
|
|
253
|
-
const list = grouped.get(row.connectionId) ?? [];
|
|
254
|
-
list.push({
|
|
255
|
-
key,
|
|
256
|
-
row
|
|
257
|
-
});
|
|
258
|
-
grouped.set(row.connectionId, list);
|
|
259
|
-
}
|
|
260
|
-
for (const { row } of [...grouped.values()].flat()) if (encodedLiveEventSize({
|
|
261
|
-
subscriptionId: row.subscriptionId,
|
|
262
|
-
topic: message.topic,
|
|
263
|
-
...message.type !== void 0 && { type: message.type },
|
|
264
|
-
...message.eventId !== void 0 && { eventId: message.eventId },
|
|
265
|
-
data: message.data
|
|
266
|
-
}) > message.limits.maxEncodedEventSize) return payloadTooLargeResponse(message.limits.maxEncodedEventSize);
|
|
244
|
+
const grouped = groupByConnection(await this.state.storage.list({ prefix: subscriberPrefix(message.streamId, message.topicKey) }));
|
|
245
|
+
for (const { row } of [...grouped.values()].flat()) if (encodedLiveEventSize(liveEvent(row.subscriptionId, message)) > message.limits.maxEncodedEventSize) return payloadTooLargeResponse(message.limits.maxEncodedEventSize);
|
|
267
246
|
const groups = [...grouped];
|
|
268
247
|
for (let offset = 0; offset < groups.length; offset += LIVE_FANOUT_CONCURRENCY) {
|
|
269
248
|
const batch = groups.slice(offset, offset + LIVE_FANOUT_CONCURRENCY);
|
|
@@ -303,15 +282,7 @@ function createLiveDurableObject() {
|
|
|
303
282
|
if (rows.size > staleKeys.length) await this.schedulePruneAlarm();
|
|
304
283
|
}
|
|
305
284
|
async findStaleSubscriberKeys(entries, limits) {
|
|
306
|
-
const grouped =
|
|
307
|
-
for (const [key, row] of entries) {
|
|
308
|
-
const list = grouped.get(row.connectionId) ?? [];
|
|
309
|
-
list.push({
|
|
310
|
-
key,
|
|
311
|
-
row
|
|
312
|
-
});
|
|
313
|
-
grouped.set(row.connectionId, list);
|
|
314
|
-
}
|
|
285
|
+
const grouped = groupByConnection(entries);
|
|
315
286
|
const staleKeys = [];
|
|
316
287
|
const groups = [...grouped];
|
|
317
288
|
for (let offset = 0; offset < groups.length; offset += LIVE_FANOUT_CONCURRENCY) {
|
|
@@ -387,6 +358,27 @@ function isStaleSubscriber(row, connection) {
|
|
|
387
358
|
const subscription = connection.subscriptions.get(row.subscriptionId);
|
|
388
359
|
return !subscription || !subscription.active || subscription.revision !== row.revision;
|
|
389
360
|
}
|
|
361
|
+
function liveEvent(subscriptionId, message) {
|
|
362
|
+
return {
|
|
363
|
+
subscriptionId,
|
|
364
|
+
topic: message.topic,
|
|
365
|
+
...message.type !== void 0 && { type: message.type },
|
|
366
|
+
...message.eventId !== void 0 && { eventId: message.eventId },
|
|
367
|
+
data: message.data
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
function groupByConnection(entries) {
|
|
371
|
+
const grouped = /* @__PURE__ */ new Map();
|
|
372
|
+
for (const [key, row] of entries) {
|
|
373
|
+
const list = grouped.get(row.connectionId) ?? [];
|
|
374
|
+
list.push({
|
|
375
|
+
key,
|
|
376
|
+
row
|
|
377
|
+
});
|
|
378
|
+
grouped.set(row.connectionId, list);
|
|
379
|
+
}
|
|
380
|
+
return grouped;
|
|
381
|
+
}
|
|
390
382
|
function encodedLiveEventSize(event) {
|
|
391
383
|
return textEncoder.encode(JSON.stringify(event)).byteLength;
|
|
392
384
|
}
|
package/dist/runtime/live.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
|
-
import { _ as __getLiveBindingName, a as LiveControlErrorCode, c as LiveControlOptions, d as LiveHookContext, f as LiveLimits, g as LiveSubscribeHookContext, h as LiveStreamOptions, i as LiveControlError, l as LiveControlRequest, m as LiveStream, n as LiveConnectHookContext, o as LiveControlOperation, p as LivePublishOptions, r as LiveConnectOptions, s as LiveControlOperationResult, t as LiveClientEvent, u as LiveControlResponse, v as __setLiveBindingName, y as
|
|
3
|
-
export { LiveClientEvent, LiveConnectHookContext, LiveConnectOptions, LiveControlError, LiveControlErrorCode, LiveControlOperation, LiveControlOperationResult, LiveControlOptions, LiveControlRequest, LiveControlResponse, LiveHookContext, LiveLimits, LivePublishOptions, LiveStream, LiveStreamOptions, LiveSubscribeHookContext, __getLiveBindingName, __setLiveBindingName, defineLiveStream };
|
|
2
|
+
import { _ as __getLiveBindingName, a as LiveControlErrorCode, b as defineLiveStream, c as LiveControlOptions, d as LiveHookContext, f as LiveLimits, g as LiveSubscribeHookContext, h as LiveStreamOptions, i as LiveControlError, l as LiveControlRequest, m as LiveStream, n as LiveConnectHookContext, o as LiveControlOperation, p as LivePublishOptions, r as LiveConnectOptions, s as LiveControlOperationResult, t as LiveClientEvent, u as LiveControlResponse, v as __setLiveBindingName, y as __setLiveDev } from "../live-Du8jXwOW.mjs";
|
|
3
|
+
export { LiveClientEvent, LiveConnectHookContext, LiveConnectOptions, LiveControlError, LiveControlErrorCode, LiveControlOperation, LiveControlOperationResult, LiveControlOptions, LiveControlRequest, LiveControlResponse, LiveHookContext, LiveLimits, LivePublishOptions, LiveStream, LiveStreamOptions, LiveSubscribeHookContext, __getLiveBindingName, __setLiveBindingName, __setLiveDev, defineLiveStream };
|
package/dist/runtime/live.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as __setLiveBindingName, r as
|
|
2
|
-
export { __getLiveBindingName, __setLiveBindingName, defineLiveStream };
|
|
1
|
+
import { i as defineLiveStream, n as __setLiveBindingName, r as __setLiveDev, t as __getLiveBindingName } from "../live-CgQuTpqD.mjs";
|
|
2
|
+
export { __getLiveBindingName, __setLiveBindingName, __setLiveDev, defineLiveStream };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { canonicalJson } from "@void/deploy-core";
|
|
1
|
+
import { canonicalJson, canonicalSql, getMigrationPlanHashInput, isSingleStatement, splitSqlStatements } from "@void/deploy-core";
|
|
2
2
|
//#region src/runtime/migration-handler.ts
|
|
3
3
|
const SUPPORTED_CLASSIFIER_VERSION = 1;
|
|
4
4
|
function createMigrationHandler(env, migrations, _dialect, runAuthMigrations, planBundle) {
|
|
@@ -139,12 +139,13 @@ async function runD1AppMigrations(db, migrations, planBundle, attempt) {
|
|
|
139
139
|
const migrationResults = [];
|
|
140
140
|
const confirmedApplied = [];
|
|
141
141
|
const confirmedSkipped = [];
|
|
142
|
-
|
|
142
|
+
let warnings = verified.plans.flatMap((plan) => plan.warnings ?? []);
|
|
143
143
|
let stability = "stable";
|
|
144
144
|
try {
|
|
145
145
|
await createTrackingTable(db);
|
|
146
146
|
await upgradeTrackingTable(db, fenced ? attempt.attemptId : void 0);
|
|
147
147
|
const applied = await readAppliedSet(db);
|
|
148
|
+
warnings = verified.plans.flatMap((plan, index) => applied.has(migrations[index].name) ? [] : plan.warnings ?? []);
|
|
148
149
|
for (let index = 0; index < migrations.length; index++) {
|
|
149
150
|
const migration = migrations[index];
|
|
150
151
|
const plan = verified.plans[index];
|
|
@@ -274,8 +275,26 @@ async function executeMigrationPlan(db, migration, plan, fencedAttemptId) {
|
|
|
274
275
|
]);
|
|
275
276
|
return;
|
|
276
277
|
}
|
|
278
|
+
await runUnsplitMigration(db, migration, appliedAt, fencedAttemptId);
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* D1 `exec()` treats each line as its own statement, so multi-line statements
|
|
282
|
+
* fail there. Run each top-level statement through one batch instead, and keep
|
|
283
|
+
* `exec()` only for SQL the splitter cannot divide safely (trigger bodies).
|
|
284
|
+
*/
|
|
285
|
+
async function runUnsplitMigration(db, migration, appliedAt, fencedAttemptId) {
|
|
286
|
+
const record = db.prepare("INSERT OR IGNORE INTO _void_migrations (name, applied_at) VALUES (?, ?)").bind(migration.name, appliedAt);
|
|
287
|
+
const statements = splitSqlStatements(migration.sql);
|
|
288
|
+
if (statements) {
|
|
289
|
+
await db.batch([
|
|
290
|
+
...ownershipFence(db, fencedAttemptId),
|
|
291
|
+
...statements.map((statement) => db.prepare(statement)),
|
|
292
|
+
record
|
|
293
|
+
]);
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
277
296
|
await db.exec(migration.sql);
|
|
278
|
-
await
|
|
297
|
+
await record.run();
|
|
279
298
|
}
|
|
280
299
|
/** Fail the whole D1 batch if recovery has revoked this executor's ownership. */
|
|
281
300
|
function ownershipFence(db, attemptId) {
|
|
@@ -342,7 +361,7 @@ async function verifyPlanBundle(migrations, planBundle) {
|
|
|
342
361
|
const migration = migrations[index];
|
|
343
362
|
const plan = planBundle.plans[index];
|
|
344
363
|
if (plan.name !== migration.name || plan.dialect !== "sqlite" || plan.classifierVersion !== SUPPORTED_CLASSIFIER_VERSION) throw new Error(`invalid migration execution plan for ${migration.name}`);
|
|
345
|
-
const sqlHash = await sha256Hex(canonicalSql
|
|
364
|
+
const sqlHash = await sha256Hex(canonicalSql(migration.sql));
|
|
346
365
|
if (plan.sqlHash !== sqlHash) throw new Error(`migration SQL hash mismatch for ${migration.name}`);
|
|
347
366
|
const planHash = await hashPlan(plan);
|
|
348
367
|
if (plan.planHash !== planHash) throw new Error(`migration plan hash mismatch for ${migration.name}`);
|
|
@@ -355,25 +374,13 @@ async function verifyPlanBundle(migrations, planBundle) {
|
|
|
355
374
|
if (planBundle.migrationListHash !== migrationListHash) throw new Error("migration list hash mismatch");
|
|
356
375
|
return planBundle;
|
|
357
376
|
}
|
|
358
|
-
function canonicalSql$1(sql) {
|
|
359
|
-
return (sql.charCodeAt(0) === 65279 ? sql.slice(1) : sql).replace(/\r\n?/g, "\n");
|
|
360
|
-
}
|
|
361
377
|
async function sha256Hex(value) {
|
|
362
378
|
const bytes = new TextEncoder().encode(value);
|
|
363
379
|
const hash = await crypto.subtle.digest("SHA-256", bytes);
|
|
364
380
|
return `sha256:${[...new Uint8Array(hash)].map((byte) => byte.toString(16).padStart(2, "0")).join("")}`;
|
|
365
381
|
}
|
|
366
382
|
async function hashPlan(plan) {
|
|
367
|
-
|
|
368
|
-
classifierVersion: plan.classifierVersion,
|
|
369
|
-
dialect: plan.dialect,
|
|
370
|
-
kind: plan.kind,
|
|
371
|
-
name: plan.name,
|
|
372
|
-
sqlHash: plan.sqlHash,
|
|
373
|
-
stability: plan.stability
|
|
374
|
-
};
|
|
375
|
-
if (plan.kind === "breakpoint-framed") hashInput.statements = plan.statements;
|
|
376
|
-
return sha256Hex(canonicalJson(hashInput));
|
|
383
|
+
return sha256Hex(canonicalJson(getMigrationPlanHashInput(plan)));
|
|
377
384
|
}
|
|
378
385
|
async function runD1LegacyMigrations(db, migrations) {
|
|
379
386
|
await createTrackingTable(db);
|
|
@@ -393,10 +400,14 @@ async function runD1LegacyMigrations(db, migrations) {
|
|
|
393
400
|
try {
|
|
394
401
|
const statements = splitMigrationSql(migration.sql);
|
|
395
402
|
if (statements.length === 1) {
|
|
396
|
-
if (
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
403
|
+
if (isSingleStatement(statements[0])) {
|
|
404
|
+
await db.prepare(statements[0]).run();
|
|
405
|
+
await recordLegacyMigration(db, migration.name);
|
|
406
|
+
} else await runUnsplitMigration(db, migration, (/* @__PURE__ */ new Date()).toISOString());
|
|
407
|
+
} else {
|
|
408
|
+
for (const statement of statements) await db.prepare(statement).run();
|
|
409
|
+
await recordLegacyMigration(db, migration.name);
|
|
410
|
+
}
|
|
400
411
|
migrationResults.push({
|
|
401
412
|
name: migration.name,
|
|
402
413
|
applied: true,
|
|
@@ -421,6 +432,9 @@ async function runD1LegacyMigrations(db, migrations) {
|
|
|
421
432
|
migrations: migrationResults
|
|
422
433
|
};
|
|
423
434
|
}
|
|
435
|
+
async function recordLegacyMigration(db, name) {
|
|
436
|
+
await db.prepare("INSERT OR IGNORE INTO _void_migrations (name, applied_at) VALUES (?, ?)").bind(name, (/* @__PURE__ */ new Date()).toISOString()).run();
|
|
437
|
+
}
|
|
424
438
|
function splitMigrationSql(sql) {
|
|
425
439
|
const lines = sql.split(/\r?\n/);
|
|
426
440
|
if (!lines.some((line) => isStatementBreakpointLine(line) || hasInlineStatementBreakpoint(line))) return [sql];
|
|
@@ -452,70 +466,5 @@ function isStatementBreakpointLine(line) {
|
|
|
452
466
|
function hasInlineStatementBreakpoint(line) {
|
|
453
467
|
return /;\s*-->\s*statement-breakpoint\s*$/.test(line.trim());
|
|
454
468
|
}
|
|
455
|
-
function isSingleSqlStatement(sql) {
|
|
456
|
-
let statements = 0;
|
|
457
|
-
let inStatement = false;
|
|
458
|
-
let index = 0;
|
|
459
|
-
while (index < sql.length) {
|
|
460
|
-
const character = sql[index];
|
|
461
|
-
const next = index + 1 < sql.length ? sql[index + 1] : "";
|
|
462
|
-
if (character === "-" && next === "-") {
|
|
463
|
-
index += 2;
|
|
464
|
-
while (index < sql.length && sql[index] !== "\n") index++;
|
|
465
|
-
continue;
|
|
466
|
-
}
|
|
467
|
-
if (character === "/" && next === "*") {
|
|
468
|
-
index += 2;
|
|
469
|
-
while (index < sql.length - 1 && !(sql[index] === "*" && sql[index + 1] === "/")) index++;
|
|
470
|
-
index = Math.min(index + 2, sql.length);
|
|
471
|
-
continue;
|
|
472
|
-
}
|
|
473
|
-
if (character === "'") {
|
|
474
|
-
inStatement = true;
|
|
475
|
-
index++;
|
|
476
|
-
while (index < sql.length) {
|
|
477
|
-
if (sql[index] === "'" && sql[index + 1] === "'") {
|
|
478
|
-
index += 2;
|
|
479
|
-
continue;
|
|
480
|
-
}
|
|
481
|
-
if (sql[index] === "'") {
|
|
482
|
-
index++;
|
|
483
|
-
break;
|
|
484
|
-
}
|
|
485
|
-
index++;
|
|
486
|
-
}
|
|
487
|
-
continue;
|
|
488
|
-
}
|
|
489
|
-
if (character === "\"" || character === "`" || character === "[") {
|
|
490
|
-
inStatement = true;
|
|
491
|
-
const close = character === "[" ? "]" : character;
|
|
492
|
-
index++;
|
|
493
|
-
while (index < sql.length) {
|
|
494
|
-
if (close !== "]" && sql[index] === close && sql[index + 1] === close) {
|
|
495
|
-
index += 2;
|
|
496
|
-
continue;
|
|
497
|
-
}
|
|
498
|
-
if (sql[index] === close) {
|
|
499
|
-
index++;
|
|
500
|
-
break;
|
|
501
|
-
}
|
|
502
|
-
index++;
|
|
503
|
-
}
|
|
504
|
-
continue;
|
|
505
|
-
}
|
|
506
|
-
if (character === ";") {
|
|
507
|
-
if (inStatement) {
|
|
508
|
-
statements++;
|
|
509
|
-
inStatement = false;
|
|
510
|
-
}
|
|
511
|
-
index++;
|
|
512
|
-
continue;
|
|
513
|
-
}
|
|
514
|
-
if (character !== " " && character !== " " && character !== "\n" && character !== "\r") inStatement = true;
|
|
515
|
-
index++;
|
|
516
|
-
}
|
|
517
|
-
if (inStatement) statements++;
|
|
518
|
-
return statements === 1;
|
|
519
|
-
}
|
|
520
469
|
//#endregion
|
|
521
470
|
export { createMigrationHandler };
|
package/dist/runtime/queues.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as requireRuntimeBinding } from "../env-
|
|
1
|
+
import { a as requireRuntimeBinding } from "../env-DMA3cXZt.mjs";
|
|
2
2
|
//#region src/runtime/queues.ts
|
|
3
3
|
/** Typed queue producers — resolves `QUEUE_*` bindings from the active runtime environment. */
|
|
4
4
|
const queues = new Proxy({}, { get(_, name) {
|
|
@@ -6,8 +6,8 @@ import { Hono } from "hono";
|
|
|
6
6
|
* via Workers for Platforms instead of the Cloudflare REST API (~1-5ms vs ~50-200ms).
|
|
7
7
|
*
|
|
8
8
|
* Authenticated via `x-void-internal` header against `env.__VOID_PROXY_TOKEN`.
|
|
9
|
-
* Response formats match the proxy's
|
|
10
|
-
*
|
|
9
|
+
* Response formats match the proxy's REST API responses, so ProxyClient
|
|
10
|
+
* handles both paths.
|
|
11
11
|
*/
|
|
12
12
|
export declare function createBindingHandler(env: Record<string, unknown>): Hono;
|
|
13
13
|
//#endregion
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { t as parseR2Conditional } from "../../r2-conditions-D1Wk8i7b.mjs";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
3
|
//#region src/runtime/remote/binding-handler.ts
|
|
4
|
+
function decodeBase64(value) {
|
|
5
|
+
return Uint8Array.from(atob(value), (ch) => ch.charCodeAt(0));
|
|
6
|
+
}
|
|
4
7
|
/**
|
|
5
8
|
* Creates a Hono app that handles `/__void/*` routes for native binding access.
|
|
6
9
|
* Deployed user workers expose this so the proxy can dispatch D1/KV/R2 operations
|
|
7
10
|
* via Workers for Platforms instead of the Cloudflare REST API (~1-5ms vs ~50-200ms).
|
|
8
11
|
*
|
|
9
12
|
* Authenticated via `x-void-internal` header against `env.__VOID_PROXY_TOKEN`.
|
|
10
|
-
* Response formats match the proxy's
|
|
11
|
-
*
|
|
13
|
+
* Response formats match the proxy's REST API responses, so ProxyClient
|
|
14
|
+
* handles both paths.
|
|
12
15
|
*/
|
|
13
16
|
function createBindingHandler(env) {
|
|
14
17
|
const app = new Hono();
|
|
@@ -102,12 +105,8 @@ function createBindingHandler(env) {
|
|
|
102
105
|
if (body.expiration) opts.expiration = body.expiration;
|
|
103
106
|
if (body.expiration_ttl) opts.expirationTtl = body.expiration_ttl;
|
|
104
107
|
let value;
|
|
105
|
-
if (body.base64 && typeof body.value === "string")
|
|
106
|
-
|
|
107
|
-
const bytes = new Uint8Array(binary.length);
|
|
108
|
-
for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
|
|
109
|
-
value = bytes.buffer;
|
|
110
|
-
} else value = typeof body.value === "string" ? body.value : JSON.stringify(body.value);
|
|
108
|
+
if (body.base64 && typeof body.value === "string") value = decodeBase64(body.value).buffer;
|
|
109
|
+
else value = typeof body.value === "string" ? body.value : JSON.stringify(body.value);
|
|
111
110
|
await kv.put(body.key, value, opts);
|
|
112
111
|
return c.json({ success: true });
|
|
113
112
|
});
|
|
@@ -153,7 +152,7 @@ function createBindingHandler(env) {
|
|
|
153
152
|
if (!body.binding || !body.key) return c.json({ error: "binding and key required" }, 400);
|
|
154
153
|
const bucket = env[body.binding];
|
|
155
154
|
if (!bucket) return c.json({ error: `unknown binding "${body.binding}"` }, 404);
|
|
156
|
-
const data = body.base64 ?
|
|
155
|
+
const data = body.base64 ? decodeBase64(body.base64) : new TextEncoder().encode(body.value ?? "");
|
|
157
156
|
let onlyIf;
|
|
158
157
|
try {
|
|
159
158
|
if (body.onlyIf !== void 0 || c.req.path.endsWith("/put-conditional")) onlyIf = parseR2Conditional(body.onlyIf);
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { t as cfAccessHeaders } from "../../cf-access-TWNzXltp.mjs";
|
|
2
2
|
import { n as serializeR2Conditional } from "../../r2-conditions-D1Wk8i7b.mjs";
|
|
3
3
|
//#region src/runtime/remote/client.ts
|
|
4
|
+
/** Base64-encode binary values for JSON transport to the proxy. */
|
|
5
|
+
function bytesToBase64(bytes) {
|
|
6
|
+
let binary = "";
|
|
7
|
+
for (const byte of bytes) binary += String.fromCharCode(byte);
|
|
8
|
+
return btoa(binary);
|
|
9
|
+
}
|
|
4
10
|
function readableMessage(value) {
|
|
5
11
|
if (typeof value !== "string") return;
|
|
6
12
|
const text = value.replace(/(?:\u001b\]|\u009d)[\s\S]*?(?:\u0007|\u001b\\|\u009c|$)/g, "").replace(/(?:\u001b\[|\u009b)[0-?]*[ -/]*[@-~]/g, "").replace(/[\u0000-\u001f\u007f-\u009f]/g, " ").trim();
|
|
@@ -118,7 +124,7 @@ var ProxyClient = class {
|
|
|
118
124
|
//#region src/runtime/remote/d1.ts
|
|
119
125
|
/**
|
|
120
126
|
* D1Database implementation backed by the remote proxy.
|
|
121
|
-
* Used during local development when `remote: true` is set in void.
|
|
127
|
+
* Used during local development when `remote: true` is set in void.config.ts.
|
|
122
128
|
*/
|
|
123
129
|
var ProxyD1Database = class {
|
|
124
130
|
client;
|
|
@@ -172,43 +178,31 @@ var ProxyD1PreparedStatement = class ProxyD1PreparedStatement {
|
|
|
172
178
|
this._sql = sql;
|
|
173
179
|
this._params = params;
|
|
174
180
|
}
|
|
181
|
+
query(method) {
|
|
182
|
+
return this.client.fetch("/d1/query", {
|
|
183
|
+
binding: this.binding,
|
|
184
|
+
sql: this._sql,
|
|
185
|
+
params: this._params,
|
|
186
|
+
method
|
|
187
|
+
});
|
|
188
|
+
}
|
|
175
189
|
bind(...values) {
|
|
176
190
|
return new ProxyD1PreparedStatement(this.client, this.binding, this._sql, values);
|
|
177
191
|
}
|
|
178
192
|
async all() {
|
|
179
|
-
return await (await this.
|
|
180
|
-
binding: this.binding,
|
|
181
|
-
sql: this._sql,
|
|
182
|
-
params: this._params,
|
|
183
|
-
method: "all"
|
|
184
|
-
})).json();
|
|
193
|
+
return await (await this.query("all")).json();
|
|
185
194
|
}
|
|
186
195
|
async first(col) {
|
|
187
|
-
const row = await (await this.
|
|
188
|
-
binding: this.binding,
|
|
189
|
-
sql: this._sql,
|
|
190
|
-
params: this._params,
|
|
191
|
-
method: "first"
|
|
192
|
-
})).json();
|
|
196
|
+
const row = await (await this.query("first")).json();
|
|
193
197
|
if (row === null) return null;
|
|
194
198
|
if (col) return row[col];
|
|
195
199
|
return row;
|
|
196
200
|
}
|
|
197
201
|
async run() {
|
|
198
|
-
return await (await this.
|
|
199
|
-
binding: this.binding,
|
|
200
|
-
sql: this._sql,
|
|
201
|
-
params: this._params,
|
|
202
|
-
method: "run"
|
|
203
|
-
})).json();
|
|
202
|
+
return await (await this.query("run")).json();
|
|
204
203
|
}
|
|
205
204
|
async raw(options) {
|
|
206
|
-
const data = await (await this.
|
|
207
|
-
binding: this.binding,
|
|
208
|
-
sql: this._sql,
|
|
209
|
-
params: this._params,
|
|
210
|
-
method: "raw"
|
|
211
|
-
})).json();
|
|
205
|
+
const data = await (await this.query("raw")).json();
|
|
212
206
|
if (options?.columnNames) return [data.columns, ...data.results];
|
|
213
207
|
return data.results;
|
|
214
208
|
}
|
|
@@ -217,7 +211,7 @@ var ProxyD1PreparedStatement = class ProxyD1PreparedStatement {
|
|
|
217
211
|
//#region src/runtime/remote/kv.ts
|
|
218
212
|
/**
|
|
219
213
|
* KVNamespace implementation backed by the remote proxy.
|
|
220
|
-
* Used during local development when `remote: true` is set in void.
|
|
214
|
+
* Used during local development when `remote: true` is set in void.config.ts.
|
|
221
215
|
*/
|
|
222
216
|
var ProxyKVNamespace = class {
|
|
223
217
|
client;
|
|
@@ -281,30 +275,9 @@ var ProxyKVNamespace = class {
|
|
|
281
275
|
let serializedValue;
|
|
282
276
|
let isBase64 = false;
|
|
283
277
|
if (typeof value === "string") serializedValue = value;
|
|
284
|
-
else
|
|
285
|
-
const
|
|
286
|
-
|
|
287
|
-
for (const byte of bytes) binary += String.fromCharCode(byte);
|
|
288
|
-
serializedValue = btoa(binary);
|
|
289
|
-
isBase64 = true;
|
|
290
|
-
} else {
|
|
291
|
-
const reader = value.getReader();
|
|
292
|
-
const chunks = [];
|
|
293
|
-
while (true) {
|
|
294
|
-
const { done, value: chunk } = await reader.read();
|
|
295
|
-
if (done) break;
|
|
296
|
-
chunks.push(chunk);
|
|
297
|
-
}
|
|
298
|
-
const total = chunks.reduce((sum, c) => sum + c.length, 0);
|
|
299
|
-
const merged = new Uint8Array(total);
|
|
300
|
-
let offset = 0;
|
|
301
|
-
for (const chunk of chunks) {
|
|
302
|
-
merged.set(chunk, offset);
|
|
303
|
-
offset += chunk.length;
|
|
304
|
-
}
|
|
305
|
-
let binary = "";
|
|
306
|
-
for (const byte of merged) binary += String.fromCharCode(byte);
|
|
307
|
-
serializedValue = btoa(binary);
|
|
278
|
+
else {
|
|
279
|
+
const buffer = value instanceof ArrayBuffer ? value : await new Response(value).arrayBuffer();
|
|
280
|
+
serializedValue = bytesToBase64(new Uint8Array(buffer));
|
|
308
281
|
isBase64 = true;
|
|
309
282
|
}
|
|
310
283
|
const body = {
|
|
@@ -337,7 +310,7 @@ var ProxyKVNamespace = class {
|
|
|
337
310
|
//#region src/runtime/remote/r2.ts
|
|
338
311
|
/**
|
|
339
312
|
* R2Bucket implementation backed by the remote proxy.
|
|
340
|
-
* Used during local development when `remote: true` is set in void.
|
|
313
|
+
* Used during local development when `remote: true` is set in void.config.ts.
|
|
341
314
|
*/
|
|
342
315
|
var ProxyR2Bucket = class {
|
|
343
316
|
client;
|
|
@@ -373,26 +346,9 @@ var ProxyR2Bucket = class {
|
|
|
373
346
|
let textValue;
|
|
374
347
|
if (typeof value === "string") textValue = value;
|
|
375
348
|
else if (value === null) textValue = "";
|
|
376
|
-
else if (value instanceof ArrayBuffer) base64 =
|
|
377
|
-
else if (ArrayBuffer.isView(value)) base64 =
|
|
378
|
-
else
|
|
379
|
-
else {
|
|
380
|
-
const reader = value.getReader();
|
|
381
|
-
const chunks = [];
|
|
382
|
-
while (true) {
|
|
383
|
-
const { done, value: chunk } = await reader.read();
|
|
384
|
-
if (done) break;
|
|
385
|
-
chunks.push(chunk);
|
|
386
|
-
}
|
|
387
|
-
const total = chunks.reduce((sum, c) => sum + c.length, 0);
|
|
388
|
-
const merged = new Uint8Array(total);
|
|
389
|
-
let offset = 0;
|
|
390
|
-
for (const chunk of chunks) {
|
|
391
|
-
merged.set(chunk, offset);
|
|
392
|
-
offset += chunk.length;
|
|
393
|
-
}
|
|
394
|
-
base64 = arrayBufferToBase64(merged.buffer);
|
|
395
|
-
}
|
|
349
|
+
else if (value instanceof ArrayBuffer) base64 = bytesToBase64(new Uint8Array(value));
|
|
350
|
+
else if (ArrayBuffer.isView(value)) base64 = bytesToBase64(new Uint8Array(value.buffer, value.byteOffset, value.byteLength));
|
|
351
|
+
else base64 = bytesToBase64(new Uint8Array(await new Response(value).arrayBuffer()));
|
|
396
352
|
const body = {
|
|
397
353
|
binding: this.binding,
|
|
398
354
|
key
|
|
@@ -453,12 +409,6 @@ var ProxyR2Bucket = class {
|
|
|
453
409
|
throw new Error("resumeMultipartUpload() is not supported with remote bindings");
|
|
454
410
|
}
|
|
455
411
|
};
|
|
456
|
-
function arrayBufferToBase64(buffer, byteOffset = 0, byteLength = buffer.byteLength) {
|
|
457
|
-
const bytes = new Uint8Array(buffer, byteOffset, byteLength);
|
|
458
|
-
let binary = "";
|
|
459
|
-
for (const byte of bytes) binary += String.fromCharCode(byte);
|
|
460
|
-
return btoa(binary);
|
|
461
|
-
}
|
|
462
412
|
function makeR2Object(data) {
|
|
463
413
|
return {
|
|
464
414
|
key: data.key,
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare function interpolateRouteParams(path: string, params?: Record<string, string>): string;
|
|
4
|
-
//#endregion
|
|
1
|
+
import { t as interpolateRouteParams } from "../route-url-BgPja1GS.mjs";
|
|
2
|
+
export { interpolateRouteParams };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as interpolateRouteParams } from "../route-url-
|
|
1
|
+
import { t as interpolateRouteParams } from "../route-url-BjGv_KKY.mjs";
|
|
2
2
|
export { interpolateRouteParams };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as DevCssAsset } from "../types-BAp5AEBU.mjs";
|
|
2
|
-
import { a as handlePageMutation, i as handlePageGet } from "../protocol-
|
|
2
|
+
import { a as handlePageMutation, i as handlePageGet } from "../protocol-BPZaNqBo.mjs";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { Context, ExecutionContext, Hono, MiddlewareHandler } from "hono";
|
|
5
5
|
//#region src/runtime/routing-errors.d.ts
|
package/dist/runtime/routing.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as convertReturnValue } from "../response-Tn7rU0MV.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { n as handlePageGet, r as handlePageMutation } from "../protocol-CfaUwNs8.mjs";
|
|
3
|
+
import { t as VoidAssetRewriteError } from "../handler-BHAn2fZJ.mjs";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { compilePattern, mergeQueryIntoLocation, substituteParams } from "@void/edge";
|
|
6
6
|
//#region src/runtime/routing-errors.ts
|
|
@@ -200,7 +200,7 @@ function createErrorRenderer(options) {
|
|
|
200
200
|
});
|
|
201
201
|
return chain;
|
|
202
202
|
}
|
|
203
|
-
function __voidRenderDevErrorOverlay(
|
|
203
|
+
function __voidRenderDevErrorOverlay(status, title, error) {
|
|
204
204
|
const chain = __voidCollectErrorChain(error);
|
|
205
205
|
const errorCountLabel = chain.length + (chain.length === 1 ? " Error" : " Errors");
|
|
206
206
|
const sections = chain.map((entry, index) => {
|
|
@@ -451,10 +451,10 @@ function createErrorRenderer(options) {
|
|
|
451
451
|
if (!css) return html;
|
|
452
452
|
return /<\/head\s*>/i.test(html) ? html.replace(/<\/head\s*>/i, css + "</head>") : css + html;
|
|
453
453
|
}
|
|
454
|
-
function __voidRenderErrorPage(
|
|
454
|
+
function __voidRenderErrorPage(status, title, error) {
|
|
455
455
|
const heading = status + ": " + title;
|
|
456
456
|
const prefix = status + ": ";
|
|
457
|
-
const overlay = __VOID_DEV && status === 500 && error ? __voidRenderDevErrorOverlay(
|
|
457
|
+
const overlay = __VOID_DEV && status === 500 && error ? __voidRenderDevErrorOverlay(status, title, error) : "";
|
|
458
458
|
return `<!doctype html>
|
|
459
459
|
<html lang="en">
|
|
460
460
|
<head>
|
|
@@ -522,7 +522,7 @@ function createErrorRenderer(options) {
|
|
|
522
522
|
}
|
|
523
523
|
function __voidCreateErrorResponse(request, status, title, error) {
|
|
524
524
|
if (!__voidShouldServeHtmlErrorPage(request)) return new Response(title, { status });
|
|
525
|
-
return new Response(request.method === "HEAD" ? null : __voidRenderErrorPage(
|
|
525
|
+
return new Response(request.method === "HEAD" ? null : __voidRenderErrorPage(status, title, error), {
|
|
526
526
|
status,
|
|
527
527
|
headers: { "content-type": "text/html; charset=utf-8" }
|
|
528
528
|
});
|
|
@@ -535,22 +535,15 @@ function createErrorRenderer(options) {
|
|
|
535
535
|
const response = await assets.fetch(request);
|
|
536
536
|
if (response.ok) {
|
|
537
537
|
const assetCss = __voidGetErrorAssetCss(error);
|
|
538
|
-
|
|
538
|
+
const showOverlay = __VOID_DEV && status === 500 && !!error && __voidShouldServeHtmlErrorPage(c.req.raw);
|
|
539
|
+
if (assetCss || showOverlay) {
|
|
539
540
|
const html = __voidInjectErrorAssetCss(await response.text(), assetCss);
|
|
540
|
-
const body =
|
|
541
|
+
const body = showOverlay ? __voidInjectDevErrorOverlay(html, __voidRenderDevErrorOverlay(status, fallbackText, error)) : html;
|
|
541
542
|
return new Response(c.req.method === "HEAD" ? null : body, {
|
|
542
543
|
status,
|
|
543
544
|
headers: { "content-type": "text/html; charset=utf-8" }
|
|
544
545
|
});
|
|
545
546
|
}
|
|
546
|
-
if (__VOID_DEV && status === 500 && error && __voidShouldServeHtmlErrorPage(c.req.raw)) {
|
|
547
|
-
const overlay = __voidRenderDevErrorOverlay(c.req.raw, status, fallbackText, error);
|
|
548
|
-
const html = await response.text();
|
|
549
|
-
return new Response(c.req.method === "HEAD" ? null : __voidInjectDevErrorOverlay(html, overlay), {
|
|
550
|
-
status,
|
|
551
|
-
headers: { "content-type": "text/html; charset=utf-8" }
|
|
552
|
-
});
|
|
553
|
-
}
|
|
554
547
|
return new Response(response.body, {
|
|
555
548
|
status,
|
|
556
549
|
headers: { "content-type": "text/html; charset=utf-8" }
|
|
@@ -780,7 +773,7 @@ function filterInternalBindings(env, prefixes, exactNames = []) {
|
|
|
780
773
|
function createWorkerFetch(options) {
|
|
781
774
|
return async (request, originalEnv, ctx) => {
|
|
782
775
|
const url = new URL(request.url);
|
|
783
|
-
const discovery = request.method === "POST" && url.pathname === "/__void/prerender-paths";
|
|
776
|
+
const discovery = request.method === "POST" && url.pathname === "/__void/prerender-paths" && originalEnv.__VOID_PRERENDER === "1";
|
|
784
777
|
if (options.validateEnv && !discovery) await options.validateEnv(originalEnv);
|
|
785
778
|
const env = options.remoteEnv && originalEnv.__VOID_REMOTE === "1" ? options.remoteEnv(originalEnv) : originalEnv;
|
|
786
779
|
if (options.isr) {
|
|
@@ -798,14 +791,7 @@ function createWorkerFetch(options) {
|
|
|
798
791
|
}
|
|
799
792
|
const internal = await options.internalRoute(request, env, ctx);
|
|
800
793
|
if (internal) return internal;
|
|
801
|
-
if (discovery) {
|
|
802
|
-
const expected = env.__VOID_PROXY_TOKEN;
|
|
803
|
-
if (expected) {
|
|
804
|
-
const token = request.headers.get("x-void-internal");
|
|
805
|
-
if (!token || token !== expected) return Response.json({ error: "unauthorized" }, { status: 401 });
|
|
806
|
-
}
|
|
807
|
-
return Response.json({ paths: await options.collectPrerenderPaths(request, env, ctx) });
|
|
808
|
-
}
|
|
794
|
+
if (discovery) return Response.json({ paths: await options.collectPrerenderPaths(request, env, ctx) });
|
|
809
795
|
const userEnv = options.filterBindings(env);
|
|
810
796
|
const render = async (req) => options.assets(req, env, await options.app.fetch(req, userEnv, ctx));
|
|
811
797
|
if (options.isr && env.ISR_CACHE && request.headers.get("upgrade")?.toLowerCase() !== "websocket") {
|
|
@@ -828,7 +814,10 @@ function createPageMutationHandler(options) {
|
|
|
828
814
|
return async (context) => {
|
|
829
815
|
const mod = options.load ? await options.load() : {};
|
|
830
816
|
const actionName = options.namedActions ? new URL(context.req.url).searchParams.keys().next().value : void 0;
|
|
831
|
-
const
|
|
817
|
+
const name = actionName || "default";
|
|
818
|
+
const named = mod.actions;
|
|
819
|
+
const candidate = named && Object.hasOwn(named, name) ? named[name] : void 0;
|
|
820
|
+
const handler = options.namedActions ? typeof candidate === "function" ? candidate : void 0 : mod.action;
|
|
832
821
|
if (options.namedActions && !handler) return new Response("Unknown action" + (actionName ? ": " + actionName : ""), { status: 404 });
|
|
833
822
|
return handlePageMutation(handler, mod.loader, mod.head, context, options.componentId, options.render, options.assets, options.headConfig ?? void 0, options.renderOptions);
|
|
834
823
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
2
|
import { i as SandboxExecOptions, s as SandboxOptions } from "../sandbox-container-Bo0eiFKz.mjs";
|
|
3
|
-
import { a as SandboxFiles, c as SandboxUnavailableError, d as __setSandboxBindingName, f as getSandbox, i as SandboxClient, l as VoidPlatformSandbox, n as DEFAULT_SANDBOX_ID, o as SandboxLimitError, p as sandbox, r as SANDBOX_SERVICE_BINDING, s as SandboxProcess, t as DEFAULT_SANDBOX_BINDING, u as VoidSandboxOptions } from "../sandbox-
|
|
3
|
+
import { a as SandboxFiles, c as SandboxUnavailableError, d as __setSandboxBindingName, f as getSandbox, i as SandboxClient, l as VoidPlatformSandbox, n as DEFAULT_SANDBOX_ID, o as SandboxLimitError, p as sandbox, r as SANDBOX_SERVICE_BINDING, s as SandboxProcess, t as DEFAULT_SANDBOX_BINDING, u as VoidSandboxOptions } from "../sandbox-C5LFoJMf.mjs";
|
|
4
4
|
export * from "@cloudflare/sandbox";
|
|
5
5
|
export { DEFAULT_SANDBOX_BINDING, DEFAULT_SANDBOX_ID, SANDBOX_SERVICE_BINDING, SandboxClient, type SandboxExecOptions, SandboxFiles, SandboxLimitError, type SandboxOptions, SandboxProcess, SandboxUnavailableError, VoidPlatformSandbox, VoidSandboxOptions, __setSandboxBindingName, getSandbox, sandbox };
|