void 0.26.1 → 0.28.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/README.md +3 -1
- package/dist/{account-cmd-CfUXh_nU.mjs → account-cmd-Ci00cncT.mjs} +5 -5
- package/dist/{agents-B_pX_HmQ.mjs → agents-CuNtT0D_.mjs} +5 -2
- package/dist/{application-analysis-DKy02UY0.mjs → application-analysis-D72ZQfMZ.mjs} +118 -135
- package/dist/{application-routing-DQyUh_5S.mjs → application-routing-Dy589Vgn.mjs} +1 -2
- package/dist/atomic-write-Dq6R0BPN.mjs +18 -0
- package/dist/{auth-B5_tZLxT.mjs → auth-B6iOCjKI.mjs} +23 -56
- package/dist/{auth-link-D5RmKnzh.mjs → auth-link-DWr6Afao.mjs} +10 -10
- package/dist/{auth-migrations-BwHgeEsD.mjs → auth-migrations-Cgs0k6lS.mjs} +28 -5
- package/dist/{auth-router-Bap-pvbn.mjs → auth-router-DP14wVkZ.mjs} +4 -4
- package/dist/auth-wn6F8dB8.mjs +2 -0
- package/dist/base64-DVrOndmI.mjs +16 -0
- package/dist/{better-auth-shared-CPvWD3nG.d.mts → better-auth-shared-B74NJIus.d.mts} +8 -13
- package/dist/{better-auth-shared-DPpj8zxc.mjs → better-auth-shared-CMXlZG7W.mjs} +56 -68
- package/dist/{build-cmd-B58c8iS8.mjs → build-cmd-Cr3FJxv0.mjs} +5 -5
- package/dist/{cache-Bo52trKF.mjs → cache-D0Tt28cn.mjs} +5 -5
- package/dist/{cancel-deploy-BZNz3Q26.mjs → cancel-deploy-CJKvk7AN.mjs} +4 -4
- package/dist/{cf-access-TWNzXltp.mjs → cf-access-BM9G0lhO.mjs} +4 -3
- package/dist/{cf-access-ngGqZpHZ.mjs → cf-access-CWP4avfP.mjs} +3 -7
- package/dist/cf-build-output-2u583yJK.mjs +2 -0
- package/dist/{cf-build-output-DjvB_872.mjs → cf-build-output-Bc8i3dzE.mjs} +2 -2
- package/dist/cf-user-agent-ChjQp2MU.mjs +33 -0
- package/dist/cli/cli.mjs +198 -311
- package/dist/cli/cloudflare-operation-process.mjs +46 -14
- package/dist/cli/env-schema-probe.d.mts +5 -43
- package/dist/cli/env-schema-probe.mjs +14 -80
- package/dist/client-C1BjRn3g.mjs +2 -0
- package/dist/{client-C2Prx_Bi.mjs → client-DM9Kcf4e.mjs} +161 -415
- package/dist/{cloudflare-auth-CuxfF6OA.mjs → cloudflare-auth-CqFBDo52.mjs} +12 -39
- package/dist/{cloudflare-cmd-lHqNlJGW.mjs → cloudflare-cmd-CTrn-lXJ.mjs} +6 -5
- package/dist/{cloudflare-config-BmhBv3HV.mjs → cloudflare-config-DV60XFFK.mjs} +16 -28
- package/dist/{cloudflare-connect-2G3rL2rP.mjs → cloudflare-connect-BosmCNlq.mjs} +3 -3
- package/dist/{cloudflare-operations-CwI1bChl.mjs → cloudflare-operations-BKdSfNBN.mjs} +26 -34
- package/dist/{cloudflare-operations-BlYLlowZ.mjs → cloudflare-operations-Ds-lX3Ts.mjs} +1 -1
- package/dist/{cloudflare-process-2-TfIEzB.mjs → cloudflare-process-CeDWJRhj.mjs} +12 -7
- package/dist/collect-NUlJMpLY.mjs +2 -0
- package/dist/{collect-DiTn9yr6.mjs → collect-xjffdCdk.mjs} +1 -1
- package/dist/{config-CSa15FvD.d.mts → config-7qoq2p9v.d.mts} +2 -2
- package/dist/{config-CLYAosnQ.mjs → config-BEm9vRvS.mjs} +11 -5
- package/dist/{config-DiowPT80.mjs → config-Bx_1SpnO.mjs} +87 -177
- package/dist/config-CNnrSMYm.mjs +2 -0
- package/dist/{config-DPByhVck.mjs → config-D0GY5ItR.mjs} +1 -1
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-X0MUA1gk.mjs → connect-nukQSoEO.mjs} +8 -8
- package/dist/{create-project-DxiyW6iX.mjs → create-project-D4APeBwX.mjs} +7 -7
- package/dist/{create-project-iwkbqiBU.mjs → create-project-DL7YXpjj.mjs} +1 -1
- package/dist/{db-XnVMHzoV.mjs → db-27RztQLy.mjs} +173 -263
- package/dist/{delete-esYlMiSJ.mjs → delete-BbsZFZIw.mjs} +5 -5
- package/dist/deploy-B06EQq4t.mjs +6009 -0
- package/dist/deploy-Db2ALnQP.mjs +3 -0
- package/dist/deploy-managed-static-CGswbcay.mjs +2277 -0
- package/dist/deploy-transport-BiicfoQW.mjs +180 -0
- package/dist/deploy.d.mts +10 -0
- package/dist/deploy.mjs +82 -0
- package/dist/dev-inbox-Rd6j_8vM.mjs +217 -0
- package/dist/discover-CTUiSsfG.mjs +2 -0
- package/dist/{discover-CkCYv9T_.mjs → discover-D2PGT63u.mjs} +2 -2
- package/dist/{dist-BVqXeR_h.mjs → dist-ipQi0Q8y.mjs} +2 -3
- package/dist/{domain-CbbBWhWE.mjs → domain-Bfq9n03H.mjs} +7 -22
- package/dist/{dotenv-BfU6eqFt.mjs → dotenv-CNazY3-w.mjs} +4 -16
- package/dist/{email-d_Aux1vM.mjs → email-BcjSyAL0.mjs} +4 -20
- package/dist/{email-CpuT42g7.mjs → email-DIwaQU4P.mjs} +99 -191
- package/dist/email-cloudflare-CH053RxK.mjs +1096 -0
- package/dist/email-protocol-D9nTvhCp.mjs +82 -0
- package/dist/{entry-CMAkqBmU.mjs → entry-ehmBvs5w.mjs} +2 -2
- package/dist/{env-BxocywBB.mjs → env-BJjULvL0.mjs} +2 -2
- package/dist/{env-DMA3cXZt.mjs → env-BhdWMrNy.mjs} +2 -13
- package/dist/{env-w9jOyGZn.mjs → env-C6ipBLp3.mjs} +8 -8
- package/dist/{env-public-DR7ZM6d-.d.mts → env-public-CCdykygU.d.mts} +6 -23
- package/dist/{env-raw-jZpP5n47.mjs → env-raw-Cklzcde3.mjs} +3 -20
- package/dist/{env-types-CwXgeMgL.mjs → env-types-DS2_y4X8.mjs} +2 -2
- package/dist/{env-validation-CrVNjsPm.mjs → env-validation-CTn-HhG1.mjs} +1 -1
- package/dist/env-validation-cE0zcmzO.mjs +486 -0
- package/dist/{gen-DtkQhvQg.mjs → gen-CnN1Xidx.mjs} +131 -253
- package/dist/gen-F8pSZnhc.mjs +2 -0
- package/dist/{generate-GDbL7sUr.mjs → generate-Dat0UTry.mjs} +38 -4
- package/dist/generate-Rii9klHB.mjs +2 -0
- package/dist/generated-wrangler-config-DeWj5F9Y.mjs +18 -0
- package/dist/{github-cmd-D_FsOFxq.mjs → github-cmd-BdkU4Nhe.mjs} +27 -71
- package/dist/{handler-BHAn2fZJ.mjs → handler-BZ1t7-Rv.mjs} +2 -2
- package/dist/{handler-CNAwjRcW.d.mts → handler-_PqY82xe.d.mts} +1 -1
- package/dist/{headers-DlfR78Nu.mjs → headers-Di1FsD3e.mjs} +26 -81
- package/dist/{help-CVFBTmBx.mjs → help-Bug7pyK_.mjs} +18 -10
- package/dist/help-s9q7LTcu.mjs +2 -0
- package/dist/{inbound-PfQDLXc5.mjs → inbound-DmkTQeWp.mjs} +71 -222
- package/dist/{inbound-CH5Mksyy.d.mts → inbound-brj2-TM5.d.mts} +19 -58
- package/dist/index.d.mts +2 -18
- package/dist/index.mjs +200 -496
- package/dist/{info-PYWwkWyt.mjs → info-CujPwtMe.mjs} +5 -5
- package/dist/{init-Bw-fRKGp.mjs → init-ZWOJvc-Z.mjs} +179 -388
- package/dist/isr-config-DPjXM8J2.mjs +194 -0
- package/dist/{link-DlPG8iX3.mjs → link-UEc7bnF4.mjs} +8 -8
- package/dist/{list-2GN7_ueV.mjs → list-CuWeOnzk.mjs} +6 -17
- package/dist/{live-CgQuTpqD.mjs → live-BxLX-JqJ.mjs} +19 -17
- package/dist/{live-Du8jXwOW.d.mts → live-DJONVlQK.d.mts} +1 -1
- package/dist/load-user-env-DD5qveNU.mjs +49 -0
- package/dist/{local-d1-ga5O_idV.mjs → local-d1-BM3p74mm.mjs} +6 -6
- package/dist/{login-D-Q4xw3Q.mjs → login-CZ2Cqa-D.mjs} +11 -11
- package/dist/login-DhK7o1oJ.mjs +2 -0
- package/dist/{logs-rd8J-OFh.mjs → logs-TihRcLTk.mjs} +5 -5
- package/dist/migrate-BgT-hmu8.mjs +2 -0
- package/dist/{migrate-NLsjBbuM.mjs → migrate-uFwojusJ.mjs} +69 -21
- package/dist/migration-handler-Cg0Y4EPu.mjs +470 -0
- package/dist/{migration-handler-DM4clYj5.d.mts → migration-handler-CwlEQUoo.d.mts} +17 -26
- package/dist/{mime-DxCznlJq.mjs → mime-srOklVVv.mjs} +92 -395
- package/dist/{node-DJicPvPj.mjs → node-DoKbo1SZ.mjs} +8 -24
- package/dist/{operator-args-BNsW5gfp.mjs → operator-args-UnE8Y2eK.mjs} +27 -26
- package/dist/{operator-auth-AzVLbrr3.mjs → operator-auth-Cr2zCc-J.mjs} +2 -2
- package/dist/{operator-client-BQtzyG-g.mjs → operator-client-C-ROjk1I.mjs} +4 -4
- package/dist/{operator-cmd-B6f6Cg9Z.mjs → operator-cmd-C5lCctnc.mjs} +8 -8
- package/dist/operator-cmd-Cjk5DiRx.mjs +2 -0
- package/dist/{output-C50ag2r3.mjs → output-FNHKw5Ac.mjs} +36 -5
- package/dist/{package-json-DXfiT1jV.mjs → package-json-BjYqR-So.mjs} +1 -1
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/client.mjs +91 -5
- package/dist/pages/index.d.mts +1 -2
- package/dist/pages/index.mjs +6 -6
- package/dist/pages/islands-plugin.mjs +5 -83
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/pages/serialize.mjs +1 -1
- package/dist/{platform-args-BoZkWQnJ.mjs → platform-args-C6Mb_I3a.mjs} +34 -58
- package/dist/platform-args-Cm7x-fot.mjs +2 -0
- package/dist/{platform-auth-config-n603OANg.mjs → platform-auth-config-CJmNkFT2.mjs} +10 -11
- package/dist/{platform-auth-protection-zxDr0hWW.mjs → platform-auth-protection-D5wvsI-Y.mjs} +36 -26
- package/dist/{platform-auth-recovery-tw9lgtgE.mjs → platform-auth-recovery-D_0I3n-1.mjs} +8 -9
- package/dist/{platform-cmd-C00YM14r.mjs → platform-cmd-Cuj4oUVo.mjs} +1 -1
- package/dist/{platform-cmd-B8-bCb7t.mjs → platform-cmd-DxxZO6e5.mjs} +17 -16
- package/dist/{platform-discovery-BC0HCKYt.mjs → platform-discovery-CHhNs8Nn.mjs} +1 -1
- package/dist/{platform-domain-p0kobLV8.mjs → platform-domain-zLXnW1G_.mjs} +5 -5
- package/dist/{platform-lifecycle-D_QEY32D.mjs → platform-lifecycle-DOW-wLfx.mjs} +1398 -2043
- package/dist/{platform-lifecycle-vFqtNPPa.mjs → platform-lifecycle-_gfnjUBr.mjs} +1 -1
- package/dist/{platform-management-oi-SvI3f.mjs → platform-management-CYrLvTGH.mjs} +1 -1
- package/dist/{platform-management-BdYblvvE.mjs → platform-management-t7HKy4-U.mjs} +632 -124
- package/dist/{platform-plans-config-CjiFv5J4.mjs → platform-plans-config-CNH6zbPX.mjs} +15 -11
- package/dist/{platform-recovery-PvNS9Nl2.mjs → platform-recovery-DeucI7A9.mjs} +6 -9
- package/dist/{platform-registry-P387v42A.mjs → platform-registry-B9mWX9LO.mjs} +18 -19
- package/dist/{platform-setup-DVe42Ws7.mjs → platform-setup-CTf6MMT9.mjs} +19 -26
- package/dist/{plugin-inference-BlQbOL0P.mjs → plugin-inference-DsARdQKE.mjs} +18 -33
- package/dist/{prepare-Dq9hTIbo.mjs → prepare-C4zfwks4.mjs} +3 -3
- package/dist/{prepare-Do96654b.mjs → prepare-CSH9dKTI.mjs} +11 -13
- package/dist/prepare-dr9uxQSV.mjs +2 -0
- package/dist/{prerender-render-Ct20jftc.mjs → prerender-render-Bfsumdkv.mjs} +8 -2
- package/dist/prerender-render.d.mts +2 -0
- package/dist/prerender-render.mjs +2 -2
- package/dist/project-DiiOBZPF.mjs +2 -0
- package/dist/{project-cmd-ti8_yTcA.mjs → project-cmd-Dq75AXzy.mjs} +19 -19
- package/dist/{project-paths-GgcMozYz.mjs → project-paths-DMvEeSau.mjs} +9 -14
- package/dist/{project-DQstYTxO.mjs → project-rqDnVsJN.mjs} +8 -4
- package/dist/{project-team-CDPE1Tsg.mjs → project-team-B3_QcStG.mjs} +6 -6
- package/dist/{project-token-CkZ1cN0Z.mjs → project-token-CvsRvv2I.mjs} +5 -5
- package/dist/{project-tsconfig-CVJhNMxs.mjs → project-tsconfig-bveqhlYA.mjs} +3 -5
- package/dist/{project-zero-trust-DdjLR61k.mjs → project-zero-trust-D1ICiwN_.mjs} +5 -5
- package/dist/{protocol-BPZaNqBo.d.mts → protocol-4H7V_3Os.d.mts} +1 -1
- package/dist/{protocol-CfaUwNs8.mjs → protocol-RNP0u7UY.mjs} +9 -3
- package/dist/{provision-BfaLiWbj.mjs → provision-DDh7ITVS.mjs} +118 -865
- package/dist/{requests-DFAqyYy8.mjs → requests-3CL3BuZh.mjs} +4 -4
- package/dist/resolve-project-B9Hr0D3n.mjs +2 -0
- package/dist/resolve-project-C_Cu7E8a.mjs +48 -0
- package/dist/{rollback-BKYXBduI.mjs → rollback-Ce1d_0J9.mjs} +7 -17
- package/dist/{route-types-CbtsIeFn.mjs → route-types-IrBuwJ7u.mjs} +35 -70
- package/dist/routing-assets-VkrKIbxE.mjs +139 -0
- package/dist/{runner-9wjsSZx-.mjs → runner-B5huK2eC.mjs} +1 -1
- package/dist/{runner-DMBKSrRk.mjs → runner-DcVDrzuR.mjs} +7 -28
- package/dist/{runner-mysql-CEzKtmFb.mjs → runner-mysql-CCtyI0p6.mjs} +4 -3
- package/dist/runner-mysql-CaJq-hd6.mjs +2 -0
- package/dist/runner-pg-BJhFZZG4.mjs +2 -0
- package/dist/{runner-pg-DV8p_zjA.mjs → runner-pg-CPd-CB_F.mjs} +1 -1
- package/dist/runtime/ai.mjs +9 -22
- package/dist/runtime/better-auth-mysql.d.mts +2 -5
- package/dist/runtime/better-auth-mysql.mjs +6 -31
- package/dist/runtime/better-auth-pg.d.mts +2 -5
- package/dist/runtime/better-auth-pg.mjs +6 -32
- package/dist/runtime/better-auth.d.mts +2 -4
- package/dist/runtime/better-auth.mjs +9 -19
- package/dist/runtime/db.mjs +1 -1
- package/dist/runtime/durable.d.mts +16 -0
- package/dist/runtime/durable.mjs +26 -2
- package/dist/runtime/email/testing.d.mts +1 -1
- package/dist/runtime/email/testing.mjs +9 -23
- package/dist/runtime/email-protocol.d.mts +12 -0
- package/dist/runtime/email-protocol.mjs +2 -70
- package/dist/runtime/email.d.mts +1 -1
- package/dist/runtime/email.mjs +79 -221
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/env-public.mjs +12 -38
- package/dist/runtime/env.d.mts +1 -12
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +1 -1
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/kv.mjs +1 -1
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live-server.mjs +1 -16
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/migration-handler-mysql.d.mts +2 -2
- package/dist/runtime/migration-handler-mysql.mjs +3 -2
- package/dist/runtime/migration-handler-pg.d.mts +2 -2
- package/dist/runtime/migration-handler-pg.mjs +1 -1
- package/dist/runtime/migration-handler.d.mts +2 -2
- package/dist/runtime/migration-handler.mjs +2 -470
- package/dist/runtime/queues.mjs +1 -1
- package/dist/runtime/remote/binding-handler.mjs +62 -62
- package/dist/runtime/remote/index.mjs +16 -77
- package/dist/runtime/routing.d.mts +1 -4
- package/dist/runtime/routing.mjs +82 -218
- package/dist/runtime/sandbox-container.d.mts +2 -2
- package/dist/runtime/sandbox-container.mjs +2 -2
- package/dist/runtime/sandbox.d.mts +2 -2
- package/dist/runtime/sandbox.mjs +13 -6
- package/dist/runtime/storage.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +2 -3
- package/dist/runtime/ws-server.mjs +6 -28
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{sandbox-container-Bo0eiFKz.d.mts → sandbox-container-ChQRum-j.d.mts} +3 -1
- package/dist/{sandbox-container-C6ItmVuN.mjs → sandbox-container-DBKIqDEK.mjs} +12 -1
- package/dist/{sandbox-C5LFoJMf.d.mts → sandbox-q3waMc2T.d.mts} +1 -1
- package/dist/{scan-C3uDzz6J.mjs → scan-C0BMdmEd.mjs} +84 -7
- package/dist/{secret-BAt2KMmO.mjs → secret-B5J8bBsI.mjs} +62 -80
- package/dist/{serialize-BPvnNQuA.mjs → serialize-BtQyaYoC.mjs} +10 -4
- package/dist/{skills-BgVMvQdy.mjs → skills-BJsan98C.mjs} +2 -2
- package/dist/{subcommand-prompt-BSlnD1fI.mjs → subcommand-prompt-gQ-NDA-u.mjs} +38 -43
- package/dist/sveltekit.mjs +1 -1
- package/dist/validate-C9xtFOYR.mjs +2 -0
- package/dist/{validate-C9qJArv7.mjs → validate-CheZGRE7.mjs} +4 -8
- package/dist/version-metadata-DIrqEHQo.mjs +73 -0
- package/dist/{wrangler-D9KTuqnv.mjs → wrangler-BYs07Rxy.mjs} +119 -378
- package/dist/{ws-CChrrAU-.d.mts → ws-aKVYB-fA.d.mts} +1 -1
- package/dist/yarn-pnp-DLbEFMT0.mjs +92 -0
- package/docs/guide/auth.md +2 -0
- package/docs/guide/database/postgresql.md +2 -0
- package/docs/guide/database.md +2 -0
- package/docs/guide/deployment.md +2 -2
- package/docs/guide/durable-state.md +24 -0
- package/docs/guide/platform/administration/access.md +5 -1
- package/docs/guide/platform/administration/connected-apps.md +55 -0
- package/docs/guide/platform/installation/credentials.md +3 -1
- package/docs/guide/platform/installation/first-deployment.md +1 -1
- package/docs/guide/project-collaboration.md +1 -1
- package/docs/guide/quickstart.md +2 -0
- package/docs/guide/sandboxes.md +2 -0
- package/docs/reference/api/deploy.md +23 -0
- package/docs/reference/api/pages.md +2 -0
- package/docs/reference/api.md +2 -1
- package/docs/reference/cli/auth.md +1 -1
- package/docs/reference/cli/database.md +9 -3
- package/docs/reference/cli/deploy.md +1 -1
- package/docs/reference/cli/platform-installation.md +1 -1
- package/docs/reference/cli/setup.md +2 -0
- package/package.json +14 -17
- package/skills/void/SKILL.md +4 -2
- package/dist/auth-BgX2qYSY.mjs +0 -2
- package/dist/cf-build-output-H9a97vME.mjs +0 -2
- package/dist/client-By4JjMw_.mjs +0 -2
- package/dist/collect-DLyFDiKW.mjs +0 -2
- package/dist/config-5r-YpMC-.mjs +0 -2
- package/dist/config-B_ggY-IO.mjs +0 -89
- package/dist/config-BtSFvXZx.mjs +0 -2
- package/dist/config-write-AHGesphx.mjs +0 -61
- package/dist/deploy-BsEvnlJl.mjs +0 -10455
- package/dist/deploy-C1d-YTfp.mjs +0 -2
- package/dist/dev-inbox-CK-UuPob.mjs +0 -297
- package/dist/discover-EDUf6JJw.mjs +0 -2
- package/dist/dist-_UUlL6bg.mjs +0 -2
- package/dist/env-validation-Dxdx_5wo.mjs +0 -951
- package/dist/gen-dA9hW7AV.mjs +0 -2
- package/dist/head-client-DzmJGN4C.mjs +0 -90
- package/dist/help-DzKUrQvk.mjs +0 -2
- package/dist/login-Dc-wuTDq.mjs +0 -2
- package/dist/migrate-BHp07yJE.mjs +0 -2
- package/dist/operator-cmd-Cwn50lOV.mjs +0 -2
- package/dist/pages/head-client.d.mts +0 -13
- package/dist/pages/head-client.mjs +0 -2
- package/dist/platform-args-DYgITk0D.mjs +0 -2
- package/dist/prepare-DRUV-g3X.mjs +0 -2
- package/dist/project-BiaPQ7ur.mjs +0 -2
- package/dist/provision-Wu9ZBk9L.mjs +0 -2
- package/dist/resolve-project-BIeYs9Cw.mjs +0 -2
- package/dist/resolve-project-CP8rZs_p.mjs +0 -28
- package/dist/runner-mysql-CkFqZ6CE.mjs +0 -2
- package/dist/runner-pg-BGYRFdRp.mjs +0 -2
- package/dist/runtime/env-helpers.d.mts +0 -2
- package/dist/runtime/env-helpers.mjs +0 -2
- package/dist/validate-BJr9LfXy.mjs +0 -2
- package/dist/yarn-pnp-CUX_iTPA.mjs +0 -188
package/dist/cli/cli.mjs
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as join } from "../dist-BVqXeR_h.mjs";
|
|
3
2
|
import { L as log } from "../dist-D3m88sjf.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { n as getPackageDir } from "../agents-B_pX_HmQ.mjs";
|
|
3
|
+
import { f as import_picocolors, l as formatUrl } from "../output-FNHKw5Ac.mjs";
|
|
6
4
|
import { t as formatCloudflareUserMessage } from "../cloudflare-user-output-Q-k0QoNQ.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import { r as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { n as getOwnVersion } from "../agents-CuNtT0D_.mjs";
|
|
6
|
+
import { i as printVoidHeader, n as printGlobalHelp, r as printHelpPage, t as getHelpPath } from "../help-Bug7pyK_.mjs";
|
|
7
|
+
import { r as OperatorClientError } from "../operator-client-C-ROjk1I.mjs";
|
|
8
|
+
import { n as platformSubcommands, t as parsePlatformArgs } from "../platform-args-C6Mb_I3a.mjs";
|
|
11
9
|
import { parseArgs } from "node:util";
|
|
12
10
|
//#region src/cli/account-args.ts
|
|
13
11
|
const accountSubcommands = [
|
|
@@ -354,8 +352,25 @@ const dbSubcommands = [
|
|
|
354
352
|
]
|
|
355
353
|
}
|
|
356
354
|
];
|
|
355
|
+
const MAX_POSITIONALS = {
|
|
356
|
+
push: 0,
|
|
357
|
+
generate: 0,
|
|
358
|
+
status: 0,
|
|
359
|
+
reset: 0,
|
|
360
|
+
seed: 0,
|
|
361
|
+
execute: 1,
|
|
362
|
+
migrate: 0,
|
|
363
|
+
studio: 0,
|
|
364
|
+
"set-url": 0,
|
|
365
|
+
connect: 1,
|
|
366
|
+
"rename-migrations": 0,
|
|
367
|
+
export: 0
|
|
368
|
+
};
|
|
369
|
+
function isDbAction(value) {
|
|
370
|
+
return value !== void 0 && Object.hasOwn(MAX_POSITIONALS, value);
|
|
371
|
+
}
|
|
357
372
|
function parseDbArgs(args) {
|
|
358
|
-
const
|
|
373
|
+
const { values, positionals } = parseArgs({
|
|
359
374
|
args,
|
|
360
375
|
options: {
|
|
361
376
|
file: { type: "string" },
|
|
@@ -367,96 +382,64 @@ function parseDbArgs(args) {
|
|
|
367
382
|
provider: { type: "string" },
|
|
368
383
|
name: { type: "string" },
|
|
369
384
|
region: { type: "string" },
|
|
370
|
-
"local-only": { type: "boolean" }
|
|
385
|
+
"local-only": { type: "boolean" },
|
|
386
|
+
yes: { type: "boolean" }
|
|
371
387
|
},
|
|
372
388
|
allowPositionals: true,
|
|
373
389
|
strict: true
|
|
374
390
|
});
|
|
375
|
-
const [action, ...rest] =
|
|
376
|
-
if (action
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
return { action };
|
|
383
|
-
}
|
|
384
|
-
if (action === "status") {
|
|
385
|
-
if (rest.length > 0) throw new Error(`db: Unexpected argument '${rest[0]}'.`);
|
|
386
|
-
return { action };
|
|
387
|
-
}
|
|
388
|
-
if (action === "reset") {
|
|
389
|
-
if (rest.length > 0) throw new Error(`db: Unexpected argument '${rest[0]}'.`);
|
|
390
|
-
return { action };
|
|
391
|
-
}
|
|
392
|
-
if (action === "seed") {
|
|
393
|
-
if (rest.length > 0) throw new Error(`db: Unexpected argument '${rest[0]}'.`);
|
|
394
|
-
return {
|
|
395
|
-
action,
|
|
396
|
-
file: typeof parsed.values.file === "string" ? parsed.values.file : void 0
|
|
397
|
-
};
|
|
398
|
-
}
|
|
399
|
-
if (action === "execute") {
|
|
400
|
-
const command = rest[0];
|
|
401
|
-
if (rest.length > 1) throw new Error(`db: Unexpected argument '${rest[1]}'.`);
|
|
402
|
-
const file = typeof parsed.values.file === "string" ? parsed.values.file : void 0;
|
|
403
|
-
if (!command && !file) throw new Error("db: Usage: void db execute <sql> or void db execute --file <path>.");
|
|
404
|
-
if (command && file) throw new Error("db: Provide either SQL inline or --file, not both.");
|
|
405
|
-
return {
|
|
406
|
-
action,
|
|
407
|
-
command,
|
|
408
|
-
file,
|
|
409
|
-
remote: parsed.values.remote === true ? true : void 0
|
|
410
|
-
};
|
|
411
|
-
}
|
|
412
|
-
if (action === "migrate") {
|
|
413
|
-
if (rest.length > 0) throw new Error(`db: Unexpected argument '${rest[0]}'.`);
|
|
414
|
-
return {
|
|
391
|
+
const [action, ...rest] = positionals;
|
|
392
|
+
if (!isDbAction(action)) throw new Error("db: Usage: void db <push|generate|status|reset|seed|execute|migrate|studio|export|connect|set-url|rename-migrations>.");
|
|
393
|
+
if (action === "export" && values.remote) throw new Error("`void db export --remote` is not yet supported. Local export only for now.");
|
|
394
|
+
const maxPositionals = MAX_POSITIONALS[action];
|
|
395
|
+
if (rest.length > maxPositionals) throw new Error(`db: Unexpected argument '${rest[maxPositionals]}'.`);
|
|
396
|
+
switch (action) {
|
|
397
|
+
case "reset": return {
|
|
415
398
|
action,
|
|
416
|
-
|
|
399
|
+
yes: values.yes
|
|
417
400
|
};
|
|
418
|
-
|
|
419
|
-
if (action === "studio") {
|
|
420
|
-
if (rest.length > 0) throw new Error(`db: Unexpected argument '${rest[0]}'.`);
|
|
421
|
-
return {
|
|
401
|
+
case "seed": return {
|
|
422
402
|
action,
|
|
423
|
-
|
|
403
|
+
file: values.file,
|
|
404
|
+
yes: values.yes
|
|
424
405
|
};
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
406
|
+
case "execute": {
|
|
407
|
+
const [command] = rest;
|
|
408
|
+
if (!command && !values.file) throw new Error("db: Usage: void db execute <sql> or void db execute --file <path>.");
|
|
409
|
+
if (command && values.file) throw new Error("db: Provide either SQL inline or --file, not both.");
|
|
410
|
+
return {
|
|
411
|
+
action,
|
|
412
|
+
command,
|
|
413
|
+
file: values.file,
|
|
414
|
+
remote: values.remote
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
case "migrate":
|
|
418
|
+
case "studio": return {
|
|
436
419
|
action,
|
|
437
|
-
|
|
438
|
-
provider,
|
|
439
|
-
name: typeof parsed.values.name === "string" ? parsed.values.name : void 0,
|
|
440
|
-
region: typeof parsed.values.region === "string" ? parsed.values.region : void 0,
|
|
441
|
-
localOnly: parsed.values["local-only"] === true ? true : void 0
|
|
420
|
+
remote: values.remote
|
|
442
421
|
};
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
422
|
+
case "connect": {
|
|
423
|
+
const [url] = rest;
|
|
424
|
+
if (url && values.provider) throw new Error("db: Provide either a connection string or --provider, not both.");
|
|
425
|
+
return {
|
|
426
|
+
action,
|
|
427
|
+
url,
|
|
428
|
+
provider: values.provider,
|
|
429
|
+
name: values.name,
|
|
430
|
+
region: values.region,
|
|
431
|
+
localOnly: values["local-only"]
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
case "export": return {
|
|
452
435
|
action,
|
|
453
|
-
output:
|
|
454
|
-
noData:
|
|
455
|
-
noSchema:
|
|
456
|
-
table:
|
|
436
|
+
output: values.output,
|
|
437
|
+
noData: values["no-data"],
|
|
438
|
+
noSchema: values["no-schema"],
|
|
439
|
+
table: values.table
|
|
457
440
|
};
|
|
441
|
+
default: return { action };
|
|
458
442
|
}
|
|
459
|
-
throw new Error("db: Usage: void db <push|generate|status|reset|seed|execute|migrate|studio|export|connect|set-url|rename-migrations>.");
|
|
460
443
|
}
|
|
461
444
|
//#endregion
|
|
462
445
|
//#region src/cli/domain-args.ts
|
|
@@ -561,6 +544,7 @@ const EMAIL_SUBCOMMANDS = [
|
|
|
561
544
|
"status",
|
|
562
545
|
"setup"
|
|
563
546
|
];
|
|
547
|
+
const SUBDOMAIN_ADD_ONLY = "email: --subdomain applies to `void email domain add` only.";
|
|
564
548
|
const EMAIL_DOMAIN_VERBS = [
|
|
565
549
|
"add",
|
|
566
550
|
"status",
|
|
@@ -644,7 +628,7 @@ function parseEmailArgs(args) {
|
|
|
644
628
|
subdomain
|
|
645
629
|
});
|
|
646
630
|
}
|
|
647
|
-
if (subdomain !== void 0) throw new Error(
|
|
631
|
+
if (subdomain !== void 0) throw new Error(SUBDOMAIN_ADD_ONLY);
|
|
648
632
|
if (positional.length > 1) throw new Error(`email: \`void email ${subcommand}\` takes exactly one positional argument (got ${positional.length}: ${positional.map((p) => JSON.stringify(p)).join(", ")}).`);
|
|
649
633
|
const address = positional[0];
|
|
650
634
|
if ((subcommand === "allow" || subcommand === "disallow") && !address) throw new Error(`email: Usage: void email ${subcommand} <address> [--project <name>].`);
|
|
@@ -662,16 +646,13 @@ function parseEmailArgs(args) {
|
|
|
662
646
|
};
|
|
663
647
|
}
|
|
664
648
|
/**
|
|
665
|
-
*
|
|
666
|
-
*
|
|
667
|
-
* requires exactly one. Shape validation of the domain itself is the command's
|
|
668
|
-
* job (and ultimately the api's — its regex is authoritative); the parser only
|
|
669
|
-
* counts positionals, exactly as it does for `allow <address>`.
|
|
649
|
+
* `void email domain <verb> [<domain>]`. The parser only counts positionals; the command
|
|
650
|
+
* and the API validate the domain itself.
|
|
670
651
|
*/
|
|
671
652
|
function parseEmailDomainArgs(positional, flags) {
|
|
672
653
|
const verb = positional[0];
|
|
673
654
|
if (!verb || !EMAIL_DOMAIN_VERBS.includes(verb)) throw new Error("email: Usage: void email domain <add|status|list|sync|rotate-secret|remove> [<domain>] [--project <name>].");
|
|
674
|
-
if (flags.subdomain !== void 0 && verb !== "add") throw new Error(
|
|
655
|
+
if (flags.subdomain !== void 0 && verb !== "add") throw new Error(SUBDOMAIN_ADD_ONLY);
|
|
675
656
|
const domain = positional[1];
|
|
676
657
|
if (verb === "list") {
|
|
677
658
|
if (domain !== void 0) throw new Error("email: `void email domain list` takes no domain argument.");
|
|
@@ -966,158 +947,98 @@ const githubSubcommands = [
|
|
|
966
947
|
description: "Join your organization's shared GitHub App installations"
|
|
967
948
|
}
|
|
968
949
|
];
|
|
950
|
+
function parseExecutor(value) {
|
|
951
|
+
if (value !== "container" && value !== "github_actions") throw new Error("github: invalid --executor (expected container|github_actions).");
|
|
952
|
+
return value;
|
|
953
|
+
}
|
|
954
|
+
/**
|
|
955
|
+
* Parses `[project] [flags]`, where `--project <name>` is an alias for the
|
|
956
|
+
* positional. Value flags require a non-blank value and receive it untrimmed.
|
|
957
|
+
*/
|
|
958
|
+
function parseProjectArgs$1(rest, valueFlags, booleanFlags = {}) {
|
|
959
|
+
let projectName = "";
|
|
960
|
+
for (let i = 0; i < rest.length; i++) {
|
|
961
|
+
const arg = rest[i];
|
|
962
|
+
if (Object.hasOwn(booleanFlags, arg)) {
|
|
963
|
+
booleanFlags[arg]();
|
|
964
|
+
continue;
|
|
965
|
+
}
|
|
966
|
+
if (arg !== "--project" && !Object.hasOwn(valueFlags, arg)) {
|
|
967
|
+
if (arg.startsWith("-") || projectName) throw new Error(`github: Unexpected argument '${arg}'.`);
|
|
968
|
+
projectName = arg;
|
|
969
|
+
continue;
|
|
970
|
+
}
|
|
971
|
+
const value = rest[++i];
|
|
972
|
+
if (value === void 0 || value.trim() === "") throw new Error(`github: ${arg} requires a value.`);
|
|
973
|
+
if (arg !== "--project") valueFlags[arg](value);
|
|
974
|
+
else if (projectName) throw new Error(`github: Unexpected argument '${value}'.`);
|
|
975
|
+
else projectName = value;
|
|
976
|
+
}
|
|
977
|
+
return projectName;
|
|
978
|
+
}
|
|
969
979
|
function parseGithubArgs(args) {
|
|
970
980
|
const [subcommand, ...rest] = args;
|
|
971
|
-
if (subcommand === "install") {
|
|
972
|
-
if (rest.length > 0) throw new Error(`github: Unexpected argument '${rest[0]}'.`);
|
|
973
|
-
return { subcommand };
|
|
974
|
-
}
|
|
975
|
-
if (subcommand === "installations") {
|
|
976
|
-
if (rest.length > 0) throw new Error(`github: Unexpected argument '${rest[0]}'.`);
|
|
977
|
-
return { subcommand };
|
|
978
|
-
}
|
|
979
|
-
if (subcommand === "link") {
|
|
980
|
-
if (rest.length > 0) throw new Error(`github: Unexpected argument '${rest[0]}'.`);
|
|
981
|
-
return { subcommand };
|
|
982
|
-
}
|
|
983
|
-
if (subcommand === "join") {
|
|
981
|
+
if (subcommand === "install" || subcommand === "installations" || subcommand === "link" || subcommand === "join") {
|
|
984
982
|
if (rest.length > 0) throw new Error(`github: Unexpected argument '${rest[0]}'.`);
|
|
985
983
|
return { subcommand };
|
|
986
984
|
}
|
|
987
985
|
if (subcommand === "connect") {
|
|
988
|
-
|
|
989
|
-
let installationId;
|
|
990
|
-
let repo;
|
|
991
|
-
let branch;
|
|
992
|
-
let executor;
|
|
993
|
-
let workflowPath;
|
|
994
|
-
for (let i = 0; i < rest.length; i++) {
|
|
995
|
-
const arg = rest[i];
|
|
996
|
-
if (arg === "--installation") {
|
|
997
|
-
if (i + 1 >= rest.length) throw new Error("github: --installation requires a value.");
|
|
998
|
-
const value = rest[++i];
|
|
999
|
-
if (value.trim() === "") throw new Error("github: --installation requires a value.");
|
|
1000
|
-
installationId = value;
|
|
1001
|
-
} else if (arg === "--repo") {
|
|
1002
|
-
if (i + 1 >= rest.length) throw new Error("github: --repo requires a value.");
|
|
1003
|
-
const value = rest[++i];
|
|
1004
|
-
if (value.trim() === "") throw new Error("github: --repo requires a value.");
|
|
1005
|
-
repo = value;
|
|
1006
|
-
} else if (arg === "--branch") {
|
|
1007
|
-
if (i + 1 >= rest.length) throw new Error("github: --branch requires a value.");
|
|
1008
|
-
const value = rest[++i];
|
|
1009
|
-
if (value.trim() === "") throw new Error("github: --branch requires a value.");
|
|
1010
|
-
branch = value;
|
|
1011
|
-
} else if (arg === "--project") {
|
|
1012
|
-
if (i + 1 >= rest.length) throw new Error("github: --project requires a value.");
|
|
1013
|
-
const value = rest[++i];
|
|
1014
|
-
if (value.trim() === "") throw new Error("github: --project requires a value.");
|
|
1015
|
-
if (projectName) throw new Error(`github: Unexpected argument '${value}'.`);
|
|
1016
|
-
projectName = value;
|
|
1017
|
-
} else if (arg === "--executor") {
|
|
1018
|
-
if (i + 1 >= rest.length) throw new Error("github: --executor requires a value.");
|
|
1019
|
-
const value = rest[++i];
|
|
1020
|
-
if (value.trim() === "") throw new Error("github: --executor requires a value.");
|
|
1021
|
-
if (value !== "container" && value !== "github_actions") throw new Error("github: invalid --executor (expected container|github_actions).");
|
|
1022
|
-
executor = value;
|
|
1023
|
-
} else if (arg === "--workflow") {
|
|
1024
|
-
if (i + 1 >= rest.length) throw new Error("github: --workflow requires a value.");
|
|
1025
|
-
const value = rest[++i];
|
|
1026
|
-
if (value.trim() === "") throw new Error("github: --workflow requires a value.");
|
|
1027
|
-
workflowPath = value.trim();
|
|
1028
|
-
} else if (arg.startsWith("-")) throw new Error(`github: Unexpected argument '${arg}'.`);
|
|
1029
|
-
else if (projectName) throw new Error(`github: Unexpected argument '${arg}'.`);
|
|
1030
|
-
else projectName = arg;
|
|
1031
|
-
}
|
|
1032
|
-
return {
|
|
986
|
+
const parsed = {
|
|
1033
987
|
subcommand,
|
|
1034
|
-
projectName
|
|
1035
|
-
installationId,
|
|
1036
|
-
repo,
|
|
1037
|
-
branch,
|
|
1038
|
-
executor,
|
|
1039
|
-
workflowPath
|
|
988
|
+
projectName: ""
|
|
1040
989
|
};
|
|
990
|
+
parsed.projectName = parseProjectArgs$1(rest, {
|
|
991
|
+
"--installation": (value) => {
|
|
992
|
+
parsed.installationId = value;
|
|
993
|
+
},
|
|
994
|
+
"--repo": (value) => {
|
|
995
|
+
parsed.repo = value;
|
|
996
|
+
},
|
|
997
|
+
"--branch": (value) => {
|
|
998
|
+
parsed.branch = value;
|
|
999
|
+
},
|
|
1000
|
+
"--executor": (value) => {
|
|
1001
|
+
parsed.executor = parseExecutor(value);
|
|
1002
|
+
},
|
|
1003
|
+
"--workflow": (value) => {
|
|
1004
|
+
parsed.workflowPath = value.trim();
|
|
1005
|
+
}
|
|
1006
|
+
});
|
|
1007
|
+
return parsed;
|
|
1041
1008
|
}
|
|
1042
1009
|
if (subcommand === "update") {
|
|
1043
|
-
|
|
1044
|
-
let branch;
|
|
1045
|
-
let executor;
|
|
1046
|
-
let workflowPath;
|
|
1047
|
-
for (let i = 0; i < rest.length; i++) {
|
|
1048
|
-
const arg = rest[i];
|
|
1049
|
-
if (arg === "--branch") {
|
|
1050
|
-
if (i + 1 >= rest.length) throw new Error("github: --branch requires a value.");
|
|
1051
|
-
const value = rest[++i];
|
|
1052
|
-
if (value.trim() === "") throw new Error("github: --branch requires a value.");
|
|
1053
|
-
branch = value.trim();
|
|
1054
|
-
} else if (arg === "--project") {
|
|
1055
|
-
if (i + 1 >= rest.length) throw new Error("github: --project requires a value.");
|
|
1056
|
-
const value = rest[++i];
|
|
1057
|
-
if (value.trim() === "") throw new Error("github: --project requires a value.");
|
|
1058
|
-
if (projectName) throw new Error(`github: Unexpected argument '${value}'.`);
|
|
1059
|
-
projectName = value;
|
|
1060
|
-
} else if (arg === "--executor") {
|
|
1061
|
-
if (i + 1 >= rest.length) throw new Error("github: --executor requires a value.");
|
|
1062
|
-
const value = rest[++i];
|
|
1063
|
-
if (value.trim() === "") throw new Error("github: --executor requires a value.");
|
|
1064
|
-
if (value !== "container" && value !== "github_actions") throw new Error("github: invalid --executor (expected container|github_actions).");
|
|
1065
|
-
executor = value;
|
|
1066
|
-
} else if (arg === "--workflow") {
|
|
1067
|
-
if (i + 1 >= rest.length) throw new Error("github: --workflow requires a value.");
|
|
1068
|
-
const value = rest[++i];
|
|
1069
|
-
if (value.trim() === "") throw new Error("github: --workflow requires a value.");
|
|
1070
|
-
workflowPath = value.trim();
|
|
1071
|
-
} else if (arg.startsWith("-")) throw new Error(`github: Unexpected argument '${arg}'.`);
|
|
1072
|
-
else if (projectName) throw new Error(`github: Unexpected argument '${arg}'.`);
|
|
1073
|
-
else projectName = arg;
|
|
1074
|
-
}
|
|
1075
|
-
return {
|
|
1010
|
+
const parsed = {
|
|
1076
1011
|
subcommand,
|
|
1077
|
-
projectName
|
|
1078
|
-
branch,
|
|
1079
|
-
executor,
|
|
1080
|
-
workflowPath
|
|
1081
|
-
};
|
|
1082
|
-
}
|
|
1083
|
-
if (subcommand === "status") {
|
|
1084
|
-
let projectName = "";
|
|
1085
|
-
for (let i = 0; i < rest.length; i++) {
|
|
1086
|
-
const arg = rest[i];
|
|
1087
|
-
if (arg === "--project") {
|
|
1088
|
-
if (i + 1 >= rest.length) throw new Error("github: --project requires a value.");
|
|
1089
|
-
const value = rest[++i];
|
|
1090
|
-
if (value.trim() === "") throw new Error("github: --project requires a value.");
|
|
1091
|
-
if (projectName) throw new Error(`github: Unexpected argument '${value}'.`);
|
|
1092
|
-
projectName = value;
|
|
1093
|
-
} else if (arg.startsWith("-")) throw new Error(`github: Unexpected argument '${arg}'.`);
|
|
1094
|
-
else if (projectName) throw new Error(`github: Unexpected argument '${arg}'.`);
|
|
1095
|
-
else projectName = arg;
|
|
1096
|
-
}
|
|
1097
|
-
return {
|
|
1098
|
-
subcommand,
|
|
1099
|
-
projectName
|
|
1012
|
+
projectName: ""
|
|
1100
1013
|
};
|
|
1014
|
+
parsed.projectName = parseProjectArgs$1(rest, {
|
|
1015
|
+
"--branch": (value) => {
|
|
1016
|
+
parsed.branch = value.trim();
|
|
1017
|
+
},
|
|
1018
|
+
"--executor": (value) => {
|
|
1019
|
+
parsed.executor = parseExecutor(value);
|
|
1020
|
+
},
|
|
1021
|
+
"--workflow": (value) => {
|
|
1022
|
+
parsed.workflowPath = value.trim();
|
|
1023
|
+
}
|
|
1024
|
+
});
|
|
1025
|
+
return parsed;
|
|
1101
1026
|
}
|
|
1027
|
+
if (subcommand === "status") return {
|
|
1028
|
+
subcommand,
|
|
1029
|
+
projectName: parseProjectArgs$1(rest, {})
|
|
1030
|
+
};
|
|
1102
1031
|
if (subcommand === "disconnect") {
|
|
1103
|
-
let projectName = "";
|
|
1104
1032
|
let yes = false;
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
else if (arg === "--project") {
|
|
1109
|
-
if (i + 1 >= rest.length) throw new Error("github: --project requires a value.");
|
|
1110
|
-
const value = rest[++i];
|
|
1111
|
-
if (value.trim() === "") throw new Error("github: --project requires a value.");
|
|
1112
|
-
if (projectName) throw new Error(`github: Unexpected argument '${value}'.`);
|
|
1113
|
-
projectName = value;
|
|
1114
|
-
} else if (arg.startsWith("-")) throw new Error(`github: Unexpected argument '${arg}'.`);
|
|
1115
|
-
else if (projectName) throw new Error(`github: Unexpected argument '${arg}'.`);
|
|
1116
|
-
else projectName = arg;
|
|
1117
|
-
}
|
|
1033
|
+
const confirm = () => {
|
|
1034
|
+
yes = true;
|
|
1035
|
+
};
|
|
1118
1036
|
return {
|
|
1119
1037
|
subcommand,
|
|
1120
|
-
projectName,
|
|
1038
|
+
projectName: parseProjectArgs$1(rest, {}, {
|
|
1039
|
+
"--yes": confirm,
|
|
1040
|
+
"-y": confirm
|
|
1041
|
+
}),
|
|
1121
1042
|
yes
|
|
1122
1043
|
};
|
|
1123
1044
|
}
|
|
@@ -1145,7 +1066,6 @@ function parsePrepareArgs(args) {
|
|
|
1145
1066
|
strict: true
|
|
1146
1067
|
});
|
|
1147
1068
|
if (parsed.positionals.length > 0) throw new Error(`prepare: Unexpected argument '${parsed.positionals[0]}'.`);
|
|
1148
|
-
return {};
|
|
1149
1069
|
}
|
|
1150
1070
|
//#endregion
|
|
1151
1071
|
//#region src/cli/project-args.ts
|
|
@@ -1223,24 +1143,10 @@ const projectSubcommands = [
|
|
|
1223
1143
|
];
|
|
1224
1144
|
function parseProjectArgs(args) {
|
|
1225
1145
|
const [subcommand, ...rest] = args;
|
|
1226
|
-
if (subcommand === "status") {
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
return {
|
|
1231
|
-
subcommand,
|
|
1232
|
-
name: name ?? ""
|
|
1233
|
-
};
|
|
1234
|
-
}
|
|
1235
|
-
if (subcommand === "link") {
|
|
1236
|
-
const [name, extra] = rest;
|
|
1237
|
-
if (name?.startsWith("-")) throw new Error(`project: Unknown flag '${name}'.`);
|
|
1238
|
-
if (extra) throw new Error(`project: Unexpected argument '${extra}'.`);
|
|
1239
|
-
return {
|
|
1240
|
-
subcommand,
|
|
1241
|
-
name: name ?? ""
|
|
1242
|
-
};
|
|
1243
|
-
}
|
|
1146
|
+
if (subcommand === "status" || subcommand === "link") return {
|
|
1147
|
+
subcommand,
|
|
1148
|
+
name: parseOptionalPositional(rest)
|
|
1149
|
+
};
|
|
1244
1150
|
if (subcommand === "list") {
|
|
1245
1151
|
if (rest.length > 0) throw new Error(`project: Unexpected argument '${rest[0]}'.`);
|
|
1246
1152
|
return { subcommand };
|
|
@@ -1345,24 +1251,10 @@ function parseProjectArgs(args) {
|
|
|
1345
1251
|
range
|
|
1346
1252
|
};
|
|
1347
1253
|
}
|
|
1348
|
-
if (subcommand === "rollback") {
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
return {
|
|
1353
|
-
subcommand,
|
|
1354
|
-
deployId: deployId ?? ""
|
|
1355
|
-
};
|
|
1356
|
-
}
|
|
1357
|
-
if (subcommand === "cancel") {
|
|
1358
|
-
const [deployId, extra] = rest;
|
|
1359
|
-
if (deployId?.startsWith("-")) throw new Error(`project: Unknown flag '${deployId}'.`);
|
|
1360
|
-
if (extra) throw new Error(`project: Unexpected argument '${extra}'.`);
|
|
1361
|
-
return {
|
|
1362
|
-
subcommand,
|
|
1363
|
-
deployId: deployId ?? ""
|
|
1364
|
-
};
|
|
1365
|
-
}
|
|
1254
|
+
if (subcommand === "rollback" || subcommand === "cancel") return {
|
|
1255
|
+
subcommand,
|
|
1256
|
+
deployId: parseOptionalPositional(rest)
|
|
1257
|
+
};
|
|
1366
1258
|
if (subcommand === "delete") {
|
|
1367
1259
|
let name = "";
|
|
1368
1260
|
let force = false;
|
|
@@ -1387,6 +1279,12 @@ function parseProjectArgs(args) {
|
|
|
1387
1279
|
}
|
|
1388
1280
|
throw new Error("project: Usage: void project <status|link|list|team|token|zero-trust|logs|requests|rollback|cancel|delete|purge-cache>.");
|
|
1389
1281
|
}
|
|
1282
|
+
function parseOptionalPositional(rest) {
|
|
1283
|
+
const [value, extra] = rest;
|
|
1284
|
+
if (value?.startsWith("-")) throw new Error(`project: Unknown flag '${value}'.`);
|
|
1285
|
+
if (extra) throw new Error(`project: Unexpected argument '${extra}'.`);
|
|
1286
|
+
return value ?? "";
|
|
1287
|
+
}
|
|
1390
1288
|
function parseTeamArgs(rest) {
|
|
1391
1289
|
const [action, ...args] = rest;
|
|
1392
1290
|
const usage = "project: Usage: void project team <list|invite|invitations|role|remove|revoke|leave|pending|accept|decline>.";
|
|
@@ -1587,8 +1485,10 @@ async function runSubcommandGroup(command, subcommands, parse, run) {
|
|
|
1587
1485
|
const hasNamedSubcommand = args.slice(1).some((arg) => subcommands.some(({ name }) => name === arg));
|
|
1588
1486
|
try {
|
|
1589
1487
|
if ((!sub || sub.startsWith("-") && !hasNamedSubcommand) && process.stdin.isTTY) {
|
|
1590
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1591
|
-
if (command === "platform" && !sub) log.info(
|
|
1488
|
+
const { promptSubcommand } = await import("../subcommand-prompt-gQ-NDA-u.mjs");
|
|
1489
|
+
if (command === "platform" && !sub) log.info(`A Void platform lets a team deploy Void apps to a shared Cloudflare account.
|
|
1490
|
+
This command sets up and manages platforms. Join with \`void connect <url>\`.
|
|
1491
|
+
Docs: ${formatUrl("https://void.cloud/guide/self-hosted-platform")}`);
|
|
1592
1492
|
const result = await promptSubcommand(command, subcommands);
|
|
1593
1493
|
if (!result) process.exit(0);
|
|
1594
1494
|
await run(root, parse(buildArgs(result, args.slice(1))));
|
|
@@ -1613,19 +1513,19 @@ const args = process.argv.slice(2);
|
|
|
1613
1513
|
const command = args[0];
|
|
1614
1514
|
const helpPath = getHelpPath(args);
|
|
1615
1515
|
const subcommandGroups = {
|
|
1616
|
-
auth: () => runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-router-
|
|
1617
|
-
account: () => runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("../account-cmd-
|
|
1618
|
-
platform: () => runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-
|
|
1619
|
-
cloudflare: () => runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-
|
|
1620
|
-
project: () => runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-
|
|
1621
|
-
secret: () => runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-
|
|
1622
|
-
domain: () => runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-
|
|
1623
|
-
email: () => runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-
|
|
1624
|
-
db: () => runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-
|
|
1625
|
-
env: () => runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-
|
|
1626
|
-
gen: () => runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-
|
|
1627
|
-
github: () => runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-
|
|
1628
|
-
build: () => runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-
|
|
1516
|
+
auth: () => runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-router-DP14wVkZ.mjs").then(({ runAuthRouter }) => runAuthRouter(root, parsed))),
|
|
1517
|
+
account: () => runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("../account-cmd-Ci00cncT.mjs").then(({ runAccountCommand }) => runAccountCommand(root, parsed))),
|
|
1518
|
+
platform: () => runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-Cuj4oUVo.mjs").then(({ runPlatformCommand }) => runPlatformCommand(root, parsed))),
|
|
1519
|
+
cloudflare: () => runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-CTrn-lXJ.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(root, parsed))),
|
|
1520
|
+
project: () => runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-Dq75AXzy.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed))),
|
|
1521
|
+
secret: () => runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-B5J8bBsI.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed))),
|
|
1522
|
+
domain: () => runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-Bfq9n03H.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed))),
|
|
1523
|
+
email: () => runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-DIwaQU4P.mjs").then(({ runEmailCommand }) => runEmailCommand(root, parsed))),
|
|
1524
|
+
db: () => runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-27RztQLy.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed))),
|
|
1525
|
+
env: () => runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-C6ipBLp3.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed))),
|
|
1526
|
+
gen: () => runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-F8pSZnhc.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed))),
|
|
1527
|
+
github: () => runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-BdkU4Nhe.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed))),
|
|
1528
|
+
build: () => runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-Cr3FJxv0.mjs").then(({ runBuildCommand }) => runBuildCommand(root, parsed)))
|
|
1629
1529
|
};
|
|
1630
1530
|
if (helpPath) {
|
|
1631
1531
|
if (helpPath.length === 0) printGlobalHelp();
|
|
@@ -1644,32 +1544,22 @@ if (helpPath) {
|
|
|
1644
1544
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1645
1545
|
process.exit(1);
|
|
1646
1546
|
}
|
|
1647
|
-
import("../deploy-
|
|
1648
|
-
runDeploy(root, {
|
|
1649
|
-
projectSlug: deployArgs.projectSlug,
|
|
1650
|
-
dir: deployArgs.dir,
|
|
1651
|
-
spa: deployArgs.spa,
|
|
1652
|
-
skipBuild: deployArgs.skipBuild,
|
|
1653
|
-
debug: deployArgs.debug,
|
|
1654
|
-
platform: deployArgs.platform,
|
|
1655
|
-
provision: deployArgs.provision,
|
|
1656
|
-
requireEmail: deployArgs.requireEmail,
|
|
1657
|
-
atomic: deployArgs.atomic
|
|
1658
|
-
}).catch((err) => {
|
|
1547
|
+
import("../deploy-Db2ALnQP.mjs").then(({ runDeploy }) => {
|
|
1548
|
+
runDeploy(root, deployArgs).catch((err) => {
|
|
1659
1549
|
log.error(formatCloudflareUserMessage(err.message ?? String(err)));
|
|
1660
1550
|
process.exit(1);
|
|
1661
1551
|
});
|
|
1662
1552
|
});
|
|
1663
1553
|
} else if (command === "connect") (async () => {
|
|
1664
1554
|
const parsed = parseConnectArgs(args.slice(1));
|
|
1665
|
-
const { runConnectCommand } = await import("../connect-
|
|
1555
|
+
const { runConnectCommand } = await import("../connect-nukQSoEO.mjs");
|
|
1666
1556
|
await runConnectCommand(process.cwd(), parsed);
|
|
1667
1557
|
})().catch((err) => {
|
|
1668
1558
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1669
1559
|
process.exit(1);
|
|
1670
1560
|
});
|
|
1671
1561
|
else if (command && Object.hasOwn(subcommandGroups, command)) subcommandGroups[command]();
|
|
1672
|
-
else if (command === "info") import("../info-
|
|
1562
|
+
else if (command === "info") import("../info-CujPwtMe.mjs").then(async ({ runInfoCommand }) => {
|
|
1673
1563
|
try {
|
|
1674
1564
|
await runInfoCommand(process.cwd(), parseInfoArgs(args.slice(1)));
|
|
1675
1565
|
} catch (err) {
|
|
@@ -1684,22 +1574,21 @@ else if (command === "info") import("../info-PYWwkWyt.mjs").then(async ({ runInf
|
|
|
1684
1574
|
});
|
|
1685
1575
|
else if (command === "prepare") {
|
|
1686
1576
|
const root = process.cwd();
|
|
1687
|
-
let prepareArgs;
|
|
1688
1577
|
try {
|
|
1689
|
-
|
|
1578
|
+
parsePrepareArgs(args.slice(1));
|
|
1690
1579
|
} catch (err) {
|
|
1691
1580
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1692
1581
|
process.exit(1);
|
|
1693
1582
|
}
|
|
1694
|
-
import("../prepare-
|
|
1695
|
-
runPrepareCommand(root
|
|
1583
|
+
import("../prepare-C4zfwks4.mjs").then(({ runPrepareCommand }) => {
|
|
1584
|
+
runPrepareCommand(root).catch((err) => {
|
|
1696
1585
|
log.error(formatCloudflareUserMessage(err.message ?? String(err)));
|
|
1697
1586
|
process.exit(1);
|
|
1698
1587
|
});
|
|
1699
1588
|
});
|
|
1700
1589
|
} else if (command === "init") {
|
|
1701
1590
|
const root = process.cwd();
|
|
1702
|
-
import("../init-
|
|
1591
|
+
import("../init-ZWOJvc-Z.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
1703
1592
|
let initArgs;
|
|
1704
1593
|
try {
|
|
1705
1594
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -1717,16 +1606,14 @@ else if (command === "prepare") {
|
|
|
1717
1606
|
log.error("migrate: This command takes no arguments.");
|
|
1718
1607
|
process.exit(1);
|
|
1719
1608
|
}
|
|
1720
|
-
import("../migrate-
|
|
1609
|
+
import("../migrate-BgT-hmu8.mjs").then(({ runMigrateCommand }) => {
|
|
1721
1610
|
runMigrateCommand(process.cwd()).catch((err) => {
|
|
1722
1611
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1723
1612
|
process.exit(1);
|
|
1724
1613
|
});
|
|
1725
1614
|
});
|
|
1726
|
-
} else if (command === "-v" || command === "--version")
|
|
1727
|
-
|
|
1728
|
-
console.log(version);
|
|
1729
|
-
} else if (command && command !== "help" && command !== "--help" && command !== "-h") {
|
|
1615
|
+
} else if (command === "-v" || command === "--version") console.log(getOwnVersion());
|
|
1616
|
+
else if (command) {
|
|
1730
1617
|
log.error(`cli: Unknown command '${command}'. Run \`void --help\` for usage.`);
|
|
1731
1618
|
process.exit(1);
|
|
1732
1619
|
} else if (!command && process.stdin.isTTY) {
|
|
@@ -1829,7 +1716,7 @@ else if (command === "prepare") {
|
|
|
1829
1716
|
];
|
|
1830
1717
|
(async () => {
|
|
1831
1718
|
printVoidHeader();
|
|
1832
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1719
|
+
const { promptSubcommand } = await import("../subcommand-prompt-gQ-NDA-u.mjs");
|
|
1833
1720
|
const result = await promptSubcommand("", topLevelCommands);
|
|
1834
1721
|
if (!result) process.exit(0);
|
|
1835
1722
|
const cmd = result.subcommand;
|
|
@@ -1837,33 +1724,33 @@ else if (command === "prepare") {
|
|
|
1837
1724
|
if (Object.hasOwn(subcommandGroups, cmd)) return subcommandGroups[cmd]();
|
|
1838
1725
|
switch (cmd) {
|
|
1839
1726
|
case "connect": {
|
|
1840
|
-
const { runConnectCommand } = await import("../connect-
|
|
1727
|
+
const { runConnectCommand } = await import("../connect-nukQSoEO.mjs");
|
|
1841
1728
|
await runConnectCommand(root, parseConnectArgs([]));
|
|
1842
1729
|
return;
|
|
1843
1730
|
}
|
|
1844
1731
|
case "init": {
|
|
1845
|
-
const { runInitCommand, parseInitArgs } = await import("../init-
|
|
1732
|
+
const { runInitCommand, parseInitArgs } = await import("../init-ZWOJvc-Z.mjs");
|
|
1846
1733
|
await runInitCommand(root, parseInitArgs([]));
|
|
1847
1734
|
return;
|
|
1848
1735
|
}
|
|
1849
1736
|
case "migrate": {
|
|
1850
|
-
const { runMigrateCommand } = await import("../migrate-
|
|
1737
|
+
const { runMigrateCommand } = await import("../migrate-BgT-hmu8.mjs");
|
|
1851
1738
|
await runMigrateCommand(root);
|
|
1852
1739
|
return;
|
|
1853
1740
|
}
|
|
1854
1741
|
case "deploy": {
|
|
1855
|
-
const { runDeploy } = await import("../deploy-
|
|
1742
|
+
const { runDeploy } = await import("../deploy-Db2ALnQP.mjs");
|
|
1856
1743
|
await runDeploy(root);
|
|
1857
1744
|
return;
|
|
1858
1745
|
}
|
|
1859
1746
|
case "info": {
|
|
1860
|
-
const { runInfoCommand } = await import("../info-
|
|
1747
|
+
const { runInfoCommand } = await import("../info-CujPwtMe.mjs");
|
|
1861
1748
|
await runInfoCommand(root, parseInfoArgs([]));
|
|
1862
1749
|
return;
|
|
1863
1750
|
}
|
|
1864
1751
|
case "prepare": {
|
|
1865
|
-
const { runPrepareCommand } = await import("../prepare-
|
|
1866
|
-
await runPrepareCommand(root
|
|
1752
|
+
const { runPrepareCommand } = await import("../prepare-C4zfwks4.mjs");
|
|
1753
|
+
await runPrepareCommand(root);
|
|
1867
1754
|
return;
|
|
1868
1755
|
}
|
|
1869
1756
|
case "help":
|