void 0.26.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS_TEMPLATE.md +1 -3
- package/README.md +19 -9
- package/dist/{account-cmd-CDry3B5V.mjs → account-cmd-l-FM7Ioq.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-Dn2vw-SG.mjs} +9 -9
- package/dist/{auth-B60QDbjg.mjs → auth-LMJcNESe.mjs} +1 -1
- package/dist/{auth-link-DjeOptYi.mjs → auth-link-vz9Z2kmG.mjs} +5 -5
- package/dist/{auth-migrations-9vif1uj8.mjs → auth-migrations-BwHgeEsD.mjs} +8 -18
- package/dist/{auth-router-BRxIuqDi.mjs → auth-router-DvsCUVw4.mjs} +6 -19
- 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-D6we0VjO.mjs} +8 -7
- package/dist/{cache-CS8Yxr5a.mjs → cache-CZRdzKx1.mjs} +8 -8
- package/dist/{cancel-deploy-mZsD88Xa.mjs → cancel-deploy-CQ3NnMvf.mjs} +6 -5
- package/dist/{cf-access-YTlqvAsk.mjs → cf-access-BcIBSKqG.mjs} +11 -12
- 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/cf-user-agent-lKblH3zU.mjs +17 -0
- package/dist/cli/cli.mjs +48 -83
- package/dist/cli/cloudflare-operation-process.mjs +78 -78
- package/dist/cli/env-schema-probe.mjs +5 -6
- package/dist/{client-mC-dFGDD.mjs → client-DlDJuY0s.mjs} +30 -8
- package/dist/client-tso2OfcG.mjs +2 -0
- 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-BfPBHHm-.mjs} +12 -11
- package/dist/{create-project-B2kk9Q0o.mjs → create-project-BdXEFKal.mjs} +7 -7
- package/dist/{create-project-Dbb4uiN-.mjs → create-project-qFDC45zg.mjs} +1 -1
- package/dist/{db-DpCKZto0.mjs → db-Xs80hcaA.mjs} +101 -133
- package/dist/{delete-CxlSvsvW.mjs → delete-d2vuou3j.mjs} +7 -7
- package/dist/{deploy-CeEbnv4b.mjs → deploy-Bqe1PYBw.mjs} +2351 -2497
- package/dist/deploy-VsWsVQkw.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-BsDUBAvt.mjs} +29 -30
- 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-_lGAHOhp.mjs} +24 -19
- 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-BdTc-K2L.mjs → env-C74QepDE.mjs} +10 -10
- 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/{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-DaDdBbSS.mjs} +65 -164
- 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-0bTe_lID.mjs} +13 -32
- package/dist/help-DfQYVfGY.mjs +2 -0
- package/dist/{inbound-fRkqcXaC.mjs → inbound-PfQDLXc5.mjs} +23 -24
- package/dist/index.d.mts +19 -2
- package/dist/index.mjs +619 -532
- package/dist/{info-DhtTKh65.mjs → info-PYWwkWyt.mjs} +4 -4
- package/dist/{init-BMf4T03q.mjs → init-DaBGmaXC.mjs} +161 -198
- package/dist/{link-BqYsSS_I.mjs → link-C6fjafep.mjs} +10 -10
- package/dist/{list-_kBToO-l.mjs → list-BTFBlqKl.mjs} +9 -8
- 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-GKcNUmtI.mjs} +7 -7
- package/dist/login-mx_ydhmp.mjs +2 -0
- package/dist/{logs-DYgnh6dH.mjs → logs-BiMSULmc.mjs} +28 -11
- 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-DOBhIaIg.mjs} +10 -1
- package/dist/{operator-auth-2dsGlTT5.mjs → operator-auth-BEZ_u0Cz.mjs} +2 -2
- package/dist/{operator-client-BFqpp6z0.mjs → operator-client-DbDv4vtE.mjs} +2 -2
- package/dist/{operator-cmd-CUGHXrQf.mjs → operator-cmd-BT4hgavL.mjs} +24 -11
- package/dist/operator-cmd-CwBB-1yb.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-D4E1PjVw.mjs +2 -0
- package/dist/{platform-args-DSV2p4nY.mjs → platform-args-DUeXY9Om.mjs} +1 -1
- package/dist/{platform-auth-config-Bosx7U1h.mjs → platform-auth-config-CkSx3usH.mjs} +40 -36
- package/dist/{platform-auth-protection-DcbL_LW_.mjs → platform-auth-protection-BJimB_p9.mjs} +9 -8
- package/dist/{platform-auth-recovery-WfTZ8K6o.mjs → platform-auth-recovery-BU6izFAU.mjs} +8 -7
- package/dist/{platform-cmd-DbKtQb_4.mjs → platform-cmd-BbY1dWiM.mjs} +14 -13
- package/dist/{platform-cmd-dyFUof0t.mjs → platform-cmd-BbmJiq5O.mjs} +1 -1
- package/dist/{platform-discovery-BC0HCKYt.mjs → platform-discovery-DIYz8V63.mjs} +1 -1
- package/dist/{platform-domain-Bsq43AJp.mjs → platform-domain-CHVS6cV0.mjs} +6 -6
- package/dist/{platform-lifecycle--5gWmDoI.mjs → platform-lifecycle-ByAlpkhV.mjs} +1 -1
- package/dist/{platform-lifecycle-Cfi0o6xM.mjs → platform-lifecycle-DzCwqhFq.mjs} +76 -387
- package/dist/{platform-management-Bbwf6-Dq.mjs → platform-management-CBOT4BSM.mjs} +1 -1
- package/dist/{platform-management-BrF9STZp.mjs → platform-management-CuuVDhyt.mjs} +7 -7
- package/dist/{platform-plans-config-DU-8nC2Y.mjs → platform-plans-config-CN-heS4q.mjs} +5 -4
- package/dist/{platform-recovery-DQAqAQYu.mjs → platform-recovery-CskSJgLh.mjs} +3 -3
- package/dist/{platform-registry-P387v42A.mjs → platform-registry-Cjv2Qf0r.mjs} +5 -1
- package/dist/platform-setup-BBxRxmFC.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-DQstYTxO.mjs → project-BAm2aB6Q.mjs} +1 -1
- package/dist/{project-BiaPQ7ur.mjs → project-DedqCp59.mjs} +1 -1
- package/dist/{project-cmd-BbH2LptN.mjs → project-cmd-DaoRrn-8.mjs} +19 -19
- package/dist/{project-team-Yiww3-go.mjs → project-team-Q_lCA7Io.mjs} +15 -18
- package/dist/{project-token-BrtT2NkY.mjs → project-token-BArgK9o1.mjs} +14 -17
- package/dist/{project-tsconfig-B8GeM0RM.mjs → project-tsconfig-CVJhNMxs.mjs} +2 -1
- package/dist/{project-zero-trust-nYJ2V2nc.mjs → project-zero-trust-KO9Hu2Pq.mjs} +12 -9
- 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-C7Oeoh5u.mjs} +5 -5
- 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-DVAtrLAl.mjs} +30 -37
- 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-BvtB7IjY.mjs} +15 -15
- 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/deployment.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 +3 -11
- 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 +4 -2
- package/{skills/void/docs → docs}/guide/platform/installation/maintenance.md +4 -0
- package/{skills/void/docs → docs}/guide/project-collaboration.md +7 -3
- 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 +1 -6
- package/{skills/void/docs → docs}/reference/cli/database.md +3 -4
- package/{skills/void/docs → docs}/reference/cli/deploy.md +1 -1
- 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 +9 -5
- 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/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/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
package/dist/cli/cli.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { a as join } from "../dist-BVqXeR_h.mjs";
|
|
3
|
-
import { L as log } from "../
|
|
3
|
+
import { L as log } from "../dist-D3m88sjf.mjs";
|
|
4
|
+
import { l as import_picocolors } from "../output-C50ag2r3.mjs";
|
|
4
5
|
import { n as getPackageDir } from "../agents-B_pX_HmQ.mjs";
|
|
5
6
|
import { t as formatCloudflareUserMessage } from "../cloudflare-user-output-Q-k0QoNQ.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { n as platformSubcommands, t as parsePlatformArgs } from "../platform-args-DSV2p4nY.mjs";
|
|
7
|
+
import { i as printVoidHeader, n as printGlobalHelp, r as printHelpPage, t as getHelpPath } from "../help-0bTe_lID.mjs";
|
|
8
|
+
import { r as OperatorClientError } from "../operator-client-DbDv4vtE.mjs";
|
|
9
|
+
import { n as platformSubcommands, t as parsePlatformArgs } from "../platform-args-DUeXY9Om.mjs";
|
|
10
10
|
import { readFileSync } from "node:fs";
|
|
11
11
|
import { parseArgs } from "node:util";
|
|
12
12
|
//#region src/cli/account-args.ts
|
|
@@ -137,13 +137,9 @@ function parseAuthArgs(args) {
|
|
|
137
137
|
if (!subcommand || ![
|
|
138
138
|
"login",
|
|
139
139
|
"logout",
|
|
140
|
-
"status"
|
|
141
|
-
"whoami",
|
|
142
|
-
"link",
|
|
143
|
-
"token"
|
|
140
|
+
"status"
|
|
144
141
|
].includes(subcommand)) throw new Error("auth: Usage: void auth <login|status|logout> [--platform cloudflare|void].");
|
|
145
142
|
let platform;
|
|
146
|
-
let connectionId;
|
|
147
143
|
for (let index = 0; index < rest.length; index++) {
|
|
148
144
|
const value = rest[index];
|
|
149
145
|
if (value === "--platform") {
|
|
@@ -151,14 +147,11 @@ function parseAuthArgs(args) {
|
|
|
151
147
|
if (target !== "cloudflare" && target !== "void") throw new Error("auth: --platform must be cloudflare or void.");
|
|
152
148
|
if (platform) throw new Error("auth: --platform may be supplied only once.");
|
|
153
149
|
platform = target;
|
|
154
|
-
} else
|
|
155
|
-
else throw new Error(`auth: Unexpected argument '${value}'.`);
|
|
150
|
+
} else throw new Error(`auth: Unexpected argument '${value}'.`);
|
|
156
151
|
}
|
|
157
|
-
if ((subcommand === "link" || subcommand === "token") && platform === "cloudflare") throw new Error(`auth: ${subcommand} belongs to a Void account. Use \`void account ${subcommand}\`.`);
|
|
158
152
|
return {
|
|
159
153
|
subcommand,
|
|
160
|
-
...platform ? { platform } : {}
|
|
161
|
-
...connectionId ? { connectionId } : {}
|
|
154
|
+
...platform ? { platform } : {}
|
|
162
155
|
};
|
|
163
156
|
}
|
|
164
157
|
//#endregion
|
|
@@ -886,13 +879,14 @@ function parseRouteArgs(args) {
|
|
|
886
879
|
methods
|
|
887
880
|
};
|
|
888
881
|
}
|
|
889
|
-
|
|
882
|
+
/** Shared parser for the single-name generators whose names may contain hyphens. */
|
|
883
|
+
function parseHyphenatedNameArgs(args, subcommand, label) {
|
|
890
884
|
const [name, extra] = args;
|
|
891
|
-
if (!name) throw new Error(
|
|
885
|
+
if (!name) throw new Error(`gen: Usage: void gen ${subcommand} <name>.`);
|
|
892
886
|
if (extra) throw new Error(`gen: Unexpected argument '${extra}'.`);
|
|
893
|
-
if (!NAME_WITH_HYPHENS_RE.test(name)) throw new Error(
|
|
887
|
+
if (!NAME_WITH_HYPHENS_RE.test(name)) throw new Error(`gen: ${label} name must be lowercase alphanumeric with underscores or hyphens and no leading digits.`);
|
|
894
888
|
return {
|
|
895
|
-
subcommand
|
|
889
|
+
subcommand,
|
|
896
890
|
name
|
|
897
891
|
};
|
|
898
892
|
}
|
|
@@ -921,35 +915,15 @@ function parseSsrArgs(args) {
|
|
|
921
915
|
framework: frameworks[0]
|
|
922
916
|
};
|
|
923
917
|
}
|
|
924
|
-
function parseCronArgs(args) {
|
|
925
|
-
const [name, extra] = args;
|
|
926
|
-
if (!name) throw new Error("gen: Usage: void gen cron <name>.");
|
|
927
|
-
if (extra) throw new Error(`gen: Unexpected argument '${extra}'.`);
|
|
928
|
-
if (!NAME_WITH_HYPHENS_RE.test(name)) throw new Error("gen: Cron name must be lowercase alphanumeric with underscores or hyphens and no leading digits.");
|
|
929
|
-
return {
|
|
930
|
-
subcommand: "cron",
|
|
931
|
-
name
|
|
932
|
-
};
|
|
933
|
-
}
|
|
934
|
-
function parseQueueArgs(args) {
|
|
935
|
-
const [name, extra] = args;
|
|
936
|
-
if (!name) throw new Error("gen: Usage: void gen queue <name>.");
|
|
937
|
-
if (extra) throw new Error(`gen: Unexpected argument '${extra}'.`);
|
|
938
|
-
if (!NAME_WITH_HYPHENS_RE.test(name)) throw new Error("gen: Queue name must be lowercase alphanumeric with underscores or hyphens and no leading digits.");
|
|
939
|
-
return {
|
|
940
|
-
subcommand: "queue",
|
|
941
|
-
name
|
|
942
|
-
};
|
|
943
|
-
}
|
|
944
918
|
function parseGenArgs(args) {
|
|
945
919
|
const [subcommand, ...rest] = args;
|
|
946
920
|
if (subcommand === "model") return parseModelArgs(rest);
|
|
947
921
|
if (subcommand === "migration") return parseMigrationArgs(rest);
|
|
948
922
|
if (subcommand === "route") return parseRouteArgs(rest);
|
|
949
|
-
if (subcommand === "middleware") return
|
|
923
|
+
if (subcommand === "middleware") return parseHyphenatedNameArgs(rest, "middleware", "Middleware");
|
|
950
924
|
if (subcommand === "ssr") return parseSsrArgs(rest);
|
|
951
|
-
if (subcommand === "cron") return
|
|
952
|
-
if (subcommand === "queue") return
|
|
925
|
+
if (subcommand === "cron") return parseHyphenatedNameArgs(rest, "cron", "Cron");
|
|
926
|
+
if (subcommand === "queue") return parseHyphenatedNameArgs(rest, "queue", "Queue");
|
|
953
927
|
throw new Error("gen: Usage: void gen <model|migration|route|middleware|ssr|cron|queue>.");
|
|
954
928
|
}
|
|
955
929
|
//#endregion
|
|
@@ -1613,7 +1587,7 @@ async function runSubcommandGroup(command, subcommands, parse, run) {
|
|
|
1613
1587
|
const hasNamedSubcommand = args.slice(1).some((arg) => subcommands.some(({ name }) => name === arg));
|
|
1614
1588
|
try {
|
|
1615
1589
|
if ((!sub || sub.startsWith("-") && !hasNamedSubcommand) && process.stdin.isTTY) {
|
|
1616
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1590
|
+
const { promptSubcommand } = await import("../subcommand-prompt-BSlnD1fI.mjs");
|
|
1617
1591
|
if (command === "platform" && !sub) log.info("A Void platform lets a team deploy Void apps to a shared Cloudflare account.\nThis command sets up and manages platforms. Join with `void connect <url>`.\nDocs: https://void.cloud/guide/self-hosted-platform");
|
|
1618
1592
|
const result = await promptSubcommand(command, subcommands);
|
|
1619
1593
|
if (!result) process.exit(0);
|
|
@@ -1638,6 +1612,21 @@ async function runSubcommandGroup(command, subcommands, parse, run) {
|
|
|
1638
1612
|
const args = process.argv.slice(2);
|
|
1639
1613
|
const command = args[0];
|
|
1640
1614
|
const helpPath = getHelpPath(args);
|
|
1615
|
+
const subcommandGroups = {
|
|
1616
|
+
auth: () => runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-router-DvsCUVw4.mjs").then(({ runAuthRouter }) => runAuthRouter(root, parsed))),
|
|
1617
|
+
account: () => runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("../account-cmd-l-FM7Ioq.mjs").then(({ runAccountCommand }) => runAccountCommand(root, parsed))),
|
|
1618
|
+
platform: () => runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-BbmJiq5O.mjs").then(({ runPlatformCommand }) => runPlatformCommand(root, parsed))),
|
|
1619
|
+
cloudflare: () => runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-lHqNlJGW.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(root, parsed))),
|
|
1620
|
+
project: () => runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-DaoRrn-8.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed))),
|
|
1621
|
+
secret: () => runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-BvtB7IjY.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed))),
|
|
1622
|
+
domain: () => runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-BsDUBAvt.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed))),
|
|
1623
|
+
email: () => runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-_lGAHOhp.mjs").then(({ runEmailCommand }) => runEmailCommand(root, parsed))),
|
|
1624
|
+
db: () => runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-Xs80hcaA.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed))),
|
|
1625
|
+
env: () => runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-C74QepDE.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed))),
|
|
1626
|
+
gen: () => runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-dA9hW7AV.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed))),
|
|
1627
|
+
github: () => runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-DaDdBbSS.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed))),
|
|
1628
|
+
build: () => runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-D6we0VjO.mjs").then(({ runBuildCommand }) => runBuildCommand(root, parsed)))
|
|
1629
|
+
};
|
|
1641
1630
|
if (helpPath) {
|
|
1642
1631
|
if (helpPath.length === 0) printGlobalHelp();
|
|
1643
1632
|
else try {
|
|
@@ -1655,7 +1644,7 @@ if (helpPath) {
|
|
|
1655
1644
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1656
1645
|
process.exit(1);
|
|
1657
1646
|
}
|
|
1658
|
-
import("../deploy-
|
|
1647
|
+
import("../deploy-VsWsVQkw.mjs").then(({ runDeploy }) => {
|
|
1659
1648
|
runDeploy(root, {
|
|
1660
1649
|
projectSlug: deployArgs.projectSlug,
|
|
1661
1650
|
dir: deployArgs.dir,
|
|
@@ -1673,26 +1662,14 @@ if (helpPath) {
|
|
|
1673
1662
|
});
|
|
1674
1663
|
} else if (command === "connect") (async () => {
|
|
1675
1664
|
const parsed = parseConnectArgs(args.slice(1));
|
|
1676
|
-
const { runConnectCommand } = await import("../connect-
|
|
1665
|
+
const { runConnectCommand } = await import("../connect-BfPBHHm-.mjs");
|
|
1677
1666
|
await runConnectCommand(process.cwd(), parsed);
|
|
1678
1667
|
})().catch((err) => {
|
|
1679
1668
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1680
1669
|
process.exit(1);
|
|
1681
1670
|
});
|
|
1682
|
-
else if (command
|
|
1683
|
-
else if (command === "
|
|
1684
|
-
else if (command === "platform") runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-dyFUof0t.mjs").then(({ runPlatformCommand }) => runPlatformCommand(root, parsed)));
|
|
1685
|
-
else if (command === "cloudflare") runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-bhwCxAN6.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(root, parsed)));
|
|
1686
|
-
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-BbH2LptN.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
|
|
1687
|
-
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-AKnNXNP5.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
|
|
1688
|
-
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-B_9VgOm6.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
|
|
1689
|
-
else if (command === "email") runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-BokHgjKj.mjs").then(({ runEmailCommand }) => runEmailCommand(root, parsed)));
|
|
1690
|
-
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-DpCKZto0.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
|
|
1691
|
-
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-BdTc-K2L.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
|
|
1692
|
-
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-qCBwH3fZ.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed)));
|
|
1693
|
-
else if (command === "github") runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-hhkTzlGS.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed)));
|
|
1694
|
-
else if (command === "build") runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-Ce3C8huo.mjs").then(({ runBuildCommand }) => runBuildCommand(root, parsed)));
|
|
1695
|
-
else if (command === "info") import("../info-DhtTKh65.mjs").then(async ({ runInfoCommand }) => {
|
|
1671
|
+
else if (command && Object.hasOwn(subcommandGroups, command)) subcommandGroups[command]();
|
|
1672
|
+
else if (command === "info") import("../info-PYWwkWyt.mjs").then(async ({ runInfoCommand }) => {
|
|
1696
1673
|
try {
|
|
1697
1674
|
await runInfoCommand(process.cwd(), parseInfoArgs(args.slice(1)));
|
|
1698
1675
|
} catch (err) {
|
|
@@ -1714,7 +1691,7 @@ else if (command === "prepare") {
|
|
|
1714
1691
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1715
1692
|
process.exit(1);
|
|
1716
1693
|
}
|
|
1717
|
-
import("../prepare-
|
|
1694
|
+
import("../prepare-Dq9hTIbo.mjs").then(({ runPrepareCommand }) => {
|
|
1718
1695
|
runPrepareCommand(root, prepareArgs).catch((err) => {
|
|
1719
1696
|
log.error(formatCloudflareUserMessage(err.message ?? String(err)));
|
|
1720
1697
|
process.exit(1);
|
|
@@ -1722,7 +1699,7 @@ else if (command === "prepare") {
|
|
|
1722
1699
|
});
|
|
1723
1700
|
} else if (command === "init") {
|
|
1724
1701
|
const root = process.cwd();
|
|
1725
|
-
import("../init-
|
|
1702
|
+
import("../init-DaBGmaXC.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
1726
1703
|
let initArgs;
|
|
1727
1704
|
try {
|
|
1728
1705
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -1740,7 +1717,7 @@ else if (command === "prepare") {
|
|
|
1740
1717
|
log.error("migrate: This command takes no arguments.");
|
|
1741
1718
|
process.exit(1);
|
|
1742
1719
|
}
|
|
1743
|
-
import("../migrate-
|
|
1720
|
+
import("../migrate-BHp07yJE.mjs").then(({ runMigrateCommand }) => {
|
|
1744
1721
|
runMigrateCommand(process.cwd()).catch((err) => {
|
|
1745
1722
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1746
1723
|
process.exit(1);
|
|
@@ -1756,7 +1733,7 @@ else if (command === "prepare") {
|
|
|
1756
1733
|
const topLevelCommands = [
|
|
1757
1734
|
{
|
|
1758
1735
|
name: "init",
|
|
1759
|
-
hint: "--
|
|
1736
|
+
hint: "--tsconfig | --github | --git | --no-git",
|
|
1760
1737
|
description: "Set up void in a new or existing project"
|
|
1761
1738
|
},
|
|
1762
1739
|
{
|
|
@@ -1852,52 +1829,40 @@ else if (command === "prepare") {
|
|
|
1852
1829
|
];
|
|
1853
1830
|
(async () => {
|
|
1854
1831
|
printVoidHeader();
|
|
1855
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1832
|
+
const { promptSubcommand } = await import("../subcommand-prompt-BSlnD1fI.mjs");
|
|
1856
1833
|
const result = await promptSubcommand("", topLevelCommands);
|
|
1857
1834
|
if (!result) process.exit(0);
|
|
1858
1835
|
const cmd = result.subcommand;
|
|
1859
1836
|
const root = process.cwd();
|
|
1837
|
+
if (Object.hasOwn(subcommandGroups, cmd)) return subcommandGroups[cmd]();
|
|
1860
1838
|
switch (cmd) {
|
|
1861
1839
|
case "connect": {
|
|
1862
|
-
const { runConnectCommand } = await import("../connect-
|
|
1840
|
+
const { runConnectCommand } = await import("../connect-BfPBHHm-.mjs");
|
|
1863
1841
|
await runConnectCommand(root, parseConnectArgs([]));
|
|
1864
1842
|
return;
|
|
1865
1843
|
}
|
|
1866
1844
|
case "init": {
|
|
1867
|
-
const { runInitCommand, parseInitArgs } = await import("../init-
|
|
1845
|
+
const { runInitCommand, parseInitArgs } = await import("../init-DaBGmaXC.mjs");
|
|
1868
1846
|
await runInitCommand(root, parseInitArgs([]));
|
|
1869
1847
|
return;
|
|
1870
1848
|
}
|
|
1871
1849
|
case "migrate": {
|
|
1872
|
-
const { runMigrateCommand } = await import("../migrate-
|
|
1850
|
+
const { runMigrateCommand } = await import("../migrate-BHp07yJE.mjs");
|
|
1873
1851
|
await runMigrateCommand(root);
|
|
1874
1852
|
return;
|
|
1875
1853
|
}
|
|
1876
1854
|
case "deploy": {
|
|
1877
|
-
const { runDeploy } = await import("../deploy-
|
|
1855
|
+
const { runDeploy } = await import("../deploy-VsWsVQkw.mjs");
|
|
1878
1856
|
await runDeploy(root);
|
|
1879
1857
|
return;
|
|
1880
1858
|
}
|
|
1881
|
-
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-router-BRxIuqDi.mjs").then(({ runAuthRouter }) => runAuthRouter(r, p)));
|
|
1882
|
-
case "account": return runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (r, p) => import("../account-cmd-CDry3B5V.mjs").then(({ runAccountCommand }) => runAccountCommand(r, p)));
|
|
1883
|
-
case "platform": return runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (r, p) => import("../platform-cmd-dyFUof0t.mjs").then(({ runPlatformCommand }) => runPlatformCommand(r, p)));
|
|
1884
|
-
case "cloudflare": return runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (r, p) => import("../cloudflare-cmd-bhwCxAN6.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(r, p)));
|
|
1885
|
-
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-BbH2LptN.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
|
|
1886
|
-
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-AKnNXNP5.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
|
|
1887
|
-
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-B_9VgOm6.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
|
|
1888
|
-
case "github": return runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (r, p) => import("../github-cmd-hhkTzlGS.mjs").then(({ runGithubCommand }) => runGithubCommand(r, p)));
|
|
1889
|
-
case "build": return runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (r, p) => import("../build-cmd-Ce3C8huo.mjs").then(({ runBuildCommand }) => runBuildCommand(r, p)));
|
|
1890
|
-
case "email": return runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (r, p) => import("../email-BokHgjKj.mjs").then(({ runEmailCommand }) => runEmailCommand(r, p)));
|
|
1891
|
-
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-DpCKZto0.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
|
|
1892
|
-
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-BdTc-K2L.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
|
|
1893
|
-
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-qCBwH3fZ.mjs").then(({ runGenCommand }) => runGenCommand(r, p)));
|
|
1894
1859
|
case "info": {
|
|
1895
|
-
const { runInfoCommand } = await import("../info-
|
|
1860
|
+
const { runInfoCommand } = await import("../info-PYWwkWyt.mjs");
|
|
1896
1861
|
await runInfoCommand(root, parseInfoArgs([]));
|
|
1897
1862
|
return;
|
|
1898
1863
|
}
|
|
1899
1864
|
case "prepare": {
|
|
1900
|
-
const { runPrepareCommand } = await import("../prepare-
|
|
1865
|
+
const { runPrepareCommand } = await import("../prepare-Dq9hTIbo.mjs");
|
|
1901
1866
|
await runPrepareCommand(root, parsePrepareArgs([]));
|
|
1902
1867
|
return;
|
|
1903
1868
|
}
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
import { n as __toESM } from "../rolldown-runtime-DXIUcv95.mjs";
|
|
3
3
|
import { a as join, n as dirname, u as resolve } from "../dist-BVqXeR_h.mjs";
|
|
4
4
|
import { t as require_picocolors } from "../picocolors-BTps1_gs.mjs";
|
|
5
|
+
import { n as getVoidUserAgent, t as getCfCliVersion } from "../cf-user-agent-lKblH3zU.mjs";
|
|
6
|
+
import { t as sanitizeTerminalLogText } from "../terminal-log-text-D9ACPOuG.mjs";
|
|
5
7
|
import { copyFileSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
6
8
|
import { fileURLToPath } from "node:url";
|
|
7
9
|
import { tmpdir } from "node:os";
|
|
8
10
|
import { parse } from "jsonc-parser";
|
|
9
11
|
import { stripVTControlCharacters } from "node:util";
|
|
10
12
|
import { spawn, spawnSync } from "node:child_process";
|
|
11
|
-
import {
|
|
13
|
+
import { setGlobalProxyFromEnv } from "node:http";
|
|
12
14
|
import { getCloudflareAuthUseKeyringFromEnv } from "@cloudflare/workers-auth";
|
|
13
15
|
import { createCfAuth, createCfProfileStore, readUserPreferences, setKeyringPreference } from "@cloudflare/workers-auth/cf";
|
|
14
16
|
//#region src/cli/cf-session.ts
|
|
@@ -40,8 +42,9 @@ function readCfSessionCredential(root, identity) {
|
|
|
40
42
|
const auth = session(root);
|
|
41
43
|
if (identity.authSource !== `OAuth token from ${auth.getCredentialStore().path()}`) return null;
|
|
42
44
|
const token = auth.readAuthCredentials()?.oauth_token;
|
|
43
|
-
if (typeof token
|
|
44
|
-
|
|
45
|
+
if (typeof token !== "string" || token.length === 0) return null;
|
|
46
|
+
persistCfKeyringPreference(root);
|
|
47
|
+
return token;
|
|
45
48
|
}
|
|
46
49
|
/** Keep subsequent cf logins on the encrypted profile adopted by Void. */
|
|
47
50
|
function persistCfKeyringPreference(root) {
|
|
@@ -81,15 +84,23 @@ const operation = (() => {
|
|
|
81
84
|
}
|
|
82
85
|
})();
|
|
83
86
|
process.env.CLOUDFLARE_AUTH_USE_KEYRING ??= "true";
|
|
87
|
+
if (hasProxyEnvironment(process.env)) setGlobalProxyFromEnv();
|
|
88
|
+
function hasProxyEnvironment(env) {
|
|
89
|
+
return Boolean(env.HTTP_PROXY || env.HTTPS_PROXY || env.http_proxy || env.https_proxy);
|
|
90
|
+
}
|
|
91
|
+
function apiBaseUrl() {
|
|
92
|
+
return (process.env.CLOUDFLARE_API_BASE_URL ?? "https://api.cloudflare.com/client/v4").replace(/\/$/, "");
|
|
93
|
+
}
|
|
84
94
|
function cfEnvironment() {
|
|
85
95
|
const env = {
|
|
86
96
|
...process.env,
|
|
87
97
|
CF_DELEGATION: "1",
|
|
98
|
+
CLI_VERSION: getCfCliVersion(),
|
|
88
99
|
CF_SEND_TELEMETRY: "false",
|
|
89
100
|
CF_NO_OSC_PROGRESS: "1",
|
|
90
101
|
CLOUDFLARE_AUTH_USE_KEYRING: process.env.CLOUDFLARE_AUTH_USE_KEYRING
|
|
91
102
|
};
|
|
92
|
-
if (env
|
|
103
|
+
if (hasProxyEnvironment(env)) env.NODE_USE_ENV_PROXY = "1";
|
|
93
104
|
for (const [canonical, alias] of [
|
|
94
105
|
["CLOUDFLARE_API_TOKEN", "CF_API_TOKEN"],
|
|
95
106
|
["CLOUDFLARE_API_KEY", "CF_API_KEY"],
|
|
@@ -219,7 +230,7 @@ async function withBuildOutput(raw, sourceMain, action) {
|
|
|
219
230
|
}), { mode: 384 });
|
|
220
231
|
const accountId = process.env.CLOUDFLARE_ACCOUNT_ID ?? raw.account_id;
|
|
221
232
|
if (typeof accountId !== "string" || !accountId) throw new Error("Cloudflare account is not pinned for Worker deployment.");
|
|
222
|
-
const { prepareCfBuildOutput } = await import("../cf-build-output-
|
|
233
|
+
const { prepareCfBuildOutput } = await import("../cf-build-output-H9a97vME.mjs");
|
|
223
234
|
const output = await prepareCfBuildOutput(scratch, accountId);
|
|
224
235
|
if (!output) throw new Error("Could not prepare the Cloudflare Worker build output.");
|
|
225
236
|
try {
|
|
@@ -291,80 +302,62 @@ function accountId() {
|
|
|
291
302
|
return accountId;
|
|
292
303
|
}
|
|
293
304
|
async function cloudflareApiGet(path, failure, extraHeaders = {}) {
|
|
294
|
-
const url = `${(
|
|
295
|
-
const
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
const body = object(await response.json());
|
|
307
|
-
if (!response.ok || body.success !== true) throw new Error(`${failure} (HTTP ${response.status})`);
|
|
308
|
-
return body;
|
|
309
|
-
} finally {
|
|
310
|
-
await proxy?.close();
|
|
311
|
-
}
|
|
305
|
+
const url = `${apiBaseUrl()}${path}`;
|
|
306
|
+
const response = await fetch(url, {
|
|
307
|
+
headers: {
|
|
308
|
+
...await apiHeaders(),
|
|
309
|
+
...extraHeaders
|
|
310
|
+
},
|
|
311
|
+
redirect: "error",
|
|
312
|
+
signal: AbortSignal.timeout(3e4)
|
|
313
|
+
});
|
|
314
|
+
const body = object(await response.json());
|
|
315
|
+
if (!response.ok || body.success !== true) throw new Error(`${failure} (HTTP ${response.status})`);
|
|
316
|
+
return body;
|
|
312
317
|
}
|
|
313
318
|
async function clearWorkerCronSchedules(worker) {
|
|
314
|
-
const endpoint = `${(
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
const schedules = object(body.result).schedules;
|
|
330
|
-
if (!response.ok || body.success !== true || !Array.isArray(schedules) || schedules.length !== 0) throw new Error(`Cloudflare did not clear the Worker Cron Triggers (HTTP ${response.status}).`);
|
|
331
|
-
return result(0);
|
|
332
|
-
} finally {
|
|
333
|
-
await proxy?.close();
|
|
334
|
-
}
|
|
319
|
+
const endpoint = `${apiBaseUrl()}/accounts/${encodeURIComponent(accountId())}/workers/scripts/${encodeURIComponent(worker)}/schedules`;
|
|
320
|
+
const response = await fetch(endpoint, {
|
|
321
|
+
method: "PUT",
|
|
322
|
+
headers: {
|
|
323
|
+
...await apiHeaders(),
|
|
324
|
+
"Content-Type": "application/json"
|
|
325
|
+
},
|
|
326
|
+
body: "[]",
|
|
327
|
+
redirect: "error",
|
|
328
|
+
signal: AbortSignal.timeout(3e4)
|
|
329
|
+
});
|
|
330
|
+
const body = object(await response.json());
|
|
331
|
+
const schedules = object(body.result).schedules;
|
|
332
|
+
if (!response.ok || body.success !== true || !Array.isArray(schedules) || schedules.length !== 0) throw new Error(`Cloudflare did not clear the Worker Cron Triggers (HTTP ${response.status}).`);
|
|
333
|
+
return result(0);
|
|
335
334
|
}
|
|
336
335
|
async function clearWorkerCustomDomains(worker) {
|
|
337
|
-
const endpoint = `${(
|
|
338
|
-
const
|
|
336
|
+
const endpoint = `${apiBaseUrl()}/accounts/${encodeURIComponent(accountId())}/workers/scripts/${encodeURIComponent(worker)}/domains/records`;
|
|
337
|
+
const response = await fetch(endpoint, {
|
|
338
|
+
method: "PUT",
|
|
339
|
+
headers: {
|
|
340
|
+
...await apiHeaders(),
|
|
341
|
+
"Content-Type": "application/json"
|
|
342
|
+
},
|
|
343
|
+
body: JSON.stringify({
|
|
344
|
+
override_scope: true,
|
|
345
|
+
override_existing_origin: false,
|
|
346
|
+
override_existing_dns_record: false,
|
|
347
|
+
origins: []
|
|
348
|
+
}),
|
|
349
|
+
redirect: "error",
|
|
350
|
+
signal: AbortSignal.timeout(3e4)
|
|
351
|
+
});
|
|
352
|
+
if (!response.ok) throw new Error(`Cloudflare rejected the empty custom-domain set (HTTP ${response.status}).`);
|
|
353
|
+
let body;
|
|
339
354
|
try {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
...await apiHeaders(),
|
|
344
|
-
"Content-Type": "application/json"
|
|
345
|
-
},
|
|
346
|
-
body: JSON.stringify({
|
|
347
|
-
override_scope: true,
|
|
348
|
-
override_existing_origin: false,
|
|
349
|
-
override_existing_dns_record: false,
|
|
350
|
-
origins: []
|
|
351
|
-
}),
|
|
352
|
-
redirect: "error",
|
|
353
|
-
signal: AbortSignal.timeout(3e4),
|
|
354
|
-
...proxy ? { dispatcher: proxy } : {}
|
|
355
|
-
});
|
|
356
|
-
if (!response.ok) throw new Error(`Cloudflare rejected the empty custom-domain set (HTTP ${response.status}).`);
|
|
357
|
-
let body;
|
|
358
|
-
try {
|
|
359
|
-
body = await response.json();
|
|
360
|
-
} catch {
|
|
361
|
-
throw new Error(`Cloudflare returned HTTP ${response.status} with a non-JSON custom-domain response.`);
|
|
362
|
-
}
|
|
363
|
-
if (object(body).success !== true) throw new Error(`Cloudflare rejected the empty custom-domain set (HTTP ${response.status}).`);
|
|
364
|
-
return result(0);
|
|
365
|
-
} finally {
|
|
366
|
-
await proxy?.close();
|
|
355
|
+
body = await response.json();
|
|
356
|
+
} catch {
|
|
357
|
+
throw new Error(`Cloudflare returned HTTP ${response.status} with a non-JSON custom-domain response.`);
|
|
367
358
|
}
|
|
359
|
+
if (object(body).success !== true) throw new Error(`Cloudflare rejected the empty custom-domain set (HTTP ${response.status}).`);
|
|
360
|
+
return result(0);
|
|
368
361
|
}
|
|
369
362
|
async function assertExistingProvisionableResources(directory, account) {
|
|
370
363
|
const { readBuildOutput } = await import("@cloudflare/build-output-utils");
|
|
@@ -410,12 +403,16 @@ async function apiHeaders() {
|
|
|
410
403
|
const key = process.env.CLOUDFLARE_API_KEY ?? process.env.CF_API_KEY;
|
|
411
404
|
const email = process.env.CLOUDFLARE_EMAIL ?? process.env.CF_EMAIL;
|
|
412
405
|
if (key && email) return {
|
|
406
|
+
"User-Agent": getVoidUserAgent(),
|
|
413
407
|
"X-Auth-Key": key,
|
|
414
408
|
"X-Auth-Email": email
|
|
415
409
|
};
|
|
416
410
|
const credential = await sessionCredential();
|
|
417
411
|
if (!credential) throw new Error("Cloudflare session bearer is unavailable.");
|
|
418
|
-
return {
|
|
412
|
+
return {
|
|
413
|
+
"User-Agent": getVoidUserAgent(),
|
|
414
|
+
Authorization: `Bearer ${credential.token}`
|
|
415
|
+
};
|
|
419
416
|
}
|
|
420
417
|
async function withSecretFile(content, action) {
|
|
421
418
|
const directory = mkdtempSync(join(tmpdir(), "void-cf-secret-"));
|
|
@@ -990,7 +987,7 @@ async function tail() {
|
|
|
990
987
|
"exceededMemory",
|
|
991
988
|
"unknown"
|
|
992
989
|
] });
|
|
993
|
-
const endpoint = `${(
|
|
990
|
+
const endpoint = `${apiBaseUrl()}/accounts/${encodeURIComponent(accountId)}/workers/scripts/${encodeURIComponent(worker)}/tails`;
|
|
994
991
|
const headers = {
|
|
995
992
|
...await apiHeaders(),
|
|
996
993
|
"Content-Type": "application/json"
|
|
@@ -1035,9 +1032,12 @@ async function tail() {
|
|
|
1035
1032
|
const detail = object(log.event ?? {});
|
|
1036
1033
|
const request = object(detail.request ?? {});
|
|
1037
1034
|
const prefix = typeof request.url === "string" ? `${request.method ?? "GET"} ${request.url}` : typeof detail.queue === "string" ? `Queue ${detail.queue}` : typeof detail.mailFrom === "string" ? `Email from ${detail.mailFrom}` : "Worker event";
|
|
1038
|
-
process.stdout.write(`${prefix} - ${log.outcome ?? "unknown"} @ ${new Date(Number(log.eventTimestamp)).toLocaleString()}\n`);
|
|
1039
|
-
if (Array.isArray(log.logs)) for (const line of log.logs.map(object))
|
|
1040
|
-
|
|
1035
|
+
process.stdout.write(`${sanitizeTerminalLogText(prefix)} - ${log.outcome ?? "unknown"} @ ${new Date(Number(log.eventTimestamp)).toLocaleString()}\n`);
|
|
1036
|
+
if (Array.isArray(log.logs)) for (const line of log.logs.map(object)) {
|
|
1037
|
+
const message = Array.isArray(line.message) ? line.message.join(" ") : "";
|
|
1038
|
+
process.stdout.write(` (${line.level ?? "log"}) ${sanitizeTerminalLogText(message)}\n`);
|
|
1039
|
+
}
|
|
1040
|
+
if (Array.isArray(log.exceptions)) for (const exception of log.exceptions.map(object)) process.stderr.write(` ${sanitizeTerminalLogText(`${exception.name ?? "Error"}: ${exception.message ?? ""}`)}\n`);
|
|
1041
1041
|
}).catch(() => {
|
|
1042
1042
|
process.stderr.write("Cloudflare returned a malformed tail event.\n");
|
|
1043
1043
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as findEnvFile } from "../env-types-
|
|
1
|
+
import { t as findEnvFile } from "../env-types-CwXgeMgL.mjs";
|
|
2
2
|
import { writeSync } from "node:fs";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
@@ -125,9 +125,8 @@ async function validateEmittedVarsViaSubprocess(input, env, spawn = defaultSpawn
|
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
127
|
* Parse the child's framed result from the DEDICATED fd-3 channel. The whole buffer
|
|
128
|
-
* is the JSON result (nothing else writes to fd 3), so no sentinel scan is needed
|
|
129
|
-
*
|
|
130
|
-
* can never reach here. Returns undefined on a missing/unparseable/ill-shaped result
|
|
128
|
+
* is the JSON result (nothing else writes to fd 3), so no sentinel scan is needed:
|
|
129
|
+
* config/env.ts stdout noise lives on a different fd and can never reach here. Returns undefined on a missing/unparseable/ill-shaped result
|
|
131
130
|
* so the caller fails closed.
|
|
132
131
|
*/
|
|
133
132
|
function parseProbeResult(fd3) {
|
|
@@ -169,7 +168,7 @@ function emitResult(result) {
|
|
|
169
168
|
* facts. The import stays isolated because env.ts is arbitrary project code.
|
|
170
169
|
*/
|
|
171
170
|
async function runFactsChild(root) {
|
|
172
|
-
const { deriveSelfHostSchemaFacts, SelfHostSchemaError } = await import("../env-validation-
|
|
171
|
+
const { deriveSelfHostSchemaFacts, SelfHostSchemaError } = await import("../env-validation-CrVNjsPm.mjs");
|
|
173
172
|
try {
|
|
174
173
|
emitResult({
|
|
175
174
|
kind: "ok",
|
|
@@ -194,7 +193,7 @@ async function runFactsChild(root) {
|
|
|
194
193
|
* fault → fail closed as a values-free schema error.
|
|
195
194
|
*/
|
|
196
195
|
async function runValidateEmittedChild(root) {
|
|
197
|
-
const { computeInvalidEmittedKeys, readEmittedWorkerVars, SelfHostSchemaError } = await import("../env-validation-
|
|
196
|
+
const { computeInvalidEmittedKeys, readEmittedWorkerVars, SelfHostSchemaError } = await import("../env-validation-CrVNjsPm.mjs");
|
|
198
197
|
const emitted = readEmittedWorkerVars(root);
|
|
199
198
|
if (!emitted.ok) {
|
|
200
199
|
emitResult({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as join } from "./dist-BVqXeR_h.mjs";
|
|
2
|
-
import { c as normalizePlatformApiUrl } from "./platform-registry-
|
|
2
|
+
import { c as normalizePlatformApiUrl } from "./platform-registry-Cjv2Qf0r.mjs";
|
|
3
3
|
import { t as cfAccessHeaders } from "./cf-access-TWNzXltp.mjs";
|
|
4
|
-
import { i as isCloudflareAccessChallenge, n as ensurePlatformAccessToken, t as ensureCloudflaredToken } from "./cf-access-
|
|
5
|
-
import { a as getApiUrl } from "./auth-
|
|
4
|
+
import { i as isCloudflareAccessChallenge, n as ensurePlatformAccessToken, t as ensureCloudflaredToken } from "./cf-access-BcIBSKqG.mjs";
|
|
5
|
+
import { a as getApiUrl } from "./auth-Dn2vw-SG.mjs";
|
|
6
6
|
import { n as getPackageDir } from "./agents-B_pX_HmQ.mjs";
|
|
7
|
-
import { n as readPlatformDiscoveryResponse } from "./platform-discovery-
|
|
7
|
+
import { n as readPlatformDiscoveryResponse } from "./platform-discovery-DIYz8V63.mjs";
|
|
8
8
|
import { readFileSync } from "node:fs";
|
|
9
9
|
import { stripVTControlCharacters } from "node:util";
|
|
10
10
|
//#region src/cli/platform-errors.ts
|
|
@@ -108,7 +108,7 @@ function readCliVersion() {
|
|
|
108
108
|
}
|
|
109
109
|
const VOID_CLI_VERSION = readCliVersion();
|
|
110
110
|
/** The oldest Void platform release this CLI supports. */
|
|
111
|
-
const MIN_PLATFORM_VERSION = "0.
|
|
111
|
+
const MIN_PLATFORM_VERSION = "0.27.0";
|
|
112
112
|
const RELEASE_VERSION = /^(\d+)\.(\d+)\.(\d+)(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$/;
|
|
113
113
|
/**
|
|
114
114
|
* Version checks keyed by platform base URL. Every outcome (pass, inconclusive,
|
|
@@ -174,6 +174,20 @@ function isExpiredTokenError(error) {
|
|
|
174
174
|
if (error instanceof PlatformApiError) return error.status === 401 && error.code === "invalid or expired token";
|
|
175
175
|
return false;
|
|
176
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* True when `fetch` gave up waiting for response headers (undici's
|
|
179
|
+
* `HeadersTimeoutError`, 300 seconds by default). The request reached the
|
|
180
|
+
* server, which is still working on it.
|
|
181
|
+
*/
|
|
182
|
+
function isHeadersTimeoutError(error) {
|
|
183
|
+
let current = error;
|
|
184
|
+
for (let depth = 0; depth < 6 && current !== null && typeof current === "object"; depth++) {
|
|
185
|
+
const { code, name } = current;
|
|
186
|
+
if (code === "UND_ERR_HEADERS_TIMEOUT" || name === "HeadersTimeoutError") return true;
|
|
187
|
+
current = current.cause;
|
|
188
|
+
}
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
177
191
|
function isPreflightRejection(error) {
|
|
178
192
|
return error instanceof PlatformApiError && ([401, 403].includes(error.status) && !!parsePlatformErrorBody(error.body)?.error || isCliOutdatedError(error));
|
|
179
193
|
}
|
|
@@ -183,6 +197,10 @@ function isPreflightRejection(error) {
|
|
|
183
197
|
* - Only `fetch` rejections (`TypeError` — no HTTP response) are retried.
|
|
184
198
|
* A Response of any status means the server answered; surface it
|
|
185
199
|
* verbatim rather than replay a request it may have accepted.
|
|
200
|
+
* - A headers timeout is retried too. Every attempt sends the same
|
|
201
|
+
* idempotency key, so once an earlier request has created its deployment,
|
|
202
|
+
* a receipt-aware platform answers the retry with that deployment's
|
|
203
|
+
* receipt and the CLI follows it to the real result.
|
|
186
204
|
* - A rejected fetch does NOT prove the request never arrived — the
|
|
187
205
|
* connection may have dropped after delivery. Arbitration is left to
|
|
188
206
|
* the server's precheck, the only atomic (project-locked) verdict: if
|
|
@@ -415,7 +433,11 @@ var PlatformClient = class {
|
|
|
415
433
|
async listProjectMembers(projectId) {
|
|
416
434
|
const res = await this.request(`${this.baseUrl}/projects/${projectId}/members`, { headers: { ...this.authHeaders } });
|
|
417
435
|
if (!res.ok) await throwPlatformApiError("Failed to list project members", res, "read");
|
|
418
|
-
|
|
436
|
+
const body = await res.json();
|
|
437
|
+
return {
|
|
438
|
+
members: body.members,
|
|
439
|
+
...body.warnings ? { warnings: body.warnings } : {}
|
|
440
|
+
};
|
|
419
441
|
}
|
|
420
442
|
async listProjectInvitations(projectId) {
|
|
421
443
|
const res = await this.request(`${this.baseUrl}/projects/${projectId}/invitations`, { headers: { ...this.authHeaders } });
|
|
@@ -1039,7 +1061,7 @@ var PlatformClient = class {
|
|
|
1039
1061
|
}
|
|
1040
1062
|
/**
|
|
1041
1063
|
* Start the per-repo connect-authorization round-trip used by a non-owner org
|
|
1042
|
-
* member
|
|
1064
|
+
* member. The callback redirects back to `redirect`
|
|
1043
1065
|
* with either `?connect_grant=<signed>` (proof of per-repo access) or
|
|
1044
1066
|
* `?error=repo_not_accessible`. Mirrors {@link getGithubLinkUrl} but carries
|
|
1045
1067
|
* the installation + repo the grant is scoped to.
|
|
@@ -1243,4 +1265,4 @@ function sleep(ms) {
|
|
|
1243
1265
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
1244
1266
|
}
|
|
1245
1267
|
//#endregion
|
|
1246
|
-
export { isExpiredTokenError as a,
|
|
1268
|
+
export { isExpiredTokenError as a, parsePlatformErrorBody as c, isCliOutdatedError as i, platformErrorMessage as l, PlatformApiError as n, isHeadersTimeoutError as o, PlatformClient as r, readCliVersion as s, MIN_PLATFORM_VERSION as t };
|