void 1.6.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{account-cmd-DRhmCWcm.mjs → account-cmd-BfkJ_1PC.mjs} +6 -6
- package/dist/{application-analysis-HRFsZOv3.mjs → application-analysis-OV0CBJ80.mjs} +8 -19
- package/dist/{application-routing-P4TggvWp.mjs → application-routing-QpyC5G8z.mjs} +2 -1
- package/dist/{auth-CL-p_rqV.mjs → auth-BN0NU9dz.mjs} +1 -1
- package/dist/{auth-Dy8svcqQ.mjs → auth-CCk9Seol.mjs} +2 -2
- package/dist/{auth-CH4PLAX1.d.mts → auth-CZrthGxs.d.mts} +8 -1
- package/dist/{auth-YVjBX5NY.mjs → auth-DyWp-fSo.mjs} +7 -1
- package/dist/{auth-link-CVXP1G6G.mjs → auth-link-CW1Zh6FM.mjs} +6 -6
- package/dist/{auth-router-D1pGdbvB.mjs → auth-router-CNBKnEZi.mjs} +3 -3
- package/dist/{better-auth-shared-BJyG2mH0.d.mts → better-auth-shared-C-0uZg8-.d.mts} +1 -1
- package/dist/{better-auth-shared-C958aM7W.mjs → better-auth-shared-CdVyCUou.mjs} +1 -1
- package/dist/{build-cmd-DmjbuT6d.mjs → build-cmd-C9qOKW9W.mjs} +5 -5
- package/dist/{cache-2khBO1MR.mjs → cache-DVBBbWQL.mjs} +5 -5
- package/dist/{cancel-deploy-_itbbvY3.mjs → cancel-deploy-COavnjud.mjs} +4 -4
- package/dist/{cf-build-output-B1C8U83u.mjs → cf-build-output-CWNOH-KA.mjs} +2 -1
- package/dist/cf-build-output-DUZnAeZ1.mjs +1 -0
- package/dist/{cf-config-migrate-Dy8MrKgF.mjs → cf-config-migrate-Bb-EdAQq.mjs} +5 -1
- package/dist/cli/cli.mjs +68 -1868
- package/dist/cli/cloudflare-operation-process.mjs +10 -8
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/cli-main-DFteHrJI.mjs +1889 -0
- package/dist/client-BAxLpSKv.mjs +1 -0
- package/dist/{client-CoxPEhJq.mjs → client-BEZmTP6p.mjs} +10 -4
- package/dist/{cloudflare-auth-CEu-1Ps_.mjs → cloudflare-auth-DGIivpTb.mjs} +1 -1
- package/dist/{cloudflare-cmd-fZ6AMSWk.mjs → cloudflare-cmd-DJaxC-bc.mjs} +5 -5
- package/dist/{cloudflare-config-eQunqX6A.mjs → cloudflare-config-DtOGAbeB.mjs} +3 -3
- package/dist/{cloudflare-connect-9OZe4XVQ.mjs → cloudflare-connect-BjpWmglw.mjs} +3 -3
- package/dist/{cloudflare-operations-oLvAd9Nd.mjs → cloudflare-operations-CZkjFrzH.mjs} +1 -1
- package/dist/{cloudflare-operations-CrskD4_O.mjs → cloudflare-operations-k7wYUv56.mjs} +6 -6
- package/dist/{cloudflare-process-DjJ638A-.mjs → cloudflare-process-BcPvlMFd.mjs} +3 -3
- package/dist/{config-BITKQ3O6.mjs → config-5oSQhZNj.mjs} +7 -5
- package/dist/{config-CPxJmt4M.d.mts → config-CTlUaXWZ.d.mts} +3 -1
- package/dist/{config-BBlVXZCU.mjs → config-DcqUBGCb.mjs} +3 -3
- package/dist/{config-WlvEcL82.mjs → config-eeDzKBS9.mjs} +2 -2
- package/dist/config-entry.d.mts +1 -1
- package/dist/{config-BgysUhnm.mjs → config-wo2EaH0X.mjs} +1 -1
- package/dist/{connect-CKvmkl2R.mjs → connect-j1F1C_rW.mjs} +7 -7
- package/dist/{create-project-Bq0M8MtO.mjs → create-project-CE3jOmd5.mjs} +5 -5
- package/dist/{create-project-BiMmR5wA.mjs → create-project-DZH3aYGQ.mjs} +1 -1
- package/dist/{db-DjtGAcOz.mjs → db-DyLzzxvM.mjs} +39 -39
- package/dist/{db-types-C_8amnB0.mjs → db-types-DdHHUVPy.mjs} +1 -1
- package/dist/{delete-CY4L8fi2.mjs → delete-Dey6YoMA.mjs} +5 -5
- package/dist/{deploy-D_gEojD2.mjs → deploy-Ccw2D2lw.mjs} +507 -122
- package/dist/deploy-DEZkUS77.mjs +2 -0
- package/dist/{deploy-managed-static-BHVbB_-A.mjs → deploy-managed-static-BBVtpuGv.mjs} +18 -18
- package/dist/{deploy-transport-DEyOUfac.mjs → deploy-transport-Dt0IvSVW.mjs} +2 -2
- package/dist/deploy.mjs +8 -8
- package/dist/discover-1DJD4YXD.mjs +1 -0
- package/dist/{discover-Dhkzxgdt.mjs → discover-CVFCWU7W.mjs} +1 -1
- package/dist/{dispatch-BNLB5_Gm.mjs → dispatch-pYaww76u.mjs} +6 -6
- package/dist/{dist-D23AAMxT.mjs → dist-BQdgCVQF.mjs} +1 -1
- package/dist/{dist-eV_Ep60B.mjs → dist-DeTdhbZc.mjs} +1 -1
- package/dist/{domain-BlH90Ods.mjs → domain-Dh3mG8Vs.mjs} +6 -6
- package/dist/{email-Bkq8ZL1p.mjs → email-DKyMjOYM.mjs} +11 -11
- package/dist/{email-cloudflare-MvJIxrwx.mjs → email-cloudflare-CTt2n_W2.mjs} +13 -9
- package/dist/{entry-CBZsCy3O.mjs → entry-Bw-G1VVx.mjs} +2 -2
- package/dist/{env-AvuCSeCH.mjs → env-DkZzh_Dd.mjs} +7 -7
- package/dist/env-mask-D31Qztl9.mjs +46 -0
- package/dist/{env-types-DqzVBKnS.mjs → env-types-Dz9qkiOn.mjs} +1 -1
- package/dist/{env-validation-GV1oD4EV.mjs → env-validation-1snjKtDX.mjs} +4 -4
- package/dist/{env-validation-C8Cmvas0.mjs → env-validation-C8NL3lEH.mjs} +1 -1
- package/dist/{fetch-C8yhLoF3.mjs → fetch-CAIVkLvW.mjs} +1 -1
- package/dist/{fetch-B-gLGYVl.d.mts → fetch-CbI6lNnk.d.mts} +6 -4
- package/dist/{fetch-stream-DafNtVJC.mjs → fetch-stream-6Op0qlLd.mjs} +1 -1
- package/dist/{fetch-stream-DuwxWmBM.d.mts → fetch-stream-DoED9atq.d.mts} +1 -1
- package/dist/{gen-B9bCV5qu.mjs → gen-BZmFOGDQ.mjs} +7 -7
- package/dist/gen-C6iknRdI.mjs +1 -0
- package/dist/{github-cmd-CA-lBdkn.mjs → github-cmd-7Oky9qgH.mjs} +6 -6
- package/dist/{handler-CKeTtYID.mjs → handler-C9SnmeW1.mjs} +6 -5
- package/dist/{handler-BR6Tvjkp.d.mts → handler-DjqciiDc.d.mts} +20 -7
- package/dist/{headers-CuTEdP9C.mjs → headers-CimYIfQI.mjs} +1 -1
- package/dist/{help-1OCFDsRr.mjs → help-CNuUb47C.mjs} +7 -3
- package/dist/help-C_cqTByy.mjs +1 -0
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +155 -110
- package/dist/{info-CJxua_db.mjs → info-DwB8IWIx.mjs} +4 -4
- package/dist/{init-B-4CluYx.mjs → init-CUGSmcED.mjs} +34 -32
- package/dist/{link-DAXOT-G_.mjs → link-BlRTGHan.mjs} +6 -6
- package/dist/{list-BYSOo9fm.mjs → list-iCg7d5Pa.mjs} +7 -7
- package/dist/{live-DF4HUl2m.mjs → live-CYJ4KGoR.mjs} +2 -2
- package/dist/{live-0xrcVpyq.d.mts → live-zKGbRT4h.d.mts} +2 -2
- package/dist/{local-d1-BLgsNUj9.mjs → local-d1-CFcH9Bx3.mjs} +2 -2
- package/dist/login-C4q1S-5b.mjs +1 -0
- package/dist/{login-CJopTWX4.mjs → login-TA51e5Fw.mjs} +5 -5
- package/dist/{logs-DE0weBsR.mjs → logs-BlyAxlvx.mjs} +6 -6
- package/dist/{migrate-ChHHZBTi.mjs → migrate-BH6LCr00.mjs} +6 -6
- package/dist/migrate-CVBsSFhC.mjs +1 -0
- package/dist/nitro.d.mts +5 -0
- package/dist/nitro.mjs +27 -8
- package/dist/{node-CZ6lGNLn.mjs → node-B0otYjDv.mjs} +4 -4
- package/dist/{operator-args-D79WQP70.mjs → operator-args-DuKAQ3Ks.mjs} +1 -1
- package/dist/{operator-auth-CfDcmzpo.mjs → operator-auth-CD3pap65.mjs} +1 -1
- package/dist/{operator-client-BIY4-N_6.mjs → operator-client-XvXTkea6.mjs} +2 -2
- package/dist/{operator-cmd-BUqsdk2K.mjs → operator-cmd-CoHlJjcT.mjs} +7 -7
- package/dist/operator-cmd-DnaCnCSP.mjs +1 -0
- package/dist/output-CNsMDEd2.mjs +1 -0
- package/dist/{output-BCdLioKP.mjs → output-CXJTIAtF.mjs} +1 -1
- package/dist/pages/client.d.mts +18 -13
- package/dist/pages/client.mjs +40 -69
- package/dist/pages/index.d.mts +4 -3
- package/dist/pages/index.mjs +11 -7
- package/dist/pages/islands-plugin.mjs +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/pages/serialize.d.mts +2 -2
- package/dist/pages/serialize.mjs +1 -1
- package/dist/platform-args-B7-wQ0_B.mjs +1 -0
- package/dist/{platform-args-Cx1M-7bq.mjs → platform-args-DfT8yQBF.mjs} +1 -1
- package/dist/{platform-auth-config-K4m_LE8b.mjs → platform-auth-config-MO0VdVs9.mjs} +10 -10
- package/dist/{platform-auth-protection-KF5Vo-1I.mjs → platform-auth-protection-Dv208eyL.mjs} +8 -8
- package/dist/{platform-auth-recovery-BOdFrl7R.mjs → platform-auth-recovery-DvAQ674F.mjs} +7 -7
- package/dist/{platform-cmd-DpCHawGF.mjs → platform-cmd-BpUA19r_.mjs} +1 -1
- package/dist/{platform-cmd-Ds3EAV5t.mjs → platform-cmd-dlSxrcQ7.mjs} +9 -9
- package/dist/{platform-domain-rWJshybd.mjs → platform-domain-DSO4eUEw.mjs} +5 -5
- package/dist/{platform-lifecycle-D9RdGub1.mjs → platform-lifecycle-BSvsyB_x.mjs} +17 -17
- package/dist/{platform-lifecycle-BH34I0rh.mjs → platform-lifecycle-CfcFygHb.mjs} +1 -1
- package/dist/{platform-management-BfLW0Zlo.mjs → platform-management-BMdyt667.mjs} +1 -1
- package/dist/{platform-management-BRefdHGD.mjs → platform-management-CrP1XhVd.mjs} +4 -4
- package/dist/{platform-plans-config-Dx1agneU.mjs → platform-plans-config-CgDiwflR.mjs} +5 -5
- package/dist/{platform-recovery-DZuZGJtt.mjs → platform-recovery-CHWwXVZ6.mjs} +3 -3
- package/dist/{platform-setup-Vw1AaUN8.mjs → platform-setup-BTQVbnTC.mjs} +3 -3
- package/dist/{plugin-inference-CdLbxZL_.mjs → plugin-inference-g66Q1Mx9.mjs} +5 -8
- package/dist/prepare-Bx4a8cb1.mjs +1 -0
- package/dist/{prepare-BuNbuFlA.mjs → prepare-DJYHjpzq.mjs} +3 -3
- package/dist/{prepare-BerOZiD4.mjs → prepare-DXduEwQp.mjs} +12 -9
- package/dist/{prerender-render-RlAj6hh8.mjs → prerender-render-BN9Lmebs.mjs} +29 -13
- package/dist/prerender-render.d.mts +10 -2
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-cmd-B_bUyZ3J.mjs → project-cmd-Dfb1Sg8w.mjs} +18 -18
- package/dist/{project-paths-CdGv9Tmi.mjs → project-paths-G0yut6Zz.mjs} +12 -8
- package/dist/{project-team-MjT5K4rQ.mjs → project-team-BO2dyc7S.mjs} +5 -5
- package/dist/{project-token-BKHGwY3k.mjs → project-token-ByO2mEI2.mjs} +5 -5
- package/dist/{project-tsconfig-Cf2NFjlM.mjs → project-tsconfig-nhnTWO_Y.mjs} +4 -2
- package/dist/{project-zero-trust-Bzdd05-h.mjs → project-zero-trust-CoQfwRBR.mjs} +5 -5
- package/dist/{protocol-CkwjASep.d.mts → protocol-xZMvWsrg.d.mts} +5 -3
- package/dist/{protocol-COyySMki.mjs → protocol-yxdHxFLN.mjs} +47 -11
- package/dist/{provision-DQF6Kw-6.mjs → provision-CMH4-8ri.mjs} +1 -1
- package/dist/{provision-BbCzpbXs.mjs → provision-D5q-ptD3.mjs} +2 -2
- package/dist/{requests-daJmVpjk.mjs → requests-CPOiDkjh.mjs} +4 -4
- package/dist/resolve-project-BALVa9q0.mjs +1 -0
- package/dist/{resolve-project-D0YNnJfm.mjs → resolve-project-ClvLMTI9.mjs} +1 -1
- package/dist/{rollback-BgL0wY1J.mjs → rollback-BfCs2la4.mjs} +7 -7
- package/dist/{route-types-CZc1YXjF.mjs → route-types-Cl3x0Q8B.mjs} +265 -12
- package/dist/{route-url-C_YIH_zO.d.mts → route-url-C3JwYrER.d.mts} +8 -3
- package/dist/{route-url-CRDF-I0I.mjs → route-url-CfCR4oMj.mjs} +4 -3
- package/dist/routes-stub.d.mts +10 -1
- package/dist/routes-stub.mjs +1 -1
- package/dist/{runner-QMeOpScZ.mjs → runner-CTk21HrO.mjs} +1 -1
- package/dist/{runner-mysql-0zVmB1JW.mjs → runner-mysql-CHvEg_sy.mjs} +1 -1
- package/dist/runtime/ai.mjs +1 -1
- package/dist/runtime/auth.d.mts +2 -2
- package/dist/runtime/auth.mjs +1 -1
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.mjs +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +1 -1
- package/dist/runtime/client-react.d.mts +3 -3
- package/dist/runtime/client-react.mjs +2 -2
- package/dist/runtime/client-solid.d.mts +3 -3
- package/dist/runtime/client-solid.mjs +2 -2
- package/dist/runtime/client-svelte.d.mts +3 -3
- package/dist/runtime/client-svelte.mjs +2 -2
- package/dist/runtime/client-vue.d.mts +3 -3
- package/dist/runtime/client-vue.mjs +2 -2
- package/dist/runtime/client.d.mts +3 -3
- package/dist/runtime/client.mjs +2 -2
- package/dist/runtime/email/testing.mjs +2 -2
- package/dist/runtime/email.mjs +3 -3
- package/dist/runtime/env-public.mjs +2 -46
- package/dist/runtime/fetch-server.d.mts +1 -1
- package/dist/runtime/fetch-server.mjs +1 -1
- package/dist/runtime/fetch-stream.d.mts +2 -2
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +1 -1
- package/dist/runtime/isr.d.mts +3 -1
- package/dist/runtime/live-client.d.mts +11 -2
- package/dist/runtime/live-client.mjs +8 -0
- package/dist/runtime/live-server.mjs +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/log.mjs +1 -1
- package/dist/runtime/remote/index.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 +15 -4
- package/dist/runtime/routing.mjs +94 -12
- package/dist/runtime/sandbox.mjs +1 -1
- package/dist/runtime/sse-client.d.mts +9 -1
- package/dist/runtime/sse-client.mjs +7 -0
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/validator.mjs +1 -1
- package/dist/runtime/ws-server.d.mts +3 -3
- package/dist/runtime/ws-server.mjs +1 -1
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/runtime/ws.mjs +1 -1
- package/dist/{scan-X2rDDRNa.mjs → scan-L8OSv1f7.mjs} +68 -19
- package/dist/{secret-CPq-B_vp.mjs → secret-CuI6LTpD.mjs} +7 -7
- package/dist/serialize-DN-envGQ.d.mts +18 -0
- package/dist/serialize-Pf-CIQK_.mjs +39 -0
- package/dist/{skills-D393E4lB.mjs → skills-BBO9wMjB.mjs} +1 -1
- package/dist/{subcommand-prompt-CxJXporl.mjs → subcommand-prompt-BZMnCA8T.mjs} +2 -2
- package/dist/url-CuoEn0o3.mjs +43 -0
- package/dist/validator-8-NZs2Xr.mjs +168 -0
- package/dist/{version-metadata-C8hLzQkv.mjs → version-metadata-eUd6Ar_U.mjs} +1 -1
- package/dist/wrangler-R3kMdJfw.mjs +1 -0
- package/dist/{wrangler-DESSbN8L.mjs → wrangler-k40T7XTQ.mjs} +3 -3
- package/dist/{wrapper-C9SUxoj7.mjs → wrapper-BGsi_uHs.mjs} +12 -9
- package/dist/{ws-Dmjg5NH2.d.mts → ws-DB8Feytg.d.mts} +2 -2
- package/docs/guide/ai.md +2 -0
- package/docs/guide/auth.md +62 -0
- package/docs/guide/database.md +33 -0
- package/docs/guide/deployment.md +8 -0
- package/docs/guide/edge/headers.md +3 -1
- package/docs/guide/edge/prerendering.md +9 -4
- package/docs/guide/edge/redirects.md +1 -0
- package/docs/guide/edge/revalidation.md +3 -0
- package/docs/guide/edge/static-assets.md +1 -1
- package/docs/guide/live.md +2 -0
- package/docs/guide/pages-routing/actions-and-forms.md +29 -10
- package/docs/guide/pages-routing/head.md +3 -1
- package/docs/guide/pages-routing/islands.md +1 -1
- package/docs/guide/pages-routing/loaders.md +2 -0
- package/docs/guide/pages-routing/markdown.md +2 -2
- package/docs/guide/pages-routing/overview.md +139 -10
- package/docs/guide/quickstart.md +1 -0
- package/docs/guide/server-routing.md +14 -0
- package/docs/guide/sse.md +2 -0
- package/docs/guide/ssg.md +23 -2
- package/docs/guide/storage.md +6 -2
- package/docs/guide/type-safety.md +307 -26
- package/docs/guide/typed-fetch.md +7 -3
- package/docs/guide/websockets.md +5 -5
- package/docs/integrations/cloudflare.md +10 -10
- package/docs/integrations/frameworks/nuxt.md +2 -0
- package/docs/integrations/frameworks/overview.md +2 -0
- package/docs/integrations/nodejs-bun-deno.md +65 -0
- package/docs/reference/api/auth.md +19 -0
- package/docs/reference/api/client.md +6 -4
- package/docs/reference/api/handlers.md +3 -1
- package/docs/reference/api/pages.md +16 -8
- package/docs/reference/api/resources.md +3 -1
- package/docs/reference/api/rewrites.md +19 -5
- package/docs/reference/api/types.md +9 -2
- package/docs/reference/cli/database.md +2 -0
- package/docs/reference/cli/deploy.md +17 -11
- package/docs/reference/cli.md +3 -0
- package/docs/reference/config.md +24 -2
- package/package.json +25 -23
- package/schema.json +4 -0
- package/skills/void/SKILL.md +5 -0
- package/dist/cf-build-output-CmDOcA7K.mjs +0 -1
- package/dist/client-CEtr5UOR.mjs +0 -1
- package/dist/deploy-B029oHlE.mjs +0 -2
- package/dist/discover-D4mQthao.mjs +0 -1
- package/dist/gen-cCxrFp9L.mjs +0 -1
- package/dist/help-Ba8Dq5-r.mjs +0 -1
- package/dist/login-BpbYeu-n.mjs +0 -1
- package/dist/migrate-HdA6Kh2p.mjs +0 -1
- package/dist/operator-cmd-wBYyp8iQ.mjs +0 -1
- package/dist/output-E6gecbbV.mjs +0 -1
- package/dist/platform-args-C7XUw9mw.mjs +0 -1
- package/dist/prepare-Cz18kLkF.mjs +0 -1
- package/dist/resolve-project-CgfjtOwz.mjs +0 -1
- package/dist/serialize-DUuYuaY3.mjs +0 -29
- package/dist/serialize-I4EmS-Wf.d.mts +0 -16
- package/dist/validator-CTfmzZYb.mjs +0 -69
- package/dist/wrangler-DUB3MGHV.mjs +0 -1
- package/dist/{cf-access-BmBT2h8_.mjs → cf-access-Dnyw8KFY.mjs} +1 -1
- package/dist/{inbound-CdO-qY0w.mjs → inbound-C2H6Dzz1.mjs} +2 -2
- package/dist/{runner-5MCSimKx.mjs → runner-CMZb7jNU.mjs} +1 -1
- package/dist/{runner-mysql-Bdmsp_x4.mjs → runner-mysql-BXfcQQj3.mjs} +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as outro } from "./dist-
|
|
1
|
+
import { H as outro } from "./dist-BQdgCVQF.mjs";
|
|
2
2
|
import { n as getOwnVersion } from "./agents-DRo8gzni.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { n as operatorGroups, t as operatorCommands } from "./operator-args-DuKAQ3Ks.mjs";
|
|
4
|
+
import { d as helpLine, f as import_picocolors, g as sectionTitle, l as formatUrl, p as note, t as categoryTitle } from "./output-CXJTIAtF.mjs";
|
|
5
5
|
// src/cli/ascii.ts
|
|
6
6
|
const asciiArts = [
|
|
7
7
|
`
|
|
@@ -192,6 +192,10 @@ const HELP_TREE = {
|
|
|
192
192
|
command: "--skip-build",
|
|
193
193
|
description: "Skip the build step and use existing output (static deploys on Cloudflare)"
|
|
194
194
|
},
|
|
195
|
+
{
|
|
196
|
+
command: "--skip-migrations",
|
|
197
|
+
description: "Deploy without applying application or authentication database migrations"
|
|
198
|
+
},
|
|
195
199
|
{
|
|
196
200
|
command: "--platform <cloudflare|void>",
|
|
197
201
|
description: "Override the platform saved by void init"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { r as printHelpPage } from "./help-CNuUb47C.mjs";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, x as DeferredState, y as defineScheduled } from "./handler-DjqciiDc.mjs";
|
|
2
|
+
import { i as AuthUser } from "./auth-CZrthGxs.mjs";
|
|
3
|
+
import { t as QueueMap } from "./queues-DdM42xXW.mjs";
|
|
1
4
|
import { n as HeadDescriptor } from "./head-MeF_5M_3.mjs";
|
|
2
|
-
import { r as AuthUser } from "./auth-CH4PLAX1.mjs";
|
|
3
5
|
import { s as RouteEnvironment } from "./types-agfx0alu.mjs";
|
|
4
|
-
import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, x as DeferredState, y as defineScheduled } from "./handler-BR6Tvjkp.mjs";
|
|
5
|
-
import { t as QueueMap } from "./queues-DdM42xXW.mjs";
|
|
6
6
|
import { Plugin } from "vite";
|
|
7
7
|
import { convertToWranglerConfig } from "@cloudflare/config";
|
|
8
8
|
import { PluginConfig } from "@cloudflare/vite-plugin";
|
|
@@ -63,4 +63,4 @@ export declare function voidPlugin(options?: {
|
|
|
63
63
|
persistTo?: string;
|
|
64
64
|
auxiliaryWorkers?: Array<AuxiliaryWorkerConfig>;
|
|
65
65
|
}): Array<Plugin>;
|
|
66
|
-
export { type AuthUser, type BasicAuthOptions, type CloudContext, type CloudContextVariables, type CloudEnv, type Deferred, type DeferredState, type HandlerInput, type HeadDescriptor, type InferProps, type QueueBatch, type QueueMap, type QueueMessage, type QueueRetryOptions, type RenderAssetTags, type TypedHandler, type TypedQueueHandler, type ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
|
|
66
|
+
export { type AuthUser, type BasicAuthOptions, type CloudBindings, type CloudContext, type CloudContextVariables, type CloudEnv, type Deferred, type DeferredState, type HandlerInput, type HeadDescriptor, type InferProps, type QueueBatch, type QueueMap, type QueueMessage, type QueueRetryOptions, type RenderAssetTags, type TypedHandler, type TypedQueueHandler, type ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
|
package/dist/index.mjs
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import { n as __toESM } from "./rolldown-runtime-uD8oG6U2.mjs";
|
|
2
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
3
|
import { t as require_picocolors } from "./picocolors-D1NxSLw-.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import {
|
|
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";
|
|
4
|
+
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-OV0CBJ80.mjs";
|
|
5
|
+
import { l as inferBindingsFromSource, m as applyBindingOverrides, n as FRAMEWORK_SCAN_DIRS, t as DEFAULT_SCAN_DIRS, u as staticModuleReferences } from "./plugin-inference-g66Q1Mx9.mjs";
|
|
6
|
+
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-CimYIfQI.mjs";
|
|
18
7
|
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
19
|
-
import {
|
|
20
|
-
import { c as stashCloudflareDeployPointer, i as materializeCloudflareConfig, l as ensureGitignoreLines, o as restoreCloudflarePreviewPointer } from "./cloudflare-config-
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
8
|
+
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-k40T7XTQ.mjs";
|
|
9
|
+
import { c as stashCloudflareDeployPointer, i as materializeCloudflareConfig, l as ensureGitignoreLines, o as restoreCloudflarePreviewPointer } from "./cloudflare-config-DtOGAbeB.mjs";
|
|
10
|
+
import { a as syncAuthTypesFile, i as removeAuthTypesIfPresent, n as generateQueueTypes, s as syncBindingTypes, t as generateRouteTypes } from "./route-types-Cl3x0Q8B.mjs";
|
|
11
|
+
import { c as getDatabaseCasing, l as getDatabaseDialect, p as readConfig, u as isNodeTarget } from "./config-5oSQhZNj.mjs";
|
|
12
|
+
import { n as writeLocalD1PersistState, t as resolveLocalD1Target } from "./local-d1-CFcH9Bx3.mjs";
|
|
13
|
+
import { i as voidWarn, n as voidError, r as voidLog, t as setShowTimestamp } from "./log-D9hwSySP.mjs";
|
|
14
|
+
import { a as getApiUrl, c as getToken, o as getProxyUrl } from "./auth-CCk9Seol.mjs";
|
|
15
|
+
import { n as ensurePlatformProxyAccess } from "./cf-access-Dnyw8KFY.mjs";
|
|
23
16
|
import { n as scopedAccessCredentials } from "./cf-access-pejlJmuy.mjs";
|
|
24
|
-
import { n as
|
|
25
|
-
import {
|
|
26
|
-
import { t as
|
|
27
|
-
import { n as scanWranglerDotenvKeys } from "./dotenv-CEI8hapP.mjs";
|
|
17
|
+
import { n as readGeneratedWranglerConfigFile } from "./generated-wrangler-config-CoDaaFsA.mjs";
|
|
18
|
+
import { t as migrateBuiltWranglerConfig } from "./cf-config-migrate-Bb-EdAQq.mjs";
|
|
19
|
+
import { t as writeFileAtomic } from "./atomic-write-DA6eD1Kp.mjs";
|
|
28
20
|
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 {
|
|
30
|
-
import { a as readDeployBuildQueueNames, r as cloudflareQueueName, s as drizzlePlugin, t as generateQueueResolverSource } from "./dispatch-
|
|
21
|
+
import { n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-G0yut6Zz.mjs";
|
|
22
|
+
import { a as readDeployBuildQueueNames, r as cloudflareQueueName, s as drizzlePlugin, t as generateQueueResolverSource } from "./dispatch-pYaww76u.mjs";
|
|
31
23
|
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 {
|
|
24
|
+
import { t as MagicString } from "./dist-B6eN80gc.mjs";
|
|
25
|
+
import { n as bindingResolver } from "./ast-bindings-BkivMJIo.mjs";
|
|
26
|
+
import { i as isMemberExpression, n as isIdentifier, r as isLiteral } from "./ast-Cv0JwXqb.mjs";
|
|
27
|
+
import { n as findEnvFileForPaths, r as generateEnvTypes, t as findEnvFile } from "./env-types-Dz9qkiOn.mjs";
|
|
28
|
+
import { i as writeFileIfChanged, r as syncAuthTypesInProjectTsconfig } from "./project-tsconfig-nhnTWO_Y.mjs";
|
|
33
29
|
import { t as loadUserEnvFile } from "./load-user-env-CSwdofj0.mjs";
|
|
30
|
+
import { n as scanWranglerDotenvKeys } from "./dotenv-CEI8hapP.mjs";
|
|
31
|
+
import { h as isRouteEnabledForEnvironment, i as patternToRegex, p as invalidateSourceAnalysis, s as resolveLayoutIds } from "./scan-L8OSv1f7.mjs";
|
|
34
32
|
import { n as INTERNAL_BINDING_PREFIXES, t as INTERNAL_BINDING_EXACT_NAMES } from "./env-raw-e8qgqAzQ.mjs";
|
|
35
33
|
import { t as ASSET_EXTENSIONS } from "./routing-assets-DJIVOrCh.mjs";
|
|
34
|
+
import { i as loadVoidAuthConfig, n as devAuthConfigImporter, o as viteAuthConfigImporter, t as AUTH_CONFIG_ENVIRONMENT } from "./config-eeDzKBS9.mjs";
|
|
36
35
|
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-
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
36
|
+
import { t as assertNoPrerenderFailures } from "./prerender-render-BN9Lmebs.mjs";
|
|
37
|
+
import { f as prerenderPages, n as SEND_EMAIL_BINDING, p as prerenderPagesNode } from "./email-cloudflare-CTt2n_W2.mjs";
|
|
38
|
+
import { i as safeJsonStringify } from "./protocol-yxdHxFLN.mjs";
|
|
39
|
+
import { n as completeApplicationAnalysis } from "./application-routing-QpyC5G8z.mjs";
|
|
40
|
+
import { a as validateSsrEntries, n as SSR_SERVER_ENTRY_RELATIVE_PATHS, o as validateSsrEntry, t as SSR_CLIENT_ENTRY_RELATIVE_PATHS } from "./entry-Bw-G1VVx.mjs";
|
|
41
|
+
import { r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-eUd6Ar_U.mjs";
|
|
42
|
+
import { r as hasEmailHandlers } from "./email-BHY72ixO.mjs";
|
|
43
|
+
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-C9SnmeW1.mjs";
|
|
40
44
|
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";
|
|
45
45
|
import module, { builtinModules, createRequire } from "node:module";
|
|
46
|
-
import { chmodSync, closeSync, cpSync, existsSync, mkdirSync, mkdtempSync, openSync, readFileSync, realpathSync, rmSync, statSync, writeFileSync, writeSync } from "node:fs";
|
|
47
|
-
import { createRunnableDevEnvironment, defaultServerConditions, isRunnableDevEnvironment, loadEnv, normalizePath, parseSync, resolveEnvPrefix } from "vite";
|
|
46
|
+
import { chmodSync, closeSync, cpSync, existsSync, mkdirSync, mkdtempSync, openSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, writeFileSync, writeSync } from "node:fs";
|
|
47
|
+
import { createRunnableDevEnvironment, defaultServerConditions, isFileServingAllowed, isRunnableDevEnvironment, loadEnv, normalizePath, parseSync, resolveEnvPrefix } from "vite";
|
|
48
48
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
49
49
|
import { appendSqliteClassMigration } from "@void/deploy-core";
|
|
50
50
|
import { randomBytes, timingSafeEqual } from "node:crypto";
|
|
@@ -54,6 +54,8 @@ import { getRootConfigPath, getWorkerAssetsDir, getWorkerConfigPath, readBuildOu
|
|
|
54
54
|
import { convertToWranglerConfig } from "@cloudflare/config";
|
|
55
55
|
import { cloudflare } from "@cloudflare/vite-plugin";
|
|
56
56
|
import { parse } from "smol-toml";
|
|
57
|
+
import { readFile, stat } from "node:fs/promises";
|
|
58
|
+
import mime from "mime";
|
|
57
59
|
import { compilePattern, matchPattern } from "@void/edge";
|
|
58
60
|
// src/pages/dev-css-assets.ts
|
|
59
61
|
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
@@ -493,11 +495,11 @@ function readVoidDevCredentials(root) {
|
|
|
493
495
|
* block the server. On completion, writes project.json and restarts the server.
|
|
494
496
|
*/
|
|
495
497
|
async function runAiSetupPrompt(root, token, apiUrl, server) {
|
|
496
|
-
const { select, text, isCancel, log } = await import("./dist-
|
|
497
|
-
const { PlatformClient } = await import("./client-
|
|
498
|
+
const { select, text, isCancel, log } = await import("./dist-DeTdhbZc.mjs");
|
|
499
|
+
const { PlatformClient } = await import("./client-BAxLpSKv.mjs");
|
|
498
500
|
const { attachSelectedPlatform, writeProjectConfig } = await import("./project-DVsTAWFh.mjs");
|
|
499
|
-
const { inferDefaultSlug } = await import("./resolve-project-
|
|
500
|
-
const { printSuccess } = await import("./output-
|
|
501
|
+
const { inferDefaultSlug } = await import("./resolve-project-BALVa9q0.mjs");
|
|
502
|
+
const { printSuccess } = await import("./output-CNsMDEd2.mjs");
|
|
501
503
|
const client = new PlatformClient(token, { apiUrl });
|
|
502
504
|
let projects;
|
|
503
505
|
try {
|
|
@@ -524,7 +526,7 @@ async function runAiSetupPrompt(root, token, apiUrl, server) {
|
|
|
524
526
|
let slug;
|
|
525
527
|
if (result === "__create__") {
|
|
526
528
|
const { validateProjectSlug } = await import("./project-slug-BUy0lmyR.mjs");
|
|
527
|
-
const { createProjectWithSlugRetry } = await import("./create-project-
|
|
529
|
+
const { createProjectWithSlugRetry } = await import("./create-project-DZH3aYGQ.mjs");
|
|
528
530
|
let created;
|
|
529
531
|
try {
|
|
530
532
|
created = await createProjectWithSlugRetry(client, inferDefaultSlug(root), async (defaultSlug) => {
|
|
@@ -1695,7 +1697,7 @@ function readProcessEnvCopies() {
|
|
|
1695
1697
|
* once per environment) see only the shell.
|
|
1696
1698
|
*/
|
|
1697
1699
|
function stripLocalClientEnv(root, config, before) {
|
|
1698
|
-
if (config.envDir === false ||
|
|
1700
|
+
if (config.envDir === false || realPath(config.envDir) !== realPath(root)) return;
|
|
1699
1701
|
const file = join(root, LOCAL_ENV_FILE);
|
|
1700
1702
|
if (!existsSync(file)) return;
|
|
1701
1703
|
const parsed = parseEnv(readFileSync(file, "utf8"));
|
|
@@ -1716,13 +1718,21 @@ function stripLocalClientEnv(root, config, before) {
|
|
|
1716
1718
|
}
|
|
1717
1719
|
}
|
|
1718
1720
|
/** Match Vite's canonical paths, including Windows short names and filesystem casing. */
|
|
1719
|
-
function
|
|
1721
|
+
function realPath(path) {
|
|
1720
1722
|
try {
|
|
1721
|
-
return realpathSync.native(
|
|
1723
|
+
return realpathSync.native(path);
|
|
1722
1724
|
} catch {
|
|
1723
|
-
return resolve(
|
|
1725
|
+
return resolve(path);
|
|
1724
1726
|
}
|
|
1725
1727
|
}
|
|
1728
|
+
/** Module ids that name an env file: its path as found, and as Vite resolves it. */
|
|
1729
|
+
function envFileIdsFor(envFile) {
|
|
1730
|
+
return new Set(envFile ? [normalizePath(envFile), normalizePath(realPath(envFile))] : []);
|
|
1731
|
+
}
|
|
1732
|
+
/** A hook filter pattern that matches exactly `id`. */
|
|
1733
|
+
function exactId(id) {
|
|
1734
|
+
return new RegExp(`^${id.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}$`);
|
|
1735
|
+
}
|
|
1726
1736
|
/** Patterns Vite's `define` typically uses for env-shaped constants. */
|
|
1727
1737
|
const DEFINE_ENV_PATTERN = /^(?:globalThis\.)?(?:process\.env|import\.meta\.env)\.([A-Z_][A-Z0-9_]*)$/;
|
|
1728
1738
|
/**
|
|
@@ -1739,6 +1749,18 @@ const DEFINE_ENV_PATTERN = /^(?:globalThis\.)?(?:process\.env|import\.meta\.env)
|
|
|
1739
1749
|
function envSchemaPlugin(root, options = {}) {
|
|
1740
1750
|
const outDir = join(root, ".void");
|
|
1741
1751
|
let envFile = null;
|
|
1752
|
+
let envFileIds = envFileIdsFor(findEnvFile(root));
|
|
1753
|
+
const keepEnvFileImport = {
|
|
1754
|
+
filter: { id: [...envFileIds].map(exactId) },
|
|
1755
|
+
handler(code, id) {
|
|
1756
|
+
if (this.environment.config.consumer === "client" || !envFileIds.has(id)) return;
|
|
1757
|
+
return {
|
|
1758
|
+
code,
|
|
1759
|
+
map: null,
|
|
1760
|
+
moduleSideEffects: true
|
|
1761
|
+
};
|
|
1762
|
+
}
|
|
1763
|
+
};
|
|
1742
1764
|
let command = "serve";
|
|
1743
1765
|
let processEnvCopiesBefore;
|
|
1744
1766
|
const appliedClientDefaults = /* @__PURE__ */ new Map();
|
|
@@ -1851,6 +1873,7 @@ function envSchemaPlugin(root, options = {}) {
|
|
|
1851
1873
|
const reservedInDotenv = findReservedEnvKeys(scanWranglerDotenvKeys(join(root, LOCAL_ENV_FILE)));
|
|
1852
1874
|
if (reservedInDotenv.length > 0) throw new Error(reservedEnvKeysMessage(".env", reservedInDotenv));
|
|
1853
1875
|
envFile = findEnvFile(root);
|
|
1876
|
+
envFileIds = envFileIdsFor(envFile);
|
|
1854
1877
|
if (!envFile) return;
|
|
1855
1878
|
regenerateTypes();
|
|
1856
1879
|
await importUserEnv(environment.command === "build");
|
|
@@ -1898,7 +1921,8 @@ function envSchemaPlugin(root, options = {}) {
|
|
|
1898
1921
|
},
|
|
1899
1922
|
async buildStart() {
|
|
1900
1923
|
if (envFile) await importUserEnv();
|
|
1901
|
-
}
|
|
1924
|
+
},
|
|
1925
|
+
...envFileIds.size > 0 && { transform: keepEnvFileImport }
|
|
1902
1926
|
};
|
|
1903
1927
|
}
|
|
1904
1928
|
// src/plugin-framework-triggers.ts
|
|
@@ -2440,7 +2464,7 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
|
|
|
2440
2464
|
const managedDispatch = options.nodeTarget !== true && options.dev !== true && options.managedDispatch === true;
|
|
2441
2465
|
lines.push(`import { AsyncLocalStorage } from "node:async_hooks";`);
|
|
2442
2466
|
lines.push(`import { Hono } from ${JSON.stringify(options.honoPath)};`);
|
|
2443
|
-
lines.push(`import { createRoutingRuntime as __createRoutingRuntime, createHttpRouteHandler as __createHttpRouteHandler, createErrorRenderer as __createErrorRenderer, createPageGetHandler as __createPageGetHandler, createPageMutationHandler as __createPageMutationHandler, createNamedActionMarker as __createNamedActionMarker, markRouteHandler as __markRouteHandler, createPagesFallback as __createPagesFallback, createModuleLoader as __createModuleLoader, createClientAssetTags as __createClientAssetTags, createManifestLoader as __createManifestLoader, createSsrFallback as __createSsrFallback, createAssetNotFound as __createAssetNotFound } from ${JSON.stringify(ROUTING_RUNTIME_PATH)};`);
|
|
2467
|
+
lines.push(`import { createRoutingRuntime as __createRoutingRuntime, createHttpRouteHandler as __createHttpRouteHandler, createErrorRenderer as __createErrorRenderer, createPageGetHandler as __createPageGetHandler, createPageMutationHandler as __createPageMutationHandler, createNamedActionMarker as __createNamedActionMarker, markRouteHandler as __markRouteHandler, createPagesFallback as __createPagesFallback, createModuleLoader as __createModuleLoader, createClientAssetTags as __createClientAssetTags, createManifestLoader as __createManifestLoader, createSsrFallback as __createSsrFallback, createAssetNotFound as __createAssetNotFound, buildPrerenderPath as __buildPrerenderPath } from ${JSON.stringify(ROUTING_RUNTIME_PATH)};`);
|
|
2444
2468
|
if (options.nodeTarget) lines.push(`const withRuntimeEnv = (_env, fn) => fn();`);
|
|
2445
2469
|
else lines.push(`import { withRuntimeEnv } from ${JSON.stringify(options.runtimeEnvPath)};`);
|
|
2446
2470
|
if (auth) {
|
|
@@ -2577,8 +2601,11 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
|
|
|
2577
2601
|
if (pages && scan.pages.pages.length > 0) compilePageRoutes(lines, scan, pages, options, pageNames);
|
|
2578
2602
|
for (let i = 0; i < webSockets.length; i++) lines.push(`app.all(${JSON.stringify(webSockets[i].pattern)}, __markRouteHandler((c) => __forwardWebSocketRequest(c.req.raw, c.env, __voidWebSocketRoutes[${i}])));`);
|
|
2579
2603
|
if (webSockets.length > 0) lines.push("");
|
|
2580
|
-
if (pages && scan.pages.pages.length > 0)
|
|
2581
|
-
|
|
2604
|
+
if (pages && scan.pages.pages.length > 0) {
|
|
2605
|
+
const pagePatterns = options.trailingSlash ? `[${scan.pages.pages.map((page) => patternToRegex(page.pattern)).join(", ")}]` : "undefined";
|
|
2606
|
+
lines.push(`app.notFound(__createPagesFallback({ routing: __routingRuntime, errors: __errorRenderer, assetsDir: ${JSON.stringify(options.assetsDir)}, fallbackRules: ${fallbackRulesJson}, trailingSlash: ${options.trailingSlash === true}, pagePatterns: ${pagePatterns} }));`);
|
|
2607
|
+
}
|
|
2608
|
+
compilePrerenderCollector(lines, scan, ssr, options, pageNames, pages?.pagesDirRelative);
|
|
2582
2609
|
if (ssr) {
|
|
2583
2610
|
lines.push(`const getClientAssetTags = __createClientAssetTags(${JSON.stringify({
|
|
2584
2611
|
entryId: ssr.clientEntryRelativePath,
|
|
@@ -2834,19 +2861,10 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
|
|
|
2834
2861
|
lines.push(`export default app;`);
|
|
2835
2862
|
return lines.join("\n");
|
|
2836
2863
|
}
|
|
2837
|
-
function compilePrerenderCollector(lines, scan, ssr, options, pageNames) {
|
|
2864
|
+
function compilePrerenderCollector(lines, scan, ssr, options, pageNames, pagesDirRelative) {
|
|
2838
2865
|
const staticPaths = scan.pages.pages.filter((page) => page.shouldPrerender && page.params.length === 0 && !page.catchAll).map((page) => page.pattern);
|
|
2839
2866
|
const dynamicPages = scan.pages.pages.filter((page) => page.shouldPrerender && page.hasGetPrerenderPaths && (page.params.length > 0 || page.catchAll));
|
|
2840
2867
|
const explicitPaths = options.explicitPrerenderPaths ?? [];
|
|
2841
|
-
lines.push(`function __voidBuildPrerenderPath(pattern, params) {`);
|
|
2842
|
-
lines.push(` let path = pattern;`);
|
|
2843
|
-
lines.push(` for (const [key, value] of Object.entries(params)) {`);
|
|
2844
|
-
lines.push(` path = path.replace(":" + key + "{.+}", value);`);
|
|
2845
|
-
lines.push(` path = path.replace(":" + key, value);`);
|
|
2846
|
-
lines.push(` }`);
|
|
2847
|
-
lines.push(` return path;`);
|
|
2848
|
-
lines.push(`}`);
|
|
2849
|
-
lines.push("");
|
|
2850
2868
|
lines.push(`export async function __voidCollectPrerenderPaths(request, env, ctx) {`);
|
|
2851
2869
|
lines.push(` return withRuntimeEnv(env, async () => {`);
|
|
2852
2870
|
if (options.nodeTarget) lines.push(` return requestContext.run({ request }, async () => {`);
|
|
@@ -2860,8 +2878,9 @@ function compilePrerenderCollector(lines, scan, ssr, options, pageNames) {
|
|
|
2860
2878
|
lines.push(` if (typeof mod.getPrerenderPaths === "function") {`);
|
|
2861
2879
|
lines.push(` const paramSets = await mod.getPrerenderPaths();`);
|
|
2862
2880
|
lines.push(` if (Array.isArray(paramSets)) {`);
|
|
2863
|
-
|
|
2864
|
-
lines.push(`
|
|
2881
|
+
const file = [pagesDirRelative, page.serverPath ?? page.componentPath].filter(Boolean).join("/");
|
|
2882
|
+
lines.push(` for (let index = 0; index < paramSets.length; index++) {`);
|
|
2883
|
+
lines.push(` paths.push(__buildPrerenderPath(${JSON.stringify(page.pattern)}, paramSets[index], ${JSON.stringify(file)}, index));`);
|
|
2865
2884
|
lines.push(` }`);
|
|
2866
2885
|
lines.push(` }`);
|
|
2867
2886
|
lines.push(` }`);
|
|
@@ -2881,7 +2900,7 @@ function compilePrerenderCollector(lines, scan, ssr, options, pageNames) {
|
|
|
2881
2900
|
lines.push(` }`);
|
|
2882
2901
|
}
|
|
2883
2902
|
for (const path of explicitPaths) lines.push(` paths.push(${JSON.stringify(path)});`);
|
|
2884
|
-
lines.push(` return [...new Set(paths)];`);
|
|
2903
|
+
lines.push(options.trailingSlash ? ` return [...new Set(paths.map((path) => path.endsWith("/") ? path : path + "/"))];` : ` return [...new Set(paths)];`);
|
|
2885
2904
|
lines.push(` });`);
|
|
2886
2905
|
lines.push(` });`);
|
|
2887
2906
|
lines.push(`}`);
|
|
@@ -2974,12 +2993,15 @@ function compilePageRoutes(lines, scan, pages, options, pageNames) {
|
|
|
2974
2993
|
}
|
|
2975
2994
|
const renderer = page.renderMode === "island" ? "renderIslandPage" : "renderPage";
|
|
2976
2995
|
const assetTags = page.renderMode === "island" && pages.islandClientEntryId ? "getIslandsAssetTags" : "getPagesAssetTags";
|
|
2977
|
-
const
|
|
2996
|
+
const trailingCatchAll = options.trailingSlash && page.catchAll;
|
|
2997
|
+
const pattern = trailingCatchAll ? page.pattern.slice(0, -1) : page.pattern;
|
|
2998
|
+
const catchAllParam = page.pattern.match(/:([^/{}]+)\{\.\+\}\/$/)?.[1];
|
|
2999
|
+
const routeOptions = `{ ${serverImportPath ? "load: _pload_" + safeId + ", " : ""}${mdHeadRef ? "head: " + mdHeadRef + ", " : ""}${trailingCatchAll ? `trailingSlash: true, catchAllParam: ${JSON.stringify(catchAllParam)}, ` : ""}componentId: ${JSON.stringify(page.componentId)}, render: ${renderer}, assets: ${assetTags}, headConfig: __voidHeadConfig, renderOptions: ${JSON.stringify({
|
|
2978
3000
|
renderMode: page.renderMode,
|
|
2979
3001
|
...options.dev === true ? { dev: true } : {}
|
|
2980
3002
|
})} }`;
|
|
2981
|
-
lines.push(`app.get(${JSON.stringify(
|
|
2982
|
-
if (page.methods.includes("action") || page.methods.includes("actions")) lines.push(`app.on(["POST", "PUT", "PATCH", "DELETE"], ${JSON.stringify(
|
|
3003
|
+
lines.push(`app.get(${JSON.stringify(pattern)}, __createPageGetHandler(${routeOptions}));`);
|
|
3004
|
+
if (page.methods.includes("action") || page.methods.includes("actions")) lines.push(`app.on(["POST", "PUT", "PATCH", "DELETE"], ${JSON.stringify(pattern)}, __createPageMutationHandler({ ...${routeOptions}, namedActions: ${JSON.stringify(page.methods.includes("actions"))} }));`);
|
|
2983
3005
|
}
|
|
2984
3006
|
lines.push("");
|
|
2985
3007
|
}
|
|
@@ -3144,20 +3166,35 @@ function compileNodeApp(target, honoPath, envSchemaModule) {
|
|
|
3144
3166
|
import { fileURLToPath } from "node:url";
|
|
3145
3167
|
import { Hono } from ${JSON.stringify(honoPath)};
|
|
3146
3168
|
import innerApp, { __voidCollectPrerenderPaths } from "virtual:void-routes";
|
|
3169
|
+
import { prerenderPathsResponse as __prerenderPathsResponse } from ${JSON.stringify(ROUTING_RUNTIME_PATH)};
|
|
3147
3170
|
${envSchemaImport}
|
|
3148
|
-
//
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3171
|
+
// dist/client, created on first use so a server that supplies its own ASSETS
|
|
3172
|
+
// (a single executable, for one) never looks for a directory it doesn't have.
|
|
3173
|
+
let fileAssets;
|
|
3174
|
+
const clientAssets = () => {
|
|
3175
|
+
if (!fileAssets) {
|
|
3176
|
+
// Resolved by nodeTargetPlugin for this emitted chunk, including shared chunks.
|
|
3177
|
+
const clientRoot = fileURLToPath(import.meta.voidClientDirectory);
|
|
3178
|
+
const assetApp = new Hono();
|
|
3179
|
+
assetApp.get("*", serveStatic({
|
|
3180
|
+
root: clientRoot,
|
|
3181
|
+
allowPercentInPath: true,
|
|
3182
|
+
// Windows permits a trailing separator when opening a regular file.
|
|
3183
|
+
// Directory URLs must look up an index so they cannot alias those files.
|
|
3184
|
+
rewriteRequestPath: (path) => path.endsWith("/") ? path + "index.html" : path,
|
|
3185
|
+
}));
|
|
3186
|
+
fileAssets = { fetch: (request) => assetApp.fetch(request) };
|
|
3187
|
+
}
|
|
3188
|
+
return fileAssets;
|
|
3189
|
+
};
|
|
3190
|
+
const assetsFor = (c) => (typeof c.env?.ASSETS?.fetch === "function" ? c.env.ASSETS : clientAssets());
|
|
3153
3191
|
const app = new Hono();
|
|
3154
3192
|
${envMiddleware}app.post("/__void/prerender-paths", async (c) => {
|
|
3155
3193
|
if (c.env?.__VOID_PRERENDER !== "1") return c.notFound();
|
|
3156
|
-
|
|
3157
|
-
return c.json({ paths });
|
|
3194
|
+
return __prerenderPathsResponse(() => __voidCollectPrerenderPaths(c.req.raw));
|
|
3158
3195
|
});
|
|
3159
|
-
app.get("/assets/*", (c) =>
|
|
3160
|
-
app.all("*", (c) => innerApp.fetch(c.req.raw, { ...c.env, ASSETS:
|
|
3196
|
+
app.get("/assets/*", (c) => assetsFor(c).fetch(c.req.raw));
|
|
3197
|
+
app.all("*", (c) => innerApp.fetch(c.req.raw, { ...c.env, ASSETS: assetsFor(c) }));
|
|
3161
3198
|
export default app;`;
|
|
3162
3199
|
}
|
|
3163
3200
|
/**
|
|
@@ -3227,6 +3264,10 @@ function getFrameworkEntry(framework, root, devTriggerToken, dialect, notFound,
|
|
|
3227
3264
|
return generateClassATriggerWrapper(root, framework, getOriginalFrameworkEntry(framework, root, configuredMain), isBuild, dialect, void 0, notFound);
|
|
3228
3265
|
}
|
|
3229
3266
|
const TANSTACK_SERVER_ENTRY = "@tanstack/react-start/server-entry";
|
|
3267
|
+
/** Include proxy.ts and custom page extensions; vinext selects the actual convention file. */
|
|
3268
|
+
function hasVinextMiddleware(root) {
|
|
3269
|
+
return [root, join(root, "src")].some((dir) => statSync(dir, { throwIfNoEntry: false })?.isDirectory() && readdirSync(dir).some((file) => /^(?:middleware|proxy)\./i.test(file)));
|
|
3270
|
+
}
|
|
3230
3271
|
/**
|
|
3231
3272
|
* Whether `main` names a file in the app rather than a package. A migrated TanStack config keeps
|
|
3232
3273
|
* `main: "@tanstack/react-start/server-entry"`, and a package subpath may end in `.js`, so a
|
|
@@ -3249,7 +3290,7 @@ function getOriginalFrameworkEntry(framework, root, configuredMain) {
|
|
|
3249
3290
|
}
|
|
3250
3291
|
case "react-router": return generateReactRouterEntry(root);
|
|
3251
3292
|
case "vinext-app": return "vinext/server/app-router-entry";
|
|
3252
|
-
case "vinext-pages": return
|
|
3293
|
+
case "vinext-pages": return "vinext/server/pages-router-entry";
|
|
3253
3294
|
}
|
|
3254
3295
|
}
|
|
3255
3296
|
/**
|
|
@@ -3279,7 +3320,8 @@ function generateClassATriggerWrapper(root, framework, original, isBuild, dialec
|
|
|
3279
3320
|
const outDir = join(root, ".void");
|
|
3280
3321
|
mkdirSync(outDir, { recursive: true });
|
|
3281
3322
|
const wrapperPath = join(outDir, `${framework}-trigger-wrapper.ts`);
|
|
3282
|
-
const
|
|
3323
|
+
const assetFallback = framework !== "vinext-app" && framework !== "vinext-pages";
|
|
3324
|
+
const fetchBody = isBuild ? assetFallback ? ` return serveWithAssets(request, env, await original.fetch(request, env, ctx));` : ` return original.fetch(request, env, ctx);` : ` if (request.method === "POST") {
|
|
3283
3325
|
const pathname = new URL(request.url).pathname;
|
|
3284
3326
|
if (pathname === "/__void/scheduled" || pathname === "/__void/queue") {
|
|
3285
3327
|
const { handleDevTrigger } = await import(${JSON.stringify(frameworkTriggersDispatchPath(root))});
|
|
@@ -3304,36 +3346,10 @@ export default {
|
|
|
3304
3346
|
...original,
|
|
3305
3347
|
${fetchMethod}
|
|
3306
3348
|
};
|
|
3307
|
-
${isBuild ? `${compileAssetFallbackHelper(assetsDir, false, notFound)}\n` : ""}`;
|
|
3349
|
+
${isBuild && assetFallback ? `${compileAssetFallbackHelper(assetsDir, false, notFound)}\n` : ""}`;
|
|
3308
3350
|
writeFileIfChanged(wrapperPath, body);
|
|
3309
3351
|
return wrapperPath;
|
|
3310
3352
|
}
|
|
3311
|
-
/** Generate a worker entry for vinext Pages Router projects. */
|
|
3312
|
-
function generateVinextPagesEntry(root) {
|
|
3313
|
-
const outDir = join(root, ".void");
|
|
3314
|
-
mkdirSync(outDir, { recursive: true });
|
|
3315
|
-
const entryPath = join(outDir, "vinext-pages-entry.ts");
|
|
3316
|
-
writeFileIfChanged(entryPath, `// Auto-generated by Void — vinext Pages Router worker entry
|
|
3317
|
-
// @ts-expect-error virtual module resolved by vinext at build time
|
|
3318
|
-
import { renderPage, handleApiRoute } from "virtual:vinext-server-entry";
|
|
3319
|
-
|
|
3320
|
-
export default {
|
|
3321
|
-
async fetch(request: Request): Promise<Response> {
|
|
3322
|
-
const url = new URL(request.url);
|
|
3323
|
-
const pathname = url.pathname;
|
|
3324
|
-
if (pathname.replaceAll("\\\\", "/").startsWith("//")) {
|
|
3325
|
-
return new Response("404 Not Found", { status: 404 });
|
|
3326
|
-
}
|
|
3327
|
-
const urlWithQuery = pathname + url.search;
|
|
3328
|
-
if (pathname.startsWith("/api/") || pathname === "/api") {
|
|
3329
|
-
return await handleApiRoute(request, urlWithQuery);
|
|
3330
|
-
}
|
|
3331
|
-
return await renderPage(request, urlWithQuery, null);
|
|
3332
|
-
},
|
|
3333
|
-
};
|
|
3334
|
-
`);
|
|
3335
|
-
return entryPath;
|
|
3336
|
-
}
|
|
3337
3353
|
/** Generate a worker entry for React Router v7 projects. */
|
|
3338
3354
|
function generateReactRouterEntry(root) {
|
|
3339
3355
|
const outDir = join(root, ".void");
|
|
@@ -3574,7 +3590,7 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
|
|
|
3574
3590
|
const hasSqlMigrations = existsSync(migrationsDir);
|
|
3575
3591
|
if (!hasSqlMigrations && !auth?.enabled) return;
|
|
3576
3592
|
const migrateAuth = async (databaseUrl) => {
|
|
3577
|
-
const { runLocalVoidAuthMigrations } = await import("./node-
|
|
3593
|
+
const { runLocalVoidAuthMigrations } = await import("./node-B0otYjDv.mjs");
|
|
3578
3594
|
await runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId, auth?.configPath, databaseUrl, devAuthConfigImporter(server));
|
|
3579
3595
|
};
|
|
3580
3596
|
const mysqlAuth = dialect === "mysql" && auth?.enabled === true;
|
|
@@ -3604,7 +3620,7 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
|
|
|
3604
3620
|
const authWithFiles = authUrl !== void 0 && authUrl === url;
|
|
3605
3621
|
if (url) {
|
|
3606
3622
|
const { validateMigrations } = await import("./validate-DY1U9rET.mjs");
|
|
3607
|
-
const appliedNames = dialect === "mysql" ? await import("./runner-mysql-
|
|
3623
|
+
const appliedNames = dialect === "mysql" ? await import("./runner-mysql-CHvEg_sy.mjs").then((runner) => runner.getMySqlAppliedMigrations(url)) : await import("./runner-pg-2pjltt0t.mjs").then((runner) => runner.getPgAppliedMigrations(url));
|
|
3608
3624
|
const appliedSet = new Set(appliedNames);
|
|
3609
3625
|
const pending = allMigrations.filter((migration) => !appliedSet.has(migration.name));
|
|
3610
3626
|
if (pending.length > 0) try {
|
|
@@ -3613,18 +3629,18 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
|
|
|
3613
3629
|
refuse(err);
|
|
3614
3630
|
return;
|
|
3615
3631
|
}
|
|
3616
|
-
const applied = dialect === "mysql" ? await import("./runner-mysql-
|
|
3632
|
+
const applied = dialect === "mysql" ? await import("./runner-mysql-CHvEg_sy.mjs").then((runner) => runner.runMySqlMigrations(migrationsDir, url, authWithFiles ? async (names) => {
|
|
3617
3633
|
logApplied(names);
|
|
3618
3634
|
await migrateAuth(url);
|
|
3619
3635
|
} : void 0)) : await import("./runner-pg-2pjltt0t.mjs").then((runner) => runner.runPgMigrations(migrationsDir, url));
|
|
3620
3636
|
if (!authWithFiles) logApplied(applied);
|
|
3621
3637
|
}
|
|
3622
3638
|
if (authUrl && !authWithFiles) {
|
|
3623
|
-
const { withMySqlMigrationLockAt } = await import("./runner-mysql-
|
|
3639
|
+
const { withMySqlMigrationLockAt } = await import("./runner-mysql-CHvEg_sy.mjs");
|
|
3624
3640
|
await withMySqlMigrationLockAt(authUrl, () => migrateAuth(authUrl));
|
|
3625
3641
|
}
|
|
3626
3642
|
} else if (hasSqlMigrations) {
|
|
3627
|
-
const { runMigrations, getMiniflareDatabasePath, getAppliedMigrations } = await import("./runner-
|
|
3643
|
+
const { runMigrations, getMiniflareDatabasePath, getAppliedMigrations } = await import("./runner-CTk21HrO.mjs");
|
|
3628
3644
|
const { collectMigrations } = await import("./collect-8i0wU63d.mjs");
|
|
3629
3645
|
const { validateMigrations } = await import("./validate-DY1U9rET.mjs");
|
|
3630
3646
|
const dbPath = getMiniflareDatabasePath(persistRoot, databaseId);
|
|
@@ -3790,7 +3806,7 @@ function createServerRuntimeOptimizerPlugin(dialect, readCompat) {
|
|
|
3790
3806
|
if (name === "client") return;
|
|
3791
3807
|
if (!environment.resolve?.conditions?.includes("workerd")) return { optimizeDeps: { exclude: ["void"] } };
|
|
3792
3808
|
return { optimizeDeps: {
|
|
3793
|
-
exclude: ["void"],
|
|
3809
|
+
exclude: ["void", "better-auth"],
|
|
3794
3810
|
include: ["void > email-validator", ...DATABASE_DRIVER_DEPS[dialect]]
|
|
3795
3811
|
} };
|
|
3796
3812
|
},
|
|
@@ -4109,7 +4125,7 @@ function honoMiddleware(getApp) {
|
|
|
4109
4125
|
* 4. Build — dual-environment build (client + SSR) for pages apps,
|
|
4110
4126
|
* single SSR build for API-only apps
|
|
4111
4127
|
*/
|
|
4112
|
-
function nodeTargetPlugin(target) {
|
|
4128
|
+
function nodeTargetPlugin(target, options = {}) {
|
|
4113
4129
|
const unavailable = (id, root, importer) => {
|
|
4114
4130
|
const source = importer ? ` Imported by ${relative(root, importer)}.` : "";
|
|
4115
4131
|
return /* @__PURE__ */ new Error(`target: '${id}' is not available with target '${target}'. CF bindings require target: "cloudflare".${source}`);
|
|
@@ -4173,8 +4189,30 @@ function nodeTargetPlugin(target) {
|
|
|
4173
4189
|
if (builder.environments.client) await builder.build(builder.environments.client);
|
|
4174
4190
|
},
|
|
4175
4191
|
configureServer(server) {
|
|
4192
|
+
const assets = { async fetch(request) {
|
|
4193
|
+
try {
|
|
4194
|
+
const root = server.config.publicDir;
|
|
4195
|
+
if (!root) return new Response(null, { status: 404 });
|
|
4196
|
+
const pathname = new URL(request.url).pathname;
|
|
4197
|
+
let file = resolve(root, "." + decodeURIComponent(pathname));
|
|
4198
|
+
const rel = relative(root, file);
|
|
4199
|
+
if (rel === ".." || rel.startsWith("../") || isAbsolute(rel)) return new Response(null, { status: 404 });
|
|
4200
|
+
let entry = await stat(file);
|
|
4201
|
+
if (pathname.endsWith("/") && !entry.isDirectory()) return new Response(null, { status: 404 });
|
|
4202
|
+
if (entry.isDirectory()) {
|
|
4203
|
+
file = join(file, "index.html");
|
|
4204
|
+
entry = await stat(file);
|
|
4205
|
+
}
|
|
4206
|
+
if (!entry.isFile() || !isFileServingAllowed(server.config, file)) return new Response(null, { status: 404 });
|
|
4207
|
+
return new Response(request.method === "HEAD" ? null : new Uint8Array(await readFile(file)), { headers: { "Content-Type": mime.getType(file) ?? "application/octet-stream" } });
|
|
4208
|
+
} catch {
|
|
4209
|
+
return new Response(null, { status: 404 });
|
|
4210
|
+
}
|
|
4211
|
+
} };
|
|
4176
4212
|
server.middlewares.use(honoMiddleware(async () => {
|
|
4177
|
-
|
|
4213
|
+
const mod = await server.ssrLoadModule("virtual:void-routes");
|
|
4214
|
+
if (!options.trailingSlash) return mod.default;
|
|
4215
|
+
return { fetch: (request) => mod.default.fetch(request, { ASSETS: assets }) };
|
|
4178
4216
|
}));
|
|
4179
4217
|
},
|
|
4180
4218
|
configurePreviewServer(server) {
|
|
@@ -4589,6 +4627,7 @@ function routingPlugin(root, options) {
|
|
|
4589
4627
|
}
|
|
4590
4628
|
const runtimeEmailPath = resolveFile("#self/email");
|
|
4591
4629
|
const compileOptions = {
|
|
4630
|
+
trailingSlash: options.routing?.trailingSlash,
|
|
4592
4631
|
honoPath: resolveFile("hono"),
|
|
4593
4632
|
honoRoutePath: resolveFile("hono/route"),
|
|
4594
4633
|
runtimeEnvPath: resolveFile("#self/_env"),
|
|
@@ -5419,6 +5458,7 @@ function voidPlugin(options) {
|
|
|
5419
5458
|
warnIfPackageJsonIsNotEsm(root);
|
|
5420
5459
|
const devTriggerToken = isViteBuildOrPreview() ? crypto.randomUUID() : getOrCreateDevTriggerToken(root);
|
|
5421
5460
|
const config = readConfig(root);
|
|
5461
|
+
syncBindingTypes(root, config);
|
|
5422
5462
|
const projectCloudflareConfigPath = !isNodeTarget(config.target) ? materializeCloudflareConfig(root) : void 0;
|
|
5423
5463
|
const cloudflareConfigPath = projectCloudflareConfigPath && existsSync(projectCloudflareConfigPath) ? projectCloudflareConfigPath : void 0;
|
|
5424
5464
|
let previewing = false;
|
|
@@ -5703,6 +5743,11 @@ function voidPlugin(options) {
|
|
|
5703
5743
|
}
|
|
5704
5744
|
};
|
|
5705
5745
|
if (framework) {
|
|
5746
|
+
if ((framework === "vinext-app" || framework === "vinext-pages") && hasVinextMiddleware(root)) workerConfig.assets = {
|
|
5747
|
+
binding: "ASSETS",
|
|
5748
|
+
not_found_handling: "none",
|
|
5749
|
+
run_worker_first: ["/*"]
|
|
5750
|
+
};
|
|
5706
5751
|
workerConfig.main = getFrameworkEntry(framework, root, devTriggerToken, dialect, config.routing?.notFound, config.cloudflare?.main);
|
|
5707
5752
|
let notFoundIgnoredWarned = false;
|
|
5708
5753
|
const frameworkBuildWrapperPlugin = {
|
|
@@ -5815,7 +5860,7 @@ function voidPlugin(options) {
|
|
|
5815
5860
|
hasSandbox: false
|
|
5816
5861
|
}),
|
|
5817
5862
|
prerenderPlugin(root, config),
|
|
5818
|
-
...nodeTargetPlugin(config.target)
|
|
5863
|
+
...nodeTargetPlugin(config.target, { trailingSlash: config.routing?.trailingSlash })
|
|
5819
5864
|
];
|
|
5820
5865
|
}
|
|
5821
5866
|
const existingFlags = workerConfig.compatibility_flags ?? [];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as join, s as relative } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { d as deriveDurableResourceIdentity, f as inferDurableResourceName, t as analyzeApplicationSync } from "./application-analysis-OV0CBJ80.mjs";
|
|
3
|
+
import { n as VOID_LOCK_FILE } from "./cloudflare-config-DtOGAbeB.mjs";
|
|
4
|
+
import { p as readConfig } from "./config-5oSQhZNj.mjs";
|
|
5
|
+
import { a as deriveWebSocketClassNameFromName, o as inferWebSocketResourceName } from "./plugin-inference-g66Q1Mx9.mjs";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
7
|
import { isRecord } from "@void/deploy-core";
|
|
8
8
|
// src/cli/info.ts
|