void 1.4.0 → 1.6.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/README.md +1 -1
- package/dist/{account-cmd-HP8bixYo.mjs → account-cmd-DRhmCWcm.mjs} +7 -8
- package/dist/{action-key-XZ9HkWAO.mjs → action-key-XtKKbbsi.mjs} +1 -2
- package/dist/{agents-CuNtT0D_.mjs → agents-DRo8gzni.mjs} +2 -3
- package/dist/{application-analysis-DDOQwiXk.mjs → application-analysis-HRFsZOv3.mjs} +18 -24
- package/dist/{application-routing-4719u_kf.mjs → application-routing-P4TggvWp.mjs} +2 -3
- package/dist/{ast-CsZ_q_gc.mjs → ast-Cv0JwXqb.mjs} +1 -2
- package/dist/{ast-bindings-C3yaPs1y.mjs → ast-bindings-BkivMJIo.mjs} +6 -11
- package/dist/{atomic-write-Dq6R0BPN.mjs → atomic-write-DA6eD1Kp.mjs} +1 -2
- package/dist/{auth-g2TQbDLD.d.mts → auth-CH4PLAX1.d.mts} +0 -2
- package/dist/{auth-Cbqi1iVX.mjs → auth-CL-p_rqV.mjs} +1 -1
- package/dist/{auth-B6iOCjKI.mjs → auth-Dy8svcqQ.mjs} +6 -7
- package/dist/{auth-3sGB0zJ1.mjs → auth-YVjBX5NY.mjs} +1 -2
- package/dist/{auth-client-Bawdj38n.d.mts → auth-client-6-Ft9i9T.d.mts} +0 -2
- package/dist/{auth-client-BWBT8HLp.mjs → auth-client-DwCdwKbw.mjs} +1 -2
- package/dist/{auth-client-react-CMLwT2xI.mjs → auth-client-react-CJdeErvM.mjs} +1 -2
- package/dist/{auth-client-react-7GFffu8R.d.mts → auth-client-react-DvQLe5Zb.d.mts} +0 -2
- package/dist/{auth-client-solid-UoreJWZG.mjs → auth-client-solid-BRvgvp6h.mjs} +1 -2
- package/dist/{auth-client-solid-DyTFL4cq.d.mts → auth-client-solid-P9pEtKGp.d.mts} +0 -2
- package/dist/{auth-client-svelte-zetW0KIH.d.mts → auth-client-svelte-B5j8irT6.d.mts} +0 -2
- package/dist/{auth-client-svelte-Cv_WvrRk.mjs → auth-client-svelte-BSqUCEed.mjs} +1 -2
- package/dist/{auth-client-vue-bChShbQP.d.mts → auth-client-vue-BEiAfavk.d.mts} +0 -2
- package/dist/{auth-client-vue-CFk7Xbv3.mjs → auth-client-vue-CPkbRtOO.mjs} +1 -2
- package/dist/{auth-link-CedYpDCy.mjs → auth-link-CVXP1G6G.mjs} +7 -8
- package/dist/{auth-migrations-BO27GDNr.mjs → auth-migrations-DDeifS3v.mjs} +1 -2
- package/dist/{auth-router-vafo7x8w.mjs → auth-router-D1pGdbvB.mjs} +6 -7
- package/dist/{base64-DVrOndmI.mjs → base64-ikl9yBy3.mjs} +1 -2
- package/dist/{better-auth-shared-BHB8kiTE.d.mts → better-auth-shared-BJyG2mH0.d.mts} +2 -6
- package/dist/{better-auth-shared-7FM3Uk2N.mjs → better-auth-shared-C958aM7W.mjs} +31 -7
- package/dist/{build-cmd-9vUAQ1_V.mjs → build-cmd-DmjbuT6d.mjs} +7 -8
- package/dist/{cache-jvwLNb0h.mjs → cache-2khBO1MR.mjs} +7 -8
- package/dist/{cancel-deploy-Dw0UmWKO.mjs → cancel-deploy-_itbbvY3.mjs} +6 -7
- package/dist/{cf-access-CWP4avfP.mjs → cf-access-BmBT2h8_.mjs} +3 -4
- package/dist/{cf-access-BM9G0lhO.mjs → cf-access-pejlJmuy.mjs} +1 -2
- package/dist/{cf-build-output-XpNR9zoh.mjs → cf-build-output-B1C8U83u.mjs} +41 -314
- package/dist/cf-build-output-CmDOcA7K.mjs +1 -0
- package/dist/{cf-command-values-ByHk0xg4.mjs → cf-command-values-Ccl-zRhl.mjs} +10 -7
- package/dist/cf-config-migrate-Dy8MrKgF.mjs +326 -0
- package/dist/{cf-worker-settings-Dg27RzyT.mjs → cf-worker-settings-CARs4Wy9.mjs} +3 -5
- package/dist/cli/cli.mjs +66 -76
- package/dist/cli/cloudflare-operation-process.mjs +14 -18
- package/dist/cli/env-schema-probe.d.mts +1 -5
- package/dist/cli/env-schema-probe.mjs +4 -5
- package/dist/client-CEtr5UOR.mjs +1 -0
- package/dist/{client-B3LnB_bE.mjs → client-CoxPEhJq.mjs} +15 -13
- package/dist/{cloudflare-auth-DyD_kVFr.mjs → cloudflare-auth-CEu-1Ps_.mjs} +2 -3
- package/dist/{cloudflare-cmd-D-b_u3T4.mjs → cloudflare-cmd-fZ6AMSWk.mjs} +7 -8
- package/dist/{cloudflare-config-CH1AylZT.mjs → cloudflare-config-eQunqX6A.mjs} +22 -17
- package/dist/{cloudflare-connect-zTJh8UnN.mjs → cloudflare-connect-9OZe4XVQ.mjs} +5 -6
- package/dist/{cloudflare-operations-Bc-7fN44.mjs → cloudflare-operations-CrskD4_O.mjs} +8 -9
- package/dist/{cloudflare-operations-BtulCNOg.mjs → cloudflare-operations-oLvAd9Nd.mjs} +1 -1
- package/dist/{cloudflare-process-8jEYIeim.mjs → cloudflare-process-DjJ638A-.mjs} +7 -9
- package/dist/{cloudflare-user-output-Q-k0QoNQ.mjs → cloudflare-user-output-zEwuGrEJ.mjs} +1 -2
- package/dist/collect-8i0wU63d.mjs +1 -0
- package/dist/{collect-Dew86qce.mjs → collect-C6Blu9yw.mjs} +2 -3
- package/dist/{config-tqMM6DwY.mjs → config-BBlVXZCU.mjs} +5 -6
- package/dist/{config-OFOAimzt.mjs → config-BITKQ3O6.mjs} +5 -5
- package/dist/{config-BV2ASlpn.mjs → config-BgysUhnm.mjs} +1 -1
- package/dist/{config-CAdZVTLN.d.mts → config-CPxJmt4M.d.mts} +4 -6
- package/dist/{config-D-6q7EBH.mjs → config-WlvEcL82.mjs} +3 -4
- package/dist/config-entry.d.mts +1 -3
- package/dist/config-entry.mjs +1 -2
- package/dist/{connect-BOM6zvFX.mjs → connect-CKvmkl2R.mjs} +10 -11
- package/dist/{create-project-C2K0DN2O.mjs → create-project-BiMmR5wA.mjs} +1 -1
- package/dist/{create-project-Bxd02EHN.mjs → create-project-Bq0M8MtO.mjs} +9 -11
- package/dist/{database-provider-Cx525bwX.mjs → database-provider-DkZo4VwN.mjs} +1 -2
- package/dist/database-provider.d.mts +1 -3
- package/dist/database-provider.mjs +1 -1
- package/dist/{db-Cdvr3zwG.mjs → db-cq5RW4Vy.mjs} +52 -54
- package/dist/{db-types-0eCiqYb1.mjs → db-types-C_8amnB0.mjs} +3 -4
- package/dist/{delete-lETE6Tpt.mjs → delete-CY4L8fi2.mjs} +7 -8
- package/dist/deploy-B029oHlE.mjs +2 -0
- package/dist/{deploy-CdM-LAxX.mjs → deploy-D_gEojD2.mjs} +144 -136
- package/dist/{deploy-managed-static-DjeBFG2c.mjs → deploy-managed-static-BHVbB_-A.mjs} +33 -40
- package/dist/{deploy-transport-DIq_gFTP.mjs → deploy-transport-DEyOUfac.mjs} +6 -7
- package/dist/deploy.d.mts +1 -3
- package/dist/deploy.mjs +11 -11
- package/dist/{dev-inbox-D0jxye_D.mjs → dev-inbox-CUUS6iUg.mjs} +3 -4
- package/dist/discover-D4mQthao.mjs +1 -0
- package/dist/{discover-LaV0tbIu.mjs → discover-Dhkzxgdt.mjs} +3 -4
- package/dist/{dispatch-CLa2LThw.mjs → dispatch-BNLB5_Gm.mjs} +12 -15
- package/dist/{dist-Cegxq8gs.mjs → dist-B6eN80gc.mjs} +199 -118
- package/dist/{dist-D15hFhP0.mjs → dist-BWNkVq50.mjs} +8 -15
- package/dist/{dist-Cor9XGoz.mjs → dist-D23AAMxT.mjs} +9 -16
- package/dist/{dist-ipQi0Q8y.mjs → dist-DMYe8CZJ.mjs} +1 -2
- package/dist/{dist-B1PLt4_8.mjs → dist-eV_Ep60B.mjs} +1 -1
- package/dist/{domain-DyhNtdYf.mjs → domain-BlH90Ods.mjs} +8 -9
- package/dist/{dotenv-CNazY3-w.mjs → dotenv-CEI8hapP.mjs} +1 -2
- package/dist/{drizzle-9TubSZvI.mjs → drizzle-C8MPqt5m.mjs} +1 -1
- package/dist/{drizzle-BQfyvQKX.mjs → drizzle-lFdzSEa9.mjs} +2 -3
- package/dist/{email-B9ayYQEG.mjs → email-BHY72ixO.mjs} +3 -4
- package/dist/{email-DM2wDcBN.mjs → email-Bkq8ZL1p.mjs} +14 -15
- package/dist/{email-cloudflare-PMbAev9Q.mjs → email-cloudflare-MvJIxrwx.mjs} +18 -123
- package/dist/{email-protocol-D9nTvhCp.mjs → email-protocol-DTs_TjCS.mjs} +1 -2
- package/dist/{entry-BEM8ZuGP.mjs → entry-CBZsCy3O.mjs} +5 -6
- package/dist/{env-78hbN-oI.mjs → env-AvuCSeCH.mjs} +10 -11
- package/dist/{env-BaMz0j7H.mjs → env-CuzZZyjB.mjs} +3 -4
- package/dist/{env-0jrMQJI_.mjs → env-DtKg5G26.mjs} +2 -3
- package/dist/{env-helpers--wFmQ_5Q.mjs → env-helpers-Dj_SIwPu.mjs} +1 -2
- package/dist/{env-helpers-CyKtOBpj.d.mts → env-helpers-U56xuFgL.d.mts} +1 -3
- package/dist/{env-public-6lqiSD2b.d.mts → env-public-CeNeO_AT.d.mts} +2 -4
- package/dist/{env-raw-D74P4ebM.mjs → env-raw-e8qgqAzQ.mjs} +1 -2
- package/dist/{env-types-BicfKBhV.mjs → env-types-DqzVBKnS.mjs} +4 -5
- package/dist/{env-validation-BUfFZ6bt.mjs → env-validation-C8Cmvas0.mjs} +1 -1
- package/dist/{env-validation-B3VobvXm.mjs → env-validation-GV1oD4EV.mjs} +9 -10
- package/dist/{error-pages-CLIJ7aYq.mjs → error-pages-COVBnzK7.mjs} +6 -12
- package/dist/{fetch-CUX0tB78.d.mts → fetch-B-gLGYVl.d.mts} +0 -4
- package/dist/{fetch-CtESUYWd.mjs → fetch-C8yhLoF3.mjs} +3 -4
- package/dist/{fetch-error-Bw0n-IY-.mjs → fetch-error-DmlRM6e4.mjs} +2 -4
- package/dist/{fetch-stream-BspOeTAI.mjs → fetch-stream-DafNtVJC.mjs} +4 -5
- package/dist/{fetch-stream-DfkAzZf-.d.mts → fetch-stream-DuwxWmBM.d.mts} +1 -3
- package/dist/{gen-CFmsUsW1.mjs → gen-BD-dfjxY.mjs} +12 -13
- package/dist/gen-CIHXh9I8.mjs +1 -0
- package/dist/{generate-DkEb9rL-.mjs → generate-BOp1g1H_.mjs} +1 -1
- package/dist/{generate-B1m4Cm4n.mjs → generate-CWb8aOsm.mjs} +4 -5
- package/dist/{generated-wrangler-config-DeWj5F9Y.mjs → generated-wrangler-config-CoDaaFsA.mjs} +1 -2
- package/dist/{git-metadata-D-gurjzG.mjs → git-metadata-Cukp5kV5.mjs} +1 -2
- package/dist/{github-cmd-De-_IWbM.mjs → github-cmd-CA-lBdkn.mjs} +8 -9
- package/dist/{handler-BHktmuTL.d.mts → handler-BR6Tvjkp.d.mts} +18 -26
- package/dist/{handler-BZ1t7-Rv.mjs → handler-CKeTtYID.mjs} +6 -17
- package/dist/{head-D2VF4ApL.mjs → head-5XPcnG-j.mjs} +1 -2
- package/dist/{head-C8K_iGe6.d.mts → head-MeF_5M_3.d.mts} +0 -2
- package/dist/headers-CuTEdP9C.mjs +445 -0
- package/dist/{help-CKbrhZha.mjs → help-1OCFDsRr.mjs} +28 -12
- package/dist/help-Ba8Dq5-r.mjs +1 -0
- package/dist/{inbound-Da7XsjH3.d.mts → inbound-BHt4dIlL.d.mts} +16 -9
- package/dist/{inbound-VrOLqwZY.mjs → inbound-CdO-qY0w.mjs} +6 -81
- package/dist/index.d.mts +23 -13
- package/dist/index.mjs +495 -223
- package/dist/{info-Yg0-V5Rs.mjs → info-CJxua_db.mjs} +6 -7
- package/dist/{init-CDiJQycf.mjs → init-B-4CluYx.mjs} +43 -59
- package/dist/{isr-config-fZaJJ8t7.mjs → isr-config-Czzb4mIq.mjs} +5 -55
- package/dist/{limits-D0vD1M9A.mjs → limits-CrHLm5Tk.mjs} +1 -2
- package/dist/{limits-CFsDKQvU.d.mts → limits-_xIf5z_P.d.mts} +0 -2
- package/dist/{link-Dllip08S.mjs → link-DAXOT-G_.mjs} +8 -9
- package/dist/{list-BYRP6am0.mjs → list-BYSOo9fm.mjs} +8 -9
- package/dist/{live-BllfDuzA.d.mts → live-0xrcVpyq.d.mts} +2 -4
- package/dist/{live-BcHoTDFe.mjs → live-DF4HUl2m.mjs} +5 -7
- package/dist/{load-user-env-DD5qveNU.mjs → load-user-env-CSwdofj0.mjs} +1 -2
- package/dist/{local-d1-CAwAs9GH.mjs → local-d1-BLgsNUj9.mjs} +4 -5
- package/dist/{log-BMwmN5Ae.mjs → log-D9hwSySP.mjs} +3 -4
- package/dist/login-BpbYeu-n.mjs +1 -0
- package/dist/{login-PcFy5mlC.mjs → login-CJopTWX4.mjs} +6 -7
- package/dist/{logs-DmJTBhed.mjs → logs-DE0weBsR.mjs} +19 -18
- package/dist/{migrate-B8S2xTcb.mjs → migrate-ChHHZBTi.mjs} +20 -16
- package/dist/migrate-HdA6Kh2p.mjs +1 -0
- package/dist/{migration-handler-CwlEQUoo.d.mts → migration-handler-D8mDx3Ew.d.mts} +0 -4
- package/dist/{migration-handler-Cg0Y4EPu.mjs → migration-handler-DCehTlWs.mjs} +1 -2
- package/dist/{mime-BAyHPskU.mjs → mime-CtP6-qAF.mjs} +145 -18
- package/dist/{mysql-migration-sql-BIS5vbNk.mjs → mysql-migration-sql-CI9VTwjt.mjs} +3 -5
- package/dist/{neon-DTZr7Bu7.mjs → neon-CJzQSycr.mjs} +2 -3
- package/dist/nitro.d.mts +0 -2
- package/dist/nitro.mjs +5 -6
- package/dist/{node-CDOPrGSl.mjs → node-CZ6lGNLn.mjs} +8 -9
- package/dist/{operator-args-BsJIYXaT.mjs → operator-args-D79WQP70.mjs} +2 -3
- package/dist/{operator-auth-Cr2zCc-J.mjs → operator-auth-CfDcmzpo.mjs} +2 -3
- package/dist/{operator-client-C-ROjk1I.mjs → operator-client-BIY4-N_6.mjs} +3 -4
- package/dist/{operator-cmd-DmkmS2wL.mjs → operator-cmd-BUqsdk2K.mjs} +32 -15
- package/dist/operator-cmd-wBYyp8iQ.mjs +1 -0
- package/dist/{output-BpgYODYx.mjs → output-BCdLioKP.mjs} +4 -5
- package/dist/output-E6gecbbV.mjs +1 -0
- package/dist/{package-json-BjYqR-So.mjs → package-json-DvS6IFRv.mjs} +2 -3
- package/dist/pages/client.d.mts +147 -31
- package/dist/pages/client.mjs +199 -43
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/head.mjs +1 -1
- package/dist/pages/index.d.mts +25 -18
- package/dist/pages/index.mjs +24 -12
- package/dist/pages/islands-plugin.d.mts +75 -13
- package/dist/pages/islands-plugin.mjs +92 -7
- package/dist/pages/prefetch.d.mts +2 -2
- package/dist/pages/prefetch.mjs +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -2
- package/dist/pages/serialize.d.mts +1 -1
- package/dist/pages/serialize.mjs +1 -1
- package/dist/{pg-J2HbZIkX.mjs → pg-DoyPxa_X.mjs} +1 -2
- package/dist/{picocolors-BsDfhxIw.mjs → picocolors-D1NxSLw-.mjs} +2 -3
- package/dist/{plan-BhLO2p4w.mjs → plan-BOD70XGS.mjs} +1 -2
- package/dist/plan-CQ-N4gws.mjs +1 -0
- package/dist/platform-args-C7XUw9mw.mjs +1 -0
- package/dist/{platform-args-BMD2gjc_.mjs → platform-args-Cx1M-7bq.mjs} +22 -11
- package/dist/{platform-auth-config-CImnfohz.mjs → platform-auth-config-K4m_LE8b.mjs} +10 -11
- package/dist/{platform-auth-protection-BogLhtHi.mjs → platform-auth-protection-KF5Vo-1I.mjs} +10 -11
- package/dist/{platform-auth-recovery-B-mEaWEi.mjs → platform-auth-recovery-BOdFrl7R.mjs} +9 -11
- package/dist/{platform-cmd-CV8NxIIn.mjs → platform-cmd-DpCHawGF.mjs} +1 -1
- package/dist/{platform-cmd-DZK2ixMl.mjs → platform-cmd-Ds3EAV5t.mjs} +13 -13
- package/dist/{platform-discovery-CHhNs8Nn.mjs → platform-discovery-B0eZjZ3B.mjs} +2 -3
- package/dist/{platform-domain-CRvelPGE.mjs → platform-domain-rWJshybd.mjs} +7 -8
- package/dist/{platform-lifecycle-DwXq7kZt.mjs → platform-lifecycle-BH34I0rh.mjs} +1 -1
- package/dist/{platform-lifecycle-CPYY7E9B.mjs → platform-lifecycle-D9RdGub1.mjs} +110 -110
- package/dist/{platform-management-BOnGbMSM.mjs → platform-management-BRefdHGD.mjs} +27 -11
- package/dist/{platform-management-lXdgGgAM.mjs → platform-management-BfLW0Zlo.mjs} +1 -1
- package/dist/{platform-plans-config-CeydDSj0.mjs → platform-plans-config-Dx1agneU.mjs} +5 -6
- package/dist/{platform-recovery-noaALXnE.mjs → platform-recovery-DZuZGJtt.mjs} +5 -6
- package/dist/{platform-registry-B9mWX9LO.mjs → platform-registry-DZ_2Xuqd.mjs} +4 -6
- package/dist/platform-runtime-logs-CdJGnk3f.mjs +68 -0
- package/dist/{platform-setup-Ca53gtt0.mjs → platform-setup-Vw1AaUN8.mjs} +19 -7
- package/dist/{plugin-inference-CeiB6BG5.mjs → plugin-inference-CdLbxZL_.mjs} +16 -24
- package/dist/{prefetch-Bsc_Pb6c.mjs → prefetch-Dx2jIbtg.mjs} +20 -3
- package/dist/{prefetch-Ce6la4EI.d.mts → prefetch-NdNeubbH.d.mts} +7 -3
- package/dist/{prepare-D604Yiyr.mjs → prepare-BJW-f1f1.mjs} +13 -14
- package/dist/{prepare-BuOS18AM.mjs → prepare-BMGeKL16.mjs} +4 -5
- package/dist/prepare-BdxJJCMv.mjs +1 -0
- package/dist/{prerender-render-CaShbHJ3.mjs → prerender-render-RlAj6hh8.mjs} +2 -3
- package/dist/prerender-render.d.mts +1 -3
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-rqDnVsJN.mjs → project-CLwxcEdq.mjs} +3 -4
- package/dist/{project-zdB3fs9G.mjs → project-DVsTAWFh.mjs} +1 -1
- package/dist/{project-cmd-DBYqAIbe.mjs → project-cmd-B_bUyZ3J.mjs} +21 -23
- package/dist/{project-paths-DGu_QZ_Q.mjs → project-paths-CdGv9Tmi.mjs} +3 -5
- package/dist/project-slug-BUy0lmyR.mjs +1 -0
- package/dist/{project-slug-23TpquG4.mjs → project-slug-CO6ci9XG.mjs} +0 -1
- package/dist/{project-team-BjCLgTRC.mjs → project-team-MjT5K4rQ.mjs} +7 -8
- package/dist/{project-token-BB6PwaA9.mjs → project-token-BKHGwY3k.mjs} +7 -8
- package/dist/{project-tsconfig-CVvk6Z_e.mjs → project-tsconfig-Cf2NFjlM.mjs} +4 -6
- package/dist/{project-zero-trust-CWDh1P_t.mjs → project-zero-trust-Bzdd05-h.mjs} +7 -8
- package/dist/{protocol-DimNxVRr.mjs → protocol-COyySMki.mjs} +135 -113
- package/dist/{protocol-D5XDySYu.d.mts → protocol-CkwjASep.d.mts} +4 -6
- package/dist/{providers-BNKRacMr.d.mts → providers-D5P8j_8D.d.mts} +0 -2
- package/dist/{providers-BUHwJlmM.mjs → providers-ZARwX2cL.mjs} +1 -2
- package/dist/{provision-DztLJ97X.mjs → provision-BbCzpbXs.mjs} +6 -7
- package/dist/{provision-DfxLCg-d.mjs → provision-DQF6Kw-6.mjs} +1 -1
- package/dist/{queues-BWKt1Xo4.d.mts → queues-DdM42xXW.d.mts} +0 -2
- package/dist/{r2-conditions-B8xUgJRc.mjs → r2-conditions-BqkQNt2n.mjs} +1 -2
- package/dist/{requests-D_pbzDyz.mjs → requests-daJmVpjk.mjs} +6 -7
- package/dist/resolve-project-CgfjtOwz.mjs +1 -0
- package/dist/{resolve-project-Xoi6eTWY.mjs → resolve-project-D0YNnJfm.mjs} +4 -5
- package/dist/{resource-name-C7LVpcRm.mjs → resource-name-DlJ9QXzg.mjs} +1 -2
- package/dist/{response-Tn7rU0MV.mjs → response-HmNjB30w.mjs} +1 -2
- package/dist/{rollback-CjfIYsJx.mjs → rollback-BgL0wY1J.mjs} +7 -8
- package/dist/{rolldown-runtime-3h0WiCiA.mjs → rolldown-runtime-uD8oG6U2.mjs} +1 -2
- package/dist/{route-types-DvEGmPif.mjs → route-types-CZc1YXjF.mjs} +80 -9
- package/dist/route-url-CRDF-I0I.mjs +57 -0
- package/dist/route-url-C_YIH_zO.d.mts +37 -0
- package/dist/routes-stub.d.mts +8 -3
- package/dist/routes-stub.mjs +1 -1
- package/dist/{routing-assets-DdSFxoLp.mjs → routing-assets-DJIVOrCh.mjs} +1 -2
- package/dist/{runner-3uGC-oLF.mjs → runner-5MCSimKx.mjs} +5 -6
- package/dist/{runner-WCdfeI0q.mjs → runner-QMeOpScZ.mjs} +1 -1
- package/dist/{runner-mysql-BcHnLUuM.mjs → runner-mysql-0zVmB1JW.mjs} +1 -1
- package/dist/{runner-mysql-BWmbk5IE.mjs → runner-mysql-Bdmsp_x4.mjs} +3 -4
- package/dist/{runner-pg-Cgp-cr_p.mjs → runner-pg-2pjltt0t.mjs} +1 -1
- package/dist/{runner-pg-Cr3qrqi4.mjs → runner-pg-mYc75KfH.mjs} +2 -3
- package/dist/runtime/ai.d.mts +0 -4
- package/dist/runtime/ai.mjs +6 -8
- package/dist/runtime/auth-client-react.d.mts +1 -1
- package/dist/runtime/auth-client-react.mjs +1 -1
- package/dist/runtime/auth-client-solid.d.mts +1 -1
- package/dist/runtime/auth-client-solid.mjs +1 -1
- package/dist/runtime/auth-client-svelte.d.mts +1 -1
- package/dist/runtime/auth-client-svelte.mjs +1 -1
- package/dist/runtime/auth-client-vue.d.mts +1 -1
- package/dist/runtime/auth-client-vue.mjs +1 -1
- package/dist/runtime/auth-client.d.mts +1 -1
- package/dist/runtime/auth-client.mjs +1 -1
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/auth.mjs +1 -1
- package/dist/runtime/better-auth-mysql.d.mts +2 -4
- package/dist/runtime/better-auth-mysql.mjs +3 -4
- package/dist/runtime/better-auth-pg.d.mts +2 -4
- package/dist/runtime/better-auth-pg.mjs +4 -5
- package/dist/runtime/better-auth.d.mts +2 -4
- package/dist/runtime/better-auth.mjs +3 -4
- package/dist/runtime/client-react.d.mts +4 -4
- package/dist/runtime/client-react.mjs +4 -4
- package/dist/runtime/client-solid.d.mts +4 -4
- package/dist/runtime/client-solid.mjs +4 -4
- package/dist/runtime/client-svelte.d.mts +4 -4
- package/dist/runtime/client-svelte.mjs +4 -4
- package/dist/runtime/client-vue.d.mts +4 -4
- package/dist/runtime/client-vue.mjs +4 -4
- package/dist/runtime/client.d.mts +4 -4
- package/dist/runtime/client.mjs +4 -4
- package/dist/runtime/db.d.mts +0 -2
- package/dist/runtime/db.mjs +2 -3
- package/dist/runtime/durable.d.mts +0 -2
- package/dist/runtime/durable.mjs +3 -4
- package/dist/runtime/email/testing.d.mts +1 -5
- package/dist/runtime/email/testing.mjs +5 -6
- package/dist/runtime/email-protocol.d.mts +0 -2
- package/dist/runtime/email-protocol.mjs +1 -1
- package/dist/runtime/email.d.mts +1 -5
- package/dist/runtime/email.mjs +6 -7
- package/dist/runtime/env-public-client.d.mts +1 -3
- package/dist/runtime/env-public-client.mjs +2 -3
- package/dist/runtime/env-public.d.mts +2 -2
- package/dist/runtime/env-public.mjs +5 -7
- package/dist/runtime/env.d.mts +0 -4
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/fetch-server.d.mts +1 -3
- package/dist/runtime/fetch-server.mjs +3 -4
- package/dist/runtime/fetch-stream.d.mts +2 -2
- package/dist/runtime/fetch-stream.mjs +2 -2
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/fetch.mjs +2 -2
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +2 -2
- package/dist/runtime/isr.d.mts +1 -3
- package/dist/runtime/isr.mjs +2 -3
- package/dist/runtime/kv.d.mts +1 -3
- package/dist/runtime/kv.mjs +2 -3
- package/dist/runtime/limits.d.mts +1 -1
- package/dist/runtime/limits.mjs +1 -1
- package/dist/runtime/live-client.d.mts +1 -3
- package/dist/runtime/live-client.mjs +1 -2
- package/dist/runtime/live-server.d.mts +0 -2
- package/dist/runtime/live-server.mjs +3 -4
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/log.d.mts +3 -3
- package/dist/runtime/log.mjs +26 -18
- package/dist/runtime/migration-handler-mysql.d.mts +2 -4
- package/dist/runtime/migration-handler-mysql.mjs +2 -3
- package/dist/runtime/migration-handler-pg.d.mts +2 -4
- package/dist/runtime/migration-handler-pg.mjs +2 -3
- package/dist/runtime/migration-handler.d.mts +1 -1
- package/dist/runtime/migration-handler.mjs +1 -1
- package/dist/runtime/queues.d.mts +1 -1
- package/dist/runtime/queues.mjs +2 -3
- package/dist/runtime/remote/binding-handler.d.mts +1 -3
- package/dist/runtime/remote/binding-handler.mjs +3 -4
- package/dist/runtime/remote/index.d.mts +1 -3
- package/dist/runtime/remote/index.mjs +8 -13
- package/dist/runtime/response.d.mts +1 -3
- package/dist/runtime/response.mjs +1 -1
- package/dist/runtime/route-url.d.mts +2 -2
- package/dist/runtime/route-url.mjs +1 -1
- package/dist/runtime/routing.d.mts +8 -11
- package/dist/runtime/routing.mjs +52 -32
- package/dist/runtime/sandbox-container.d.mts +1 -1
- package/dist/runtime/sandbox-container.mjs +1 -1
- package/dist/runtime/sandbox.d.mts +2 -2
- package/dist/runtime/sandbox.mjs +5 -6
- package/dist/runtime/seed.d.mts +0 -2
- package/dist/runtime/seed.mjs +1 -2
- package/dist/runtime/sse-client.d.mts +1 -3
- package/dist/runtime/sse-client.mjs +1 -2
- package/dist/runtime/sse.d.mts +1 -3
- package/dist/runtime/sse.mjs +1 -1
- package/dist/runtime/storage.d.mts +1 -3
- package/dist/runtime/storage.mjs +2 -3
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/validator.mjs +1 -1
- package/dist/runtime/ws-server.d.mts +3 -5
- package/dist/runtime/ws-server.mjs +3 -4
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/runtime/ws.mjs +3 -4
- package/dist/{sandbox-q3waMc2T.d.mts → sandbox-DE1WsxuB.d.mts} +2 -4
- package/dist/{sandbox-container-a9LRUtii.mjs → sandbox-container-BuxhwCgt.mjs} +1 -2
- package/dist/{sandbox-container-ChQRum-j.d.mts → sandbox-container-CZFZdMso.d.mts} +0 -2
- package/dist/{scan-N9WzdcAl.mjs → scan-X2rDDRNa.mjs} +49 -35
- package/dist/{secret-3X0PxmuX.mjs → secret-CPq-B_vp.mjs} +17 -15
- package/dist/{serialize-YHvlcG3Q.mjs → serialize-DUuYuaY3.mjs} +2 -4
- package/dist/{serialize-DtR8Vwa_.d.mts → serialize-I4EmS-Wf.d.mts} +0 -2
- package/dist/{skills-CrUO3PJ0.mjs → skills-D393E4lB.mjs} +4 -5
- package/dist/{sqlite-validation-BzKMWnO4.mjs → sqlite-validation-CLJXXN93.mjs} +1 -2
- package/dist/{sse-CMvCgjNk.mjs → sse-CxR30yMF.mjs} +1 -2
- package/dist/{standard-schema-Fo_vCAZh.d.mts → standard-schema-CuDawHOC.d.mts} +0 -2
- package/dist/{static-asset-marker-Btf-6oCD.mjs → static-asset-marker-DsQKz6lt.mjs} +9 -3
- package/dist/{subcommand-prompt-D9OhhbGG.mjs → subcommand-prompt-CxJXporl.mjs} +3 -4
- package/dist/sveltekit.d.mts +0 -2
- package/dist/sveltekit.mjs +2 -3
- package/dist/{terminal-log-text-D9ACPOuG.mjs → terminal-log-text-DNsWJREL.mjs} +1 -2
- package/dist/{types-w72dljaA.d.mts → types-agfx0alu.d.mts} +0 -4
- package/dist/validate-DY1U9rET.mjs +1 -0
- package/dist/{validate-CnZPMq4q.mjs → validate-Ddzl-IwT.mjs} +4 -5
- package/dist/validation-error-uAAjlsiW.mjs +82 -0
- package/dist/{validator-BTOu0fB0.mjs → validator-CTfmzZYb.mjs} +2 -5
- package/dist/{version-metadata-D2vfMQzv.mjs → version-metadata-C8hLzQkv.mjs} +4 -6
- package/dist/{worker-conditions-AWFRcFxR.mjs → worker-conditions-CBZ0RYsZ.mjs} +1 -2
- package/dist/{wrangler-I-scB_1t.mjs → wrangler-DESSbN8L.mjs} +6 -8
- package/dist/wrangler-DUB3MGHV.mjs +1 -0
- package/dist/{wrapper-BBl1rC32.mjs → wrapper-C9SUxoj7.mjs} +17 -14
- package/dist/{ws-B3ClMVDh.d.mts → ws-Dmjg5NH2.d.mts} +3 -5
- package/dist/{yarn-pnp-DLbEFMT0.mjs → yarn-pnp-DgWbE7z5.mjs} +2 -3
- package/docs/guide/database.md +4 -4
- package/docs/guide/deployment.md +1 -1
- package/docs/guide/edge/headers.md +4 -6
- package/docs/guide/edge/redirects.md +4 -4
- package/docs/guide/edge/rewrites.md +1 -1
- package/docs/guide/edge/static-assets.md +0 -10
- package/docs/guide/email/domains.md +3 -1
- package/docs/guide/email/receiving.md +4 -4
- package/docs/guide/email/sending.md +43 -13
- package/docs/guide/pages-routing/actions-and-forms.md +26 -9
- package/docs/guide/pages-routing/islands.md +5 -5
- package/docs/guide/pages-routing/layouts.md +16 -2
- package/docs/guide/pages-routing/loaders.md +5 -5
- package/docs/guide/pages-routing/markdown.md +7 -7
- package/docs/guide/pages-routing/overview.md +137 -27
- package/docs/guide/platform/administration/connected-apps.md +4 -2
- package/docs/guide/platform/administration/email.md +6 -8
- package/docs/guide/platform/installation/credentials.md +12 -10
- package/docs/guide/platform/installation/maintenance.md +18 -21
- package/docs/guide/platform/installation/prerequisites.md +1 -1
- package/docs/guide/platform/installation/setup.md +23 -2
- package/docs/guide/platform/installation/uninstall.md +1 -1
- package/docs/guide/queues.md +4 -8
- package/docs/guide/self-hosted-platform.md +3 -3
- package/docs/guide/server-routing.md +7 -7
- package/docs/guide/ssg.md +3 -3
- package/docs/guide/type-safety.md +84 -1
- package/docs/guide/typed-fetch.md +1 -1
- package/docs/guide/websockets.md +1 -1
- package/docs/integrations/cloudflare.md +2 -2
- package/docs/integrations/frameworks/analog.md +1 -1
- package/docs/integrations/frameworks/astro.md +17 -12
- package/docs/integrations/frameworks/nuxt.md +1 -1
- package/docs/integrations/frameworks/overview.md +2 -2
- package/docs/integrations/frameworks/sveltekit.md +1 -1
- package/docs/integrations/frameworks/tanstack-start.md +1 -1
- package/docs/integrations/hono.md +5 -5
- package/docs/reference/api/auth.md +1 -1
- package/docs/reference/api/deploy.md +6 -6
- package/docs/reference/api/pages.md +109 -50
- package/docs/reference/api/plugin.md +4 -4
- package/docs/reference/api/resources.md +4 -1
- package/docs/reference/api/rewrites.md +24 -3
- package/docs/reference/api/types.md +45 -0
- package/docs/reference/api.md +2 -2
- package/docs/reference/cli/database.md +15 -9
- package/docs/reference/cli/email.md +4 -2
- package/docs/reference/cli/platform-installation.md +6 -3
- package/docs/reference/cli/project.md +2 -2
- package/docs/reference/cli/secrets.md +3 -1
- package/docs/reference/cli/setup.md +4 -4
- package/docs/reference/cli.md +1 -1
- package/docs/reference/config.md +12 -2
- package/package.json +36 -32
- package/sandbox.Dockerfile +1 -1
- package/schema.json +4 -0
- package/skills/void/SKILL.md +5 -0
- package/dist/cf-build-output-bd8Uwv1P.mjs +0 -1
- package/dist/client-BZb9j66F.mjs +0 -1
- package/dist/collect-BWhkgtAn.mjs +0 -1
- package/dist/deploy-CX94CmKa.mjs +0 -2
- package/dist/discover-D4TPKo57.mjs +0 -1
- package/dist/gen-BhWBT4iu.mjs +0 -1
- package/dist/headers--vaK_chu.mjs +0 -226
- package/dist/help-qOZr3wng.mjs +0 -1
- package/dist/login-BAPmYnb7.mjs +0 -1
- package/dist/migrate-BIYTPQE6.mjs +0 -1
- package/dist/operator-cmd-CjazwOyb.mjs +0 -1
- package/dist/output-BW9uK099.mjs +0 -1
- package/dist/plan-CKX_jWnD.mjs +0 -1
- package/dist/platform-args-BC8_hsDj.mjs +0 -1
- package/dist/prepare-DU-tOpS5.mjs +0 -1
- package/dist/project-slug-6cyz8E7k.mjs +0 -1
- package/dist/resolve-project-DD1vu8s9.mjs +0 -1
- package/dist/route-url-BgPja1GS.d.mts +0 -5
- package/dist/route-url-BjGv_KKY.mjs +0 -28
- package/dist/validate-D7Wn8PUX.mjs +0 -1
- package/dist/validation-error-Dg9Recn1.mjs +0 -49
- package/dist/wrangler-UnwdISay.mjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,55 +1,61 @@
|
|
|
1
|
-
import { n as __toESM } from "./rolldown-runtime-
|
|
2
|
-
import { a as join, c as resolve, i as isAbsolute, n as dirname, o as normalize, s as relative } from "./dist-
|
|
3
|
-
import { t as require_picocolors } from "./picocolors-
|
|
4
|
-
import { l as inferBindingsFromSource, m as applyBindingOverrides, n as FRAMEWORK_SCAN_DIRS, t as DEFAULT_SCAN_DIRS, u as staticModuleReferences } from "./plugin-inference-
|
|
5
|
-
import { n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-
|
|
6
|
-
import { i as loadVoidAuthConfig, n as devAuthConfigImporter, o as viteAuthConfigImporter, t as AUTH_CONFIG_ENVIRONMENT } from "./config-
|
|
7
|
-
import { c as getDatabaseCasing, l as getDatabaseDialect, p as readConfig, u as isNodeTarget } from "./config-
|
|
8
|
-
import { f as invalidateSourceAnalysis, o as resolveLayoutIds, p as isRouteEnabledForEnvironment } from "./scan-
|
|
9
|
-
import { i as isMemberExpression, n as isIdentifier, r as isLiteral } from "./ast-
|
|
10
|
-
import { n as bindingResolver } from "./ast-bindings-
|
|
11
|
-
import { a as hasSandboxSqliteMigration, c as sandboxContainerConfig, i as assertSandboxNamespaceConfig, n as DEFAULT_SANDBOX_CLASS_NAME, p as scanJobsSync, r as SANDBOX_MIGRATION_TAG, s as resolveSandboxConfig, t as analyzeApplicationSync, u as scanQueuesSync } from "./application-analysis-
|
|
12
|
-
import { i as voidWarn, n as voidError, r as voidLog, t as setShowTimestamp } from "./log-
|
|
13
|
-
import { t as MagicString } from "./dist-
|
|
14
|
-
import { a as validateSsrEntries, n as SSR_SERVER_ENTRY_RELATIVE_PATHS, o as validateSsrEntry, t as SSR_CLIENT_ENTRY_RELATIVE_PATHS } from "./entry-
|
|
15
|
-
import { r as hasEmailHandlers } from "./email-
|
|
16
|
-
import { a as
|
|
17
|
-
import {
|
|
18
|
-
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { n as
|
|
23
|
-
import { n as
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import { t as
|
|
32
|
-
import { n as
|
|
33
|
-
import { t as
|
|
34
|
-
import { t as
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import { n as
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
1
|
+
import { n as __toESM } from "./rolldown-runtime-uD8oG6U2.mjs";
|
|
2
|
+
import { a as join, c as resolve, i as isAbsolute, n as dirname, o as normalize, s as relative, t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
3
|
+
import { t as require_picocolors } from "./picocolors-D1NxSLw-.mjs";
|
|
4
|
+
import { l as inferBindingsFromSource, m as applyBindingOverrides, n as FRAMEWORK_SCAN_DIRS, t as DEFAULT_SCAN_DIRS, u as staticModuleReferences } from "./plugin-inference-CdLbxZL_.mjs";
|
|
5
|
+
import { n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-CdGv9Tmi.mjs";
|
|
6
|
+
import { i as loadVoidAuthConfig, n as devAuthConfigImporter, o as viteAuthConfigImporter, t as AUTH_CONFIG_ENVIRONMENT } from "./config-WlvEcL82.mjs";
|
|
7
|
+
import { c as getDatabaseCasing, l as getDatabaseDialect, p as readConfig, u as isNodeTarget } from "./config-BITKQ3O6.mjs";
|
|
8
|
+
import { f as invalidateSourceAnalysis, o as resolveLayoutIds, p as isRouteEnabledForEnvironment } from "./scan-X2rDDRNa.mjs";
|
|
9
|
+
import { i as isMemberExpression, n as isIdentifier, r as isLiteral } from "./ast-Cv0JwXqb.mjs";
|
|
10
|
+
import { n as bindingResolver } from "./ast-bindings-BkivMJIo.mjs";
|
|
11
|
+
import { a as hasSandboxSqliteMigration, c as sandboxContainerConfig, i as assertSandboxNamespaceConfig, n as DEFAULT_SANDBOX_CLASS_NAME, p as scanJobsSync, r as SANDBOX_MIGRATION_TAG, s as resolveSandboxConfig, t as analyzeApplicationSync, u as scanQueuesSync } from "./application-analysis-HRFsZOv3.mjs";
|
|
12
|
+
import { i as voidWarn, n as voidError, r as voidLog, t as setShowTimestamp } from "./log-D9hwSySP.mjs";
|
|
13
|
+
import { t as MagicString } from "./dist-B6eN80gc.mjs";
|
|
14
|
+
import { a as validateSsrEntries, n as SSR_SERVER_ENTRY_RELATIVE_PATHS, o as validateSsrEntry, t as SSR_CLIENT_ENTRY_RELATIVE_PATHS } from "./entry-CBZsCy3O.mjs";
|
|
15
|
+
import { r as hasEmailHandlers } from "./email-BHY72ixO.mjs";
|
|
16
|
+
import { a as isAssetBypassRule, d as hasDocumentRoutes, l as edgeRulesNeedWorker, n as mergeRoutingRules, o as isGeneratedAssetHeaders, p as resolveAssetRoutingPolicy, s as resolveAssetWorkerBypass, t as lintRoutingPhases, u as hasApiRoutes } from "./headers-CuTEdP9C.mjs";
|
|
17
|
+
import { t as writeFileAtomic } from "./atomic-write-DA6eD1Kp.mjs";
|
|
18
|
+
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
19
|
+
import { n as readGeneratedWranglerConfigFile } from "./generated-wrangler-config-CoDaaFsA.mjs";
|
|
20
|
+
import { c as stashCloudflareDeployPointer, i as materializeCloudflareConfig, l as ensureGitignoreLines, o as restoreCloudflarePreviewPointer } from "./cloudflare-config-eQunqX6A.mjs";
|
|
21
|
+
import { A as syncWranglerWebSockets, E as resolveLiveBindingConfig, O as syncWranglerBindings, T as readWranglerWebSocketTombstones, a as LIVE_MIGRATION_TAG, b as readRootWranglerConfig, d as ensureWranglerCompatibilityDate, f as ensureWranglerNodejsAlsFlag, g as normalizeWranglerCompatibilityFlags, h as nextDurableObjectMigrationTag, k as syncWranglerDurableObjects, m as hasDurableObjectSqliteMigration, p as findBindingNameOwner, u as ensureWranglerCompat, v as readExistingLiveBindingConfig, x as readWranglerCompat } from "./wrangler-DESSbN8L.mjs";
|
|
22
|
+
import { n as writeLocalD1PersistState, t as resolveLocalD1Target } from "./local-d1-BLgsNUj9.mjs";
|
|
23
|
+
import { n as scopedAccessCredentials } from "./cf-access-pejlJmuy.mjs";
|
|
24
|
+
import { n as ensurePlatformProxyAccess } from "./cf-access-BmBT2h8_.mjs";
|
|
25
|
+
import { a as getApiUrl, c as getToken, o as getProxyUrl } from "./auth-Dy8svcqQ.mjs";
|
|
26
|
+
import { t as migrateBuiltWranglerConfig } from "./cf-config-migrate-Dy8MrKgF.mjs";
|
|
27
|
+
import { n as scanWranglerDotenvKeys } from "./dotenv-CEI8hapP.mjs";
|
|
28
|
+
import { a as findReservedEnvKeys, c as reservedEnvKeysMessage, i as findLegacyEnvFiles, l as resolveRemoteMode, o as isClientEnvKey, r as LOCAL_ENV_FILE, s as loadLocalEnv } from "./env-CuzZZyjB.mjs";
|
|
29
|
+
import { i as writeFileIfChanged, r as syncAuthTypesInProjectTsconfig } from "./project-tsconfig-Cf2NFjlM.mjs";
|
|
30
|
+
import { a as readDeployBuildQueueNames, r as cloudflareQueueName, s as drizzlePlugin, t as generateQueueResolverSource } from "./dispatch-BNLB5_Gm.mjs";
|
|
31
|
+
import { _ as parseCapturedMessage, a as DEV_INBOX_ENV_VAR, c as DEV_INBOX_TOKEN_ENV_VAR, f as clearDevBuffer, g as listDevMessages, l as DEV_INBOX_TOKEN_HEADER, m as findDevMessage, n as DEV_INBOX_ACK_VALUE, o as DEV_INBOX_MAX_CAPTURE_BYTES, s as DEV_INBOX_PREFIX, t as DEV_INBOX_ACK_HEADER, u as DEV_INBOX_TOKEN_QUERY, v as pushToDevBuffer } from "./dev-inbox-CUUS6iUg.mjs";
|
|
32
|
+
import { n as findEnvFileForPaths, r as generateEnvTypes, t as findEnvFile } from "./env-types-DqzVBKnS.mjs";
|
|
33
|
+
import { t as loadUserEnvFile } from "./load-user-env-CSwdofj0.mjs";
|
|
34
|
+
import { n as INTERNAL_BINDING_PREFIXES, t as INTERNAL_BINDING_EXACT_NAMES } from "./env-raw-e8qgqAzQ.mjs";
|
|
35
|
+
import { t as ASSET_EXTENSIONS } from "./routing-assets-DJIVOrCh.mjs";
|
|
36
|
+
import { a as resolveDistDir, n as collectRevalidate, o as resolveWorkerDirName, r as hasRevalidate, t as collectPages } from "./isr-config-Czzb4mIq.mjs";
|
|
37
|
+
import { t as assertNoPrerenderFailures } from "./prerender-render-RlAj6hh8.mjs";
|
|
38
|
+
import { r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-C8hLzQkv.mjs";
|
|
39
|
+
import { f as prerenderPages, n as SEND_EMAIL_BINDING, p as prerenderPagesNode } from "./email-cloudflare-MvJIxrwx.mjs";
|
|
40
|
+
import { r as defer } from "./validation-error-uAAjlsiW.mjs";
|
|
41
|
+
import { i as safeJsonStringify } from "./protocol-COyySMki.mjs";
|
|
42
|
+
import { n as completeApplicationAnalysis } from "./application-routing-P4TggvWp.mjs";
|
|
43
|
+
import { a as syncAuthTypesFile, i as removeAuthTypesIfPresent, n as generateQueueTypes, t as generateRouteTypes } from "./route-types-CZc1YXjF.mjs";
|
|
44
|
+
import { a as defineMiddleware, c as defineScheduled, i as defineHead, n as basicAuth, o as defineQueue, r as defineHandler, s as defineRender, t as VoidAssetRewriteError } from "./handler-CKeTtYID.mjs";
|
|
42
45
|
import module, { builtinModules, createRequire } from "node:module";
|
|
43
|
-
import { chmodSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, realpathSync, rmSync, statSync, writeFileSync, writeSync } from "node:fs";
|
|
44
|
-
import { cloudflare } from "@cloudflare/vite-plugin";
|
|
46
|
+
import { chmodSync, closeSync, cpSync, existsSync, mkdirSync, mkdtempSync, openSync, readFileSync, realpathSync, rmSync, statSync, writeFileSync, writeSync } from "node:fs";
|
|
45
47
|
import { createRunnableDevEnvironment, defaultServerConditions, isRunnableDevEnvironment, loadEnv, normalizePath, parseSync, resolveEnvPrefix } from "vite";
|
|
46
48
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
47
49
|
import { appendSqliteClassMigration } from "@void/deploy-core";
|
|
48
50
|
import { randomBytes, timingSafeEqual } from "node:crypto";
|
|
49
51
|
import { homedir } from "node:os";
|
|
50
52
|
import { isDeepStrictEqual, parseEnv } from "node:util";
|
|
53
|
+
import { getRootConfigPath, getWorkerAssetsDir, getWorkerConfigPath, readBuildOutput } from "@cloudflare/build-output-utils";
|
|
54
|
+
import { convertToWranglerConfig } from "@cloudflare/config";
|
|
55
|
+
import { cloudflare } from "@cloudflare/vite-plugin";
|
|
56
|
+
import { parse } from "smol-toml";
|
|
51
57
|
import { compilePattern, matchPattern } from "@void/edge";
|
|
52
|
-
|
|
58
|
+
// src/pages/dev-css-assets.ts
|
|
53
59
|
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
54
60
|
const DEV_CSS_ASSET_MODULE_ID = "virtual:void-pages-dev-assets";
|
|
55
61
|
const DEV_CSS_ASSET_ENDPOINT = "/__void/dev/pages-css";
|
|
@@ -432,8 +438,7 @@ export async function getVoidPagesDevCss(request, env, payload) {
|
|
|
432
438
|
}
|
|
433
439
|
}];
|
|
434
440
|
}
|
|
435
|
-
|
|
436
|
-
//#region src/plugin-ai-setup.ts
|
|
441
|
+
// src/plugin-ai-setup.ts
|
|
437
442
|
/**
|
|
438
443
|
* Decide whether to inject a Workers AI binding into the built wrangler config.
|
|
439
444
|
*
|
|
@@ -488,11 +493,11 @@ function readVoidDevCredentials(root) {
|
|
|
488
493
|
* block the server. On completion, writes project.json and restarts the server.
|
|
489
494
|
*/
|
|
490
495
|
async function runAiSetupPrompt(root, token, apiUrl, server) {
|
|
491
|
-
const { select, text, isCancel, log } = await import("./dist-
|
|
492
|
-
const { PlatformClient } = await import("./client-
|
|
493
|
-
const { attachSelectedPlatform, writeProjectConfig } = await import("./project-
|
|
494
|
-
const { inferDefaultSlug } = await import("./resolve-project-
|
|
495
|
-
const { printSuccess } = await import("./output-
|
|
496
|
+
const { select, text, isCancel, log } = await import("./dist-eV_Ep60B.mjs");
|
|
497
|
+
const { PlatformClient } = await import("./client-CEtr5UOR.mjs");
|
|
498
|
+
const { attachSelectedPlatform, writeProjectConfig } = await import("./project-DVsTAWFh.mjs");
|
|
499
|
+
const { inferDefaultSlug } = await import("./resolve-project-CgfjtOwz.mjs");
|
|
500
|
+
const { printSuccess } = await import("./output-E6gecbbV.mjs");
|
|
496
501
|
const client = new PlatformClient(token, { apiUrl });
|
|
497
502
|
let projects;
|
|
498
503
|
try {
|
|
@@ -518,8 +523,8 @@ async function runAiSetupPrompt(root, token, apiUrl, server) {
|
|
|
518
523
|
let projectId;
|
|
519
524
|
let slug;
|
|
520
525
|
if (result === "__create__") {
|
|
521
|
-
const { validateProjectSlug } = await import("./project-slug-
|
|
522
|
-
const { createProjectWithSlugRetry } = await import("./create-project-
|
|
526
|
+
const { validateProjectSlug } = await import("./project-slug-BUy0lmyR.mjs");
|
|
527
|
+
const { createProjectWithSlugRetry } = await import("./create-project-BiMmR5wA.mjs");
|
|
523
528
|
let created;
|
|
524
529
|
try {
|
|
525
530
|
created = await createProjectWithSlugRetry(client, inferDefaultSlug(root), async (defaultSlug) => {
|
|
@@ -551,8 +556,7 @@ async function runAiSetupPrompt(root, token, apiUrl, server) {
|
|
|
551
556
|
await server.restart();
|
|
552
557
|
printSuccess(`Linked to ${slug}.`);
|
|
553
558
|
}
|
|
554
|
-
|
|
555
|
-
//#region src/plugin-binding-runtime.ts
|
|
559
|
+
// src/plugin-binding-runtime.ts
|
|
556
560
|
const envModuleResolved = fileURLToPath(import.meta.resolve("#self/_env"));
|
|
557
561
|
const kvModuleResolved = fileURLToPath(import.meta.resolve("void/kv"));
|
|
558
562
|
const storageModuleResolved = fileURLToPath(import.meta.resolve("void/storage"));
|
|
@@ -604,8 +608,7 @@ export const storage = new Proxy({}, {
|
|
|
604
608
|
}
|
|
605
609
|
};
|
|
606
610
|
}
|
|
607
|
-
|
|
608
|
-
//#region src/plugin-client-stubs.ts
|
|
611
|
+
// src/plugin-client-stubs.ts
|
|
609
612
|
function createClientStubsPlugin() {
|
|
610
613
|
const STUB_PREFIX = "\0void-client-stub:";
|
|
611
614
|
const SERVER_ONLY_STUBS = {
|
|
@@ -677,8 +680,277 @@ function createClientStubsPlugin() {
|
|
|
677
680
|
}
|
|
678
681
|
};
|
|
679
682
|
}
|
|
680
|
-
|
|
681
|
-
|
|
683
|
+
// src/plugin-cloudflare-config.ts
|
|
684
|
+
/** Match the old plugin's patch semantics, including its array concatenation. */
|
|
685
|
+
function mergeCloudflareConfig(patch, fallback) {
|
|
686
|
+
const result = { ...fallback };
|
|
687
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
688
|
+
if (value === void 0) continue;
|
|
689
|
+
const previous = result[key];
|
|
690
|
+
result[key] = Array.isArray(value) && Array.isArray(previous) ? [...value, ...previous] : value && previous && typeof value === "object" && typeof previous === "object" && !Array.isArray(value) && !Array.isArray(previous) ? mergeCloudflareConfig(value, previous) : value;
|
|
691
|
+
}
|
|
692
|
+
return result;
|
|
693
|
+
}
|
|
694
|
+
/** Use Cloudflare's public migration API rather than maintaining a second binding translator. */
|
|
695
|
+
function toNativeCloudflareConfig(raw, root) {
|
|
696
|
+
const packagePath = join(root, "package.json");
|
|
697
|
+
const packageName = existsSync(packagePath) ? JSON.parse(readFileSync(packagePath, "utf8")).name : void 0;
|
|
698
|
+
const name = String(packageName ?? basename(root)).replaceAll("_", "-").replace(/[^a-z0-9- ]/g, "-").replace(/^(-+)|(-+)$/g, "").slice(0, 63) || "my-worker";
|
|
699
|
+
const { env, vars, ...base } = raw;
|
|
700
|
+
const selected = process.env.CLOUDFLARE_ENV ? env?.[process.env.CLOUDFLARE_ENV] : void 0;
|
|
701
|
+
const values = selected ? selected.vars : vars;
|
|
702
|
+
const environments = env && Object.fromEntries(Object.entries(env).map(([name, { vars: _vars, ...config }]) => [`void-environment-${name}`, config]));
|
|
703
|
+
const config = migrateBuiltWranglerConfig({
|
|
704
|
+
name,
|
|
705
|
+
compatibility_date: "2026-02-24",
|
|
706
|
+
...base,
|
|
707
|
+
...environments && process.env.CLOUDFLARE_ENV ? { env: environments } : {}
|
|
708
|
+
}, process.env.CLOUDFLARE_ENV ? `void-environment-${process.env.CLOUDFLARE_ENV}` : "void-top-level");
|
|
709
|
+
if (!config.worker) throw new Error("Void requires a Cloudflare Worker configuration.");
|
|
710
|
+
for (const [name, value] of Object.entries(values ?? {})) {
|
|
711
|
+
config.worker.env ??= {};
|
|
712
|
+
config.worker.env[name] = typeof value === "string" ? {
|
|
713
|
+
type: "text",
|
|
714
|
+
value
|
|
715
|
+
} : {
|
|
716
|
+
type: "json",
|
|
717
|
+
value
|
|
718
|
+
};
|
|
719
|
+
}
|
|
720
|
+
const main = selected?.main ?? raw.main;
|
|
721
|
+
if (main) config.worker.entrypoint = main.startsWith("virtual:") ? main : resolve(root, main);
|
|
722
|
+
return {
|
|
723
|
+
...config,
|
|
724
|
+
worker: config.worker
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* Give Container Durable Objects a regular binding in the dev server. Their unsafe
|
|
729
|
+
* binding from `migrateBuiltWranglerConfig()` exists only for the Worker upload, and
|
|
730
|
+
* Miniflare skips unsafe bindings without a dev plugin. Match only that generated form:
|
|
731
|
+
* any other unsafe binding comes from the user's config and may name another Worker,
|
|
732
|
+
* even one with a class of the same name, so it stays as written.
|
|
733
|
+
*/
|
|
734
|
+
function restoreLocalContainerBindings(worker) {
|
|
735
|
+
for (const [name, binding] of Object.entries(worker.env ?? {})) {
|
|
736
|
+
if (binding.type !== "unsafe:durable_object_namespace" || Object.keys(binding).some((key) => !["type", "class_name"].includes(key))) continue;
|
|
737
|
+
const className = binding.class_name;
|
|
738
|
+
const declaration = worker.exports?.[className];
|
|
739
|
+
if (declaration && "container" in declaration) worker.env[name] = {
|
|
740
|
+
type: "durable-object",
|
|
741
|
+
worker: worker.name,
|
|
742
|
+
exportName: className
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
function nativeAuxiliaryWorkers(workers, root) {
|
|
747
|
+
return workers?.map(({ configPath, config, ...options }) => ({
|
|
748
|
+
...options,
|
|
749
|
+
config({ entryWorkerConfig }) {
|
|
750
|
+
const path = configPath ? resolve(root, configPath) : void 0;
|
|
751
|
+
const base = path ? path.endsWith(".toml") ? parse(readFileSync(path, "utf8")) : readGeneratedWranglerConfigFile(path) : {};
|
|
752
|
+
return toNativeCloudflareConfig(mergeCloudflareConfig((typeof config === "function" ? config(base, { entryWorkerConfig: convertToWranglerConfig({
|
|
753
|
+
worker: entryWorkerConfig,
|
|
754
|
+
containers: []
|
|
755
|
+
}) }) : config) ?? {}, base), path ? dirname(path) : root).worker;
|
|
756
|
+
}
|
|
757
|
+
}));
|
|
758
|
+
}
|
|
759
|
+
// src/plugin-cloudflare-preview.ts
|
|
760
|
+
/** Give preview local bindings without changing the deployable build or storing their values. */
|
|
761
|
+
function withLocalPreviewBindings(plugins, root) {
|
|
762
|
+
let directory;
|
|
763
|
+
const cleanup = () => {
|
|
764
|
+
if (directory) {
|
|
765
|
+
rmSync(directory, {
|
|
766
|
+
recursive: true,
|
|
767
|
+
force: true
|
|
768
|
+
});
|
|
769
|
+
directory = void 0;
|
|
770
|
+
}
|
|
771
|
+
process.removeListener("exit", cleanup);
|
|
772
|
+
};
|
|
773
|
+
const entry = plugins.find((plugin) => plugin.name === "vite-plugin-cloudflare");
|
|
774
|
+
if (!entry?.config) throw new Error("The Cloudflare plugin no longer exposes its configuration hook.");
|
|
775
|
+
const hook = typeof entry.config === "function" ? entry.config : entry.config.handler;
|
|
776
|
+
entry.config = async function(config, environment) {
|
|
777
|
+
if (!environment.isPreview) return hook.call(this, config, environment);
|
|
778
|
+
cleanup();
|
|
779
|
+
const parent = join(root, ".void");
|
|
780
|
+
mkdirSync(parent, { recursive: true });
|
|
781
|
+
directory = mkdtempSync(join(parent, "preview-"));
|
|
782
|
+
process.once("exit", cleanup);
|
|
783
|
+
try {
|
|
784
|
+
const output = dirname(getRootConfigPath(root));
|
|
785
|
+
cpSync(output, dirname(getRootConfigPath(directory)), { recursive: true });
|
|
786
|
+
const path = getWorkerConfigPath(directory);
|
|
787
|
+
const worker = JSON.parse(readFileSync(path, "utf8"));
|
|
788
|
+
worker.env ??= {};
|
|
789
|
+
for (const name of Object.keys(loadLocalEnv(root))) {
|
|
790
|
+
const binding = worker.env[name];
|
|
791
|
+
if (!binding || [
|
|
792
|
+
"text",
|
|
793
|
+
"json",
|
|
794
|
+
"secret"
|
|
795
|
+
].includes(binding.type)) worker.env[name] = { type: "secret" };
|
|
796
|
+
}
|
|
797
|
+
writeFileAtomic(path, JSON.stringify(worker));
|
|
798
|
+
return await hook.call(this, {
|
|
799
|
+
...config,
|
|
800
|
+
root: directory,
|
|
801
|
+
envDir: root
|
|
802
|
+
}, environment);
|
|
803
|
+
} catch (error) {
|
|
804
|
+
cleanup();
|
|
805
|
+
throw error;
|
|
806
|
+
}
|
|
807
|
+
};
|
|
808
|
+
return [...plugins, {
|
|
809
|
+
name: "void:cloudflare-preview-cleanup",
|
|
810
|
+
configurePreviewServer(server) {
|
|
811
|
+
server.httpServer.once("close", cleanup);
|
|
812
|
+
}
|
|
813
|
+
}];
|
|
814
|
+
}
|
|
815
|
+
// src/plugin-cloudflare.ts
|
|
816
|
+
function isInside(directory, path) {
|
|
817
|
+
const child = relative(directory, path);
|
|
818
|
+
return child !== ".." && !child.startsWith("../") && !isAbsolute(child);
|
|
819
|
+
}
|
|
820
|
+
/** Keep Void's public configuration and artifact layout while running the v2 plugin. */
|
|
821
|
+
function cloudflare$1(options) {
|
|
822
|
+
const root = process.cwd();
|
|
823
|
+
let workerConfig;
|
|
824
|
+
let native;
|
|
825
|
+
let pluginNative;
|
|
826
|
+
const outputDirectories = /* @__PURE__ */ new Map();
|
|
827
|
+
const bridge = {
|
|
828
|
+
name: "void:cloudflare-config",
|
|
829
|
+
config(_userConfig, environment) {
|
|
830
|
+
if (environment.isPreview) return;
|
|
831
|
+
let base = options.configPath ? readGeneratedWranglerConfigFile(options.configPath) : {};
|
|
832
|
+
if (process.env.CLOUDFLARE_ENV && base.env) {
|
|
833
|
+
const selected = base.env[process.env.CLOUDFLARE_ENV];
|
|
834
|
+
if (!selected) throw new Error(`Cloudflare environment ${process.env.CLOUDFLARE_ENV} is not configured.`);
|
|
835
|
+
const original = base;
|
|
836
|
+
base = convertToWranglerConfig(toNativeCloudflareConfig(base, root));
|
|
837
|
+
base.main = selected.main ?? original.main;
|
|
838
|
+
base.migrations = selected.migrations ?? original.migrations;
|
|
839
|
+
base.assets = {
|
|
840
|
+
...base.assets,
|
|
841
|
+
directory: selected.assets?.directory ?? original.assets?.directory
|
|
842
|
+
};
|
|
843
|
+
}
|
|
844
|
+
workerConfig = mergeCloudflareConfig(options.config(base), base);
|
|
845
|
+
native = toNativeCloudflareConfig(workerConfig, root);
|
|
846
|
+
pluginNative = structuredClone(native);
|
|
847
|
+
if (environment.command === "build" && native.containers.length > 0) {
|
|
848
|
+
pluginNative.containers = [];
|
|
849
|
+
for (const declaration of Object.values(pluginNative.worker?.exports ?? {})) if ("container" in declaration) delete declaration.container;
|
|
850
|
+
} else if (environment.command === "serve") restoreLocalContainerBindings(pluginNative.worker);
|
|
851
|
+
}
|
|
852
|
+
};
|
|
853
|
+
const directories = {
|
|
854
|
+
name: "void:cloudflare-output-directories",
|
|
855
|
+
enforce: "post",
|
|
856
|
+
config(userConfig) {
|
|
857
|
+
const environmentNames = [options.viteEnvironment.name ?? "ssr", ...options.viteEnvironment.childEnvironments ?? []];
|
|
858
|
+
for (const name of [...environmentNames, "client"]) outputDirectories.set(name, resolve(root, userConfig.environments?.[name]?.build?.outDir ?? join(userConfig.build?.outDir ?? "dist", name)));
|
|
859
|
+
}
|
|
860
|
+
};
|
|
861
|
+
const output = {
|
|
862
|
+
name: "void:cloudflare-build-output",
|
|
863
|
+
enforce: "post",
|
|
864
|
+
writeBundle: {
|
|
865
|
+
order: "post",
|
|
866
|
+
handler() {
|
|
867
|
+
if (this.environment?.name !== "client") return;
|
|
868
|
+
const source = resolve(root, this.environment.config.build.outDir);
|
|
869
|
+
const destination = outputDirectories.get("client");
|
|
870
|
+
if (destination && source !== destination && existsSync(source)) {
|
|
871
|
+
mkdirSync(destination, { recursive: true });
|
|
872
|
+
cpSync(source, destination, { recursive: true });
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
},
|
|
876
|
+
buildApp: {
|
|
877
|
+
order: "post",
|
|
878
|
+
async handler(builder) {
|
|
879
|
+
if (Object.values(native.worker?.env ?? {}).some((binding) => binding.type === "assets")) mkdirSync(getWorkerAssetsDir(root), { recursive: true });
|
|
880
|
+
const worker = (await readBuildOutput(root)).workers.default;
|
|
881
|
+
const environment = options.viteEnvironment.name ?? "ssr";
|
|
882
|
+
const destination = outputDirectories.get(environment);
|
|
883
|
+
const client = outputDirectories.get("client");
|
|
884
|
+
if (!worker.bundleDir || !worker.config.manifest) throw new Error("Void requires a built Cloudflare Worker.");
|
|
885
|
+
for (const directory of [destination, client]) if (directory !== root && isInside(root, directory) && !isInside(directory, worker.bundleDir)) rmSync(directory, {
|
|
886
|
+
recursive: true,
|
|
887
|
+
force: true
|
|
888
|
+
});
|
|
889
|
+
mkdirSync(destination, { recursive: true });
|
|
890
|
+
cpSync(worker.bundleDir, destination, { recursive: true });
|
|
891
|
+
if (worker.assetsDir) {
|
|
892
|
+
mkdirSync(client, { recursive: true });
|
|
893
|
+
cpSync(worker.assetsDir, client, { recursive: true });
|
|
894
|
+
}
|
|
895
|
+
const config = {
|
|
896
|
+
...workerConfig,
|
|
897
|
+
name: worker.config.name,
|
|
898
|
+
account_id: native.accountId,
|
|
899
|
+
compatibility_date: worker.config.compatibilityDate,
|
|
900
|
+
compatibility_flags: worker.config.compatibilityFlags,
|
|
901
|
+
main: worker.config.manifest.mainModule,
|
|
902
|
+
no_bundle: true,
|
|
903
|
+
rules: [{
|
|
904
|
+
type: "ESModule",
|
|
905
|
+
globs: ["**/*.js", "**/*.mjs"]
|
|
906
|
+
}],
|
|
907
|
+
...process.env.CLOUDFLARE_ENV ? { targetEnvironment: process.env.CLOUDFLARE_ENV } : {},
|
|
908
|
+
...workerConfig.assets || worker.assetsDir ? { assets: {
|
|
909
|
+
...workerConfig.assets,
|
|
910
|
+
directory: relative(destination, client)
|
|
911
|
+
} } : {}
|
|
912
|
+
};
|
|
913
|
+
delete config.env;
|
|
914
|
+
writeFileAtomic(join(destination, "wrangler.json"), `${JSON.stringify(config, null, 2)}\n`);
|
|
915
|
+
if (options.finalizeAssets) {
|
|
916
|
+
options.finalizeAssets(client, builder.environments.client);
|
|
917
|
+
const finalized = JSON.parse(readFileSync(join(destination, "wrangler.json"), "utf8"));
|
|
918
|
+
if (worker.config.assets && finalized.assets) {
|
|
919
|
+
worker.config.assets.runWorkerFirst = finalized.assets.run_worker_first;
|
|
920
|
+
writeFileAtomic(worker.configPath, JSON.stringify(worker.config));
|
|
921
|
+
}
|
|
922
|
+
if (worker.assetsDir && existsSync(client)) cpSync(client, worker.assetsDir, { recursive: true });
|
|
923
|
+
}
|
|
924
|
+
if (native.containers.length > 0) writeFileAtomic(join(dirname(getRootConfigPath(root)), "void-containers.json"), JSON.stringify({ workerDirectory: relative(root, destination) }));
|
|
925
|
+
const pointer = join(root, ".wrangler/deploy/config.json");
|
|
926
|
+
const pointerDestination = existsSync(join(root, "void.config.ts")) && process.env["VOID_CLOUDFLARE_DEPLOY_BUILD"] !== "1" ? join(root, ".void/preview-deploy-config.json") : pointer;
|
|
927
|
+
mkdirSync(dirname(pointerDestination), { recursive: true });
|
|
928
|
+
writeFileAtomic(pointerDestination, JSON.stringify({ configPath: relative(dirname(pointer), join(destination, "wrangler.json")) }));
|
|
929
|
+
for (const name of options.viteEnvironment.childEnvironments ?? []) {
|
|
930
|
+
const source = builder.environments[name]?.config.build.outDir;
|
|
931
|
+
const target = outputDirectories.get(name);
|
|
932
|
+
if (source && target && existsSync(source)) cpSync(source, target, { recursive: true });
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
};
|
|
937
|
+
return [
|
|
938
|
+
bridge,
|
|
939
|
+
directories,
|
|
940
|
+
...withLocalPreviewBindings(cloudflare({
|
|
941
|
+
inspectorPort: options.inspectorPort,
|
|
942
|
+
persistState: options.persistState,
|
|
943
|
+
viteEnvironment: options.viteEnvironment,
|
|
944
|
+
auxiliaryWorkers: nativeAuxiliaryWorkers(options.auxiliaryWorkers, root),
|
|
945
|
+
types: { generate: false },
|
|
946
|
+
config() {
|
|
947
|
+
return pluginNative;
|
|
948
|
+
}
|
|
949
|
+
}), root),
|
|
950
|
+
output
|
|
951
|
+
];
|
|
952
|
+
}
|
|
953
|
+
// src/plugin-dev-config.ts
|
|
682
954
|
/** Run `fn` shortly after Vite prints "ready" so dev messages stay visible. */
|
|
683
955
|
function afterServerReady(server, fn) {
|
|
684
956
|
if (server.httpServer) server.httpServer.once("listening", () => setTimeout(fn, 100));
|
|
@@ -835,8 +1107,7 @@ function warnIfPackageJsonIsNotEsm(root) {
|
|
|
835
1107
|
if (pkg.type === "module") return;
|
|
836
1108
|
voidWarn("package.json is missing `\"type\": \"module\"`. Vite's default config loader will fail with ERR_REQUIRE_ASYNC_MODULE on transitive top-level await (e.g. @cloudflare/vite-plugin). Add `\"type\": \"module\"` to package.json, or run vite build with `--configLoader runner`.");
|
|
837
1109
|
}
|
|
838
|
-
|
|
839
|
-
//#region src/plugin-dev-triggers-hint.ts
|
|
1110
|
+
// src/plugin-dev-triggers-hint.ts
|
|
840
1111
|
/**
|
|
841
1112
|
* Prints a one-shot hint on dev server start when the project has crons
|
|
842
1113
|
* or queues, explaining how to trigger them locally. Both default Void mode
|
|
@@ -875,8 +1146,7 @@ function devTriggersHintPlugin(root, devTriggerToken) {
|
|
|
875
1146
|
}
|
|
876
1147
|
};
|
|
877
1148
|
}
|
|
878
|
-
|
|
879
|
-
//#region src/plugin-email-dev-inbox.ts
|
|
1149
|
+
// src/plugin-email-dev-inbox.ts
|
|
880
1150
|
const SECURITY_HEADERS = {
|
|
881
1151
|
"Cache-Control": "no-store",
|
|
882
1152
|
"X-Content-Type-Options": "nosniff",
|
|
@@ -1111,8 +1381,7 @@ function renderDetailHtml(m, href) {
|
|
|
1111
1381
|
${bodyHtml}
|
|
1112
1382
|
</body></html>`;
|
|
1113
1383
|
}
|
|
1114
|
-
|
|
1115
|
-
//#region src/plugin-env-client-guard.ts
|
|
1384
|
+
// src/plugin-env-client-guard.ts
|
|
1116
1385
|
let cachedModule = null;
|
|
1117
1386
|
async function loadEnvPublic() {
|
|
1118
1387
|
if (cachedModule) return cachedModule;
|
|
@@ -1301,8 +1570,7 @@ function envClientGuardPlugin(root) {
|
|
|
1301
1570
|
}
|
|
1302
1571
|
};
|
|
1303
1572
|
}
|
|
1304
|
-
|
|
1305
|
-
//#region src/plugin-env-client-fold.ts
|
|
1573
|
+
// src/plugin-env-client-fold.ts
|
|
1306
1574
|
/**
|
|
1307
1575
|
* Walk the AST and collect every static `env.FOO` / `env["FOO"]` (or
|
|
1308
1576
|
* `<ns>.env.FOO`) read. Dynamic keys (`env[variable]`) are intentionally
|
|
@@ -1397,8 +1665,7 @@ function envClientFoldPlugin() {
|
|
|
1397
1665
|
}
|
|
1398
1666
|
};
|
|
1399
1667
|
}
|
|
1400
|
-
|
|
1401
|
-
//#region src/plugin-env-schema.ts
|
|
1668
|
+
// src/plugin-env-schema.ts
|
|
1402
1669
|
/**
|
|
1403
1670
|
* Variables Vite's `loadEnv` copies from env files into `process.env` when
|
|
1404
1671
|
* they are unset, as `[file key, process.env key]`.
|
|
@@ -1634,8 +1901,7 @@ function envSchemaPlugin(root, options = {}) {
|
|
|
1634
1901
|
}
|
|
1635
1902
|
};
|
|
1636
1903
|
}
|
|
1637
|
-
|
|
1638
|
-
//#region src/plugin-framework-triggers.ts
|
|
1904
|
+
// src/plugin-framework-triggers.ts
|
|
1639
1905
|
const DISPATCH_FILE_MODE = 384;
|
|
1640
1906
|
/** Absolute path of the generated dispatch file. Stable across the dev process. */
|
|
1641
1907
|
function frameworkTriggersDispatchPath(root) {
|
|
@@ -1825,18 +2091,6 @@ export async function handleDevTrigger(request, env, ctx) {
|
|
|
1825
2091
|
}
|
|
1826
2092
|
`;
|
|
1827
2093
|
}
|
|
1828
|
-
/** Append any missing `lines` to the project's `.gitignore` and return the appended ones. */
|
|
1829
|
-
function ensureGitignoreLines(root, lines) {
|
|
1830
|
-
const gitignorePath = join(root, ".gitignore");
|
|
1831
|
-
let contents = "";
|
|
1832
|
-
if (existsSync(gitignorePath)) contents = readFileSync(gitignorePath, "utf-8");
|
|
1833
|
-
const existing = new Set(contents.split("\n").map((line) => line.trim()));
|
|
1834
|
-
const missing = lines.filter((line) => !existing.has(line));
|
|
1835
|
-
if (missing.length === 0) return [];
|
|
1836
|
-
const sep = contents.length === 0 || contents.endsWith("\n") ? "" : "\n";
|
|
1837
|
-
writeFileSync(gitignorePath, `${contents}${sep}${missing.join("\n")}\n`);
|
|
1838
|
-
return missing;
|
|
1839
|
-
}
|
|
1840
2094
|
/** Remove `lines` from the project's `.gitignore`, if it still exists. */
|
|
1841
2095
|
function removeGitignoreLines(root, lines) {
|
|
1842
2096
|
const gitignorePath = join(root, ".gitignore");
|
|
@@ -2141,8 +2395,7 @@ function astroDevTriggerInjectPlugin(root) {
|
|
|
2141
2395
|
}
|
|
2142
2396
|
};
|
|
2143
2397
|
}
|
|
2144
|
-
|
|
2145
|
-
//#region src/router/compile.ts
|
|
2398
|
+
// src/router/compile.ts
|
|
2146
2399
|
const FETCH_SERVER_PATH = fileURLToPath(import.meta.resolve("#self/runtime/fetch-server"));
|
|
2147
2400
|
const ROUTING_RUNTIME_PATH = fileURLToPath(import.meta.resolve("#self/runtime/routing"));
|
|
2148
2401
|
function pushDefaultErrorPageHelpers(lines, options) {
|
|
@@ -2242,17 +2495,20 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
|
|
|
2242
2495
|
const emitEdgeRules = !managedDispatch;
|
|
2243
2496
|
const fallbackRulesJson = JSON.stringify(emitEdgeRules && options.fallbackRules?.length ? options.dev ? options.fallbackRules : stripOriginForProd(options.fallbackRules) : void 0);
|
|
2244
2497
|
if (emitEdgeRules && options.redirectRules?.length) compileRoutingRulesMiddleware(lines, options.redirectRules, options.dev === true);
|
|
2245
|
-
if (emitEdgeRules && options.headerRules?.length) compileHeaderMiddleware(lines, options.headerRules);
|
|
2246
2498
|
if (pages && scan.pages.pages.some((page) => page.methods.includes("actions"))) {
|
|
2247
2499
|
lines.push(`import { matchedRoutes as __matchedRoutes } from ${JSON.stringify(options.honoRoutePath)};`);
|
|
2248
2500
|
lines.push("app.use(__createNamedActionMarker(__matchedRoutes));");
|
|
2249
2501
|
}
|
|
2502
|
+
const headerRules = emitEdgeRules ? options.headerRules : void 0;
|
|
2503
|
+
if (headerRules?.length) lines.push(`const __headerRules = ${JSON.stringify(headerRules)};`);
|
|
2250
2504
|
if (auth) {
|
|
2505
|
+
if (headerRules?.length) lines.push("app.use(\"*\", __routingRuntime.headerMiddleware(__headerRules, \"auth-error\"));");
|
|
2251
2506
|
lines.push("app.use(async (c, next) => {");
|
|
2252
2507
|
lines.push(" return runVoidAuthMiddleware(c, next, __voidAuthOptions, __voidAuthDatabase);");
|
|
2253
2508
|
lines.push("});");
|
|
2254
2509
|
lines.push("");
|
|
2255
2510
|
}
|
|
2511
|
+
if (headerRules?.length) lines.push("app.use(\"*\", __routingRuntime.headerMiddleware(__headerRules));");
|
|
2256
2512
|
for (let i = 0; i < scan.middleware.length; i++) lines.push(`app.use(middleware${i});`);
|
|
2257
2513
|
if (scan.middleware.length > 0) lines.push("");
|
|
2258
2514
|
for (let i = 0; i < webSockets.length; i++) {
|
|
@@ -2391,11 +2647,15 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
|
|
|
2391
2647
|
const cloudflareNames = options.cloudflareQueueNames;
|
|
2392
2648
|
lines.push(generateQueueResolverSource(queueNames, cloudflareNames && queueNames.map((name) => cloudflareQueueName(name, cloudflareNames))));
|
|
2393
2649
|
lines.push("");
|
|
2650
|
+
const queueLabels = scan.queues.map((queue) => relative(options.projectRoot, `${queuesDir}/${queue.filePath}`));
|
|
2651
|
+
lines.push(`const __queueLabels = ${JSON.stringify(queueLabels)};`);
|
|
2394
2652
|
lines.push("export async function __processQueue(payload, env) {");
|
|
2395
2653
|
lines.push(" const queueSuffix = payload.queue;");
|
|
2396
2654
|
lines.push(" const __queueIndex = __resolveQueueIndex(queueSuffix);");
|
|
2397
2655
|
lines.push(" if (__queueIndex === -1) {");
|
|
2398
|
-
lines.push("
|
|
2656
|
+
lines.push(" const __error = `No unambiguous queue handler matches \"${String(queueSuffix)}\"`;");
|
|
2657
|
+
lines.push(" console.error(`[void] ${__error}`);");
|
|
2658
|
+
lines.push(" return { ok: false, error: __error };");
|
|
2399
2659
|
lines.push(" }");
|
|
2400
2660
|
lines.push(" const __decisions = new Map();");
|
|
2401
2661
|
lines.push(" function __wrapMsg(m) {");
|
|
@@ -2425,7 +2685,10 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
|
|
|
2425
2685
|
lines.push(" }");
|
|
2426
2686
|
}
|
|
2427
2687
|
lines.push(" }");
|
|
2428
|
-
lines.push(" } catch {
|
|
2688
|
+
lines.push(" } catch (error) {");
|
|
2689
|
+
lines.push(" console.error(`[void] Queue handler ${__queueLabels[__queueIndex]} failed for queue \"${String(queueSuffix)}\":`, error);");
|
|
2690
|
+
lines.push(" __ok = false;");
|
|
2691
|
+
lines.push(" }");
|
|
2429
2692
|
lines.push(" return { ok: __ok, ...(__decisions.size > 0 ? { decisions: Object.fromEntries(__decisions) } : {}) };");
|
|
2430
2693
|
lines.push("}");
|
|
2431
2694
|
lines.push("");
|
|
@@ -2933,11 +3196,6 @@ function compileRoutingRulesMiddleware(lines, rules, dev) {
|
|
|
2933
3196
|
lines.push(`const __routingRules = ${JSON.stringify(dev ? rules : stripOriginForProd(rules))};`);
|
|
2934
3197
|
lines.push("app.use(\"*\", __routingRuntime.routingMiddleware(__routingRules));");
|
|
2935
3198
|
}
|
|
2936
|
-
function compileHeaderMiddleware(lines, rules) {
|
|
2937
|
-
lines.push("// Header rules (applied to responses)");
|
|
2938
|
-
lines.push(`const __headerRules = ${JSON.stringify(rules)};`);
|
|
2939
|
-
lines.push("app.use(\"*\", __routingRuntime.headerMiddleware(__headerRules));");
|
|
2940
|
-
}
|
|
2941
3199
|
/** Generate the server-side fetch client, which calls `app.fetch()` with the current request's credentials. */
|
|
2942
3200
|
function compileWorkerClient(authClientPath, nodeTarget = false) {
|
|
2943
3201
|
const envImport = nodeTarget ? "" : "import { env } from \"cloudflare:workers\";\n";
|
|
@@ -2954,8 +3212,7 @@ export const fetch = createServerFetch(
|
|
|
2954
3212
|
);
|
|
2955
3213
|
`;
|
|
2956
3214
|
}
|
|
2957
|
-
|
|
2958
|
-
//#region src/plugin-framework-entry.ts
|
|
3215
|
+
// src/plugin-framework-entry.ts
|
|
2959
3216
|
/**
|
|
2960
3217
|
* Resolve the server entry module for a Class A framework. We always wrap
|
|
2961
3218
|
* the framework's own entry with a tiny shim that intercepts
|
|
@@ -3099,8 +3356,7 @@ export default {
|
|
|
3099
3356
|
`);
|
|
3100
3357
|
return entryPath;
|
|
3101
3358
|
}
|
|
3102
|
-
|
|
3103
|
-
//#region src/installed-packages.ts
|
|
3359
|
+
// src/installed-packages.ts
|
|
3104
3360
|
function readManifest(dir) {
|
|
3105
3361
|
try {
|
|
3106
3362
|
return JSON.parse(readFileSync(join(dir, "package.json"), "utf8"));
|
|
@@ -3292,8 +3548,7 @@ function findDependencyClosure(name, fromDir) {
|
|
|
3292
3548
|
visit(name, fromDir);
|
|
3293
3549
|
return [...found].sort();
|
|
3294
3550
|
}
|
|
3295
|
-
|
|
3296
|
-
//#region src/plugin-migration.ts
|
|
3551
|
+
// src/plugin-migration.ts
|
|
3297
3552
|
function readDatabaseUrl(root) {
|
|
3298
3553
|
return loadLocalEnv(root).DATABASE_URL;
|
|
3299
3554
|
}
|
|
@@ -3319,7 +3574,7 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
|
|
|
3319
3574
|
const hasSqlMigrations = existsSync(migrationsDir);
|
|
3320
3575
|
if (!hasSqlMigrations && !auth?.enabled) return;
|
|
3321
3576
|
const migrateAuth = async (databaseUrl) => {
|
|
3322
|
-
const { runLocalVoidAuthMigrations } = await import("./node-
|
|
3577
|
+
const { runLocalVoidAuthMigrations } = await import("./node-CZ6lGNLn.mjs");
|
|
3323
3578
|
await runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId, auth?.configPath, databaseUrl, devAuthConfigImporter(server));
|
|
3324
3579
|
};
|
|
3325
3580
|
const mysqlAuth = dialect === "mysql" && auth?.enabled === true;
|
|
@@ -3334,7 +3589,7 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
|
|
|
3334
3589
|
};
|
|
3335
3590
|
try {
|
|
3336
3591
|
if (dialect !== "sqlite") {
|
|
3337
|
-
const { collectMigrations } = await import("./collect-
|
|
3592
|
+
const { collectMigrations } = await import("./collect-8i0wU63d.mjs");
|
|
3338
3593
|
const allMigrations = collectMigrations(migrationsDir);
|
|
3339
3594
|
const runFiles = dialect === "mysql" ? allMigrations.length > 0 : hasSqlMigrations;
|
|
3340
3595
|
const url = runFiles ? readDatabaseUrl(root) : void 0;
|
|
@@ -3348,8 +3603,8 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
|
|
|
3348
3603
|
}
|
|
3349
3604
|
const authWithFiles = authUrl !== void 0 && authUrl === url;
|
|
3350
3605
|
if (url) {
|
|
3351
|
-
const { validateMigrations } = await import("./validate-
|
|
3352
|
-
const appliedNames = dialect === "mysql" ? await import("./runner-mysql-
|
|
3606
|
+
const { validateMigrations } = await import("./validate-DY1U9rET.mjs");
|
|
3607
|
+
const appliedNames = dialect === "mysql" ? await import("./runner-mysql-0zVmB1JW.mjs").then((runner) => runner.getMySqlAppliedMigrations(url)) : await import("./runner-pg-2pjltt0t.mjs").then((runner) => runner.getPgAppliedMigrations(url));
|
|
3353
3608
|
const appliedSet = new Set(appliedNames);
|
|
3354
3609
|
const pending = allMigrations.filter((migration) => !appliedSet.has(migration.name));
|
|
3355
3610
|
if (pending.length > 0) try {
|
|
@@ -3358,20 +3613,20 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
|
|
|
3358
3613
|
refuse(err);
|
|
3359
3614
|
return;
|
|
3360
3615
|
}
|
|
3361
|
-
const applied = dialect === "mysql" ? await import("./runner-mysql-
|
|
3616
|
+
const applied = dialect === "mysql" ? await import("./runner-mysql-0zVmB1JW.mjs").then((runner) => runner.runMySqlMigrations(migrationsDir, url, authWithFiles ? async (names) => {
|
|
3362
3617
|
logApplied(names);
|
|
3363
3618
|
await migrateAuth(url);
|
|
3364
|
-
} : void 0)) : await import("./runner-pg-
|
|
3619
|
+
} : void 0)) : await import("./runner-pg-2pjltt0t.mjs").then((runner) => runner.runPgMigrations(migrationsDir, url));
|
|
3365
3620
|
if (!authWithFiles) logApplied(applied);
|
|
3366
3621
|
}
|
|
3367
3622
|
if (authUrl && !authWithFiles) {
|
|
3368
|
-
const { withMySqlMigrationLockAt } = await import("./runner-mysql-
|
|
3623
|
+
const { withMySqlMigrationLockAt } = await import("./runner-mysql-0zVmB1JW.mjs");
|
|
3369
3624
|
await withMySqlMigrationLockAt(authUrl, () => migrateAuth(authUrl));
|
|
3370
3625
|
}
|
|
3371
3626
|
} else if (hasSqlMigrations) {
|
|
3372
|
-
const { runMigrations, getMiniflareDatabasePath, getAppliedMigrations } = await import("./runner-
|
|
3373
|
-
const { collectMigrations } = await import("./collect-
|
|
3374
|
-
const { validateMigrations } = await import("./validate-
|
|
3627
|
+
const { runMigrations, getMiniflareDatabasePath, getAppliedMigrations } = await import("./runner-QMeOpScZ.mjs");
|
|
3628
|
+
const { collectMigrations } = await import("./collect-8i0wU63d.mjs");
|
|
3629
|
+
const { validateMigrations } = await import("./validate-DY1U9rET.mjs");
|
|
3375
3630
|
const dbPath = getMiniflareDatabasePath(persistRoot, databaseId);
|
|
3376
3631
|
const allMigrations = collectMigrations(migrationsDir);
|
|
3377
3632
|
const appliedRows = await getAppliedMigrations(dbPath);
|
|
@@ -3396,8 +3651,7 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
|
|
|
3396
3651
|
}
|
|
3397
3652
|
};
|
|
3398
3653
|
}
|
|
3399
|
-
|
|
3400
|
-
//#region src/plugin-worker-environment.ts
|
|
3654
|
+
// src/plugin-worker-environment.ts
|
|
3401
3655
|
const CLOUDFLARE_BUILTIN_IMPORT = /^cloudflare:/;
|
|
3402
3656
|
const SANDBOX_SDK_IMPORT = "@cloudflare/sandbox";
|
|
3403
3657
|
const SANDBOX_SDK_IMPORT_FILTER = /^@cloudflare\/sandbox$/;
|
|
@@ -3559,8 +3813,7 @@ function createServerRuntimeOptimizerPlugin(dialect, readCompat) {
|
|
|
3559
3813
|
}
|
|
3560
3814
|
};
|
|
3561
3815
|
}
|
|
3562
|
-
|
|
3563
|
-
//#region src/sveltekit-hooks-transform.ts
|
|
3816
|
+
// src/sveltekit-hooks-transform.ts
|
|
3564
3817
|
/** Add Void's dev bindings to SvelteKit's generated get_hooks function. */
|
|
3565
3818
|
function injectSvelteKitHooks(code, id, dispatchPath) {
|
|
3566
3819
|
return editGetHooks(code, id, `\n const { withRuntimeEnv } = await import("void/_env");\n const { handleDevTrigger } = await import(${JSON.stringify(dispatchPath)});`, "const __origHandle = handle ?? (({ event, resolve }) => resolve(event));\n handle = async ({ event, resolve }) => {\n const __voidEnv = event.platform?.env ?? (await import('cloudflare:workers')).env;\n return withRuntimeEnv(__voidEnv, async () => {\n const __triggerResp = await handleDevTrigger(event.request, __voidEnv, undefined);\n if (__triggerResp) return __triggerResp;\n return __origHandle({ event, resolve });\n });\n };\n ");
|
|
@@ -3591,8 +3844,7 @@ function editGetHooks(code, id, prologue, handleWrapper) {
|
|
|
3591
3844
|
map: ms.generateMap({ hires: true })
|
|
3592
3845
|
};
|
|
3593
3846
|
}
|
|
3594
|
-
|
|
3595
|
-
//#region src/plugin-framework.ts
|
|
3847
|
+
// src/plugin-framework.ts
|
|
3596
3848
|
const handlerFile = fileURLToPath(import.meta.resolve("#self/handler"));
|
|
3597
3849
|
const envModuleFile = fileURLToPath(import.meta.resolve("#self/_env"));
|
|
3598
3850
|
const voidDir = dirname(fileURLToPath(import.meta.url));
|
|
@@ -3952,54 +4204,67 @@ function nodeTargetPlugin(target) {
|
|
|
3952
4204
|
}
|
|
3953
4205
|
}];
|
|
3954
4206
|
}
|
|
3955
|
-
|
|
3956
|
-
//#region src/plugin-prerender.ts
|
|
4207
|
+
// src/plugin-prerender.ts
|
|
3957
4208
|
/**
|
|
3958
4209
|
* Vite plugin that prerenders pages at build time when `output: "static"`.
|
|
3959
4210
|
*
|
|
3960
|
-
*
|
|
3961
|
-
*
|
|
4211
|
+
* Cloudflare prerender runs after Build Output and the compatible dist artifacts
|
|
4212
|
+
* are complete. Other targets run once when the client bundle closes.
|
|
3962
4213
|
*/
|
|
3963
4214
|
function prerenderPlugin(root, config) {
|
|
4215
|
+
const run = async () => {
|
|
4216
|
+
if (config.output !== "static") return;
|
|
4217
|
+
if (process.env.VOID_DEPLOY_BUILD === "1") return;
|
|
4218
|
+
setShowTimestamp(false);
|
|
4219
|
+
const distDir = resolveDistDir(root);
|
|
4220
|
+
const clientDir = join(distDir, "client");
|
|
4221
|
+
let result;
|
|
4222
|
+
if (isNodeTarget(config.target)) result = await prerenderPagesNode({
|
|
4223
|
+
root,
|
|
4224
|
+
ssrDir: join(distDir, "ssr"),
|
|
4225
|
+
clientDir
|
|
4226
|
+
});
|
|
4227
|
+
else {
|
|
4228
|
+
const persistDir = join(root, ".void");
|
|
4229
|
+
const workerDirName = resolveWorkerDirName(distDir);
|
|
4230
|
+
const workerDir = join(distDir, workerDirName);
|
|
4231
|
+
const remoteMode = resolveRemoteMode(config.remote);
|
|
4232
|
+
result = await prerenderPages({
|
|
4233
|
+
root,
|
|
4234
|
+
workerDir,
|
|
4235
|
+
clientDir,
|
|
4236
|
+
persistDir,
|
|
4237
|
+
remoteMode
|
|
4238
|
+
});
|
|
4239
|
+
}
|
|
4240
|
+
if (result.paths.length === 0) {
|
|
4241
|
+
voidLog("No pages to prerender");
|
|
4242
|
+
return;
|
|
4243
|
+
}
|
|
4244
|
+
assertNoPrerenderFailures(result.failed);
|
|
4245
|
+
};
|
|
3964
4246
|
return {
|
|
3965
4247
|
name: "void:prerender",
|
|
4248
|
+
enforce: "post",
|
|
3966
4249
|
apply: "build",
|
|
3967
4250
|
async closeBundle() {
|
|
3968
|
-
if (config.
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
else {
|
|
3981
|
-
const persistDir = join(root, ".void");
|
|
3982
|
-
const workerDirName = resolveWorkerDirName(distDir);
|
|
3983
|
-
const workerDir = join(distDir, workerDirName);
|
|
3984
|
-
const remoteMode = resolveRemoteMode(config.remote);
|
|
3985
|
-
result = await prerenderPages({
|
|
3986
|
-
root,
|
|
3987
|
-
workerDir,
|
|
3988
|
-
clientDir,
|
|
3989
|
-
persistDir,
|
|
3990
|
-
remoteMode
|
|
3991
|
-
});
|
|
3992
|
-
}
|
|
3993
|
-
if (result.paths.length === 0) {
|
|
3994
|
-
voidLog("No pages to prerender");
|
|
3995
|
-
return;
|
|
4251
|
+
if (isNodeTarget(config.target) && this.environment?.name === "client") await run();
|
|
4252
|
+
},
|
|
4253
|
+
buildApp: {
|
|
4254
|
+
order: "post",
|
|
4255
|
+
async handler() {
|
|
4256
|
+
if (isNodeTarget(config.target)) return;
|
|
4257
|
+
await run();
|
|
4258
|
+
if (config.output === "static" && process.env.VOID_DEPLOY_BUILD !== "1") {
|
|
4259
|
+
const assets = getWorkerAssetsDir(root);
|
|
4260
|
+
mkdirSync(assets, { recursive: true });
|
|
4261
|
+
cpSync(join(resolveDistDir(root), "client"), assets, { recursive: true });
|
|
4262
|
+
}
|
|
3996
4263
|
}
|
|
3997
|
-
assertNoPrerenderFailures(result.failed);
|
|
3998
4264
|
}
|
|
3999
4265
|
};
|
|
4000
4266
|
}
|
|
4001
|
-
|
|
4002
|
-
//#region src/plugin-restart.ts
|
|
4267
|
+
// src/plugin-restart.ts
|
|
4003
4268
|
const BINDING_HINT_RESOLVED = "\0virtual:void/binding-hint";
|
|
4004
4269
|
const RESTARTING_HTML_HEAD = `<!DOCTYPE html>
|
|
4005
4270
|
<html lang="en">
|
|
@@ -4184,8 +4449,7 @@ function restartPlugin() {
|
|
|
4184
4449
|
}
|
|
4185
4450
|
};
|
|
4186
4451
|
}
|
|
4187
|
-
|
|
4188
|
-
//#region src/client-asset-manifest.ts
|
|
4452
|
+
// src/client-asset-manifest.ts
|
|
4189
4453
|
/**
|
|
4190
4454
|
* Attach cache provenance to the existing manifest without changing its entry inventory.
|
|
4191
4455
|
* Returns the stamped immutable files, sorted, relative to the client root.
|
|
@@ -4208,8 +4472,7 @@ function stampClientAssetCachePolicy(bundle, manifestPath, headerRules = []) {
|
|
|
4208
4472
|
asset.source = JSON.stringify(manifest, null, 2);
|
|
4209
4473
|
return [...stamped].sort();
|
|
4210
4474
|
}
|
|
4211
|
-
|
|
4212
|
-
//#region src/plugin-routing.ts
|
|
4475
|
+
// src/plugin-routing.ts
|
|
4213
4476
|
const VIRTUAL_ROUTES_ID = "virtual:void-routes";
|
|
4214
4477
|
const VIRTUAL_CLIENT_WORKER_ID = "virtual:void-client-worker";
|
|
4215
4478
|
const VIRTUAL_CLIENT_BROWSER_ID = "virtual:void-client-browser";
|
|
@@ -4235,6 +4498,7 @@ function routingPlugin(root, options) {
|
|
|
4235
4498
|
let previewing = false;
|
|
4236
4499
|
let ssr = null;
|
|
4237
4500
|
let authConfigPath = null;
|
|
4501
|
+
let output;
|
|
4238
4502
|
const routeInputsKey = () => JSON.stringify([
|
|
4239
4503
|
scan,
|
|
4240
4504
|
authConfigPath,
|
|
@@ -4277,7 +4541,7 @@ function routingPlugin(root, options) {
|
|
|
4277
4541
|
}
|
|
4278
4542
|
function writeRouteTypes() {
|
|
4279
4543
|
if (!scan) return;
|
|
4280
|
-
const { dts } = generateRouteTypes(scan, routesDir, outDir, pagesDir);
|
|
4544
|
+
const { dts } = generateRouteTypes(scan, routesDir, outDir, pagesDir, { typedRoutes: options.routing?.typedRoutes });
|
|
4281
4545
|
writeFileIfChanged(join(outDir, "routes.d.ts"), dts);
|
|
4282
4546
|
}
|
|
4283
4547
|
function writeQueueTypes() {
|
|
@@ -4291,6 +4555,7 @@ function routingPlugin(root, options) {
|
|
|
4291
4555
|
const entries = validateSsrEntries(root, paths);
|
|
4292
4556
|
scan = nextScan;
|
|
4293
4557
|
authConfigPath = analysis.authConfigPath;
|
|
4558
|
+
output = analysis.config.output;
|
|
4294
4559
|
ssr = entries ? {
|
|
4295
4560
|
serverEntryPath: entries.server.absolutePath,
|
|
4296
4561
|
clientEntryRelativePath: entries.client.relativePath
|
|
@@ -4412,7 +4677,7 @@ function routingPlugin(root, options) {
|
|
|
4412
4677
|
if (removeAuthTypesIfPresent(outDir)) syncAuthTypesInProjectTsconfig(root);
|
|
4413
4678
|
return;
|
|
4414
4679
|
}
|
|
4415
|
-
const { generateVoidAuthDatabaseModule, generateVoidAuthDrizzleSchema } = await import("./drizzle-
|
|
4680
|
+
const { generateVoidAuthDatabaseModule, generateVoidAuthDrizzleSchema } = await import("./drizzle-C8MPqt5m.mjs");
|
|
4416
4681
|
const authRuntime = {
|
|
4417
4682
|
dialect: compileOptions.auth.dialect,
|
|
4418
4683
|
providers: compileOptions.auth.providers,
|
|
@@ -4507,33 +4772,39 @@ function routingPlugin(root, options) {
|
|
|
4507
4772
|
}
|
|
4508
4773
|
const assets = wrangler?.assets;
|
|
4509
4774
|
if (!assets || typeof assets !== "object" || typeof assets.directory !== "string" || resolve(dirname(wranglerPath), assets.directory) !== clientDir) return null;
|
|
4775
|
+
const { pages } = scan.pages;
|
|
4776
|
+
const workerBuildRule = pages.length > 0 || isAssetBypassRule(assets.run_worker_first, assetsDir) ? ["/**"] : assets.run_worker_first;
|
|
4777
|
+
const routePatterns = [...scan.routes, ...scan.websockets ?? []].map((route) => route.pattern);
|
|
4778
|
+
const needsWorker = (page) => page.serverPath !== null || !page.shouldPrerender || page.params.length > 0 || page.catchAll;
|
|
4510
4779
|
const revalidate = options.routing?.revalidate;
|
|
4511
4780
|
const facts = {
|
|
4512
|
-
runWorkerFirst:
|
|
4781
|
+
runWorkerFirst: workerBuildRule,
|
|
4513
4782
|
notFoundHandling: assets.not_found_handling,
|
|
4514
4783
|
base: resolvedConfig.base,
|
|
4515
4784
|
hasMiddleware: scan.middleware.length > 0,
|
|
4516
4785
|
authEnabled: compileOptions.auth !== null,
|
|
4786
|
+
liveEnabled: options.live !== void 0,
|
|
4787
|
+
alwaysUseHttps: options.routing?.alwaysUseHttps === true,
|
|
4517
4788
|
headerRuleCount: compileOptions.headerRules?.length ?? 0,
|
|
4518
4789
|
redirectRuleCount: compileOptions.redirectRules?.length ?? 0,
|
|
4519
4790
|
fallbackRuleCount: compileOptions.fallbackRules?.length ?? 0,
|
|
4520
4791
|
publicEdgeFiles: publicDir !== null && (existsSync(join(publicDir, "_headers")) || existsSync(join(publicDir, "_redirects"))),
|
|
4521
4792
|
patterns: [
|
|
4522
|
-
...
|
|
4523
|
-
...
|
|
4524
|
-
...(scan.websockets ?? []).map((route) => route.pattern),
|
|
4793
|
+
...routePatterns,
|
|
4794
|
+
...pages.map((page) => page.pattern),
|
|
4525
4795
|
...(options.prerenderPaths ?? []).filter((path) => typeof path === "string"),
|
|
4526
4796
|
...revalidate && typeof revalidate === "object" ? Object.keys(revalidate) : []
|
|
4527
4797
|
],
|
|
4528
4798
|
assetsDir,
|
|
4529
|
-
immutableFiles: clientImmutableFiles
|
|
4799
|
+
immutableFiles: clientImmutableFiles,
|
|
4800
|
+
serverPatterns: output === "static" && pages.length > 0 && !ssr ? [...routePatterns, ...pages.filter(needsWorker).map((page) => page.pattern)] : void 0
|
|
4530
4801
|
};
|
|
4531
4802
|
const bypass = userHeaders ? null : resolveAssetWorkerBypass(facts);
|
|
4532
|
-
const runWorkerFirst = bypass?.runWorkerFirst ??
|
|
4803
|
+
const runWorkerFirst = bypass?.runWorkerFirst ?? workerBuildRule;
|
|
4533
4804
|
return {
|
|
4534
4805
|
headers: bypass?.headers ?? null,
|
|
4535
4806
|
wranglerPath,
|
|
4536
|
-
wranglerText: runWorkerFirst
|
|
4807
|
+
wranglerText: isDeepStrictEqual(runWorkerFirst, assets.run_worker_first) ? null : JSON.stringify({
|
|
4537
4808
|
...wrangler,
|
|
4538
4809
|
assets: {
|
|
4539
4810
|
...assets,
|
|
@@ -4542,6 +4813,24 @@ function routingPlugin(root, options) {
|
|
|
4542
4813
|
})
|
|
4543
4814
|
};
|
|
4544
4815
|
}
|
|
4816
|
+
function finalizeCloudflareAssets(clientDir, assetsDir) {
|
|
4817
|
+
if (!options.assetWorkerBypass || options.target || resolvedConfig?.command !== "build") return;
|
|
4818
|
+
const headersPath = join(clientDir, "_headers");
|
|
4819
|
+
let generatedHeaders = false;
|
|
4820
|
+
let userHeaders = false;
|
|
4821
|
+
if (existsSync(headersPath)) {
|
|
4822
|
+
try {
|
|
4823
|
+
generatedHeaders = isGeneratedAssetHeaders(readFileSync(headersPath, "utf8"));
|
|
4824
|
+
} catch {
|
|
4825
|
+
return;
|
|
4826
|
+
}
|
|
4827
|
+
userHeaders = !generatedHeaders;
|
|
4828
|
+
}
|
|
4829
|
+
const plan = planAssetWorkerBypass(clientDir, assetsDir, userHeaders);
|
|
4830
|
+
if (plan?.headers) writeFileSync(headersPath, plan.headers);
|
|
4831
|
+
else if (generatedHeaders) rmSync(headersPath);
|
|
4832
|
+
if (plan?.wranglerText) writeFileSync(plan.wranglerPath, plan.wranglerText);
|
|
4833
|
+
}
|
|
4545
4834
|
const sandboxEntry = options.hasSandbox ? {
|
|
4546
4835
|
bindingName: options.sandboxBindingName,
|
|
4547
4836
|
className: options.sandboxClassName,
|
|
@@ -4591,6 +4880,7 @@ function routingPlugin(root, options) {
|
|
|
4591
4880
|
}));
|
|
4592
4881
|
return {
|
|
4593
4882
|
name: "void:routing",
|
|
4883
|
+
api: { finalizeCloudflareAssets },
|
|
4594
4884
|
enforce: "pre",
|
|
4595
4885
|
configResolved(config) {
|
|
4596
4886
|
resolvedConfig = config;
|
|
@@ -4653,26 +4943,6 @@ function routingPlugin(root, options) {
|
|
|
4653
4943
|
if (this.environment.name === "client") clientImmutableFiles = manifest ? stampClientAssetCachePolicy(bundle, typeof manifest === "string" ? manifest : ".vite/manifest.json", compileOptions.headerRules) : [];
|
|
4654
4944
|
}
|
|
4655
4945
|
},
|
|
4656
|
-
writeBundle() {
|
|
4657
|
-
if (!options.assetWorkerBypass || options.target || resolvedConfig?.command !== "build" || this.environment.name !== "client") return;
|
|
4658
|
-
const { outDir, assetsDir } = this.environment.config.build;
|
|
4659
|
-
const clientDir = resolve(resolvedConfig.root, outDir);
|
|
4660
|
-
const headersPath = join(clientDir, "_headers");
|
|
4661
|
-
let generatedHeaders = false;
|
|
4662
|
-
let userHeaders = false;
|
|
4663
|
-
if (existsSync(headersPath)) {
|
|
4664
|
-
try {
|
|
4665
|
-
generatedHeaders = isGeneratedAssetHeaders(readFileSync(headersPath, "utf8"));
|
|
4666
|
-
} catch {
|
|
4667
|
-
return;
|
|
4668
|
-
}
|
|
4669
|
-
userHeaders = !generatedHeaders;
|
|
4670
|
-
}
|
|
4671
|
-
const plan = planAssetWorkerBypass(clientDir, assetsDir, userHeaders);
|
|
4672
|
-
if (plan?.headers) writeFileSync(headersPath, plan.headers);
|
|
4673
|
-
else if (generatedHeaders) rmSync(headersPath);
|
|
4674
|
-
if (plan?.wranglerText) writeFileSync(plan.wranglerPath, plan.wranglerText);
|
|
4675
|
-
},
|
|
4676
4946
|
buildStart() {
|
|
4677
4947
|
return regenerateInOrder(async () => {
|
|
4678
4948
|
generatedRouteInputs = void 0;
|
|
@@ -4686,8 +4956,8 @@ function routingPlugin(root, options) {
|
|
|
4686
4956
|
if (!options.target) {
|
|
4687
4957
|
const migrationsDir = paths.migrationsDir;
|
|
4688
4958
|
if (existsSync(migrationsDir) || compileOptions.auth) {
|
|
4689
|
-
const { collectMigrations } = await import("./collect-
|
|
4690
|
-
const { buildMigrationPlanBundle } = await import("./plan-
|
|
4959
|
+
const { collectMigrations } = await import("./collect-8i0wU63d.mjs");
|
|
4960
|
+
const { buildMigrationPlanBundle } = await import("./plan-CQ-N4gws.mjs");
|
|
4691
4961
|
const migrations = existsSync(migrationsDir) ? collectMigrations(migrationsDir) : [];
|
|
4692
4962
|
const dialect = getDatabaseDialect(readConfig(root));
|
|
4693
4963
|
compileOptions.migrationHandlerPath = resolveFile(dialect === "postgresql" ? "#self/runtime/migration-handler-pg" : dialect === "mysql" ? "#self/runtime/migration-handler-mysql" : "#self/runtime/migration-handler");
|
|
@@ -4829,8 +5099,7 @@ function routingPlugin(root, options) {
|
|
|
4829
5099
|
}
|
|
4830
5100
|
};
|
|
4831
5101
|
}
|
|
4832
|
-
|
|
4833
|
-
//#region src/cloudflare-durable-patch.ts
|
|
5102
|
+
// src/cloudflare-durable-patch.ts
|
|
4834
5103
|
function entries(value, label) {
|
|
4835
5104
|
if (value === void 0) return [];
|
|
4836
5105
|
if (!Array.isArray(value) || value.some((entry) => !entry || typeof entry !== "object" || Array.isArray(entry))) throw new Error(`Cloudflare ${label} configuration must be an array of objects.`);
|
|
@@ -4884,8 +5153,7 @@ function finalizeDurableObjectPatch(resolved, patch, generatedLocalBindings) {
|
|
|
4884
5153
|
resolved.migrations = [];
|
|
4885
5154
|
}
|
|
4886
5155
|
}
|
|
4887
|
-
|
|
4888
|
-
//#region src/plugin-binding-utils.ts
|
|
5156
|
+
// src/plugin-binding-utils.ts
|
|
4889
5157
|
/** Check whether a binding name already exists in a resolved bindings array. */
|
|
4890
5158
|
function hasBinding(list, name) {
|
|
4891
5159
|
return Array.isArray(list) && list.some((b) => b.binding === name);
|
|
@@ -4914,8 +5182,7 @@ function hasBinding(list, name) {
|
|
|
4914
5182
|
function shouldInjectEmailDevInboxVar(routeEnvironment, needsEmail, assetsBinding) {
|
|
4915
5183
|
return routeEnvironment === "dev" && !!needsEmail && typeof assetsBinding === "string" && !!assetsBinding;
|
|
4916
5184
|
}
|
|
4917
|
-
|
|
4918
|
-
//#region src/plugin-worker-bindings.ts
|
|
5185
|
+
// src/plugin-worker-bindings.ts
|
|
4919
5186
|
/** Durable Object bindings already in the patch, else in the resolved config. */
|
|
4920
5187
|
function currentDurableObjectBindings(result, resolved) {
|
|
4921
5188
|
return (result.durable_objects ?? resolved.durable_objects)?.bindings ?? [];
|
|
@@ -5141,8 +5408,7 @@ function mergeWorkerBindings(resolved, input) {
|
|
|
5141
5408
|
versionMetadataBinding
|
|
5142
5409
|
};
|
|
5143
5410
|
}
|
|
5144
|
-
|
|
5145
|
-
//#region src/index.ts
|
|
5411
|
+
// src/index.ts
|
|
5146
5412
|
const scheduledPointerCleanups = /* @__PURE__ */ new Set();
|
|
5147
5413
|
const scheduledPreviewPointerCleanups = /* @__PURE__ */ new Set();
|
|
5148
5414
|
/** Returns the Vite plugins that build and serve a Void app for its configured target. */
|
|
@@ -5510,7 +5776,7 @@ function voidPlugin(options) {
|
|
|
5510
5776
|
frameworkBuildWrapperPlugin,
|
|
5511
5777
|
frameworkTriggersPlugin(root, { devTriggerToken }),
|
|
5512
5778
|
devTriggersHintPlugin(root, devTriggerToken),
|
|
5513
|
-
...cloudflare({
|
|
5779
|
+
...cloudflare$1({
|
|
5514
5780
|
configPath: cloudflareConfigPath,
|
|
5515
5781
|
...inspectorPortOption,
|
|
5516
5782
|
persistState: { path: localD1.persistRoot },
|
|
@@ -5578,7 +5844,10 @@ function voidPlugin(options) {
|
|
|
5578
5844
|
dir: assetRoutingPublicDir,
|
|
5579
5845
|
routing: config.routing
|
|
5580
5846
|
});
|
|
5581
|
-
if (!managedCloudflareBuild && (
|
|
5847
|
+
if (!managedCloudflareBuild && edgeRulesNeedWorker({
|
|
5848
|
+
...rules,
|
|
5849
|
+
alwaysUseHttps: config.routing?.alwaysUseHttps
|
|
5850
|
+
})) {
|
|
5582
5851
|
policy.assetConfig.run_worker_first = ["/**"];
|
|
5583
5852
|
if (rules.fallbackRules?.length && policy.assetConfig.not_found_handling === "single-page-application") {
|
|
5584
5853
|
policy.assetConfig.not_found_handling = "none";
|
|
@@ -5603,6 +5872,30 @@ function voidPlugin(options) {
|
|
|
5603
5872
|
return requiresRestart;
|
|
5604
5873
|
}
|
|
5605
5874
|
applyAssetRoutingPolicy(assetRouting);
|
|
5875
|
+
const routes = routingPlugin(root, {
|
|
5876
|
+
getApplicationAnalysis,
|
|
5877
|
+
isAuthEnabled: () => authEnabled,
|
|
5878
|
+
getVersionMetadataBinding: () => versionMetadataBinding,
|
|
5879
|
+
devTriggerToken,
|
|
5880
|
+
headConfig: config.head,
|
|
5881
|
+
prerenderPaths: config.routing?.prerender,
|
|
5882
|
+
remoteMode,
|
|
5883
|
+
routing: config.routing,
|
|
5884
|
+
bindingNames,
|
|
5885
|
+
get hasSandbox() {
|
|
5886
|
+
return bindings.needsSandbox;
|
|
5887
|
+
},
|
|
5888
|
+
sandboxBindingName: sandboxConfig?.binding,
|
|
5889
|
+
sandboxClassName: sandboxConfig?.className,
|
|
5890
|
+
sandboxInstanceType: sandboxConfig?.instanceType,
|
|
5891
|
+
get live() {
|
|
5892
|
+
return shouldEmitLive() ? liveConfig : void 0;
|
|
5893
|
+
},
|
|
5894
|
+
durableObjects,
|
|
5895
|
+
websocketTombstones,
|
|
5896
|
+
onDevAssetRoutingPolicyChange: updateDevAssetRoutingPolicy,
|
|
5897
|
+
assetWorkerBypass: true
|
|
5898
|
+
});
|
|
5606
5899
|
return [
|
|
5607
5900
|
createCloudflareBuiltinsExternalPlugin(),
|
|
5608
5901
|
createDefaultWorkerEnvironmentPlugin(),
|
|
@@ -5621,30 +5914,7 @@ function voidPlugin(options) {
|
|
|
5621
5914
|
bindingRuntimePlugin(bindingNames),
|
|
5622
5915
|
...bindings.needsSandbox ? [createSandboxSdkResolvePlugin()] : [],
|
|
5623
5916
|
...pagesDevCssAssetsPlugin(root, devTriggerToken),
|
|
5624
|
-
|
|
5625
|
-
getApplicationAnalysis,
|
|
5626
|
-
isAuthEnabled: () => authEnabled,
|
|
5627
|
-
getVersionMetadataBinding: () => versionMetadataBinding,
|
|
5628
|
-
devTriggerToken,
|
|
5629
|
-
headConfig: config.head,
|
|
5630
|
-
prerenderPaths: config.routing?.prerender,
|
|
5631
|
-
remoteMode,
|
|
5632
|
-
routing: config.routing,
|
|
5633
|
-
bindingNames,
|
|
5634
|
-
get hasSandbox() {
|
|
5635
|
-
return bindings.needsSandbox;
|
|
5636
|
-
},
|
|
5637
|
-
sandboxBindingName: sandboxConfig?.binding,
|
|
5638
|
-
sandboxClassName: sandboxConfig?.className,
|
|
5639
|
-
sandboxInstanceType: sandboxConfig?.instanceType,
|
|
5640
|
-
get live() {
|
|
5641
|
-
return shouldEmitLive() ? liveConfig : void 0;
|
|
5642
|
-
},
|
|
5643
|
-
durableObjects,
|
|
5644
|
-
websocketTombstones,
|
|
5645
|
-
onDevAssetRoutingPolicyChange: updateDevAssetRoutingPolicy,
|
|
5646
|
-
assetWorkerBypass: true
|
|
5647
|
-
}),
|
|
5917
|
+
routes,
|
|
5648
5918
|
drizzlePlugin(root, true, dialect, {
|
|
5649
5919
|
d1BindingName: bindingNames?.d1,
|
|
5650
5920
|
forceVirtualDb: authEnabled || bindingNames?.d1 !== void 0,
|
|
@@ -5656,18 +5926,20 @@ function voidPlugin(options) {
|
|
|
5656
5926
|
enabled: authEnabled,
|
|
5657
5927
|
configPath: authConfigPath
|
|
5658
5928
|
}),
|
|
5659
|
-
prerenderPlugin(root, config),
|
|
5660
5929
|
devTriggersHintPlugin(root, devTriggerToken),
|
|
5661
|
-
...cloudflare({
|
|
5930
|
+
...cloudflare$1({
|
|
5662
5931
|
configPath: cloudflareConfigPath,
|
|
5663
5932
|
...inspectorPortOption,
|
|
5664
5933
|
persistState: { path: localD1.persistRoot },
|
|
5665
5934
|
auxiliaryWorkers: options?.auxiliaryWorkers,
|
|
5666
5935
|
viteEnvironment: { name: DEFAULT_WORKER_ENVIRONMENT_NAME },
|
|
5667
|
-
config: mergeBindings
|
|
5936
|
+
config: mergeBindings,
|
|
5937
|
+
finalizeAssets(clientDir, environment) {
|
|
5938
|
+
(environment?.config.plugins.find((plugin) => plugin.name === routes.name))?.api.finalizeCloudflareAssets(clientDir, environment.config.build.assetsDir);
|
|
5939
|
+
}
|
|
5668
5940
|
}),
|
|
5941
|
+
prerenderPlugin(root, config),
|
|
5669
5942
|
implicitDeployGuard
|
|
5670
5943
|
];
|
|
5671
5944
|
}
|
|
5672
|
-
//#endregion
|
|
5673
5945
|
export { VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled, resolveWorkersAiBindingName, shouldBindWorkersAi, shouldInjectEmailDevInboxVar, voidPlugin };
|