void 0.26.0 → 0.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS_TEMPLATE.md +1 -3
- package/README.md +19 -9
- package/dist/{account-cmd-CDry3B5V.mjs → account-cmd-CfUXh_nU.mjs} +8 -7
- package/dist/{application-analysis-DC2yPvzY.mjs → application-analysis-DKy02UY0.mjs} +21 -32
- package/dist/{application-routing-C9khgLiS.mjs → application-routing-DQyUh_5S.mjs} +1 -1
- package/dist/{auth-D52yG7hl.mjs → auth-B5_tZLxT.mjs} +7 -7
- package/dist/{auth-B60QDbjg.mjs → auth-BgX2qYSY.mjs} +1 -1
- package/dist/{auth-link-DjeOptYi.mjs → auth-link-D5RmKnzh.mjs} +5 -5
- package/dist/{auth-migrations-9vif1uj8.mjs → auth-migrations-BwHgeEsD.mjs} +8 -18
- package/dist/{auth-router-BRxIuqDi.mjs → auth-router-Bap-pvbn.mjs} +4 -17
- package/dist/{better-auth-shared-BVkjZ3vM.d.mts → better-auth-shared-CPvWD3nG.d.mts} +0 -4
- package/dist/{better-auth-shared-hy6RPh9W.mjs → better-auth-shared-DPpj8zxc.mjs} +94 -16
- package/dist/{build-cmd-Ce3C8huo.mjs → build-cmd-B58c8iS8.mjs} +7 -6
- package/dist/{cache-CS8Yxr5a.mjs → cache-Bo52trKF.mjs} +7 -7
- package/dist/{cancel-deploy-mZsD88Xa.mjs → cancel-deploy-BZNz3Q26.mjs} +5 -4
- package/dist/{cf-access-YTlqvAsk.mjs → cf-access-ngGqZpHZ.mjs} +10 -11
- package/dist/{cf-build-output-U8o1Gl6X.mjs → cf-build-output-DjvB_872.mjs} +62 -85
- package/dist/cf-build-output-H9a97vME.mjs +2 -0
- package/dist/cli/cli.mjs +48 -83
- package/dist/cli/cloudflare-operation-process.mjs +71 -77
- package/dist/cli/env-schema-probe.mjs +5 -6
- package/dist/client-By4JjMw_.mjs +2 -0
- package/dist/{client-mC-dFGDD.mjs → client-C2Prx_Bi.mjs} +28 -6
- package/dist/{cloudflare-auth-Qdc7tw8F.mjs → cloudflare-auth-CuxfF6OA.mjs} +9 -17
- package/dist/{cloudflare-cmd-bhwCxAN6.mjs → cloudflare-cmd-lHqNlJGW.mjs} +6 -5
- package/dist/{cloudflare-config-Bktvwtpf.mjs → cloudflare-config-BmhBv3HV.mjs} +1 -1
- package/dist/{cloudflare-connect-CuhRgk3k.mjs → cloudflare-connect-2G3rL2rP.mjs} +4 -4
- package/dist/{cloudflare-operations-DoQrVHAt.mjs → cloudflare-operations-BlYLlowZ.mjs} +1 -1
- package/dist/{cloudflare-operations-DYa3coIk.mjs → cloudflare-operations-CwI1bChl.mjs} +41 -70
- package/dist/{cloudflare-process-B-wekeR6.mjs → cloudflare-process-2-TfIEzB.mjs} +20 -22
- package/dist/{config-CyQ-wVd7.mjs → config-5r-YpMC-.mjs} +1 -1
- package/dist/{config-C_XRIPx2.mjs → config-B_ggY-IO.mjs} +3 -3
- package/dist/config-BtSFvXZx.mjs +2 -0
- package/dist/config-CLYAosnQ.mjs +78 -0
- package/dist/{config-BMHb8RCj.d.mts → config-CSa15FvD.d.mts} +1 -1
- package/dist/{config-Br_JZD6u.mjs → config-DiowPT80.mjs} +24 -30
- package/dist/config-entry.d.mts +1 -1
- package/dist/{config-write-B1f88wJA.mjs → config-write-AHGesphx.mjs} +8 -7
- package/dist/{connect-H6EvP62X.mjs → connect-X0MUA1gk.mjs} +10 -9
- package/dist/{create-project-B2kk9Q0o.mjs → create-project-DxiyW6iX.mjs} +6 -6
- package/dist/{create-project-Dbb4uiN-.mjs → create-project-iwkbqiBU.mjs} +1 -1
- package/dist/{db-DpCKZto0.mjs → db-XnVMHzoV.mjs} +100 -132
- package/dist/{delete-CxlSvsvW.mjs → delete-esYlMiSJ.mjs} +6 -6
- package/dist/{deploy-CeEbnv4b.mjs → deploy-BsEvnlJl.mjs} +2346 -2495
- package/dist/deploy-C1d-YTfp.mjs +2 -0
- package/dist/{dev-inbox-D64ZKUod.mjs → dev-inbox-CK-UuPob.mjs} +7 -16
- package/dist/{discover-BcPPiF1o.mjs → discover-CkCYv9T_.mjs} +1 -2
- package/dist/discover-EDUf6JJw.mjs +2 -0
- package/dist/{prompts-ZAuJlyCj.mjs → dist-Bx1z6Eva.mjs} +1 -1
- package/dist/{dist-AoCzRTJE.mjs → dist-Cegxq8gs.mjs} +8 -8
- package/dist/{prompts-6OSVA7DJ.mjs → dist-D3m88sjf.mjs} +10 -53
- package/dist/{domain-B_9VgOm6.mjs → domain-CbbBWhWE.mjs} +28 -29
- package/dist/{dotenv-VQxupEUv.mjs → dotenv-BfU6eqFt.mjs} +20 -32
- package/dist/{drizzle-Beb2Am5S.mjs → drizzle-CF84FOVM.mjs} +16 -13
- package/dist/{email-BokHgjKj.mjs → email-CpuT42g7.mjs} +23 -18
- package/dist/{email--tEtMoj_.mjs → email-d_Aux1vM.mjs} +1 -1
- package/dist/{entry-CF5wvH4w.mjs → entry-CMAkqBmU.mjs} +6 -6
- package/dist/{env-_v349JBd.mjs → env-BxocywBB.mjs} +25 -6
- package/dist/{env-D5liuQYR.mjs → env-DMA3cXZt.mjs} +1 -1
- package/dist/{env-raw-Cx8ElDdj.mjs → env-raw-jZpP5n47.mjs} +1 -2
- package/dist/{env-types-D5kds_OZ.mjs → env-types-CwXgeMgL.mjs} +1 -1
- package/dist/{env-validation-cZBvGWaP.mjs → env-validation-CrVNjsPm.mjs} +1 -1
- package/dist/{env-validation-vBSQ8gw5.mjs → env-validation-Dxdx_5wo.mjs} +17 -21
- package/dist/{env-BdTc-K2L.mjs → env-w9jOyGZn.mjs} +9 -9
- package/dist/{fetch-_SeGZao9.d.mts → fetch-BPCYVi3H.d.mts} +20 -1
- package/dist/{fetch-BIZJh7vR.mjs → fetch-sAcwjzLO.mjs} +1 -1
- package/dist/{fetch-stream-Nm3hkZbT.mjs → fetch-stream-PGgz4uGz.mjs} +18 -23
- package/dist/{fetch-stream-Bjf0hoZb.d.mts → fetch-stream-obvZ7fvO.d.mts} +1 -16
- package/dist/{gen-BhDlTpwW.mjs → gen-DtkQhvQg.mjs} +40 -57
- package/dist/gen-dA9hW7AV.mjs +2 -0
- package/dist/{github-cmd-hhkTzlGS.mjs → github-cmd-D_FsOFxq.mjs} +64 -163
- package/dist/{handler-DghKr6dU.mjs → handler-BHAn2fZJ.mjs} +1 -0
- package/dist/{handler-BeK3weD4.d.mts → handler-CNAwjRcW.d.mts} +4 -11
- package/dist/{head-Do8P4puT.d.mts → head-C8K_iGe6.d.mts} +1 -1
- package/dist/{head-D_QRR5Yd.mjs → head-D2VF4ApL.mjs} +29 -51
- package/dist/{headers-2rKda9Y6.mjs → headers-DlfR78Nu.mjs} +3 -3
- package/dist/{help-Bv44e2tm.mjs → help-CVFBTmBx.mjs} +13 -32
- package/dist/help-DzKUrQvk.mjs +2 -0
- package/dist/{inbound-fRkqcXaC.mjs → inbound-PfQDLXc5.mjs} +23 -24
- package/dist/index.d.mts +19 -2
- package/dist/index.mjs +617 -530
- package/dist/{info-DhtTKh65.mjs → info-PYWwkWyt.mjs} +4 -4
- package/dist/{init-BMf4T03q.mjs → init-Bw-fRKGp.mjs} +160 -197
- package/dist/{link-BqYsSS_I.mjs → link-DlPG8iX3.mjs} +9 -9
- package/dist/{list-_kBToO-l.mjs → list-2GN7_ueV.mjs} +8 -7
- package/dist/{live-CB1y5IuC.mjs → live-CgQuTpqD.mjs} +15 -16
- package/dist/{live-iAuEH1hd.d.mts → live-Du8jXwOW.d.mts} +4 -2
- package/dist/{local-d1-fGxYrVD6.mjs → local-d1-ga5O_idV.mjs} +2 -2
- package/dist/{login-DFuo-RWO.mjs → login-D-Q4xw3Q.mjs} +7 -7
- package/dist/login-Dc-wuTDq.mjs +2 -0
- package/dist/{logs-DYgnh6dH.mjs → logs-rd8J-OFh.mjs} +27 -10
- package/dist/migrate-BHp07yJE.mjs +2 -0
- package/dist/{migrate-CV1on-yJ.mjs → migrate-NLsjBbuM.mjs} +34 -20
- package/dist/{mime-D5Nmdzf7.mjs → mime-DxCznlJq.mjs} +45 -95
- package/dist/{node-C6Q6e1Es.mjs → node-DJicPvPj.mjs} +5 -5
- package/dist/{operator-args-DdY54Bgb.mjs → operator-args-BNsW5gfp.mjs} +10 -1
- package/dist/{operator-auth-2dsGlTT5.mjs → operator-auth-AzVLbrr3.mjs} +1 -1
- package/dist/{operator-client-BFqpp6z0.mjs → operator-client-BQtzyG-g.mjs} +1 -1
- package/dist/{operator-cmd-CUGHXrQf.mjs → operator-cmd-B6f6Cg9Z.mjs} +24 -11
- package/dist/operator-cmd-Cwn50lOV.mjs +2 -0
- package/dist/{output-BvdaehtE.mjs → output-C50ag2r3.mjs} +20 -2
- package/dist/pages/client.d.mts +19 -51
- package/dist/pages/client.mjs +204 -225
- package/dist/pages/head-client.d.mts +1 -1
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/head.mjs +1 -1
- package/dist/pages/index.d.mts +2 -2
- package/dist/pages/index.mjs +6 -12
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/islands-plugin.mjs +21 -25
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -2
- package/dist/{plan-CJGEeTEI.mjs → plan-BhLO2p4w.mjs} +2 -1
- package/dist/plan-CH2G51je.mjs +2 -0
- package/dist/{platform-args-DSV2p4nY.mjs → platform-args-BoZkWQnJ.mjs} +1 -1
- package/dist/platform-args-DYgITk0D.mjs +2 -0
- package/dist/{platform-auth-config-Bosx7U1h.mjs → platform-auth-config-n603OANg.mjs} +40 -36
- package/dist/{platform-auth-protection-DcbL_LW_.mjs → platform-auth-protection-zxDr0hWW.mjs} +8 -7
- package/dist/{platform-auth-recovery-WfTZ8K6o.mjs → platform-auth-recovery-tw9lgtgE.mjs} +7 -6
- package/dist/{platform-cmd-DbKtQb_4.mjs → platform-cmd-B8-bCb7t.mjs} +10 -10
- package/dist/{platform-cmd-dyFUof0t.mjs → platform-cmd-C00YM14r.mjs} +1 -1
- package/dist/{platform-domain-Bsq43AJp.mjs → platform-domain-p0kobLV8.mjs} +5 -5
- package/dist/{platform-lifecycle-Cfi0o6xM.mjs → platform-lifecycle-D_QEY32D.mjs} +75 -386
- package/dist/{platform-lifecycle--5gWmDoI.mjs → platform-lifecycle-vFqtNPPa.mjs} +1 -1
- package/dist/{platform-management-BrF9STZp.mjs → platform-management-BdYblvvE.mjs} +6 -6
- package/dist/{platform-management-Bbwf6-Dq.mjs → platform-management-oi-SvI3f.mjs} +1 -1
- package/dist/{platform-plans-config-DU-8nC2Y.mjs → platform-plans-config-CjiFv5J4.mjs} +5 -4
- package/dist/{platform-recovery-DQAqAQYu.mjs → platform-recovery-PvNS9Nl2.mjs} +2 -2
- package/dist/platform-setup-DVe42Ws7.mjs +299 -0
- package/dist/{plugin-inference-CXWnn79A.mjs → plugin-inference-BlQbOL0P.mjs} +43 -42
- package/dist/prepare-DRUV-g3X.mjs +2 -0
- package/dist/{prepare-WoUubFKL.mjs → prepare-Do96654b.mjs} +8 -8
- package/dist/{prepare-BMrRWLwP.mjs → prepare-Dq9hTIbo.mjs} +4 -4
- package/dist/{prerender-render-D9qbLs2f.mjs → prerender-render-Ct20jftc.mjs} +17 -3
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-cmd-BbH2LptN.mjs → project-cmd-ti8_yTcA.mjs} +18 -18
- package/dist/{project-team-Yiww3-go.mjs → project-team-CDPE1Tsg.mjs} +14 -17
- package/dist/{project-token-BrtT2NkY.mjs → project-token-CkZ1cN0Z.mjs} +13 -16
- package/dist/{project-tsconfig-B8GeM0RM.mjs → project-tsconfig-CVJhNMxs.mjs} +2 -1
- package/dist/{project-zero-trust-nYJ2V2nc.mjs → project-zero-trust-DdjLR61k.mjs} +11 -8
- package/dist/{protocol-BX8t2jiw.d.mts → protocol-BPZaNqBo.d.mts} +4 -2
- package/dist/{protocol-U7bfjHmA.mjs → protocol-CfaUwNs8.mjs} +46 -49
- package/dist/{providers-CJlNS3kT.mjs → providers-BXuhmuub.mjs} +1 -12
- package/dist/{provision-VeqAC77A.mjs → provision-BfaLiWbj.mjs} +38 -41
- package/dist/{provision-DMTPG8Rh.mjs → provision-Wu9ZBk9L.mjs} +2 -3
- package/dist/{requests-TIz_jtSu.mjs → requests-DFAqyYy8.mjs} +4 -4
- package/dist/resolve-project-BIeYs9Cw.mjs +2 -0
- package/dist/{resolve-project-BG5ORGID.mjs → resolve-project-CP8rZs_p.mjs} +6 -1
- package/dist/{rollback-dBqICPzj.mjs → rollback-BKYXBduI.mjs} +29 -36
- package/dist/{route-types-Clm4WD0B.mjs → route-types-CbtsIeFn.mjs} +1 -1
- package/dist/route-url-BgPja1GS.d.mts +5 -0
- package/dist/route-url-BjGv_KKY.mjs +28 -0
- package/dist/runner-9wjsSZx-.mjs +2 -0
- package/dist/{runner--2KF6Kua.mjs → runner-DMBKSrRk.mjs} +2 -2
- package/dist/{runner-mysql-DmWchSWJ.mjs → runner-mysql-CEzKtmFb.mjs} +8 -8
- package/dist/{runner-mysql-CEG5JozK.mjs → runner-mysql-CkFqZ6CE.mjs} +1 -1
- package/dist/{runner-pg-Bh4AgZdj.mjs → runner-pg-BGYRFdRp.mjs} +1 -1
- package/dist/runtime/ai.d.mts +1 -1
- package/dist/runtime/ai.mjs +34 -95
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.mjs +4 -9
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +5 -10
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +3 -3
- package/dist/runtime/client-react.d.mts +2 -3
- package/dist/runtime/client-react.mjs +2 -2
- package/dist/runtime/client-solid.d.mts +2 -3
- package/dist/runtime/client-solid.mjs +2 -2
- package/dist/runtime/client-svelte.d.mts +2 -3
- package/dist/runtime/client-svelte.mjs +2 -2
- package/dist/runtime/client-vue.d.mts +2 -3
- package/dist/runtime/client-vue.mjs +2 -2
- package/dist/runtime/client.d.mts +2 -3
- package/dist/runtime/client.mjs +2 -2
- package/dist/runtime/db.mjs +1 -1
- package/dist/runtime/durable.mjs +3 -10
- package/dist/runtime/email/testing.mjs +5 -5
- package/dist/runtime/email.d.mts +2 -1
- package/dist/runtime/email.mjs +11 -27
- package/dist/runtime/env-public.mjs +15 -20
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/fetch-stream.d.mts +2 -2
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.d.mts +2 -3
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +2 -2
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/kv.mjs +10 -11
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live-client.mjs +12 -22
- package/dist/runtime/live-server.mjs +27 -35
- package/dist/runtime/live.d.mts +2 -2
- package/dist/runtime/live.mjs +2 -2
- package/dist/runtime/migration-handler.mjs +4 -81
- package/dist/runtime/queues.mjs +1 -1
- package/dist/runtime/remote/binding-handler.d.mts +2 -2
- package/dist/runtime/remote/binding-handler.mjs +8 -9
- package/dist/runtime/remote/index.mjs +27 -77
- package/dist/runtime/route-url.d.mts +2 -4
- package/dist/runtime/route-url.mjs +1 -1
- package/dist/runtime/routing.d.mts +1 -1
- package/dist/runtime/routing.mjs +15 -26
- package/dist/runtime/sandbox.mjs +2 -2
- package/dist/runtime/sse.mjs +1 -1
- package/dist/runtime/storage.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +2 -2
- package/dist/runtime/ws-server.mjs +30 -61
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/runtime/ws.mjs +1 -1
- package/dist/{scan-C8dA7iM4.mjs → scan-C3uDzz6J.mjs} +12 -13
- package/dist/{secret-AKnNXNP5.mjs → secret-BAt2KMmO.mjs} +14 -14
- package/dist/{skills-BPQUGClu.mjs → skills-BgVMvQdy.mjs} +2 -2
- package/dist/{sse-CQNaDFFV.mjs → sse-CMvCgjNk.mjs} +1 -1
- package/dist/{subcommand-prompt-B6WS9Aoz.mjs → subcommand-prompt-BSlnD1fI.mjs} +2 -2
- package/dist/sveltekit.d.mts +0 -2
- package/dist/terminal-log-text-D9ACPOuG.mjs +32 -0
- package/dist/validate-BJr9LfXy.mjs +2 -0
- package/dist/{validate-ymhap6M_.mjs → validate-C9qJArv7.mjs} +9 -28
- package/dist/{defer-YsYDUoii.mjs → validation-error-Dg9Recn1.mjs} +11 -11
- package/dist/{wrangler-DhUerFkW.mjs → wrangler-D9KTuqnv.mjs} +89 -194
- package/dist/{ws-C79j4aED.d.mts → ws-CChrrAU-.d.mts} +1 -1
- package/dist/{yarn-pnp-BV4AzNul.mjs → yarn-pnp-CUX_iTPA.mjs} +19 -27
- package/{skills/void/docs → docs}/guide/ai.md +5 -3
- package/{skills/void/docs → docs}/guide/auth.md +37 -1
- package/{skills/void/docs → docs}/guide/database/postgresql.md +2 -2
- package/{skills/void/docs → docs}/guide/edge/revalidation.md +1 -1
- package/{skills/void/docs → docs}/guide/edge/rewrites.md +2 -4
- package/{skills/void/docs → docs}/guide/email/receiving.md +2 -2
- package/{skills/void/docs → docs}/guide/email/sending.md +0 -2
- package/{skills/void/docs → docs}/guide/env-vars.md +4 -0
- package/{skills/void/docs → docs}/guide/jobs.md +2 -2
- package/{skills/void/docs → docs}/guide/live.md +10 -5
- package/{skills/void/docs → docs}/guide/pages-routing/actions-and-forms.md +20 -8
- package/{skills/void/docs → docs}/guide/pages-routing/loaders.md +7 -3
- package/{skills/void/docs → docs}/guide/pages-routing/markdown.md +15 -23
- package/{skills/void/docs → docs}/guide/pages-routing/overview.md +6 -4
- package/{skills/void/docs → docs}/guide/platform/administration/access.md +2 -10
- package/{skills/void/docs → docs}/guide/platform/administration/operations.md +3 -12
- package/{skills/void/docs → docs}/guide/platform/administration/projects.md +1 -1
- package/{skills/void/docs → docs}/guide/platform/development/local.md +4 -2
- package/{skills/void/docs → docs}/guide/platform/development/runtime.md +1 -1
- package/{skills/void/docs → docs}/guide/platform/development/schema-ci.md +1 -1
- package/{skills/void/docs → docs}/guide/platform/installation/domains.md +3 -1
- package/{skills/void/docs → docs}/guide/platform/installation/first-deployment.md +3 -1
- package/{skills/void/docs → docs}/guide/platform/installation/maintenance.md +4 -0
- package/{skills/void/docs → docs}/guide/project-collaboration.md +6 -2
- package/{skills/void/docs → docs}/guide/queues.md +0 -2
- package/{skills/void/docs → docs}/guide/remote-dev.md +5 -5
- package/{skills/void/docs → docs}/guide/sandboxes.md +2 -2
- package/{skills/void/docs → docs}/guide/sse.md +0 -2
- package/{skills/void/docs → docs}/guide/storage.md +7 -2
- package/{skills/void/docs → docs}/guide/websockets.md +4 -0
- package/docs/integrations/agents.md +37 -0
- package/{skills/void/docs → docs}/integrations/frameworks/astro.md +3 -3
- package/{skills/void/docs → docs}/integrations/frameworks/nuxt.md +6 -2
- package/{skills/void/docs → docs}/integrations/hono.md +15 -7
- package/{skills/void/docs → docs}/integrations/nodejs-bun-deno.md +1 -0
- package/{skills/void/docs → docs}/reference/api/auth.md +1 -1
- package/{skills/void/docs → docs}/reference/api/handlers.md +4 -2
- package/{skills/void/docs → docs}/reference/api/pages.md +4 -0
- package/{skills/void/docs → docs}/reference/cli/auth.md +0 -5
- package/{skills/void/docs → docs}/reference/cli/database.md +3 -4
- package/{skills/void/docs → docs}/reference/cli/generate.md +1 -1
- package/{skills/void/docs → docs}/reference/cli/github.md +3 -12
- package/{skills/void/docs → docs}/reference/cli/platform-config.md +1 -1
- package/{skills/void/docs → docs}/reference/cli/platform-email.md +2 -3
- package/{skills/void/docs → docs}/reference/cli/platform-installation.md +1 -1
- package/{skills/void/docs → docs}/reference/cli/platform-operations.md +3 -0
- package/{skills/void/docs → docs}/reference/cli/platform-users.md +2 -2
- package/{skills/void/docs → docs}/reference/cli/project.md +5 -4
- package/{skills/void/docs → docs}/reference/cli/secrets.md +3 -3
- package/{skills/void/docs → docs}/reference/cli/setup.md +9 -11
- package/{skills/void/docs → docs}/reference/cli.md +1 -1
- package/{skills/void/docs → docs}/reference/config.md +13 -13
- package/{skills/void/docs → docs}/reference/resource-inference.md +1 -16
- package/package.json +34 -30
- package/schema.json +1 -1
- package/skills/migrate-vite-cloudflare-to-void/SKILL.md +4 -1
- package/skills/void/SKILL.md +6 -3
- package/dist/cf-build-output-ChY6-XWP.mjs +0 -2
- package/dist/client-BxVixJBI.mjs +0 -2
- package/dist/config-0acf1oys.mjs +0 -2
- package/dist/config-D8MOgiQV.mjs +0 -32
- package/dist/deploy-qmiLE1G1.mjs +0 -2
- package/dist/discover-AMCBXivQ.mjs +0 -2
- package/dist/fetch-error-Sp1R4mZv.d.mts +0 -20
- package/dist/gen-qCBwH3fZ.mjs +0 -2
- package/dist/help-Dw5f9Xrg.mjs +0 -2
- package/dist/login-D7meQg_3.mjs +0 -2
- package/dist/migrate-CEu2X5DB.mjs +0 -2
- package/dist/operator-cmd-DRPvhpjM.mjs +0 -2
- package/dist/plan-COtUvdMA.mjs +0 -2
- package/dist/platform-args-Dcy_5b_Y.mjs +0 -2
- package/dist/prepare-BBknoZI1.mjs +0 -2
- package/dist/resolve-project-DtbidV4y.mjs +0 -2
- package/dist/route-url-CG7U-cRN.mjs +0 -15
- package/dist/runner-voIltZrY.mjs +0 -2
- package/dist/validate-pna7R3Pv.mjs +0 -2
- package/skills/void/docs/integrations/agents.md +0 -26
- package/dist/{runner-pg-D4OPlil-.mjs → runner-pg-DV8p_zjA.mjs} +4 -4
- package/{skills/void/docs → docs}/guide/app-types.md +0 -0
- package/{skills/void/docs → docs}/guide/database/d1.md +2 -2
- package/{skills/void/docs → docs}/guide/database/mysql.md +0 -0
- package/{skills/void/docs → docs}/guide/database.md +8 -8
- package/{skills/void/docs → docs}/guide/deployment.md +0 -0
- package/{skills/void/docs → docs}/guide/durable-state.md +0 -0
- package/{skills/void/docs → docs}/guide/edge/headers.md +0 -0
- package/{skills/void/docs → docs}/guide/edge/prerendering.md +0 -0
- package/{skills/void/docs → docs}/guide/edge/redirects.md +0 -0
- package/{skills/void/docs → docs}/guide/edge/static-assets.md +0 -0
- package/{skills/void/docs → docs}/guide/email/domains.md +0 -0
- package/{skills/void/docs → docs}/guide/email.md +0 -0
- package/{skills/void/docs → docs}/guide/index.md +0 -0
- package/{skills/void/docs → docs}/guide/kv.md +0 -0
- package/{skills/void/docs → docs}/guide/pages-routing/head.md +0 -0
- package/{skills/void/docs → docs}/guide/pages-routing/islands.md +2 -2
- package/{skills/void/docs → docs}/guide/pages-routing/layouts.md +0 -0
- package/{skills/void/docs → docs}/guide/pages-routing/view-transitions.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/administration/email.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/administration/plans.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/administration/zero-trust.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/installation/ci.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/installation/credentials.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/installation/prerequisites.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/installation/setup.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/installation/uninstall.md +0 -0
- package/{skills/void/docs → docs}/guide/platform-administration.md +0 -0
- package/{skills/void/docs → docs}/guide/platform-development.md +0 -0
- package/{skills/void/docs → docs}/guide/quickstart.md +0 -0
- package/{skills/void/docs → docs}/guide/self-hosted-platform.md +0 -0
- package/{skills/void/docs → docs}/guide/server-routing.md +3 -3
- package/{skills/void/docs → docs}/guide/ssg.md +0 -0
- package/{skills/void/docs → docs}/guide/ssr.md +0 -0
- package/{skills/void/docs → docs}/guide/type-safety.md +0 -0
- package/{skills/void/docs → docs}/guide/typed-fetch.md +0 -0
- package/{skills/void/docs → docs}/index.md +0 -0
- package/{skills/void/docs → docs}/integrations/cloudflare.md +0 -0
- package/{skills/void/docs → docs}/integrations/frameworks/analog.md +3 -3
- package/{skills/void/docs → docs}/integrations/frameworks/overview.md +0 -0
- package/{skills/void/docs → docs}/integrations/frameworks/react-router.md +3 -3
- package/{skills/void/docs → docs}/integrations/frameworks/sveltekit.md +1 -1
- package/{skills/void/docs → docs}/integrations/frameworks/tanstack-start.md +2 -2
- package/{skills/void/docs → docs}/reference/api/client.md +0 -0
- package/{skills/void/docs → docs}/reference/api/database.md +2 -2
- /package/{skills/void/docs → docs}/reference/api/durable.md +0 -0
- /package/{skills/void/docs → docs}/reference/api/env.md +0 -0
- /package/{skills/void/docs → docs}/reference/api/plugin.md +0 -0
- /package/{skills/void/docs → docs}/reference/api/resources.md +0 -0
- /package/{skills/void/docs → docs}/reference/api/rewrites.md +0 -0
- /package/{skills/void/docs → docs}/reference/api/types.md +0 -0
- /package/{skills/void/docs → docs}/reference/api.md +0 -0
- /package/{skills/void/docs → docs}/reference/cli/deploy.md +0 -0
- /package/{skills/void/docs → docs}/reference/cli/domains.md +0 -0
- /package/{skills/void/docs → docs}/reference/cli/email.md +0 -0
- /package/{skills/void/docs → docs}/reference/cli/platform-zero-trust.md +0 -0
- /package/{skills/void/docs → docs}/reference/cli/platform.md +0 -0
- /package/{skills/void/docs → docs}/reference/structure.md +0 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { a as join, l as relative, n as dirname } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import { n as readProjectPaths } from "./project-paths-GgcMozYz.mjs";
|
|
3
|
-
import { m as readConfig, u as getDatabaseDialect } from "./config-
|
|
3
|
+
import { m as readConfig, u as getDatabaseDialect } from "./config-DiowPT80.mjs";
|
|
4
4
|
import { n as readJournal, t as collectMigrations } from "./collect-DiTn9yr6.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as
|
|
9
|
-
import {
|
|
5
|
+
import { K as select, L as log, O as cancel, tt as isCancel } from "./dist-D3m88sjf.mjs";
|
|
6
|
+
import { d as printSuccess } from "./output-C50ag2r3.mjs";
|
|
7
|
+
import { n as ensureProjectTsconfig } from "./project-tsconfig-CVJhNMxs.mjs";
|
|
8
|
+
import { r as listDrizzleArtifacts, t as assertJournalCoherence } from "./validate-C9qJArv7.mjs";
|
|
9
|
+
import { n as writeDrizzleConfig } from "./config-CLYAosnQ.mjs";
|
|
10
|
+
import { t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-CUX_iTPA.mjs";
|
|
10
11
|
import { existsSync, mkdirSync, readFileSync, readdirSync, unlinkSync, writeFileSync } from "node:fs";
|
|
11
12
|
import { fileURLToPath } from "node:url";
|
|
12
13
|
import { spawnSync } from "node:child_process";
|
|
@@ -29,7 +30,7 @@ function writeIfNotExists(filePath, content) {
|
|
|
29
30
|
}
|
|
30
31
|
mkdirSync(dirname(filePath), { recursive: true });
|
|
31
32
|
writeFileSync(filePath, content);
|
|
32
|
-
log.
|
|
33
|
+
log.step(`Created ${filePath}`);
|
|
33
34
|
return true;
|
|
34
35
|
}
|
|
35
36
|
function formatTimestamp(date) {
|
|
@@ -57,12 +58,13 @@ function getNextMiddlewareNumber(middlewareDir) {
|
|
|
57
58
|
}
|
|
58
59
|
function drizzleColumnDef(col) {
|
|
59
60
|
const { name, type } = col;
|
|
61
|
+
const notNull = col.nullable ? "" : ".notNull()";
|
|
60
62
|
switch (type) {
|
|
61
63
|
case "string":
|
|
62
|
-
case "text": return ` ${name}: text("${name}")
|
|
63
|
-
case "integer": return ` ${name}: integer("${name}")
|
|
64
|
-
case "boolean": return ` ${name}: integer("${name}", { mode: "boolean" })
|
|
65
|
-
case "real": return ` ${name}: real("${name}")
|
|
64
|
+
case "text": return ` ${name}: text("${name}")${notNull},`;
|
|
65
|
+
case "integer": return ` ${name}: integer("${name}")${notNull},`;
|
|
66
|
+
case "boolean": return ` ${name}: integer("${name}", { mode: "boolean" })${notNull}.default(false),`;
|
|
67
|
+
case "real": return ` ${name}: real("${name}")${notNull},`;
|
|
66
68
|
default: return ` ${name}: text("${name}"),`;
|
|
67
69
|
}
|
|
68
70
|
}
|
|
@@ -88,12 +90,13 @@ function drizzleImportsForColumns(columns) {
|
|
|
88
90
|
}
|
|
89
91
|
function drizzleColumnDefPg(col) {
|
|
90
92
|
const { name, type } = col;
|
|
93
|
+
const notNull = col.nullable ? "" : ".notNull()";
|
|
91
94
|
switch (type) {
|
|
92
95
|
case "string":
|
|
93
|
-
case "text": return ` ${name}: text("${name}")
|
|
94
|
-
case "integer": return ` ${name}: integer("${name}")
|
|
95
|
-
case "boolean": return ` ${name}: boolean("${name}")
|
|
96
|
-
case "real": return ` ${name}: doublePrecision("${name}")
|
|
96
|
+
case "text": return ` ${name}: text("${name}")${notNull},`;
|
|
97
|
+
case "integer": return ` ${name}: integer("${name}")${notNull},`;
|
|
98
|
+
case "boolean": return ` ${name}: boolean("${name}")${notNull}.default(false),`;
|
|
99
|
+
case "real": return ` ${name}: doublePrecision("${name}")${notNull},`;
|
|
97
100
|
default: return ` ${name}: text("${name}"),`;
|
|
98
101
|
}
|
|
99
102
|
}
|
|
@@ -123,12 +126,13 @@ function drizzleImportsForColumnsPg(columns) {
|
|
|
123
126
|
}
|
|
124
127
|
function drizzleColumnDefMySql(col) {
|
|
125
128
|
const { name, type } = col;
|
|
129
|
+
const notNull = col.nullable ? "" : ".notNull()";
|
|
126
130
|
switch (type) {
|
|
127
131
|
case "string":
|
|
128
|
-
case "text": return ` ${name}: text("${name}")
|
|
129
|
-
case "integer": return ` ${name}: int("${name}")
|
|
130
|
-
case "boolean": return ` ${name}: boolean("${name}")
|
|
131
|
-
case "real": return ` ${name}: double("${name}")
|
|
132
|
+
case "text": return ` ${name}: text("${name}")${notNull},`;
|
|
133
|
+
case "integer": return ` ${name}: int("${name}")${notNull},`;
|
|
134
|
+
case "boolean": return ` ${name}: boolean("${name}")${notNull}.default(false),`;
|
|
135
|
+
case "real": return ` ${name}: double("${name}")${notNull},`;
|
|
132
136
|
default: return ` ${name}: text("${name}"),`;
|
|
133
137
|
}
|
|
134
138
|
}
|
|
@@ -299,8 +303,7 @@ function generateIndexRoute(name, columns, validator) {
|
|
|
299
303
|
`import { ${name} } from "@schema";`
|
|
300
304
|
].filter(Boolean).join("\n");
|
|
301
305
|
const insertFields = columns.map((c) => `${c.name}: body.${c.name}`).join(", ");
|
|
302
|
-
if (columns.length === 0 || validator === "none") {
|
|
303
|
-
if (columns.length > 0) return `import { defineHandler } from "void";
|
|
306
|
+
if (columns.length === 0 || validator === "none") return `import { defineHandler } from "void";
|
|
304
307
|
import { db } from "void/db";
|
|
305
308
|
import { ${name} } from "@schema";
|
|
306
309
|
|
|
@@ -310,25 +313,10 @@ export const GET = defineHandler(async () => {
|
|
|
310
313
|
|
|
311
314
|
export const POST = defineHandler(async (c) => {
|
|
312
315
|
const body = await c.req.json();
|
|
313
|
-
await db.insert(${name}).values({ ${insertFields} });
|
|
314
|
-
return { created: true };
|
|
315
|
-
});
|
|
316
|
-
`;
|
|
317
|
-
return `import { defineHandler } from "void";
|
|
318
|
-
import { db } from "void/db";
|
|
319
|
-
import { ${name} } from "@schema";
|
|
320
|
-
|
|
321
|
-
export const GET = defineHandler(async () => {
|
|
322
|
-
return db.select().from(${name});
|
|
323
|
-
});
|
|
324
|
-
|
|
325
|
-
export const POST = defineHandler(async (c) => {
|
|
326
|
-
const body = await c.req.json();
|
|
327
|
-
await db.insert(${name}).values(body);
|
|
316
|
+
await db.insert(${name}).values(${columns.length > 0 ? `{ ${insertFields} }` : "body"});
|
|
328
317
|
return { created: true };
|
|
329
318
|
});
|
|
330
319
|
`;
|
|
331
|
-
}
|
|
332
320
|
return `${imports}
|
|
333
321
|
|
|
334
322
|
export const GET = defineHandler(async () => {
|
|
@@ -444,11 +432,11 @@ async function runModel(root, name, columns) {
|
|
|
444
432
|
if (!existing.includes(exportLine)) writeFileSync(barrelPath, existing.trimEnd() + "\n" + exportLine + "\n");
|
|
445
433
|
} else writeFileSync(barrelPath, exportLine + "\n");
|
|
446
434
|
ensureProjectTsconfig(root, void 0, true, true, { paths });
|
|
447
|
-
log.
|
|
448
|
-
log.
|
|
435
|
+
log.step(`Created ${relative(root, modelPath)}`);
|
|
436
|
+
log.step(`Updated ${relative(root, barrelPath)}`);
|
|
449
437
|
writeIfNotExists(join(paths.routesDir, "api", name, "index.ts"), generateIndexRoute(name, columns, validator));
|
|
450
438
|
writeIfNotExists(join(paths.routesDir, "api", name, "[id].ts"), generateIdRoute(name, validator));
|
|
451
|
-
|
|
439
|
+
printSuccess("Model scaffolding complete. Run `void db push` to apply.");
|
|
452
440
|
}
|
|
453
441
|
function runMigration(root, name) {
|
|
454
442
|
const migrationsDir = readProjectPaths(root).migrationsDir;
|
|
@@ -536,8 +524,8 @@ function runMigration(root, name) {
|
|
|
536
524
|
process.exit(1);
|
|
537
525
|
}
|
|
538
526
|
const newSqlFile = readdirSync(migrationsDir).filter((f) => f.endsWith(".sql")).find((f) => !sqlFilesBefore.has(f));
|
|
539
|
-
if (newSqlFile) log.
|
|
540
|
-
|
|
527
|
+
if (newSqlFile) log.step(`Created db/migrations/${newSqlFile}`);
|
|
528
|
+
printSuccess("Migration created and journal updated.");
|
|
541
529
|
return;
|
|
542
530
|
}
|
|
543
531
|
if (existingJournal !== void 0 && existingJournal.entries.length === 0) {
|
|
@@ -548,11 +536,10 @@ function runMigration(root, name) {
|
|
|
548
536
|
}
|
|
549
537
|
}
|
|
550
538
|
const tag = `${getMigrationTimestamp(migrationsDir)}_${name}`;
|
|
551
|
-
writeIfNotExists(join(migrationsDir, `${tag}.sql`), `-- ${name}\n`);
|
|
552
|
-
outro("Migration created.");
|
|
539
|
+
if (writeIfNotExists(join(migrationsDir, `${tag}.sql`), `-- ${name}\n`)) printSuccess("Migration created.");
|
|
553
540
|
}
|
|
554
541
|
function runRoute(root, routePath, methods) {
|
|
555
|
-
writeIfNotExists(join(readProjectPaths(root).routesDir, routePath + ".ts"), `import { defineHandler } from "void";
|
|
542
|
+
if (writeIfNotExists(join(readProjectPaths(root).routesDir, routePath + ".ts"), `import { defineHandler } from "void";
|
|
556
543
|
|
|
557
544
|
${methods.map((m) => {
|
|
558
545
|
const upper = m.toUpperCase();
|
|
@@ -560,35 +547,32 @@ ${methods.map((m) => {
|
|
|
560
547
|
return { message: "${upper} ${routePath}" };
|
|
561
548
|
});`;
|
|
562
549
|
}).join("\n\n")}
|
|
563
|
-
`);
|
|
564
|
-
outro("Route created.");
|
|
550
|
+
`)) printSuccess("Route created.");
|
|
565
551
|
}
|
|
566
552
|
function runMiddleware(root, name) {
|
|
567
553
|
const middlewareDir = readProjectPaths(root).middlewareDir;
|
|
568
554
|
mkdirSync(middlewareDir, { recursive: true });
|
|
569
555
|
const num = getNextMiddlewareNumber(middlewareDir);
|
|
570
|
-
writeIfNotExists(join(middlewareDir, `${num}.${name}.ts`), `import { defineMiddleware } from "void";
|
|
556
|
+
if (writeIfNotExists(join(middlewareDir, `${num}.${name}.ts`), `import { defineMiddleware } from "void";
|
|
571
557
|
|
|
572
558
|
export default defineMiddleware(async (c, next) => {
|
|
573
559
|
// TODO: implement ${name} middleware
|
|
574
560
|
await next();
|
|
575
561
|
});
|
|
576
|
-
`);
|
|
577
|
-
outro("Middleware created.");
|
|
562
|
+
`)) printSuccess("Middleware created.");
|
|
578
563
|
}
|
|
579
564
|
function runCron(root, name) {
|
|
580
|
-
writeIfNotExists(join(readProjectPaths(root).cronsDir, name + ".ts"), `import { defineScheduled } from "void";
|
|
565
|
+
if (writeIfNotExists(join(readProjectPaths(root).cronsDir, name + ".ts"), `import { defineScheduled } from "void";
|
|
581
566
|
|
|
582
567
|
export const cron = "* * * * *";
|
|
583
568
|
|
|
584
569
|
export default defineScheduled(async (controller, env) => {
|
|
585
570
|
// TODO: implement ${name}
|
|
586
571
|
});
|
|
587
|
-
`);
|
|
588
|
-
outro("Cron job created.");
|
|
572
|
+
`)) printSuccess("Cron job created.");
|
|
589
573
|
}
|
|
590
574
|
function runQueue(root, name) {
|
|
591
|
-
writeIfNotExists(join(readProjectPaths(root).queuesDir, name + ".ts"), `import { defineQueue } from "void";
|
|
575
|
+
if (writeIfNotExists(join(readProjectPaths(root).queuesDir, name + ".ts"), `import { defineQueue } from "void";
|
|
592
576
|
|
|
593
577
|
type Message = {};
|
|
594
578
|
|
|
@@ -600,8 +584,7 @@ export default defineQueue<Message>(async (batch, env) => {
|
|
|
600
584
|
// TODO: process message
|
|
601
585
|
}
|
|
602
586
|
});
|
|
603
|
-
`);
|
|
604
|
-
outro("Queue consumer created.");
|
|
587
|
+
`)) printSuccess("Queue consumer created.");
|
|
605
588
|
}
|
|
606
589
|
function runSsr(root, framework) {
|
|
607
590
|
if (!framework) framework = detectFramework(root);
|
|
@@ -609,7 +592,7 @@ function runSsr(root, framework) {
|
|
|
609
592
|
else if (framework === "vue") writeVueSsr(root);
|
|
610
593
|
else if (framework === "svelte") writeSvelteSsr(root);
|
|
611
594
|
else writeSolidSsr(root);
|
|
612
|
-
|
|
595
|
+
printSuccess("SSR scaffolding complete.");
|
|
613
596
|
}
|
|
614
597
|
function detectFramework(root) {
|
|
615
598
|
const pkgPath = join(root, "package.json");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
2
|
-
import { c as getToken, n as createCodeChallenge, r as createCodeVerifier, t as awaitBrowserCallback, u as openBrowser } from "./auth-
|
|
3
|
-
import { A as confirm, K as select, L as log, O as cancel, X as text, tt as isCancel } from "./
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
2
|
+
import { c as getToken, n as createCodeChallenge, r as createCodeVerifier, t as awaitBrowserCallback, u as openBrowser } from "./auth-B5_tZLxT.mjs";
|
|
3
|
+
import { A as confirm, K as select, L as log, O as cancel, X as text, tt as isCancel } from "./dist-D3m88sjf.mjs";
|
|
4
|
+
import { d as printSuccess, l as import_picocolors } from "./output-C50ag2r3.mjs";
|
|
5
|
+
import { c as parsePlatformErrorBody, l as platformErrorMessage, n as PlatformApiError, r as PlatformClient } from "./client-C2Prx_Bi.mjs";
|
|
6
|
+
import { i as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-CP8rZs_p.mjs";
|
|
7
7
|
import { t as collectGitDeployMetadata } from "./git-metadata-D-gurjzG.mjs";
|
|
8
8
|
import { randomBytes } from "node:crypto";
|
|
9
9
|
//#region src/cli/github-cmd.ts
|
|
@@ -105,35 +105,35 @@ async function runGithubCommand(root, args) {
|
|
|
105
105
|
}
|
|
106
106
|
const client = new PlatformClient(token, { root });
|
|
107
107
|
switch (args.subcommand) {
|
|
108
|
-
case "install": return runInstall(
|
|
108
|
+
case "install": return runInstall(client);
|
|
109
109
|
case "installations": return runInstallations(client);
|
|
110
110
|
case "connect": return runConnect(root, client, args);
|
|
111
111
|
case "update": return runGithubUpdate(root, client, args);
|
|
112
112
|
case "status": return runStatus(root, client, args);
|
|
113
113
|
case "disconnect": return runGithubDisconnect(root, client, args);
|
|
114
|
-
case "link": return runGithubLink(
|
|
115
|
-
case "join": return runGithubJoin(
|
|
114
|
+
case "link": return runGithubLink(client);
|
|
115
|
+
case "join": return runGithubJoin(client);
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
119
119
|
* `void github install` — print the GitHub App install URL and open it.
|
|
120
120
|
*
|
|
121
121
|
* If the account has no linked GitHub identity, the server returns a 403 with
|
|
122
|
-
* the stable code `github_identity_required
|
|
122
|
+
* the stable code `github_identity_required`. Rather than telling the
|
|
123
123
|
* user to `void account login` (which risks forking into a second account), we run
|
|
124
124
|
* the link flow inline and retry the install URL exactly once.
|
|
125
125
|
*
|
|
126
126
|
* `linkIdentity` is injectable so tests can supply a fake linker instead of
|
|
127
127
|
* starting a real localhost callback server / browser.
|
|
128
128
|
*/
|
|
129
|
-
async function runInstall(
|
|
129
|
+
async function runInstall(client, linkIdentity = runGithubLink) {
|
|
130
130
|
let url;
|
|
131
131
|
try {
|
|
132
132
|
({url} = await client.getGithubInstallUrl());
|
|
133
133
|
} catch (err) {
|
|
134
134
|
if (err instanceof PlatformApiError && err.status === 403 && err.code === "github_identity_required") {
|
|
135
135
|
log.message("Your Void account needs a linked GitHub identity. Starting the GitHub link…");
|
|
136
|
-
await linkIdentity(
|
|
136
|
+
await linkIdentity(client);
|
|
137
137
|
try {
|
|
138
138
|
({url} = await client.getGithubInstallUrl());
|
|
139
139
|
} catch (retryErr) {
|
|
@@ -155,17 +155,17 @@ async function runInstall(root, client, linkIdentity = runGithubLink) {
|
|
|
155
155
|
* identity. Drives the platform's 3-endpoint link flow with a localhost +
|
|
156
156
|
* PKCE handshake, mirroring `void account login`.
|
|
157
157
|
*
|
|
158
|
-
*
|
|
159
|
-
* GitHub-less account
|
|
160
|
-
* non-exiting so a caller can continue; only error paths exit/throw.
|
|
158
|
+
* The success path is non-exiting so a caller (`github install` after a 403
|
|
159
|
+
* for a GitHub-less account) can continue; only error paths exit/throw.
|
|
161
160
|
*/
|
|
162
|
-
async function runGithubLink(
|
|
161
|
+
async function runGithubLink(client) {
|
|
163
162
|
const verifier = createCodeVerifier();
|
|
164
163
|
const challenge = createCodeChallenge(verifier);
|
|
165
164
|
const state = randomBytes(32).toString("hex");
|
|
166
165
|
let status;
|
|
167
166
|
try {
|
|
168
167
|
({status} = await awaitBrowserCallback({
|
|
168
|
+
successTitle: "GitHub account linked",
|
|
169
169
|
state,
|
|
170
170
|
buildAuthUrl: async (callback) => {
|
|
171
171
|
callback.searchParams.set("state", state);
|
|
@@ -191,8 +191,8 @@ async function runGithubLink(root, client) {
|
|
|
191
191
|
}
|
|
192
192
|
throw err;
|
|
193
193
|
}
|
|
194
|
-
if (status === "already_linked") log.
|
|
195
|
-
else
|
|
194
|
+
if (status === "already_linked") log.info("GitHub account already linked.");
|
|
195
|
+
else printSuccess("GitHub account linked.");
|
|
196
196
|
}
|
|
197
197
|
/**
|
|
198
198
|
* Browser round-trip (localhost + PKCE) that joins the caller to their
|
|
@@ -207,6 +207,7 @@ async function performGithubJoin(client) {
|
|
|
207
207
|
const challenge = createCodeChallenge(verifier);
|
|
208
208
|
const state = randomBytes(32).toString("hex");
|
|
209
209
|
const { count } = await awaitBrowserCallback({
|
|
210
|
+
successTitle: "GitHub installations joined",
|
|
210
211
|
state,
|
|
211
212
|
buildAuthUrl: async (callback) => {
|
|
212
213
|
callback.searchParams.set("state", state);
|
|
@@ -223,7 +224,7 @@ async function performGithubJoin(client) {
|
|
|
223
224
|
});
|
|
224
225
|
return count;
|
|
225
226
|
}
|
|
226
|
-
async function runGithubJoin(
|
|
227
|
+
async function runGithubJoin(client) {
|
|
227
228
|
let count;
|
|
228
229
|
try {
|
|
229
230
|
count = await performGithubJoin(client);
|
|
@@ -236,8 +237,8 @@ async function runGithubJoin(root, client) {
|
|
|
236
237
|
}
|
|
237
238
|
if (count === 0) log.info("No new installations to join.");
|
|
238
239
|
else {
|
|
239
|
-
log.success(`Joined ${count} installation${count === 1 ? "" : "s"}.`);
|
|
240
240
|
log.message("Run `void github installations` to see them, then `void github connect`.");
|
|
241
|
+
printSuccess(`Joined ${count} installation${count === 1 ? "" : "s"}.`);
|
|
241
242
|
}
|
|
242
243
|
}
|
|
243
244
|
async function runInstallations(client) {
|
|
@@ -251,11 +252,11 @@ async function runInstallations(client) {
|
|
|
251
252
|
/**
|
|
252
253
|
* Per-repo connect authorization round-trip for a non-owner org member.
|
|
253
254
|
*
|
|
254
|
-
* When the connect route returns 403 `connect_authorization_required
|
|
255
|
+
* When the connect route returns 403 `connect_authorization_required`,
|
|
255
256
|
* the member has no proof they can access the specific repo under the shared
|
|
256
257
|
* installation. This drives the same localhost + PKCE handshake as
|
|
257
258
|
* {@link runGithubLink}/{@link runGithubJoin}, but against the platform's
|
|
258
|
-
* connect-authorize route
|
|
259
|
+
* connect-authorize route: the callback mints and returns the grant IN
|
|
259
260
|
* the redirect URL (`?connect_grant=…`), so there is no separate `/complete`
|
|
260
261
|
* POST — `finalize` just reads the grant out of the callback query. A
|
|
261
262
|
* `?error=repo_not_accessible` callback is mapped to a friendly per-repo message
|
|
@@ -269,6 +270,7 @@ async function runGithubConnectAuthorize(client, installationId, repoFullName) {
|
|
|
269
270
|
const challenge = createCodeChallenge(verifier);
|
|
270
271
|
const state = randomBytes(32).toString("hex");
|
|
271
272
|
const { connectGrant } = await awaitBrowserCallback({
|
|
273
|
+
successTitle: "GitHub connection authorized",
|
|
272
274
|
state,
|
|
273
275
|
buildAuthUrl: async (callback) => {
|
|
274
276
|
callback.searchParams.set("state", state);
|
|
@@ -312,44 +314,48 @@ async function promptRepoFullName(root) {
|
|
|
312
314
|
}
|
|
313
315
|
return input.trim();
|
|
314
316
|
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
317
|
+
/**
|
|
318
|
+
* `--project` / `VOID_PROJECT`, then the linked project, then (TTY only) a
|
|
319
|
+
* picker. Exits with a `<command>:`-prefixed error when none resolves.
|
|
320
|
+
*/
|
|
321
|
+
async function resolveGithubProjectId(root, client, projectName, command, isTTY) {
|
|
322
|
+
const requestedSlug = getRequestedProjectSlug({ projectSlug: projectName || void 0 });
|
|
319
323
|
if (requestedSlug) {
|
|
320
324
|
const projects = await client.listProjects();
|
|
321
325
|
const resolved = resolveProjectBySlug(projects, requestedSlug);
|
|
322
326
|
if (!resolved) {
|
|
323
|
-
log.error(
|
|
327
|
+
log.error(`${command}: No project found with slug '${requestedSlug}'.`);
|
|
324
328
|
process.exit(1);
|
|
325
329
|
}
|
|
326
|
-
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
350
|
-
projectId = picked;
|
|
351
|
-
}
|
|
330
|
+
return resolved.projectId;
|
|
331
|
+
}
|
|
332
|
+
const linked = readProjectConfig(root);
|
|
333
|
+
if (linked) return linked.projectId;
|
|
334
|
+
if (!isTTY) {
|
|
335
|
+
log.error(`${command}: No project specified. Pass a project name or --project <name>, set VOID_PROJECT, or link one with \`void project link\`.`);
|
|
336
|
+
process.exit(1);
|
|
337
|
+
}
|
|
338
|
+
const projects = await client.listProjects();
|
|
339
|
+
if (projects.length === 0) {
|
|
340
|
+
log.error("No projects found. Create one first with `void deploy`.");
|
|
341
|
+
process.exit(1);
|
|
342
|
+
}
|
|
343
|
+
const picked = await select({
|
|
344
|
+
message: "Select a project:",
|
|
345
|
+
options: projects.map((p) => ({
|
|
346
|
+
value: p.id,
|
|
347
|
+
label: p.slug
|
|
348
|
+
}))
|
|
349
|
+
});
|
|
350
|
+
if (isCancel(picked)) {
|
|
351
|
+
cancel("Cancelled.");
|
|
352
|
+
process.exit(0);
|
|
352
353
|
}
|
|
354
|
+
return picked;
|
|
355
|
+
}
|
|
356
|
+
async function runConnect(root, client, args) {
|
|
357
|
+
const isTTY = process.stdin.isTTY === true;
|
|
358
|
+
const projectId = await resolveGithubProjectId(root, client, args.projectName, "connect", isTTY);
|
|
353
359
|
const listActiveInstallations = async () => (await client.listGithubInstallations()).filter((i) => i.status === "active");
|
|
354
360
|
let autoJoinAttempted = false;
|
|
355
361
|
const attemptAutoJoin = async () => {
|
|
@@ -536,7 +542,7 @@ async function runConnect(root, client, args) {
|
|
|
536
542
|
throw err;
|
|
537
543
|
}
|
|
538
544
|
}
|
|
539
|
-
|
|
545
|
+
printSuccess(`Connected ${repoFullName} (${branch}) → project. Push to ${branch} to deploy.`);
|
|
540
546
|
}
|
|
541
547
|
async function runGithubUpdate(root, client, args) {
|
|
542
548
|
const isTTY = process.stdin.isTTY === true;
|
|
@@ -544,42 +550,7 @@ async function runGithubUpdate(root, client, args) {
|
|
|
544
550
|
log.error("update: Nothing to update. Pass --branch <name>, --executor <container|github_actions>, and/or --workflow <.github/workflows/...>.");
|
|
545
551
|
process.exit(1);
|
|
546
552
|
}
|
|
547
|
-
|
|
548
|
-
const requestedSlug = getRequestedProjectSlug({ projectSlug: args.projectName || void 0 });
|
|
549
|
-
if (requestedSlug) {
|
|
550
|
-
const projects = await client.listProjects();
|
|
551
|
-
const resolved = resolveProjectBySlug(projects, requestedSlug);
|
|
552
|
-
if (!resolved) {
|
|
553
|
-
log.error(`update: No project found with slug '${requestedSlug}'.`);
|
|
554
|
-
process.exit(1);
|
|
555
|
-
}
|
|
556
|
-
projectId = resolved.projectId;
|
|
557
|
-
} else {
|
|
558
|
-
const linked = readProjectConfig(root);
|
|
559
|
-
if (linked) projectId = linked.projectId;
|
|
560
|
-
else if (!isTTY) {
|
|
561
|
-
log.error("update: No project specified. Pass a project name or --project <name>, set VOID_PROJECT, or link one with `void project link`.");
|
|
562
|
-
process.exit(1);
|
|
563
|
-
} else {
|
|
564
|
-
const projects = await client.listProjects();
|
|
565
|
-
if (projects.length === 0) {
|
|
566
|
-
log.error("No projects found. Create one first with `void deploy`.");
|
|
567
|
-
process.exit(1);
|
|
568
|
-
}
|
|
569
|
-
const picked = await select({
|
|
570
|
-
message: "Select a project:",
|
|
571
|
-
options: projects.map((p) => ({
|
|
572
|
-
value: p.id,
|
|
573
|
-
label: p.slug
|
|
574
|
-
}))
|
|
575
|
-
});
|
|
576
|
-
if (isCancel(picked)) {
|
|
577
|
-
cancel("Cancelled.");
|
|
578
|
-
process.exit(0);
|
|
579
|
-
}
|
|
580
|
-
projectId = picked;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
553
|
+
const projectId = await resolveGithubProjectId(root, client, args.projectName, "update", isTTY);
|
|
583
554
|
let current;
|
|
584
555
|
try {
|
|
585
556
|
current = await client.getGithubConnection(projectId);
|
|
@@ -672,7 +643,7 @@ async function runGithubUpdate(root, client, args) {
|
|
|
672
643
|
}
|
|
673
644
|
throw err;
|
|
674
645
|
}
|
|
675
|
-
|
|
646
|
+
printSuccess(`Updated ${updated.repo_full_name} → branch ${updated.branch}, executor ${updated.build_executor}, workflow ${updated.workflow_path}.`);
|
|
676
647
|
}
|
|
677
648
|
/**
|
|
678
649
|
* `void github status [project]` — print the current GitHub connection (repo,
|
|
@@ -682,42 +653,7 @@ async function runGithubUpdate(root, client, args) {
|
|
|
682
653
|
*/
|
|
683
654
|
async function runStatus(root, client, args) {
|
|
684
655
|
const isTTY = process.stdin.isTTY === true;
|
|
685
|
-
|
|
686
|
-
const requestedSlug = getRequestedProjectSlug({ projectSlug: args.projectName || void 0 });
|
|
687
|
-
if (requestedSlug) {
|
|
688
|
-
const projects = await client.listProjects();
|
|
689
|
-
const resolved = resolveProjectBySlug(projects, requestedSlug);
|
|
690
|
-
if (!resolved) {
|
|
691
|
-
log.error(`status: No project found with slug '${requestedSlug}'.`);
|
|
692
|
-
process.exit(1);
|
|
693
|
-
}
|
|
694
|
-
projectId = resolved.projectId;
|
|
695
|
-
} else {
|
|
696
|
-
const linked = readProjectConfig(root);
|
|
697
|
-
if (linked) projectId = linked.projectId;
|
|
698
|
-
else if (!isTTY) {
|
|
699
|
-
log.error("status: No project specified. Pass a project name or --project <name>, set VOID_PROJECT, or link one with `void project link`.");
|
|
700
|
-
process.exit(1);
|
|
701
|
-
} else {
|
|
702
|
-
const projects = await client.listProjects();
|
|
703
|
-
if (projects.length === 0) {
|
|
704
|
-
log.error("No projects found. Create one first with `void deploy`.");
|
|
705
|
-
process.exit(1);
|
|
706
|
-
}
|
|
707
|
-
const picked = await select({
|
|
708
|
-
message: "Select a project:",
|
|
709
|
-
options: projects.map((p) => ({
|
|
710
|
-
value: p.id,
|
|
711
|
-
label: p.slug
|
|
712
|
-
}))
|
|
713
|
-
});
|
|
714
|
-
if (isCancel(picked)) {
|
|
715
|
-
cancel("Cancelled.");
|
|
716
|
-
process.exit(0);
|
|
717
|
-
}
|
|
718
|
-
projectId = picked;
|
|
719
|
-
}
|
|
720
|
-
}
|
|
656
|
+
const projectId = await resolveGithubProjectId(root, client, args.projectName, "status", isTTY);
|
|
721
657
|
let connection;
|
|
722
658
|
try {
|
|
723
659
|
connection = await client.getGithubConnection(projectId);
|
|
@@ -743,42 +679,7 @@ async function runStatus(root, client, args) {
|
|
|
743
679
|
*/
|
|
744
680
|
async function runGithubDisconnect(root, client, args) {
|
|
745
681
|
const isTTY = process.stdin.isTTY === true;
|
|
746
|
-
|
|
747
|
-
const requestedSlug = getRequestedProjectSlug({ projectSlug: args.projectName || void 0 });
|
|
748
|
-
if (requestedSlug) {
|
|
749
|
-
const projects = await client.listProjects();
|
|
750
|
-
const resolved = resolveProjectBySlug(projects, requestedSlug);
|
|
751
|
-
if (!resolved) {
|
|
752
|
-
log.error(`disconnect: No project found with slug '${requestedSlug}'.`);
|
|
753
|
-
process.exit(1);
|
|
754
|
-
}
|
|
755
|
-
projectId = resolved.projectId;
|
|
756
|
-
} else {
|
|
757
|
-
const linked = readProjectConfig(root);
|
|
758
|
-
if (linked) projectId = linked.projectId;
|
|
759
|
-
else if (!isTTY) {
|
|
760
|
-
log.error("disconnect: No project specified. Pass a project name or --project <name>, set VOID_PROJECT, or link one with `void project link`.");
|
|
761
|
-
process.exit(1);
|
|
762
|
-
} else {
|
|
763
|
-
const projects = await client.listProjects();
|
|
764
|
-
if (projects.length === 0) {
|
|
765
|
-
log.error("No projects found. Create one first with `void deploy`.");
|
|
766
|
-
process.exit(1);
|
|
767
|
-
}
|
|
768
|
-
const picked = await select({
|
|
769
|
-
message: "Select a project:",
|
|
770
|
-
options: projects.map((p) => ({
|
|
771
|
-
value: p.id,
|
|
772
|
-
label: p.slug
|
|
773
|
-
}))
|
|
774
|
-
});
|
|
775
|
-
if (isCancel(picked)) {
|
|
776
|
-
cancel("Cancelled.");
|
|
777
|
-
process.exit(0);
|
|
778
|
-
}
|
|
779
|
-
projectId = picked;
|
|
780
|
-
}
|
|
781
|
-
}
|
|
682
|
+
const projectId = await resolveGithubProjectId(root, client, args.projectName, "disconnect", isTTY);
|
|
782
683
|
let connection;
|
|
783
684
|
try {
|
|
784
685
|
connection = await client.getGithubConnection(projectId);
|
|
@@ -828,7 +729,7 @@ async function runGithubDisconnect(root, client, args) {
|
|
|
828
729
|
}
|
|
829
730
|
throw err;
|
|
830
731
|
}
|
|
831
|
-
|
|
732
|
+
printSuccess(`Disconnected ${connection.repo_full_name}.`);
|
|
832
733
|
}
|
|
833
734
|
//#endregion
|
|
834
735
|
export { runGithubCommand };
|
|
@@ -111,6 +111,7 @@ function basicAuth(options) {
|
|
|
111
111
|
}
|
|
112
112
|
const username = resolveBasicAuthOption(options.username, "");
|
|
113
113
|
const password = resolveBasicAuthOption(options.password, "");
|
|
114
|
+
if (!password) throw new Error("basicAuth: the password resolved to an empty value. Set the credential before serving requests.");
|
|
114
115
|
const credentials = parseBasicAuthHeader(c.req.raw.headers.get("Authorization"));
|
|
115
116
|
const usernameMatches = credentials && timingSafeStringEqual(credentials.username, username);
|
|
116
117
|
const passwordMatches = credentials && timingSafeStringEqual(credentials.password, password);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { l as VoidPlatformSandbox } from "./sandbox-C5LFoJMf.mjs";
|
|
2
2
|
import { t as StandardSchemaV1 } from "./standard-schema-Fo_vCAZh.mjs";
|
|
3
|
-
import { n as HeadDescriptor } from "./head-
|
|
3
|
+
import { n as HeadDescriptor } from "./head-C8K_iGe6.mjs";
|
|
4
4
|
import { r as AuthUser, t as AuthSession } from "./auth-DkcFflXV.mjs";
|
|
5
5
|
import { Context, Env, MiddlewareHandler } from "hono";
|
|
6
6
|
import { RewriteDestination } from "void/routes";
|
|
@@ -69,12 +69,7 @@ declare class VoidAssetRewriteError extends Error {
|
|
|
69
69
|
override name: string;
|
|
70
70
|
constructor(destination: string);
|
|
71
71
|
}
|
|
72
|
-
/**
|
|
73
|
-
* Hono environment type for Void workers.
|
|
74
|
-
*
|
|
75
|
-
* Includes standard Cloudflare bindings plus request-scoped auth
|
|
76
|
-
* variables populated by Better Auth middleware.
|
|
77
|
-
*/
|
|
72
|
+
/** Hono `Variables` for Void workers, including auth values populated by Better Auth middleware. */
|
|
78
73
|
interface CloudContextVariables {
|
|
79
74
|
user: AuthUser | null;
|
|
80
75
|
session: AuthSession | null;
|
|
@@ -187,9 +182,7 @@ type RenderAssetTags = {
|
|
|
187
182
|
body: string;
|
|
188
183
|
};
|
|
189
184
|
type RenderFn = (c: CloudContext, assetTags: RenderAssetTags) => Response | Promise<Response>;
|
|
190
|
-
type
|
|
191
|
-
type JobExecutionContext = ExecutionContext;
|
|
192
|
-
type ScheduledFn = (controller: JobController, env: CloudEnv["Bindings"], ctx: JobExecutionContext) => unknown | Promise<unknown>;
|
|
185
|
+
type ScheduledFn = (controller: ScheduledController, env: CloudEnv["Bindings"], ctx: ExecutionContext) => unknown | Promise<unknown>;
|
|
193
186
|
type QueueRetryOptions = {
|
|
194
187
|
delaySeconds?: number;
|
|
195
188
|
};
|
|
@@ -232,7 +225,7 @@ type TypedHandler<V extends ValidatorSlots = {}, R = unknown> = {
|
|
|
232
225
|
/**
|
|
233
226
|
* Define a route handler, optionally composed with per-route middleware.
|
|
234
227
|
*
|
|
235
|
-
* Single argument: identity wrapper
|
|
228
|
+
* Single argument: identity wrapper.
|
|
236
229
|
* Multiple arguments: middleware chain + final handler, composed at runtime.
|
|
237
230
|
*/
|
|
238
231
|
declare function defineHandler<R>(handler: (c: CloudContext) => R | Response | Promise<R | Response>): TypedHandler<{}, Exclude<Awaited<R>, Response>>;
|
|
@@ -21,7 +21,7 @@ type HeadDescriptor = {
|
|
|
21
21
|
htmlAttrs?: Record<string, string>;
|
|
22
22
|
bodyAttrs?: Record<string, string>;
|
|
23
23
|
};
|
|
24
|
-
/**
|
|
24
|
+
/** Project-level head config with template support. */
|
|
25
25
|
type HeadConfig = HeadDescriptor & {
|
|
26
26
|
/** Title template — `%s` is replaced with the page title. */
|
|
27
27
|
titleTemplate?: string;
|