cf 1.0.0-beta.16 → 1.0.0-beta.18
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/dist/_meta/commands.json +6117 -4540
- package/dist/_meta/schemas.json +5016 -3257
- package/dist/{abuse-reports-17K-TRhO.mjs → abuse-reports-Ce-g5uZP.mjs} +6 -6
- package/dist/{access-BwB7sg1D.mjs → access-BtsMwesh.mjs} +1 -1
- package/dist/{accounts-BnIGu_ac.mjs → accounts-X5QVzEUW.mjs} +27 -21
- package/dist/{acm-CQRcu_zw.mjs → acm-C_NepMi6.mjs} +1 -1
- package/dist/{addressing-Qcm9jd3C.mjs → addressing-BkQY1hoA.mjs} +18 -18
- package/dist/{agent-memory-B3xN9I6-.mjs → agent-memory-1OPgC3lK.mjs} +6 -6
- package/dist/{ai-BRKOCckA.mjs → ai-Bb0_Zknm.mjs} +1 -1
- package/dist/{ai-audit-Cd9Rc2Fc.mjs → ai-audit-DuEjVdML.mjs} +1 -1
- package/dist/{ai-gateway-BWU5064V.mjs → ai-gateway-Cm2vWMSI.mjs} +42 -42
- package/dist/ai-search-DDRpxyOM.mjs +79 -0
- package/dist/{ai-security-Dn0Ee6QS.mjs → ai-security-A2STvE1b.mjs} +5 -5
- package/dist/{alerting-BXTiMfXo.mjs → alerting-CIwSk-Ks.mjs} +1 -1
- package/dist/{analytics-Jyd04TRW.mjs → analytics-H--uM3DA.mjs} +7 -7
- package/dist/{analytics-engine-CzrNfUeh.mjs → analytics-engine-Alu7cllT.mjs} +1 -1
- package/dist/{api-security-DRBHZaf_.mjs → api-security-D-pcnhUL.mjs} +26 -26
- package/dist/{argo-DiQt0pSb.mjs → argo-Lvmcx3am.mjs} +1 -1
- package/dist/{artifacts-eBZ4YN53.mjs → artifacts-xT5S-mVa.mjs} +1 -1
- package/dist/{audit-logs-Bb4HTZay.mjs → audit-logs-DEoRBLkU.mjs} +1 -1
- package/dist/{auth-C6My1gI6.mjs → auth-B73lQS2h.mjs} +1 -1
- package/dist/auth-DMzEmOhG.mjs +2 -0
- package/dist/{auth-eVI_UEt8.mjs → auth-Db1KT0vm.mjs} +1 -1
- package/dist/{auth-token-Cfj2yehs.mjs → auth-token-D9XIPlwf.mjs} +1 -1
- package/dist/{autoconfig-B0ESZ8DJ.mjs → autoconfig-9po_tqsS.mjs} +1 -1
- package/dist/{basin-catalog-Cwk1RSMX.mjs → basin-catalog-DFHt3cWi.mjs} +1 -1
- package/dist/{billing-CfV8oi6A.mjs → billing-Bm2JNSGa.mjs} +6 -6
- package/dist/body-parser-DnBfDdx3.mjs +2 -0
- package/dist/{bot-management-CH4_Kewx.mjs → bot-management-CSr38g-O.mjs} +4 -4
- package/dist/{botnet-feed-Cg_Wp8ei.mjs → botnet-feed-ebeWWSJj.mjs} +1 -1
- package/dist/{brand-protection-Cp2ckWou.mjs → brand-protection-BCn9Mv-d.mjs} +5 -5
- package/dist/browser-run-BcWxzhAn.mjs +42 -0
- package/dist/build-BRJnyeu8.mjs +2 -0
- package/dist/{build-sBpqm9ga.mjs → build-i8l2qGVZ.mjs} +1 -1
- package/dist/{builds-B2RBgVL9.mjs → builds-BMwDzi7G.mjs} +39 -39
- package/dist/{cache-yvrYPvRI.mjs → cache-_VaTLC5T.mjs} +1 -1
- package/dist/chunk-JP6R7L72-C0kFUelb.mjs +2 -0
- package/dist/cli-P3q5DG3W.mjs +6 -0
- package/dist/{client-side-security-D50iZjd_.mjs → client-side-security-CjSXrpa9.mjs} +1 -1
- package/dist/{cloud-connector-wvSGdxWT.mjs → cloud-connector-BPJBeP06.mjs} +1 -1
- package/dist/{cloudforce-one-j6vlmaMB.mjs → cloudforce-one-DXX31GMi.mjs} +189 -189
- package/dist/{command-CM_f48gs.mjs → command-BXiA79DP.mjs} +1 -1
- package/dist/{command-CmUtmu5j.mjs → command-BbsPxJBT.mjs} +1 -1
- package/dist/{command-BDpm-U8z.mjs → command-Bkc04OyY.mjs} +1 -1
- package/dist/{command-BSbhJRmu.mjs → command-BtTc28ql.mjs} +1 -1
- package/dist/{command-DFRsim8q.mjs → command-CBZhxmKD.mjs} +1 -1
- package/dist/{command-BbO3sBQ2.mjs → command-CL7LLXM7.mjs} +1 -1
- package/dist/{command-DQojhTEQ.mjs → command-CYyfigfC.mjs} +1 -1
- package/dist/{command-DiqRELHF.mjs → command-CxWLFv5Y.mjs} +1 -1
- package/dist/{command-74P4_CTx.mjs → command-DDcBC4px.mjs} +1 -1
- package/dist/{command-Dr4PEvB2.mjs → command-NoxvOARP.mjs} +1 -1
- package/dist/{completions-oD1EcuHk.mjs → completions-CrDmwKnK.mjs} +1 -1
- package/dist/{connector-interrupts-DP4rbOe8.mjs → connector-interrupts-V4HGULCM.mjs} +1 -1
- package/dist/{connector-telemetry-events-BQGBQwzR.mjs → connector-telemetry-events-D9mTcfbJ.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DBO0Mdcj.mjs → connector-telemetry-snapshots-COrPVKol.mjs} +1 -1
- package/dist/{connectors-BSVr3Kz1.mjs → connectors-DvVlxGDx.mjs} +1 -1
- package/dist/{containers-BTqAeVV2.mjs → containers-Bt2zFsFd.mjs} +8 -8
- package/dist/{containers-BOpKpipz.mjs → containers-BtcOgwm5.mjs} +2 -2
- package/dist/{content-scan-B9Keyxe-.mjs → content-scan-DldLmTjy.mjs} +1 -1
- package/dist/{context-B-vEsyrK.mjs → context-C_a8oSY9.mjs} +1 -1
- package/dist/cps-REo1OWP1.mjs +6 -0
- package/dist/csam-scanner-CIbbdoJK.mjs +10 -0
- package/dist/{custom-csrs-DM5X-K6H.mjs → custom-csrs-iGNc3rSZ.mjs} +1 -1
- package/dist/{custom-hostnames-BBjqaiFF.mjs → custom-hostnames-BNxYbTyu.mjs} +15 -15
- package/dist/{custom-nameservers-C0NDMLPJ.mjs → custom-nameservers-BMJoTSlQ.mjs} +1 -1
- package/dist/custom-pages-Qdemt1Fm.mjs +21 -0
- package/dist/{d1-hin5PmxW.mjs → d1-DvCiQibO.mjs} +8 -8
- package/dist/{deploy-Bo7FtE44.mjs → deploy-K664XPOb.mjs} +1 -1
- package/dist/{deploy-context-ClvBD87y.mjs → deploy-context-ClNVJYlR.mjs} +13 -13
- package/dist/{deploy-input-BqJ7GVZ-.mjs → deploy-input-KK6yyBN_.mjs} +1 -1
- package/dist/{dev-EtnMYA7K.mjs → dev-CnoMHxf4.mjs} +1 -1
- package/dist/{diagnostics-LZuMrGjK.mjs → diagnostics-Cw0mtcep.mjs} +2 -2
- package/dist/{dls-Bq8k3iy-.mjs → dls-DoqfqutH.mjs} +1 -1
- package/dist/{dns-ry5E2Bsa.mjs → dns-DC6WcO3m.mjs} +21 -21
- package/dist/{dns-firewall-zavP5Qxj.mjs → dns-firewall-DpQH9BCE.mjs} +9 -9
- package/dist/{docs-B08YtL0U.mjs → docs-CqNRBHab.mjs} +1 -1
- package/dist/{durable-objects-B9fo41B1.mjs → durable-objects-CJDDy3CC.mjs} +1 -1
- package/dist/{email-auth-D9LGjFlh.mjs → email-auth--NHg1TjG.mjs} +1 -1
- package/dist/{email-routing-6iDnNPhY.mjs → email-routing-COjENK55.mjs} +13 -13
- package/dist/{email-security-ty4ufRnJ.mjs → email-security-rdjH95T2.mjs} +38 -38
- package/dist/{email-sending-d7LO_Cz_.mjs → email-sending-26VJhR6Q.mjs} +18 -18
- package/dist/{field-extractors-DkgQ7PSw.mjs → field-extractors-DBOvGOwz.mjs} +2 -2
- package/dist/{firewall-Q88YyEwD.mjs → firewall-D8K93ffF.mjs} +20 -20
- package/dist/{flagship-CzI8zhd6.mjs → flagship-CHdmCmvQ.mjs} +11 -11
- package/dist/{fraud-CvFXTR0w.mjs → fraud-CY4TV5Vc.mjs} +1 -1
- package/dist/{google-tag-gateway-Y2zbyey8.mjs → google-tag-gateway-DzSt4wlz.mjs} +1 -1
- package/dist/healthchecks-B52Mf3uL.mjs +22 -0
- package/dist/{hostnames-B3k7fIUL.mjs → hostnames-BMITIM8P.mjs} +1 -1
- package/dist/{hyperdrive-BWGYz95H.mjs → hyperdrive-CHsW0r6Z.mjs} +1 -1
- package/dist/{iam-AXco_qmt.mjs → iam-o1n9eUXf.mjs} +9 -9
- package/dist/{images-BzYh8y0u.mjs → images-CJHAGxX6.mjs} +37 -37
- package/dist/index.mjs +1 -1
- package/dist/{init-DlenHBtS.mjs → init-CqQDL6i3.mjs} +1 -1
- package/dist/{intel-BBi3i_GU.mjs → intel-B3S1gxUg.mjs} +1 -1
- package/dist/{ips-CWG2b7AM.mjs → ips-q_UJMiy8.mjs} +1 -1
- package/dist/{k2-DXdMe3Cb.mjs → k2-BNqVZnDN.mjs} +2 -2
- package/dist/{kv-FUd7UdDu.mjs → kv-B0nXSOcW.mjs} +1 -1
- package/dist/{lazy-command-BC8rIlHu.mjs → lazy-command-4ccdBqrc.mjs} +1 -1
- package/dist/{leaked-credential-checks-BufVA9vL.mjs → leaked-credential-checks-BXwIjlTs.mjs} +1 -1
- package/dist/load-balancers-DJtMztJ0.mjs +76 -0
- package/dist/{login-DVbXZ_Tv.mjs → login-D-1FiBNv.mjs} +1 -1
- package/dist/{login-BJr2PBaJ.mjs → login-chQP8825.mjs} +1 -1
- package/dist/{logo-matches-BluaPvMa.mjs → logo-matches-qVYq8tWL.mjs} +1 -1
- package/dist/{logos-CXtmYWEJ.mjs → logos-tnIahhcu.mjs} +1 -1
- package/dist/{logpush-DCYgrqz0.mjs → logpush-D4s3pJRw.mjs} +24 -24
- package/dist/{logs-as60IP29.mjs → logs-cw7UL5V2.mjs} +3 -3
- package/dist/{magic-cloud-networking-0RsHugUF.mjs → magic-cloud-networking-CLEHztNY.mjs} +1 -1
- package/dist/{magic-network-monitoring-CPqvZdcb.mjs → magic-network-monitoring-DRwygeVq.mjs} +9 -9
- package/dist/{magic-transit-ClPyGzOE.mjs → magic-transit-BFopRdPs.mjs} +170 -170
- package/dist/{managed-defense-P4_QWSbK.mjs → managed-defense-D5kpmq0T.mjs} +9 -9
- package/dist/{managed-transforms-CUwQXMij.mjs → managed-transforms-CT4jjnzJ.mjs} +2 -2
- package/dist/{matches-BjckDBW1.mjs → matches-ClJ_24EY.mjs} +1 -1
- package/dist/{mcp-C2EG2c7L.mjs → mcp-50os3IRG.mjs} +10 -10
- package/dist/{mesh-CpMZA7Xt.mjs → mesh-jxtQP8sS.mjs} +2 -2
- package/dist/{migrate-6e5mJ79R.mjs → migrate-DerOyuv2.mjs} +1 -1
- package/dist/{monetization-DypuCZmU.mjs → monetization-D6cCDi-h.mjs} +4 -4
- package/dist/{network-DQ5Ridgy.mjs → network-dnWHB2uY.mjs} +27 -25
- package/dist/{network-interconnects-ifU4JhGE.mjs → network-interconnects-Cf8qSVdt.mjs} +1 -1
- package/dist/{o11y-CzssfRHt.mjs → o11y-oMSg1pG4.mjs} +49 -49
- package/dist/{oauth-BNTiErBG.mjs → oauth-BfBdHhPS.mjs} +1 -1
- package/dist/{oauth-BDdhqasa.mjs → oauth-DDOiiH7h.mjs} +1 -1
- package/dist/{oauth-clients-gknNcBdV.mjs → oauth-clients-XDmoe-b4.mjs} +1 -1
- package/dist/{oauth-scopes-BJeSanuF.mjs → oauth-scopes-D9VYGuTs.mjs} +1 -1
- package/dist/open-PCXX3ZDZ-5J5IU2MX-CKla-jDt.mjs +4 -0
- package/dist/organization-94lHeeOs.mjs +75 -0
- package/dist/{organizations-kfFFW4uO.mjs → organizations-BJf3UTFi.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-DfrnptJ1.mjs → origin-post-quantum-encryption-DMytVSUZ.mjs} +1 -1
- package/dist/{page-rules-ByrDMDBZ.mjs → page-rules-BUI-50oz.mjs} +4 -4
- package/dist/pages-CcdpCzHs.mjs +54 -0
- package/dist/pay-per-crawl-B1uHZn9j.mjs +38 -0
- package/dist/{pay-per-use-49EXt75f.mjs → pay-per-use-t066I5wm.mjs} +7 -7
- package/dist/{pipelines-Bvgh1BQZ.mjs → pipelines-Co6S044l.mjs} +8 -8
- package/dist/precursor-BftyvS86.mjs +4 -0
- package/dist/previews-BLhnhElx.mjs +7 -0
- package/dist/{progress-R-1tIuep.mjs → progress-Q5w9PNTT.mjs} +1 -1
- package/dist/{prompt-dgLm0iFJ.mjs → prompt-C0hKSr-R.mjs} +1 -1
- package/dist/{queries-EbIadtC5.mjs → queries-4MubO6Sz.mjs} +3 -3
- package/dist/{queues-C4GZ-O3f.mjs → queues-CteS5M92.mjs} +17 -17
- package/dist/{r2-DEuFfWBR.mjs → r2-2QpT_Gso.mjs} +24 -24
- package/dist/{radar-CDOERVcR.mjs → radar-ODKaK4FJ.mjs} +1 -1
- package/dist/{raw-fetch-BapeoreV.mjs → raw-fetch-CEOuoKl9.mjs} +1 -1
- package/dist/{realtime-D_A9Qgly.mjs → realtime-DkfU8uEX.mjs} +84 -84
- package/dist/registrar-DM6JTVPS.mjs +43 -0
- package/dist/{registrar-sandbox-BF3cYO3n.mjs → registrar-sandbox-BPNGf65G.mjs} +11 -9
- package/dist/{reporting-BWm9jIF8.mjs → reporting-5yFNXbJg.mjs} +1 -1
- package/dist/{request-headers-BRxv6NkA.mjs → request-headers-DXvswze2.mjs} +1 -1
- package/dist/request-tracers-BarLZY95.mjs +4 -0
- package/dist/{resource-sharing-C186jZv0.mjs → resource-sharing-BVEwBPs8.mjs} +19 -19
- package/dist/{rules-DYnGIU_0.mjs → rules-_C31X4Jz.mjs} +6 -6
- package/dist/{rulesets-BcNrbVcq.mjs → rulesets-8RwxoFhG.mjs} +6 -6
- package/dist/{rum-BDyRecfp.mjs → rum-CAUcpXpM.mjs} +6 -6
- package/dist/{run-BvDCuZ8q.mjs → run-DtFLvOHB.mjs} +1 -1
- package/dist/run-LcOb9rhI.mjs +2 -0
- package/dist/{schema-flags-DcKjAxI1.mjs → schema-flags-DibfxEF6.mjs} +1 -1
- package/dist/{scim-zn-CNCsc.mjs → scim-DX5XrQ4w.mjs} +1 -1
- package/dist/{secrets-store-CFhyQUV6.mjs → secrets-store-DSqqrr25.mjs} +1 -1
- package/dist/{security-insights-D8XgtCed.mjs → security-insights-FSktO04S.mjs} +1 -1
- package/dist/{security-txt-CCM-Vro0.mjs → security-txt-D2g3lQdg.mjs} +1 -1
- package/dist/{shared-ouAF7o4S.mjs → shared-eefMO8R4.mjs} +1 -1
- package/dist/smart-shield-IVb2sR0C.mjs +24 -0
- package/dist/{snippets-B2jBY0m_.mjs → snippets-cWwWficN.mjs} +2 -2
- package/dist/{spawn-DQttFH05.mjs → spawn-BW2bJmKO.mjs} +1 -1
- package/dist/{spectrum-Cf_4cGE8.mjs → spectrum-DYiIBYRB.mjs} +1 -1
- package/dist/{speed-DoXdyIYK.mjs → speed-C7uiW2Wf.mjs} +1 -1
- package/dist/{sql-Bze4h80q.mjs → sql-TGV8qQMj.mjs} +1 -1
- package/dist/{src-BguQDHjS.mjs → src-BUH-P_zd.mjs} +5 -5
- package/dist/ssl-xQP_HbWN.mjs +139 -0
- package/dist/{stream-BcReYIHJ.mjs → stream-CfWgj8Cr.mjs} +55 -55
- package/dist/{submit-ldFVNfNC.mjs → submit-DxGr1T40.mjs} +1 -1
- package/dist/tags-LEJ2VYhQ.mjs +23 -0
- package/dist/{telemetry-Cojgz4Sv.mjs → telemetry-BHne10Yy.mjs} +1 -1
- package/dist/telemetry-BavSU4ku.mjs +2 -0
- package/dist/{tenant-AZ0EAsmT.mjs → tenant-7d5vwc6K.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-aozjaasc.mjs → tenant-custom-nameservers-BkxlPr5O.mjs} +1 -1
- package/dist/{tunnels-CXez5LPB.mjs → tunnels-DlGODvwT.mjs} +4 -4
- package/dist/{turnstile-B2NQ8Nsk.mjs → turnstile-DhLkdhij.mjs} +5 -5
- package/dist/update-check-nLfkSfdz.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{update-check-BlyKN8m0.mjs → update-check-wvjOsnGK.mjs} +1 -1
- package/dist/{url-info-D_UqGiWD.mjs → url-info-CeoV5dBc.mjs} +1 -1
- package/dist/{url-normalization-CF1YHpIN.mjs → url-normalization-9NoaoRNh.mjs} +1 -1
- package/dist/{url-scanner-ChF3GO2U.mjs → url-scanner-w_-Sumz-.mjs} +8 -8
- package/dist/{user-BfWRsdJh.mjs → user-D33B3alX.mjs} +59 -59
- package/dist/{vectorize-CRYbWKg5.mjs → vectorize-Wp9De13y.mjs} +17 -17
- package/dist/version-B2RUUqGT.mjs +2 -0
- package/dist/{waiting-rooms-Crp7MVd9.mjs → waiting-rooms-BE8FloRd.mjs} +13 -13
- package/dist/{web-assets-CgyrPnT-.mjs → web-assets-ew0iaP7c.mjs} +35 -35
- package/dist/{web3-Cd0Yd0eQ.mjs → web3-BUyXBaqq.mjs} +6 -6
- package/dist/{workers-builds-f2nVw7EZ.mjs → workers-builds-DzU9NGno.mjs} +7 -7
- package/dist/{workers-for-platforms-DjeKp2uy.mjs → workers-for-platforms-B4xzFNxJ.mjs} +25 -22
- package/dist/{workers-CTwJpTfJ.mjs → workers-pP5tsDbD.mjs} +25 -22
- package/dist/{workers-vpc-B_L3TEg2.mjs → workers-vpc-Bre_t9Al.mjs} +1 -1
- package/dist/{workflows-CBPGf65x.mjs → workflows-DXYGKtqq.mjs} +1 -1
- package/dist/wrangler-migration-R9TQ_4Qd.mjs +946 -0
- package/dist/zaraz-DoH4QD0u.mjs +22 -0
- package/dist/{zero-trust-B9xY8zcn.mjs → zero-trust-DKt20rzE.mjs} +461 -458
- package/dist/{zone-CmwVqTI2.mjs → zone-BXM3p0JR.mjs} +1 -1
- package/dist/{zones-Bf0VVpMf.mjs → zones-CJdtqEBx.mjs} +21 -21
- package/package.json +11 -11
- package/dist/account-tags-povXTDAu.mjs +0 -15
- package/dist/ai-search-CJ3b8eot.mjs +0 -79
- package/dist/auth-OFqV2M4q.mjs +0 -2
- package/dist/body-parser-DkHKPkJ7.mjs +0 -2
- package/dist/browser-run-CfQ30dB6.mjs +0 -42
- package/dist/build-Bm6kGyzo.mjs +0 -2
- package/dist/certificate-authorities-BdMRaOnD.mjs +0 -6
- package/dist/cli-CsnoQloF.mjs +0 -6
- package/dist/client-certificates-CuWGvZSr.mjs +0 -13
- package/dist/cps-VRP794c5.mjs +0 -6
- package/dist/csam-scanner-C1jOgXVu.mjs +0 -10
- package/dist/ct-alerting-Y9vfa6Fo.mjs +0 -5
- package/dist/custom-certificates-CojTEC0E.mjs +0 -17
- package/dist/custom-pages-M4RUxcn6.mjs +0 -21
- package/dist/dcv-delegation-KOO8syyQ.mjs +0 -4
- package/dist/healthchecks-4Hz-6xYi.mjs +0 -22
- package/dist/keyless-certificates-B4ta_OGS.mjs +0 -13
- package/dist/keys-B9zvFzrf.mjs +0 -4
- package/dist/load-balancers-CWd9mSWM.mjs +0 -76
- package/dist/mtls-certificates-B5AWTU6u.mjs +0 -13
- package/dist/organization-CXAM41sd.mjs +0 -71
- package/dist/origin-ca-certificates-DwhYV3m_.mjs +0 -11
- package/dist/origin-tls-client-auth-COSxTc2q.mjs +0 -30
- package/dist/pages-DuGcBC6k.mjs +0 -54
- package/dist/pay-per-crawl-B3_Gn9Cj.mjs +0 -38
- package/dist/precursor-VobQf--m.mjs +0 -4
- package/dist/previews-DkwFHNRx.mjs +0 -7
- package/dist/registrar-X1YLlnmg.mjs +0 -43
- package/dist/request-tracers-CHWpiejG.mjs +0 -4
- package/dist/resource-tagging-BTagOZli.mjs +0 -4
- package/dist/run-roYb_Odh.mjs +0 -2
- package/dist/smart-shield-DwW7N92r.mjs +0 -24
- package/dist/ssl-u_0gUhPA.mjs +0 -45
- package/dist/tags-D_Hc_A-r.mjs +0 -4
- package/dist/telemetry-Ct_2AaO4.mjs +0 -2
- package/dist/update-check-BnGDxswi.mjs +0 -2
- package/dist/values-CLfxkAUJ.mjs +0 -4
- package/dist/version-CVlh2Zaq.mjs +0 -2
- package/dist/wrangler-migration-DxTB5yPT.mjs +0 -2
- package/dist/zaraz-3VDxl0gF.mjs +0 -22
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-Db1KT0vm.mjs";import{a as i,t as a}from"./context-C_a8oSY9.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-Q5w9PNTT.mjs";import{t as l}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-DnBfDdx3.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-C0hKSr-R.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 flagship apps create
|
|
3
3
|
|
|
4
|
-
Creates an app. The returned \`id\` is used in all subsequent flag, changelog, and evaluation requests.`).option(`name`,{type:`string`,description:`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
4
|
+
Creates an app. The returned \`id\` is used in all subsequent flag, changelog, and evaluation requests.`).option(`name`,{type:`string`,description:`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`create`,describe:`Create app`,builder:v,handler:async e=>l({command:`flagship apps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(_,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`));let u=p({name:m(e.name,`name`,`text`)}),f=await c(`Creating`,async()=>n.send(_,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};function b(e){return e.usage("$0 flagship apps definitions get <app-id>\n\nReturns an app's evaluation-only flag definitions for SDKs that evaluate locally. Send the returned `ETag` in `If-None-Match` to avoid downloading unchanged definitions.").positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`if-none-match`,{type:`string`,description:"Previously returned ETag, or `*`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <app-id>`,describe:`Get flag definitions`,builder:b,handler:async e=>l({command:`flagship apps definitions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`if-none-match`]!==void 0&&(l[`If-None-Match`]=String(e[`if-none-match`])),e.dryRun){let t=await i();s({command:`cf flagship apps definitions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/definitions`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/flagship/apps/${encodeURIComponent(String(e[`app-id`]))}/definitions`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})},te={command:`definitions`,describe:`Operations for apps.definitions`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function S(e){return e.usage(`$0 flagship apps delete <app-id>
|
|
5
5
|
|
|
6
|
-
Deletes an app and all its flags and changelog history. Returns 409 if any Worker still references this app via a Flagship binding.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <app-id>`,describe:`Delete app`,builder:S,handler:async e=>l({command:`flagship apps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await
|
|
6
|
+
Deletes an app and all its flags and changelog history. Returns 409 if any Worker still references this app via a Flagship binding.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <app-id>`,describe:`Delete app`,builder:S,handler:async e=>l({command:`flagship apps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`Delete this Flagship app, all of its flags, and all changelog history? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
7
7
|
`);return}let u=await c(`Deleting`,async()=>n.send(x,{account_id:l,app_id:e[`app-id`]}));o(u,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/evaluate`,query:[`flagKey`,`targetingKey`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function T(e){return e.usage(`$0 flagship apps evaluate get <app-id>
|
|
8
8
|
|
|
9
9
|
Evaluates a flag against the provided context. Pass context attributes as query parameters; values are coerced to numbers or booleans where unambiguous. For low-latency in-Worker evaluation, prefer the Flagship binding over this endpoint.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`flag-key`,{type:`string`,description:`The flag key to evaluate.`,demandOption:!0}).option(`targeting-key`,{type:`string`,description:`Context targeting key (per OpenFeature spec); used for percentage rollout bucketing.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <app-id>`,describe:`Evaluate flag from query context`,builder:T,handler:async e=>l({command:`flagship apps evaluate get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={flagKey:e[`flag-key`],targetingKey:e[`targeting-key`]};if(e.dryRun){let t=await i();s({command:`cf flagship apps evaluate get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/evaluate`,pathParams:{"app-id":String(e[`app-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(w,{account_id:u,app_id:e[`app-id`],...n}));o(d,{successLabel:`Loaded`})})},D={command:`evaluate`,describe:`Operations for apps.evaluate`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var O={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}/changelog`,query:[`limit`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function k(e){return e.usage(`$0 flagship apps flags changelog list
|
|
10
10
|
|
|
11
11
|
Returns the audit history for a flag, newest first. Each entry includes the event type and full flag state after the change; \`update\` entries include a field-level diff. Capped at 200 entries per flag.`).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Max items to return (1–200).`}).option(`cursor`,{type:`string`,description:`Pagination cursor from a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List flag changelog entries`,builder:k,handler:async e=>l({command:`flagship apps flags changelog list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor};if(e.dryRun){let t=await i();s({command:`cf flagship apps flags changelog list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}/changelog`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(O,{account_id:u,app_id:e[`app-id`],flag_key:e[`flag-key`],...n}));o(d,{successLabel:`Loaded`})})},j={command:`changelog`,describe:`Operations for apps.flags.changelog`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function N(e){return e.usage(`$0 flagship apps flags create <app-id>
|
|
12
12
|
|
|
13
|
-
Creates a flag. Returns 409 if the key already exists. \`type\` is always inferred from variation values; legacy request-side values are ignored.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`default-variation`,{type:`string`,description:"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`."}).option(`description`,{type:`string`,description:`Optional operator-facing description. It does not affect flag evaluation.`}).option(`enabled`,{type:`boolean`,description:"When false, the flag bypasses all rules and always serves `default_variation`."}).option(`key`,{type:`string`,description:`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`}).option(`rules`,{type:`string`,description:"Targeting rules evaluated in ascending `priority`; the first matching rule wins. An empty array means the flag always serves `default_variation`. Provide as a JSON array of objects or @path/to/file.json."}).option(`type`,{type:`string`,description:`Deprecated compatibility field. Omit it; the API ignores this value and infers the type from the flag's variations.`,choices:[`boolean`,`string`,`number`,`json`]}).coerce(`type`,e=>
|
|
13
|
+
Creates a flag. Returns 409 if the key already exists. \`type\` is always inferred from variation values; legacy request-side values are ignored.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`default-variation`,{type:`string`,description:"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`."}).option(`description`,{type:`string`,description:`Optional operator-facing description. It does not affect flag evaluation.`}).option(`enabled`,{type:`boolean`,description:"When false, the flag bypasses all rules and always serves `default_variation`."}).option(`key`,{type:`string`,description:`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`}).option(`rules`,{type:`string`,description:"Targeting rules evaluated in ascending `priority`; the first matching rule wins. An empty array means the flag always serves `default_variation`. Provide as a JSON array of objects or @path/to/file.json."}).option(`type`,{type:`string`,description:`Deprecated compatibility field. Omit it; the API ignores this value and infers the type from the flag's variations.`,choices:[`boolean`,`string`,`number`,`json`]}).coerce(`type`,e=>m(e,`type`,`text`)).option(`variations`,{type:`string`,description:`Map of variation name to value. All values share the same type (boolean, string, number, or JSON object/array), and each serialized value stays within 10KB. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const P={command:`create <app-id>`,describe:`Create flag`,builder:N,handler:async e=>l({command:`flagship apps flags create`,classification:{safeFlags:[`enabled`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({default_variation:m(e[`default-variation`],`default-variation`,`text`),description:m(e.description,`description`,`text`),enabled:e.enabled,key:m(e.key,`key`,`text`),rules:u(e.rules,`rules`),type:e.type,variations:f(e.variations,`variations`,!0)},[[`variations`]]):d(e.body,[{path:[`variations`],flag:`variations`}])});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body,[{path:[`variations`],flag:`variations`}]),r=await c(`Creating`,async()=>n.send(M,{body:t,account_id:l,app_id:e[`app-id`]}));o(r,{successLabel:`Created`});return}if(e[`default-variation`]===void 0&&(e[`default-variation`]=await h(`default-variation`,"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`.")),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.key===void 0&&(e.key=await h(`key`,`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`)),e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);if(e.variations===void 0)throw Error(`--variations is required (or pass --body with this field set).`);let g=p({default_variation:m(e[`default-variation`],`default-variation`,`text`),description:m(e.description,`description`,`text`),enabled:e.enabled,key:m(e.key,`key`,`text`),rules:u(e.rules,`rules`),type:e.type,variations:f(e.variations,`variations`,!0)},[[`variations`]]),_=await c(`Creating`,async()=>n.send(M,{body:g,account_id:l,app_id:e[`app-id`]}));o(_,{successLabel:`Created`})})};var F={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function I(e){return e.usage(`$0 flagship apps flags delete <flag-key>
|
|
14
14
|
|
|
15
|
-
Deletes a flag permanently. After deletion propagates, direct evaluations return not found; typed binding accessors may return the caller-supplied default. Cannot be undone.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const L={command:`delete <flag-key>`,describe:`Delete flag`,builder:I,handler:async e=>l({command:`flagship apps flags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await
|
|
15
|
+
Deletes a flag permanently. After deletion propagates, direct evaluations return not found; typed binding accessors may return the caller-supplied default. Cannot be undone.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const L={command:`delete <flag-key>`,describe:`Delete flag`,builder:I,handler:async e=>l({command:`flagship apps flags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`Delete this feature flag? After the deletion propagates, evaluation requests can no longer resolve it. This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
16
16
|
`);return}let u=await c(`Deleting`,async()=>n.send(F,{account_id:l,app_id:e[`app-id`],flag_key:e[`flag-key`]}));o(u,{successLabel:`Deleted`})})};var R={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/evaluate`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function z(e){return e.usage(`$0 flagship apps flags evaluate <app-id>
|
|
17
17
|
|
|
18
|
-
Evaluates a flag against the provided context, passed as a JSON request body (OFREP-shaped) rather than query parameters. Returns the same response shape as the GET variant.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`flag-key`,{type:`string`,description:`Key of the flag to evaluate within the app.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`evaluate <app-id>`,describe:`Evaluate flag with JSON context`,builder:z,handler:async e=>l({command:`flagship apps flags evaluate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags evaluate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/evaluate`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?f(
|
|
18
|
+
Evaluates a flag against the provided context, passed as a JSON request body (OFREP-shaped) rather than query parameters. Returns the same response shape as the GET variant.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`context`,{type:`string`,description:`Evaluation attributes keyed by name. Values may be any JSON value; the context supports up to 100 entries and 32 KB. Provide as a JSON object or @path/to/file.json.`}).option(`flag-key`,{type:`string`,description:`Key of the flag to evaluate within the app.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`evaluate <app-id>`,describe:`Evaluate flag with JSON context`,builder:z,handler:async e=>l({command:`flagship apps flags evaluate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags evaluate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/evaluate`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({context:f(e.context,`context`),flagKey:m(e[`flag-key`],`flag-key`,`text`)},[[`context`]]):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(R,{body:t,account_id:l,app_id:e[`app-id`]}));o(r,{successLabel:`Created`});return}e[`flag-key`]===void 0&&(e[`flag-key`]=await h(`flag-key`,`Key of the flag to evaluate within the app.`));let u=p({context:f(e.context,`context`),flagKey:m(e[`flag-key`],`flag-key`,`text`)},[[`context`]]),g=await c(`Creating`,async()=>n.send(R,{body:u,account_id:l,app_id:e[`app-id`]}));o(g,{successLabel:`Created`})})};var ne={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function V(e){return e.usage(`$0 flagship apps flags get <flag-key>
|
|
19
19
|
|
|
20
|
-
Returns the full flag definition including rules, variations, and audit fields.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <flag-key>`,describe:`Get flag`,builder:V,handler:async e=>l({command:`flagship apps flags get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(
|
|
20
|
+
Returns the full flag definition including rules, variations, and audit fields.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <flag-key>`,describe:`Get flag`,builder:V,handler:async e=>l({command:`flagship apps flags get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ne,{account_id:l,app_id:e[`app-id`],flag_key:e[`flag-key`]}));o(u,{successLabel:`Loaded`})})};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags`,query:[`limit`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function W(e){return e.usage("$0 flagship apps flags list\n\nLists an app's flags ordered by key. Pass `cursor` from `result_info` to page forward; a null cursor indicates the last page.").option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Max items to return (1–200).`}).option(`cursor`,{type:`string`,description:`Pagination cursor from a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`List flags`,builder:W,handler:async e=>l({command:`flagship apps flags list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor};if(e.dryRun){let t=await i();s({command:`cf flagship apps flags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags`,pathParams:{"app-id":String(e[`app-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(U,{account_id:u,app_id:e[`app-id`],...n}));o(d,{successLabel:`Loaded`})})};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function q(e){return e.usage(`$0 flagship apps flags update <flag-key>
|
|
21
21
|
|
|
22
|
-
Replaces the entire flag definition. Omitted fields are dropped, not preserved — read before writing. The path key identifies the flag and cannot be renamed by changing the body \`key\`. Each update appends a changelog entry.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`default-variation`,{type:`string`,description:"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`."}).option(`description`,{type:`string`,description:`Optional operator-facing description. It does not affect flag evaluation.`}).option(`enabled`,{type:`boolean`,description:"When false, the flag bypasses all rules and always serves `default_variation`."}).option(`key`,{type:`string`,description:`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`}).option(`rules`,{type:`string`,description:"Targeting rules evaluated in ascending `priority`; the first matching rule wins. An empty array means the flag always serves `default_variation`. Provide as a JSON array of objects or @path/to/file.json."}).option(`type`,{type:`string`,description:`Deprecated compatibility field. Omit it; the API ignores this value and infers the type from the flag's variations.`,choices:[`boolean`,`string`,`number`,`json`]}).coerce(`type`,e=>
|
|
22
|
+
Replaces the entire flag definition. Omitted fields are dropped, not preserved — read before writing. The path key identifies the flag and cannot be renamed by changing the body \`key\`. Each update appends a changelog entry.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`default-variation`,{type:`string`,description:"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`."}).option(`description`,{type:`string`,description:`Optional operator-facing description. It does not affect flag evaluation.`}).option(`enabled`,{type:`boolean`,description:"When false, the flag bypasses all rules and always serves `default_variation`."}).option(`key`,{type:`string`,description:`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`}).option(`rules`,{type:`string`,description:"Targeting rules evaluated in ascending `priority`; the first matching rule wins. An empty array means the flag always serves `default_variation`. Provide as a JSON array of objects or @path/to/file.json."}).option(`type`,{type:`string`,description:`Deprecated compatibility field. Omit it; the API ignores this value and infers the type from the flag's variations.`,choices:[`boolean`,`string`,`number`,`json`]}).coerce(`type`,e=>m(e,`type`,`text`)).option(`variations`,{type:`string`,description:`Map of variation name to value. All values share the same type (boolean, string, number, or JSON object/array), and each serialized value stays within 10KB. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const J={command:`update <flag-key>`,describe:`Update flag`,builder:q,handler:async e=>l({command:`flagship apps flags update`,classification:{safeFlags:[`enabled`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps flags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},bodyKind:`json`,body:e.body===void 0?p({default_variation:m(e[`default-variation`],`default-variation`,`text`),description:m(e.description,`description`,`text`),enabled:e.enabled,key:m(e.key,`key`,`text`),rules:u(e.rules,`rules`),type:e.type,variations:f(e.variations,`variations`,!0)},[[`variations`]]):d(e.body,[{path:[`variations`],flag:`variations`}])});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body,[{path:[`variations`],flag:`variations`}]),r=await c(`Updating`,async()=>n.send(K,{body:t,account_id:l,app_id:e[`app-id`],flag_key:e[`flag-key`]}));o(r,{successLabel:`Updated`});return}if(e[`default-variation`]===void 0&&(e[`default-variation`]=await h(`default-variation`,"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`.")),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.key===void 0&&(e.key=await h(`key`,`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`)),e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);if(e.variations===void 0)throw Error(`--variations is required (or pass --body with this field set).`);let g=p({default_variation:m(e[`default-variation`],`default-variation`,`text`),description:m(e.description,`description`,`text`),enabled:e.enabled,key:m(e.key,`key`,`text`),rules:u(e.rules,`rules`),type:e.type,variations:f(e.variations,`variations`,!0)},[[`variations`]]),_=await c(`Updating`,async()=>n.send(K,{body:g,account_id:l,app_id:e[`app-id`],flag_key:e[`flag-key`]}));o(_,{successLabel:`Updated`})})},Y={command:`flags`,describe:`Operations for apps.flags`,builder:e=>e.command(P).command(L).command(B).command(H).command(G).command(J).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function Z(e){return e.usage(`$0 flagship apps get <app-id>
|
|
23
23
|
|
|
24
|
-
Returns an app's name and audit fields. Flag definitions are not included.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
24
|
+
Returns an app's name and audit fields. Flag definitions are not included.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <app-id>`,describe:`Get app`,builder:Z,handler:async e=>l({command:`flagship apps get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(X,{account_id:l,app_id:e[`app-id`]}));o(u,{successLabel:`Loaded`})})};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function ae(e){return e.usage(`$0 flagship apps list
|
|
25
25
|
|
|
26
|
-
Lists all Flagship apps in the account. Returns identity and audit fields only; flag definitions are not included.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
26
|
+
Lists all Flagship apps in the account. Returns identity and audit fields only; flag definitions are not included.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`list`,describe:`List apps`,builder:ae,handler:async e=>l({command:`flagship apps list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf flagship apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ie,{account_id:l}));o(u,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function $(e){return e.usage(`$0 flagship apps update <app-id>
|
|
27
27
|
|
|
28
|
-
Updates an app. Only \`name\` is mutable.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
28
|
+
Updates an app. Only \`name\` is mutable.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const se={command:`update <app-id>`,describe:`Update app`,builder:$,handler:async e=>l({command:`flagship apps update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(Q,{body:t,account_id:l,app_id:e[`app-id`]}));o(r,{successLabel:`Updated`});return}let u=p({name:m(e.name,`name`,`text`)}),f=await c(`Updating`,async()=>n.send(Q,{body:u,account_id:l,app_id:e[`app-id`]}));o(f,{successLabel:`Updated`})})},ce={command:`apps`,describe:`Operations for apps`,builder:e=>e.command(y).command(C).command(re).command(oe).command(se).command(te).command(D).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},le={command:`flagship`,describe:`flagship`,builder:e=>e.command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{le as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-Db1KT0vm.mjs";import{i as n}from"./context-C_a8oSY9.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-Q5w9PNTT.mjs";import{t as o}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as s,t as c}from"./body-parser-DnBfDdx3.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";var u={method:`GET`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`};function d(e){return e.usage(`$0 fraud get
|
|
3
3
|
|
|
4
4
|
Retrieve Fraud Detection settings for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`get`,describe:`Get Fraud Detection Settings`,builder:d,handler:async e=>o({command:`fraud get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf fraud get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/fraud_detection/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(u,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var p={method:`PUT`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`,body:`json`};function m(e){return e.usage("$0 fraud update\n\nUpdate Fraud Detection settings for a zone. Notes on `username_expressions` behavior: - If omitted or set to null, expressions are not modified. - If provided as an empty array `[]`, all expressions will be cleared.").option(`authentication-settings-failure-criteria-kind`,{type:`string`,description:"The type of criterion. Currently only `status_code` is supported.",choices:[`status_code`]}).coerce(`authentication-settings-failure-criteria-kind`,e=>l(e,`authentication-settings-failure-criteria-kind`,`text`)).option(`authentication-settings-failure-criteria-status-codes`,{type:`string`,array:!0,description:`HTTP status codes to match against the origin response.
|
|
5
5
|
- Maximum of 10 codes per criterion.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-Db1KT0vm.mjs";import{i as n}from"./context-C_a8oSY9.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-Q5w9PNTT.mjs";import{t as o}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as s,t as c}from"./body-parser-DnBfDdx3.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u}from"./prompt-C0hKSr-R.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/settings/google-tag-gateway/config`};function f(e){return e.usage(`$0 google-tag-gateway config get
|
|
3
3
|
|
|
4
4
|
Gets the Google Tag Gateway configuration for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`get`,describe:`Get Google Tag Gateway configuration`,builder:f,handler:async e=>o({command:`google-tag-gateway config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf google-tag-gateway config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/google-tag-gateway/config`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var m={method:`PUT`,path:t=>e`/zones/${t.zone_id}/settings/google-tag-gateway/config`,body:`json`};function h(e){return e.usage(`$0 google-tag-gateway config update
|
|
5
5
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-Db1KT0vm.mjs";import{i as n}from"./context-C_a8oSY9.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-Q5w9PNTT.mjs";import{t as o}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as s,r as c,t as l}from"./body-parser-DnBfDdx3.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-C0hKSr-R.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/healthchecks`,body:`json`};function m(e){return e.usage(`$0 healthchecks create
|
|
3
|
+
|
|
4
|
+
Create a new health check.`).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`,default:1}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`,default:1}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>u(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>u(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Create Health Check`,builder:m,handler:async e=>o({command:`healthchecks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(p,{body:t,zone_id:f}));r(n,{successLabel:`Created`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let m=l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]),h=await a(`Creating`,async()=>o.send(p,{body:m,zone_id:f}));r(h,{successLabel:`Created`})})};var g={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/healthchecks/${t.healthcheck_id}`};function _(e){return e.usage(`$0 healthchecks delete <healthcheck-id>
|
|
5
|
+
|
|
6
|
+
Delete a health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const v={command:`delete <healthcheck-id>`,describe:`Delete Health Check`,builder:_,handler:async e=>o({command:`healthchecks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}let c=await a(`Deleting`,async()=>o.send(g,{zone_id:s,healthcheck_id:e[`healthcheck-id`]}));r(c,{successLabel:`Deleted`})})};var y={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/healthchecks/${t.healthcheck_id}`,body:`json`};function b(e){return e.usage(`$0 healthchecks edit <healthcheck-id>
|
|
8
|
+
|
|
9
|
+
Patch a configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>u(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>u(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`edit <healthcheck-id>`,describe:`Patch Health Check`,builder:b,handler:async e=>o({command:`healthchecks edit`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(y,{body:t,zone_id:f,healthcheck_id:e[`healthcheck-id`]}));r(n,{successLabel:`Updated`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let p=l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]),m=await a(`Updating`,async()=>o.send(y,{body:p,zone_id:f,healthcheck_id:e[`healthcheck-id`]}));r(m,{successLabel:`Updated`})})};var S={method:`GET`,path:t=>e`/zones/${t.zone_id}/healthchecks/${t.healthcheck_id}`};function C(e){return e.usage(`$0 healthchecks get <healthcheck-id>
|
|
10
|
+
|
|
11
|
+
Fetch a single configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <healthcheck-id>`,describe:`Health Check Details`,builder:C,handler:async e=>o({command:`healthchecks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(S,{zone_id:s,healthcheck_id:e[`healthcheck-id`]}));r(c,{successLabel:`Loaded`})})};var T={method:`GET`,path:t=>e`/zones/${t.zone_id}/healthchecks`,query:[`page`,`per_page`]};function E(e){return e.usage(`$0 healthchecks list
|
|
12
|
+
|
|
13
|
+
List configured health checks.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page. Must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List Health Checks`,builder:E,handler:async e=>o({command:`healthchecks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`]};if(e.dryRun){i({command:`cf healthchecks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(T,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})};var O={method:`POST`,path:t=>e`/zones/${t.zone_id}/healthchecks/preview`,body:`json`};function k(e){return e.usage(`$0 healthchecks previews create
|
|
14
|
+
|
|
15
|
+
Create a new preview health check.`).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`,default:1}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`,default:1}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>u(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>u(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`create`,describe:`Create Preview Health Check`,builder:k,handler:async e=>o({command:`healthchecks previews create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks previews create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks/preview`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(O,{body:t,zone_id:f}));r(n,{successLabel:`Created`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let p=l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]),m=await a(`Creating`,async()=>o.send(O,{body:p,zone_id:f}));r(m,{successLabel:`Created`})})};var j={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/healthchecks/preview/${t.healthcheck_id}`};function M(e){return e.usage(`$0 healthchecks previews delete <healthcheck-id>
|
|
16
|
+
|
|
17
|
+
Delete a health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const N={command:`delete <healthcheck-id>`,describe:`Delete Preview Health Check`,builder:M,handler:async e=>o({command:`healthchecks previews delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks previews delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks/preview/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force})){process.stderr.write(`Aborted.
|
|
18
|
+
`);return}let c=await a(`Deleting`,async()=>o.send(j,{zone_id:s,healthcheck_id:e[`healthcheck-id`]}));r(c,{successLabel:`Deleted`})})};var P={method:`GET`,path:t=>e`/zones/${t.zone_id}/healthchecks/preview/${t.healthcheck_id}`};function F(e){return e.usage(`$0 healthchecks previews get <healthcheck-id>
|
|
19
|
+
|
|
20
|
+
Fetch a single configured health check preview.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get <healthcheck-id>`,describe:`Health Check Preview Details`,builder:F,handler:async e=>o({command:`healthchecks previews get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks previews get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks/preview/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(P,{zone_id:s,healthcheck_id:e[`healthcheck-id`]}));r(c,{successLabel:`Loaded`})})},L={command:`previews`,describe:`Test a health check configuration before deploying it to production`,builder:e=>e.command(A).command(N).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`PUT`,path:t=>e`/zones/${t.zone_id}/healthchecks/${t.healthcheck_id}`,body:`json`};function z(e){return e.usage(`$0 healthchecks update <healthcheck-id>
|
|
21
|
+
|
|
22
|
+
Update a configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>u(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>u(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`update <healthcheck-id>`,describe:`Update Health Check`,builder:z,handler:async e=>o({command:`healthchecks update`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(R,{body:t,zone_id:f,healthcheck_id:e[`healthcheck-id`]}));r(n,{successLabel:`Updated`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let p=l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]),m=await a(`Updating`,async()=>o.send(R,{body:p,zone_id:f,healthcheck_id:e[`healthcheck-id`]}));r(m,{successLabel:`Updated`})})},V={command:`healthchecks`,describe:`Standalone health checks that monitor origin server availability from Cloudflare's edge`,builder:e=>e.command(h).command(v).command(x).command(w).command(D).command(B).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{V as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-Db1KT0vm.mjs";import{i as n}from"./context-C_a8oSY9.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-Q5w9PNTT.mjs";import{t as o}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as s}from"./body-parser-DnBfDdx3.mjs";import{n as c}from"./prompt-C0hKSr-R.mjs";var l={method:`GET`,path:t=>e`/zones/${t.zone_id}/hostnames/settings/${t.setting_id}/${t.hostname}`};function u(e){return e.usage(`$0 hostnames settings tls-single get <hostname>
|
|
3
3
|
|
|
4
4
|
Get the requested TLS setting for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get <hostname>`,describe:`Get TLS setting for hostname`,builder:u,handler:async e=>o({command:`hostnames settings tls-single get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf hostnames settings tls-single get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/hostnames/settings/${e[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(e[`setting-id`]))}/${e.hostname==null?`<hostname>`:encodeURIComponent(String(e.hostname))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"setting-id":String(e[`setting-id`]??``),hostname:String(e.hostname??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(l,{zone_id:s,setting_id:e[`setting-id`],hostname:e.hostname}));r(c,{successLabel:`Loaded`})})},f={command:`tls-single`,describe:`Operations for settings.tls-single`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var p={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/hostnames/settings/${t.setting_id}/${t.hostname}`};function m(e){return e.usage(`$0 hostnames settings tls delete <hostname>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-Db1KT0vm.mjs";import{a as r,t as i}from"./context-C_a8oSY9.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-Q5w9PNTT.mjs";import{t as c}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as l,t as u}from"./body-parser-DnBfDdx3.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-C0hKSr-R.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs`,body:`json`};function g(e){return e.usage(`$0 hyperdrive create
|
|
3
3
|
|
|
4
4
|
Creates and returns a new Hyperdrive configuration. For a PlanetScale integration, the Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard.`).option(`mtls-ca-certificate-id`,{type:`string`,description:`Define CA certificate ID obtained after uploading CA cert.`}).option(`mtls-certificate-id`,{type:`string`,description:`Define mTLS certificate ID obtained after uploading client cert.`}).option(`mtls-sslmode`,{type:`string`,description:"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.",choices:[`require`,`verify-ca`,`verify-full`,`REQUIRED`,`VERIFY_CA`,`VERIFY_IDENTITY`]}).coerce(`mtls-sslmode`,e=>d(e,`mtls-sslmode`,`text`)).option(`name`,{type:`string`,description:`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`}).option(`origin-connection-limit`,{type:`number`,description:`The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.
|
|
5
5
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-Db1KT0vm.mjs";import{a as r,t as i}from"./context-C_a8oSY9.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-Q5w9PNTT.mjs";import{t as c}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{i as l,n as u,t as d}from"./body-parser-DnBfDdx3.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-C0hKSr-R.mjs";var h={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/permission_groups/${t.permission_group_id}`};function g(e){return e.usage(`$0 iam permission-groups get <permission-group-id>
|
|
3
3
|
|
|
4
4
|
Get information about a specific permission group in an account.`).positional(`permission-group-id`,{type:`string`,description:`Permission Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <permission-group-id>`,describe:`Permission Group Details`,builder:g,handler:async e=>c({command:`iam permission-groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam permission-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/permission_groups/${e[`permission-group-id`]==null?`<permission-group-id>`:encodeURIComponent(String(e[`permission-group-id`]))}`,pathParams:{"permission-group-id":String(e[`permission-group-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(h,{account_id:l,permission_group_id:e[`permission-group-id`]}));a(u,{successLabel:`Loaded`})})};var _={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/permission_groups`,query:[`id`,`name`,`label`,`page`,`per_page`]};function v(e){return e.usage(`$0 iam permission-groups list
|
|
5
5
|
|
|
6
6
|
List all the permissions groups for an account.`).option(`id`,{type:`string`,description:`ID of the permission group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the permission group to be fetched.`}).option(`label`,{type:`string`,description:`Label of the permission group to be fetched.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`list`,describe:`List Account Permission Groups`,builder:v,handler:async e=>c({command:`iam permission-groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={id:e.id,name:e.name,label:e.label,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf iam permission-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/permission_groups`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(_,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},te={command:`permission-groups`,describe:`View the permission groups that can be assigned to API tokens and policies`,builder:e=>e.command(ee).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/iam/resource_groups`,body:`json`};function ne(e){return e.usage(`$0 iam resource-groups create
|
|
7
7
|
|
|
8
|
-
Create a new Resource Group under the specified account.`).option(`name`,{type:`string`,description:`Name of the resource group`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const re={command:`create`,describe:`Create Resource Group`,builder:ne,handler:async e=>c({command:`iam resource-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam resource-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/resource_groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):
|
|
8
|
+
Create a new Resource Group under the specified account.`).option(`name`,{type:`string`,description:`Name of the resource group`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const re={command:`create`,describe:`Create Resource Group`,builder:ne,handler:async e=>c({command:`iam resource-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam resource-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/resource_groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(b,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Name of the resource group`));let m=d({name:f(e.name,`name`,`text`)}),h=await s(`Creating`,async()=>c.send(b,{body:m,account_id:l}));a(h,{successLabel:`Created`})})};var x={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/iam/resource_groups/${t.resource_group_id}`};function S(e){return e.usage(`$0 iam resource-groups delete <resource-group-id>
|
|
9
9
|
|
|
10
10
|
Remove a resource group from an account.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <resource-group-id>`,describe:`Remove Resource Group`,builder:S,handler:async e=>c({command:`iam resource-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam resource-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/resource_groups/${e[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(e[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(e[`resource-group-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
11
11
|
`);return}let u=await s(`Deleting`,async()=>c.send(x,{account_id:l,resource_group_id:e[`resource-group-id`]}));a(u,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/resource_groups/${t.resource_group_id}`};function T(e){return e.usage(`$0 iam resource-groups get <resource-group-id>
|
|
@@ -14,11 +14,11 @@ Get information about a specific resource group in an account.`).positional(`res
|
|
|
14
14
|
|
|
15
15
|
List all the resource groups for an account.`).option(`id`,{type:`string`,description:`ID of the resource group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the resource group to be fetched.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List Resource Groups`,builder:O,handler:async e=>c({command:`iam resource-groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={id:e.id,name:e.name};if(e.dryRun){let e=await r();o({command:`cf iam resource-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/resource_groups`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(D,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var A={method:`PUT`,path:t=>e`/accounts/${t.account_id}/iam/resource_groups/${t.resource_group_id}`,body:`json`};function j(e){return e.usage(`$0 iam resource-groups update <resource-group-id>
|
|
16
16
|
|
|
17
|
-
Modify an existing resource group.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the resource group`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`update <resource-group-id>`,describe:`Update Resource Group`,builder:j,handler:async e=>c({command:`iam resource-groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam resource-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/resource_groups/${e[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(e[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(e[`resource-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):
|
|
17
|
+
Modify an existing resource group.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the resource group`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`update <resource-group-id>`,describe:`Update Resource Group`,builder:j,handler:async e=>c({command:`iam resource-groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam resource-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/resource_groups/${e[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(e[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(e[`resource-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(A,{body:t,account_id:l,resource_group_id:e[`resource-group-id`]}));a(n,{successLabel:`Updated`});return}let p=d({name:f(e.name,`name`,`text`)}),m=await s(`Updating`,async()=>c.send(A,{body:p,account_id:l,resource_group_id:e[`resource-group-id`]}));a(m,{successLabel:`Updated`})})},N={command:`resource-groups`,describe:`Define scopes that limit which account resources a policy or token can access`,builder:e=>e.command(re).command(C).command(E).command(k).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`POST`,path:t=>e`/accounts/${t.account_id}/sso_connectors/${t.sso_connector_id}/begin_verification`};function F(e){return e.usage(`$0 iam sso begin-verification <sso-connector-id>
|
|
18
18
|
|
|
19
19
|
Validates the user has added the DNS TXT record required for validating ownership of the domain they are trying to set up a connector for.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`begin-verification <sso-connector-id>`,describe:`Begin SSO connector verification`,builder:F,handler:async e=>c({command:`iam sso begin-verification`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam sso begin-verification`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/sso_connectors/${e[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(e[`sso-connector-id`]))}/begin_verification`,pathParams:{"sso-connector-id":String(e[`sso-connector-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(P,{account_id:l,sso_connector_id:e[`sso-connector-id`]}));a(u,{successLabel:`Created`})})};var L={method:`POST`,path:t=>e`/accounts/${t.account_id}/sso_connectors`,body:`json`};function R(e){return e.usage(`$0 iam sso create
|
|
20
20
|
|
|
21
|
-
Creates a new SSO connector for logging into Cloudflare through an identity provider.`).option(`begin-verification`,{type:`boolean`,description:`Begin the verification process after creation`,default:!0}).option(`email-domain`,{type:`string`,description:`Email domain of the new SSO connector`}).option(`use-fedramp-language`,{type:`boolean`,description:`Controls the display of FedRAMP language to the user during SSO login`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`create`,describe:`Initialize new SSO connector`,builder:R,handler:async e=>c({command:`iam sso create`,classification:{safeFlags:[`begin-verification`,`use-fedramp-language`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam sso create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/sso_connectors`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({begin_verification:e[`begin-verification`],email_domain:f(e[`email-domain`],`email-domain`,`text`),use_fedramp_language:e[`use-fedramp-language`]}):
|
|
21
|
+
Creates a new SSO connector for logging into Cloudflare through an identity provider.`).option(`begin-verification`,{type:`boolean`,description:`Begin the verification process after creation`,default:!0}).option(`email-domain`,{type:`string`,description:`Email domain of the new SSO connector`}).option(`use-fedramp-language`,{type:`boolean`,description:`Controls the display of FedRAMP language to the user during SSO login`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`create`,describe:`Initialize new SSO connector`,builder:R,handler:async e=>c({command:`iam sso create`,classification:{safeFlags:[`begin-verification`,`use-fedramp-language`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam sso create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/sso_connectors`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({begin_verification:e[`begin-verification`],email_domain:f(e[`email-domain`],`email-domain`,`text`),use_fedramp_language:e[`use-fedramp-language`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(L,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}e[`email-domain`]===void 0&&(e[`email-domain`]=await p(`email-domain`,`Email domain of the new SSO connector`));let m=d({begin_verification:e[`begin-verification`],email_domain:f(e[`email-domain`],`email-domain`,`text`),use_fedramp_language:e[`use-fedramp-language`]}),h=await s(`Creating`,async()=>c.send(L,{body:m,account_id:l}));a(h,{successLabel:`Created`})})};var B={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/sso_connectors/${t.sso_connector_id}`};function V(e){return e.usage(`$0 iam sso delete <sso-connector-id>
|
|
22
22
|
|
|
23
23
|
Deletes an SSO connector from the account.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const H={command:`delete <sso-connector-id>`,describe:`Delete SSO connector`,builder:V,handler:async e=>c({command:`iam sso delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam sso delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/sso_connectors/${e[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(e[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(e[`sso-connector-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
24
24
|
`);return}let u=await s(`Deleting`,async()=>c.send(B,{account_id:l,sso_connector_id:e[`sso-connector-id`]}));a(u,{successLabel:`Deleted`})})};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/sso_connectors/${t.sso_connector_id}`};function W(e){return e.usage(`$0 iam sso get <sso-connector-id>
|
|
@@ -27,9 +27,9 @@ Retrieves details for a specific SSO connector.`).positional(`sso-connector-id`,
|
|
|
27
27
|
|
|
28
28
|
Lists all SSO connectors configured for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`list`,describe:`Get all SSO connectors`,builder:q,handler:async e=>c({command:`iam sso list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf iam sso list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/sso_connectors`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(K,{account_id:l}));a(u,{successLabel:`Loaded`})})};var Y={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/sso_connectors/${t.sso_connector_id}`,body:`json`};function X(e){return e.usage(`$0 iam sso update <sso-connector-id>
|
|
29
29
|
|
|
30
|
-
Updates the state or configuration of an SSO connector.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`SSO Connector enabled state`}).option(`use-fedramp-language`,{type:`boolean`,description:`Controls the display of FedRAMP language to the user during SSO login`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`update <sso-connector-id>`,describe:`Update SSO connector state`,builder:X,handler:async e=>c({command:`iam sso update`,classification:{safeFlags:[`enabled`,`use-fedramp-language`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam sso update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/sso_connectors/${e[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(e[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(e[`sso-connector-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,use_fedramp_language:e[`use-fedramp-language`]}):
|
|
30
|
+
Updates the state or configuration of an SSO connector.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`SSO Connector enabled state`}).option(`use-fedramp-language`,{type:`boolean`,description:`Controls the display of FedRAMP language to the user during SSO login`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`update <sso-connector-id>`,describe:`Update SSO connector state`,builder:X,handler:async e=>c({command:`iam sso update`,classification:{safeFlags:[`enabled`,`use-fedramp-language`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam sso update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/sso_connectors/${e[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(e[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(e[`sso-connector-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,use_fedramp_language:e[`use-fedramp-language`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(Y,{body:t,account_id:l,sso_connector_id:e[`sso-connector-id`]}));a(n,{successLabel:`Updated`});return}let f=d({enabled:e.enabled,use_fedramp_language:e[`use-fedramp-language`]}),p=await s(`Updating`,async()=>c.send(Y,{body:f,account_id:l,sso_connector_id:e[`sso-connector-id`]}));a(p,{successLabel:`Updated`})})},ae={command:`sso`,describe:`Configure single sign-on connectors to authenticate account members through an external identity provider`,builder:e=>e.command(I).command(z).command(H).command(G).command(J).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/iam/user_groups`,body:`json`};function oe(e){return e.usage(`$0 iam user-groups create
|
|
31
31
|
|
|
32
|
-
Create a new user group under the specified account.`).option(`name`,{type:`string`,description:`Name of the User group.`}).option(`policies`,{type:`string`,description:`Policies attached to the User group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const se={command:`create`,describe:`Create User Group`,builder:oe,handler:async e=>c({command:`iam user-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`),policies:
|
|
32
|
+
Create a new user group under the specified account.`).option(`name`,{type:`string`,description:`Name of the User group.`}).option(`policies`,{type:`string`,description:`Policies attached to the User group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const se={command:`create`,describe:`Create User Group`,builder:oe,handler:async e=>c({command:`iam user-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`),policies:l(e.policies,`policies`)}):u(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(Z,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Name of the User group.`));let h=d({name:f(e.name,`name`,`text`),policies:l(e.policies,`policies`)}),g=await s(`Creating`,async()=>c.send(Z,{body:h,account_id:m}));a(g,{successLabel:`Created`})})};var ce={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}`};function le(e){return e.usage(`$0 iam user-groups delete <user-group-id>
|
|
33
33
|
|
|
34
34
|
Remove a user group from an account.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ue={command:`delete <user-group-id>`,describe:`Remove User Group`,builder:le,handler:async e=>c({command:`iam user-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
35
35
|
`);return}let u=await s(`Deleting`,async()=>c.send(ce,{account_id:l,user_group_id:e[`user-group-id`]}));a(u,{successLabel:`Deleted`})})};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}`};function fe(e){return e.usage(`$0 iam user-groups get <user-group-id>
|
|
@@ -38,7 +38,7 @@ Get information about a specific user group in an account.`).positional(`user-gr
|
|
|
38
38
|
|
|
39
39
|
List all the user groups for an account.`).option(`id`,{type:`string`,description:`ID of the user group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the user group to be fetched.`}).option(`fuzzy-name`,{type:`string`,description:`A string used for searching for user groups containing that substring.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`The sort order of returned user groups by name (ascending or descending).`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`list`,describe:`List User Groups`,builder:he,handler:async e=>c({command:`iam user-groups list`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let c={id:e.id,name:e.name,fuzzyName:e[`fuzzy-name`],page:e.page,per_page:e[`per-page`],direction:e.direction};if(e.dryRun){let e=await r();o({command:`cf iam user-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(me,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var _e={method:`POST`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}/members`,body:`json`};function ve(e){return e.usage(`$0 iam user-groups members create <user-group-id>
|
|
40
40
|
|
|
41
|
-
Add members to a User Group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ye={command:`create <user-group-id>`,describe:`Add User Group Members`,builder:ve,handler:async e=>c({command:`iam user-groups members create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups members create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:
|
|
41
|
+
Add members to a User Group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ye={command:`create <user-group-id>`,describe:`Add User Group Members`,builder:ve,handler:async e=>c({command:`iam user-groups members create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups members create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(_e,{body:t,account_id:l,user_group_id:e[`user-group-id`]}));a(n,{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var be={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}/members/${t.member_id}`};function xe(e){return e.usage(`$0 iam user-groups members delete <member-id>
|
|
42
42
|
|
|
43
43
|
Remove a member from User Group`).positional(`member-id`,{type:`string`,description:`The identifier of an existing account Member.`,demandOption:!0}).option(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Se={command:`delete <member-id>`,describe:`Remove User Group Member`,builder:xe,handler:async e=>c({command:`iam user-groups members delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups members delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"user-group-id":String(e[`user-group-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
44
44
|
`);return}let u=await s(`Deleting`,async()=>c.send(be,{account_id:l,user_group_id:e[`user-group-id`],member_id:e[`member-id`]}));a(u,{successLabel:`Deleted`})})};var Ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}/members/${t.member_id}`};function we(e){return e.usage(`$0 iam user-groups members get <member-id>
|
|
@@ -47,6 +47,6 @@ Get details of a specific member in a user group.`).positional(`member-id`,{type
|
|
|
47
47
|
|
|
48
48
|
List all the members attached to a user group.`).option(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`fuzzy-email`,{type:`string`,description:`A string used for filtering members by partial email match.`}).option(`direction`,{type:`string`,description:`The sort order of returned user group members by email.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oe={command:`list`,describe:`List User Group Members`,builder:De,handler:async e=>c({command:`iam user-groups members list`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],fuzzyEmail:e[`fuzzy-email`],direction:e.direction};if(e.dryRun){let t=await r();o({command:`cf iam user-groups members list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(Ee,{account_id:u,user_group_id:e[`user-group-id`],...c}));a(d,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}/members`,body:`json`};function ke(e){return e.usage(`$0 iam user-groups members update <user-group-id>
|
|
49
49
|
|
|
50
|
-
Replace the set of members attached to a User Group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Set/Replace members to a user group.`})}const Ae={command:`update <user-group-id>`,describe:`Update User Group Members`,builder:ke,handler:async e=>c({command:`iam user-groups members update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups members update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:
|
|
50
|
+
Replace the set of members attached to a User Group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Set/Replace members to a user group.`})}const Ae={command:`update <user-group-id>`,describe:`Update User Group Members`,builder:ke,handler:async e=>c({command:`iam user-groups members update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups members update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(Q,{body:t,account_id:l,user_group_id:e[`user-group-id`]}));a(n,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},je={command:`members`,describe:`Operations for user-groups.members`,builder:e=>e.command(ye).command(Se).command(Te).command(Oe).command(Ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`PUT`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}`,body:`json`};function Me(e){return e.usage(`$0 iam user-groups update <user-group-id>
|
|
51
51
|
|
|
52
|
-
Modify an existing user group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the User group.`}).option(`policies`,{type:`string`,description:`Policies attached to the User group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ne={command:`update <user-group-id>`,describe:`Update User Group`,builder:Me,handler:async e=>c({command:`iam user-groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`),policies:
|
|
52
|
+
Modify an existing user group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the User group.`}).option(`policies`,{type:`string`,description:`Policies attached to the User group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ne={command:`update <user-group-id>`,describe:`Update User Group`,builder:Me,handler:async e=>c({command:`iam user-groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`),policies:l(e.policies,`policies`)}):u(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send($,{body:t,account_id:p,user_group_id:e[`user-group-id`]}));a(n,{successLabel:`Updated`});return}let m=d({name:f(e.name,`name`,`text`),policies:l(e.policies,`policies`)}),h=await s(`Updating`,async()=>c.send($,{body:m,account_id:p,user_group_id:e[`user-group-id`]}));a(h,{successLabel:`Updated`})})},Pe={command:`user-groups`,describe:`Organize account members into groups for easier permission assignment`,builder:e=>e.command(se).command(ue).command(pe).command(ge).command(Ne).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Fe={command:`iam`,describe:`Identity and access management — permission groups, resource groups, user groups, and SSO connectors`,builder:e=>e.command(te).command(N).command(ae).command(Pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Fe as default};
|