void 0.27.0 → 1.0.3
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 +3 -1
- package/dist/{account-cmd-l-FM7Ioq.mjs → account-cmd-BTcUzv9L.mjs} +6 -6
- package/dist/{agents-B_pX_HmQ.mjs → agents-CuNtT0D_.mjs} +5 -2
- package/dist/{application-analysis-DKy02UY0.mjs → application-analysis-AB_YYWgH.mjs} +118 -135
- package/dist/{application-routing-DQyUh_5S.mjs → application-routing-L7V-TFhZ.mjs} +1 -2
- package/dist/atomic-write-Dq6R0BPN.mjs +18 -0
- package/dist/{auth-Dn2vw-SG.mjs → auth-B6iOCjKI.mjs} +23 -56
- package/dist/auth-Cbqi1iVX.mjs +1 -0
- package/dist/{auth-link-vz9Z2kmG.mjs → auth-link-DUJuvRx5.mjs} +11 -11
- package/dist/{auth-migrations-BwHgeEsD.mjs → auth-migrations-Cgs0k6lS.mjs} +28 -5
- package/dist/{auth-router-DvsCUVw4.mjs → auth-router-CIxiMG7i.mjs} +5 -5
- package/dist/base64-DVrOndmI.mjs +16 -0
- package/dist/{better-auth-shared-CPvWD3nG.d.mts → better-auth-shared-B74NJIus.d.mts} +8 -13
- package/dist/{better-auth-shared-DPpj8zxc.mjs → better-auth-shared-CMXlZG7W.mjs} +56 -68
- package/dist/{build-cmd-D6we0VjO.mjs → build-cmd-BkIv25PA.mjs} +6 -6
- package/dist/{cache-CZRdzKx1.mjs → cache-Ctzfig-W.mjs} +6 -6
- package/dist/{cancel-deploy-CQ3NnMvf.mjs → cancel-deploy-CD9o-SsC.mjs} +5 -5
- package/dist/{cf-access-TWNzXltp.mjs → cf-access-BM9G0lhO.mjs} +4 -3
- package/dist/{cf-access-BcIBSKqG.mjs → cf-access-CWP4avfP.mjs} +3 -7
- package/dist/cf-build-output-BU3hqdHu.mjs +1 -0
- package/dist/{cf-build-output-DjvB_872.mjs → cf-build-output-Bc8i3dzE.mjs} +2 -2
- package/dist/cf-user-agent-ChjQp2MU.mjs +33 -0
- package/dist/cli/cli.mjs +199 -312
- package/dist/cli/cloudflare-operation-process.mjs +41 -15
- package/dist/cli/env-schema-probe.d.mts +7 -44
- package/dist/cli/env-schema-probe.mjs +14 -80
- package/dist/client-B60PwCC4.mjs +1 -0
- package/dist/{client-DlDJuY0s.mjs → client-DM9Kcf4e.mjs} +161 -415
- package/dist/{cloudflare-auth-CuxfF6OA.mjs → cloudflare-auth-CqFBDo52.mjs} +12 -39
- package/dist/{cloudflare-cmd-lHqNlJGW.mjs → cloudflare-cmd-BIAF_BIY.mjs} +7 -6
- package/dist/{cloudflare-config-BmhBv3HV.mjs → cloudflare-config-DV60XFFK.mjs} +16 -28
- package/dist/{cloudflare-connect-2G3rL2rP.mjs → cloudflare-connect-WjwnVOJA.mjs} +4 -4
- package/dist/{cloudflare-operations-CwI1bChl.mjs → cloudflare-operations-B42EZeJy.mjs} +26 -34
- package/dist/cloudflare-operations-CrSUFRzJ.mjs +1 -0
- package/dist/{cloudflare-process-2-TfIEzB.mjs → cloudflare-process-CeDWJRhj.mjs} +12 -7
- package/dist/collect-Cae8A7Zr.mjs +1 -0
- package/dist/{collect-DiTn9yr6.mjs → collect-xjffdCdk.mjs} +1 -1
- package/dist/{config-CSa15FvD.d.mts → config-7qoq2p9v.d.mts} +2 -2
- package/dist/{config-CLYAosnQ.mjs → config-BEm9vRvS.mjs} +11 -5
- package/dist/{config-DiowPT80.mjs → config-Bx_1SpnO.mjs} +87 -177
- package/dist/{config-DPByhVck.mjs → config-D0GY5ItR.mjs} +1 -1
- package/dist/config-QrJWu0IX.mjs +1 -0
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-BfPBHHm-.mjs → connect-CKtk-EZe.mjs} +9 -9
- package/dist/create-project-B-ewF_Af.mjs +1 -0
- package/dist/{create-project-BdXEFKal.mjs → create-project-yInGo72M.mjs} +8 -8
- package/dist/database-provider.mjs +1 -2
- package/dist/{db-Xs80hcaA.mjs → db-7I_gfdVq.mjs} +177 -268
- package/dist/db-types-Bb4WBWIs.mjs +49 -0
- package/dist/{delete-d2vuou3j.mjs → delete-Cy-M1u-r.mjs} +6 -6
- package/dist/deploy-9lgfhrXS.mjs +2 -0
- package/dist/deploy-BYYlnsiy.mjs +6164 -0
- package/dist/deploy-managed-static-Ca4TFdmx.mjs +1595 -0
- package/dist/deploy-transport-DWlWBe6M.mjs +180 -0
- package/dist/deploy.d.mts +10 -0
- package/dist/deploy.mjs +82 -0
- package/dist/dev-inbox-Rd6j_8vM.mjs +217 -0
- package/dist/discover-ClzFSwns.mjs +1 -0
- package/dist/{discover-CkCYv9T_.mjs → discover-D2PGT63u.mjs} +2 -2
- package/dist/dispatch-DrTTk8Xg.mjs +431 -0
- package/dist/{dist-D3m88sjf.mjs → dist-BVdsO7Py.mjs} +5 -6
- package/dist/dist-CfgIkieS.mjs +1 -0
- package/dist/{dist-BVqXeR_h.mjs → dist-ipQi0Q8y.mjs} +2 -3
- package/dist/{domain-BsDUBAvt.mjs → domain-CZGxPv9u.mjs} +8 -23
- package/dist/{dotenv-BfU6eqFt.mjs → dotenv-CNazY3-w.mjs} +4 -16
- package/dist/edge.mjs +1 -2
- package/dist/{email-d_Aux1vM.mjs → email-BcjSyAL0.mjs} +4 -20
- package/dist/{email-_lGAHOhp.mjs → email-DzyNVuoU.mjs} +100 -192
- package/dist/email-cloudflare-DfG6UEMm.mjs +1096 -0
- package/dist/email-protocol-D9nTvhCp.mjs +82 -0
- package/dist/{entry-CMAkqBmU.mjs → entry-ehmBvs5w.mjs} +2 -2
- package/dist/{env-DMA3cXZt.mjs → env-0jrMQJI_.mjs} +6 -14
- package/dist/{env-BxocywBB.mjs → env-BJjULvL0.mjs} +2 -2
- package/dist/{env-C74QepDE.mjs → env-Nx3yf50r.mjs} +9 -9
- package/dist/{env-public-DR7ZM6d-.d.mts → env-public-CCdykygU.d.mts} +6 -23
- package/dist/{env-raw-jZpP5n47.mjs → env-raw-D74P4ebM.mjs} +15 -21
- package/dist/{env-types-CwXgeMgL.mjs → env-types-DS2_y4X8.mjs} +2 -2
- package/dist/env-validation-BT7z-qpQ.mjs +1 -0
- package/dist/env-validation-DYxjz_Wo.mjs +488 -0
- package/dist/{gen-DtkQhvQg.mjs → gen-CufHEf42.mjs} +132 -254
- package/dist/gen-sXyp5DFO.mjs +1 -0
- package/dist/generate-ClI89brV.mjs +1 -0
- package/dist/{generate-GDbL7sUr.mjs → generate-Dat0UTry.mjs} +38 -4
- package/dist/generated-wrangler-config-DeWj5F9Y.mjs +18 -0
- package/dist/{github-cmd-DaDdBbSS.mjs → github-cmd-FU8EjFyU.mjs} +28 -72
- package/dist/{handler-BHAn2fZJ.mjs → handler-BZ1t7-Rv.mjs} +2 -2
- package/dist/{handler-CNAwjRcW.d.mts → handler-_PqY82xe.d.mts} +1 -1
- package/dist/{headers-DlfR78Nu.mjs → headers-Di1FsD3e.mjs} +26 -81
- package/dist/{help-0bTe_lID.mjs → help-BT2hovNI.mjs} +26 -14
- package/dist/help-i2YGGnTH.mjs +1 -0
- package/dist/{inbound-PfQDLXc5.mjs → inbound-BuTfm11U.mjs} +71 -222
- package/dist/{inbound-CH5Mksyy.d.mts → inbound-brj2-TM5.d.mts} +19 -58
- package/dist/index.d.mts +2 -18
- package/dist/index.mjs +714 -762
- package/dist/{info-PYWwkWyt.mjs → info-l249eUdH.mjs} +5 -5
- package/dist/{init-DaBGmaXC.mjs → init-D0A6M64Q.mjs} +229 -392
- package/dist/isr-config-fZaJJ8t7.mjs +165 -0
- package/dist/{link-C6fjafep.mjs → link-WMoJFf4i.mjs} +9 -9
- package/dist/{list-BTFBlqKl.mjs → list-CQ2EQEHL.mjs} +7 -18
- package/dist/{live-CgQuTpqD.mjs → live-BcHoTDFe.mjs} +19 -17
- package/dist/{live-Du8jXwOW.d.mts → live-DJONVlQK.d.mts} +1 -1
- package/dist/load-user-env-DD5qveNU.mjs +49 -0
- package/dist/{local-d1-ga5O_idV.mjs → local-d1-BxvQYEFi.mjs} +6 -6
- package/dist/{login-GKcNUmtI.mjs → login-C2T1oVG-.mjs} +12 -12
- package/dist/login-XD844Xs-.mjs +1 -0
- package/dist/{logs-BiMSULmc.mjs → logs-DnC1d7xB.mjs} +6 -6
- package/dist/{migrate-NLsjBbuM.mjs → migrate-BDIprOYd.mjs} +70 -22
- package/dist/migrate-BRwU-blY.mjs +1 -0
- package/dist/migration-handler-Cg0Y4EPu.mjs +470 -0
- package/dist/{migration-handler-DM4clYj5.d.mts → migration-handler-CwlEQUoo.d.mts} +17 -26
- package/dist/{mime-DxCznlJq.mjs → mime-srOklVVv.mjs} +92 -395
- package/dist/mysql-migration-sql-BIS5vbNk.mjs +241 -0
- package/dist/nitro.d.mts +30 -0
- package/dist/nitro.mjs +88 -0
- package/dist/{node-DJicPvPj.mjs → node-cPadMgUO.mjs} +9 -25
- package/dist/{operator-args-DOBhIaIg.mjs → operator-args-UnE8Y2eK.mjs} +27 -26
- package/dist/{operator-auth-BEZ_u0Cz.mjs → operator-auth-Cr2zCc-J.mjs} +2 -2
- package/dist/{operator-client-DbDv4vtE.mjs → operator-client-C-ROjk1I.mjs} +4 -4
- package/dist/operator-cmd-D6gnZsnK.mjs +1 -0
- package/dist/{operator-cmd-BT4hgavL.mjs → operator-cmd-DHieWtFp.mjs} +8 -8
- package/dist/{output-C50ag2r3.mjs → output-Ba6ZbrzY.mjs} +37 -6
- package/dist/{package-json-DXfiT1jV.mjs → package-json-BjYqR-So.mjs} +1 -1
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/client.mjs +91 -5
- package/dist/pages/head.mjs +1 -2
- package/dist/pages/index.d.mts +1 -2
- package/dist/pages/index.mjs +6 -6
- package/dist/pages/islands-plugin.mjs +5 -83
- package/dist/pages/prefetch.mjs +1 -2
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/pages/serialize.mjs +1 -2
- package/dist/plan-CKX_jWnD.mjs +1 -0
- package/dist/platform-args-B0HeTh0C.mjs +1 -0
- package/dist/{platform-args-DUeXY9Om.mjs → platform-args-CaCL_1Ch.mjs} +43 -60
- package/dist/{platform-auth-config-CkSx3usH.mjs → platform-auth-config-Z16-I8nT.mjs} +11 -12
- package/dist/{platform-auth-protection-BJimB_p9.mjs → platform-auth-protection-BXwZiJSF.mjs} +37 -27
- package/dist/{platform-auth-recovery-BU6izFAU.mjs → platform-auth-recovery-CXjfqyOv.mjs} +9 -10
- package/dist/{platform-cmd-BbY1dWiM.mjs → platform-cmd-DaAOiWTl.mjs} +16 -16
- package/dist/platform-cmd-PT4YwMLM.mjs +1 -0
- package/dist/{platform-discovery-DIYz8V63.mjs → platform-discovery-CHhNs8Nn.mjs} +1 -1
- package/dist/{platform-domain-CHVS6cV0.mjs → platform-domain-CxpvUeo0.mjs} +6 -6
- package/dist/{platform-lifecycle-DzCwqhFq.mjs → platform-lifecycle-DBiS0cJd.mjs} +1693 -2120
- package/dist/platform-lifecycle-u9pMOvxC.mjs +1 -0
- package/dist/{platform-management-CuuVDhyt.mjs → platform-management-DhEFdQAf.mjs} +696 -130
- package/dist/platform-management-DvBS83rC.mjs +1 -0
- package/dist/{platform-plans-config-CN-heS4q.mjs → platform-plans-config-BWn1S2Rv.mjs} +16 -12
- package/dist/{platform-recovery-CskSJgLh.mjs → platform-recovery-BUGOB4RC.mjs} +6 -9
- package/dist/{platform-registry-Cjv2Qf0r.mjs → platform-registry-B9mWX9LO.mjs} +13 -18
- package/dist/{platform-setup-BBxRxmFC.mjs → platform-setup-YvN9VQXV.mjs} +21 -28
- package/dist/{plugin-inference-BlQbOL0P.mjs → plugin-inference-DsARdQKE.mjs} +18 -33
- package/dist/prepare-CYT6tAzD.mjs +1 -0
- package/dist/{prepare-Do96654b.mjs → prepare-DEB5SeVJ.mjs} +12 -13
- package/dist/{prepare-Dq9hTIbo.mjs → prepare-PQCgsny0.mjs} +4 -4
- package/dist/{prerender-render-Ct20jftc.mjs → prerender-render-Bfsumdkv.mjs} +8 -2
- package/dist/prerender-render.d.mts +2 -0
- package/dist/prerender-render.mjs +1 -2
- package/dist/{project-cmd-DaoRrn-8.mjs → project-cmd-DVatD8Ev.mjs} +20 -20
- package/dist/{project-paths-GgcMozYz.mjs → project-paths-DMvEeSau.mjs} +9 -14
- package/dist/{project-BAm2aB6Q.mjs → project-rqDnVsJN.mjs} +8 -4
- package/dist/project-slug-6cyz8E7k.mjs +1 -0
- package/dist/{project-team-Q_lCA7Io.mjs → project-team-DJrWEAG1.mjs} +7 -7
- package/dist/{project-token-BArgK9o1.mjs → project-token-CBgLBuL6.mjs} +6 -6
- package/dist/{project-tsconfig-CVJhNMxs.mjs → project-tsconfig-bveqhlYA.mjs} +3 -5
- package/dist/project-zdB3fs9G.mjs +1 -0
- package/dist/{project-zero-trust-KO9Hu2Pq.mjs → project-zero-trust-92gLtZ25.mjs} +6 -6
- package/dist/{protocol-BPZaNqBo.d.mts → protocol-4H7V_3Os.d.mts} +1 -1
- package/dist/{protocol-CfaUwNs8.mjs → protocol-RNP0u7UY.mjs} +9 -3
- package/dist/{provision-BfaLiWbj.mjs → provision-BnSSkiED.mjs} +119 -866
- package/dist/{requests-C7Oeoh5u.mjs → requests-7W1Pygt2.mjs} +5 -5
- package/dist/resolve-project-PnhzMtY6.mjs +1 -0
- package/dist/resolve-project-WpwkCB_c.mjs +48 -0
- package/dist/{rollback-DVAtrLAl.mjs → rollback-BcASVnwP.mjs} +8 -18
- package/dist/{route-types-CbtsIeFn.mjs → route-types-BZi26DVS.mjs} +9 -91
- package/dist/routing-assets-VkrKIbxE.mjs +139 -0
- package/dist/{runner-DMBKSrRk.mjs → runner-CabsQ-iM.mjs} +22 -34
- package/dist/runner-So9mYfcm.mjs +1 -0
- package/dist/runner-mysql-BhRaONkO.mjs +146 -0
- package/dist/runner-mysql-DWwE8jKi.mjs +1 -0
- package/dist/{runner-pg-DV8p_zjA.mjs → runner-pg-BRemq_GX.mjs} +3 -3
- package/dist/runner-pg-_Xncr3H5.mjs +1 -0
- package/dist/runtime/ai.mjs +23 -25
- package/dist/runtime/auth-client-react.mjs +1 -2
- package/dist/runtime/auth-client-solid.mjs +1 -2
- package/dist/runtime/auth-client-svelte.mjs +1 -2
- package/dist/runtime/auth-client-vue.mjs +1 -2
- package/dist/runtime/auth-client.mjs +1 -2
- package/dist/runtime/auth.mjs +1 -2
- package/dist/runtime/better-auth-mysql.d.mts +2 -5
- package/dist/runtime/better-auth-mysql.mjs +9 -31
- package/dist/runtime/better-auth-pg.d.mts +2 -5
- package/dist/runtime/better-auth-pg.mjs +6 -32
- package/dist/runtime/better-auth.d.mts +2 -4
- package/dist/runtime/better-auth.mjs +9 -19
- package/dist/runtime/db.mjs +6 -2
- package/dist/runtime/durable.d.mts +18 -1
- package/dist/runtime/durable.mjs +26 -2
- package/dist/runtime/email/testing.d.mts +1 -1
- package/dist/runtime/email/testing.mjs +9 -23
- package/dist/runtime/email-protocol.d.mts +12 -0
- package/dist/runtime/email-protocol.mjs +1 -70
- package/dist/runtime/email.d.mts +1 -1
- package/dist/runtime/email.mjs +79 -221
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/env-public.mjs +12 -38
- package/dist/runtime/env.d.mts +1 -12
- package/dist/runtime/env.mjs +1 -2
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +1 -1
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/kv.mjs +1 -1
- package/dist/runtime/limits.mjs +1 -2
- package/dist/runtime/live-client.d.mts +3 -2
- package/dist/runtime/live-server.d.mts +2 -1
- package/dist/runtime/live-server.mjs +1 -16
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/live.mjs +1 -2
- package/dist/runtime/log.d.mts +2 -1
- package/dist/runtime/migration-handler-mysql.d.mts +2 -2
- package/dist/runtime/migration-handler-mysql.mjs +39 -8
- package/dist/runtime/migration-handler-pg.d.mts +2 -2
- package/dist/runtime/migration-handler-pg.mjs +1 -1
- package/dist/runtime/migration-handler.d.mts +2 -2
- package/dist/runtime/migration-handler.mjs +1 -470
- package/dist/runtime/queues.mjs +1 -1
- package/dist/runtime/remote/binding-handler.mjs +62 -62
- package/dist/runtime/remote/index.mjs +16 -77
- package/dist/runtime/response.mjs +1 -2
- package/dist/runtime/route-url.mjs +1 -2
- package/dist/runtime/routing.d.mts +3 -5
- package/dist/runtime/routing.mjs +82 -218
- package/dist/runtime/sandbox-container.d.mts +2 -2
- package/dist/runtime/sandbox-container.mjs +1 -2
- package/dist/runtime/sandbox.d.mts +2 -2
- package/dist/runtime/sandbox.mjs +13 -6
- package/dist/runtime/seed.d.mts +2 -1
- package/dist/runtime/sse.mjs +1 -2
- package/dist/runtime/storage.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/validator.mjs +1 -2
- package/dist/runtime/ws-server.d.mts +4 -4
- package/dist/runtime/ws-server.mjs +6 -28
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{sandbox-container-Bo0eiFKz.d.mts → sandbox-container-ChQRum-j.d.mts} +3 -1
- package/dist/{sandbox-container-C6ItmVuN.mjs → sandbox-container-a9LRUtii.mjs} +13 -2
- package/dist/{sandbox-C5LFoJMf.d.mts → sandbox-q3waMc2T.d.mts} +1 -1
- package/dist/{scan-C3uDzz6J.mjs → scan-C0BMdmEd.mjs} +84 -7
- package/dist/{secret-BvtB7IjY.mjs → secret-bg73f1Ge.mjs} +63 -81
- package/dist/{serialize-BPvnNQuA.mjs → serialize-BtQyaYoC.mjs} +10 -4
- package/dist/{skills-BgVMvQdy.mjs → skills-C_yRTg0g.mjs} +3 -3
- package/dist/{subcommand-prompt-BSlnD1fI.mjs → subcommand-prompt-Bm3ZlYgA.mjs} +39 -44
- package/dist/sveltekit.d.mts +2 -1
- package/dist/sveltekit.mjs +1 -1
- package/dist/validate-BQFdf0Pi.mjs +1 -0
- package/dist/{validate-C9qJArv7.mjs → validate-CheZGRE7.mjs} +4 -8
- package/dist/version-metadata-DIrqEHQo.mjs +73 -0
- package/dist/{wrangler-D9KTuqnv.mjs → wrangler-BYs07Rxy.mjs} +119 -378
- package/dist/wrapper-CwhpNWtH.mjs +663 -0
- package/dist/{ws-CChrrAU-.d.mts → ws-aKVYB-fA.d.mts} +1 -1
- package/dist/yarn-pnp-DLbEFMT0.mjs +92 -0
- package/docs/guide/ai.md +8 -2
- package/docs/guide/auth.md +2 -0
- package/docs/guide/database/mysql.md +14 -3
- package/docs/guide/database/postgresql.md +2 -0
- package/docs/guide/database.md +3 -5
- package/docs/guide/durable-state.md +32 -4
- package/docs/guide/platform/administration/access.md +4 -0
- package/docs/guide/platform/administration/connected-apps.md +55 -0
- package/docs/guide/platform/installation/credentials.md +21 -3
- package/docs/guide/platform/installation/domains.md +1 -1
- package/docs/guide/platform/installation/maintenance.md +38 -1
- package/docs/guide/platform/installation/prerequisites.md +6 -2
- package/docs/guide/platform/installation/setup.md +23 -1
- package/docs/guide/platform/installation/uninstall.md +6 -1
- package/docs/guide/quickstart.md +2 -0
- package/docs/guide/sandboxes.md +3 -1
- package/docs/guide/self-hosted-platform.md +1 -1
- package/docs/integrations/cloudflare.md +2 -2
- package/docs/integrations/frameworks/analog.md +3 -11
- package/docs/integrations/frameworks/nuxt.md +7 -10
- package/docs/integrations/nodejs-bun-deno.md +2 -0
- package/docs/reference/api/deploy.md +23 -0
- package/docs/reference/api/pages.md +2 -0
- package/docs/reference/api.md +3 -1
- package/docs/reference/cli/database.md +9 -3
- package/docs/reference/cli/platform-installation.md +19 -7
- package/docs/reference/cli/setup.md +2 -0
- package/docs/reference/config.md +2 -0
- package/package.json +39 -36
- package/sandbox.Dockerfile +1 -1
- package/skills/void/SKILL.md +2 -1
- package/dist/auth-LMJcNESe.mjs +0 -2
- package/dist/cf-build-output-H9a97vME.mjs +0 -2
- package/dist/cf-user-agent-lKblH3zU.mjs +0 -17
- package/dist/client-tso2OfcG.mjs +0 -2
- package/dist/cloudflare-operations-BlYLlowZ.mjs +0 -2
- package/dist/collect-DLyFDiKW.mjs +0 -2
- package/dist/config-5r-YpMC-.mjs +0 -2
- package/dist/config-B_ggY-IO.mjs +0 -89
- package/dist/config-BtSFvXZx.mjs +0 -2
- package/dist/config-write-AHGesphx.mjs +0 -61
- package/dist/create-project-qFDC45zg.mjs +0 -2
- package/dist/deploy-Bqe1PYBw.mjs +0 -10458
- package/dist/deploy-VsWsVQkw.mjs +0 -2
- package/dist/dev-inbox-CK-UuPob.mjs +0 -297
- package/dist/discover-EDUf6JJw.mjs +0 -2
- package/dist/dist-Bx1z6Eva.mjs +0 -2
- package/dist/dist-_UUlL6bg.mjs +0 -2
- package/dist/env-validation-CrVNjsPm.mjs +0 -2
- package/dist/env-validation-Dxdx_5wo.mjs +0 -951
- package/dist/gen-dA9hW7AV.mjs +0 -2
- package/dist/head-client-DzmJGN4C.mjs +0 -90
- package/dist/help-DfQYVfGY.mjs +0 -2
- package/dist/login-mx_ydhmp.mjs +0 -2
- package/dist/migrate-BHp07yJE.mjs +0 -2
- package/dist/operator-cmd-CwBB-1yb.mjs +0 -2
- package/dist/pages/head-client.d.mts +0 -13
- package/dist/pages/head-client.mjs +0 -2
- package/dist/plan-CH2G51je.mjs +0 -2
- package/dist/platform-args-D4E1PjVw.mjs +0 -2
- package/dist/platform-cmd-BbmJiq5O.mjs +0 -2
- package/dist/platform-lifecycle-ByAlpkhV.mjs +0 -2
- package/dist/platform-management-CBOT4BSM.mjs +0 -2
- package/dist/prepare-DRUV-g3X.mjs +0 -2
- package/dist/project-DedqCp59.mjs +0 -2
- package/dist/project-slug-DofjTFd-.mjs +0 -2
- package/dist/provision-Wu9ZBk9L.mjs +0 -2
- package/dist/resolve-project-BIeYs9Cw.mjs +0 -2
- package/dist/resolve-project-CP8rZs_p.mjs +0 -28
- package/dist/runner-9wjsSZx-.mjs +0 -2
- package/dist/runner-mysql-CEzKtmFb.mjs +0 -54
- package/dist/runner-mysql-CkFqZ6CE.mjs +0 -2
- package/dist/runner-pg-BGYRFdRp.mjs +0 -2
- package/dist/runtime/env-helpers.d.mts +0 -2
- package/dist/runtime/env-helpers.mjs +0 -2
- package/dist/validate-BJr9LfXy.mjs +0 -2
- package/dist/yarn-pnp-CUX_iTPA.mjs +0 -188
|
@@ -0,0 +1,663 @@
|
|
|
1
|
+
import { a as join, l as toSlash, n as dirname, r as extname } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-DMvEeSau.mjs";
|
|
3
|
+
import { d as readConfig, s as getDatabaseDialect } from "./config-Bx_1SpnO.mjs";
|
|
4
|
+
import { n as isIdentifier, r as isLiteral } from "./ast-CPGPjb0V.mjs";
|
|
5
|
+
import { t as MagicString } from "./dist-Cegxq8gs.mjs";
|
|
6
|
+
import { r as voidDbBundlerPlugin, t as generateQueueResolverSource } from "./dispatch-DrTTk8Xg.mjs";
|
|
7
|
+
import { createRequire } from "node:module";
|
|
8
|
+
import { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
9
|
+
import { fileURLToPath } from "node:url";
|
|
10
|
+
import { build, parseSync } from "vite";
|
|
11
|
+
import { createHash } from "node:crypto";
|
|
12
|
+
//#region src/cli/worker-require-transform.ts
|
|
13
|
+
function nodes(root) {
|
|
14
|
+
const found = [];
|
|
15
|
+
const pending = [root];
|
|
16
|
+
while (pending.length > 0) {
|
|
17
|
+
const node = pending.pop();
|
|
18
|
+
found.push(node);
|
|
19
|
+
for (const value of Object.values(node)) if (Array.isArray(value)) {
|
|
20
|
+
for (const child of value) if (child && typeof child === "object" && typeof child.type === "string") pending.push(child);
|
|
21
|
+
} else if (value && typeof value === "object" && typeof value.type === "string") pending.push(value);
|
|
22
|
+
}
|
|
23
|
+
return found;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Replace the `createRequire(import.meta.url)` binding that the bundler emits for CommonJS
|
|
27
|
+
* database drivers with `requireShim`, which serves Node built-ins from static imports.
|
|
28
|
+
* workerd gives modules no `import.meta.url`, so the original binding fails at startup.
|
|
29
|
+
* PostgreSQL bundles also replace `pgpass`, which reads the filesystem.
|
|
30
|
+
*/
|
|
31
|
+
function transformWorkerRequireBundle(code, filename, requireShim, database) {
|
|
32
|
+
if (!code.includes("createRequire") && !code.includes("pgpass")) return code;
|
|
33
|
+
const program = parseSync(filename, code).program;
|
|
34
|
+
const edits = [];
|
|
35
|
+
let hasRequireBinding = false;
|
|
36
|
+
let pgpassCalls = 0;
|
|
37
|
+
for (const statement of program.body ?? []) {
|
|
38
|
+
if (statement.type === "ImportDeclaration" && statement.source?.value === "node:module") {
|
|
39
|
+
const specifiers = statement.specifiers;
|
|
40
|
+
if (specifiers?.length !== 1 || !isIdentifier(specifiers[0]?.imported) || specifiers[0].imported.name !== "createRequire") throw new Error(`deploy: Unsupported node:module import in ${database} bundle ${filename}.`);
|
|
41
|
+
edits.push({
|
|
42
|
+
start: statement.start,
|
|
43
|
+
end: statement.end,
|
|
44
|
+
replacement: ""
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
if (statement.type === "VariableDeclaration") {
|
|
48
|
+
const declarations = statement.declarations;
|
|
49
|
+
if (declarations?.some((declaration) => isIdentifier(declaration.id) && declaration.id.name === "__require")) {
|
|
50
|
+
if (declarations.length !== 1 || hasRequireBinding) throw new Error(`deploy: Unsupported require binding in ${database} bundle ${filename}.`);
|
|
51
|
+
hasRequireBinding = true;
|
|
52
|
+
edits.push({
|
|
53
|
+
start: statement.start,
|
|
54
|
+
end: statement.end,
|
|
55
|
+
replacement: requireShim
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
for (const node of nodes(program)) {
|
|
61
|
+
if (node.type !== "CallExpression" || !isIdentifier(node.callee) || node.callee.name !== "__require") continue;
|
|
62
|
+
const args = node.arguments;
|
|
63
|
+
if (args?.length !== 1 || !isLiteral(args[0]) || args[0].value !== "pgpass") continue;
|
|
64
|
+
pgpassCalls++;
|
|
65
|
+
edits.push({
|
|
66
|
+
start: node.start,
|
|
67
|
+
end: node.end,
|
|
68
|
+
replacement: "__voidPgpassNoop"
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
if (code.includes("createRequire") && !hasRequireBinding) throw new Error(`deploy: Could not locate the generated require binding in ${database} bundle ${filename}.`);
|
|
72
|
+
if (code.includes("pgpass") && pgpassCalls === 0 && code.includes("__require")) throw new Error(`deploy: Could not locate the pgpass require in ${database} bundle ${filename}.`);
|
|
73
|
+
const ms = new MagicString(code);
|
|
74
|
+
for (const edit of edits.sort((a, b) => b.start - a.start)) ms.overwrite(edit.start, edit.end, edit.replacement);
|
|
75
|
+
const transformed = ms.toString();
|
|
76
|
+
if (transformed.includes("createRequire") || transformed.includes("__require(\"pgpass\")")) throw new Error(`deploy: ${database} bundle ${filename} still contains an unsupported require.`);
|
|
77
|
+
return pgpassCalls > 0 ? `const __voidPgpassNoop = Object.assign(function pgpass(_connectionInfo, callback) { callback(undefined); }, { warnTo() {} });\n${transformed}` : transformed;
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/cli/wrapper.ts
|
|
81
|
+
const BUNDLED_ENTRY_RE = /^index\.(?:m?js|cjs)$/;
|
|
82
|
+
const envModuleFile = fileURLToPath(import.meta.resolve("#self/_env"));
|
|
83
|
+
const WRAPPER_MARKER = "// Generated by Void: deployment wrapper.";
|
|
84
|
+
function isGeneratedWrapper(source, originalName) {
|
|
85
|
+
return source.startsWith(WRAPPER_MARKER) || source.startsWith(`import original from "./${originalName}";\n`);
|
|
86
|
+
}
|
|
87
|
+
function selectBundledEntryFilename(outFiles) {
|
|
88
|
+
const entryFilename = outFiles.find((file) => BUNDLED_ENTRY_RE.test(file));
|
|
89
|
+
if (!entryFilename) throw new Error(`deploy: Bundled worker entry not found. Expected index.js, index.mjs, or index.cjs in bundle output. Found: ${outFiles.join(", ") || "(none)"}`);
|
|
90
|
+
return entryFilename;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Determine whether a wrapper is needed based on the features.
|
|
94
|
+
*/
|
|
95
|
+
function needsWrapper(features) {
|
|
96
|
+
return features.crons.length > 0 || features.queues.length > 0 || !!features.hasMigrations || !!features.readiness || !!features.isr;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Generate a wrapper entry in-place in the worker directory.
|
|
100
|
+
*
|
|
101
|
+
* - Preserves the original entry (e.g. `index.js` → `__original.js`)
|
|
102
|
+
* - Compiles cron/queue handlers via a small Vite build
|
|
103
|
+
* - Writes a wrapper module as the original entry name that imports
|
|
104
|
+
* the renamed original + compiled handlers
|
|
105
|
+
*
|
|
106
|
+
* The original worker code is never re-bundled.
|
|
107
|
+
*/
|
|
108
|
+
async function generateWrapper(workerDir, workerMain, root, features) {
|
|
109
|
+
const renamedName = `__original${extname(workerMain) || ".js"}`;
|
|
110
|
+
const mainPath = join(workerDir, workerMain);
|
|
111
|
+
const originalPath = join(workerDir, renamedName);
|
|
112
|
+
const alreadyWrapped = isGeneratedWrapper(readFileSync(mainPath, "utf8"), renamedName);
|
|
113
|
+
if (alreadyWrapped && (!existsSync(originalPath) || isGeneratedWrapper(readFileSync(originalPath, "utf8"), renamedName))) throw new Error("deploy: Original framework entry is missing or already wrapped. Rebuild the application before deploying.");
|
|
114
|
+
let handlerFilename = "__void_handlers.mjs";
|
|
115
|
+
if (features.crons.length > 0 || features.queues.length > 0) {
|
|
116
|
+
const tmpDir = join(root, ".void", "handlers");
|
|
117
|
+
mkdirSync(tmpDir, { recursive: true });
|
|
118
|
+
const config = readConfig(root);
|
|
119
|
+
const handlersSource = generateHandlersSource(root, features, getDatabaseDialect(config));
|
|
120
|
+
const handlersEntry = join(tmpDir, "handlers.ts");
|
|
121
|
+
writeFileSync(handlersEntry, handlersSource);
|
|
122
|
+
const outDir = join(tmpDir, "out");
|
|
123
|
+
await build({
|
|
124
|
+
root: tmpDir,
|
|
125
|
+
logLevel: "silent",
|
|
126
|
+
plugins: [voidDbBundlerPlugin(root, {
|
|
127
|
+
config,
|
|
128
|
+
sqlDriver: (dialect, entry) => bundleWorkerSqlDriver(dialect, entry, join(tmpDir, "sql-driver"))
|
|
129
|
+
})],
|
|
130
|
+
resolve: { alias: [{
|
|
131
|
+
find: /^void$/,
|
|
132
|
+
replacement: fileURLToPath(import.meta.resolve("void/handler"))
|
|
133
|
+
}] },
|
|
134
|
+
build: {
|
|
135
|
+
outDir,
|
|
136
|
+
emptyOutDir: true,
|
|
137
|
+
lib: {
|
|
138
|
+
entry: handlersEntry,
|
|
139
|
+
formats: ["es"],
|
|
140
|
+
fileName: "__void_handlers"
|
|
141
|
+
},
|
|
142
|
+
rollupOptions: { external: [/^cloudflare:/, /^node:/] },
|
|
143
|
+
minify: false,
|
|
144
|
+
target: "esnext"
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
handlerFilename = readdirSync(outDir).filter((f) => f.startsWith("__void_handlers"))[0] ?? "__void_handlers.mjs";
|
|
148
|
+
copyFileSync(join(outDir, handlerFilename), join(workerDir, handlerFilename));
|
|
149
|
+
}
|
|
150
|
+
let migrations;
|
|
151
|
+
let migrationPlanBundle;
|
|
152
|
+
if (features.hasMigrations) {
|
|
153
|
+
const { collectMigrations } = await import("./collect-Cae8A7Zr.mjs");
|
|
154
|
+
const { buildMigrationPlanBundle } = await import("./plan-CKX_jWnD.mjs");
|
|
155
|
+
const migrationsDir = readProjectPaths(root).migrationsDir;
|
|
156
|
+
migrations = collectMigrations(migrationsDir);
|
|
157
|
+
migrationPlanBundle = features.migrationDialect === "sqlite" ? buildMigrationPlanBundle(migrations) : void 0;
|
|
158
|
+
const handlerName = features.migrationDialect === "postgresql" ? "migration-handler-pg" : features.migrationDialect === "mysql" ? "migration-handler-mysql" : "migration-handler";
|
|
159
|
+
const handlerFilename_ = `${handlerName}.mjs`;
|
|
160
|
+
let handlerPath = join(import.meta.dirname, "..", "runtime", `${handlerName}.ts`);
|
|
161
|
+
if (!existsSync(handlerPath)) handlerPath = join(import.meta.dirname, "runtime", handlerFilename_);
|
|
162
|
+
if (!existsSync(handlerPath)) handlerPath = join(import.meta.dirname, "..", "runtime", handlerFilename_);
|
|
163
|
+
if (!existsSync(handlerPath)) throw new Error(`Migration handler not found: ${handlerFilename_}. Run "pnpm -C packages/void build" first.`);
|
|
164
|
+
await bundleMigrationHandler(root, workerDir, handlerPath, features.migrationDialect ?? "sqlite");
|
|
165
|
+
}
|
|
166
|
+
if (features.isr) await bundleFrameworkIsr(root, workerDir);
|
|
167
|
+
const wrapperSource = generateWrapperSource(renamedName, handlerFilename, features, migrations, migrationPlanBundle);
|
|
168
|
+
const stagedPath = `${mainPath}.${crypto.randomUUID()}.tmp`;
|
|
169
|
+
try {
|
|
170
|
+
writeFileSync(stagedPath, wrapperSource);
|
|
171
|
+
if (!alreadyWrapped) copyFileSync(mainPath, originalPath);
|
|
172
|
+
renameSync(stagedPath, mainPath);
|
|
173
|
+
} finally {
|
|
174
|
+
rmSync(stagedPath, { force: true });
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
async function bundleFrameworkIsr(root, workerDir) {
|
|
178
|
+
const entry = fileURLToPath(import.meta.resolve("@void/isr/runtime"));
|
|
179
|
+
const tmpDir = join(root, ".void", "isr");
|
|
180
|
+
const outDir = join(tmpDir, "out");
|
|
181
|
+
mkdirSync(tmpDir, { recursive: true });
|
|
182
|
+
await build({
|
|
183
|
+
root: tmpDir,
|
|
184
|
+
logLevel: "silent",
|
|
185
|
+
ssr: { noExternal: true },
|
|
186
|
+
build: {
|
|
187
|
+
outDir,
|
|
188
|
+
emptyOutDir: true,
|
|
189
|
+
minify: false,
|
|
190
|
+
ssr: entry,
|
|
191
|
+
target: "esnext",
|
|
192
|
+
rollupOptions: {
|
|
193
|
+
input: entry,
|
|
194
|
+
external: [/^cloudflare:/, /^node:/],
|
|
195
|
+
output: {
|
|
196
|
+
entryFileNames: "__void_isr.mjs",
|
|
197
|
+
chunkFileNames: "__void_isr-[hash].mjs"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
for (const file of readdirSync(outDir)) copyFileSync(join(outDir, file), join(workerDir, file));
|
|
203
|
+
}
|
|
204
|
+
async function bundleMigrationHandler(root, workerDir, handlerPath, dialect) {
|
|
205
|
+
const tmpDir = join(root, ".void", "migration-handler");
|
|
206
|
+
mkdirSync(tmpDir, { recursive: true });
|
|
207
|
+
const outDir = join(tmpDir, "out");
|
|
208
|
+
const isPostgresql = dialect === "postgresql";
|
|
209
|
+
const isMysql = dialect === "mysql";
|
|
210
|
+
await build({
|
|
211
|
+
root: tmpDir,
|
|
212
|
+
logLevel: "silent",
|
|
213
|
+
resolve: isPostgresql ? {
|
|
214
|
+
alias: pgWorkerAliases(handlerPath),
|
|
215
|
+
conditions: WORKER_CONDITIONS
|
|
216
|
+
} : void 0,
|
|
217
|
+
ssr: {
|
|
218
|
+
noExternal: true,
|
|
219
|
+
...isPostgresql && { resolve: { conditions: WORKER_CONDITIONS } }
|
|
220
|
+
},
|
|
221
|
+
build: {
|
|
222
|
+
outDir,
|
|
223
|
+
emptyOutDir: true,
|
|
224
|
+
minify: false,
|
|
225
|
+
ssr: handlerPath,
|
|
226
|
+
target: "esnext",
|
|
227
|
+
rollupOptions: {
|
|
228
|
+
input: handlerPath,
|
|
229
|
+
external: SQL_WORKER_EXTERNAL,
|
|
230
|
+
output: {
|
|
231
|
+
entryFileNames: "__void_migration_handler.mjs",
|
|
232
|
+
chunkFileNames: "__void_migration_handler-[hash].mjs"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
if (isPostgresql || isMysql) patchWorkerRequireBundle(outDir, isPostgresql ? "PostgreSQL" : "MySQL", "migration bundle");
|
|
238
|
+
for (const file of readdirSync(outDir)) copyFileSync(join(outDir, file), join(workerDir, file));
|
|
239
|
+
}
|
|
240
|
+
const WORKER_CONDITIONS = [
|
|
241
|
+
"workerd",
|
|
242
|
+
"worker",
|
|
243
|
+
"browser",
|
|
244
|
+
"module",
|
|
245
|
+
"import",
|
|
246
|
+
"default"
|
|
247
|
+
];
|
|
248
|
+
const SQL_WORKER_EXTERNAL = [
|
|
249
|
+
/^cloudflare:/,
|
|
250
|
+
/^node:/,
|
|
251
|
+
/^pgpass$/
|
|
252
|
+
];
|
|
253
|
+
/** pg's workerd socket and its CommonJS pool, resolved from the pg that `fromPath` loads. */
|
|
254
|
+
function pgWorkerAliases(fromPath) {
|
|
255
|
+
return {
|
|
256
|
+
"pg-cloudflare": resolvePgCloudflareWorkerdEntry(fromPath),
|
|
257
|
+
"pg-pool": resolvePgCjsDependency(fromPath, "pg-pool")
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Build the PostgreSQL or MySQL driver whose entry file is `main` as an ES module for workerd,
|
|
262
|
+
* the way the migration handler bundles Void's own, and return its path. Bundlers that do not run
|
|
263
|
+
* voidPlugin() import this module for `pg` or `mysql2`: their CommonJS handling breaks the
|
|
264
|
+
* drivers in workerd. Each driver copy gets its own folder in `baseDir`. The same build gives
|
|
265
|
+
* mysql2's `mysql2/promise` API as `promise.mjs` next to it, so both share one copy of the driver.
|
|
266
|
+
*/
|
|
267
|
+
async function bundleWorkerSqlDriver(dialect, main, baseDir) {
|
|
268
|
+
const packageName = dialect === "postgresql" ? "pg" : "mysql2";
|
|
269
|
+
const outDir = join(baseDir, createHash("sha256").update(main).digest("hex").slice(0, 12));
|
|
270
|
+
mkdirSync(outDir, { recursive: true });
|
|
271
|
+
const input = { [packageName]: writeDriverEntry(join(outDir, "entry.mjs"), main) };
|
|
272
|
+
const promise = dialect === "mysql" ? resolveMysqlPromise(main) : void 0;
|
|
273
|
+
if (promise !== void 0) input.promise = writeDriverEntry(join(outDir, "promise-entry.mjs"), promise);
|
|
274
|
+
const bundleDir = join(outDir, "out");
|
|
275
|
+
await build({
|
|
276
|
+
root: outDir,
|
|
277
|
+
logLevel: "silent",
|
|
278
|
+
resolve: {
|
|
279
|
+
alias: dialect === "postgresql" ? pgWorkerAliases(main) : {},
|
|
280
|
+
conditions: WORKER_CONDITIONS
|
|
281
|
+
},
|
|
282
|
+
ssr: {
|
|
283
|
+
noExternal: true,
|
|
284
|
+
resolve: { conditions: WORKER_CONDITIONS }
|
|
285
|
+
},
|
|
286
|
+
build: {
|
|
287
|
+
outDir: bundleDir,
|
|
288
|
+
emptyOutDir: true,
|
|
289
|
+
minify: false,
|
|
290
|
+
ssr: true,
|
|
291
|
+
target: "esnext",
|
|
292
|
+
rollupOptions: {
|
|
293
|
+
input,
|
|
294
|
+
external: SQL_WORKER_EXTERNAL,
|
|
295
|
+
output: {
|
|
296
|
+
entryFileNames: "[name].mjs",
|
|
297
|
+
chunkFileNames: `${packageName}-[hash].mjs`
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
patchWorkerRequireBundle(bundleDir, dialect === "postgresql" ? "PostgreSQL" : "MySQL", "driver bundle");
|
|
303
|
+
return join(bundleDir, `${packageName}.mjs`);
|
|
304
|
+
}
|
|
305
|
+
/** Write an ES module at `entry` that exports the CommonJS module `file`, and return `entry`. */
|
|
306
|
+
function writeDriverEntry(entry, file) {
|
|
307
|
+
const names = Object.keys(createRequire(file)(file)).filter((name) => name !== "default" && /^[A-Za-z_$][\w$]*$/.test(name));
|
|
308
|
+
writeFileSync(entry, `import driver from ${JSON.stringify(toSlash(file))};\nexport default driver;\nexport const { ${names.join(", ")} } = driver;\n`);
|
|
309
|
+
return entry;
|
|
310
|
+
}
|
|
311
|
+
/** The `mysql2/promise` file of the mysql2 copy whose entry file is `main`, if it has one. */
|
|
312
|
+
function resolveMysqlPromise(main) {
|
|
313
|
+
try {
|
|
314
|
+
return createRequire(main).resolve("mysql2/promise");
|
|
315
|
+
} catch {
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
/** `bundle` names the bundle in the error a failed require throws. */
|
|
320
|
+
function patchWorkerRequireBundle(outDir, database, bundle) {
|
|
321
|
+
for (const file of readdirSync(outDir)) {
|
|
322
|
+
if (!file.endsWith(".mjs") && !file.endsWith(".js")) continue;
|
|
323
|
+
const path = join(outDir, file);
|
|
324
|
+
const code = readFileSync(path, "utf-8");
|
|
325
|
+
const transformed = transformWorkerRequireBundle(code, file, database === "PostgreSQL" ? pgWorkerRequireShim(bundle) : mysqlWorkerRequireShim(bundle), database);
|
|
326
|
+
if (transformed !== code) writeFileSync(path, transformed);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
function createPgPackageRequire(fromPath) {
|
|
330
|
+
const fromRequire = createRequire(fromPath);
|
|
331
|
+
return createRequire(fromRequire.resolve("pg/package.json"));
|
|
332
|
+
}
|
|
333
|
+
function resolvePgCjsDependency(fromPath, specifier) {
|
|
334
|
+
return createPgPackageRequire(fromPath).resolve(specifier);
|
|
335
|
+
}
|
|
336
|
+
function resolvePgCloudflareWorkerdEntry(fromPath) {
|
|
337
|
+
const packageJsonPath = createPgPackageRequire(fromPath).resolve("pg-cloudflare/package.json");
|
|
338
|
+
return join(dirname(packageJsonPath), "dist", "index.js");
|
|
339
|
+
}
|
|
340
|
+
function pgWorkerRequireShim(bundle) {
|
|
341
|
+
return [
|
|
342
|
+
"import * as __voidNodeCrypto from \"node:crypto\";",
|
|
343
|
+
"import * as __voidNodeDns from \"node:dns\";",
|
|
344
|
+
"import * as __voidNodeEvents from \"node:events\";",
|
|
345
|
+
"import * as __voidNodeNet from \"node:net\";",
|
|
346
|
+
"import * as __voidNodeTls from \"node:tls\";",
|
|
347
|
+
"import * as __voidNodeUtil from \"node:util\";",
|
|
348
|
+
"import * as __voidNodeUtilTypes from \"node:util/types\";",
|
|
349
|
+
"var __voidNodeRequireModules = {",
|
|
350
|
+
" crypto: __voidNodeCrypto,",
|
|
351
|
+
" dns: __voidNodeDns,",
|
|
352
|
+
" events: __voidNodeEvents,",
|
|
353
|
+
" net: __voidNodeNet,",
|
|
354
|
+
" tls: __voidNodeTls,",
|
|
355
|
+
" util: __voidNodeUtil,",
|
|
356
|
+
" \"util/types\": __voidNodeUtilTypes,",
|
|
357
|
+
"};",
|
|
358
|
+
"var __require = (id) => {",
|
|
359
|
+
" if (id.startsWith(\"node:\")) id = id.slice(5);",
|
|
360
|
+
" const mod = __voidNodeRequireModules[id];",
|
|
361
|
+
" if (mod) return mod;",
|
|
362
|
+
` throw new Error(\`Unsupported require("\${id}") in Void PG ${bundle}\`);`,
|
|
363
|
+
"};"
|
|
364
|
+
].join("\n");
|
|
365
|
+
}
|
|
366
|
+
function mysqlWorkerRequireShim(bundle) {
|
|
367
|
+
return [
|
|
368
|
+
"import __voidNodeBuffer from \"node:buffer\";",
|
|
369
|
+
"import __voidNodeCrypto from \"node:crypto\";",
|
|
370
|
+
"import __voidNodeDiagnosticsChannel from \"node:diagnostics_channel\";",
|
|
371
|
+
"import __voidNodeEvents from \"node:events\";",
|
|
372
|
+
"import __voidNodeNet from \"node:net\";",
|
|
373
|
+
"import __voidNodeProcess from \"node:process\";",
|
|
374
|
+
"import __voidNodeStream from \"node:stream\";",
|
|
375
|
+
"import __voidNodeStringDecoder from \"node:string_decoder\";",
|
|
376
|
+
"import __voidNodeTimers from \"node:timers\";",
|
|
377
|
+
"import __voidNodeTls from \"node:tls\";",
|
|
378
|
+
"import __voidNodeUrl from \"node:url\";",
|
|
379
|
+
"import __voidNodeUtil from \"node:util\";",
|
|
380
|
+
"import __voidNodeZlib from \"node:zlib\";",
|
|
381
|
+
"var __voidNodeRequireModules = {",
|
|
382
|
+
" buffer: __voidNodeBuffer,",
|
|
383
|
+
" crypto: __voidNodeCrypto,",
|
|
384
|
+
" diagnostics_channel: __voidNodeDiagnosticsChannel,",
|
|
385
|
+
" events: __voidNodeEvents,",
|
|
386
|
+
" net: __voidNodeNet,",
|
|
387
|
+
" process: __voidNodeProcess,",
|
|
388
|
+
" stream: __voidNodeStream,",
|
|
389
|
+
" string_decoder: __voidNodeStringDecoder,",
|
|
390
|
+
" timers: __voidNodeTimers,",
|
|
391
|
+
" tls: __voidNodeTls,",
|
|
392
|
+
" url: __voidNodeUrl,",
|
|
393
|
+
" util: __voidNodeUtil,",
|
|
394
|
+
" zlib: __voidNodeZlib,",
|
|
395
|
+
"};",
|
|
396
|
+
"var __require = (id) => {",
|
|
397
|
+
" if (id.startsWith(\"node:\")) id = id.slice(5);",
|
|
398
|
+
" const mod = __voidNodeRequireModules[id];",
|
|
399
|
+
" if (mod) return mod;",
|
|
400
|
+
` throw new Error(\`Unsupported require("\${id}") in Void MySQL ${bundle}\`);`,
|
|
401
|
+
"};"
|
|
402
|
+
].join("\n");
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Bundle a worker entry into a self-contained module.
|
|
406
|
+
*
|
|
407
|
+
* Used for frameworks whose build output has unbundled bare imports
|
|
408
|
+
* (e.g. SvelteKit's `_worker.js` imports from `@sveltejs/kit`).
|
|
409
|
+
*/
|
|
410
|
+
async function bundleEntry(root, entry) {
|
|
411
|
+
const tmpDir = join(root, ".void", "bundle");
|
|
412
|
+
mkdirSync(tmpDir, { recursive: true });
|
|
413
|
+
const outDir = join(tmpDir, "out");
|
|
414
|
+
await build({
|
|
415
|
+
root: tmpDir,
|
|
416
|
+
logLevel: "silent",
|
|
417
|
+
build: {
|
|
418
|
+
outDir,
|
|
419
|
+
emptyOutDir: true,
|
|
420
|
+
lib: {
|
|
421
|
+
entry,
|
|
422
|
+
formats: ["es"],
|
|
423
|
+
fileName: "index"
|
|
424
|
+
},
|
|
425
|
+
rollupOptions: {
|
|
426
|
+
external: [/^cloudflare:/, /^node:/],
|
|
427
|
+
output: { banner: [
|
|
428
|
+
"const __noopCache = {",
|
|
429
|
+
" match() { return Promise.resolve(undefined); },",
|
|
430
|
+
" put() { return Promise.resolve(); },",
|
|
431
|
+
" delete() { return Promise.resolve(false); },",
|
|
432
|
+
"};",
|
|
433
|
+
"globalThis.caches = { default: __noopCache, open() { return Promise.resolve(__noopCache); } };"
|
|
434
|
+
].join("\n") }
|
|
435
|
+
},
|
|
436
|
+
minify: false,
|
|
437
|
+
target: "esnext"
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
return {
|
|
441
|
+
entryFilename: selectBundledEntryFilename(readdirSync(outDir)),
|
|
442
|
+
outputDir: outDir
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
/** Clean up the temporary directories created while generating a deploy wrapper. */
|
|
446
|
+
function cleanupWrapper(root) {
|
|
447
|
+
const voidDir = join(root, ".void");
|
|
448
|
+
for (const directory of [
|
|
449
|
+
"handlers",
|
|
450
|
+
"migration-handler",
|
|
451
|
+
"isr",
|
|
452
|
+
"bundle"
|
|
453
|
+
]) rmSync(join(voidDir, directory), {
|
|
454
|
+
recursive: true,
|
|
455
|
+
force: true
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
function generateWrapperSource(renamedEntry, handlersModule, features, migrations, migrationPlanBundle) {
|
|
459
|
+
const lines = [];
|
|
460
|
+
lines.push(WRAPPER_MARKER);
|
|
461
|
+
lines.push(`import original from "./${renamedEntry}";`);
|
|
462
|
+
if (features.isr) {
|
|
463
|
+
lines.push("import { handleFrameworkIsr } from \"./__void_isr.mjs\";");
|
|
464
|
+
lines.push(`const __voidIsrDeploymentId = ${JSON.stringify(crypto.randomUUID())};`);
|
|
465
|
+
lines.push(`const __voidIsrPolicy = ${JSON.stringify({
|
|
466
|
+
revalidate: features.isr.revalidate,
|
|
467
|
+
queryAllowlist: features.isr.queryAllowlist
|
|
468
|
+
})};`);
|
|
469
|
+
}
|
|
470
|
+
if (features.crons.length > 0) lines.push(`import { handleScheduled } from "./${handlersModule}";`);
|
|
471
|
+
if (features.queues.length > 0) lines.push(`import { handleQueue, handleQueueRelay } from "./${handlersModule}";`);
|
|
472
|
+
if (migrations && migrations.length > 0) {
|
|
473
|
+
lines.push(`import { createMigrationHandler } from "./__void_migration_handler.mjs";`);
|
|
474
|
+
lines.push(`const __migrations = ${JSON.stringify(migrations)};`);
|
|
475
|
+
lines.push(`const __migrationPlanBundle = ${JSON.stringify(migrationPlanBundle)};`);
|
|
476
|
+
}
|
|
477
|
+
lines.push("");
|
|
478
|
+
const needsFetchWrap = features.readiness || features.crons.length > 0 || features.queues.length > 0 || migrations && migrations.length > 0 || !!features.isr;
|
|
479
|
+
if (needsFetchWrap) {
|
|
480
|
+
lines.push("async function wrappedFetch(request, env, ctx) {");
|
|
481
|
+
lines.push(" const url = new URL(request.url);");
|
|
482
|
+
if (features.isr) {
|
|
483
|
+
lines.push(" env.__VOID_ISR_DEPLOYMENT_ID ??= __voidIsrDeploymentId;");
|
|
484
|
+
lines.push(" env.__VOID_ISR_HOST = url.hostname;");
|
|
485
|
+
}
|
|
486
|
+
if (features.readiness || features.crons.length > 0 || features.queues.length > 0 || features.hasMigrations) {
|
|
487
|
+
lines.push(" if (request.method === \"GET\" && url.pathname === \"/__void/ready\") {");
|
|
488
|
+
lines.push(" if (typeof original?.fetch !== \"function\") {");
|
|
489
|
+
lines.push(" return Response.json({ ready: false, error: \"worker entry has no fetch handler\" }, { status: 503, headers: { \"cache-control\": \"no-store\" } });");
|
|
490
|
+
lines.push(" }");
|
|
491
|
+
lines.push(` return Response.json({ ready: true${features.versionMetadataBinding ? `, versionId: env[${JSON.stringify(features.versionMetadataBinding)}]?.id` : ""} }${features.versionMetadataBinding ? ", { headers: { \"cache-control\": \"no-store\" } }" : ""});`);
|
|
492
|
+
lines.push(" }");
|
|
493
|
+
}
|
|
494
|
+
if (features.queues.length > 0) {
|
|
495
|
+
lines.push(" if (request.method === \"POST\" && url.pathname === \"/__void/queue\") {");
|
|
496
|
+
lines.push(" const expected = env?.__VOID_PROXY_TOKEN;");
|
|
497
|
+
lines.push(" if (!expected || request.headers.get(\"x-void-internal\") !== expected) {");
|
|
498
|
+
lines.push(" return Response.json({ error: \"unauthorized\" }, { status: 401 });");
|
|
499
|
+
lines.push(" }");
|
|
500
|
+
lines.push(" try {");
|
|
501
|
+
lines.push(" return Response.json(await handleQueueRelay(await request.json(), env, ctx));");
|
|
502
|
+
lines.push(" } catch {");
|
|
503
|
+
lines.push(" return Response.json({ error: \"Invalid queue payload\" }, { status: 400 });");
|
|
504
|
+
lines.push(" }");
|
|
505
|
+
lines.push(" }");
|
|
506
|
+
}
|
|
507
|
+
if (migrations && migrations.length > 0) {
|
|
508
|
+
lines.push(" if (request.method === \"POST\" && url.pathname === \"/__void/migrate\") {");
|
|
509
|
+
lines.push(" const handler = createMigrationHandler(env, __migrations);");
|
|
510
|
+
lines.push(" return handler(request);");
|
|
511
|
+
lines.push(" }");
|
|
512
|
+
lines.push(" if (request.method === \"GET\" && url.pathname === \"/__void/migrate/capabilities\") {");
|
|
513
|
+
lines.push(" const handler = createMigrationHandler(env, __migrations, undefined, __migrationPlanBundle);");
|
|
514
|
+
lines.push(" return handler(request);");
|
|
515
|
+
lines.push(" }");
|
|
516
|
+
lines.push(" if (request.method === \"POST\" && url.pathname === \"/__void/migrate/app\") {");
|
|
517
|
+
lines.push(" const handler = createMigrationHandler(env, __migrations, undefined, __migrationPlanBundle);");
|
|
518
|
+
lines.push(" return handler(request);");
|
|
519
|
+
lines.push(" }");
|
|
520
|
+
lines.push(" if (request.method === \"GET\" && url.pathname.startsWith(\"/__void/migrate/app/attempt/\")) {");
|
|
521
|
+
lines.push(" const handler = createMigrationHandler(env, __migrations, undefined, __migrationPlanBundle);");
|
|
522
|
+
lines.push(" return handler(request);");
|
|
523
|
+
lines.push(" }");
|
|
524
|
+
}
|
|
525
|
+
if (features.crons.length > 0) {
|
|
526
|
+
lines.push(" if (request.method === \"POST\" && url.pathname === \"/__void/scheduled\") {");
|
|
527
|
+
lines.push(" const __token = request.headers.get(\"x-void-internal\");");
|
|
528
|
+
lines.push(" const __expected = env?.__VOID_PROXY_TOKEN || env?.CRON_SECRET;");
|
|
529
|
+
lines.push(" if (!__expected || __token !== __expected) {");
|
|
530
|
+
lines.push(" return new Response(JSON.stringify({ error: 'unauthorized' }), {");
|
|
531
|
+
lines.push(" status: 401,");
|
|
532
|
+
lines.push(" headers: { \"Content-Type\": \"application/json\" },");
|
|
533
|
+
lines.push(" });");
|
|
534
|
+
lines.push(" }");
|
|
535
|
+
lines.push(" try {");
|
|
536
|
+
lines.push(" const { cron, scheduledTime } = await request.json();");
|
|
537
|
+
lines.push(" const controller = { cron, scheduledTime, noRetry() {} };");
|
|
538
|
+
lines.push(" await handleScheduled(controller, env, ctx);");
|
|
539
|
+
lines.push(" return new Response(JSON.stringify({ ok: true }), {");
|
|
540
|
+
lines.push(" headers: { \"Content-Type\": \"application/json\" },");
|
|
541
|
+
lines.push(" });");
|
|
542
|
+
lines.push(" } catch (err) {");
|
|
543
|
+
lines.push(" return new Response(JSON.stringify({ error: String(err) }), {");
|
|
544
|
+
lines.push(" status: 500,");
|
|
545
|
+
lines.push(" headers: { \"Content-Type\": \"application/json\" },");
|
|
546
|
+
lines.push(" });");
|
|
547
|
+
lines.push(" }");
|
|
548
|
+
lines.push(" }");
|
|
549
|
+
}
|
|
550
|
+
if (features.isr) {
|
|
551
|
+
lines.push(" if (env.ISR_CACHE && request.headers.get(\"upgrade\")?.toLowerCase() !== \"websocket\") {");
|
|
552
|
+
lines.push(" const cached = await handleFrameworkIsr(request, env, ctx, { ...__voidIsrPolicy, deploymentId: __voidIsrDeploymentId }, (req) => original.fetch(req, env, ctx));");
|
|
553
|
+
lines.push(" if (cached) return cached;");
|
|
554
|
+
lines.push(" }");
|
|
555
|
+
}
|
|
556
|
+
lines.push(" return original.fetch(request, env, ctx);");
|
|
557
|
+
lines.push("}");
|
|
558
|
+
lines.push("");
|
|
559
|
+
}
|
|
560
|
+
lines.push("export default {");
|
|
561
|
+
if (needsFetchWrap) lines.push(" fetch: wrappedFetch,");
|
|
562
|
+
else lines.push(" fetch: original.fetch,");
|
|
563
|
+
if (features.crons.length > 0) lines.push(features.isr ? " scheduled(controller, env, ctx) { env.__VOID_ISR_DEPLOYMENT_ID ??= __voidIsrDeploymentId; return handleScheduled(controller, env, ctx); }," : " scheduled: handleScheduled,");
|
|
564
|
+
if (features.queues.length > 0) lines.push(features.isr ? " queue(batch, env, ctx) { env.__VOID_ISR_DEPLOYMENT_ID ??= __voidIsrDeploymentId; return handleQueue(batch, env, ctx); }," : " queue: handleQueue,");
|
|
565
|
+
lines.push("};");
|
|
566
|
+
return lines.join("\n");
|
|
567
|
+
}
|
|
568
|
+
function generateHandlersSource(root, features, dialect) {
|
|
569
|
+
const lines = [];
|
|
570
|
+
const paths = readProjectPaths(root);
|
|
571
|
+
const scoped = dialect !== "sqlite";
|
|
572
|
+
if (scoped) lines.push(`import { withRuntimeEnv } from ${JSON.stringify(envModuleFile)};`);
|
|
573
|
+
if (features.crons.length > 0) {
|
|
574
|
+
for (let i = 0; i < features.crons.length; i++) {
|
|
575
|
+
const absPath = join(paths.cronsDir, features.crons[i].filePath);
|
|
576
|
+
lines.push(`import cronHandler${i} from "${absPath}";`);
|
|
577
|
+
}
|
|
578
|
+
lines.push("");
|
|
579
|
+
lines.push(scoped ? "async function __runScheduled(controller, env, ctx) {" : "export async function handleScheduled(controller, env, ctx) {");
|
|
580
|
+
lines.push(" const tasks = [];");
|
|
581
|
+
for (let i = 0; i < features.crons.length; i++) {
|
|
582
|
+
lines.push(` if (${JSON.stringify(features.crons[i].crons)}.includes(controller.cron)) {`);
|
|
583
|
+
lines.push(" tasks.push((async () => {");
|
|
584
|
+
lines.push(` if (typeof cronHandler${i} === "function") {`);
|
|
585
|
+
lines.push(` await cronHandler${i}(controller, env, ctx);`);
|
|
586
|
+
lines.push(` } else if (cronHandler${i} && typeof cronHandler${i}.default === "function") {`);
|
|
587
|
+
lines.push(` await cronHandler${i}.default(controller, env, ctx);`);
|
|
588
|
+
lines.push(" }");
|
|
589
|
+
lines.push(" })());");
|
|
590
|
+
lines.push(" }");
|
|
591
|
+
}
|
|
592
|
+
lines.push(" const results = await Promise.allSettled(tasks);");
|
|
593
|
+
lines.push(" const errors = results.filter(result => result.status === \"rejected\").map(result => result.reason);");
|
|
594
|
+
lines.push(" if (errors.length) throw new AggregateError(errors, \"Scheduled jobs failed\");");
|
|
595
|
+
lines.push("}");
|
|
596
|
+
if (scoped) {
|
|
597
|
+
lines.push("export function handleScheduled(controller, env, ctx) {");
|
|
598
|
+
lines.push(" return withRuntimeEnv(env, () => __runScheduled(controller, env, ctx));");
|
|
599
|
+
lines.push("}");
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
if (features.queues.length > 0) {
|
|
603
|
+
lines.push("");
|
|
604
|
+
for (let i = 0; i < features.queues.length; i++) {
|
|
605
|
+
const absPath = join(paths.queuesDir, features.queues[i].filePath);
|
|
606
|
+
lines.push(`import queueHandler${i} from "${absPath}";`);
|
|
607
|
+
}
|
|
608
|
+
lines.push("");
|
|
609
|
+
lines.push(generateQueueResolverSource(features.queues.map((queue) => queue.name)));
|
|
610
|
+
lines.push("");
|
|
611
|
+
lines.push(scoped ? "async function __runQueue(batch, env, ctx) {" : "export async function handleQueue(batch, env, ctx) {");
|
|
612
|
+
lines.push(" const queueSuffix = batch.queue;");
|
|
613
|
+
lines.push(" const __queueIndex = __resolveQueueIndex(queueSuffix);");
|
|
614
|
+
lines.push(" if (__queueIndex === -1) {");
|
|
615
|
+
lines.push(" batch.retryAll();");
|
|
616
|
+
lines.push(" throw new Error(`No unambiguous queue handler matches \"${String(queueSuffix)}\"`);");
|
|
617
|
+
lines.push(" }");
|
|
618
|
+
lines.push(" switch (__queueIndex) {");
|
|
619
|
+
for (let i = 0; i < features.queues.length; i++) {
|
|
620
|
+
lines.push(` case ${i}:`);
|
|
621
|
+
lines.push(` if (typeof queueHandler${i} === "function") {`);
|
|
622
|
+
lines.push(` await queueHandler${i}(batch, env);`);
|
|
623
|
+
lines.push(` } else if (queueHandler${i} && typeof queueHandler${i}.default === "function") {`);
|
|
624
|
+
lines.push(` await queueHandler${i}.default(batch, env);`);
|
|
625
|
+
lines.push(` }`);
|
|
626
|
+
lines.push(` return;`);
|
|
627
|
+
}
|
|
628
|
+
lines.push(" }");
|
|
629
|
+
lines.push("}");
|
|
630
|
+
if (scoped) {
|
|
631
|
+
lines.push("export function handleQueue(batch, env, ctx) {");
|
|
632
|
+
lines.push(" return withRuntimeEnv(env, () => __runQueue(batch, env, ctx));");
|
|
633
|
+
lines.push("}");
|
|
634
|
+
}
|
|
635
|
+
lines.push(`
|
|
636
|
+
export async function handleQueueRelay(payload, env, ctx) {
|
|
637
|
+
if (!payload || typeof payload.queue !== "string" || !Array.isArray(payload.messages) ||
|
|
638
|
+
payload.messages.some(m => !m || typeof m.id !== "string" || typeof m.timestamp !== "string" || !Number.isFinite(Date.parse(m.timestamp)))) {
|
|
639
|
+
throw new Error("Invalid queue payload");
|
|
640
|
+
}
|
|
641
|
+
const decisions = new Map();
|
|
642
|
+
const messages = payload.messages.map(m => {
|
|
643
|
+
const decide = (decision) => { if (!decisions.has(m.id)) decisions.set(m.id, decision); };
|
|
644
|
+
return {
|
|
645
|
+
id: m.id, timestamp: new Date(m.timestamp), body: m.body, attempts: m.attempts,
|
|
646
|
+
ack() { decide({ action: "ack" }); },
|
|
647
|
+
retry(options) { decide({ action: "retry", ...(options?.delaySeconds != null ? { delaySeconds: options.delaySeconds } : {}) }); },
|
|
648
|
+
};
|
|
649
|
+
});
|
|
650
|
+
const batch = {
|
|
651
|
+
queue: payload.queue, messages,
|
|
652
|
+
ackAll() { for (const message of messages) message.ack(); },
|
|
653
|
+
retryAll(options) { for (const message of messages) message.retry(options); },
|
|
654
|
+
};
|
|
655
|
+
let ok = true;
|
|
656
|
+
try { await handleQueue(batch, env, ctx); } catch { ok = false; }
|
|
657
|
+
return { ok, ...(decisions.size ? { decisions: Object.fromEntries(decisions) } : {}) };
|
|
658
|
+
}`);
|
|
659
|
+
}
|
|
660
|
+
return lines.join("\n");
|
|
661
|
+
}
|
|
662
|
+
//#endregion
|
|
663
|
+
export { needsWrapper as a, generateWrapper as i, bundleWorkerSqlDriver as n, cleanupWrapper as r, bundleEntry as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as StandardSchemaV1 } from "./standard-schema-Fo_vCAZh.mjs";
|
|
2
2
|
import { r as AuthUser } from "./auth-DkcFflXV.mjs";
|
|
3
|
-
import { a as CloudEnv } from "./handler-
|
|
3
|
+
import { a as CloudEnv } from "./handler-_PqY82xe.mjs";
|
|
4
4
|
import { WebSocketRouteMap } from "void/routes";
|
|
5
5
|
//#region src/runtime/ws.d.ts
|
|
6
6
|
type MaybePromise<T> = T | Promise<T>;
|