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
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ npx void init
|
|
|
20
20
|
npm run dev
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Choose your UI framework and starter, then select Cloudflare to deploy to your account:
|
|
23
|
+
Vite+ is the default toolchain; setup installs it for you and keeps your existing package-manager configuration. Choose your UI framework and starter, then select Cloudflare to deploy to your account:
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
26
|
npx void deploy
|
|
@@ -43,6 +43,8 @@ Read the [Void documentation](https://void.cloud) online or use the Markdown gui
|
|
|
43
43
|
- [API](https://void.cloud/reference/api) and [CLI](https://void.cloud/reference/cli) reference
|
|
44
44
|
- [Coding agents](https://void.cloud/integrations/agents)
|
|
45
45
|
|
|
46
|
+
Applications that publish through a platform OAuth client can prepare a built app without credentials using [`void/deploy`](https://void.cloud/reference/api/deploy), then request [user approval](https://void.cloud/guide/platform/administration/connected-apps).
|
|
47
|
+
|
|
46
48
|
## License
|
|
47
49
|
|
|
48
50
|
MIT
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { c as getToken, f as removeToken } from "./auth-
|
|
2
|
-
import { L as log } from "./dist-
|
|
3
|
-
import {
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
5
|
-
import { n as runLoginCommand } from "./login-
|
|
1
|
+
import { c as getToken, f as removeToken } from "./auth-B6iOCjKI.mjs";
|
|
2
|
+
import { L as log } from "./dist-BVdsO7Py.mjs";
|
|
3
|
+
import { m as printSuccess } from "./output-Ba6ZbrzY.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
|
|
5
|
+
import { n as runLoginCommand } from "./login-C2T1oVG-.mjs";
|
|
6
6
|
import { execSync } from "node:child_process";
|
|
7
7
|
//#region src/cli/account-cmd.ts
|
|
8
8
|
async function runAccountCommand(root, args) {
|
|
9
9
|
switch (args.subcommand) {
|
|
10
10
|
case "login": return runLoginCommand(root);
|
|
11
|
-
case "link": return import("./auth-link-
|
|
11
|
+
case "link": return import("./auth-link-DUJuvRx5.mjs").then(({ runAuthLink }) => runAuthLink(root, args.connectionId));
|
|
12
12
|
case "logout":
|
|
13
13
|
if (removeToken(root)) printSuccess("Logged out.");
|
|
14
14
|
else log.info("Not logged in.");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as join } from "./dist-
|
|
1
|
+
import { a as join } from "./dist-ipQi0Q8y.mjs";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
//#region src/cli/agents.ts
|
|
@@ -12,6 +12,9 @@ function getPackageDir() {
|
|
|
12
12
|
}
|
|
13
13
|
throw new Error("Could not find void package root");
|
|
14
14
|
}
|
|
15
|
+
function getOwnVersion() {
|
|
16
|
+
return JSON.parse(readFileSync(join(getPackageDir(), "package.json"), "utf-8")).version;
|
|
17
|
+
}
|
|
15
18
|
const agents = {
|
|
16
19
|
"claude-code": {
|
|
17
20
|
displayName: "Claude Code",
|
|
@@ -108,4 +111,4 @@ function detectAgents(root) {
|
|
|
108
111
|
return Object.values(agents).filter((a) => a.detect(root));
|
|
109
112
|
}
|
|
110
113
|
//#endregion
|
|
111
|
-
export {
|
|
114
|
+
export { getOwnVersion as n, getPackageDir as r, detectAgents as t };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { a as join, i as isAbsolute, t as basename } from "./dist-
|
|
2
|
-
import { c as
|
|
3
|
-
import { i as resolveProjectPaths, n as readProjectPaths } from "./project-paths-
|
|
4
|
-
import { t as findVoidAuthConfig } from "./config-
|
|
5
|
-
import {
|
|
6
|
-
import { n as globSync
|
|
1
|
+
import { a as join, i as isAbsolute, t as basename } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
+
import { c as scanWebSocketRoutesSync, f as readResourceDefinition, h as needsApplicationDatabase, i as inferProjectBindings, n as FRAMEWORK_SCAN_DIRS, p as listConventionFiles, r as detectFramework, s as isWebSocketPatternFile } from "./plugin-inference-DsARdQKE.mjs";
|
|
3
|
+
import { i as resolveProjectPaths, n as readProjectPaths } from "./project-paths-DMvEeSau.mjs";
|
|
4
|
+
import { t as findVoidAuthConfig } from "./config-D0GY5ItR.mjs";
|
|
5
|
+
import { f as resolveBindingNames, s as getDatabaseDialect } from "./config-Bx_1SpnO.mjs";
|
|
6
|
+
import { n as globSync } from "./dist-Bn8Kodjp.mjs";
|
|
7
7
|
import { n as isIdentifier } from "./ast-CPGPjb0V.mjs";
|
|
8
8
|
import { a as staticLiteral, i as staticExportInitializers, n as parseRouteFilename, o as unwrapStaticExpression, t as isRouteEnabledForEnvironment } from "./parse-filename-CUbj-1MP.mjs";
|
|
9
9
|
import { n as resourceNameWords } from "./resource-name-C7LVpcRm.mjs";
|
|
10
|
-
import { t as collectMigrations } from "./collect-
|
|
11
|
-
import {
|
|
12
|
-
import { t as scanPages } from "./scan-
|
|
13
|
-
import { o as isSandboxEnabled } from "./config-B_ggY-IO.mjs";
|
|
10
|
+
import { t as collectMigrations } from "./collect-xjffdCdk.mjs";
|
|
11
|
+
import { i as scanEmailHandlersSync } from "./email-BcjSyAL0.mjs";
|
|
12
|
+
import { t as scanPages } from "./scan-C0BMdmEd.mjs";
|
|
14
13
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
14
|
+
import { fileURLToPath } from "node:url";
|
|
15
15
|
import { parseSync } from "vite";
|
|
16
|
+
import { isSandboxRegistryImage } from "@void/deploy-core";
|
|
16
17
|
//#region src/crons/scan.ts
|
|
17
|
-
const JOB_PATTERN = "**/*.{ts,mts,js,mjs}";
|
|
18
18
|
function extractJobName(filePath) {
|
|
19
19
|
return filePath.replace(/\.[^.]+$/, "");
|
|
20
20
|
}
|
|
@@ -29,14 +29,9 @@ function extractCronExpressions(source, filePath) {
|
|
|
29
29
|
return cron.trim();
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
return
|
|
34
|
-
|
|
35
|
-
function parseJobFiles(root, jobsDir, files) {
|
|
36
|
-
const jobsDirPath = resolveDir(root, jobsDir);
|
|
37
|
-
return files.filter((filePath) => !filePath.split("/").some((segment) => segment.startsWith("_"))).sort((leftFilePath, rightFilePath) => leftFilePath.localeCompare(rightFilePath)).map((filePath) => {
|
|
38
|
-
const absPath = join(jobsDirPath, filePath);
|
|
39
|
-
const source = readFileSync(absPath, "utf-8");
|
|
32
|
+
function scanJobsSync(cronsDir) {
|
|
33
|
+
return listConventionFiles(cronsDir).sort((leftFilePath, rightFilePath) => leftFilePath.localeCompare(rightFilePath)).map((filePath) => {
|
|
34
|
+
const source = readFileSync(join(cronsDir, filePath), "utf-8");
|
|
40
35
|
return {
|
|
41
36
|
filePath,
|
|
42
37
|
name: extractJobName(filePath),
|
|
@@ -44,31 +39,13 @@ function parseJobFiles(root, jobsDir, files) {
|
|
|
44
39
|
};
|
|
45
40
|
});
|
|
46
41
|
}
|
|
47
|
-
async function scanJobs(root, jobsDir = "crons") {
|
|
48
|
-
return parseJobFiles(root, jobsDir, await glob(JOB_PATTERN, {
|
|
49
|
-
cwd: resolveDir(root, jobsDir),
|
|
50
|
-
absolute: false
|
|
51
|
-
}).catch(() => []));
|
|
52
|
-
}
|
|
53
|
-
function scanJobsSync(root, jobsDir = "crons") {
|
|
54
|
-
let files;
|
|
55
|
-
try {
|
|
56
|
-
files = globSync(JOB_PATTERN, {
|
|
57
|
-
cwd: resolveDir(root, jobsDir),
|
|
58
|
-
absolute: false
|
|
59
|
-
});
|
|
60
|
-
} catch {
|
|
61
|
-
files = [];
|
|
62
|
-
}
|
|
63
|
-
return parseJobFiles(root, jobsDir, files);
|
|
64
|
-
}
|
|
65
42
|
//#endregion
|
|
66
43
|
//#region src/durable/scan.ts
|
|
67
44
|
const MODULE_PATTERN = /\.(?:[cm]?[jt]s)$/;
|
|
68
45
|
function inferDurableResourceName(filePath) {
|
|
69
46
|
return filePath.replace(/\\/g, "/").split("/").pop().replace(MODULE_PATTERN, "");
|
|
70
47
|
}
|
|
71
|
-
const DURABLE_HELPERS = /* @__PURE__ */ new Set(["defineDurableState"]);
|
|
48
|
+
const DURABLE_HELPERS = /* @__PURE__ */ new Set(["defineDurableState", "defineDurableObject"]);
|
|
72
49
|
function deriveDurableResourceIdentity(name) {
|
|
73
50
|
const parts = resourceNameWords(name);
|
|
74
51
|
const classBase = parts.map((part) => part[0].toUpperCase() + part.slice(1)).join("");
|
|
@@ -103,7 +80,6 @@ function scanDurableObjectModules(root) {
|
|
|
103
80
|
}
|
|
104
81
|
//#endregion
|
|
105
82
|
//#region src/queues/scan.ts
|
|
106
|
-
const QUEUE_PATTERN = "**/*.{ts,mts,js,mjs}";
|
|
107
83
|
function extractName(filePath) {
|
|
108
84
|
return filePath.replace(/\.[^.]+$/, "").replaceAll("/", "-");
|
|
109
85
|
}
|
|
@@ -116,12 +92,9 @@ const OPTION_NAMES = [
|
|
|
116
92
|
"maxRetries",
|
|
117
93
|
"retryDelay"
|
|
118
94
|
];
|
|
119
|
-
function
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
function parseQueueFiles(queuesDirPath, files) {
|
|
123
|
-
const definitions = files.filter((filePath) => !filePath.split("/").some((segment) => segment.startsWith("_"))).sort().map((filePath) => {
|
|
124
|
-
const absPath = join(queuesDirPath, filePath);
|
|
95
|
+
function scanQueuesSync(queuesDir) {
|
|
96
|
+
const definitions = listConventionFiles(queuesDir).sort().map((filePath) => {
|
|
97
|
+
const absPath = join(queuesDir, filePath);
|
|
125
98
|
const source = readFileSync(absPath, "utf-8");
|
|
126
99
|
const name = extractName(filePath);
|
|
127
100
|
const options = OPTION_NAMES.some((option) => source.includes(option)) ? staticExportInitializers(absPath, source, new Set(OPTION_NAMES)) : /* @__PURE__ */ new Map();
|
|
@@ -156,26 +129,6 @@ function parseQueueFiles(queuesDirPath, files) {
|
|
|
156
129
|
].join("\n"));
|
|
157
130
|
return definitions;
|
|
158
131
|
}
|
|
159
|
-
async function scanQueues(root, queuesDir = "queues") {
|
|
160
|
-
const queuesDirPath = resolveQueuesDir(root, queuesDir);
|
|
161
|
-
return parseQueueFiles(queuesDirPath, await glob(QUEUE_PATTERN, {
|
|
162
|
-
cwd: queuesDirPath,
|
|
163
|
-
absolute: false
|
|
164
|
-
}).catch(() => []));
|
|
165
|
-
}
|
|
166
|
-
function scanQueuesSync(root, queuesDir = "queues") {
|
|
167
|
-
const queuesDirPath = resolveQueuesDir(root, queuesDir);
|
|
168
|
-
let files;
|
|
169
|
-
try {
|
|
170
|
-
files = globSync(QUEUE_PATTERN, {
|
|
171
|
-
cwd: queuesDirPath,
|
|
172
|
-
absolute: false
|
|
173
|
-
});
|
|
174
|
-
} catch {
|
|
175
|
-
files = [];
|
|
176
|
-
}
|
|
177
|
-
return parseQueueFiles(queuesDirPath, files);
|
|
178
|
-
}
|
|
179
132
|
//#endregion
|
|
180
133
|
//#region src/router/detect-exports.ts
|
|
181
134
|
const HTTP_METHODS = /* @__PURE__ */ new Set([
|
|
@@ -224,12 +177,6 @@ function detectHttpExports(absPath) {
|
|
|
224
177
|
}
|
|
225
178
|
//#endregion
|
|
226
179
|
//#region src/router/scan.ts
|
|
227
|
-
const ROUTE_PATTERN = `**/*.{${[
|
|
228
|
-
"ts",
|
|
229
|
-
"mts",
|
|
230
|
-
"js",
|
|
231
|
-
"mjs"
|
|
232
|
-
].join(",")}}`;
|
|
233
180
|
function parseMiddlewareDefinitions(files) {
|
|
234
181
|
return files.filter((f) => !f.startsWith("_")).map((f) => {
|
|
235
182
|
const match = f.split("/").pop().match(/^(\d+)\./);
|
|
@@ -251,67 +198,110 @@ function compareRouteSpecificity(a, b) {
|
|
|
251
198
|
}
|
|
252
199
|
return aSegments.length - bSegments.length;
|
|
253
200
|
}
|
|
254
|
-
/**
|
|
255
|
-
* Scan routes/ and middleware/ directories and return a structured manifest.
|
|
256
|
-
* Files starting with _ are ignored.
|
|
257
|
-
*/
|
|
201
|
+
/** Add pages and HTTP methods to the inventories already resolved for this application phase. */
|
|
258
202
|
async function scanRoutes(root, options) {
|
|
259
|
-
const paths = options
|
|
260
|
-
const
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
absolute: false
|
|
269
|
-
}).catch(() => []),
|
|
270
|
-
options?.inventory?.jobs ?? scanJobs(root, paths.cronsDir),
|
|
271
|
-
options?.inventory?.queues ?? scanQueues(root, paths.queuesDir),
|
|
272
|
-
scanPages(root, {
|
|
273
|
-
output: options?.output,
|
|
274
|
-
paths
|
|
275
|
-
}),
|
|
276
|
-
options?.inventory?.email ?? scanEmailHandlers(paths.sourceRoot)
|
|
277
|
-
]);
|
|
278
|
-
const routesDir = paths.routesDir;
|
|
203
|
+
const { paths, inventory } = options;
|
|
204
|
+
const pages = await scanPages(root, {
|
|
205
|
+
output: options.output,
|
|
206
|
+
paths
|
|
207
|
+
});
|
|
208
|
+
const routes = inventory.routes.map((route) => ({
|
|
209
|
+
...route,
|
|
210
|
+
methods: detectHttpExports(join(paths.routesDir, route.filePath))
|
|
211
|
+
})).sort(compareRouteSpecificity);
|
|
279
212
|
return {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
})).sort(compareRouteSpecificity),
|
|
284
|
-
websockets,
|
|
285
|
-
middleware: options?.inventory?.middleware ?? parseMiddlewareDefinitions(middlewareFiles),
|
|
286
|
-
jobs,
|
|
287
|
-
queues,
|
|
288
|
-
pages,
|
|
289
|
-
email
|
|
213
|
+
...inventory,
|
|
214
|
+
routes,
|
|
215
|
+
pages
|
|
290
216
|
};
|
|
291
217
|
}
|
|
292
218
|
function scanMiddlewareSync(root, paths = readProjectPaths(root)) {
|
|
293
|
-
|
|
294
|
-
try {
|
|
295
|
-
middlewareFiles = globSync(ROUTE_PATTERN, {
|
|
296
|
-
cwd: paths.middlewareDir,
|
|
297
|
-
absolute: false
|
|
298
|
-
});
|
|
299
|
-
} catch {
|
|
300
|
-
middlewareFiles = [];
|
|
301
|
-
}
|
|
302
|
-
return parseMiddlewareDefinitions(middlewareFiles);
|
|
219
|
+
return parseMiddlewareDefinitions(globSync("**/*.{ts,mts,js,mjs}", { cwd: paths.middlewareDir }));
|
|
303
220
|
}
|
|
304
221
|
function scanRoutePatternsSync(root, paths = readProjectPaths(root), environment) {
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
222
|
+
return listConventionFiles(paths.routesDir).filter((f) => !isWebSocketPatternFile(f)).map((f) => parseRouteFilename(f)).filter((route) => isRouteEnabledForEnvironment(route, environment)).sort(compareRouteSpecificity);
|
|
223
|
+
}
|
|
224
|
+
const DEFAULT_SANDBOX_CLASS_NAME = "SandboxV1";
|
|
225
|
+
const DEFAULT_SANDBOX_CONTAINER_NAME = "void-sandbox-v1";
|
|
226
|
+
const SANDBOX_MIGRATION_TAG = "void-sandbox-v2";
|
|
227
|
+
function isSandboxEnabled(config) {
|
|
228
|
+
return config.sandbox !== void 0 && config.sandbox !== false;
|
|
229
|
+
}
|
|
230
|
+
function getDefaultSandboxImage() {
|
|
231
|
+
return fileURLToPath(new URL("../../sandbox.Dockerfile", import.meta.resolve("void/sandbox")));
|
|
232
|
+
}
|
|
233
|
+
function getDefaultSandboxPlatformImage() {
|
|
234
|
+
return "cloudflare/debian-trixie";
|
|
235
|
+
}
|
|
236
|
+
function isLocalSandboxImage(image) {
|
|
237
|
+
return isAbsolute(image) || image.startsWith("./") || image.startsWith("../") || image.toLowerCase().includes("dockerfile");
|
|
238
|
+
}
|
|
239
|
+
function requiresSandboxPlatformImage(config) {
|
|
240
|
+
if (typeof config.sandbox !== "object" || config.sandbox === null) return false;
|
|
241
|
+
return typeof config.sandbox.image === "string" && isLocalSandboxImage(config.sandbox.image) && config.sandbox.platformImage === void 0;
|
|
242
|
+
}
|
|
243
|
+
function resolveSandboxConfig(config, root = process.cwd()) {
|
|
244
|
+
const raw = typeof config.sandbox === "object" ? config.sandbox : {};
|
|
245
|
+
const image = raw.image ?? getDefaultSandboxImage();
|
|
246
|
+
const imageBuildContext = raw.imageBuildContext;
|
|
247
|
+
const platformImage = raw.platformImage ?? (raw.image && !isLocalSandboxImage(raw.image) ? raw.image : getDefaultSandboxPlatformImage());
|
|
248
|
+
if (!isLocalSandboxImage(image) && !isSandboxRegistryImage(image)) throw new Error("sandbox.image must be a Dockerfile or a digest-pinned Cloudflare registry image (registry.cloudflare.com/<account>/<image>@sha256:<digest>).");
|
|
249
|
+
if (platformImage !== getDefaultSandboxPlatformImage() && !isSandboxRegistryImage(platformImage)) throw new Error("sandbox.platformImage must be a digest-pinned Cloudflare registry image (registry.cloudflare.com/<account>/<image>@sha256:<digest>).");
|
|
250
|
+
return {
|
|
251
|
+
binding: raw.binding ?? "SANDBOX",
|
|
252
|
+
className: raw.className ?? "SandboxV1",
|
|
253
|
+
containerName: raw.containerName ?? DEFAULT_SANDBOX_CONTAINER_NAME,
|
|
254
|
+
image: resolveSandboxImage(image, root),
|
|
255
|
+
platformImage,
|
|
256
|
+
...imageBuildContext && { imageBuildContext: isAbsolute(imageBuildContext) ? imageBuildContext : join(root, imageBuildContext) },
|
|
257
|
+
...raw.instanceType && { instanceType: raw.instanceType }
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
function resolveSandboxImage(image, root) {
|
|
261
|
+
if (!isLocalSandboxImage(image) || isAbsolute(image)) return image;
|
|
262
|
+
return join(root, image);
|
|
263
|
+
}
|
|
264
|
+
function sandboxContainerConfig(sandbox) {
|
|
265
|
+
return {
|
|
266
|
+
name: sandbox.containerName,
|
|
267
|
+
class_name: sandbox.className,
|
|
268
|
+
scheduling_policy: "durable_object",
|
|
269
|
+
images: { default: isLocalSandboxImage(sandbox.image) ? {
|
|
270
|
+
dockerfile: sandbox.image,
|
|
271
|
+
...sandbox.imageBuildContext && { build_context: sandbox.imageBuildContext }
|
|
272
|
+
} : { image: sandbox.image } }
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
/** Resolve the final local storage kind without recreating a renamed or deleted class. */
|
|
276
|
+
function resolveSandboxMigrationStorage(migrations, className) {
|
|
277
|
+
const storage = /* @__PURE__ */ new Map();
|
|
278
|
+
for (const migration of migrations) {
|
|
279
|
+
for (const name of migration.new_classes ?? []) storage.set(name, "legacy-kv");
|
|
280
|
+
for (const name of migration.new_sqlite_classes ?? []) storage.set(name, "sqlite");
|
|
281
|
+
for (const rename of migration.renamed_classes ?? []) {
|
|
282
|
+
const sqlite = storage.get(rename.from);
|
|
283
|
+
storage.delete(rename.from);
|
|
284
|
+
storage.set(rename.to, sqlite ?? "unknown");
|
|
285
|
+
}
|
|
286
|
+
for (const transfer of migration.transferred_classes ?? []) storage.set(transfer.to, "unknown");
|
|
287
|
+
for (const name of migration.deleted_classes ?? []) storage.delete(name);
|
|
313
288
|
}
|
|
314
|
-
return
|
|
289
|
+
return storage.get(className);
|
|
290
|
+
}
|
|
291
|
+
function hasSandboxSqliteMigration(migrations, className) {
|
|
292
|
+
return resolveSandboxMigrationStorage(migrations, className) === "sqlite";
|
|
293
|
+
}
|
|
294
|
+
/** Refuse namespace reuse before either uploader can change a live Worker. */
|
|
295
|
+
function assertSandboxNamespaceConfig(config, sandbox) {
|
|
296
|
+
const containers = Array.isArray(config.containers) ? config.containers : [];
|
|
297
|
+
const durable = config.durable_objects;
|
|
298
|
+
const binding = durable?.bindings?.find((entry) => entry.name === sandbox.binding);
|
|
299
|
+
if (binding && (binding.script_name !== void 0 || binding.environment !== void 0)) throw new Error(`sandbox: binding '${sandbox.binding}' must reference the local '${sandbox.className}' class. Choose another sandbox.binding name to preserve the existing external Durable Object.`);
|
|
300
|
+
const migrations = Array.isArray(config.migrations) ? config.migrations : [];
|
|
301
|
+
const storage = resolveSandboxMigrationStorage(migrations, sandbox.className);
|
|
302
|
+
if (storage === "legacy-kv" || storage === "unknown") throw new Error(`sandbox: class '${sandbox.className}' needs SQLite storage, but its existing namespace has ${storage} storage. Preserve the existing migration history and choose a fresh Worker name or a new sandbox.className and sandbox.binding.`);
|
|
303
|
+
if (storage !== "sqlite" && migrations.some((migration) => migration.tag === "void-sandbox-v2")) throw new Error(`sandbox: migration tag '${SANDBOX_MIGRATION_TAG}' is already configured for another class. Keep the existing history and choose a fresh Worker for Sandbox.`);
|
|
304
|
+
if (containers.some((container) => container.class_name === sandbox.className && container.scheduling_policy !== "durable_object") || durable?.bindings?.some((binding) => binding.name === sandbox.binding && binding.class_name !== sandbox.className)) throw new Error("Sandbox SDK 1.0 needs a new Durable Object namespace. Back up existing Sandbox data and deploy to a fresh Worker name with the new Sandbox configuration; remove legacy Sandbox bindings, containers, and migrations from that new Worker configuration. See https://developers.cloudflare.com/containers/guides/migrate-to-durable-object-scheduling-policy/.");
|
|
315
305
|
}
|
|
316
306
|
//#endregion
|
|
317
307
|
//#region src/application-analysis.ts
|
|
@@ -339,8 +329,8 @@ function analyzeApplicationSync(root, options) {
|
|
|
339
329
|
};
|
|
340
330
|
const dialect = getDatabaseDialect(config);
|
|
341
331
|
const migrations = collectMigrations(paths.migrationsDir);
|
|
342
|
-
const jobs = scanJobsSync(
|
|
343
|
-
const queues = scanQueuesSync(
|
|
332
|
+
const jobs = scanJobsSync(paths.cronsDir);
|
|
333
|
+
const queues = scanQueuesSync(paths.queuesDir);
|
|
344
334
|
const allWebsockets = scanWebSocketRoutesSync(root, paths);
|
|
345
335
|
const websockets = allWebsockets.filter((route) => isRouteEnabledForEnvironment(route, environment));
|
|
346
336
|
const durableObjects = scanDurableObjectModules(root);
|
|
@@ -350,19 +340,12 @@ function analyzeApplicationSync(root, options) {
|
|
|
350
340
|
const reasons = {
|
|
351
341
|
database: [],
|
|
352
342
|
kv: bindings.needsKV ? [bindingReason("kv", "KV", "app uses env.KV")] : [],
|
|
353
|
-
r2: bindings.needsR2 ? [bindingReason("storage", "R2", "app uses env.STORAGE (R2)")] : []
|
|
354
|
-
ai: bindings.needsAI ? [bindingReason("ai", "Workers AI", "app uses Workers AI")] : [],
|
|
355
|
-
sandbox: bindings.needsSandbox ? [isSandboxEnabled(config) ? "void.config.ts enables Sandbox" : "app uses void/sandbox"] : [],
|
|
356
|
-
live: bindings.needsLive ? ["app uses void/live"] : [],
|
|
357
|
-
email: bindings.needsEmail ? [bindingReason("email", "email", "app uses void/email")] : [],
|
|
358
|
-
queues: bindings.needsQueues ? ["app uses void/queues"] : []
|
|
343
|
+
r2: bindings.needsR2 ? [bindingReason("storage", "R2", "app uses env.STORAGE (R2)")] : []
|
|
359
344
|
};
|
|
360
345
|
const databaseName = dialect === "sqlite" ? "a D1 database" : "a Hyperdrive database";
|
|
361
346
|
if (bindings.needsD1) reasons.database.push(bindingReason("db", databaseName, dialect === "sqlite" ? "app uses env.DB (D1)" : "app uses a database"));
|
|
362
347
|
if (authEnabled) reasons.database.push(`auth requires ${databaseName}`);
|
|
363
348
|
if (migrations.length > 0) reasons.database.push(`checked-in migrations need ${databaseName}`);
|
|
364
|
-
for (const queue of queues) reasons.queues.push(`queues/${queue.filePath} requires ${queue.bindingName}`);
|
|
365
|
-
if (hasEmailHandlers(email)) reasons.email.push("email/ contains inbound email handlers");
|
|
366
349
|
return {
|
|
367
350
|
root,
|
|
368
351
|
config,
|
|
@@ -388,4 +371,4 @@ function analyzeApplicationSync(root, options) {
|
|
|
388
371
|
};
|
|
389
372
|
}
|
|
390
373
|
//#endregion
|
|
391
|
-
export {
|
|
374
|
+
export { hasSandboxSqliteMigration as a, sandboxContainerConfig as c, deriveDurableResourceIdentity as d, inferDurableResourceName as f, assertSandboxNamespaceConfig as i, scanRoutes as l, DEFAULT_SANDBOX_CLASS_NAME as n, requiresSandboxPlatformImage as o, scanJobsSync as p, SANDBOX_MIGRATION_TAG as r, resolveSandboxConfig as s, analyzeApplicationSync as t, scanQueuesSync as u };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as scanRoutes, t as analyzeApplicationSync } from "./application-analysis-AB_YYWgH.mjs";
|
|
2
2
|
//#region src/application-routing.ts
|
|
3
3
|
/** Complete route/page analysis using the same resource and handler inventories. */
|
|
4
4
|
async function completeApplicationAnalysis(analysis) {
|
|
5
5
|
const scan = await scanRoutes(analysis.root, {
|
|
6
6
|
output: analysis.config.output,
|
|
7
7
|
paths: analysis.paths,
|
|
8
|
-
environment: analysis.environment,
|
|
9
8
|
inventory: {
|
|
10
9
|
routes: analysis.routes,
|
|
11
10
|
middleware: analysis.middleware,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { renameSync, rmSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { randomUUID } from "node:crypto";
|
|
3
|
+
//#region src/shared/atomic-write.ts
|
|
4
|
+
/** Write through a unique temporary file and rename it, so readers never see a partial file. */
|
|
5
|
+
function writeFileAtomic(path, content, mode) {
|
|
6
|
+
const temporary = `${path}.${randomUUID()}.tmp`;
|
|
7
|
+
try {
|
|
8
|
+
writeFileSync(temporary, content, {
|
|
9
|
+
flag: "wx",
|
|
10
|
+
mode
|
|
11
|
+
});
|
|
12
|
+
renameSync(temporary, path);
|
|
13
|
+
} finally {
|
|
14
|
+
rmSync(temporary, { force: true });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { writeFileAtomic as t };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { a as join } from "./dist-
|
|
2
|
-
import { C as deleteKeyringPassword, T as writeKeyringPassword, c as normalizePlatformApiUrl, i as getActivePlatformConnection, s as listPlatformConnections, u as platformCredentialAccount, w as readKeyringPassword } from "./platform-registry-
|
|
3
|
-
import {
|
|
4
|
-
import { t as cfAccessHeaders } from "./cf-access-
|
|
5
|
-
import { t as
|
|
1
|
+
import { a as join } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
+
import { C as deleteKeyringPassword, T as writeKeyringPassword, c as normalizePlatformApiUrl, i as getActivePlatformConnection, s as listPlatformConnections, u as platformCredentialAccount, w as readKeyringPassword } from "./platform-registry-B9mWX9LO.mjs";
|
|
3
|
+
import { a as readProjectPlatformUrl, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
4
|
+
import { t as cfAccessHeaders } from "./cf-access-BM9G0lhO.mjs";
|
|
5
|
+
import { t as ensurePlatformAccessToken } from "./cf-access-CWP4avfP.mjs";
|
|
6
6
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { createHash, randomBytes } from "node:crypto";
|
|
8
8
|
import { homedir } from "node:os";
|
|
9
|
+
import { execFile } from "node:child_process";
|
|
9
10
|
import { browserPageLead, browserPageStatus, renderBrowserPage } from "@void/platform/browser-page";
|
|
10
11
|
//#region src/cli/auth.ts
|
|
11
12
|
const CONFIG_DIR = join(homedir(), ".void");
|
|
@@ -97,20 +98,16 @@ function readTokenForOrigin(apiUrl, config) {
|
|
|
97
98
|
function getTokenSource() {
|
|
98
99
|
return process.env.VOID_TOKEN ? "ci" : "manual";
|
|
99
100
|
}
|
|
100
|
-
function saveToken(token, root = process.cwd(), dependencies = {}) {
|
|
101
|
-
savePlatformToken(token, getApiUrl(root), dependencies);
|
|
102
|
-
}
|
|
103
101
|
function readPlatformToken(apiUrl) {
|
|
104
102
|
return readOriginScopedToken(apiUrl, readConfig());
|
|
105
103
|
}
|
|
106
|
-
function savePlatformToken(token, origin
|
|
104
|
+
function savePlatformToken(token, origin) {
|
|
107
105
|
const apiUrl = normalizePlatformApiUrl(origin);
|
|
108
|
-
|
|
109
|
-
if ((dependencies.keyringSet ?? keyringSet)(account, token)) return;
|
|
106
|
+
if (keyringSet(platformCredentialAccount(apiUrl), token)) return;
|
|
110
107
|
throw new Error("auth: The system keychain is unavailable. Refusing to store your platform token in plaintext. Configure a system keychain, or set VOID_TOKEN from a secret manager in headless environments.");
|
|
111
108
|
}
|
|
112
109
|
function removeToken(root = process.cwd()) {
|
|
113
|
-
const apiUrl =
|
|
110
|
+
const apiUrl = getApiUrl(root);
|
|
114
111
|
const account = platformCredentialAccount(apiUrl);
|
|
115
112
|
let removed = false;
|
|
116
113
|
if (keyringDelete(account)) removed = true;
|
|
@@ -137,9 +134,8 @@ function createCodeChallenge(verifier) {
|
|
|
137
134
|
return base64Url(createHash("sha256").update(verifier).digest());
|
|
138
135
|
}
|
|
139
136
|
async function exchangeLoginCode(apiUrl, code, state, codeVerifier) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
const res = await fetch(new URL("auth/cli/token", base), {
|
|
137
|
+
ensurePlatformAccessToken(apiUrl);
|
|
138
|
+
const res = await fetch(`${apiUrl}/auth/cli/token`, {
|
|
143
139
|
method: "POST",
|
|
144
140
|
headers: {
|
|
145
141
|
"Content-Type": "application/json",
|
|
@@ -181,48 +177,32 @@ function page(title, message) {
|
|
|
181
177
|
content: browserPageStatus(title === "Login failed" ? "error" : "success") + browserPageLead(title, message)
|
|
182
178
|
});
|
|
183
179
|
}
|
|
184
|
-
function openBrowser(url, execFile) {
|
|
180
|
+
function openBrowser(url, run = execFile) {
|
|
185
181
|
const ignore = () => {};
|
|
186
182
|
if (process.platform === "win32") {
|
|
187
|
-
|
|
183
|
+
run("rundll32.exe", ["url.dll,FileProtocolHandler", url], ignore);
|
|
188
184
|
return;
|
|
189
185
|
}
|
|
190
186
|
if (process.platform === "darwin") {
|
|
191
|
-
|
|
187
|
+
run("open", [url], ignore);
|
|
192
188
|
return;
|
|
193
189
|
}
|
|
194
190
|
if (process.env.WSL_DISTRO_NAME || process.env.WSL_INTEROP) {
|
|
195
|
-
|
|
196
|
-
if (error)
|
|
191
|
+
run("wslview", [url], (error) => {
|
|
192
|
+
if (error) run("rundll32.exe", ["url.dll,FileProtocolHandler", url], ignore);
|
|
197
193
|
});
|
|
198
194
|
return;
|
|
199
195
|
}
|
|
200
|
-
|
|
196
|
+
run("xdg-open", [url], ignore);
|
|
201
197
|
}
|
|
202
198
|
/**
|
|
203
|
-
*
|
|
204
|
-
* authorize URL, and
|
|
205
|
-
*
|
|
206
|
-
* The server validates the `state` it appended to the callback URL against the
|
|
207
|
-
* incoming request, then runs the caller's `finalize` hook INSIDE the request
|
|
208
|
-
* handler (so the browser only ever sees the success page after the underlying
|
|
209
|
-
* exchange/link actually succeeded). On finalize success it renders the success
|
|
210
|
-
* HTML and resolves with finalize's return value; on finalize failure it
|
|
211
|
-
* renders the same "could not complete" failure page the login flow uses and
|
|
212
|
-
* rejects with the thrown error. The server is always closed before settling.
|
|
213
|
-
*
|
|
214
|
-
* `onUrl` is invoked with the authorize URL once the local server is listening,
|
|
215
|
-
* so callers can show the URL to the user as a manual fallback when the browser
|
|
216
|
-
* fails to open (common on WSL2, headless SSH, Docker, etc.). To match the
|
|
217
|
-
* login flow it fires immediately before the browser is opened.
|
|
218
|
-
*
|
|
219
|
-
* `execFile` is injectable so tests can avoid launching a real browser.
|
|
199
|
+
* Serve `http://localhost:PORT/callback`, open the browser at the caller's
|
|
200
|
+
* authorize URL, and settle with `finalize`'s result. The server closes before settling.
|
|
220
201
|
*/
|
|
221
202
|
async function awaitBrowserCallback(options) {
|
|
222
203
|
const http = await import("node:http");
|
|
223
204
|
const { state, buildAuthUrl, finalize, describeError, validate, onUrl } = options;
|
|
224
205
|
const timeoutMs = options.timeoutMs ?? 3e5;
|
|
225
|
-
const execFile = options.execFile ?? (await import("node:child_process")).execFile;
|
|
226
206
|
return new Promise((resolve, reject) => {
|
|
227
207
|
let settled = false;
|
|
228
208
|
const fail = (error) => {
|
|
@@ -295,37 +275,24 @@ async function awaitBrowserCallback(options) {
|
|
|
295
275
|
return;
|
|
296
276
|
}
|
|
297
277
|
onUrl?.(authUrl);
|
|
298
|
-
openBrowser(authUrl, execFile);
|
|
278
|
+
openBrowser(authUrl, options.execFile);
|
|
299
279
|
});
|
|
300
280
|
setTimeout(() => {
|
|
301
281
|
fail(/* @__PURE__ */ new Error("auth: Login timed out after 5 minutes. Try again."));
|
|
302
282
|
}, timeoutMs).unref();
|
|
303
283
|
});
|
|
304
284
|
}
|
|
305
|
-
/**
|
|
306
|
-
* Start a local HTTP server, open the browser to the platform login page,
|
|
307
|
-
* and wait for the OAuth callback with a short-lived code. The CLI exchanges
|
|
308
|
-
* the code itself so the localhost callback never accepts bearer tokens.
|
|
309
|
-
*
|
|
310
|
-
* `onUrl` is invoked with the login URL once the local server is listening,
|
|
311
|
-
* so callers can show the URL to the user as a manual fallback when the
|
|
312
|
-
* browser fails to open (common on WSL2, headless SSH, Docker, etc.).
|
|
313
|
-
*/
|
|
314
|
-
async function runLogin(root = process.cwd(), provider = "github", onUrl) {
|
|
315
|
-
return runPlatformLogin(getApiUrl(root), provider, onUrl);
|
|
316
|
-
}
|
|
285
|
+
/** The CLI exchanges the code itself, so the localhost callback never accepts bearer tokens. */
|
|
317
286
|
async function runPlatformLogin(origin, provider = "github", onUrl) {
|
|
318
|
-
const { execFile } = await import("node:child_process");
|
|
319
287
|
const apiUrl = normalizePlatformApiUrl(origin);
|
|
320
288
|
const state = randomBytes(32).toString("hex");
|
|
321
289
|
const codeVerifier = createCodeVerifier();
|
|
322
290
|
const codeChallenge = createCodeChallenge(codeVerifier);
|
|
323
291
|
return awaitBrowserCallback({
|
|
324
292
|
state,
|
|
325
|
-
execFile,
|
|
326
293
|
onUrl,
|
|
327
294
|
buildAuthUrl: (callback) => {
|
|
328
|
-
const loginUrl = new URL(
|
|
295
|
+
const loginUrl = new URL(`${apiUrl}/auth/login`);
|
|
329
296
|
loginUrl.searchParams.set("redirect", callback.href);
|
|
330
297
|
loginUrl.searchParams.set("provider", provider);
|
|
331
298
|
loginUrl.searchParams.set("code_challenge", codeChallenge);
|
|
@@ -342,4 +309,4 @@ async function runPlatformLogin(origin, provider = "github", onUrl) {
|
|
|
342
309
|
});
|
|
343
310
|
}
|
|
344
311
|
//#endregion
|
|
345
|
-
export { getApiUrl as a, getToken as c, readPlatformToken as d, removeToken as f,
|
|
312
|
+
export { getApiUrl as a, getToken as c, readPlatformToken as d, removeToken as f, getAccountCredential as i, getTokenSource as l, savePlatformToken as m, createCodeChallenge as n, getProxyUrl as o, runPlatformLogin as p, createCodeVerifier as r, getSiteDomain as s, awaitBrowserCallback as t, openBrowser as u };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { a as getApiUrl, s as getSiteDomain, p as runPlatformLogin } from "./auth-B6iOCjKI.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as getApiUrl, c as getToken,
|
|
2
|
-
import { L as log } from "./dist-
|
|
3
|
-
import {
|
|
4
|
-
import { r as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { a as getApiUrl, c as getToken, m as savePlatformToken, p as runPlatformLogin, u as openBrowser } from "./auth-B6iOCjKI.mjs";
|
|
2
|
+
import { L as log } from "./dist-BVdsO7Py.mjs";
|
|
3
|
+
import { l as formatUrl } from "./output-Ba6ZbrzY.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
|
|
5
|
+
import { r as selectPlatformLoginMethod } from "./login-C2T1oVG-.mjs";
|
|
6
|
+
import { t as discoverPlatform } from "./platform-cmd-DaAOiWTl.mjs";
|
|
7
7
|
//#region src/cli/auth-link.ts
|
|
8
8
|
async function runAuthLink(root, connectionId) {
|
|
9
9
|
const token = getToken(root);
|
|
@@ -12,16 +12,16 @@ async function runAuthLink(root, connectionId) {
|
|
|
12
12
|
const platform = await discoverPlatform(apiUrl);
|
|
13
13
|
if (!platform.authentication) throw new Error("auth: This platform must be upgraded before linking login methods.");
|
|
14
14
|
const target = await selectPlatformLoginMethod(platform, connectionId);
|
|
15
|
-
const existing = await new PlatformClient(token, apiUrl).whoami();
|
|
15
|
+
const existing = await new PlatformClient(token, { apiUrl }).whoami();
|
|
16
16
|
log.info(`Sign in again to ${existing.login} using an already linked login method.`);
|
|
17
17
|
const source = await selectPlatformLoginMethod(platform);
|
|
18
|
-
const freshToken = await runPlatformLogin(apiUrl, source.id, (url) => log.info(`Sign in: ${url}`));
|
|
19
|
-
const client = new PlatformClient(freshToken, apiUrl);
|
|
18
|
+
const freshToken = await runPlatformLogin(apiUrl, source.id, (url) => log.info(`Sign in: ${formatUrl(url)}`));
|
|
19
|
+
const client = new PlatformClient(freshToken, { apiUrl });
|
|
20
20
|
if ((await client.whoami()).id !== existing.id) throw new Error("auth: You signed in to a different Void account. Start again with a login method already linked to your original account.");
|
|
21
21
|
savePlatformToken(freshToken, apiUrl);
|
|
22
22
|
const launch = await client.startIdentityLink(target.id);
|
|
23
|
-
log.info(`Authenticate with ${target.label}, then review and confirm the identity in your browser.\n${launch.url}`);
|
|
24
|
-
openBrowser(launch.url
|
|
23
|
+
log.info(`Authenticate with ${target.label}, then review and confirm the identity in your browser.\n${formatUrl(launch.url)}`);
|
|
24
|
+
openBrowser(launch.url);
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
27
|
export { runAuthLink };
|