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,4 +1,4 @@
|
|
|
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";var l={method:`POST`,path:t=>e`/accounts/${t.account_id}/brand-protection/submit`};function u(e){return e.usage(`$0 submit create
|
|
3
3
|
|
|
4
4
|
Return new URL submissions`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`create`,describe:`Create new URL submissions`,builder:u,handler:async e=>c({command:`submit create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf submit create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/brand-protection/submit`,pathParams:{},bodyKind:`none`});return}let c=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Creating`,async()=>c.send(l,{account_id:u}));a(d,{successLabel:`Created`})})},f={command:`submit`,describe:`submit`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f as default};
|
|
@@ -0,0 +1,23 @@
|
|
|
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-Db1KT0vm.mjs";import{a as i,i as a,t as o}from"./context-C_a8oSY9.mjs";import{t as s}from"./output-Co4xdFf6.mjs";import{t as c}from"./dry-run-C2KjGX10.mjs";import{t as l}from"./progress-Q5w9PNTT.mjs";import{t as u}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{a as d,n as f,t as p}from"./body-parser-DnBfDdx3.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-C0hKSr-R.mjs";function v(e){return e.usage(`$0 tags account-resources delete
|
|
3
|
+
|
|
4
|
+
Removes all tags from a specific account or zone-level resource.`).option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
|
|
5
|
+
verify the current resource ETag matches before applying the write. Returns
|
|
6
|
+
412 Precondition Failed if the resource has been modified since the ETag was
|
|
7
|
+
obtained. Omit this header for unconditional writes.`}).option(`resource-id`,{type:`string`,description:`Identifies the unique resource.`}).option(`resource-type`,{type:`string`,description:`Enum for worker_version resource type.`,choices:/* @__PURE__ */ `worker_version.access_application.access_group.access_service_token.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`)}).coerce(`resource-type`,e=>m(e,`resource-type`,`text`)).option(`worker-id`,{type:`string`,description:`Worker ID is required only for worker_version resources`}).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}).option(`body`,{type:`string`,description:`Request body schema for deleting tags from account-level resources. Use /zones/{zone_id}/tags for zone-level resources.`})}const y={command:`delete`,describe:`Delete tags from an account or zone-level resource`,builder:v,handler:async e=>u({command:`tags account-resources delete`,classification:{safeFlags:[`resource-type`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let u={};if(e[`if-match`]!==void 0&&(u[`If-Match`]=String(e[`if-match`])),e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf tags account-resources delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/tags`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?p({resource_id:m(e[`resource-id`],`resource-id`,`text`),resource_type:e[`resource-type`],worker_id:m(e[`worker-id`],`worker-id`,`text`)}):f(e.body)});return}let v=await r(e),y=e.zone===void 0?`accounts`:`zones`,b=y===`zones`?await a({zone:e.zone},v,{quiet:e.quiet}):e.local?t:await o();if(y===`zones`?e.zoneId=b:e.accountId=b,!await _({force:!!e.force})){process.stderr.write(`Aborted.
|
|
8
|
+
`);return}if(e.body){let t=f(e.body),r=await l(`Deleting`,async()=>n(v,`DELETE`,`/${y}/${b}/tags`,{body:t,headers:Object.keys(u).length>0?u:void 0}));s(r,{successLabel:`Deleted`});return}e[`resource-id`]===void 0&&(e[`resource-id`]=await h(`resource-id`,`Identifies the unique resource.`)),e[`resource-type`]===void 0&&(e[`resource-type`]=await g(`resource-type`,`Enum for worker_version resource type.`,/* @__PURE__ */ `worker_version.access_application.access_group.access_service_token.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`))),e[`resource-type`]===`worker_version`&&e[`worker-id`]===void 0&&(e[`worker-id`]=await h(`worker-id`,`Worker ID is required only for worker_version resources`,{question:`Enter value for --worker-id`}));let x={};e[`resource-id`]!==void 0&&d(x,[`resource_id`],m(e[`resource-id`],`resource-id`,`text`)),e[`resource-type`]!==void 0&&d(x,[`resource_type`],e[`resource-type`]),e[`worker-id`]!==void 0&&d(x,[`worker_id`],m(e[`worker-id`],`worker-id`,`text`));let S=await l(`Deleting`,async()=>n(v,`DELETE`,`/${y}/${b}/tags`,{body:x,headers:Object.keys(u).length>0?u:void 0}));s(S,{successLabel:`Deleted`})})};var b={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/tags`,query:[`resource_id`,`resource_type`,`worker_id`]};function x(e){return e.usage(`$0 tags account-resources get
|
|
9
|
+
|
|
10
|
+
Retrieves tags for a specific account or zone-level resource.`).option(`resource-id`,{type:`string`,description:`The ID of the resource to retrieve tags for.`,demandOption:!0}).option(`resource-type`,{type:`string`,description:`The type of the resource.`,choices:/* @__PURE__ */ `access_application.access_group.access_service_token.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker.worker_version`.split(`.`),demandOption:!0}).option(`worker-id`,{type:`string`,description:`Worker identifier. Required for worker_version resources.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get`,describe:`Get tags for an account or zone-level resource`,builder:x,handler:async e=>u({command:`tags account-resources get`,classification:{safeFlags:[`resource-type`,`dry-run`]}},e,async()=>{let n={resource_id:e[`resource-id`],resource_type:e[`resource-type`],worker_id:e[`worker-id`]};if(e.dryRun){let t=e.zone===void 0?await i():void 0,r=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;c({command:`cf tags account-resources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${r}/${a}/tags`,pathParams:{"account-or-zone":String(r),"account-or-zone-id":String(a)},query:n,bodyKind:`none`});return}let u=await r(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await o();d===`zones`?e.zoneId=f:e.accountId=f;let p=await l(`Loading`,async()=>u.send(b,{account_or_zone:d,account_or_zone_id:f,...n}));s(p,{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 tags account-resources update
|
|
11
|
+
|
|
12
|
+
Creates or updates tags for a specific account or zone-level resource. Replaces all existing tags for the resource.`).option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
|
|
13
|
+
verify the current resource ETag matches before applying the write. Returns
|
|
14
|
+
412 Precondition Failed if the resource has been modified since the ETag was
|
|
15
|
+
obtained. Omit this header for unconditional writes.`}).option(`resource-id`,{type:`string`,description:`Identifies the unique resource.`}).option(`resource-type`,{type:`string`,description:`Enum for worker_version resource type.`,choices:/* @__PURE__ */ `worker_version.access_application.access_group.access_service_token.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`)}).coerce(`resource-type`,e=>m(e,`resource-type`,`text`)).option(`worker-id`,{type:`string`,description:`Worker ID is required only for worker_version resources`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body schema for setting tags on account-level resources.`})}const w={command:`update`,describe:`Set tags for an account or zone-level resource`,builder:C,handler:async e=>u({command:`tags account-resources update`,classification:{safeFlags:[`resource-type`,`dry-run`]}},e,async()=>{let u={};if(e[`if-match`]!==void 0&&(u[`If-Match`]=String(e[`if-match`])),e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf tags account-resources update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/tags`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?p({resource_id:m(e[`resource-id`],`resource-id`,`text`),resource_type:e[`resource-type`],worker_id:m(e[`worker-id`],`worker-id`,`text`)}):f(e.body)});return}let _=await r(e),v=e.zone===void 0?`accounts`:`zones`,y=v===`zones`?await a({zone:e.zone},_,{quiet:e.quiet}):e.local?t:await o();if(v===`zones`?e.zoneId=y:e.accountId=y,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n(_,`PUT`,`/${v}/${y}/tags`,{body:t,headers:Object.keys(u).length>0?u:void 0}));s(r,{successLabel:`Updated`});return}e[`resource-id`]===void 0&&(e[`resource-id`]=await h(`resource-id`,`Identifies the unique resource.`)),e[`resource-type`]===void 0&&(e[`resource-type`]=await g(`resource-type`,`Enum for worker_version resource type.`,/* @__PURE__ */ `worker_version.access_application.access_group.access_service_token.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`))),e[`resource-type`]===`worker_version`&&e[`worker-id`]===void 0&&(e[`worker-id`]=await h(`worker-id`,`Worker ID is required only for worker_version resources`,{question:`Enter value for --worker-id`}));let b={};e[`resource-id`]!==void 0&&d(b,[`resource_id`],m(e[`resource-id`],`resource-id`,`text`)),e[`resource-type`]!==void 0&&d(b,[`resource_type`],e[`resource-type`]),e[`worker-id`]!==void 0&&d(b,[`worker_id`],m(e[`worker-id`],`worker-id`,`text`));let x=await l(`Updating`,async()=>n(_,`PUT`,`/${v}/${y}/tags`,{body:b,headers:Object.keys(u).length>0?u:void 0}));s(x,{successLabel:`Updated`})})},T={command:`account-resources`,describe:`Operations for account-resources`,builder:e=>e.command(y).command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var E={method:`GET`,path:t=>e`/accounts/${t.account_id}/tags/keys`,query:[`cursor`]};function D(e){return e.usage(`$0 tags keys list
|
|
16
|
+
|
|
17
|
+
Lists all distinct tag keys used across resources in an account.`).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List tag keys`,builder:D,handler:async e=>u({command:`tags keys list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={cursor:e.cursor};if(e.dryRun){let e=await i();c({command:`cf tags keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tags/keys`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(E,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},k={command:`keys`,describe:`Operations for keys`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/tags/resources`,query:[`include_navigation`,`type`,`name`,`id`,`case_insensitive`,`tag`,`cursor`]};function j(e){return e.usage(`$0 tags resources list
|
|
18
|
+
|
|
19
|
+
Lists all tagged resources for an account.`).option(`include-navigation`,{type:`boolean`,description:`Resolve current namespace Worker navigation by immutable child tag. Optional read-only navigation is omitted for deleted or unresolved children. Lookups are limited to this page, at most five concurrently, with a shared two-second budget. Tag identity, ETag, filters and pagination are unchanged; name filtering still uses the stored resource name. Defaults to false.`}).option(`type`,{type:`string`,description:`Filter by resource type. Can be repeated to filter by multiple types (OR logic). Example: ?type=zone&type=worker`}).option(`name`,{type:`string`,description:`Filter by resource name. Performs a case-insensitive substring match. Example: ?name=my-zone`}).option(`id`,{type:`string`,description:`Filter by resource ID. Can be repeated up to 50 times to filter by multiple IDs. Example: ?id=abc&id=def`}).option(`case-insensitive`,{type:`boolean`,description:"Match `tag` keys and values case-insensitively. Stored casing is unchanged. Example: ?tag=environment=production&case_insensitive=true"}).option(`tag`,{type:`string`,description:"Filter resources by tag criteria. This parameter can be repeated multiple times, with AND logic between parameters.\n\nSupported syntax:\n- **Key-only**: `tag=<key>` - Resource must have the tag key (e.g., `tag=production`)\n- **Key-value**: `tag=<key>=<value>` - Resource must have the tag with specific value (e.g., `tag=env=prod`)\n- **Multiple values (OR)**: `tag=<key>=<v1>,<v2>` - Resource must have tag with any of the values (e.g., `tag=env=prod,staging`)\n- **Negate key-only**: `tag=!<key>` - Resource must not have the tag key (e.g., `tag=!archived`)\n- **Negate key-value**: `tag=<key>!=<value>` - Resource must not have the tag with specific value (e.g., `tag=region!=us-west-1`)\n\nMultiple tag parameters are combined with AND logic."}).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:`List tagged resources`,builder:j,handler:async e=>u({command:`tags resources list`,classification:{safeFlags:[`include-navigation`,`case-insensitive`,`dry-run`]}},e,async()=>{let n={include_navigation:e[`include-navigation`],type:e.type,name:e.name,id:e.id,case_insensitive:e[`case-insensitive`],tag:e.tag,cursor:e.cursor};if(e.dryRun){let e=await i();c({command:`cf tags resources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tags/resources`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(A,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},N={command:`resources`,describe:`Operations for resources`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`GET`,path:t=>e`/accounts/${t.account_id}/tags/summary`,query:[`cursor`]};function F(e){return e.usage(`$0 tags summary get
|
|
20
|
+
|
|
21
|
+
Lists all distinct tag keys and their distinct values across resources in an account.`).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get`,describe:`List tag key summary`,builder:F,handler:async e=>u({command:`tags summary get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={cursor:e.cursor};if(e.dryRun){let e=await i();c({command:`cf tags summary get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tags/summary`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(P,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},L={command:`summary`,describe:`Operations for summary`,builder:e=>e.command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`GET`,path:t=>e`/accounts/${t.account_id}/tags/values/${t.tag_key}`,query:[`type`,`cursor`]};function z(e){return e.usage(`$0 tags values list
|
|
22
|
+
|
|
23
|
+
Lists all distinct values for a given tag key, optionally filtered by resource type.`).option(`tag-key`,{type:`string`,description:`The tag key to retrieve values for.`,demandOption:!0}).option(`type`,{type:`string`,description:`Filter by resource type.`,choices:/* @__PURE__ */ `access_application.access_application_policy.access_group.access_service_token.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.api_gateway_operation.cloudflared_tunnel.custom_certificate.custom_hostname.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.device.dns_record.durable_object_namespace.gateway_list.gateway_rule.healthcheck.image.infrastructure_target.kv_namespace.load_balancer.load_balancer_monitor.load_balancer_pool.managed_client_certificate.namespace_worker.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker.worker_route.worker_version.zone.zone_ruleset`.split(`.`)}).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`list`,describe:`List tag values`,builder:z,handler:async e=>u({command:`tags values list`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{let n={type:e.type,cursor:e.cursor};if(e.dryRun){let t=await i();c({command:`cf tags values list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/tags/values/${e[`tag-key`]==null?`<tag-key>`:encodeURIComponent(String(e[`tag-key`]))}`,pathParams:{"tag-key":String(e[`tag-key`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(R,{account_id:u,tag_key:e[`tag-key`],...n}));s(d,{successLabel:`Loaded`})})},V={command:`values`,describe:`Operations for values`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},H={command:`tags`,describe:`tags`,builder:e=>e.command(T).command(k).command(N).command(L).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{H as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as e,n as t,r as n,t as r}from"./lifecycle-oud60haK.mjs";import{a as i,c as a,d as o,f as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g}from"./run-
|
|
2
|
+
import{a as e,n as t,r as n,t as r}from"./lifecycle-oud60haK.mjs";import{a as i,c as a,d as o,f as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g}from"./run-DtFLvOHB.mjs";import{t as _}from"./telemetry-BavSU4ku.mjs";export{i as TELEMETRY_ENV_VAR,f as TELEMETRY_POLICY_DATE,_ as UNKNOWN_COMMAND_EVENT,r as allTelemetryDispatchesSettled,t as beginTelemetryRun,h as getBannerLastShown,a as getDeviceId,c as getTelemetryDispatcher,l as getTelemetryFromEnv,o as isFirstUsage,n as markCommandReported,s as resolveTelemetry,g as runWithTelemetry,m as sanitizeArgs,p as setBannerLastShown,u as setTelemetryPermission,e as wasCommandReported,d as withTelemetry};
|
|
@@ -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{t as n}from"./output-Co4xdFf6.mjs";import{t as r}from"./dry-run-C2KjGX10.mjs";import{t as i}from"./progress-Q5w9PNTT.mjs";import{t as a}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";var o={method:`GET`,path:t=>e`/tenants/${t.tenant_id}/account_types`};function s(e){return e.usage(`$0 tenant account-type list
|
|
3
3
|
|
|
4
4
|
Lists the account types this tenant is allowed to provision.`).option(`tenant-id`,{type:`string`,description:`The ID of the tenant whose available account types to list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`list`,describe:`List tenant account types`,builder:s,handler:async e=>a({command:`tenant account-type list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf tenant account-type list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${e[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(e[`tenant-id`]))}/account_types`,pathParams:{"tenant-id":String(e[`tenant-id`]??``)},bodyKind:`none`});return}let a=await t(e),s=await i(`Loading`,async()=>a.send(o,{tenant_id:e[`tenant-id`]}));n(s,{successLabel:`Loaded`})})},l={command:`account-type`,describe:`Operations for account-type`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var u={method:`GET`,path:t=>e`/tenants/${t.tenant_id}/accounts`};function d(e){return e.usage(`$0 tenant account list
|
|
5
5
|
|
package/dist/{tenant-custom-nameservers-aozjaasc.mjs → tenant-custom-nameservers-BkxlPr5O.mjs}
RENAMED
|
@@ -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{t as n}from"./output-Co4xdFf6.mjs";import{t as r}from"./dry-run-C2KjGX10.mjs";import{t as i}from"./progress-Q5w9PNTT.mjs";import{t as a}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as o,t as s}from"./body-parser-DnBfDdx3.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l,n as u}from"./prompt-C0hKSr-R.mjs";var d={method:`POST`,path:t=>e`/tenants/${t.tenant_tag}/custom_ns`,body:`json`};function f(e){return e.usage(`$0 tenant-custom-nameservers create <tenant-tag>
|
|
3
3
|
|
|
4
4
|
Adds a custom nameserver for a tenant.`).positional(`tenant-tag`,{type:`string`,description:`Tenant identifier tag.`,demandOption:!0}).option(`ns-name`,{type:`string`,description:`The FQDN of the name server.`}).option(`ns-set`,{type:`number`,description:`The number of the set that this name server belongs to.`,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 p={command:`create <tenant-tag>`,describe:`Add Tenant Custom Nameserver`,builder:f,handler:async e=>a({command:`tenant-custom-nameservers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf tenant-custom-nameservers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/tenants/${e[`tenant-tag`]==null?`<tenant-tag>`:encodeURIComponent(String(e[`tenant-tag`]))}/custom_ns`,pathParams:{"tenant-tag":String(e[`tenant-tag`]??``)},bodyKind:`json`,body:e.body===void 0?s({ns_name:c(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}):o(e.body)});return}let a=await t(e);if(e.body){let t=o(e.body),r=await i(`Creating`,async()=>a.send(d,{body:t,tenant_tag:e[`tenant-tag`]}));n(r,{successLabel:`Created`});return}e[`ns-name`]===void 0&&(e[`ns-name`]=await l(`ns-name`,`The FQDN of the name server.`));let u=s({ns_name:c(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}),f=await i(`Creating`,async()=>a.send(d,{body:u,tenant_tag:e[`tenant-tag`]}));n(f,{successLabel:`Created`})})};var m={method:`DELETE`,path:t=>e`/tenants/${t.tenant_tag}/custom_ns/${t.custom_ns_id}`};function h(e){return e.usage(`$0 tenant-custom-nameservers delete <custom-ns-id>
|
|
5
5
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./lazy-command-
|
|
2
|
+
import{t as e}from"./lazy-command-4ccdBqrc.mjs";import"./api-eMuS5GI1.mjs";import{t}from"./path-DRw6Y-nd.mjs";import{t as n}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as r}from"./local-Dil4fTWX.mjs";import{n as i}from"./auth-Db1KT0vm.mjs";import{a,t as o}from"./context-C_a8oSY9.mjs";import{t as s}from"./output-Co4xdFf6.mjs";import{t as c}from"./dry-run-C2KjGX10.mjs";import{t as l}from"./progress-Q5w9PNTT.mjs";import{t as u}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as d,t as f}from"./body-parser-DnBfDdx3.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,n as h}from"./prompt-C0hKSr-R.mjs";import{t as g}from"./create-OXylMu6m.mjs";import{t as _}from"./get-iPUHxD1r.mjs";var v={method:`GET`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/configurations`};function y(e){return e.usage(`$0 tunnels config get <tunnel-id>
|
|
3
3
|
|
|
4
4
|
Retrieves the configuration for a remotely managed Cloudflare Tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <tunnel-id>`,describe:`Get Tunnel configuration`,builder:y,handler:async e=>u({command:`tunnels config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();e.accountId=n;let u=await l(`Loading`,async()=>t.send(v,{account_id:n,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Loaded`})})};var b={method:`PUT`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/configurations`,body:`json`};function x(e){return e.usage(`$0 tunnels config update <tunnel-id>
|
|
5
5
|
|
|
6
|
-
Replaces the configuration for a remotely managed Cloudflare Tunnel, including its ingress rules and origin request settings.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`config-origin-request-access-aud-tag`,{type:`string`,array:!0,description:`Access applications that are allowed to reach this hostname for this Tunnel. Audience tags can be identified in the dashboard or via the List Access policies API.`}).option(`config-origin-request-access-required`,{type:`boolean`,description:`Deny traffic that has not fulfilled Access authorization.`}).option(`config-origin-request-access-team-name`,{type:`string`,description:`The config.originRequest.access.teamName field`}).option(`config-origin-request-ca-pool`,{type:`string`,description:`Path to the certificate authority (CA) for the certificate of your origin. This option should be used only if your certificate is not signed by Cloudflare.`}).option(`config-origin-request-connect-timeout`,{type:`number`,description:`Timeout for establishing a new TCP connection to your origin server. This excludes the time taken to establish TLS, which is controlled by tlsTimeout.`}).option(`config-origin-request-disable-chunked-encoding`,{type:`boolean`,description:`Disables chunked transfer encoding. Useful if you are running a WSGI server.`}).option(`config-origin-request-http2origin`,{type:`boolean`,description:`Attempt to connect to origin using HTTP2. Origin must be configured as https.`}).option(`config-origin-request-http-host-header`,{type:`string`,description:`Sets the HTTP Host header on requests sent to the local service.`}).option(`config-origin-request-keep-alive-connections`,{type:`number`,description:`Maximum number of idle keepalive connections between Tunnel and your origin. This does not restrict the total number of concurrent connections.`}).option(`config-origin-request-keep-alive-timeout`,{type:`number`,description:`Timeout after which an idle keepalive connection can be discarded.`}).option(`config-origin-request-match-snito-host`,{type:`boolean`,description:`Auto configure the Hostname on the origin server certificate.`}).option(`config-origin-request-no-happy-eyeballs`,{type:`boolean`,description:`Disable the “happy eyeballs” algorithm for IPv4/IPv6 fallback if your local network has misconfigured one of the protocols.`}).option(`config-origin-request-no-tlsverify`,{type:`boolean`,description:`Disables TLS verification of the certificate presented by your origin. Will allow any certificate from the origin to be accepted.`}).option(`config-origin-request-origin-server-name`,{type:`string`,description:`Hostname that cloudflared should expect from your origin server certificate.`}).option(`config-origin-request-proxy-type`,{type:`string`,description:`cloudflared starts a proxy server to translate HTTP traffic into TCP when proxying, for example, SSH or RDP. This configures what type of proxy will be started. Valid options are: "" for the regular proxy and "socks" for a SOCKS5 proxy.
|
|
7
|
-
`}).option(`config-origin-request-tcp-keep-alive`,{type:`number`,description:`The timeout after which a TCP keepalive packet is sent on a connection between Tunnel and the origin server.`}).option(`config-origin-request-tls-timeout`,{type:`number`,description:`Timeout for completing a TLS handshake to your origin server, if you have chosen to connect Tunnel to an HTTPS server.`}).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)`}).check(e=>{if([`config-origin-request-access-aud-tag`,`config-origin-request-access-required`,`config-origin-request-access-team-name`,`config-origin-request-ca-pool`,`config-origin-request-connect-timeout`,`config-origin-request-disable-chunked-encoding`,`config-origin-request-http2origin`,`config-origin-request-http-host-header`,`config-origin-request-keep-alive-connections`,`config-origin-request-keep-alive-timeout`,`config-origin-request-match-snito-host`,`config-origin-request-no-happy-eyeballs`,`config-origin-request-no-tlsverify`,`config-origin-request-origin-server-name`,`config-origin-request-proxy-type`,`config-origin-request-tcp-keep-alive`,`config-origin-request-tls-timeout`].some(t=>e[t]!==void 0)){let t=[`config-origin-request-access-aud-tag`,`config-origin-request-access-team-name`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --config-* flag is set`)}return!0})}const S={command:`update <tunnel-id>`,describe:`Update Tunnel configuration`,builder:x,handler:async e=>u({command:`tunnels config update`,classification:{safeFlags:[`config-origin-request-access-required`,`config-origin-request-disable-chunked-encoding`,`config-origin-request-http2origin`,`config-origin-request-match-snito-host`,`config-origin-request-no-happy-eyeballs`,`config-origin-request-no-tlsverify`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({config:{originRequest:{access:{audTag:e[`config-origin-request-access-aud-tag`],required:e[`config-origin-request-access-required`],teamName:p(e[`config-origin-request-access-team-name`],`config-origin-request-access-team-name`,`text`)},caPool:p(e[`config-origin-request-ca-pool`],`config-origin-request-ca-pool`,`text`),connectTimeout:e[`config-origin-request-connect-timeout`],disableChunkedEncoding:e[`config-origin-request-disable-chunked-encoding`],http2Origin:e[`config-origin-request-http2origin`],httpHostHeader:p(e[`config-origin-request-http-host-header`],`config-origin-request-http-host-header`,`text`),keepAliveConnections:e[`config-origin-request-keep-alive-connections`],keepAliveTimeout:e[`config-origin-request-keep-alive-timeout`],matchSNItoHost:e[`config-origin-request-match-snito-host`],noHappyEyeballs:e[`config-origin-request-no-happy-eyeballs`],noTLSVerify:e[`config-origin-request-no-tlsverify`],originServerName:p(e[`config-origin-request-origin-server-name`],`config-origin-request-origin-server-name`,`text`),proxyType:p(e[`config-origin-request-proxy-type`],`config-origin-request-proxy-type`,`text`),tcpKeepAlive:e[`config-origin-request-tcp-keep-alive`],tlsTimeout:e[`config-origin-request-tls-timeout`]}}}):d(e.body)});return}let t=await i(e),n=e.local?r:await o();if(e.accountId=n,e.body){let r=d(e.body),i=await l(`Updating`,async()=>t.send(b,{body:r,account_id:n,tunnel_id:e[`tunnel-id`]}));s(i,{successLabel:`Updated`});return}let u=f({config:{originRequest:{access:{audTag:e[`config-origin-request-access-aud-tag`],required:e[`config-origin-request-access-required`],teamName:p(e[`config-origin-request-access-team-name`],`config-origin-request-access-team-name`,`text`)},caPool:p(e[`config-origin-request-ca-pool`],`config-origin-request-ca-pool`,`text`),connectTimeout:e[`config-origin-request-connect-timeout`],disableChunkedEncoding:e[`config-origin-request-disable-chunked-encoding`],http2Origin:e[`config-origin-request-http2origin`],httpHostHeader:p(e[`config-origin-request-http-host-header`],`config-origin-request-http-host-header`,`text`),keepAliveConnections:e[`config-origin-request-keep-alive-connections`],keepAliveTimeout:e[`config-origin-request-keep-alive-timeout`],matchSNItoHost:e[`config-origin-request-match-snito-host`],noHappyEyeballs:e[`config-origin-request-no-happy-eyeballs`],noTLSVerify:e[`config-origin-request-no-tlsverify`],originServerName:p(e[`config-origin-request-origin-server-name`],`config-origin-request-origin-server-name`,`text`),proxyType:p(e[`config-origin-request-proxy-type`],`config-origin-request-proxy-type`,`text`),tcpKeepAlive:e[`config-origin-request-tcp-keep-alive`],tlsTimeout:e[`config-origin-request-tls-timeout`]}}}),m=await l(`Updating`,async()=>t.send(b,{body:u,account_id:n,tunnel_id:e[`tunnel-id`]}));s(m,{successLabel:`Updated`})})},C={command:`config`,describe:`Operations for config`,builder:e=>e.command(ee).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var w={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/connections`,query:[`client_id`]};function T(e){return e.usage(`$0 tunnels connections cleanup <tunnel-id>
|
|
6
|
+
Replaces the configuration for a remotely managed Cloudflare Tunnel, including its ingress rules and origin request settings.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`tunnel-config-origin-request-access-aud-tag`,{type:`string`,array:!0,description:`Access applications that are allowed to reach this hostname for this Tunnel. Audience tags can be identified in the dashboard or via the List Access policies API.`}).option(`tunnel-config-origin-request-access-required`,{type:`boolean`,description:`Deny traffic that has not fulfilled Access authorization.`}).option(`tunnel-config-origin-request-access-team-name`,{type:`string`,description:`The config.originRequest.access.teamName field`}).option(`tunnel-config-origin-request-ca-pool`,{type:`string`,description:`Path to the certificate authority (CA) for the certificate of your origin. This option should be used only if your certificate is not signed by Cloudflare.`}).option(`tunnel-config-origin-request-connect-timeout`,{type:`number`,description:`Timeout for establishing a new TCP connection to your origin server. This excludes the time taken to establish TLS, which is controlled by tlsTimeout.`}).option(`tunnel-config-origin-request-disable-chunked-encoding`,{type:`boolean`,description:`Disables chunked transfer encoding. Useful if you are running a WSGI server.`}).option(`tunnel-config-origin-request-http2origin`,{type:`boolean`,description:`Attempt to connect to origin using HTTP2. Origin must be configured as https.`}).option(`tunnel-config-origin-request-http-host-header`,{type:`string`,description:`Sets the HTTP Host header on requests sent to the local service.`}).option(`tunnel-config-origin-request-keep-alive-connections`,{type:`number`,description:`Maximum number of idle keepalive connections between Tunnel and your origin. This does not restrict the total number of concurrent connections.`}).option(`tunnel-config-origin-request-keep-alive-timeout`,{type:`number`,description:`Timeout after which an idle keepalive connection can be discarded.`}).option(`tunnel-config-origin-request-match-snito-host`,{type:`boolean`,description:`Auto configure the Hostname on the origin server certificate.`}).option(`tunnel-config-origin-request-no-happy-eyeballs`,{type:`boolean`,description:`Disable the “happy eyeballs” algorithm for IPv4/IPv6 fallback if your local network has misconfigured one of the protocols.`}).option(`tunnel-config-origin-request-no-tlsverify`,{type:`boolean`,description:`Disables TLS verification of the certificate presented by your origin. Will allow any certificate from the origin to be accepted.`}).option(`tunnel-config-origin-request-origin-server-name`,{type:`string`,description:`Hostname that cloudflared should expect from your origin server certificate.`}).option(`tunnel-config-origin-request-proxy-type`,{type:`string`,description:`cloudflared starts a proxy server to translate HTTP traffic into TCP when proxying, for example, SSH or RDP. This configures what type of proxy will be started. Valid options are: "" for the regular proxy and "socks" for a SOCKS5 proxy.
|
|
7
|
+
`}).option(`tunnel-config-origin-request-tcp-keep-alive`,{type:`number`,description:`The timeout after which a TCP keepalive packet is sent on a connection between Tunnel and the origin server.`}).option(`tunnel-config-origin-request-tls-timeout`,{type:`number`,description:`Timeout for completing a TLS handshake to your origin server, if you have chosen to connect Tunnel to an HTTPS server.`}).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)`}).check(e=>{if([`tunnel-config-origin-request-access-aud-tag`,`tunnel-config-origin-request-access-required`,`tunnel-config-origin-request-access-team-name`,`tunnel-config-origin-request-ca-pool`,`tunnel-config-origin-request-connect-timeout`,`tunnel-config-origin-request-disable-chunked-encoding`,`tunnel-config-origin-request-http2origin`,`tunnel-config-origin-request-http-host-header`,`tunnel-config-origin-request-keep-alive-connections`,`tunnel-config-origin-request-keep-alive-timeout`,`tunnel-config-origin-request-match-snito-host`,`tunnel-config-origin-request-no-happy-eyeballs`,`tunnel-config-origin-request-no-tlsverify`,`tunnel-config-origin-request-origin-server-name`,`tunnel-config-origin-request-proxy-type`,`tunnel-config-origin-request-tcp-keep-alive`,`tunnel-config-origin-request-tls-timeout`].some(t=>e[t]!==void 0)){let t=[`tunnel-config-origin-request-access-aud-tag`,`tunnel-config-origin-request-access-team-name`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --config-* flag is set`)}return!0})}const S={command:`update <tunnel-id>`,describe:`Update Tunnel configuration`,builder:x,handler:async e=>u({command:`tunnels config update`,classification:{safeFlags:[`tunnel-config-origin-request-access-required`,`tunnel-config-origin-request-disable-chunked-encoding`,`tunnel-config-origin-request-http2origin`,`tunnel-config-origin-request-match-snito-host`,`tunnel-config-origin-request-no-happy-eyeballs`,`tunnel-config-origin-request-no-tlsverify`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({config:{originRequest:{access:{audTag:e[`tunnel-config-origin-request-access-aud-tag`],required:e[`tunnel-config-origin-request-access-required`],teamName:p(e[`tunnel-config-origin-request-access-team-name`],`tunnel-config-origin-request-access-team-name`,`text`)},caPool:p(e[`tunnel-config-origin-request-ca-pool`],`tunnel-config-origin-request-ca-pool`,`text`),connectTimeout:e[`tunnel-config-origin-request-connect-timeout`],disableChunkedEncoding:e[`tunnel-config-origin-request-disable-chunked-encoding`],http2Origin:e[`tunnel-config-origin-request-http2origin`],httpHostHeader:p(e[`tunnel-config-origin-request-http-host-header`],`tunnel-config-origin-request-http-host-header`,`text`),keepAliveConnections:e[`tunnel-config-origin-request-keep-alive-connections`],keepAliveTimeout:e[`tunnel-config-origin-request-keep-alive-timeout`],matchSNItoHost:e[`tunnel-config-origin-request-match-snito-host`],noHappyEyeballs:e[`tunnel-config-origin-request-no-happy-eyeballs`],noTLSVerify:e[`tunnel-config-origin-request-no-tlsverify`],originServerName:p(e[`tunnel-config-origin-request-origin-server-name`],`tunnel-config-origin-request-origin-server-name`,`text`),proxyType:p(e[`tunnel-config-origin-request-proxy-type`],`tunnel-config-origin-request-proxy-type`,`text`),tcpKeepAlive:e[`tunnel-config-origin-request-tcp-keep-alive`],tlsTimeout:e[`tunnel-config-origin-request-tls-timeout`]}}}):d(e.body)});return}let t=await i(e),n=e.local?r:await o();if(e.accountId=n,e.body){let r=d(e.body),i=await l(`Updating`,async()=>t.send(b,{body:r,account_id:n,tunnel_id:e[`tunnel-id`]}));s(i,{successLabel:`Updated`});return}let u=f({config:{originRequest:{access:{audTag:e[`tunnel-config-origin-request-access-aud-tag`],required:e[`tunnel-config-origin-request-access-required`],teamName:p(e[`tunnel-config-origin-request-access-team-name`],`tunnel-config-origin-request-access-team-name`,`text`)},caPool:p(e[`tunnel-config-origin-request-ca-pool`],`tunnel-config-origin-request-ca-pool`,`text`),connectTimeout:e[`tunnel-config-origin-request-connect-timeout`],disableChunkedEncoding:e[`tunnel-config-origin-request-disable-chunked-encoding`],http2Origin:e[`tunnel-config-origin-request-http2origin`],httpHostHeader:p(e[`tunnel-config-origin-request-http-host-header`],`tunnel-config-origin-request-http-host-header`,`text`),keepAliveConnections:e[`tunnel-config-origin-request-keep-alive-connections`],keepAliveTimeout:e[`tunnel-config-origin-request-keep-alive-timeout`],matchSNItoHost:e[`tunnel-config-origin-request-match-snito-host`],noHappyEyeballs:e[`tunnel-config-origin-request-no-happy-eyeballs`],noTLSVerify:e[`tunnel-config-origin-request-no-tlsverify`],originServerName:p(e[`tunnel-config-origin-request-origin-server-name`],`tunnel-config-origin-request-origin-server-name`,`text`),proxyType:p(e[`tunnel-config-origin-request-proxy-type`],`tunnel-config-origin-request-proxy-type`,`text`),tcpKeepAlive:e[`tunnel-config-origin-request-tcp-keep-alive`],tlsTimeout:e[`tunnel-config-origin-request-tls-timeout`]}}}),m=await l(`Updating`,async()=>t.send(b,{body:u,account_id:n,tunnel_id:e[`tunnel-id`]}));s(m,{successLabel:`Updated`})})},C={command:`config`,describe:`Operations for config`,builder:e=>e.command(ee).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var w={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/connections`,query:[`client_id`]};function T(e){return e.usage(`$0 tunnels connections cleanup <tunnel-id>
|
|
8
8
|
|
|
9
9
|
Removes a connection (aka Cloudflare Tunnel Connector) from a Cloudflare Tunnel independently of its current state. If no connector id (client_id) is provided all connectors will be removed. We recommend running this command after rotating tokens.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`client-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`}).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 E={command:`cleanup <tunnel-id>`,describe:`Clean up Cloudflare Tunnel connections`,builder:T,handler:async e=>u({command:`tunnels connections cleanup`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={client_id:e[`client-id`]};if(e.dryRun){let n=await a();c({command:`cf tunnels connections cleanup`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/connections`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},query:t,bodyKind:`none`});return}let n=await i(e),u=e.local?r:await o();if(e.accountId=u,!await h({force:!!e.force,message:`This operation removes Cloudflare Tunnel connections.`})){process.stderr.write(`Aborted.
|
|
10
10
|
`);return}let d=await l(`Deleting`,async()=>n.send(w,{account_id:u,tunnel_id:e[`tunnel-id`],...t}));s(d,{successLabel:`Deleted`})})};var D={method:`GET`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/connections`};function O(e){return e.usage(`$0 tunnels connections list
|
|
@@ -26,4 +26,4 @@ Lists and filters all types of Tunnels in an account.`).option(`name`,{type:`str
|
|
|
26
26
|
|
|
27
27
|
Creates a short-lived management token for the requested Tunnel management resources, such as streaming logs. Treat the token as a secret.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`resources`,{type:`string`,array:!0,description:`The resources field`}).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:`create <tunnel-id>`,describe:`Get a Cloudflare Tunnel management token`,builder:Y,handler:async e=>u({command:`tunnels management-token create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels management-token create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/management`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({resources:e.resources}):d(e.body)});return}let t=await i(e),n=e.local?r:await o();if(e.accountId=n,e.body){let r=d(e.body),i=await l(`Creating`,async()=>t.send(g,{body:r,account_id:n,tunnel_id:e[`tunnel-id`]}));s(i,{successLabel:`Created`});return}if(e.resources===void 0)throw Error(`--resources is required (or pass --body with this field set).`);let u=f({resources:e.resources}),p=await l(`Creating`,async()=>t.send(g,{body:u,account_id:n,tunnel_id:e[`tunnel-id`]}));s(p,{successLabel:`Created`})})},Z={command:`management-token`,describe:`Operations for management-token`,builder:e=>e.command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Q(e){return e.usage(`$0 tunnels token get <tunnel-id>
|
|
28
28
|
|
|
29
|
-
Retrieves the token used to run cloudflared and associate it with a specific Cloudflare Tunnel. Treat the token as a secret.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get <tunnel-id>`,describe:`Get a Cloudflare Tunnel token`,builder:Q,handler:async e=>u({command:`tunnels token get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/token`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();e.accountId=n;let u=await l(`Loading`,async()=>t.send(_,{account_id:n,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Loaded`})})},re={command:`token`,describe:`Operations for token`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ie=e(`diag`,`Create a diagnostic report from a local cloudflared instance.`,()=>import(`./command-Bgb-3yPg.mjs`),{command:`tunnels diag`,recordArgs:!1}),ae=e(`login`,`Authorize cloudflared and download an origin certificate for locally managed tunnels.`,()=>import(`./command-
|
|
29
|
+
Retrieves the token used to run cloudflared and associate it with a specific Cloudflare Tunnel. Treat the token as a secret.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get <tunnel-id>`,describe:`Get a Cloudflare Tunnel token`,builder:Q,handler:async e=>u({command:`tunnels token get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/token`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();e.accountId=n;let u=await l(`Loading`,async()=>t.send(_,{account_id:n,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Loaded`})})},re={command:`token`,describe:`Operations for token`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ie=e(`diag`,`Create a diagnostic report from a local cloudflared instance.`,()=>import(`./command-Bgb-3yPg.mjs`),{command:`tunnels diag`,recordArgs:!1}),ae=e(`login`,`Authorize cloudflared and download an origin certificate for locally managed tunnels.`,()=>import(`./command-NoxvOARP.mjs`),{command:`tunnels login`,recordArgs:!1}),oe=e(`quick-start <url>`,`Expose a local URL with a temporary trycloudflare.com tunnel. The tunnel remains active until cf exits.`,()=>import(`./command-DZfKHiru.mjs`),{command:`tunnels quick-start`,recordArgs:!1}),$=e(`ready`,`Check the /ready endpoint exposed by a local cloudflared instance.`,()=>import(`./command-C6w1OdoC.mjs`),{command:`tunnels ready`,recordArgs:!1}),se=e(`run [tunnel]`,`Run a named Cloudflare Tunnel using the cf-managed cloudflared binary.`,()=>import(`./command-BbsPxJBT.mjs`),{command:`tunnels run`,recordArgs:!1}),ce=e(`tail [tunnel-id]`,`Stream logs from a remote cloudflared instance.`,()=>import(`./command-CYyfigfC.mjs`),{command:`tunnels tail`,recordArgs:!1});const le={command:`tunnels`,describe:`tunnels`,builder:e=>e.command(L).command(te).command(n(ie,`preview`)).command(H).command(G).command(J).command(n(ae,`preview`)).command(n(oe,`preview`)).command(n($,`preview`)).command(n(se,`preview`)).command(n(ce,`preview`)).command(C).command(A).command(P).command(Z).command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{le as default};
|
|
@@ -1,17 +1,17 @@
|
|
|
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}/challenges/widgets`,query:[`page`,`per_page`,`order`,`direction`,`filter`],body:`json`};function g(e){return e.usage(`$0 turnstile widgets create
|
|
3
3
|
|
|
4
4
|
Creates a Turnstile widget for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`order`,{type:`string`,description:`Field to order widgets by.`,choices:[`id`,`sitekey`,`name`,`created_on`,`modified_on`]}).option(`direction`,{type:`string`,description:`Direction to order widgets.`,choices:[`asc`,`desc`]}).option(`filter`,{type:`string`,description:"Filter widgets by field. The `name` field uses case-insensitive\nsubstring matching; `sitekey` uses exact matching.\nFormat: `field:value`\n\nSupported fields:\n- `name` - Filter by widget name (e.g., `filter=name:login-form`)\n- `sitekey` - Filter by sitekey (e.g., `filter=sitekey:0x4AAA`)\n\nReturns 400 Bad Request if the field is unsupported or format is invalid.\nAn empty filter value returns all results."}).option(`bot-fight-mode`,{type:`boolean`,description:`If bot_fight_mode is set to \`true\`, Cloudflare issues computationally
|
|
5
5
|
expensive challenges in response to malicious bots (ENT only).
|
|
6
6
|
`}).option(`clearance-level`,{type:`string`,description:`If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance,
|
|
7
7
|
this setting can determine the clearance level to be set
|
|
8
8
|
`,choices:[`no_clearance`,`jschallenge`,`managed`,`interactive`]}).coerce(`clearance-level`,e=>d(e,`clearance-level`,`text`)).option(`domains`,{type:`string`,array:!0,description:`The domains field`}).option(`ephemeral-id`,{type:`boolean`,description:`Return the Ephemeral ID in /siteverify (ENT only).
|
|
9
|
-
`}).option(`widget-mode`,{type:`string`,description:`Widget
|
|
9
|
+
`}).option(`widget-mode`,{type:`string`,description:`Widget mode`,choices:[`non-interactive`,`invisible`,`managed`]}).coerce(`widget-mode`,e=>d(e,`widget-mode`,`text`)).option(`name`,{type:`string`,description:`Human readable widget name. Not unique. Cloudflare suggests that you
|
|
10
10
|
set this to a meaningful string to make it easier to identify your
|
|
11
11
|
widget, and where it is used.
|
|
12
12
|
`}).option(`offlabel`,{type:`boolean`,description:`Do not show any Cloudflare branding on the widget (ENT only).
|
|
13
13
|
`}).option(`region`,{type:`string`,description:`Region where this widget can be used. This cannot be changed after creation.
|
|
14
|
-
`,choices:[`world`,`china`],default:`world`}).coerce(`region`,e=>d(e,`region`,`text`)).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 _={command:`create`,describe:`Create a Turnstile Widget`,builder:g,handler:async e=>c({command:`turnstile widgets create`,classification:{safeFlags:[`order`,`direction`,`bot-fight-mode`,`clearance-level`,`ephemeral-id`,`widget-mode`,`offlabel`,`region`,`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,filter:e.filter};if(e.dryRun){let t=await r();o({command:`cf turnstile widgets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/challenges/widgets`,pathParams:{},query:c,bodyKind:`json`,body:e.body===void 0?u({bot_fight_mode:e[`bot-fight-mode`],clearance_level:e[`clearance-level`],domains:e.domains,ephemeral_id:e[`ephemeral-id`],mode:e[`widget-mode`],name:d(e.name,`name`,`text`),offlabel:e.offlabel,region:e.region}):l(e.body)});return}let m=await n(e),g=e.local?t:await i();if(e.accountId=g,e.body){let t=l(e.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await s(`Creating`,async()=>m.send(h,{body:t,account_id:g,...c}));a(n,{successLabel:`Created`});return}if(e.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);e[`widget-mode`]===void 0&&(e[`widget-mode`]=await p(`widget-mode`,`Widget
|
|
14
|
+
`,choices:[`world`,`china`],default:`world`}).coerce(`region`,e=>d(e,`region`,`text`)).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 _={command:`create`,describe:`Create a Turnstile Widget`,builder:g,handler:async e=>c({command:`turnstile widgets create`,classification:{safeFlags:[`order`,`direction`,`bot-fight-mode`,`clearance-level`,`ephemeral-id`,`widget-mode`,`offlabel`,`region`,`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,filter:e.filter};if(e.dryRun){let t=await r();o({command:`cf turnstile widgets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/challenges/widgets`,pathParams:{},query:c,bodyKind:`json`,body:e.body===void 0?u({bot_fight_mode:e[`bot-fight-mode`],clearance_level:e[`clearance-level`],domains:e.domains,ephemeral_id:e[`ephemeral-id`],mode:e[`widget-mode`],name:d(e.name,`name`,`text`),offlabel:e.offlabel,region:e.region}):l(e.body)});return}let m=await n(e),g=e.local?t:await i();if(e.accountId=g,e.body){let t=l(e.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await s(`Creating`,async()=>m.send(h,{body:t,account_id:g,...c}));a(n,{successLabel:`Created`});return}if(e.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);e[`widget-mode`]===void 0&&(e[`widget-mode`]=await p(`widget-mode`,`Widget mode`,[`non-interactive`,`invisible`,`managed`])),e.name===void 0&&(e.name=await f(`name`,`Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. `));let _=u({bot_fight_mode:e[`bot-fight-mode`],clearance_level:e[`clearance-level`],domains:e.domains,ephemeral_id:e[`ephemeral-id`],mode:e[`widget-mode`],name:d(e.name,`name`,`text`),offlabel:e.offlabel,region:e.region});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let v=await s(`Creating`,async()=>m.send(h,{body:_,account_id:g,...c}));a(v,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/challenges/widgets/${t.sitekey}`};function y(e){return e.usage(`$0 turnstile widgets delete <sitekey>
|
|
15
15
|
|
|
16
16
|
Deletes a Turnstile widget from an account.`).positional(`sitekey`,{type:`string`,description:`Unique identifier for a Turnstile widget.`,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 b={command:`delete <sitekey>`,describe:`Delete a Turnstile Widget`,builder:y,handler:async e=>c({command:`turnstile widgets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf turnstile widgets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/challenges/widgets/${e.sitekey==null?`<sitekey>`:encodeURIComponent(String(e.sitekey))}`,pathParams:{sitekey:String(e.sitekey??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force})){process.stderr.write(`Aborted.
|
|
17
17
|
`);return}let u=await s(`Deleting`,async()=>c.send(v,{account_id:l,sitekey:e.sitekey}));a(u,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/accounts/${t.account_id}/challenges/widgets/${t.sitekey}`};function S(e){return e.usage(`$0 turnstile widgets get <sitekey>
|
|
@@ -25,9 +25,9 @@ expensive challenges in response to malicious bots (ENT only).
|
|
|
25
25
|
`}).option(`clearance-level`,{type:`string`,description:`If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance,
|
|
26
26
|
this setting can determine the clearance level to be set
|
|
27
27
|
`,choices:[`no_clearance`,`jschallenge`,`managed`,`interactive`]}).coerce(`clearance-level`,e=>d(e,`clearance-level`,`text`)).option(`domains`,{type:`string`,array:!0,description:`The domains field`}).option(`ephemeral-id`,{type:`boolean`,description:`Return the Ephemeral ID in /siteverify (ENT only).
|
|
28
|
-
`}).option(`widget-mode`,{type:`string`,description:`Widget
|
|
28
|
+
`}).option(`widget-mode`,{type:`string`,description:`Widget mode`,choices:[`non-interactive`,`invisible`,`managed`]}).coerce(`widget-mode`,e=>d(e,`widget-mode`,`text`)).option(`name`,{type:`string`,description:`Human readable widget name. Not unique. Cloudflare suggests that you
|
|
29
29
|
set this to a meaningful string to make it easier to identify your
|
|
30
30
|
widget, and where it is used.
|
|
31
31
|
`}).option(`offlabel`,{type:`boolean`,description:`Do not show any Cloudflare branding on the widget (ENT only).
|
|
32
32
|
`}).option(`region`,{type:`string`,description:`Region where this widget can be used. This cannot be changed after creation.
|
|
33
|
-
`,choices:[`world`,`china`]}).coerce(`region`,e=>d(e,`region`,`text`)).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 <sitekey>`,describe:`Update a Turnstile Widget`,builder:j,handler:async e=>c({command:`turnstile widgets update`,classification:{safeFlags:[`bot-fight-mode`,`clearance-level`,`ephemeral-id`,`widget-mode`,`offlabel`,`region`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf turnstile widgets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/challenges/widgets/${e.sitekey==null?`<sitekey>`:encodeURIComponent(String(e.sitekey))}`,pathParams:{sitekey:String(e.sitekey??``)},bodyKind:`json`,body:e.body===void 0?u({bot_fight_mode:e[`bot-fight-mode`],clearance_level:e[`clearance-level`],domains:e.domains,ephemeral_id:e[`ephemeral-id`],mode:e[`widget-mode`],name:d(e.name,`name`,`text`),offlabel:e.offlabel,region:e.region}):l(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(A,{body:t,account_id:m,sitekey:e.sitekey}));a(n,{successLabel:`Updated`});return}if(e.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);e[`widget-mode`]===void 0&&(e[`widget-mode`]=await p(`widget-mode`,`Widget
|
|
33
|
+
`,choices:[`world`,`china`]}).coerce(`region`,e=>d(e,`region`,`text`)).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 <sitekey>`,describe:`Update a Turnstile Widget`,builder:j,handler:async e=>c({command:`turnstile widgets update`,classification:{safeFlags:[`bot-fight-mode`,`clearance-level`,`ephemeral-id`,`widget-mode`,`offlabel`,`region`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf turnstile widgets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/challenges/widgets/${e.sitekey==null?`<sitekey>`:encodeURIComponent(String(e.sitekey))}`,pathParams:{sitekey:String(e.sitekey??``)},bodyKind:`json`,body:e.body===void 0?u({bot_fight_mode:e[`bot-fight-mode`],clearance_level:e[`clearance-level`],domains:e.domains,ephemeral_id:e[`ephemeral-id`],mode:e[`widget-mode`],name:d(e.name,`name`,`text`),offlabel:e.offlabel,region:e.region}):l(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(A,{body:t,account_id:m,sitekey:e.sitekey}));a(n,{successLabel:`Updated`});return}if(e.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);e[`widget-mode`]===void 0&&(e[`widget-mode`]=await p(`widget-mode`,`Widget mode`,[`non-interactive`,`invisible`,`managed`])),e.name===void 0&&(e.name=await f(`name`,`Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. `));let h=u({bot_fight_mode:e[`bot-fight-mode`],clearance_level:e[`clearance-level`],domains:e.domains,ephemeral_id:e[`ephemeral-id`],mode:e[`widget-mode`],name:d(e.name,`name`,`text`),offlabel:e.offlabel,region:e.region}),g=await s(`Updating`,async()=>c.send(A,{body:h,account_id:m,sitekey:e.sitekey}));a(g,{successLabel:`Updated`})})},N={command:`widgets`,describe:`Turnstile widget configurations — site keys, secret rotation, and challenge mode settings`,builder:e=>e.command(_).command(b).command(C).command(E).command(k).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`turnstile`,describe:`CAPTCHA-free bot verification widgets that protect forms and APIs without degrading user experience`,builder:e=>e.command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{P as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e}from"./update-check-
|
|
2
|
+
import{i as e}from"./update-check-wvjOsnGK.mjs";await e();export{};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e,n as t}from"./source-mXUcrTVw.mjs";import{n}from"./version-
|
|
2
|
+
import{i as e,n as t}from"./source-mXUcrTVw.mjs";import{n}from"./version-B2RUUqGT.mjs";import{i as r}from"./cf-Bq4pA4n6.mjs";import{r as i,t as a}from"./gt-3bcLGJ7V.mjs";import{closeSync as o,mkdirSync as s,openSync as c,readFileSync as l,renameSync as u,statSync as d,unlinkSync as f,writeFileSync as p}from"node:fs";import{dirname as m,join as h}from"node:path";import{fileURLToPath as g}from"node:url";import{spawn as _}from"node:child_process";var v=/* @__PURE__ */ t(((e,t)=>{let n=i();t.exports=(e,t)=>new n(e,t).major})),y=/* @__PURE__ */ t(((e,t)=>{let n=i();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),b=/* @__PURE__ */ t(((e,t)=>{let n=y();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),x=/* @__PURE__ */ t(((e,t)=>{let n=y();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),S=/* @__PURE__ */ e(a(),1),C=/* @__PURE__ */ e(v(),1),w=/* @__PURE__ */ e(b(),1),T=/* @__PURE__ */ e(x(),1);const E=864e5;function D(e){return(0,w.default)(e)?.includes(`beta`)?`beta`:`latest`}function O(e=n){return h(r(),`cache`,`update-check-${D(e)}.json`)}function k(e=O()){try{let t=JSON.parse(l(e,`utf8`));if(typeof t!=`object`||!t||Array.isArray(t))return{};let n=t;return{lastAttemptedAt:typeof n.lastAttemptedAt==`number`&&Number.isFinite(n.lastAttemptedAt)?n.lastAttemptedAt:void 0,lastSuccessfulAt:typeof n.lastSuccessfulAt==`number`&&Number.isFinite(n.lastSuccessfulAt)?n.lastSuccessfulAt:void 0,latestVersion:typeof n.latestVersion==`string`&&(0,T.default)(n.latestVersion)?n.latestVersion:void 0}}catch{return{}}}function A(e,t=O()){let n=`${t}.${process.pid}.tmp`;try{return s(m(t),{recursive:!0}),p(n,`${JSON.stringify(e)}\n`,{encoding:`utf8`,mode:384}),u(n,t),!0}catch{try{f(n)}catch{}return!1}}function j(e,t,n){let r=`${e}.lock`,i;try{s(m(e),{recursive:!0});try{i=c(r,`wx`,384)}catch{try{if(t-d(r).mtimeMs<=5e3)return;f(r),i=c(r,`wx`,384)}catch{return}}return n()}catch{return}finally{if(i!==void 0)try{o(i),f(r)}catch{}}}function M(e,t){if(!(0,T.default)(e)||!t.latestVersion||!(0,S.default)(t.latestVersion,e))return;let n=(0,C.default)(t.latestVersion)>(0,C.default)(e);return{latestVersion:t.latestVersion,isMajor:n}}function N(e,t=O(e)){return M(e,k(t))}function P(){let e=import.meta.url.endsWith(`.ts`),t=new URL(e?`../update-check-worker.ts`:`./update-check-worker.mjs`,import.meta.url),n=e?[...process.execArgv,g(t)]:[g(t)];_(process.execPath,n,{detached:!0,stdio:`ignore`,windowsHide:!0}).unref()}function F(e={}){let t=e.cachePath??O(e.currentVersion??n),r=e.now??Date.now();if(j(t,r,()=>{let e=k(t);return e.lastAttemptedAt!==void 0&&r-e.lastAttemptedAt<864e5?!1:A({...e,lastAttemptedAt:r},t)}))try{(e.spawnWorker??P)()}catch{}}async function I(e,t,r,i){if(!(0,T.default)(t))return{status:`failed`};let a=await i(`https://registry.npmjs.org/${encodeURIComponent(e)}/${r}`,{headers:{accept:`application/json`,"user-agent":`cf-cli/${n}`},signal:AbortSignal.timeout(3e3)});if(!a.ok)return{status:`failed`};let o=await a.json();if(typeof o!=`object`||!o||Array.isArray(o))return{status:`failed`};let s=o;return s.name!==e||typeof s.version!=`string`||!(0,T.default)(s.version)?{status:`failed`}:(0,S.default)(s.version,t)?{status:`update-available`,latest:s.version}:{status:`up-to-date`}}async function L(e={}){let t=e.currentVersion??n,r=e.cachePath??O(t),i=e.now??Date.now();try{let n=await(e.check??((t,n,r)=>I(t,n,r,e.fetch??globalThis.fetch)))(`cf`,t,`latest`);if(n.status===`failed`)return;let a=n.status===`update-available`?n.latest:t;if(!(0,T.default)(a))return;A({...k(r),latestVersion:a,lastSuccessfulAt:i},r)}catch{}}export{L as i,N as n,F as r,E as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
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";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/brand-protection/url-info`};function u(e){return e.usage(`$0 url-info get
|
|
3
3
|
|
|
4
4
|
Return submitted URLs based on ID`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Read submitted URLs by ID`,builder:u,handler:async e=>c({command:`url-info get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf url-info get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/brand-protection/url-info`,pathParams:{},bodyKind:`none`});return}let c=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>c.send(l,{account_id:u}));a(d,{successLabel:`Loaded`})})},f={command:`url-info`,describe:`url-info`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f 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";import{i as u,n as d}from"./prompt-C0hKSr-R.mjs";var f={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/url_normalization`,response:!1};function p(e){return e.usage(`$0 url-normalization delete
|
|
3
3
|
|
|
4
4
|
Deletes the URL Normalization settings.`).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 m={command:`delete`,describe:`Delete URL Normalization settings`,builder:p,handler:async e=>o({command:`url-normalization delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf url-normalization delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/url_normalization`,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});if(e.zoneId=s,!await d({force:!!e.force})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}let c=await a(`Deleting`,async()=>o.send(f,{zone_id:s}));r(c,{successLabel:`Deleted`})})};var h={method:`GET`,path:t=>e`/zones/${t.zone_id}/url_normalization`};function g(e){return e.usage(`$0 url-normalization get
|
|
@@ -1,16 +1,16 @@
|
|
|
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,r as u,t as d}from"./body-parser-DnBfDdx3.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p}from"./prompt-C0hKSr-R.mjs";import{n as m,t as h}from"./raw-fetch-CEOuoKl9.mjs";function g(e){return e.usage("$0 url-scanner responses get <response-id>\n\nReturns the raw response of the network request. Find the `response_id` in the `data.requests.response.hash`.").positional(`response-id`,{type:`string`,description:`Response hash.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get <response-id>`,describe:`Get raw response`,builder:g,handler:async e=>c({command:`url-scanner responses get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf url-scanner responses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/urlscanner/v2/responses/${e[`response-id`]==null?`<response-id>`:encodeURIComponent(String(e[`response-id`]))}`,pathParams:{"response-id":String(e[`response-id`]??``)},bodyKind:`none`});return}await n(e);let a=e.local?t:await i();e.accountId=a;let c=await s(`Loading`,async()=>h(`/accounts/${a}/urlscanner/v2/responses/${encodeURIComponent(String(e[`response-id`]))}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));m(c.toString(`utf-8`))})},v={command:`responses`,describe:`Raw HTTP response data captured during URL scans`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/urlscanner/v2/bulk`,body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function b(e){return e.usage(`$0 url-scanner scans bulk-create
|
|
3
3
|
|
|
4
|
-
Submit URLs to scan. Check limits at https://developers.cloudflare.com/security-center/investigate/scan-limits/ and take into account scans submitted in bulk have lower priority and may take longer to finish.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of urls to scan (up to a 100).`})}const
|
|
4
|
+
Submit URLs to scan. Check limits at https://developers.cloudflare.com/security-center/investigate/scan-limits/ and take into account scans submitted in bulk have lower priority and may take longer to finish.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of urls to scan (up to a 100).`})}const x={command:`bulk-create`,describe:`Bulk create URL Scans`,builder:b,handler:async e=>c({command:`url-scanner scans bulk-create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf url-scanner scans bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/urlscanner/v2/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(y,{body:t,account_id:u}));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 S={method:`POST`,path:t=>e`/accounts/${t.account_id}/urlscanner/v2/scan`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`,429:`TooManyRequestsError`}};function C(e){return e.usage(`$0 url-scanner scans create
|
|
5
5
|
|
|
6
|
-
Submit a URL to scan. Check limits at https://developers.cloudflare.com/security-center/investigate/scan-limits/.`).option(`agent-readiness`,{type:`boolean`,description:`Enable agent readiness checks.`}).option(`country`,{type:`string`,description:`Country to geo egress from`,choices:/* @__PURE__ */ `AF.AL.DZ.AD.AO.AG.AR.AM.AU.AT.AZ.BH.BD.BB.BY.BE.BZ.BJ.BM.BT.BO.BA.BW.BR.BN.BG.BF.BI.KH.CM.CA.CV.KY.CF.TD.CL.CN.CO.KM.CG.CR.CI.HR.CU.CY.CZ.CD.DK.DJ.DM.DO.EC.EG.SV.GQ.ER.EE.SZ.ET.FJ.FI.FR.GA.GE.DE.GH.GR.GL.GD.GT.GN.GW.GY.HT.HN.HU.IS.IN.ID.IR.IQ.IE.IL.IT.JM.JP.JO.KZ.KE.KI.KW.KG.LA.LV.LB.LS.LR.LY.LI.LT.LU.MO.MG.MW.MY.MV.ML.MR.MU.MX.FM.MD.MC.MN.MS.MA.MZ.MM.NA.NR.NP.NL.NZ.NI.NE.NG.KP.MK.NO.OM.PK.PS.PA.PG.PY.PE.PH.PL.PT.QA.RO.RU.RW.SH.KN.LC.VC.WS.SM.ST.SA.SN.RS.SC.SL.SK.SI.SB.SO.ZA.KR.SS.ES.LK.SD.SR.SE.CH.SY.TW.TJ.TZ.TH.BS.GM.TL.TG.TO.TT.TN.TR.TM.UG.UA.AE.GB.US.UY.UZ.VU.VE.VN.YE.ZM.ZW`.split(`.`)}).coerce(`country`,e=>
|
|
6
|
+
Submit a URL to scan. Check limits at https://developers.cloudflare.com/security-center/investigate/scan-limits/.`).option(`agent-readiness`,{type:`boolean`,description:`Enable agent readiness checks.`}).option(`country`,{type:`string`,description:`Country to geo egress from`,choices:/* @__PURE__ */ `AF.AL.DZ.AD.AO.AG.AR.AM.AU.AT.AZ.BH.BD.BB.BY.BE.BZ.BJ.BM.BT.BO.BA.BW.BR.BN.BG.BF.BI.KH.CM.CA.CV.KY.CF.TD.CL.CN.CO.KM.CG.CR.CI.HR.CU.CY.CZ.CD.DK.DJ.DM.DO.EC.EG.SV.GQ.ER.EE.SZ.ET.FJ.FI.FR.GA.GE.DE.GH.GR.GL.GD.GT.GN.GW.GY.HT.HN.HU.IS.IN.ID.IR.IQ.IE.IL.IT.JM.JP.JO.KZ.KE.KI.KW.KG.LA.LV.LB.LS.LR.LY.LI.LT.LU.MO.MG.MW.MY.MV.ML.MR.MU.MX.FM.MD.MC.MN.MS.MA.MZ.MM.NA.NR.NP.NL.NZ.NI.NE.NG.KP.MK.NO.OM.PK.PS.PA.PG.PY.PE.PH.PL.PT.QA.RO.RU.RW.SH.KN.LC.VC.WS.SM.ST.SA.SN.RS.SC.SL.SK.SI.SB.SO.ZA.KR.SS.ES.LK.SD.SR.SE.CH.SY.TW.TJ.TZ.TH.BS.GM.TL.TG.TO.TT.TN.TR.TM.UG.UA.AE.GB.US.UY.UZ.VU.VE.VN.YE.ZM.ZW`.split(`.`)}).coerce(`country`,e=>f(e,`country`,`text`)).option(`custom-headers`,{type:`string`,description:`Set custom headers. Provide as a JSON object or @path/to/file.json.`}).option(`customagent`,{type:`string`,description:`The customagent field`}).option(`referer`,{type:`string`,description:`The referer field`}).option(`screenshots-resolutions`,{type:`string`,array:!0,description:`Take multiple screenshots targeting different device types.`}).option(`url`,{type:`string`,description:`The url field`}).option(`visibility`,{type:`string`,description:"The option `Public` means it will be included in listings like recent scans and search results. `Unlisted` means it will not be included in the aforementioned listings, users will need to have the scan's ID to access it. A a scan will be automatically marked as unlisted if it fails, if it contains potential PII or other sensitive material.",choices:[`Public`,`Unlisted`],default:`Public`}).coerce(`visibility`,e=>f(e,`visibility`,`text`)).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 w={command:`create`,describe:`Create URL Scan`,builder:C,handler:async e=>c({command:`url-scanner scans create`,classification:{safeFlags:[`agent-readiness`,`country`,`visibility`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf url-scanner scans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/urlscanner/v2/scan`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({agentReadiness:e[`agent-readiness`],country:e.country,customHeaders:u(e[`custom-headers`],`custom-headers`),customagent:f(e.customagent,`customagent`,`text`),referer:f(e.referer,`referer`,`text`),screenshotsResolutions:e[`screenshots-resolutions`],url:f(e.url,`url`,`text`),visibility:e.visibility},[[`customHeaders`]]):l(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(S,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}e.url===void 0&&(e.url=await p(`url`,`The url field`));let h=d({agentReadiness:e[`agent-readiness`],country:e.country,customHeaders:u(e[`custom-headers`],`custom-headers`),customagent:f(e.customagent,`customagent`,`text`),referer:f(e.referer,`referer`,`text`),screenshotsResolutions:e[`screenshots-resolutions`],url:f(e.url,`url`,`text`),visibility:e.visibility},[[`customHeaders`]]),g=await s(`Creating`,async()=>c.send(S,{body:h,account_id:m}));a(g,{successLabel:`Created`})})};function T(e){return e.usage(`$0 url-scanner scans dom <scan-id>
|
|
7
7
|
|
|
8
|
-
Returns a plain text response, with the scan's DOM content as rendered by Chrome.`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
8
|
+
Returns a plain text response, with the scan's DOM content as rendered by Chrome.`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`dom <scan-id>`,describe:`Get URL scan's DOM`,builder:T,handler:async e=>c({command:`url-scanner scans dom`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf url-scanner scans dom`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/urlscanner/v2/dom/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}await n(e);let a=e.local?t:await i();e.accountId=a;let c=await s(`Loading`,async()=>h(`/accounts/${a}/urlscanner/v2/dom/${encodeURIComponent(String(e[`scan-id`]))}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));m(c.toString(`utf-8`))})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/urlscanner/v2/result/${t.scan_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function O(e){return e.usage(`$0 url-scanner scans get <scan-id>
|
|
9
9
|
|
|
10
|
-
Get URL scan by uuid`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
10
|
+
Get URL scan by uuid`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <scan-id>`,describe:`Get URL scan`,builder:O,handler:async e=>c({command:`url-scanner scans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf url-scanner scans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/urlscanner/v2/result/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}`,pathParams:{"scan-id":String(e[`scan-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(D,{account_id:l,scan_id:e[`scan-id`]}));a(u,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/urlscanner/v2/har/${t.scan_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function j(e){return e.usage(`$0 url-scanner scans har <scan-id>
|
|
11
11
|
|
|
12
|
-
Get a URL scan's HAR file. See HAR spec at http://www.softwareishard.com/blog/har-12-spec/.`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
12
|
+
Get a URL scan's HAR file. See HAR spec at http://www.softwareishard.com/blog/har-12-spec/.`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`har <scan-id>`,describe:`Get URL scan's HAR`,builder:j,handler:async e=>c({command:`url-scanner scans har`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf url-scanner scans har`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/urlscanner/v2/har/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}`,pathParams:{"scan-id":String(e[`scan-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(A,{account_id:l,scan_id:e[`scan-id`]}));a(u,{successLabel:`Loaded`})})};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/urlscanner/v2/search`,query:[`size`,`q`],errors:{400:`BadRequestError`}};function P(e){return e.usage(`$0 url-scanner scans list
|
|
13
13
|
|
|
14
|
-
Use a subset of ElasticSearch Query syntax to filter scans. Some example queries:<br/> <br/>- 'path:"/bundles/jquery.js"': Searches for scans who requested resources with the given path.<br/>- 'page.asn:AS24940 AND hash:xxx': Websites hosted in AS24940 where a resource with the given hash was downloaded.<br/>- 'page.domain:microsoft* AND verdicts.malicious:true AND NOT page.domain:microsoft.com': malicious scans whose hostname starts with "microsoft".<br/>- 'apikey:me AND date:[2025-01 TO 2025-02]': my scans from 2025 January to 2025 February.`).option(`size`,{type:`number`,description:`Limit the number of objects in the response.`}).option(`query`,{type:`string`,description:`Filter scans`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
14
|
+
Use a subset of ElasticSearch Query syntax to filter scans. Some example queries:<br/> <br/>- 'path:"/bundles/jquery.js"': Searches for scans who requested resources with the given path.<br/>- 'page.asn:AS24940 AND hash:xxx': Websites hosted in AS24940 where a resource with the given hash was downloaded.<br/>- 'page.domain:microsoft* AND verdicts.malicious:true AND NOT page.domain:microsoft.com': malicious scans whose hostname starts with "microsoft".<br/>- 'apikey:me AND date:[2025-01 TO 2025-02]': my scans from 2025 January to 2025 February.`).option(`size`,{type:`number`,description:`Limit the number of objects in the response.`}).option(`query`,{type:`string`,description:`Filter scans`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`list`,describe:`Search URL scans`,builder:P,handler:async e=>c({command:`url-scanner scans list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={size:e.size,q:e.query};if(e.dryRun){let e=await r();o({command:`cf url-scanner scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/urlscanner/v2/search`,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(N,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 url-scanner scans screenshot <scan-id>
|
|
15
15
|
|
|
16
|
-
Get scan's screenshot by resolution (desktop/mobile/tablet).`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`resolution`,{type:`string`,description:`Target device type.`,choices:[`desktop`,`mobile`,`tablet`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const
|
|
16
|
+
Get scan's screenshot by resolution (desktop/mobile/tablet).`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`resolution`,{type:`string`,description:`Target device type.`,choices:[`desktop`,`mobile`,`tablet`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const L={command:`screenshot <scan-id>`,describe:`Get screenshot`,builder:I,handler:async e=>c({command:`url-scanner scans screenshot`,classification:{safeFlags:[`resolution`,`dry-run`,`text`]}},e,async()=>{let a={resolution:e.resolution};if(e.dryRun){let t=await r();o({command:`cf url-scanner scans screenshot`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/urlscanner/v2/screenshots/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}.png`,pathParams:{"scan-id":String(e[`scan-id`]??``)},query:a,bodyKind:`none`});return}await n(e);let c=e.local?t:await i();e.accountId=c;let l=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await s(`Loading`,async()=>h(`/accounts/${c}/urlscanner/v2/screenshots/${encodeURIComponent(String(e[`scan-id`]))}.png${l?`?`+l:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));m(e.text===!0?u.toString(`utf-8`):u)})},R={command:`scans`,describe:`URL scan requests and results — submit URLs for analysis and retrieve threat verdicts`,builder:e=>e.command(x).command(w).command(E).command(k).command(M).command(F).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},z={command:`url-scanner`,describe:`Scan URLs for phishing, malware, and other threats — submit scans and retrieve detailed results`,builder:e=>e.command(v).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{z as default};
|