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,2 +1,2 @@
|
|
|
1
|
-
import { r as runPlatformLifecycleCommand } from "./platform-lifecycle-
|
|
1
|
+
import { r as runPlatformLifecycleCommand } from "./platform-lifecycle-D_QEY32D.mjs";
|
|
2
2
|
export { runPlatformLifecycleCommand };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as removePlatformConnectionForInstallation, g as removeInstallationRecoverySecrets, m as readInstallationRecoverySecrets, o as listInstallationManifests, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest, x as writeInstallationManifest } from "./platform-registry-P387v42A.mjs";
|
|
2
|
-
import { A as confirm, H as outro, K as select, L as log, tt as isCancel } from "./
|
|
3
|
-
import {
|
|
4
|
-
import { A as resolveBootstrapGitHubId, B as assertPlatformOperatorCredentialCanApplyPlan, C as purgeResourcesKeptReason, D as loadPlatformRuntime, E as runPurgeResourcesTeardown, F as formatPlatformInstallPlan, H as verifyPlatformCloudflareCredential, I as platformAdoptionIntentHash, J as hyperdriveOriginFromConnectionString, K as PlatformCloudflareClient, L as platformProvisionIntentHash, N as trackedPlatformWorkerTraffic, P as createPlatformInstallPlan, R as revalidatePlatformInstallAction, S as purgeResourcesHandlesEmailRouting, T as purgeResourcesPermissions, V as resolvePlatformCloudflareCredential, X as verifyPlatformRuntimeTokenPermissions, Y as hyperdriveOriginMatches, _ as describePurgeResourcesPlan, a as REMOTE_INSTALLATION_MANIFEST_KEY, b as isPurgedAccessResource, d as readPlatformProjectZeroTrustState, f as assertProjectZeroTrustAllowsUninstall, g as checkPurgeResourcesCredentials, h as assertNoPlatformProjects, k as createPlatformInstallationSecrets, m as PlatformResourceChangedError, n as resolvePlatformInstallDatabaseUrl, o as installPlatform, q as hyperdriveOriginConfigHash, s as acquirePlatformDatabaseLifecycleLock, t as assertNoninteractivePlatformMutationAcknowledged, u as readPlatformProjectSlugs, v as isPlatformTailWorker, w as purgeResourcesKeptResources, x as purgeResourcesAlwaysKept, y as isPurgeResourcesCandidate, z as platformDatabaseNameFromOwnerUrl } from "./platform-lifecycle-
|
|
2
|
+
import { A as confirm, H as outro, K as select, L as log, tt as isCancel } from "./dist-D3m88sjf.mjs";
|
|
3
|
+
import { d as printSuccess, l as import_picocolors, r as createSpinner, u as note } from "./output-C50ag2r3.mjs";
|
|
4
|
+
import { A as resolveBootstrapGitHubId, B as assertPlatformOperatorCredentialCanApplyPlan, C as purgeResourcesKeptReason, D as loadPlatformRuntime, E as runPurgeResourcesTeardown, F as formatPlatformInstallPlan, H as verifyPlatformCloudflareCredential, I as platformAdoptionIntentHash, J as hyperdriveOriginFromConnectionString, K as PlatformCloudflareClient, L as platformProvisionIntentHash, N as trackedPlatformWorkerTraffic, P as createPlatformInstallPlan, R as revalidatePlatformInstallAction, S as purgeResourcesHandlesEmailRouting, T as purgeResourcesPermissions, V as resolvePlatformCloudflareCredential, X as verifyPlatformRuntimeTokenPermissions, Y as hyperdriveOriginMatches, _ as describePurgeResourcesPlan, a as REMOTE_INSTALLATION_MANIFEST_KEY, b as isPurgedAccessResource, d as readPlatformProjectZeroTrustState, f as assertProjectZeroTrustAllowsUninstall, g as checkPurgeResourcesCredentials, h as assertNoPlatformProjects, k as createPlatformInstallationSecrets, m as PlatformResourceChangedError, n as resolvePlatformInstallDatabaseUrl, o as installPlatform, q as hyperdriveOriginConfigHash, s as acquirePlatformDatabaseLifecycleLock, t as assertNoninteractivePlatformMutationAcknowledged, u as readPlatformProjectSlugs, v as isPlatformTailWorker, w as purgeResourcesKeptResources, x as purgeResourcesAlwaysKept, y as isPurgeResourcesCandidate, z as platformDatabaseNameFromOwnerUrl } from "./platform-lifecycle-D_QEY32D.mjs";
|
|
5
5
|
import { PLATFORM_DISABLED_KEY, PLATFORM_DISABLED_VALUE, PLATFORM_R2_OWNERSHIP_MARKER_KEY, createPlatformResourceOwnershipMarker, parsePlatformInstallationManifest, parsePlatformResourceOwnershipMarker, recordInstallationResource, recordInstallationStep, setInstallationDesiredState, transitionInstallation } from "@void/platform";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
//#region src/cli/platform-management.ts
|
|
@@ -227,7 +227,6 @@ async function runInstalledPlatformCommand(args) {
|
|
|
227
227
|
].join("\n"), "Waiting for managed Sandbox drain");
|
|
228
228
|
return;
|
|
229
229
|
}
|
|
230
|
-
log.success(`${deployment.displayName}: runtime ${runtime.manifest.platformVersion} ${args.subcommand === "rollback" ? "restored" : "ready"}.`);
|
|
231
230
|
log.info(result.manifest.desiredState === "disabled" ? "Application traffic remains paused. Enable the installation when you are ready." : `Platform verification passed. Traffic is enabled at ${plan.apiUrl}.`);
|
|
232
231
|
if (args.subcommand === "rollback") log.info("PostgreSQL migrations were retained; rollback changes the runtime only.");
|
|
233
232
|
if (result.emailOperationId) log.info(`Shared email routing ready (operation ${result.emailOperationId}).`);
|
|
@@ -238,6 +237,7 @@ async function runInstalledPlatformCommand(args) {
|
|
|
238
237
|
console.log(`One-time administrator setup code: ${code}`);
|
|
239
238
|
}
|
|
240
239
|
}
|
|
240
|
+
printSuccess(`${deployment.displayName}: runtime ${runtime.manifest.platformVersion} ${args.subcommand === "rollback" ? "restored" : "ready"}.`);
|
|
241
241
|
};
|
|
242
242
|
};
|
|
243
243
|
if (args.plan) {
|
|
@@ -354,7 +354,7 @@ async function disablePlatform(client, initialManifest, planOnly, dependencies =
|
|
|
354
354
|
await writeLifecycleCheckpoint(client, next);
|
|
355
355
|
next = transitionInstallation(next, "disabled", (/* @__PURE__ */ new Date()).toISOString());
|
|
356
356
|
await writeLifecycleCheckpoint(client, next);
|
|
357
|
-
|
|
357
|
+
printSuccess(`${next.deployment.displayName} is disabled. Its data was not changed.`);
|
|
358
358
|
} catch (error) {
|
|
359
359
|
next = transitionInstallation(next, "failed", (/* @__PURE__ */ new Date()).toISOString());
|
|
360
360
|
writeInstallationManifest(next);
|
|
@@ -552,7 +552,7 @@ async function uninstallPlatform(client, initialManifest, args, dependencies = {
|
|
|
552
552
|
removePlatformConnectionForInstallation(next.id);
|
|
553
553
|
const kept = describeKeptResources(next, next.resources.filter((resource) => resource.state === "retained"), "Cloudflare resources:", "Access resources:", purgeResources && purgeResourcesHandlesEmailRouting(next));
|
|
554
554
|
if (kept.length) note(kept.join("\n"), import_picocolors.default.bold("Kept resources"));
|
|
555
|
-
|
|
555
|
+
printSuccess(`Uninstalled ${next.deployment.displayName}.`);
|
|
556
556
|
} catch (error) {
|
|
557
557
|
await stopProjectZeroTrustHold().catch(() => {});
|
|
558
558
|
next = transitionInstallation(next, "failed", (/* @__PURE__ */ new Date()).toISOString());
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as runInstalledPlatformCommand, d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-
|
|
1
|
+
import { c as runInstalledPlatformCommand, d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-BdYblvvE.mjs";
|
|
2
2
|
export { runInstalledPlatformCommand, selectAuthoritativePlatformManifest, verifyPlatformInstallationOwnership };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { A as confirm, K as select, X as text, tt as isCancel } from "./
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { A as confirm, K as select, X as text, tt as isCancel } from "./dist-D3m88sjf.mjs";
|
|
2
|
+
import { d as printSuccess } from "./output-C50ag2r3.mjs";
|
|
3
|
+
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-BQtzyG-g.mjs";
|
|
4
|
+
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-AzVLbrr3.mjs";
|
|
4
5
|
import { stripVTControlCharacters } from "node:util";
|
|
5
6
|
import { PLAN_EDITABLE_LIMIT_KEYS, PLAN_LIMITS, parseBuildInstanceType, parsePlanLimitsPatch, parsePlanName, parsePlatformPlanId } from "@void/platform/plans";
|
|
6
7
|
import { readFile } from "node:fs/promises";
|
|
@@ -215,7 +216,7 @@ async function apply(client, path, body, args, catalog) {
|
|
|
215
216
|
...result
|
|
216
217
|
};
|
|
217
218
|
if (args.json) print(completed);
|
|
218
|
-
else
|
|
219
|
+
else printSuccess(`Saved ${applied.action ?? "plans.sync"} ${applied.target ?? ""}. Account updates complete.`);
|
|
219
220
|
}
|
|
220
221
|
async function runPlatformPlansConfig(args) {
|
|
221
222
|
const origin = resolveOperatorOrigin(args.connection);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as listInstallationManifests, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-P387v42A.mjs";
|
|
2
2
|
import { t as cfAccessHeaders } from "./cf-access-TWNzXltp.mjs";
|
|
3
|
-
import { P as createPlatformInstallPlan, a as REMOTE_INSTALLATION_MANIFEST_KEY } from "./platform-lifecycle-
|
|
4
|
-
import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-
|
|
3
|
+
import { P as createPlatformInstallPlan, a as REMOTE_INSTALLATION_MANIFEST_KEY } from "./platform-lifecycle-D_QEY32D.mjs";
|
|
4
|
+
import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-BdYblvvE.mjs";
|
|
5
5
|
import { parsePlatformInstallationManifest, setInstallationEndpoints } from "@void/platform";
|
|
6
6
|
//#region src/cli/platform-recovery.ts
|
|
7
7
|
async function recoverPlatformInstallations(client, accountId, verifyEndpoint = verifyInstallationEndpoint, selector = "") {
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { u as openBrowser } from "./auth-B5_tZLxT.mjs";
|
|
2
|
+
import { L as log, tt as isCancel } from "./dist-D3m88sjf.mjs";
|
|
3
|
+
import { l as import_picocolors } from "./output-C50ag2r3.mjs";
|
|
4
|
+
import { execFile } from "node:child_process";
|
|
5
|
+
//#region src/cli/platform-setup.ts
|
|
6
|
+
/** Return a prompt answer, or stop the platform command when the prompt was cancelled. */
|
|
7
|
+
function platformPromptAnswer(value) {
|
|
8
|
+
if (isCancel(value) || typeof value === "symbol") throw new Error("platform: Cancelled.");
|
|
9
|
+
return value;
|
|
10
|
+
}
|
|
11
|
+
function platformSetupLink(page, hyperlinks = supportsSetupLinks()) {
|
|
12
|
+
return hyperlinks ? "\x1B]8;;" + page.url + "\x1B\\" + import_picocolors.default.underline(page.title) + "\x1B]8;;\x1B\\" : page.title + ": " + import_picocolors.default.underline(page.url);
|
|
13
|
+
}
|
|
14
|
+
function platformSetupFieldHelp(key) {
|
|
15
|
+
const docs = (page, section, title) => platformSetupLink({
|
|
16
|
+
title,
|
|
17
|
+
url: `https://void.cloud/guide/platform/installation/${page}#${section}`
|
|
18
|
+
});
|
|
19
|
+
switch (key) {
|
|
20
|
+
case "databaseUrl": return {
|
|
21
|
+
placeholder: "postgresql://user:pw@…/database",
|
|
22
|
+
description: "Provide a PostgreSQL database URL for platform users, projects, and deployments. Use an empty hosted database, e.g. " + platformSetupLink({
|
|
23
|
+
title: "Neon",
|
|
24
|
+
url: "https://neon.com/"
|
|
25
|
+
}) + ". " + docs("prerequisites", "platform-database", "Database setup")
|
|
26
|
+
};
|
|
27
|
+
case "jwtSecret": return { description: `Create a JWT signing key for platform login tokens. Run ${import_picocolors.default.blue("openssl rand -base64 32")}. Save the key in your password manager. ` + docs("credentials", "signing-and-encryption-keys", "Key setup") };
|
|
28
|
+
case "projectSecretKey": return { description: `Generate a project encryption key for app secrets. Run ${import_picocolors.default.blue("openssl rand -base64 32")} separately. Save this key for recovery. ` + docs("credentials", "signing-and-encryption-keys", "Key setup") };
|
|
29
|
+
default: return;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function supportsSetupLinks() {
|
|
33
|
+
return !!process.stdout.isTTY && ([
|
|
34
|
+
"ghostty",
|
|
35
|
+
"iTerm.app",
|
|
36
|
+
"WezTerm",
|
|
37
|
+
"vscode",
|
|
38
|
+
"WarpTerminal"
|
|
39
|
+
].includes(process.env.TERM_PROGRAM ?? "") || !!process.env.WT_SESSION || !!process.env.VTE_VERSION || !!process.env.KONSOLE_VERSION || process.env.TERM === "xterm-kitty");
|
|
40
|
+
}
|
|
41
|
+
/** Dashboard keys use permission-catalog labels, which can differ from product names. */
|
|
42
|
+
function platformAccountTokenPermissions(includeAiGateway) {
|
|
43
|
+
return [
|
|
44
|
+
{
|
|
45
|
+
key: "account_settings",
|
|
46
|
+
type: "read"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: "workers_scripts",
|
|
50
|
+
type: "edit"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: "workers_kv_storage",
|
|
54
|
+
type: "edit"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
key: "workers_r2",
|
|
58
|
+
type: "edit"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
key: "d1",
|
|
62
|
+
type: "edit"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
key: "queues",
|
|
66
|
+
type: "edit"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
key: "account_analytics",
|
|
70
|
+
type: "read"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
key: "workers_tail",
|
|
74
|
+
type: "read"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
key: "query_cache",
|
|
78
|
+
type: "edit"
|
|
79
|
+
},
|
|
80
|
+
...includeAiGateway ? [{
|
|
81
|
+
key: "aig",
|
|
82
|
+
type: "edit"
|
|
83
|
+
}] : []
|
|
84
|
+
];
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Account token links cannot preselect a zone: Cloudflare documents only
|
|
88
|
+
* `permissionGroupKeys` and `name`, and the form puts zone permissions in an
|
|
89
|
+
* "All Domains" policy. Tell the user which dashboard choice to change.
|
|
90
|
+
*/
|
|
91
|
+
function specifiedDomainsInstruction(zones) {
|
|
92
|
+
return `Change the zone policy from All Domains to Specified Domains → ${zones.join(" and ")}.`;
|
|
93
|
+
}
|
|
94
|
+
function plansZoneCreation(plan) {
|
|
95
|
+
return plan.actions.some((action) => action.kind === "zone" && action.action === "create");
|
|
96
|
+
}
|
|
97
|
+
function platformManagementSetupPage(plan, options = {}) {
|
|
98
|
+
const createsZone = plansZoneCreation(plan);
|
|
99
|
+
const zoneName = plan.deployment.application.zoneName;
|
|
100
|
+
const apiHostname = plan.deployment.controlPlane.apiHostname;
|
|
101
|
+
const access = options.access ?? (plan.deployment.authentication.accessProtection || plan.deployment.authentication.providers.includes("cloudflare-access") ? {
|
|
102
|
+
protection: !!plan.deployment.authentication.accessProtection,
|
|
103
|
+
readOnly: false
|
|
104
|
+
} : void 0);
|
|
105
|
+
const zones = [...zoneName ? [zoneName] : [], ...apiHostname && apiHostname !== zoneName && !apiHostname.endsWith(`.${zoneName}`) ? [`the zone for ${apiHostname}`] : []];
|
|
106
|
+
const accessLevel = access && access.readOnly ? "read" : "edit";
|
|
107
|
+
const appAccess = !!plan.deployment.appAccess;
|
|
108
|
+
const appAccessLevel = appAccess ? "edit" : accessLevel;
|
|
109
|
+
const permissions = [
|
|
110
|
+
...platformAccountTokenPermissions(true),
|
|
111
|
+
...zoneName || apiHostname || createsZone ? [
|
|
112
|
+
{
|
|
113
|
+
key: "zone",
|
|
114
|
+
type: createsZone ? "edit" : "read"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
key: "dns",
|
|
118
|
+
type: "edit"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
key: "workers_routes",
|
|
122
|
+
type: "edit"
|
|
123
|
+
}
|
|
124
|
+
] : [],
|
|
125
|
+
...access || appAccess ? [
|
|
126
|
+
{
|
|
127
|
+
key: "access",
|
|
128
|
+
type: appAccessLevel
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
key: "access_acct",
|
|
132
|
+
type: "read"
|
|
133
|
+
},
|
|
134
|
+
...access && access.protection ? [{
|
|
135
|
+
key: "access_service_token",
|
|
136
|
+
type: accessLevel
|
|
137
|
+
}] : []
|
|
138
|
+
] : [],
|
|
139
|
+
...zoneName && plan.deployment.application.baseDomain !== zoneName ? [{
|
|
140
|
+
key: "ssl_and_certificates",
|
|
141
|
+
type: "read"
|
|
142
|
+
}] : []
|
|
143
|
+
];
|
|
144
|
+
return {
|
|
145
|
+
title: "Cloudflare management API token",
|
|
146
|
+
linkInTitle: true,
|
|
147
|
+
url: "https://dash.cloudflare.com/?" + new URLSearchParams({
|
|
148
|
+
to: "/" + plan.account.id + "/api-tokens",
|
|
149
|
+
name: plan.deployment.displayName + " Management",
|
|
150
|
+
permissionGroupKeys: JSON.stringify(permissions)
|
|
151
|
+
}),
|
|
152
|
+
instructions: [
|
|
153
|
+
"This token lets the Void CLI install your platform. Void will now open a pre-configured token creation site. Please review the permissions and then paste the token here.",
|
|
154
|
+
`Scope it to ${plan.account.name}.`,
|
|
155
|
+
...createsZone ? [`Keep the zone policy on All Domains so Void can create ${zoneName}.`] : zones.length ? [specifiedDomainsInstruction(zones)] : []
|
|
156
|
+
].join("\n")
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
function platformSetupPages(plan) {
|
|
160
|
+
const permissions = [
|
|
161
|
+
...platformAccountTokenPermissions(plan.actions.some((action) => action.kind === "ai-gateway" && action.action === "inspect")),
|
|
162
|
+
...plan.deployment.application.zoneName ? [{
|
|
163
|
+
key: "cache",
|
|
164
|
+
type: "purge"
|
|
165
|
+
}] : [],
|
|
166
|
+
...plan.deployment.capabilities.customDomains ? [{
|
|
167
|
+
key: "ssl_and_certificates",
|
|
168
|
+
type: "edit"
|
|
169
|
+
}] : [],
|
|
170
|
+
...plan.deployment.capabilities.email ? [
|
|
171
|
+
{
|
|
172
|
+
key: "zone",
|
|
173
|
+
type: "read"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
key: "zone_settings",
|
|
177
|
+
type: "edit"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
key: "email_routing_address",
|
|
181
|
+
type: "edit"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
key: "email_routing_rule",
|
|
185
|
+
type: "edit"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
key: "email_sending",
|
|
189
|
+
type: "edit"
|
|
190
|
+
}
|
|
191
|
+
] : []
|
|
192
|
+
];
|
|
193
|
+
const zoneName = plan.deployment.application.zoneName;
|
|
194
|
+
return {
|
|
195
|
+
runtime: {
|
|
196
|
+
title: "Cloudflare runtime token",
|
|
197
|
+
linkInTitle: true,
|
|
198
|
+
url: "https://dash.cloudflare.com/?" + new URLSearchParams({
|
|
199
|
+
to: "/" + plan.account.id + "/api-tokens",
|
|
200
|
+
name: plan.deployment.displayName + " Runtime",
|
|
201
|
+
permissionGroupKeys: JSON.stringify(permissions)
|
|
202
|
+
}),
|
|
203
|
+
instructions: ["Create a Cloudflare runtime token that Void can use to manage the platform. Please review the permissions and then paste the token here.", ...zoneName && plansZoneCreation(plan) ? [`Keep the zone policy on All Domains so the token can purge cache on ${zoneName} after Void creates it.`] : zoneName ? [specifiedDomainsInstruction([zoneName, ...plan.deployment.capabilities.email ? ["every zone that will carry mail"] : []])] : []].join("\n")
|
|
204
|
+
},
|
|
205
|
+
github: {
|
|
206
|
+
title: "GitHub OAuth App",
|
|
207
|
+
url: "https://github.com/settings/applications/new",
|
|
208
|
+
instructions: "GitHub Auth will be used by the users of your Void Platform instance. Register a GitHub app and generate a client secret.\nHomepage: " + plan.apiUrl + "\nRedirect URI: " + plan.apiUrl + "/auth/callback"
|
|
209
|
+
},
|
|
210
|
+
r2: {
|
|
211
|
+
title: "R2 upload token",
|
|
212
|
+
url: "https://dash.cloudflare.com/?" + new URLSearchParams({
|
|
213
|
+
to: "/" + plan.account.id + "/r2/api-tokens/create",
|
|
214
|
+
type: "account"
|
|
215
|
+
}),
|
|
216
|
+
instructions: [
|
|
217
|
+
"Select Object Read & Write.",
|
|
218
|
+
"Keep Apply to all buckets in this account selected.",
|
|
219
|
+
"Create the token, then copy the Access Key ID and Secret Access Key into the CLI."
|
|
220
|
+
].join("\n")
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
function formatPlatformSetupPlan(plan, options = {}) {
|
|
225
|
+
const writesDns = plan.actions.some((action) => action.kind === "zone" && action.action === "create" || action.kind === "dns-record" && action.action !== "reuse");
|
|
226
|
+
return [
|
|
227
|
+
"The installation will guide you through setting up the following credentials:",
|
|
228
|
+
"",
|
|
229
|
+
...[
|
|
230
|
+
...options.managementToken ? [options.managementAccess ? `Cloudflare management API token for ${writesDns ? "DNS changes and " : ""}Access setup` : "Cloudflare management API token for DNS changes"] : [],
|
|
231
|
+
"PostgreSQL database URL",
|
|
232
|
+
"Cloudflare runtime token",
|
|
233
|
+
"R2 upload token",
|
|
234
|
+
...plan.deployment.authentication.providers.includes("github") ? ["GitHub OAuth App client ID and secret"] : [],
|
|
235
|
+
...plan.deployment.authentication.providers.filter((provider) => provider !== "github").map((provider) => (provider === "google" ? "Google OAuth" : provider === "oidc" ? "OIDC" : "Cloudflare Access OIDC") + " client ID and secret"),
|
|
236
|
+
...plan.deployment.authentication.accessProtection ? ["Cloudflare Access application and installer credentials"] : [],
|
|
237
|
+
...plan.deployment.appAccess ? ["Cloudflare Access check and app-management token when needed (stored encrypted)"] : [],
|
|
238
|
+
"JWT signing key and project encryption key"
|
|
239
|
+
].map((credential) => `• ${credential}`)
|
|
240
|
+
].join("\n");
|
|
241
|
+
}
|
|
242
|
+
function platformInstallCommandArguments(options) {
|
|
243
|
+
const parts = [
|
|
244
|
+
options.commandName,
|
|
245
|
+
"platform",
|
|
246
|
+
"install"
|
|
247
|
+
];
|
|
248
|
+
const flag = (name, value) => {
|
|
249
|
+
if (value) parts.push(name, value);
|
|
250
|
+
};
|
|
251
|
+
if (options.resumeId) {
|
|
252
|
+
parts.push("--resume");
|
|
253
|
+
flag("--name", options.resumeId);
|
|
254
|
+
} else {
|
|
255
|
+
flag("--name", options.installationSlug);
|
|
256
|
+
flag("--account", options.accountId);
|
|
257
|
+
flag("--display-name", options.displayName);
|
|
258
|
+
if (options.workersDev) parts.push("--workers-dev");
|
|
259
|
+
else {
|
|
260
|
+
flag("--application-domain", options.applicationDomain);
|
|
261
|
+
flag("--zone", options.zoneName);
|
|
262
|
+
if (options.dedicatedZone) parts.push("--dedicated-zone");
|
|
263
|
+
else parts.push("--no-dedicated-zone");
|
|
264
|
+
}
|
|
265
|
+
flag("--control-plane-domain", options.controlPlaneDomain);
|
|
266
|
+
if (!options.controlPlaneDomain) parts.push("--no-control-plane-domain");
|
|
267
|
+
}
|
|
268
|
+
flag("--hyperdrive", options.hyperdrive ?? "");
|
|
269
|
+
flag("--auth-config", options.authConfig ?? "");
|
|
270
|
+
if (!options.resumeId && options.appAccess) flag("--app-access", options.appAccess);
|
|
271
|
+
if (!options.authConfig && !options.resumeId && options.authentication) {
|
|
272
|
+
flag("--login-methods", options.authentication.providers.join(","));
|
|
273
|
+
parts.push(options.authentication.accessProtection ? "--access-protection" : "--no-access-protection");
|
|
274
|
+
}
|
|
275
|
+
flag("--dashboard-url", options.dashboardUrl ?? "");
|
|
276
|
+
flag("--runtime", options.runtime);
|
|
277
|
+
if (options.yes) parts.push("--yes");
|
|
278
|
+
return parts;
|
|
279
|
+
}
|
|
280
|
+
function formatPlatformInstallCommand(options) {
|
|
281
|
+
return platformInstallCommandArguments(options).map((value) => {
|
|
282
|
+
if (/^[A-Za-z0-9_@%+=:,./-]+$/.test(value)) return value;
|
|
283
|
+
return process.platform === "win32" ? `'${value.replaceAll("'", "''")}'` : `'${value.replaceAll("'", "'\\''")}'`;
|
|
284
|
+
}).join(" ");
|
|
285
|
+
}
|
|
286
|
+
function openPlatformSetupPage(page, dependencies = {}) {
|
|
287
|
+
log.info((page.linkInTitle ? platformSetupLink(page) : page.title) + "\n" + page.instructions);
|
|
288
|
+
if (!page.linkInTitle) console.log(platformSetupLink({
|
|
289
|
+
...page,
|
|
290
|
+
title: "Open " + page.title
|
|
291
|
+
}));
|
|
292
|
+
if (dependencies.interactive ?? process.stdin.isTTY === true) try {
|
|
293
|
+
(dependencies.open ?? ((url) => openBrowser(url, execFile)))(page.url);
|
|
294
|
+
} catch {
|
|
295
|
+
log.info("Could not open the browser. Use the link above.");
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
//#endregion
|
|
299
|
+
export { platformManagementSetupPage as a, platformSetupLink as c, platformInstallCommandArguments as i, platformSetupPages as l, formatPlatformSetupPlan as n, platformPromptAnswer as o, openPlatformSetupPage as r, platformSetupFieldHelp as s, formatPlatformInstallCommand as t };
|
|
@@ -4,10 +4,9 @@ import { n as globSync, t as glob } from "./dist-Bn8Kodjp.mjs";
|
|
|
4
4
|
import { a as isObjectExpression, i as isMemberExpression, n as isIdentifier, r as isLiteral, t as isCallExpression } from "./ast-CPGPjb0V.mjs";
|
|
5
5
|
import { a as staticLiteral, n as parseRouteFilename, o as unwrapStaticExpression, r as parseWebSocketFilename, t as isRouteEnabledForEnvironment } from "./parse-filename-CUbj-1MP.mjs";
|
|
6
6
|
import { n as resourceNameWords, t as isResourceName } from "./resource-name-C7LVpcRm.mjs";
|
|
7
|
-
import { r as getSsrServerEntryPath } from "./entry-
|
|
7
|
+
import { r as getSsrServerEntryPath } from "./entry-CMAkqBmU.mjs";
|
|
8
8
|
import { existsSync, readFileSync } from "node:fs";
|
|
9
9
|
import { parseSync } from "vite";
|
|
10
|
-
import { parse } from "es-module-lexer/js";
|
|
11
10
|
//#region src/application-features.ts
|
|
12
11
|
/** Apply explicitly named overrides while preserving unrelated source features. */
|
|
13
12
|
function applyBindingOverrides(inferred, overrides) {
|
|
@@ -331,16 +330,39 @@ function walk(ast, { enter, leave }) {
|
|
|
331
330
|
return new SyncWalker(enter, leave).visit(ast, null);
|
|
332
331
|
}
|
|
333
332
|
//#endregion
|
|
333
|
+
//#region src/shared/module-references.ts
|
|
334
|
+
/** Runtime imports and re-exports, in source order, including empty export lists. */
|
|
335
|
+
function staticModuleReferences(parsed, code) {
|
|
336
|
+
const { staticImports, staticExports } = parsed.module;
|
|
337
|
+
if (!(/\bexport\s*(?:\/|\{\s*(?:\}|\/))/.test(code) || staticImports.some((item) => item.entries.length === 0 && code.slice(item.start, item.moduleRequest.start).trim() !== "import"))) return [...staticImports.filter((item) => item.entries.length === 0 || item.entries.some((entry) => !entry.isType)).map((item) => ({
|
|
338
|
+
source: item.moduleRequest.value,
|
|
339
|
+
start: item.start,
|
|
340
|
+
end: item.end
|
|
341
|
+
})), ...staticExports.flatMap((item) => {
|
|
342
|
+
const entry = item.entries.find((entry) => !entry.isType && entry.moduleRequest);
|
|
343
|
+
return entry?.moduleRequest ? [{
|
|
344
|
+
source: entry.moduleRequest.value,
|
|
345
|
+
start: item.start,
|
|
346
|
+
end: item.end
|
|
347
|
+
}] : [];
|
|
348
|
+
})].sort((a, b) => a.start - b.start);
|
|
349
|
+
return parsed.program.body.flatMap((statement) => {
|
|
350
|
+
if (statement.type !== "ImportDeclaration" && statement.type !== "ExportNamedDeclaration" && statement.type !== "ExportAllDeclaration") return [];
|
|
351
|
+
if (!statement.source || "importKind" in statement && statement.importKind === "type" || "exportKind" in statement && statement.exportKind === "type" || "specifiers" in statement && statement.specifiers.length > 0 && statement.specifiers.every((specifier) => "importKind" in specifier && specifier.importKind === "type" || "exportKind" in specifier && specifier.exportKind === "type")) return [];
|
|
352
|
+
return [{
|
|
353
|
+
source: statement.source.value,
|
|
354
|
+
start: statement.start,
|
|
355
|
+
end: statement.end
|
|
356
|
+
}];
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
//#endregion
|
|
334
360
|
//#region src/inference/walk.ts
|
|
335
361
|
const ENV_BINDING_RE = /\benv\s*\.\s*(DB|KV|STORAGE|QUEUE_\w+|AI|SANDBOX)\b/;
|
|
336
362
|
/**
|
|
337
363
|
* Infer which Cloudflare bindings a source file uses.
|
|
338
364
|
*
|
|
339
|
-
*
|
|
340
|
-
* Tier 1: es-module-lexer to extract import sources (fast, asm.js, no init),
|
|
341
|
-
* with a TSX parser fallback when the lexer cannot parse JSX
|
|
342
|
-
* Tier 2: Regex check for env.DB/KV/STORAGE patterns
|
|
343
|
-
* Tier 3: Full AST walk only when regex matches (to confirm member expressions)
|
|
365
|
+
* Read Vite's module metadata, then walk the AST only for potential env bindings.
|
|
344
366
|
*/
|
|
345
367
|
function inferBindingsFromSource(code, filename) {
|
|
346
368
|
const result = {
|
|
@@ -354,25 +376,14 @@ function inferBindingsFromSource(code, filename) {
|
|
|
354
376
|
needsLive: false,
|
|
355
377
|
needsEmail: false
|
|
356
378
|
};
|
|
357
|
-
|
|
358
|
-
let parsedProgram;
|
|
379
|
+
let parsed;
|
|
359
380
|
try {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
source: imp.specifier,
|
|
363
|
-
statement: code.slice(imp.importStart, imp.importEnd + 1)
|
|
364
|
-
});
|
|
381
|
+
parsed = parseSync(filename, code);
|
|
382
|
+
if (parsed.errors.length > 0) return result;
|
|
365
383
|
} catch {
|
|
366
|
-
|
|
367
|
-
parsedProgram = parseSync(filename, code).program;
|
|
368
|
-
for (const node of parsedProgram.body) if ((node.type === "ImportDeclaration" || node.type === "ExportNamedDeclaration" || node.type === "ExportAllDeclaration") && typeof node.source?.value === "string") moduleReferences.push({
|
|
369
|
-
source: node.source.value,
|
|
370
|
-
statement: code.slice(node.start, node.end)
|
|
371
|
-
});
|
|
372
|
-
} catch {}
|
|
384
|
+
return result;
|
|
373
385
|
}
|
|
374
|
-
|
|
375
|
-
if (isTypeOnlyModuleStatement(statement)) continue;
|
|
386
|
+
function recordModuleReference(source, statement) {
|
|
376
387
|
switch (source) {
|
|
377
388
|
case "void/db":
|
|
378
389
|
result.needsD1 = true;
|
|
@@ -408,15 +419,15 @@ function inferBindingsFromSource(code, filename) {
|
|
|
408
419
|
case "void/client/solid": if (/\bauth\b/.test(statement)) result.needsAuth = true;
|
|
409
420
|
}
|
|
410
421
|
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
return result;
|
|
422
|
+
for (const reference of staticModuleReferences(parsed, code)) recordModuleReference(reference.source, code.slice(reference.start, reference.end));
|
|
423
|
+
for (const reference of parsed.module.dynamicImports) {
|
|
424
|
+
const argument = code.slice(reference.moduleRequest.start, reference.moduleRequest.end);
|
|
425
|
+
const expression = parseSync(filename, `(${argument})`).program.body[0];
|
|
426
|
+
const source = expression?.type === "ExpressionStatement" ? staticLiteral(expression.expression) : void 0;
|
|
427
|
+
if (typeof source === "string") recordModuleReference(source, code.slice(reference.start, reference.end));
|
|
418
428
|
}
|
|
419
|
-
|
|
429
|
+
if (!ENV_BINDING_RE.test(code)) return result;
|
|
430
|
+
walk(parsed.program, { enter(node) {
|
|
420
431
|
const current = node;
|
|
421
432
|
if (!isMemberExpression(current)) return;
|
|
422
433
|
if (current.computed) return;
|
|
@@ -447,16 +458,6 @@ function inferBindingsFromSource(code, filename) {
|
|
|
447
458
|
} });
|
|
448
459
|
return result;
|
|
449
460
|
}
|
|
450
|
-
function isTypeOnlyModuleStatement(statement) {
|
|
451
|
-
if (/^\s*(?:import|export)\s+type\b/.test(statement)) return true;
|
|
452
|
-
const specifierStart = statement.indexOf("{");
|
|
453
|
-
const specifierEnd = statement.lastIndexOf("}");
|
|
454
|
-
if (specifierStart === -1 || specifierEnd === -1 || specifierEnd < specifierStart) return false;
|
|
455
|
-
const beforeSpecifiers = statement.slice(0, specifierStart);
|
|
456
|
-
if (!/^\s*(?:import|export)\s*$/.test(beforeSpecifiers)) return false;
|
|
457
|
-
const specifiers = statement.slice(specifierStart + 1, specifierEnd).split(",").map((specifier) => specifier.trim()).filter(Boolean);
|
|
458
|
-
return specifiers.length > 0 && specifiers.every((specifier) => specifier.startsWith("type "));
|
|
459
|
-
}
|
|
460
461
|
/**
|
|
461
462
|
* Merge multiple InferredBindings into a single result (union).
|
|
462
463
|
*/
|
|
@@ -721,4 +722,4 @@ function inferProjectBindings(root, options, scanDirs) {
|
|
|
721
722
|
return applyBindingOverrides(mergeBindings(allBindings), options?.bindings);
|
|
722
723
|
}
|
|
723
724
|
//#endregion
|
|
724
|
-
export { deriveWebSocketClassNameFromName as a, scanWebSocketRoutes as c,
|
|
725
|
+
export { deriveWebSocketClassNameFromName as a, scanWebSocketRoutes as c, staticModuleReferences as d, walk as f, needsApplicationDatabase as h, inferProjectBindings as i, scanWebSocketRoutesSync as l, applyBindingOverrides as m, FRAMEWORK_SCAN_DIRS as n, inferWebSocketResourceName as o, readResourceDefinition as p, detectFramework as r, isWebSocketPatternFile as s, DEFAULT_SCAN_DIRS as t, inferBindingsFromSource as u };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { a as join } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import { n as loadVoidAuthConfig } from "./config-DPByhVck.mjs";
|
|
3
|
-
import { m as readConfig } from "./config-
|
|
4
|
-
import { n as ensureProjectTsconfig, r as writeFileIfChanged } from "./project-tsconfig-
|
|
5
|
-
import { i as generateDbDts, n as generateQueueTypes, t as generateRouteTypes } from "./route-types-
|
|
6
|
-
import { t as discoverSchema } from "./discover-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { t as analyzeApplication } from "./application-routing-
|
|
10
|
-
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-
|
|
3
|
+
import { m as readConfig } from "./config-DiowPT80.mjs";
|
|
4
|
+
import { n as ensureProjectTsconfig, r as writeFileIfChanged } from "./project-tsconfig-CVJhNMxs.mjs";
|
|
5
|
+
import { i as generateDbDts, n as generateQueueTypes, t as generateRouteTypes } from "./route-types-CbtsIeFn.mjs";
|
|
6
|
+
import { t as discoverSchema } from "./discover-CkCYv9T_.mjs";
|
|
7
|
+
import { o as loadLocalEnv } from "./env-BxocywBB.mjs";
|
|
8
|
+
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-CwXgeMgL.mjs";
|
|
9
|
+
import { t as analyzeApplication } from "./application-routing-DQyUh_5S.mjs";
|
|
10
|
+
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-CF84FOVM.mjs";
|
|
11
11
|
import { existsSync, mkdirSync, rmSync } from "node:fs";
|
|
12
12
|
import { fileURLToPath } from "node:url";
|
|
13
13
|
//#region src/codegen/prepare.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as prepareProject } from "./prepare-
|
|
1
|
+
import { L as log } from "./dist-D3m88sjf.mjs";
|
|
2
|
+
import { d as printSuccess, u as note } from "./output-C50ag2r3.mjs";
|
|
3
|
+
import { t as prepareProject } from "./prepare-Do96654b.mjs";
|
|
4
4
|
//#region src/cli/prepare.ts
|
|
5
5
|
async function runPrepareCommand(root, _args) {
|
|
6
6
|
console.log();
|
|
@@ -8,7 +8,7 @@ async function runPrepareCommand(root, _args) {
|
|
|
8
8
|
if (result.written.length > 0) note(result.written.join("\n"), "Wrote");
|
|
9
9
|
if (result.removed.length > 0) note(result.removed.join("\n"), "Removed stale files");
|
|
10
10
|
if (result.written.length === 0 && result.removed.length === 0) log.info("No generated files changed.");
|
|
11
|
-
|
|
11
|
+
printSuccess("Project codegen is ready.");
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
14
|
export { runPrepareCommand };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as join, n as dirname } from "./dist-BVqXeR_h.mjs";
|
|
1
|
+
import { a as join, i as isAbsolute, l as relative, n as dirname } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
3
3
|
//#region src/prerender-render.ts
|
|
4
4
|
function outputFileForPath(path) {
|
|
@@ -7,6 +7,11 @@ function outputFileForPath(path) {
|
|
|
7
7
|
function pageDataFileForPath(path) {
|
|
8
8
|
return path === "/" ? "_void/pages/index.json" : `_void/pages/${path.slice(1)}.json`;
|
|
9
9
|
}
|
|
10
|
+
/** Whether `path` resolves strictly inside `directory`. */
|
|
11
|
+
function isInside(directory, path) {
|
|
12
|
+
const child = relative(directory, path);
|
|
13
|
+
return child !== "" && child !== ".." && !child.startsWith("../") && !isAbsolute(child);
|
|
14
|
+
}
|
|
10
15
|
function normalizedFile(clientDir, path) {
|
|
11
16
|
return join(clientDir, path).normalize("NFC").toLowerCase();
|
|
12
17
|
}
|
|
@@ -66,6 +71,17 @@ async function renderPrerenderPaths(paths, clientDir, fetchPath, fetchPageData,
|
|
|
66
71
|
const path = paths[index];
|
|
67
72
|
const result = results[index];
|
|
68
73
|
const outputFile = outputFileForPath(path);
|
|
74
|
+
const outputPath = join(clientDir, outputFile);
|
|
75
|
+
const pageDataPath = join(clientDir, pageDataFileForPath(path));
|
|
76
|
+
if (!isInside(clientDir, outputPath) || !isInside(join(clientDir, "_void/pages"), pageDataPath)) {
|
|
77
|
+
const error = "prerender path resolves outside the output directory";
|
|
78
|
+
result.failed.push({
|
|
79
|
+
path,
|
|
80
|
+
error
|
|
81
|
+
});
|
|
82
|
+
onResult?.(path, outputFile, error);
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
69
85
|
try {
|
|
70
86
|
const response = await fetchPath(path);
|
|
71
87
|
const html = await response.text();
|
|
@@ -78,14 +94,12 @@ async function renderPrerenderPaths(paths, clientDir, fetchPath, fetchPageData,
|
|
|
78
94
|
onResult?.(path, outputFile, error);
|
|
79
95
|
continue;
|
|
80
96
|
}
|
|
81
|
-
const outputPath = join(clientDir, outputFile);
|
|
82
97
|
mkdirSync(dirname(outputPath), { recursive: true });
|
|
83
98
|
writeFileSync(outputPath, html);
|
|
84
99
|
if (fetchPageData) {
|
|
85
100
|
const pageDataResponse = await fetchPageData(path);
|
|
86
101
|
if (pageDataResponse.headers.get("X-VoidPages")) {
|
|
87
102
|
const pageData = await pageDataResponse.json();
|
|
88
|
-
const pageDataPath = join(clientDir, pageDataFileForPath(path));
|
|
89
103
|
mkdirSync(dirname(pageDataPath), { recursive: true });
|
|
90
104
|
writeFileSync(pageDataPath, JSON.stringify(pageData));
|
|
91
105
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as renderPrerenderPaths } from "./prerender-render-
|
|
1
|
+
import { t as renderPrerenderPaths } from "./prerender-render-Ct20jftc.mjs";
|
|
2
2
|
export { renderPrerenderPaths };
|