cf 1.0.0-beta.1 → 1.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/_meta/commands.json +11448 -13819
- package/dist/_meta/hand-written-commands.json +579 -41
- package/dist/_meta/schemas.json +14496 -16450
- package/dist/abuse-reports-BhSTEz7h.mjs +24 -0
- package/dist/access-D4DN4XZF.mjs +2 -0
- package/dist/{account-tags-DAf-hq1m.mjs → account-tags-BWEIZLID.mjs} +5 -5
- package/dist/{accounts-BDIKjiG2.mjs → accounts-ZQvIqGJz.mjs} +66 -60
- package/dist/{acm-D-q1FVWJ.mjs → acm-OQqE8FMc.mjs} +3 -3
- package/dist/{addressing-0w2U1NEy.mjs → addressing-DCFm17JQ.mjs} +50 -50
- package/dist/agent-context-GRiQ4zRU.mjs +2 -0
- package/dist/{agent-memory-Drumm4qd.mjs → agent-memory-BtfPt2me.mjs} +15 -15
- package/dist/ai-B0_sZbmy.mjs +29 -0
- package/dist/{ai-audit-CPrmohqf.mjs → ai-audit-DaubuhYF.mjs} +1 -1
- package/dist/ai-gateway-CJ-1Dzzr.mjs +82 -0
- package/dist/{ai-search-B5l4IDSR.mjs → ai-search-Dywa1kqX.mjs} +37 -37
- package/dist/{ai-security-C7_IGDDl.mjs → ai-security-2wxMPqKS.mjs} +1 -1
- package/dist/{alerting-B6m1Rhf4.mjs → alerting-yad9DYRv.mjs} +26 -26
- package/dist/analytics-DKNw2fVc.mjs +20 -0
- package/dist/{analytics_engine-BvjKCwn1.mjs → analytics_engine-BA3kF46s.mjs} +2 -2
- package/dist/{api-security-B9IozS2a.mjs → api-security-CSuYMpMO.mjs} +61 -61
- package/dist/{argo-C_QcqR6P.mjs → argo-DMfNmOV4.mjs} +1 -1
- package/dist/args-CXgkQKK7.mjs +2 -0
- package/dist/{artifacts-DDFNpYBz.mjs → artifacts-Cb3hwClm.mjs} +20 -20
- package/dist/{audit-logs-cTzNV0DV.mjs → audit-logs-BrjNuiLx.mjs} +2 -2
- package/dist/auth-BBlAI8HG.mjs +2 -0
- package/dist/auth-BIr56Mbx.mjs +8 -0
- package/dist/autoconfig-DPUztTL2.mjs +511 -0
- package/dist/banner-ClclgnBn.mjs +2 -0
- package/dist/basin-catalog-BLsQhJP4.mjs +46 -0
- package/dist/{billing-DU2X-q-x.mjs → billing-CRwD7oQS.mjs} +10 -10
- package/dist/{bot-management-BHAAoZOh.mjs → bot-management-CyW8F8Wm.mjs} +1 -1
- package/dist/{botnet-feed-DOOnGVVY.mjs → botnet-feed-BBKsxf3Y.mjs} +5 -5
- package/dist/{brand-protection-C_DYa7IK.mjs → brand-protection-DSeD8LXl.mjs} +13 -13
- package/dist/browser-extension-C1zmKFDG.mjs +2 -0
- package/dist/{browser-run-Dw-vgWGR.mjs → browser-run-BAcUTwB4.mjs} +23 -23
- package/dist/build-B5UYMEQH.mjs +2 -0
- package/dist/build-DLZ9gBNA.mjs +2 -0
- package/dist/{builds-CO0MmSd3.mjs → builds-W1HEG7Bv.mjs} +31 -31
- package/dist/{cache-XxusQxXe.mjs → cache-B7E_PXUp.mjs} +27 -27
- package/dist/{certificate-authorities-Dmxh7w-Z.mjs → certificate-authorities-D_uAJH9B.mjs} +1 -1
- package/dist/cf-Bh_fTFIj.mjs +18 -0
- package/dist/chunk-FT2NMTJB-1VFYM1Ro.mjs +97 -0
- package/dist/chunk-KKDV4JPS-DdzLLtnl.mjs +2 -0
- package/dist/chunk-U6NEESU5-BhF4rnpx.mjs +2 -0
- package/dist/chunk-WMOON6TZ-D_ToS88f.mjs +2 -0
- package/dist/cli-BeXSqJAj.mjs +6 -0
- package/dist/cli-exit-Dqoo6Jgb.mjs +2 -0
- package/dist/client-certificates-DqFcK_s1.mjs +13 -0
- package/dist/{client-side-security-D7NWV0YH.mjs → client-side-security-DJXZ1XAu.mjs} +1 -1
- package/dist/{cloud-connector-XMFOTNqT.mjs → cloud-connector-Czg1GdQi.mjs} +1 -1
- package/dist/{cloudflared-DhItYrCq.mjs → cloudflared-DGuau-lC.mjs} +1 -1
- package/dist/{cloudforce-one-Cew4MHvA.mjs → cloudforce-one-B1IhIZcp.mjs} +213 -222
- package/dist/command-6YTtWltE.mjs +2 -0
- package/dist/command-B6DqnUwt.mjs +2 -0
- package/dist/command-BCag-xjk.mjs +2 -0
- package/dist/command-BOLlvEan.mjs +2 -0
- package/dist/command-BrHTpaji.mjs +2 -0
- package/dist/command-CAtsHc1V.mjs +2 -0
- package/dist/command-C__qB2mo.mjs +2 -0
- package/dist/command-DUafPVUr.mjs +2 -0
- package/dist/command-DZookrfw.mjs +2 -0
- package/dist/command-DfffeX-k.mjs +2 -0
- package/dist/command-DxSJy_ym.mjs +2 -0
- package/dist/command-DzHL5LKI.mjs +2 -0
- package/dist/command-K1-DZFJS.mjs +2 -0
- package/dist/command-TCklVvOY.mjs +2 -0
- package/dist/command-xU78ACNA.mjs +2 -0
- package/dist/{completions-xPLd1cvL.mjs → completions-Cm9brGAI.mjs} +26 -26
- package/dist/{connector-interrupts-BfQN_pm6.mjs → connector-interrupts-D93KTMkw.mjs} +3 -3
- package/dist/{connector-telemetry-events-B7qLZsZJ.mjs → connector-telemetry-events-D6CmKR14.mjs} +3 -3
- package/dist/{connector-telemetry-snapshots-Ckvg9BPc.mjs → connector-telemetry-snapshots-WO9IUk0e.mjs} +3 -3
- package/dist/{connectors-BhvAP5fb.mjs → connectors-DNT6GTW3.mjs} +7 -7
- package/dist/{containers-Bl3EY-cy.mjs → containers-Btx7vCDP.mjs} +17 -17
- package/dist/{containers-Cq1gtnq6.mjs → containers-Ce7IO-Ia.mjs} +70 -72
- package/dist/{content-scan-BYGe9fFj.mjs → content-scan-C_ROsbTJ.mjs} +1 -1
- package/dist/context-CEOHpZgd.mjs +7 -0
- package/dist/{cps-BWMDWeVq.mjs → cps-BPQqyL2E.mjs} +1 -1
- package/dist/{csamScanner-DMYGzLNi.mjs → csamScanner-D-oO5cxT.mjs} +1 -1
- package/dist/{ct-alerting-Vq4l2s7n.mjs → ct-alerting-CnTRE1Fb.mjs} +1 -1
- package/dist/{custom-certificates-BDEHH0Ym.mjs → custom-certificates-DvnFBZdJ.mjs} +4 -4
- package/dist/{custom-csrs-CHSkZNdX.mjs → custom-csrs-BZ8TXbuQ.mjs} +5 -5
- package/dist/{custom-hostnames-Bch3iQZC.mjs → custom-hostnames-CTqf-KlT.mjs} +6 -6
- package/dist/{custom-nameservers-Tdvu1-vr.mjs → custom-nameservers-B0CpnUVg.mjs} +5 -5
- package/dist/{custom-pages-rFsiIXlr.mjs → custom-pages-DcoSGN56.mjs} +10 -10
- package/dist/{d1-C1GK7DsW.mjs → d1-m7UfzBzl.mjs} +16 -20
- package/dist/{dcv-delegation-D6xiYj2l.mjs → dcv-delegation-yOtz90qE.mjs} +1 -1
- package/dist/{delegate-GctF_lrq.mjs → delegate-B6LetRpZ.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-D04Xvm0m.mjs → deploy-C4p6SzLH.mjs} +1 -1
- package/dist/{deploy-input-COEKxOA1.mjs → deploy-input-DTjBGloL.mjs} +1 -1
- package/dist/dev-BML-bpNU.mjs +4 -0
- package/dist/{diagnostics-BZVAAguV.mjs → diagnostics-hOvnx5DT.mjs} +7 -7
- package/dist/dialog-BlUXJKbA.mjs +2 -0
- package/dist/discover-C5aiI6u0.mjs +2 -0
- package/dist/discover-DwczTkRX.mjs +2 -0
- package/dist/dist-BuCJ_55d.mjs +366 -0
- package/dist/dist-C3s9SXTd.mjs +48 -0
- package/dist/{dist-BpadEMNY.mjs → dist-DW47TUGh.mjs} +35 -35
- package/dist/{dls-BsnURYja.mjs → dls-v6DyEWTd.mjs} +8 -8
- package/dist/{dns-B_nTXhuM.mjs → dns-C9sUPsNt.mjs} +72 -63
- package/dist/{dns-firewall-DDsrdulo.mjs → dns-firewall-EDiT-Zli.mjs} +8 -8
- package/dist/dot-prop-IITUZ2XW-BilKo4kO.mjs +2 -0
- package/dist/dotenv-CcQjGlV0.mjs +4 -0
- package/dist/dry-run-Bq0JAsbX.mjs +2 -0
- package/dist/durable-objects-C01phVwL.mjs +6 -0
- package/dist/{email-auth-CzjtGH6g.mjs → email-auth-BgvoEHJk.mjs} +1 -1
- package/dist/{email-routing-B92fty1-.mjs → email-routing-Bggn219w.mjs} +24 -24
- package/dist/email-security-_t7rzrzd.mjs +158 -0
- package/dist/{email-sending-B7f95epu.mjs → email-sending-_dKCs2VF.mjs} +23 -23
- package/dist/error-sanitization-CJ5OLJrh.mjs +2 -0
- package/dist/error-sanitization-hmi1CqE5.mjs +2 -0
- package/dist/{fieldExtractors-DL_H1m7E.mjs → fieldExtractors-Cm5QnkE0.mjs} +4 -4
- package/dist/firewall-CZEN8iA_.mjs +36 -0
- package/dist/flagship-B_SAI_ZL.mjs +28 -0
- package/dist/{fraud-DU_YCLC5.mjs → fraud-9_9hobAh.mjs} +1 -1
- package/dist/generate-BPqoDbck.mjs +2 -0
- package/dist/generate-CLqGOlOx.mjs +3 -0
- package/dist/{google-tag-gateway-xqN-QudN.mjs → google-tag-gateway-O_N0vHRY.mjs} +1 -1
- package/dist/gt-DmcMNPX6.mjs +2 -0
- package/dist/{healthchecks-COnq1YOx.mjs → healthchecks-Bt3Gw_JZ.mjs} +1 -1
- package/dist/{hostnames-CxRAY_Pp.mjs → hostnames-DdOube3R.mjs} +1 -1
- package/dist/hyperdrive-C14NAh9l.mjs +37 -0
- package/dist/{iam-CtX9NPCy.mjs → iam-DUW7neMx.mjs} +24 -24
- package/dist/{images-CuWFOsGw.mjs → images-B9dnr1z0.mjs} +38 -38
- package/dist/index.mjs +1 -1
- package/dist/init-BGcAIvV7.mjs +39 -0
- package/dist/{intel-BeGV3VXt.mjs → intel-BQpZMck3.mjs} +38 -38
- package/dist/interactive-C-o16XQs.mjs +32 -0
- package/dist/interactive-SgAjen2z.mjs +2 -0
- package/dist/{ips-d6aoKAI4.mjs → ips-PT_uQKAf.mjs} +1 -1
- package/dist/k2-nPYti7Y0.mjs +13 -0
- package/dist/keyless-certificates-BHvas2q1.mjs +13 -0
- package/dist/{keys-Fyf3vWcA.mjs → keys-O5kAW9ox.mjs} +2 -2
- package/dist/kv-BUP_ZLM_.mjs +15 -0
- package/dist/lazy-command-glNW3jzf.mjs +2 -0
- package/dist/{leaked-credential-checks-B7ewx3W-.mjs → leaked-credential-checks-De9hI1rl.mjs} +1 -1
- package/dist/{load-balancers-DHD4f2CT.mjs → load-balancers-Cs6bUHS1.mjs} +39 -39
- package/dist/{local-B6b2OIBW.mjs → local-B5oRPTEN.mjs} +1 -1
- package/dist/local-Bj-l0TP6.mjs +2 -0
- package/dist/{local-runtime-DD8DAIlm.mjs → local-runtime-CZnegFEM.mjs} +1 -1
- package/dist/login-C5nSIS-T.mjs +2 -0
- package/dist/login-CUup7w0e.mjs +5 -0
- package/dist/{logo-matches-BAX8v3iL.mjs → logo-matches-BkQKdu4Z.mjs} +3 -3
- package/dist/{logos-BWBVGwU6.mjs → logos-C_sv-boo.mjs} +3 -3
- package/dist/{logpush-CZKR8DHO.mjs → logpush-NUcyMKHi.mjs} +23 -23
- package/dist/logs-BZT4PlqZ.mjs +36 -0
- package/dist/{magic-cloud-networking-DttrBXqd.mjs → magic-cloud-networking-DQnSdmgA.mjs} +34 -34
- package/dist/{magic-network-monitoring-9VXDSYuL.mjs → magic-network-monitoring-pHTU6aS8.mjs} +17 -17
- package/dist/{magic-transit-Dsu_cSGM.mjs → magic-transit-5302bQNh.mjs} +154 -158
- package/dist/{managed-defense-SYreve4W.mjs → managed-defense-8OEfDzuO.mjs} +9 -9
- package/dist/{managed-transforms-CzSy_xPw.mjs → managed-transforms-CCpUz4TY.mjs} +1 -1
- package/dist/{matches-qf7GReyu.mjs → matches-BSiYXs99.mjs} +3 -3
- package/dist/{mcp-DYSk5_gc.mjs → mcp-CCMiS75R.mjs} +15 -15
- package/dist/{mesh-DdY07OYt.mjs → mesh-DKBGTlCD.mjs} +12 -12
- package/dist/migrate-BJ9Go_wP.mjs +2 -0
- package/dist/monetization-CFf_lb6x.mjs +20 -0
- package/dist/mtls-certificates-DsF3NFNs.mjs +13 -0
- package/dist/{network-DpaZ5LJL.mjs → network-Bm0qYRqY.mjs} +24 -24
- package/dist/{network-interconnects-C4uUoeNa.mjs → network-interconnects-YiRUBbjx.mjs} +17 -17
- package/dist/{oauth-nsTDJ0dF.mjs → oauth-DxGgIwFc.mjs} +1 -1
- package/dist/oauth-cNZUky3h.mjs +9 -0
- package/dist/{oauth-clients-D7Ou7oAS.mjs → oauth-clients-CP6alY0_.mjs} +7 -7
- package/dist/{oauth-scopes-BFoE82Mv.mjs → oauth-scopes-xl-pcWdg.mjs} +1 -1
- package/dist/{observability-smcOFbC1.mjs → observability-Bp71PtlD.mjs} +44 -44
- package/dist/open-PCXX3ZDZ-BKRik1gi.mjs +4 -0
- package/dist/{organization-Dyf_0mq4.mjs → organization-Dbom1gTR.mjs} +7 -7
- package/dist/{organizations-D7zGPLVm.mjs → organizations-OUMVsuen.mjs} +1 -1
- package/dist/{origin-ca-certificates-DJrp29gv.mjs → origin-ca-certificates-B3-T0-Nn.mjs} +3 -3
- package/dist/{origin-post-quantum-encryption-BYj3kJiq.mjs → origin-post-quantum-encryption-CGB6AfPa.mjs} +1 -1
- package/dist/{origin-tls-client-auth-j0tGh6Fy.mjs → origin-tls-client-auth-CgzzfAWr.mjs} +5 -5
- package/dist/output-CvQFJkvi.mjs +2 -0
- package/dist/{page-rules-CLzba_nr.mjs → page-rules-B9BQKU4_.mjs} +1 -1
- package/dist/pages-DZPdyuT4.mjs +54 -0
- package/dist/{pay-per-crawl-DbaTVI8V.mjs → pay-per-crawl-CnveMVDi.mjs} +32 -32
- package/dist/{pay-per-use-BEvtoppJ.mjs → pay-per-use-Bpxe8PHv.mjs} +3 -3
- package/dist/{pipelines-lps71uoA.mjs → pipelines-CHev3o5G.mjs} +20 -20
- package/dist/precursor-C9PK9Bue.mjs +4 -0
- package/dist/previews-BIMI1dTz.mjs +4 -0
- package/dist/progress-A61dRbXl.mjs +2 -0
- package/dist/prompt-CGUzvBgY.mjs +3 -0
- package/dist/{queries-EJYlFw8m.mjs → queries-f-btyefs.mjs} +4 -4
- package/dist/{queues-CozKGaA4.mjs → queues-kLNdeb3q.mjs} +29 -35
- package/dist/r2-D_awYx2p.mjs +125 -0
- package/dist/r2-data-catalog-2jQrdAdo.mjs +2 -0
- package/dist/{radar-NmpdyMo5.mjs → radar-CU4T02Ag.mjs} +1 -1
- package/dist/raw-fetch-CvkmFO23.mjs +2 -0
- package/dist/{realtime-iWTz8WbH.mjs → realtime-C0dvcBBM.mjs} +78 -78
- package/dist/{registrar-Cza1L8i_.mjs → registrar-CHc-4vcf.mjs} +8 -8
- package/dist/{registrar-sandbox-BP4GQg5s.mjs → registrar-sandbox-Dq8LV2AI.mjs} +6 -6
- package/dist/{registry-vreNkX6u.mjs → registry-Cg5lP8oo.mjs} +1 -1
- package/dist/{reporting-gvXX2MxY.mjs → reporting-4u21g6Dk.mjs} +7 -7
- package/dist/request-headers-D31kdxrQ.mjs +2 -0
- package/dist/{request-tracers-F8a_aj32.mjs → request-tracers-CupJ_83j.mjs} +2 -2
- package/dist/resolve-PZuJ878-.mjs +2 -0
- package/dist/{resource-sharing-D6XWIDmb.mjs → resource-sharing-CO-Lh-u7.mjs} +14 -14
- package/dist/{resource-tagging-c_z4VZt0.mjs → resource-tagging-D0R5SzR6.mjs} +2 -2
- package/dist/{rules-_QDaG3U5.mjs → rules-BsmKzB9H.mjs} +8 -8
- package/dist/{rulesets-Bc4ZuPG_.mjs → rulesets-HOOnxHZZ.mjs} +20 -20
- package/dist/{rum-ChPyfpM2.mjs → rum-wcLEvVJl.mjs} +14 -14
- package/dist/run-CIJTelJL.mjs +2 -0
- package/dist/run-quhbAvQi.mjs +2 -0
- package/dist/schema-GdBsV4P7.mjs +2 -0
- package/dist/{schema-flags-C9lbLgE-.mjs → schema-flags-D8vL2oiF.mjs} +2 -2
- package/dist/{scim-BjiswXbC.mjs → scim-BkdJmAS8.mjs} +10 -10
- package/dist/{sdk-CsWOex96.mjs → sdk-BCzcRJCi.mjs} +2 -2
- package/dist/{secrets-store-Cn3D5a0d.mjs → secrets-store-CHs0oYA0.mjs} +11 -11
- package/dist/security-insights-vsl-4xFa.mjs +40 -0
- package/dist/{security-txt-CaR5Idmz.mjs → security-txt-Fnl3LdSn.mjs} +1 -1
- package/dist/session-CZTuHcbm.mjs +2 -0
- package/dist/shared-BS30oCf8.mjs +2 -0
- package/dist/{smart-shield-CphSzoh4.mjs → smart-shield-DB0E7cZI.mjs} +1 -1
- package/dist/{snippets-r-Mre0cE.mjs → snippets-CFaF_NyG.mjs} +1 -1
- package/dist/source-38bULAR8.mjs +6 -0
- package/dist/spawn-B0Sl8lUu.mjs +10 -0
- package/dist/{spectrum-BhjCVFZk.mjs → spectrum-DtG0jYjE.mjs} +1 -1
- package/dist/{speed-CPgypY7n.mjs → speed-B-RiNHGK.mjs} +1 -1
- package/dist/src-CM3XaB4p.mjs +109 -0
- package/dist/{ssl-DsMrXyqK.mjs → ssl-DBVpCZAM.mjs} +4 -4
- package/dist/startup-profile-CLmojOrn.mjs +2 -0
- package/dist/startup-profile-CR7GMuLx.mjs +17 -0
- package/dist/{state-BxCejn42.mjs → state-BaGRaYow.mjs} +1 -1
- package/dist/state-CpXhcMdX.mjs +2 -0
- package/dist/{stream-L2NmGPby.mjs → stream-cAdBvpS1.mjs} +45 -45
- package/dist/{submit-KN0Ul5fV.mjs → submit-Bkd7l2rK.mjs} +2 -2
- package/dist/{tags-CZMFKGdP.mjs → tags--eph7JbN.mjs} +2 -2
- package/dist/telemetry-51etasAu.mjs +2 -0
- package/dist/telemetry-Q3_UmwHj.mjs +2 -0
- package/dist/tenant-Bj-He2xO.mjs +10 -0
- package/dist/{tenant-custom-nameservers-Nx59Buv0.mjs → tenant-custom-nameservers-B5IIIwbz.mjs} +1 -1
- package/dist/{theme-BiIYWOed.mjs → theme-BIWQFmZ0.mjs} +2 -2
- package/dist/tools-BJZ0DDlL.mjs +2 -0
- package/dist/{tunnels-C-mMZy4v.mjs → tunnels-CgtuRpcD.mjs} +15 -15
- package/dist/turnstile-Bmcnrzw7.mjs +33 -0
- package/dist/ui-BQxRjahW.mjs +5 -0
- package/dist/update-check-BqSpgzHk.mjs +2 -0
- package/dist/update-check-DC0qP_8z.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-7ikewAnp.mjs → url-info-DhVehaT8.mjs} +2 -2
- package/dist/{url-normalization-B0D7Fhf3.mjs → url-normalization-BpGDUUQc.mjs} +1 -1
- package/dist/{url-scanner-DpKIqkin.mjs → url-scanner-DiLdqsQk.mjs} +8 -8
- package/dist/{user-BFq8UM1s.mjs → user-B6P5_OjP.mjs} +1 -1
- package/dist/{values-DnBYV1ZD.mjs → values-Cxx4Lxrd.mjs} +2 -2
- package/dist/{vectorize-BpZ4UsUj.mjs → vectorize-YyxVpql-.mjs} +15 -15
- package/dist/version-C0pInAZ9.mjs +2 -0
- package/dist/{waiting-rooms-DJfqehy9.mjs → waiting-rooms-BdahlCdD.mjs} +25 -25
- package/dist/{web-assets-CCSSW_JH.mjs → web-assets-yaKxN4w_.mjs} +1 -1
- package/dist/{web3-bbT1REPc.mjs → web3-Bu9c_QAt.mjs} +1 -1
- package/dist/workers-5GgoGA2e.mjs +38 -0
- package/dist/{workers-builds-TRF3K416.mjs → workers-builds-h-1FJjE1.mjs} +7 -7
- package/dist/workers-for-platforms-CV9iRrp9.mjs +42 -0
- package/dist/{workers-vpc-kgryQ48l.mjs → workers-vpc-C1oUHHqk.mjs} +6 -6
- package/dist/{workflows-CKdPlIkK.mjs → workflows-dtMlkj1-.mjs} +20 -20
- package/dist/wrangler-migration-CJEb9hY3.mjs +2 -0
- package/dist/{zaraz-BXFlEWSx.mjs → zaraz-838AbMEX.mjs} +1 -1
- package/dist/{zero-trust-M08mBsYd.mjs → zero-trust-CYt-eELJ.mjs} +460 -434
- package/dist/{zone-DHmrotGW.mjs → zone-uJwRLSnn.mjs} +1 -1
- package/dist/{zones-C0eKBTqG.mjs → zones-Dpofsnth.mjs} +1 -1
- package/package.json +15 -12
- package/dist/abuse-reports-Dd6kJM7r.mjs +0 -26
- package/dist/access-C_2rEi0H.mjs +0 -27
- package/dist/account-CZ9SPVdz.mjs +0 -12
- package/dist/ai-ARwLeQ1O.mjs +0 -31
- package/dist/ai-gateway-DNY4FPF2.mjs +0 -147
- package/dist/analytics-nnzFBB_7.mjs +0 -21
- package/dist/auth-DJhSjNNL.mjs +0 -8
- package/dist/auth-sAorfdWU.mjs +0 -2
- package/dist/browser-extension-C48pKh3t.mjs +0 -15
- package/dist/build-1a8CiNIT.mjs +0 -2
- package/dist/build-Ca_drQY2.mjs +0 -2
- package/dist/cf-oadujOtC.mjs +0 -18
- package/dist/chunk-6EUZQHAF-QVTL_mC-.mjs +0 -2
- package/dist/chunk-DL5FNmn1.mjs +0 -2
- package/dist/chunk-Q72B4Q5Z-Cr1H_iK6.mjs +0 -2
- package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +0 -2
- package/dist/chunk-QBZBEHZB-Byagrlop.mjs +0 -2
- package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +0 -374
- package/dist/client-certificates-CgaIc3zN.mjs +0 -13
- package/dist/command-CF0giIIc.mjs +0 -3
- package/dist/command-CsZFRm3P.mjs +0 -2
- package/dist/command-DBz8QiFk.mjs +0 -2
- package/dist/command-RiZ_LYcm.mjs +0 -2
- package/dist/config-B4vIa0zp.mjs +0 -2
- package/dist/data-security-DDhPnX8Z.mjs +0 -71
- package/dist/dev-CVD3BVUG.mjs +0 -4
- package/dist/dialog--iw0F2s-.mjs +0 -2
- package/dist/dist-CUUGKvjh.mjs +0 -48
- package/dist/dist-dc4E1u01.mjs +0 -272
- package/dist/dot-prop-6SRZBKHT-Dj7YOlwR.mjs +0 -2
- package/dist/dry-run-CLX6Pbtq.mjs +0 -2
- package/dist/durable-objects-8U8DpF9q.mjs +0 -8
- package/dist/email-security-keTqF0nJ.mjs +0 -160
- package/dist/error-sanitization-Cbd_oegl.mjs +0 -2
- package/dist/error-sanitization-DwOlM3R7.mjs +0 -2
- package/dist/firewall-67qoXiqD.mjs +0 -56
- package/dist/flagship-CjC3dF7L.mjs +0 -28
- package/dist/hyperdrive-DPWyiXpj.mjs +0 -37
- package/dist/interactive-B6woOLo-.mjs +0 -32
- package/dist/interactive-DnUvQHjc.mjs +0 -2
- package/dist/keyless-certificates-Dvib4jhw.mjs +0 -13
- package/dist/kv-CA4J7cCq.mjs +0 -21
- package/dist/local-BrfySqnx.mjs +0 -2
- package/dist/login-CLW108XX.mjs +0 -5
- package/dist/login-xgRjiyJa.mjs +0 -2
- package/dist/logs-CiDyrqEu.mjs +0 -48
- package/dist/mtls-certificates-LXlgdkf1.mjs +0 -13
- package/dist/oauth-Dzk6Gy-6.mjs +0 -14
- package/dist/open-PBXRGS4R-C4CKEADM.mjs +0 -4
- package/dist/open-PBXRGS4R-C_-G_4DC.mjs +0 -4
- package/dist/output-Bia1u2k5.mjs +0 -2
- package/dist/pages-pah6dZBJ.mjs +0 -60
- package/dist/precursor-DTTYLDEa.mjs +0 -4
- package/dist/previews-B89cUmpr.mjs +0 -4
- package/dist/progress-D_mL-Kcy.mjs +0 -2
- package/dist/prompt-sL_yMZbI.mjs +0 -3
- package/dist/r2-Chn_JQUM.mjs +0 -127
- package/dist/r2-data-catalog-Bfn3AWzn.mjs +0 -44
- package/dist/raw-fetch-lSVttVJF.mjs +0 -2
- package/dist/request-headers-POBKmu93.mjs +0 -2
- package/dist/resolve-BXemCSyA.mjs +0 -2
- package/dist/run-DtN51G2A.mjs +0 -2
- package/dist/run-oACgYK8I.mjs +0 -2
- package/dist/schema-DZSSJaY0.mjs +0 -2
- package/dist/security-center-DP4GC1cG.mjs +0 -30
- package/dist/shared-W9uoX1-W.mjs +0 -2
- package/dist/source-BR4_k2ad.mjs +0 -6
- package/dist/spawn-BWEuIO-w.mjs +0 -523
- package/dist/src-Hw-TlVAO.mjs +0 -108
- package/dist/startup-profile-CYEokTVe.mjs +0 -2
- package/dist/startup-profile-CgWHy4rE.mjs +0 -17
- package/dist/state-DSzkxXML.mjs +0 -2
- package/dist/telemetry-CSj_ezpk.mjs +0 -2
- package/dist/telemetry-DAf9gLyH.mjs +0 -2
- package/dist/telemetry-Dk1GcQ0u.mjs +0 -5
- package/dist/tenant-Cu4P-foo.mjs +0 -12
- package/dist/tools-BMKpYraQ.mjs +0 -2
- package/dist/turnstile-39JL9tMt.mjs +0 -33
- package/dist/ui-DH95w1Qk.mjs +0 -5
- package/dist/undici-DTSBJHNS.mjs +0 -96
- package/dist/update-check-BKQBD4MQ.mjs +0 -2
- package/dist/update-check-CE9XB6gf.mjs +0 -2
- package/dist/version-Bh3b9vTa.mjs +0 -2
- package/dist/workers-CXuyjZB8.mjs +0 -36
- package/dist/workers-for-platforms-B57iKiSN.mjs +0 -25
- /package/dist/{Page-C-JHZnIy.mjs → Page-CjJht2qT.mjs} +0 -0
- /package/dist/{alerts-CstOk8n0.mjs → alerts-DY_7Nknx.mjs} +0 -0
- /package/dist/{autorag-PRTwXGgn.mjs → autorag-K396-M2S.mjs} +0 -0
- /package/dist/{body-parser-CUWbw_Tq.mjs → body-parser-hh2avzkz.mjs} +0 -0
- /package/dist/{brands-BHRXlWDm.mjs → brands-DeLbFxSt.mjs} +0 -0
- /package/dist/{clear-UvKESVx3.mjs → clear-CRfI7WS7.mjs} +0 -0
- /package/dist/{cli-types-tt_LZMbn.mjs → cli-types-DoVT5q_M.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-DwnFeZg0.mjs → connector-telemetry-events-latest-D8p_dR8s.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-Dv6rZlxs.mjs → connector-telemetry-snapshots-latest-COFmzmlk.mjs} +0 -0
- /package/dist/{domain-info-BqTDXNBo.mjs → domain-info-aiwP60Fo.mjs} +0 -0
- /package/dist/{health-CwPzzrV6.mjs → health-Bz33n-_F.mjs} +0 -0
- /package/dist/{input-validation-Ch4Vllrm.mjs → input-validation-Dk52b0me.mjs} +0 -0
- /package/dist/{internal-WLHfxX64.mjs → internal-BHrJbbdA.mjs} +0 -0
- /package/dist/{lifecycle-Ichnb2x1.mjs → lifecycle-C7tAC1Mn.mjs} +0 -0
- /package/dist/{live-D_k7eHdv.mjs → live-MeJQXIei.mjs} +0 -0
- /package/dist/{metadata-APBiectA.mjs → metadata-C33s4rc-.mjs} +0 -0
- /package/dist/{project-settings-DSXevRvj.mjs → project-settings-DO6njFg_.mjs} +0 -0
- /package/dist/{rate-limit-analytics-CDTPxSET.mjs → rate-limit-analytics-CU55zqCU.mjs} +0 -0
- /package/dist/{rate-limits-C3K9smdl.mjs → rate-limits-CZ-qHDPK.mjs} +0 -0
- /package/dist/{ready-CvwvbdTX.mjs → ready-BOpbZ1pN.mjs} +0 -0
- /package/dist/{recent-submissions-CjzcT-iH.mjs → recent-submissions-KDqD2HyS.mjs} +0 -0
- /package/dist/{refute-CIAFMj00.mjs → refute-DkF4XIMw.mjs} +0 -0
- /package/dist/{resolve-CUDKxUrW.mjs → resolve-BCTrtcx7.mjs} +0 -0
- /package/dist/{scan-logo-zFkphtQ3.mjs → scan-logo-DQkf6glG.mjs} +0 -0
- /package/dist/{scan-page-CLl2MAkZ.mjs → scan-page-CMOJ_E0n.mjs} +0 -0
- /package/dist/{search-12jA1b4l.mjs → search-Bre1Zwn3.mjs} +0 -0
- /package/dist/{signed-url-U0T_PEMR.mjs → signed-url-24ZbX4yV.mjs} +0 -0
- /package/dist/{submission-info-CZ84a3Nb.mjs → submission-info-BmkbZVqM.mjs} +0 -0
- /package/dist/{total-queries-CJTc9Pde.mjs → total-queries-j8OAF_cE.mjs} +0 -0
- /package/dist/{tracked-domains-BKLxnnSv.mjs → tracked-domains-fe3EWYmF.mjs} +0 -0
- /package/dist/{verify-CZW5Fo1q.mjs → verify-CKgZYvln.mjs} +0 -0
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,i as n,t as r}from"./context-CEOHpZgd.mjs";import{r as i}from"./auth-BIr56Mbx.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-A61dRbXl.mjs";import{t as c}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,n as m}from"./prompt-CGUzvBgY.mjs";import{t as ee}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 email-sending get <message-id>
|
|
3
3
|
|
|
4
|
-
Returns the raw RFC 5322 MIME message for the given account and message id.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <message-id>`,describe:`Fetch an email message`,builder:h,handler:async
|
|
4
|
+
Returns the raw RFC 5322 MIME message for the given account and message id.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <message-id>`,describe:`Fetch an email message`,builder:h,handler:async n=>c({command:`email-sending get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf email-sending get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/email/sending/messages/${n[`message-id`]==null?`<message-id>`:encodeURIComponent(String(n[`message-id`]))}`,pathParams:{"message-id":String(n[`message-id`]??``)},bodyKind:`none`});return}let c=await i(n),l=n.local?e:await r();n.accountId=l,a(await s(`Loading`,async()=>c.emailSending.get({account_id:l,message_id:n[`message-id`]})),{successLabel:`Loaded`})})};function _(e){return e.usage(`$0 email-sending limits get
|
|
5
5
|
|
|
6
|
-
Returns the current daily sending quota for the account and, when a quota is resolved, the account's current usage against it. Quota is null when not yet available; usage is null when there is no resolved quota or usage is temporarily unavailable.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get`,describe:`Get sending limits`,builder:_,handler:async
|
|
6
|
+
Returns the current daily sending quota for the account and, when a quota is resolved, the account's current usage against it. Quota is null when not yet available; usage is null when there is no resolved quota or usage is temporarily unavailable.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get`,describe:`Get sending limits`,builder:_,handler:async n=>c({command:`email-sending limits get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf email-sending limits get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/email/sending/limits`,pathParams:{},bodyKind:`none`});return}let c=await i(n),l=n.local?e:await r();n.accountId=l,a(await s(`Loading`,async()=>c.emailSending.limits.get({account_id:l})),{successLabel:`Loaded`})})},y={command:`limits`,describe:`Inspect account-level sending quotas and current usage`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 email-sending reputation get
|
|
7
7
|
|
|
8
|
-
Returns the authoritative Email Sending reputation state and active evaluation policy. Accounts without an evaluation are Healthy with null evaluation timestamps.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get`,describe:`Get account reputation`,builder:b,handler:async
|
|
8
|
+
Returns the authoritative Email Sending reputation state and active evaluation policy. Accounts without an evaluation are Healthy with null evaluation timestamps.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get`,describe:`Get account reputation`,builder:b,handler:async n=>c({command:`email-sending reputation get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf email-sending reputation get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/email/sending/reputation`,pathParams:{},bodyKind:`none`});return}let c=await i(n),l=n.local?e:await r();n.accountId=l,a(await s(`Loading`,async()=>c.emailSending.reputation.get({account_id:l})),{successLabel:`Loaded`})})},S={command:`reputation`,describe:`Operations for reputation`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e){return e.usage(`$0 email-sending send-raw
|
|
9
9
|
|
|
10
|
-
Send a raw RFC 5322 (MIME) email for the specified account. Provide the full MIME message plus the SMTP envelope (from and recipients).`).option(`from`,{type:`string`,description:`Sender email address.`}).option(`mime-message`,{type:`string`,description:`The full MIME-encoded email message. Should include standard RFC 5322 headers such as From, To, Subject, and Content-Type. The from and recipients fields in the request body control SMTP envelope routing; the From and To headers in the MIME message control what the recipient's email client displays.`}).option(`recipients`,{type:`string`,array:!0,description:`List of recipient email addresses.`}).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:`send-raw`,describe:`Send a raw MIME email`,builder:C,handler:async
|
|
10
|
+
Send a raw RFC 5322 (MIME) email for the specified account. Provide the full MIME message plus the SMTP envelope (from and recipients).`).option(`from`,{type:`string`,description:`Sender email address.`}).option(`mime-message`,{type:`string`,description:`The full MIME-encoded email message. Should include standard RFC 5322 headers such as From, To, Subject, and Content-Type. The from and recipients fields in the request body control SMTP envelope routing; the From and To headers in the MIME message control what the recipient's email client displays.`}).option(`recipients`,{type:`string`,array:!0,description:`List of recipient email addresses.`}).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:`send-raw`,describe:`Send a raw MIME email`,builder:C,handler:async n=>c({command:`email-sending send-raw`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf email-sending send-raw`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/email/sending/send_raw`,pathParams:{},bodyKind:`json`,body:n.body===void 0?d({from:f(n.from,`from`,`text`),mime_message:f(n[`mime-message`],`mime-message`,`text`),recipients:n.recipients}):l(n.body)});return}let c=await i(n),u=n.local?e:await r();if(n.accountId=u,n.body){let e=l(n.body);a(await s(`Creating`,async()=>c.emailSending.sendRaw({...e,account_id:u})),{successLabel:`Created`});return}if(n.from===void 0&&(n.from=await p(`from`,`Sender email address.`)),n[`mime-message`]===void 0&&(n[`mime-message`]=await p(`mime-message`,`The full MIME-encoded email message. Should include standard RFC 5322 headers such as From, To, Subject, and Content-Type. The from and recipients fields in the request body control SMTP envelope routing; the From and To headers in the MIME message control what the recipient's email client displays.`)),n.recipients===void 0)throw Error(`--recipients is required (or pass --body with this field set).`);let m=d({from:f(n.from,`from`,`text`),mime_message:f(n[`mime-message`],`mime-message`,`text`),recipients:n.recipients});a(await s(`Creating`,async()=>c.emailSending.sendRaw({...m,account_id:u})),{successLabel:`Created`})})};function T(e){return e.usage(`$0 email-sending send
|
|
11
11
|
|
|
12
|
-
Send an email for the specified account using the structured builder. Provide the sender, recipients, subject, and at least one of text or html; attachments are optional.`).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 E={command:`send`,describe:`Send an email`,builder:T,handler:async
|
|
12
|
+
Send an email for the specified account using the structured builder. Provide the sender, recipients, subject, and at least one of text or html; attachments are optional.`).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 E={command:`send`,describe:`Send an email`,builder:T,handler:async n=>c({command:`email-sending send`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf email-sending send`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/email/sending/send`,pathParams:{},bodyKind:`json`,body:n.body===void 0?void 0:l(n.body)});return}let c=await i(n),u=n.local?e:await r();if(n.accountId=u,n.body){let e=l(n.body);a(await s(`Creating`,async()=>c.emailSending.send({...e,account_id:u})),{successLabel:`Created`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function D(e){return e.usage("$0 email-sending subdomains create\n\nCreates a new sending subdomain or re-enables sending on an existing subdomain that had it disabled. If zone-level Email Sending has not been enabled yet, the zone flag is automatically set when the entitlement is present. A leftmost wildcard such as `*.example.com` is accepted only for accounts with wildcard Email Sending enabled. Wildcard senders share the base domain's DKIM signing identity and `cf-bounce.<base>` return path.").option(`name`,{type:`string`,description:"The domain name within the zone. A wildcard is allowed only as the complete leftmost label (`*.example.com`) and requires the account wildcard Email Sending entitlement."}).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 O={command:`create`,describe:`Create a sending subdomain`,builder:D,handler:async e=>c({command:`email-sending subdomains create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):l(e.body)});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=l(e.body);a(await s(`Creating`,async()=>t.emailSending.subdomains.create({...n,zone_id:r})),{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,"The domain name within the zone. A wildcard is allowed only as the complete leftmost label (`*.example.com`) and requires the account wildcard Email Sending entitlement."));let c=d({name:f(e.name,`name`,`text`)});a(await s(`Creating`,async()=>t.emailSending.subdomains.create({...c,zone_id:r})),{successLabel:`Created`})})};function k(e){return e.usage(`$0 email-sending subdomains delete <subdomain-id>
|
|
13
13
|
|
|
14
|
-
Disables sending on a subdomain and removes its DNS records. If routing is still active on the subdomain, only sending is disabled.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const A={command:`delete <subdomain-id>`,describe:`Delete a sending subdomain`,builder:k,handler:async e=>c({command:`email-sending subdomains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let
|
|
15
|
-
`);return}a(await s(`Deleting`,async()=>
|
|
14
|
+
Disables sending on a subdomain and removes its DNS records. If routing is still active on the subdomain, only sending is disabled.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const A={command:`delete <subdomain-id>`,describe:`Delete a sending subdomain`,builder:k,handler:async e=>c({command:`email-sending subdomains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await m({force:!!e.force,message:`This operation disables sending and removes the subdomain's Email Sending DNS records.`})){process.stderr.write(`Aborted.
|
|
15
|
+
`);return}a(await s(`Deleting`,async()=>t.emailSending.subdomains.delete({zone_id:r,subdomain_id:e[`subdomain-id`]})),{successLabel:`Deleted`})})};function j(e){return e.usage(`$0 email-sending subdomains dns fix <subdomain-id>
|
|
16
16
|
|
|
17
|
-
Idempotently re-applies the sending DNS records (creates missing records, re-applies the email_routing lock on records whose lock has been cleared). Refuses with a 409 if foreign MX, multiple SPF, multiple DMARC, or multiple DKIM records exist at the relevant DNS names — those require manual cleanup.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`fix <subdomain-id>`,describe:`Fix sending subdomain DNS records`,builder:j,handler:async e=>c({command:`email-sending subdomains dns fix`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains dns fix`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}/dns`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let
|
|
17
|
+
Idempotently re-applies the sending DNS records (creates missing records, re-applies the email_routing lock on records whose lock has been cleared). Refuses with a 409 if foreign MX, multiple SPF, multiple DMARC, or multiple DKIM records exist at the relevant DNS names — those require manual cleanup.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`fix <subdomain-id>`,describe:`Fix sending subdomain DNS records`,builder:j,handler:async e=>c({command:`email-sending subdomains dns fix`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains dns fix`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}/dns`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,a(await s(`Creating`,async()=>t.emailSending.subdomains.dns.fix({zone_id:r,subdomain_id:e[`subdomain-id`]})),{successLabel:`Created`})})};function N(e){return e.usage(`$0 email-sending subdomains dns get <subdomain-id>
|
|
18
18
|
|
|
19
|
-
Returns the expected DNS records for a sending subdomain.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get <subdomain-id>`,describe:`Get sending subdomain DNS records`,builder:N,handler:async e=>c({command:`email-sending subdomains dns get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains dns get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}/dns`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let
|
|
19
|
+
Returns the expected DNS records for a sending subdomain.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get <subdomain-id>`,describe:`Get sending subdomain DNS records`,builder:N,handler:async e=>c({command:`email-sending subdomains dns get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains dns get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}/dns`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>t.emailSending.subdomains.dns.get({zone_id:r,subdomain_id:e[`subdomain-id`]})),{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 email-sending subdomains dns status <subdomain-id>
|
|
20
20
|
|
|
21
|
-
Returns the desired DNS records for a sending subdomain along with a live diff against actual DNS state. Use this to detect missing, unlocked, foreign, or multi-record conflicts before deciding whether to call the fix endpoint. For wildcard sending rows, each call also rechecks the governing organizational-domain DMARC policy and reports policy drift that DNS Fix cannot repair.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`status <subdomain-id>`,describe:`Get sending subdomain DNS status`,builder:F,handler:async e=>c({command:`email-sending subdomains dns status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains dns status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}/dns/status`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let
|
|
21
|
+
Returns the desired DNS records for a sending subdomain along with a live diff against actual DNS state. Use this to detect missing, unlocked, foreign, or multi-record conflicts before deciding whether to call the fix endpoint. For wildcard sending rows, each call also rechecks the governing organizational-domain DMARC policy and reports policy drift that DNS Fix cannot repair.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`status <subdomain-id>`,describe:`Get sending subdomain DNS status`,builder:F,handler:async e=>c({command:`email-sending subdomains dns status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains dns status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}/dns/status`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>t.emailSending.subdomains.dns.status({zone_id:r,subdomain_id:e[`subdomain-id`]})),{successLabel:`Loaded`})})},L={command:`dns`,describe:`Operations for subdomains.dns`,builder:e=>e.command(M).command(P).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(e){return e.usage(`$0 email-sending subdomains get <subdomain-id>
|
|
22
22
|
|
|
23
|
-
Gets information for a specific sending subdomain.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`get <subdomain-id>`,describe:`Get a sending subdomain`,builder:R,handler:async e=>c({command:`email-sending subdomains get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let
|
|
23
|
+
Gets information for a specific sending subdomain.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`get <subdomain-id>`,describe:`Get a sending subdomain`,builder:R,handler:async e=>c({command:`email-sending subdomains get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>t.emailSending.subdomains.get({zone_id:r,subdomain_id:e[`subdomain-id`]})),{successLabel:`Loaded`})})};function z(e){return e.usage(`$0 email-sending subdomains list
|
|
24
24
|
|
|
25
|
-
Lists all sending-enabled subdomains for the zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`list`,describe:`List sending subdomains`,builder:z,handler:async e=>c({command:`email-sending subdomains list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let
|
|
25
|
+
Lists all sending-enabled subdomains for the zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`list`,describe:`List sending subdomains`,builder:z,handler:async e=>c({command:`email-sending subdomains list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>t.emailSending.subdomains.list({zone_id:r})),{successLabel:`Loaded`})})};function V(e){return e.usage(`$0 email-sending subdomains preview
|
|
26
26
|
|
|
27
|
-
Returns the DNS records that would be created for a sending subdomain, flags which records are missing, and reports any conflicts with existing DNS records. This is a read-only dry-run — no records are created or modified. Use before or after creating a subdomain to check DNS status. A leftmost wildcard requires wildcard Email Sending to be enabled for the account and previews base-scoped DKIM and return-path records.`).option(`name`,{type:`string`,description:"The domain name within the zone. A wildcard is allowed only as the complete leftmost label (`*.example.com`) and requires the account wildcard Email Sending entitlement."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`preview`,describe:`Preview sending subdomain DNS`,builder:V,handler:async e=>c({command:`email-sending subdomains preview`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains preview`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/preview`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):l(e.body)});return}let
|
|
27
|
+
Returns the DNS records that would be created for a sending subdomain, flags which records are missing, and reports any conflicts with existing DNS records. This is a read-only dry-run — no records are created or modified. Use before or after creating a subdomain to check DNS status. A leftmost wildcard requires wildcard Email Sending to be enabled for the account and previews base-scoped DKIM and return-path records.`).option(`name`,{type:`string`,description:"The domain name within the zone. A wildcard is allowed only as the complete leftmost label (`*.example.com`) and requires the account wildcard Email Sending entitlement."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`preview`,describe:`Preview sending subdomain DNS`,builder:V,handler:async e=>c({command:`email-sending subdomains preview`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains preview`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/preview`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):l(e.body)});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=l(e.body);a(await s(`Loading`,async()=>t.emailSending.subdomains.preview({...n,zone_id:r})),{successLabel:`Loaded`});return}e.name===void 0&&(e.name=await p(`name`,"The domain name within the zone. A wildcard is allowed only as the complete leftmost label (`*.example.com`) and requires the account wildcard Email Sending entitlement."));let c=d({name:f(e.name,`name`,`text`)});a(await s(`Loading`,async()=>t.emailSending.subdomains.preview({...c,zone_id:r})),{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 email-sending subdomains reputation get-complaints <subdomain-id>
|
|
28
28
|
|
|
29
|
-
Returns the matched complaint count for a sending subdomain in a half-open time window of up to seven days.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`start-at`,{type:`string`,description:`Start at`,demandOption:!0}).option(`end-at`,{type:`string`,description:`End at`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get-complaints <subdomain-id>`,describe:`Get sending subdomain complaint count`,builder:U,handler:async e=>c({command:`email-sending subdomains reputation get-complaints`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let
|
|
29
|
+
Returns the matched complaint count for a sending subdomain in a half-open time window of up to seven days.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`start-at`,{type:`string`,description:`Start at`,demandOption:!0}).option(`end-at`,{type:`string`,description:`End at`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get-complaints <subdomain-id>`,describe:`Get sending subdomain complaint count`,builder:U,handler:async e=>c({command:`email-sending subdomains reputation get-complaints`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={start_at:e[`start-at`],end_at:e[`end-at`]};if(e.dryRun){o({command:`cf email-sending subdomains reputation get-complaints`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}/reputation/complaints`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let r=await i(e),c=await n({zone:e.zone},r,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>r.emailSending.subdomains.reputation.getComplaints({zone_id:c,subdomain_id:e[`subdomain-id`],...t})),{successLabel:`Loaded`})})},G={command:`reputation`,describe:`Operations for subdomains.reputation`,builder:e=>e.command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function K(e){return e.usage(`$0 email-sending subdomains update <subdomain-id>
|
|
30
30
|
|
|
31
31
|
Updates the activity-log preview preference for a sending subdomain.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`drop-suppressed-recipients`,{type:`boolean`,description:`Whether a send request that includes a recipient suppressed on
|
|
32
32
|
this subdomain drops that recipient and still delivers to the
|
|
33
33
|
rest, instead of failing the entire request.
|
|
34
|
-
`}).option(`preview-enabled`,{type:`boolean`,description:`Whether sent messages from this subdomain can be previewed in the activity log.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"At least one of `preview_enabled` or `drop_suppressed_recipients` must be provided. A field omitted from the request body is left unchanged. "})}const q={command:`update <subdomain-id>`,describe:`Update a sending subdomain`,builder:K,handler:async e=>c({command:`email-sending subdomains update`,classification:{safeFlags:[`drop-suppressed-recipients`,`preview-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({drop_suppressed_recipients:e[`drop-suppressed-recipients`],preview_enabled:e[`preview-enabled`]}):l(e.body)});return}let
|
|
34
|
+
`}).option(`preview-enabled`,{type:`boolean`,description:`Whether sent messages from this subdomain can be previewed in the activity log.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"At least one of `preview_enabled` or `drop_suppressed_recipients` must be provided. A field omitted from the request body is left unchanged. "})}const q={command:`update <subdomain-id>`,describe:`Update a sending subdomain`,builder:K,handler:async e=>c({command:`email-sending subdomains update`,classification:{safeFlags:[`drop-suppressed-recipients`,`preview-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({drop_suppressed_recipients:e[`drop-suppressed-recipients`],preview_enabled:e[`preview-enabled`]}):l(e.body)});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=l(e.body);a(await s(`Updating`,async()=>t.emailSending.subdomains.update({body:n,zone_id:r,subdomain_id:e[`subdomain-id`]})),{successLabel:`Updated`});return}let c=d({drop_suppressed_recipients:e[`drop-suppressed-recipients`],preview_enabled:e[`preview-enabled`]});a(await s(`Updating`,async()=>t.emailSending.subdomains.update({body:c,zone_id:r,subdomain_id:e[`subdomain-id`]})),{successLabel:`Updated`})})},J={command:`subdomains`,describe:`Configure sending subdomains and keep their DNS records healthy`,builder:e=>e.command(O).command(A).command(te).command(B).command(H).command(q).command(L).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Y(e){return e.usage(`$0 email-sending suppressions create
|
|
35
35
|
|
|
36
|
-
Creates a suppression for every sending domain of the account (default) or for one sending domain (\`scope.type = sending_domain\`). Creating an existing active suppression returns its identifier. If a mutable legacy zone-linked account row already exists, it is promoted without changing its identifier.`).option(`email`,{type:`string`,description:`The email address to suppress.`}).option(`expires-at`,{type:`string`,description:`Expiration timestamp for the suppression. Omit or set to null for a permanent suppression that never expires.`}).option(`note`,{type:`string`,description:`Advisory note for this suppression. Not enforced or validated beyond length.`}).option(`scope-type`,{type:`string`,description:`Blocks the recipient for every sending domain of the account.`,choices:[`account`,`sending_domain`]}).option(`scope-value`,{type:`string`,description:`The sending domain to suppress for: the domain part of the envelope MAIL FROM. It is lowercased and trailing dots are removed. Internationalized domains must use the ASCII (punycode) form. Ownership is not checked; a domain the account does not send from never matches.`}).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([`scope-type`,`scope-value`].some(t=>e[t]!==void 0)){let t=[`scope-type`].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 --scope-* flag is set`)}return!0})}const X={command:`create`,describe:`Create account Email Sending suppression`,builder:Y,handler:async
|
|
36
|
+
Creates a suppression for every sending domain of the account (default) or for one sending domain (\`scope.type = sending_domain\`). Creating an existing active suppression returns its identifier. If a mutable legacy zone-linked account row already exists, it is promoted without changing its identifier.`).option(`email`,{type:`string`,description:`The email address to suppress.`}).option(`expires-at`,{type:`string`,description:`Expiration timestamp for the suppression. Omit or set to null for a permanent suppression that never expires.`}).option(`note`,{type:`string`,description:`Advisory note for this suppression. Not enforced or validated beyond length.`}).option(`scope-type`,{type:`string`,description:`Blocks the recipient for every sending domain of the account.`,choices:[`account`,`sending_domain`]}).option(`scope-value`,{type:`string`,description:`The sending domain to suppress for: the domain part of the envelope MAIL FROM. It is lowercased and trailing dots are removed. Internationalized domains must use the ASCII (punycode) form. Ownership is not checked; a domain the account does not send from never matches.`}).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([`scope-type`,`scope-value`].some(t=>e[t]!==void 0)){let t=[`scope-type`].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 --scope-* flag is set`)}return!0})}const X={command:`create`,describe:`Create account Email Sending suppression`,builder:Y,handler:async n=>c({command:`email-sending suppressions create`,classification:{safeFlags:[`scope-type`,`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf email-sending suppressions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/email/sending/suppressions`,pathParams:{},bodyKind:`json`,body:n.body===void 0?d({email:f(n.email,`email`,`text`),expires_at:f(n[`expires-at`],`expires-at`,`text`),note:f(n.note,`note`,`text`),scope:{type:f(n[`scope-type`],`scope-type`,`text`),value:f(n[`scope-value`],`scope-value`,`text`)}}):l(n.body)});return}let c=await i(n),u=n.local?e:await r();if(n.accountId=u,n.body){let e=l(n.body);a(await s(`Creating`,async()=>c.emailSending.suppressions.create({...e,account_id:u})),{successLabel:`Created`});return}n.email===void 0&&(n.email=await p(`email`,`The email address to suppress.`));let m=d({email:f(n.email,`email`,`text`),expires_at:f(n[`expires-at`],`expires-at`,`text`),note:f(n.note,`note`,`text`),scope:{type:f(n[`scope-type`],`scope-type`,`text`),value:f(n[`scope-value`],`scope-value`,`text`)}});a(await s(`Creating`,async()=>c.emailSending.suppressions.create({...m,account_id:u})),{successLabel:`Created`})})};function Z(e){return e.usage(`$0 email-sending suppressions delete <suppression-id>
|
|
37
37
|
|
|
38
|
-
Deletes the suppression, its note, and every legacy internal zone membership, allowing future delivery attempts to the address.`).positional(`suppression-id`,{type:`string`,description:`The suppression's identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Q={command:`delete <suppression-id>`,describe:`Delete account Email Sending suppression`,builder:Z,handler:async
|
|
39
|
-
`);return}a(await s(`Deleting`,async()=>c.emailSending.suppressions.delete({account_id:l,suppression_id:
|
|
38
|
+
Deletes the suppression, its note, and every legacy internal zone membership, allowing future delivery attempts to the address.`).positional(`suppression-id`,{type:`string`,description:`The suppression's identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Q={command:`delete <suppression-id>`,describe:`Delete account Email Sending suppression`,builder:Z,handler:async n=>c({command:`email-sending suppressions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){o({command:`cf email-sending suppressions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/email/sending/suppressions/${n[`suppression-id`]==null?`<suppression-id>`:encodeURIComponent(String(n[`suppression-id`]))}`,pathParams:{"suppression-id":String(n[`suppression-id`]??``)},bodyKind:`none`});return}let c=await i(n),l=n.local?e:await r();if(n.accountId=l,!await m({force:!!n.force,message:`This operation removes an Email Sending suppression and may allow email delivery to resume for the address.`})){process.stderr.write(`Aborted.
|
|
39
|
+
`);return}a(await s(`Deleting`,async()=>c.emailSending.suppressions.delete({account_id:l,suppression_id:n[`suppression-id`]})),{successLabel:`Deleted`})})};function ne(e){return e.usage(`$0 email-sending suppressions edit <suppression-id>
|
|
40
40
|
|
|
41
|
-
Updates expiry or advisory note fields without changing legacy internal zone memberships. Scope cannot be changed.`).positional(`suppression-id`,{type:`string`,description:`The suppression's identifier.`,demandOption:!0}).option(`expires-at`,{type:`string`,description:"New expiry. Send `null` to make the suppression permanent; omit to leave it unchanged."}).option(`note`,{type:`string`,description:`Replacement advisory note. Send an empty string to clear it; omit to leave it unchanged.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const re={command:`edit <suppression-id>`,describe:`Update account Email Sending suppression`,builder:ne,handler:async
|
|
41
|
+
Updates expiry or advisory note fields without changing legacy internal zone memberships. Scope cannot be changed.`).positional(`suppression-id`,{type:`string`,description:`The suppression's identifier.`,demandOption:!0}).option(`expires-at`,{type:`string`,description:"New expiry. Send `null` to make the suppression permanent; omit to leave it unchanged."}).option(`note`,{type:`string`,description:`Replacement advisory note. Send an empty string to clear it; omit to leave it unchanged.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const re={command:`edit <suppression-id>`,describe:`Update account Email Sending suppression`,builder:ne,handler:async n=>c({command:`email-sending suppressions edit`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf email-sending suppressions edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/email/sending/suppressions/${n[`suppression-id`]==null?`<suppression-id>`:encodeURIComponent(String(n[`suppression-id`]))}`,pathParams:{"suppression-id":String(n[`suppression-id`]??``)},bodyKind:`json`,body:n.body===void 0?d({expires_at:f(n[`expires-at`],`expires-at`,`text`),note:f(n.note,`note`,`text`)}):l(n.body)});return}let c=await i(n),u=n.local?e:await r();if(n.accountId=u,n.body){let e=l(n.body);a(await s(`Updating`,async()=>c.emailSending.suppressions.edit({...e,account_id:u,suppression_id:n[`suppression-id`]})),{successLabel:`Updated`});return}let p=d({expires_at:f(n[`expires-at`],`expires-at`,`text`),note:f(n.note,`note`,`text`)});a(await s(`Updating`,async()=>c.emailSending.suppressions.edit({...p,account_id:u,suppression_id:n[`suppression-id`]})),{successLabel:`Updated`})})};function ie(e){return e.usage(`$0 email-sending suppressions get <suppression-id>
|
|
42
42
|
|
|
43
|
-
Gets an Email Sending suppression owned by the account.`).positional(`suppression-id`,{type:`string`,description:`The suppression's identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`get <suppression-id>`,describe:`Get account Email Sending suppression`,builder:ie,handler:async
|
|
43
|
+
Gets an Email Sending suppression owned by the account.`).positional(`suppression-id`,{type:`string`,description:`The suppression's identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`get <suppression-id>`,describe:`Get account Email Sending suppression`,builder:ie,handler:async n=>c({command:`email-sending suppressions get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf email-sending suppressions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/email/sending/suppressions/${n[`suppression-id`]==null?`<suppression-id>`:encodeURIComponent(String(n[`suppression-id`]))}`,pathParams:{"suppression-id":String(n[`suppression-id`]??``)},bodyKind:`none`});return}let c=await i(n),l=n.local?e:await r();n.accountId=l,a(await s(`Loading`,async()=>c.emailSending.suppressions.get({account_id:l,suppression_id:n[`suppression-id`]})),{successLabel:`Loaded`})})};function oe(e){return e.usage(`$0 email-sending suppressions import
|
|
44
44
|
|
|
45
|
-
Imports up to 1,000 Email Sending suppressions in one request. Each item applies to every sending domain of the account (default) or to one sending domain.`).option(`items`,{type:`string`,description:`Suppressions to import. Items with the same email address and scope are deduplicated before processing. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const $={command:`import`,describe:`Bulk import account Email Sending suppressions`,builder:oe,handler:async
|
|
45
|
+
Imports up to 1,000 Email Sending suppressions in one request. Each item applies to every sending domain of the account (default) or to one sending domain.`).option(`items`,{type:`string`,description:`Suppressions to import. Items with the same email address and scope are deduplicated before processing. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const $={command:`import`,describe:`Bulk import account Email Sending suppressions`,builder:oe,handler:async n=>c({command:`email-sending suppressions import`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf email-sending suppressions import`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/email/sending/suppressions/bulk`,pathParams:{},bodyKind:`json`,body:n.body===void 0?d({items:u(n.items,`items`)}):l(n.body)});return}let c=await i(n),f=n.local?e:await r();if(n.accountId=f,n.body){let e=l(n.body);a(await s(`Creating`,async()=>c.emailSending.suppressions.import({...e,account_id:f})),{successLabel:`Created`});return}if(n.items===void 0)throw Error(`--items is required (or pass --body with this field set).`);let p=d({items:u(n.items,`items`)});a(await s(`Creating`,async()=>c.emailSending.suppressions.import({...p,account_id:f})),{successLabel:`Created`})})};function se(e){return e.usage(`$0 email-sending suppressions list
|
|
46
46
|
|
|
47
|
-
Lists every active Email Sending suppression owned by the account: sending-domain suppressions first, then account-wide suppressions (including legacy rows with internal zone memberships). Each group is newest first.`).option(`per-page`,{type:`number`,description:`Maximum number of suppressions to return per page.`}).option(`cursor`,{type:`string`,description:"Opaque pagination cursor returned as `result_info.next_cursor`. It carries the filters that produced it."}).option(`email`,{type:`string`,description:`Exact email-address filter.`}).option(`search`,{type:`string`,description:"A complete address is an exact match; a value ending in `@` matches that username across every domain. Prefix searches may return short intermediate pages while the bounded account scan advances."}).option(`reason`,{type:`string`,description:`Filter to suppressions with this reason.`,choices:[`manual`,`complaint`,`hard_bounce`,`soft_bounce`,`policy`]}).option(`scope-type`,{type:`string`,description:"Filter by scope: `account` returns only account-wide suppressions, `sending_domain` only sending-domain suppressions. Omit to list both, sending-domain suppressions first.",choices:[`account`,`sending_domain`]}).option(`scope-value`,{type:`string`,description:"Exact sending-domain filter. Requires `scope_type=sending_domain`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`List account Email Sending suppressions`,builder:ee(se),handler:async
|
|
47
|
+
Lists every active Email Sending suppression owned by the account: sending-domain suppressions first, then account-wide suppressions (including legacy rows with internal zone memberships). Each group is newest first.`).option(`per-page`,{type:`number`,description:`Maximum number of suppressions to return per page.`}).option(`cursor`,{type:`string`,description:"Opaque pagination cursor returned as `result_info.next_cursor`. It carries the filters that produced it."}).option(`email`,{type:`string`,description:`Exact email-address filter.`}).option(`search`,{type:`string`,description:"A complete address is an exact match; a value ending in `@` matches that username across every domain. Prefix searches may return short intermediate pages while the bounded account scan advances."}).option(`reason`,{type:`string`,description:`Filter to suppressions with this reason.`,choices:[`manual`,`complaint`,`hard_bounce`,`soft_bounce`,`policy`]}).option(`scope-type`,{type:`string`,description:"Filter by scope: `account` returns only account-wide suppressions, `sending_domain` only sending-domain suppressions. Omit to list both, sending-domain suppressions first.",choices:[`account`,`sending_domain`]}).option(`scope-value`,{type:`string`,description:"Exact sending-domain filter. Requires `scope_type=sending_domain`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`List account Email Sending suppressions`,builder:ee(se),handler:async n=>c({command:`email-sending suppressions list`,classification:{safeFlags:[`reason`,`scope-type`,`dry-run`]}},n,async()=>{let c={per_page:n[`per-page`],cursor:n.cursor,email:n.email,search:n.search,reason:n.reason,scope_type:n[`scope-type`],scope_value:n[`scope-value`]};if(n.dryRun){o({command:`cf email-sending suppressions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/email/sending/suppressions`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(n),u=n.local?e:await r();n.accountId=u,a(await s(`Loading`,async()=>l.emailSending.suppressions.list({account_id:u,...c})),{successLabel:`Loaded`})})},le={command:`suppressions`,describe:`Prevent delivery to suppressed addresses and manage the account suppression list`,builder:e=>e.command(X).command(Q).command(re).command(ae).command($).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ue={command:`email-sending`,describe:`Send transactional email and manage sending subdomains and their DNS configuration`,builder:e=>e.command(g).command(E).command(w).command(y).command(S).command(J).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ue as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{r as e}from"./sdk-BCzcRJCi.mjs";import{at as t}from"./dist-BuCJ_55d.mjs";function n(e){if(typeof e!=`object`||!e)return[];let t=e.errors;return Array.isArray(t)?t.flatMap(e=>{if(typeof e!=`object`||!e)return[];let t=e.code;return typeof t==`number`&&Number.isFinite(t)?[t]:[]}):[]}function r(e){return typeof e==`number`&&Number.isInteger(e)&&e>=100&&e<=599}function i(e){try{return a(e)}catch{return{errorType:`Error`}}}function a(i){if(i instanceof e){let e=n(i.body);return{errorType:`APIError`,...r(i.statusCode)?{httpStatus:i.statusCode}:{},...e.length===0?{}:{errorCodes:e}}}return i instanceof t?{errorType:`APIError`,...r(i.status)?{httpStatus:i.status}:{},...typeof i.code==`number`&&Number.isFinite(i.code)?{errorCodes:[i.code]}:{}}:i instanceof Error?{errorType:`Error`}:{errorType:typeof i}}export{i as t};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-CEOHpZgd.mjs";import{r}from"./auth-BIr56Mbx.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-A61dRbXl.mjs";import{t as s}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./prompt-CGUzvBgY.mjs";function f(e){return e.usage(`$0 fieldExtractors delete <extractor>
|
|
3
3
|
|
|
4
|
-
Deletes all custom extraction rules for an extractor type.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,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 p={command:`delete <extractor>`,describe:`Delete Field Extractor`,builder:f,handler:async c=>s({command:`fieldExtractors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf fieldExtractors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
4
|
+
Deletes all custom extraction rules for an extractor type.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,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 p={command:`delete <extractor>`,describe:`Delete Field Extractor`,builder:f,handler:async c=>s({command:`fieldExtractors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf fieldExtractors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/field_extractors/${c.extractor==null?`<extractor>`:encodeURIComponent(String(c.extractor))}`,pathParams:{extractor:String(c.extractor??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await d({force:!!c.force})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}i(await o(`Deleting`,async()=>s.fieldExtractors.delete({account_id:l,extractor:c.extractor})),{successLabel:`Deleted`})})};function m(e){return e.usage(`$0 fieldExtractors get <extractor>
|
|
6
6
|
|
|
7
|
-
Retrieves the custom extraction rules configured for a given extractor type.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <extractor>`,describe:`Get Field Extractor`,builder:m,handler:async c=>s({command:`fieldExtractors get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf fieldExtractors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
7
|
+
Retrieves the custom extraction rules configured for a given extractor type.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <extractor>`,describe:`Get Field Extractor`,builder:m,handler:async c=>s({command:`fieldExtractors get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf fieldExtractors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/field_extractors/${c.extractor==null?`<extractor>`:encodeURIComponent(String(c.extractor))}`,pathParams:{extractor:String(c.extractor??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.fieldExtractors.get({account_id:l,extractor:c.extractor})),{successLabel:`Loaded`})})};function g(e){return e.usage(`$0 fieldExtractors update <extractor>
|
|
8
8
|
|
|
9
|
-
Replaces all custom extraction rules for an extractor type. Omitted rules are deleted.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,demandOption:!0}).option(`rules`,{type:`string`,description:`The rules field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Desired-state replacement of all rules for this extractor type.`})}const _={command:`update <extractor>`,describe:`Update Field Extractor`,builder:g,handler:async d=>s({command:`fieldExtractors update`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf fieldExtractors update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
9
|
+
Replaces all custom extraction rules for an extractor type. Omitted rules are deleted.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,demandOption:!0}).option(`rules`,{type:`string`,description:`The rules field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Desired-state replacement of all rules for this extractor type.`})}const _={command:`update <extractor>`,describe:`Update Field Extractor`,builder:g,handler:async d=>s({command:`fieldExtractors update`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf fieldExtractors update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/field_extractors/${d.extractor==null?`<extractor>`:encodeURIComponent(String(d.extractor))}`,pathParams:{extractor:String(d.extractor??``)},bodyKind:`json`,body:d.body===void 0?u({rules:l(d.rules,`rules`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await n();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Updating`,async()=>s.fieldExtractors.update({...e,account_id:f,extractor:d.extractor})),{successLabel:`Updated`});return}if(d.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let p=u({rules:l(d.rules,`rules`)});i(await o(`Updating`,async()=>s.fieldExtractors.update({...p,account_id:f,extractor:d.extractor})),{successLabel:`Updated`})})},v={command:`fieldExtractors`,describe:`fieldExtractors`,builder:e=>e.command(p).command(h).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{v as default};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,i as n,t as r}from"./context-CEOHpZgd.mjs";import{r as i}from"./auth-BIr56Mbx.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-A61dRbXl.mjs";import{t as c}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{n as p}from"./prompt-CGUzvBgY.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 firewall access-rules create
|
|
3
|
+
|
|
4
|
+
Creates a new IP Access rule for an account or zone. The rule will apply to all zones in the account or zone. Note: To create an IP Access rule that applies to a single zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).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 g={command:`create`,describe:`Create an IP Access rule`,builder:h,handler:async u=>c({command:`firewall access-rules create`,classification:{safeFlags:[`configuration-target`,`dry-run`]}},u,async()=>{if(u.dryRun){let e=u.zone===void 0?await t():void 0,n=u.zone===void 0?`accounts`:`zones`,r=u.zone??e??`<account-id>`;o({command:`cf firewall access-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:u.body===void 0?d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)}}):l(u.body)});return}let c=await i(u),p=u.zone===void 0?`accounts`:`zones`,m=p===`zones`?await n({zone:u.zone},c,{quiet:u.quiet}):u.local?e:await r();if(p===`zones`?u.zoneId=m:u.accountId=m,u.body){let e=l(u.body);a(await s(`Creating`,async()=>c.firewall.accessRules.create({...e,account_or_zone:p,account_or_zone_id:m})),{successLabel:`Created`});return}let h=d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)}});a(await s(`Creating`,async()=>c.firewall.accessRules.create({...h,account_or_zone:p,account_or_zone_id:m})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 firewall access-rules delete <rule-id>
|
|
5
|
+
|
|
6
|
+
Deletes an existing IP Access rule defined. Note: This operation will affect all zones in the account or zone.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const v={command:`delete <rule-id>`,describe:`Delete an IP Access rule`,builder:_,handler:async l=>c({command:`firewall access-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf firewall access-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/firewall/access_rules/rules/${l[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(l[`rule-id`]))}`,pathParams:{"account-or-zone":String(n),"rule-id":String(l[`rule-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();if(u===`zones`?l.zoneId=d:l.accountId=d,!await p({force:!!l.force,message:`This operation deletes the account-level IP Access Rule and affects every zone in the account.`})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}a(await s(`Deleting`,async()=>c.firewall.accessRules.delete({account_or_zone:u,account_or_zone_id:d,rule_id:l[`rule-id`]})),{successLabel:`Deleted`})})};function y(e){return e.usage(`$0 firewall access-rules edit <rule-id>
|
|
8
|
+
|
|
9
|
+
Updates an IP Access rule defined. Note: This operation will affect all zones in the account or zone.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`notes`,{type:`string`,description:`An informative summary of the rule, typically used as a reminder or explanation.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const b={command:`edit <rule-id>`,describe:`Update an IP Access rule`,builder:y,handler:async u=>c({command:`firewall access-rules edit`,classification:{safeFlags:[`configuration-target`,`dry-run`]}},u,async()=>{if(u.dryRun){let e=u.zone===void 0?await t():void 0,n=u.zone===void 0?`accounts`:`zones`,r=u.zone??e??`<account-id>`;o({command:`cf firewall access-rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/firewall/access_rules/rules/${u[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(u[`rule-id`]))}`,pathParams:{"account-or-zone":String(n),"rule-id":String(u[`rule-id`]??``),"account-or-zone-id":String(r)},bodyKind:`json`,body:u.body===void 0?d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)},notes:f(u.notes,`notes`,`text`)}):l(u.body)});return}let c=await i(u),p=u.zone===void 0?`accounts`:`zones`,m=p===`zones`?await n({zone:u.zone},c,{quiet:u.quiet}):u.local?e:await r();if(p===`zones`?u.zoneId=m:u.accountId=m,u.body){let e=l(u.body);a(await s(`Updating`,async()=>c.firewall.accessRules.edit({body:e,account_or_zone:p,account_or_zone_id:m,rule_id:u[`rule-id`]})),{successLabel:`Updated`});return}let h=d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)},notes:f(u.notes,`notes`,`text`)});a(await s(`Updating`,async()=>c.firewall.accessRules.edit({body:h,account_or_zone:p,account_or_zone_id:m,rule_id:u[`rule-id`]})),{successLabel:`Updated`})})};function x(e){return e.usage(`$0 firewall access-rules get <rule-id>
|
|
10
|
+
|
|
11
|
+
Fetches the details of an IP Access rule defined.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <rule-id>`,describe:`Get an IP Access rule`,builder:x,handler:async l=>c({command:`firewall access-rules get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf firewall access-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/firewall/access_rules/rules/${l[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(l[`rule-id`]))}`,pathParams:{"account-or-zone":String(n),"rule-id":String(l[`rule-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.firewall.accessRules.get({account_or_zone:u,account_or_zone_id:d,rule_id:l[`rule-id`]})),{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 firewall access-rules list
|
|
12
|
+
|
|
13
|
+
Fetches IP Access rules of an account or zone. These rules apply to all the zones in the account or zone. You can filter the results using several optional parameters.`).option(`configuration-target`,{type:`string`,description:`Defines the target to search in existing rules.`,choices:[`ip`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:"Defines the target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`.\nNotes: You can search for a single IPv4 address, an IP address range with a subnet of '/16' or '/24', or a two-letter ISO-3166-1 alpha-2 country code."}).option(`notes`,{type:`string`,description:`Defines the string to search for in the notes of existing IP Access rules.
|
|
14
|
+
Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive.`}).option(`match`,{type:`string`,description:"Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Defines the requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Defines the maximum number of results requested.`}).option(`order`,{type:`string`,description:`Defines the field used to sort returned rules.`,choices:[`configuration.target`,`configuration.value`,`mode`]}).option(`direction`,{type:`string`,description:`Defines the direction used to sort returned rules.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`list`,describe:`List IP Access rules`,builder:m(C),handler:async l=>c({command:`firewall access-rules list`,classification:{safeFlags:[`configuration-target`,`match`,`order`,`direction`,`dry-run`]}},l,async()=>{let c={"configuration.target":l[`configuration-target`],"configuration.value":l[`configuration-value`],notes:l.notes,match:l.match,page:l.page,per_page:l[`per-page`],order:l.order,direction:l.direction};if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf firewall access-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await r();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.firewall.accessRules.list({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})},T={command:`access-rules`,describe:`IP-based access rules that allow, block, challenge, or whitelist traffic globally or per-zone`,builder:e=>e.command(g).command(v).command(b).command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 firewall lockdowns create
|
|
15
|
+
|
|
16
|
+
Creates a new Zone Lockdown rule.`).option(`configurations`,{type:`string`,description:"A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. Provide as a JSON array of objects or @path/to/file.json."}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`priority`,{type:`number`,description:`The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.`}).option(`urls`,{type:`string`,array:!0,description:`The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.`}).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 D={command:`create`,describe:`Create a Zone Lockdown rule`,builder:E,handler:async e=>c({command:`firewall lockdowns create`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall lockdowns create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configurations:u(e.configurations,`configurations`),description:f(e.description,`description`,`text`),paused:e.paused,priority:e.priority,urls:e.urls}):l(e.body)});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=l(e.body);a(await s(`Creating`,async()=>t.firewall.lockdowns.create({...n,zone_id:r})),{successLabel:`Created`});return}if(e.configurations===void 0)throw Error(`--configurations is required (or pass --body with this field set).`);if(e.urls===void 0)throw Error(`--urls is required (or pass --body with this field set).`);let c=d({configurations:u(e.configurations,`configurations`),description:f(e.description,`description`,`text`),paused:e.paused,priority:e.priority,urls:e.urls});a(await s(`Creating`,async()=>t.firewall.lockdowns.create({...c,zone_id:r})),{successLabel:`Created`})})};function O(e){return e.usage(`$0 firewall lockdowns delete <lock-downs-id>
|
|
17
|
+
|
|
18
|
+
Deletes an existing Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,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 k={command:`delete <lock-downs-id>`,describe:`Delete a Zone Lockdown rule`,builder:O,handler:async e=>c({command:`firewall lockdowns delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf firewall lockdowns delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns/${e[`lock-downs-id`]==null?`<lock-downs-id>`:encodeURIComponent(String(e[`lock-downs-id`]))}`,pathParams:{"lock-downs-id":String(e[`lock-downs-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await p({force:!!e.force,message:`This operation deletes the Zone Lockdown rule from the zone.`})){process.stderr.write(`Aborted.
|
|
19
|
+
`);return}a(await s(`Deleting`,async()=>t.firewall.lockdowns.delete({zone_id:r,lock_downs_id:e[`lock-downs-id`]})),{successLabel:`Deleted`})})};function A(e){return e.usage(`$0 firewall lockdowns get <lock-downs-id>
|
|
20
|
+
|
|
21
|
+
Fetches the details of a Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get <lock-downs-id>`,describe:`Get a Zone Lockdown rule`,builder:A,handler:async e=>c({command:`firewall lockdowns get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall lockdowns get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns/${e[`lock-downs-id`]==null?`<lock-downs-id>`:encodeURIComponent(String(e[`lock-downs-id`]))}`,pathParams:{"lock-downs-id":String(e[`lock-downs-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>t.firewall.lockdowns.get({zone_id:r,lock_downs_id:e[`lock-downs-id`]})),{successLabel:`Loaded`})})};function M(e){return e.usage(`$0 firewall lockdowns list
|
|
22
|
+
|
|
23
|
+
Fetches Zone Lockdown rules. You can filter the results using several optional parameters.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`description`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`modified-on`,{type:`string`,description:`The timestamp of when the rule was last modified.`}).option(`ip`,{type:`string`,description:`A single IP address to search for in existing rules.`}).option(`priority`,{type:`number`,description:`The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.`}).option(`uri-search`,{type:`string`,description:`A single URI to search for in the list of URLs of existing rules.`}).option(`ip-range-search`,{type:`string`,description:`A single IP address range to search for in existing rules.`}).option(`per-page`,{type:`number`,description:"The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`."}).option(`created-on`,{type:`string`,description:`The timestamp of when the rule was created.`}).option(`description-search`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`ip-search`,{type:`string`,description:`A single IP address to search for in existing rules.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:`List Zone Lockdown rules`,builder:M,handler:async e=>c({command:`firewall lockdowns list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,description:e.description,modified_on:e[`modified-on`],ip:e.ip,priority:e.priority,uri_search:e[`uri-search`],ip_range_search:e[`ip-range-search`],per_page:e[`per-page`],created_on:e[`created-on`],description_search:e[`description-search`],ip_search:e[`ip-search`]};if(e.dryRun){o({command:`cf firewall lockdowns list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let r=await i(e),c=await n({zone:e.zone},r,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>r.firewall.lockdowns.list({zone_id:c,...t})),{successLabel:`Loaded`})})};function P(e){return e.usage(`$0 firewall lockdowns update <lock-downs-id>
|
|
24
|
+
|
|
25
|
+
Updates an existing Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,demandOption:!0}).option(`configurations`,{type:`string`,description:"A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. Provide as a JSON array of objects or @path/to/file.json."}).option(`urls`,{type:`string`,array:!0,description:`The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.`}).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 F={command:`update <lock-downs-id>`,describe:`Update a Zone Lockdown rule`,builder:P,handler:async e=>c({command:`firewall lockdowns update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall lockdowns update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns/${e[`lock-downs-id`]==null?`<lock-downs-id>`:encodeURIComponent(String(e[`lock-downs-id`]))}`,pathParams:{"lock-downs-id":String(e[`lock-downs-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configurations:u(e.configurations,`configurations`),urls:e.urls}):l(e.body)});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=l(e.body);a(await s(`Updating`,async()=>t.firewall.lockdowns.update({...n,zone_id:r,lock_downs_id:e[`lock-downs-id`]})),{successLabel:`Updated`});return}if(e.configurations===void 0)throw Error(`--configurations is required (or pass --body with this field set).`);if(e.urls===void 0)throw Error(`--urls is required (or pass --body with this field set).`);let c=d({configurations:u(e.configurations,`configurations`),urls:e.urls});a(await s(`Updating`,async()=>t.firewall.lockdowns.update({...c,zone_id:r,lock_downs_id:e[`lock-downs-id`]})),{successLabel:`Updated`})})},I={command:`lockdowns`,describe:`Zone lockdown rules that restrict access to URLs by IP address or range`,builder:e=>e.command(D).command(k).command(j).command(N).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.usage(`$0 firewall ua-rules create
|
|
26
|
+
|
|
27
|
+
Creates a new User Agent Blocking rule in a zone.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ua` when specifying a user agent in the rule.",choices:[`ua`]}).option(`configuration-value`,{type:`string`,description:`the user agent to exactly match`}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).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 R={command:`create`,describe:`Create a User Agent Blocking rule`,builder:L,handler:async e=>c({command:`firewall ua-rules create`,classification:{safeFlags:[`configuration-target`,`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall ua-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configuration:{target:f(e[`configuration-target`],`configuration-target`,`text`),value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused}):l(e.body)});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=l(e.body);a(await s(`Creating`,async()=>t.firewall.uaRules.create({...n,zone_id:r})),{successLabel:`Created`});return}let c=d({configuration:{target:f(e[`configuration-target`],`configuration-target`,`text`),value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused});a(await s(`Creating`,async()=>t.firewall.uaRules.create({...c,zone_id:r})),{successLabel:`Created`})})};function z(e){return e.usage(`$0 firewall ua-rules delete <ua-rule-id>
|
|
28
|
+
|
|
29
|
+
Deletes an existing User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,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 <ua-rule-id>`,describe:`Delete a User Agent Blocking rule`,builder:z,handler:async e=>c({command:`firewall ua-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf firewall ua-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"ua-rule-id":String(e[`ua-rule-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await p({force:!!e.force,message:`This operation deletes the User Agent Blocking rule from the zone.`})){process.stderr.write(`Aborted.
|
|
30
|
+
`);return}a(await s(`Deleting`,async()=>t.firewall.uaRules.delete({zone_id:r,ua_rule_id:e[`ua-rule-id`]})),{successLabel:`Deleted`})})};function V(e){return e.usage(`$0 firewall ua-rules get <ua-rule-id>
|
|
31
|
+
|
|
32
|
+
Fetches the details of a User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <ua-rule-id>`,describe:`Get a User Agent Blocking rule`,builder:V,handler:async e=>c({command:`firewall ua-rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall ua-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"ua-rule-id":String(e[`ua-rule-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>t.firewall.uaRules.get({zone_id:r,ua_rule_id:e[`ua-rule-id`]})),{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 firewall ua-rules list
|
|
33
|
+
|
|
34
|
+
Fetches User Agent Blocking rules in a zone. You can filter the results using several optional parameters.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`description`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`per-page`,{type:`number`,description:"The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`."}).option(`user-agent`,{type:`string`,description:`A string to search for in the user agent values of existing rules.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List User Agent Blocking rules`,builder:U,handler:async e=>c({command:`firewall ua-rules list`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{let t={page:e.page,description:e.description,per_page:e[`per-page`],user_agent:e[`user-agent`],paused:e.paused};if(e.dryRun){o({command:`cf firewall ua-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let r=await i(e),c=await n({zone:e.zone},r,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>r.firewall.uaRules.list({zone_id:c,...t})),{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 firewall ua-rules update <ua-rule-id>
|
|
35
|
+
|
|
36
|
+
Updates an existing User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).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 K={command:`update <ua-rule-id>`,describe:`Update a User Agent Blocking rule`,builder:G,handler:async e=>c({command:`firewall ua-rules update`,classification:{safeFlags:[`configuration-target`,`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall ua-rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"ua-rule-id":String(e[`ua-rule-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configuration:{target:f(e[`configuration-target`],`configuration-target`,`text`),value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused}):l(e.body)});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=l(e.body);a(await s(`Updating`,async()=>t.firewall.uaRules.update({...n,zone_id:r,ua_rule_id:e[`ua-rule-id`]})),{successLabel:`Updated`});return}let c=d({configuration:{target:f(e[`configuration-target`],`configuration-target`,`text`),value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused});a(await s(`Updating`,async()=>t.firewall.uaRules.update({...c,zone_id:r,ua_rule_id:e[`ua-rule-id`]})),{successLabel:`Updated`})})},q={command:`ua-rules`,describe:`Block or challenge requests based on the User-Agent header string`,builder:e=>e.command(R).command(B).command(H).command(W).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`firewall`,describe:`Legacy firewall rules, zone lockdowns, access rules, user-agent blocking, and WAF packages`,builder:e=>e.command(T).command(I).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{J as default};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-CEOHpZgd.mjs";import{a as r,r as i}from"./auth-BIr56Mbx.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-A61dRbXl.mjs";import{t as c}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,n as m}from"./prompt-CGUzvBgY.mjs";function h(e){return e.usage(`$0 flagship apps create
|
|
3
|
+
|
|
4
|
+
Creates an app. The returned \`id\` is used in all subsequent flag, changelog, and evaluation requests.`).option(`name`,{type:`string`,description:`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create app`,builder:h,handler:async r=>c({command:`flagship apps create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({name:f(r.name,`name`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await n();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.flagship.apps.create({...e,account_id:u})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await p(`name`,`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`));let m=d({name:f(r.name,`name`,`text`)});a(await s(`Creating`,async()=>c.flagship.apps.create({...m,account_id:u})),{successLabel:`Created`})})};function _(e){return e.usage("$0 flagship apps definitions get <app-id>\n\nReturns an app's evaluation-only flag definitions for SDKs that evaluate locally. Send the returned `ETag` in `If-None-Match` to avoid downloading unchanged definitions.").positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`if-none-match`,{type:`string`,description:"Previously returned ETag, or `*`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <app-id>`,describe:`Get flag definitions`,builder:_,handler:async l=>c({command:`flagship apps definitions get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`if-none-match`]!==void 0&&(c[`If-None-Match`]=String(l[`if-none-match`])),l.dryRun){o({command:`cf flagship apps definitions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/flagship/apps/${l[`app-id`]==null?`<app-id>`:encodeURIComponent(String(l[`app-id`]))}/definitions`,pathParams:{"app-id":String(l[`app-id`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();l.accountId=d,a(await s(`Loading`,async()=>r(u,`GET`,`/accounts/${d}/flagship/apps/${encodeURIComponent(String(l[`app-id`]))}/definitions`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Loaded`})})},y={command:`definitions`,describe:`Operations for apps.definitions`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 flagship apps delete <app-id>
|
|
5
|
+
|
|
6
|
+
Deletes an app and all its flags and changelog history. Returns 409 if any Worker still references this app via a Flagship binding.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const x={command:`delete <app-id>`,describe:`Delete app`,builder:b,handler:async r=>c({command:`flagship apps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}`,pathParams:{"app-id":String(r[`app-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await m({force:!!r.force,message:`Delete this Flagship app, all of its flags, and all changelog history? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}a(await s(`Deleting`,async()=>c.flagship.apps.delete({account_id:l,app_id:r[`app-id`]})),{successLabel:`Deleted`})})};function S(e){return e.usage(`$0 flagship apps evaluate get <app-id>
|
|
8
|
+
|
|
9
|
+
Evaluates a flag against the provided context. Pass context attributes as query parameters; values are coerced to numbers or booleans where unambiguous. For low-latency in-Worker evaluation, prefer the Flagship binding over this endpoint.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`flag-key`,{type:`string`,description:`The flag key to evaluate.`,demandOption:!0}).option(`targeting-key`,{type:`string`,description:`Context targeting key (per OpenFeature spec); used for percentage rollout bucketing.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <app-id>`,describe:`Evaluate flag from query context`,builder:S,handler:async r=>c({command:`flagship apps evaluate get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={flagKey:r[`flag-key`],targetingKey:r[`targeting-key`]};if(r.dryRun){o({command:`cf flagship apps evaluate get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}/evaluate`,pathParams:{"app-id":String(r[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.flagship.apps.evaluate.get({account_id:u,app_id:r[`app-id`],...c})),{successLabel:`Loaded`})})},w={command:`evaluate`,describe:`Operations for apps.evaluate`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 flagship apps flags changelog list
|
|
10
|
+
|
|
11
|
+
Returns the audit history for a flag, newest first. Each entry includes the event type and full flag state after the change; \`update\` entries include a field-level diff. Capped at 200 entries per flag.`).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Max items to return (1–200).`}).option(`cursor`,{type:`string`,description:`Pagination cursor from a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List flag changelog entries`,builder:T,handler:async r=>c({command:`flagship apps flags changelog list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,cursor:r.cursor};if(r.dryRun){o({command:`cf flagship apps flags changelog list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}/flags/${r[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(r[`flag-key`]))}/changelog`,pathParams:{"app-id":String(r[`app-id`]??``),"flag-key":String(r[`flag-key`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.flagship.apps.flags.changelog.list({account_id:u,app_id:r[`app-id`],flag_key:r[`flag-key`],...c})),{successLabel:`Loaded`})})},D={command:`changelog`,describe:`Operations for apps.flags.changelog`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.usage(`$0 flagship apps flags create <app-id>
|
|
12
|
+
|
|
13
|
+
Creates a flag. Returns 409 if the key already exists. \`type\` is always inferred from variation values; legacy request-side values are ignored.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`default-variation`,{type:`string`,description:"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`."}).option(`description`,{type:`string`,description:`Optional operator-facing description. It does not affect flag evaluation.`}).option(`enabled`,{type:`boolean`,description:"When false, the flag bypasses all rules and always serves `default_variation`."}).option(`key`,{type:`string`,description:`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`}).option(`rules`,{type:`string`,description:"Targeting rules evaluated in ascending `priority`; the first matching rule wins. An empty array means the flag always serves `default_variation`. Provide as a JSON array of objects or @path/to/file.json."}).option(`type`,{type:`string`,description:`Deprecated compatibility field. Omit it; the API ignores this value and infers the type from the flag's variations.`,choices:[`boolean`,`string`,`number`,`json`]}).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 k={command:`create <app-id>`,describe:`Create flag`,builder:O,handler:async r=>c({command:`flagship apps flags create`,classification:{safeFlags:[`enabled`,`type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps flags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}/flags`,pathParams:{"app-id":String(r[`app-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({default_variation:f(r[`default-variation`],`default-variation`,`text`),description:f(r.description,`description`,`text`),enabled:r.enabled,key:f(r.key,`key`,`text`),rules:u(r.rules,`rules`),type:f(r.type,`type`,`text`)}):l(r.body)});return}let c=await i(r),m=r.local?e:await n();if(r.accountId=m,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.flagship.apps.flags.create({...e,account_id:m,app_id:r[`app-id`]})),{successLabel:`Created`});return}if(r[`default-variation`]===void 0&&(r[`default-variation`]=await p(`default-variation`,"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`.")),r.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(r.key===void 0&&(r.key=await p(`key`,`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`)),r.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let h=d({default_variation:f(r[`default-variation`],`default-variation`,`text`),description:f(r.description,`description`,`text`),enabled:r.enabled,key:f(r.key,`key`,`text`),rules:u(r.rules,`rules`),type:f(r.type,`type`,`text`)});a(await s(`Creating`,async()=>c.flagship.apps.flags.create({...h,account_id:m,app_id:r[`app-id`]})),{successLabel:`Created`})})};function A(e){return e.usage(`$0 flagship apps flags delete <flag-key>
|
|
14
|
+
|
|
15
|
+
Deletes a flag permanently. After deletion propagates, direct evaluations return not found; typed binding accessors may return the caller-supplied default. Cannot be undone.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const j={command:`delete <flag-key>`,describe:`Delete flag`,builder:A,handler:async r=>c({command:`flagship apps flags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps flags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}/flags/${r[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(r[`flag-key`]))}`,pathParams:{"app-id":String(r[`app-id`]??``),"flag-key":String(r[`flag-key`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await m({force:!!r.force,message:`Delete this feature flag? After the deletion propagates, evaluation requests can no longer resolve it. This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
16
|
+
`);return}a(await s(`Deleting`,async()=>c.flagship.apps.flags.delete({account_id:l,app_id:r[`app-id`],flag_key:r[`flag-key`]})),{successLabel:`Deleted`})})};function M(e){return e.usage(`$0 flagship apps flags evaluate <app-id>
|
|
17
|
+
|
|
18
|
+
Evaluates a flag against the provided context, passed as a JSON request body (OFREP-shaped) rather than query parameters. Returns the same response shape as the GET variant.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`flag-key`,{type:`string`,description:`Key of the flag to evaluate within the app.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`evaluate <app-id>`,describe:`Evaluate flag with JSON context`,builder:M,handler:async r=>c({command:`flagship apps flags evaluate`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps flags evaluate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}/evaluate`,pathParams:{"app-id":String(r[`app-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({flagKey:f(r[`flag-key`],`flag-key`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await n();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.flagship.apps.flags.evaluate({...e,account_id:u,app_id:r[`app-id`]})),{successLabel:`Created`});return}r[`flag-key`]===void 0&&(r[`flag-key`]=await p(`flag-key`,`Key of the flag to evaluate within the app.`));let m=d({flagKey:f(r[`flag-key`],`flag-key`,`text`)});a(await s(`Creating`,async()=>c.flagship.apps.flags.evaluate({...m,account_id:u,app_id:r[`app-id`]})),{successLabel:`Created`})})};function P(e){return e.usage(`$0 flagship apps flags get <flag-key>
|
|
19
|
+
|
|
20
|
+
Returns the full flag definition including rules, variations, and audit fields.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <flag-key>`,describe:`Get flag`,builder:P,handler:async r=>c({command:`flagship apps flags get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps flags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}/flags/${r[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(r[`flag-key`]))}`,pathParams:{"app-id":String(r[`app-id`]??``),"flag-key":String(r[`flag-key`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.flagship.apps.flags.get({account_id:l,app_id:r[`app-id`],flag_key:r[`flag-key`]})),{successLabel:`Loaded`})})};function I(e){return e.usage("$0 flagship apps flags list\n\nLists an app's flags ordered by key. Pass `cursor` from `result_info` to page forward; a null cursor indicates the last page.").option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Max items to return (1–200).`}).option(`cursor`,{type:`string`,description:`Pagination cursor from a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List flags`,builder:I,handler:async r=>c({command:`flagship apps flags list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,cursor:r.cursor};if(r.dryRun){o({command:`cf flagship apps flags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}/flags`,pathParams:{"app-id":String(r[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.flagship.apps.flags.list({account_id:u,app_id:r[`app-id`],...c})),{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 flagship apps flags update <flag-key>
|
|
21
|
+
|
|
22
|
+
Replaces the entire flag definition. Omitted fields are dropped, not preserved — read before writing. The path key identifies the flag and cannot be renamed by changing the body \`key\`. Each update appends a changelog entry.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`default-variation`,{type:`string`,description:"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`."}).option(`description`,{type:`string`,description:`Optional operator-facing description. It does not affect flag evaluation.`}).option(`enabled`,{type:`boolean`,description:"When false, the flag bypasses all rules and always serves `default_variation`."}).option(`key`,{type:`string`,description:`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`}).option(`rules`,{type:`string`,description:"Targeting rules evaluated in ascending `priority`; the first matching rule wins. An empty array means the flag always serves `default_variation`. Provide as a JSON array of objects or @path/to/file.json."}).option(`type`,{type:`string`,description:`Deprecated compatibility field. Omit it; the API ignores this value and infers the type from the flag's variations.`,choices:[`boolean`,`string`,`number`,`json`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`update <flag-key>`,describe:`Update flag`,builder:R,handler:async r=>c({command:`flagship apps flags update`,classification:{safeFlags:[`enabled`,`type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps flags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}/flags/${r[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(r[`flag-key`]))}`,pathParams:{"app-id":String(r[`app-id`]??``),"flag-key":String(r[`flag-key`]??``)},bodyKind:`json`,body:r.body===void 0?d({default_variation:f(r[`default-variation`],`default-variation`,`text`),description:f(r.description,`description`,`text`),enabled:r.enabled,key:f(r.key,`key`,`text`),rules:u(r.rules,`rules`),type:f(r.type,`type`,`text`)}):l(r.body)});return}let c=await i(r),m=r.local?e:await n();if(r.accountId=m,r.body){let e=l(r.body);a(await s(`Updating`,async()=>c.flagship.apps.flags.update({...e,account_id:m,app_id:r[`app-id`],flag_key:r[`flag-key`]})),{successLabel:`Updated`});return}if(r[`default-variation`]===void 0&&(r[`default-variation`]=await p(`default-variation`,"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`.")),r.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(r.key===void 0&&(r.key=await p(`key`,`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`)),r.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let h=d({default_variation:f(r[`default-variation`],`default-variation`,`text`),description:f(r.description,`description`,`text`),enabled:r.enabled,key:f(r.key,`key`,`text`),rules:u(r.rules,`rules`),type:f(r.type,`type`,`text`)});a(await s(`Updating`,async()=>c.flagship.apps.flags.update({...h,account_id:m,app_id:r[`app-id`],flag_key:r[`flag-key`]})),{successLabel:`Updated`})})},B={command:`flags`,describe:`Operations for apps.flags`,builder:e=>e.command(k).command(j).command(N).command(F).command(L).command(z).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.usage(`$0 flagship apps get <app-id>
|
|
23
|
+
|
|
24
|
+
Returns an app's name and audit fields. Flag definitions are not included.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <app-id>`,describe:`Get app`,builder:V,handler:async r=>c({command:`flagship apps get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}`,pathParams:{"app-id":String(r[`app-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.flagship.apps.get({account_id:l,app_id:r[`app-id`]})),{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 flagship apps list
|
|
25
|
+
|
|
26
|
+
Lists all Flagship apps in the account. Returns identity and audit fields only; flag definitions are not included.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List apps`,builder:U,handler:async r=>c({command:`flagship apps list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.flagship.apps.list({account_id:l})),{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 flagship apps update <app-id>
|
|
27
|
+
|
|
28
|
+
Updates an app. Only \`name\` is mutable.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const K={command:`update <app-id>`,describe:`Update app`,builder:G,handler:async r=>c({command:`flagship apps update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}`,pathParams:{"app-id":String(r[`app-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({name:f(r.name,`name`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await n();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Updating`,async()=>c.flagship.apps.update({...e,account_id:u,app_id:r[`app-id`]})),{successLabel:`Updated`});return}let p=d({name:f(r.name,`name`,`text`)});a(await s(`Updating`,async()=>c.flagship.apps.update({...p,account_id:u,app_id:r[`app-id`]})),{successLabel:`Updated`})})},q={command:`apps`,describe:`Operations for apps`,builder:e=>e.command(g).command(x).command(H).command(W).command(K).command(y).command(w).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`flagship`,describe:`flagship`,builder:e=>e.command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{J as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import{i as e}from"./context-CEOHpZgd.mjs";import{r as t}from"./auth-BIr56Mbx.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-A61dRbXl.mjs";import{t as a}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";function l(e){return e.usage(`$0 fraud get
|
|
3
3
|
|
|
4
4
|
Retrieve Fraud Detection settings for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`Get Fraud Detection Settings`,builder:l,handler:async o=>a({command:`fraud get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf fraud get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/fraud_detection/settings`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.fraud.get({zone_id:s})),{successLabel:`Loaded`})})};function d(e){return e.usage("$0 fraud update\n\nUpdate Fraud Detection settings for a zone. Notes on `username_expressions` behavior: - If omitted or set to null, expressions are not modified. - If provided as an empty array `[]`, all expressions will be cleared.").option(`authentication-settings-failure-criteria-kind`,{type:`string`,description:"The type of criterion. Currently only `status_code` is supported.",choices:[`status_code`]}).option(`authentication-settings-failure-criteria-status-codes`,{type:`string`,array:!0,description:`HTTP status codes to match against the origin response.
|
|
5
5
|
- Maximum of 10 codes per criterion.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./project-settings-DO6njFg_.mjs";import*as t from"node:path";import*as n from"node:fs/promises";import{generateTypes as r,loadAndParseConfig as i}from"@cloudflare/config";import{RUNTIME_TYPES_MARKER as a,generateRuntimeTypes as o}from"@cloudflare/runtime-types";const s=t.join(`.cloudflare`,`types`,`index.d.ts`);function c(e){return e.map(e=>{let t=e.path.filter(e=>typeof e!=`symbol`).join(`.`);return` - ${t?`${t}: `:``}${e.message}`}).join(`
|
|
3
|
+
`)}function l(e,n){let r=t.relative(e,n).split(t.sep).join(`/`);return r.startsWith(`.`)?r:`./${r}`}async function u(u){let{configPath:d}=u,f=await i(d,{isPreview:!1,mode:u.mode});if(!f.result.success)throw Error(`Invalid ${e}:\n${c(f.result.error.issues)}`);let p=f.result.data.worker;if(p===void 0)throw Error(`${e} must define a Worker to generate types.`);let m=t.dirname(d),h=t.join(m,s),g;try{g=await n.readFile(h,`utf8`)}catch{}let _=r({configPath:l(t.dirname(h),d),packageName:`cf/config`});if(u.includeRuntime){let{runtimeHeader:e,runtimeTypes:t}=await o({compatibilityDate:p.compatibilityDate,compatibilityFlags:p.compatibilityFlags??[],existingContent:g});_+=`\n${e}\n${a}\n${t}`}return g!==_&&(await n.mkdir(t.dirname(h),{recursive:!0}),await n.writeFile(h,_)),h}export{u as n,s as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import{i as e}from"./context-CEOHpZgd.mjs";import{r as t}from"./auth-BIr56Mbx.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-A61dRbXl.mjs";import{t as a}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{a as l}from"./prompt-CGUzvBgY.mjs";function u(e){return e.usage(`$0 google-tag-gateway config get
|
|
3
3
|
|
|
4
4
|
Gets the Google Tag Gateway configuration for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get Google Tag Gateway configuration`,builder:u,handler:async o=>a({command:`google-tag-gateway config get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf google-tag-gateway config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/google-tag-gateway/config`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.googleTagGateway.config.get({zone_id:s})),{successLabel:`Loaded`})})};function f(e){return e.usage(`$0 google-tag-gateway config update
|
|
5
5
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{n as e}from"./source-38bULAR8.mjs";var t=e(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),n=e(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),r=e(((e,r)=>{let{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:o}=n(),s=t();e=r.exports={};let c=e.re=[],l=e.safeRe=[],u=e.src=[],d=e.safeSrc=[],f=e.t={},p=0,m=`[a-zA-Z0-9-]`,h=[[`\\s`,1],[`\\d`,o],[m,a]],g=e=>{for(let[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},_=(e,t,n)=>{let r=g(t),i=p++;s(e,i,t),f[e]=i,u[i]=t,d[i]=r,c[i]=new RegExp(t,n?`g`:void 0),l[i]=new RegExp(r,n?`g`:void 0)};_(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),_(`NUMERICIDENTIFIERLOOSE`,`\\d+`),_(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${m}*`),_(`MAINVERSION`,`(${u[f.NUMERICIDENTIFIER]})\\.(${u[f.NUMERICIDENTIFIER]})\\.(${u[f.NUMERICIDENTIFIER]})`),_(`MAINVERSIONLOOSE`,`(${u[f.NUMERICIDENTIFIERLOOSE]})\\.(${u[f.NUMERICIDENTIFIERLOOSE]})\\.(${u[f.NUMERICIDENTIFIERLOOSE]})`),_(`PRERELEASEIDENTIFIER`,`(?:${u[f.NONNUMERICIDENTIFIER]}|${u[f.NUMERICIDENTIFIER]})`),_(`PRERELEASEIDENTIFIERLOOSE`,`(?:${u[f.NONNUMERICIDENTIFIER]}|${u[f.NUMERICIDENTIFIERLOOSE]})`),_(`PRERELEASE`,`(?:-(${u[f.PRERELEASEIDENTIFIER]}(?:\\.${u[f.PRERELEASEIDENTIFIER]})*))`),_(`PRERELEASELOOSE`,`(?:-?(${u[f.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[f.PRERELEASEIDENTIFIERLOOSE]})*))`),_(`BUILDIDENTIFIER`,`${m}+`),_(`BUILD`,`(?:\\+(${u[f.BUILDIDENTIFIER]}(?:\\.${u[f.BUILDIDENTIFIER]})*))`),_(`FULLPLAIN`,`v?${u[f.MAINVERSION]}${u[f.PRERELEASE]}?${u[f.BUILD]}?`),_(`FULL`,`^${u[f.FULLPLAIN]}$`),_(`LOOSEPLAIN`,`[v=\\s]*${u[f.MAINVERSIONLOOSE]}${u[f.PRERELEASELOOSE]}?${u[f.BUILD]}?`),_(`LOOSE`,`^${u[f.LOOSEPLAIN]}$`),_(`GTLT`,`((?:<|>)?=?)`),_(`XRANGEIDENTIFIERLOOSE`,`${u[f.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),_(`XRANGEIDENTIFIER`,`${u[f.NUMERICIDENTIFIER]}|x|X|\\*`),_(`XRANGEPLAIN`,`[v=\\s]*(${u[f.XRANGEIDENTIFIER]})(?:\\.(${u[f.XRANGEIDENTIFIER]})(?:\\.(${u[f.XRANGEIDENTIFIER]})(?:${u[f.PRERELEASE]})?${u[f.BUILD]}?)?)?`),_(`XRANGEPLAINLOOSE`,`[v=\\s]*(${u[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[f.XRANGEIDENTIFIERLOOSE]})(?:${u[f.PRERELEASELOOSE]})?${u[f.BUILD]}?)?)?`),_(`XRANGE`,`^${u[f.GTLT]}\\s*${u[f.XRANGEPLAIN]}$`),_(`XRANGELOOSE`,`^${u[f.GTLT]}\\s*${u[f.XRANGEPLAINLOOSE]}$`),_(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),_(`COERCE`,`${u[f.COERCEPLAIN]}(?:$|[^\\d])`),_(`COERCEFULL`,u[f.COERCEPLAIN]+`(?:${u[f.PRERELEASE]})?(?:${u[f.BUILD]})?(?:$|[^\\d])`),_(`COERCERTL`,u[f.COERCE],!0),_(`COERCERTLFULL`,u[f.COERCEFULL],!0),_(`LONETILDE`,`(?:~>?)`),_(`TILDETRIM`,`(\\s*)${u[f.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,_(`TILDE`,`^${u[f.LONETILDE]}${u[f.XRANGEPLAIN]}$`),_(`TILDELOOSE`,`^${u[f.LONETILDE]}${u[f.XRANGEPLAINLOOSE]}$`),_(`LONECARET`,`(?:\\^)`),_(`CARETTRIM`,`(\\s*)${u[f.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,_(`CARET`,`^${u[f.LONECARET]}${u[f.XRANGEPLAIN]}$`),_(`CARETLOOSE`,`^${u[f.LONECARET]}${u[f.XRANGEPLAINLOOSE]}$`),_(`COMPARATORLOOSE`,`^${u[f.GTLT]}\\s*(${u[f.LOOSEPLAIN]})$|^$`),_(`COMPARATOR`,`^${u[f.GTLT]}\\s*(${u[f.FULLPLAIN]})$|^$`),_(`COMPARATORTRIM`,`(\\s*)${u[f.GTLT]}\\s*(${u[f.LOOSEPLAIN]}|${u[f.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,_(`HYPHENRANGE`,`^\\s*(${u[f.XRANGEPLAIN]})\\s+-\\s+(${u[f.XRANGEPLAIN]})\\s*$`),_(`HYPHENRANGELOOSE`,`^\\s*(${u[f.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[f.XRANGEPLAINLOOSE]})\\s*$`),_(`STAR`,`(<|>)?=?\\s*\\*`),_(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),_(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),i=e(((e,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),a=e(((e,t)=>{let n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),o=e(((e,o)=>{let s=t(),{MAX_LENGTH:c,MAX_SAFE_INTEGER:l}=n(),{safeRe:u,t:d}=r(),f=i(),{compareIdentifiers:p}=a(),m=(e,t)=>{let n=t.split(`.`);if(n.length>e.length)return!1;for(let t=0;t<n.length;t++)if(p(e[t],n[t])!==0)return!1;return!0};o.exports=class e{constructor(t,n){if(n=f(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>c)throw TypeError(`version is longer than ${c} characters`);s(`SemVer`,t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let r=t.trim().match(n.loose?u[d.LOOSE]:u[d.FULL]);if(!r)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>l||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>l||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>l||this.patch<0)throw TypeError(`Invalid patch version`);r[4]?this.prerelease=r[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<l)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(s(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:+(this.patch>t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{let e=this.prerelease[n],r=t.prerelease[n];if(s(`prerelease compare`,n,e,r),e===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(e===void 0)return-1;if(e===r)continue;return p(e,r)}while(++n)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let n=0;do{let e=this.build[n],r=t.build[n];if(s(`build compare`,n,e,r),e===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(e===void 0)return-1;if(e===r)continue;return p(e,r)}while(++n)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?u[d.PRERELEASELOOSE]:u[d.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];if(n===!1&&(r=[t]),m(this.prerelease,t)){let e=this.prerelease[t.split(`.`).length];isNaN(e)&&(this.prerelease=r)}else this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),s=e(((e,t)=>{let n=o();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),c=e(((e,t)=>{let n=s();t.exports=(e,t,r)=>n(e,t,r)>0}));export{r as a,i,s as n,n as o,o as r,t as s,c as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import{i as e}from"./context-CEOHpZgd.mjs";import{r as t}from"./auth-BIr56Mbx.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-A61dRbXl.mjs";import{t as a}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{a as l,n as u}from"./prompt-CGUzvBgY.mjs";function d(e){return e.usage(`$0 healthchecks create
|
|
3
3
|
|
|
4
4
|
Create a new health check.`).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`,default:1}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`,default:1}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const f={command:`create`,describe:`Create Health Check`,builder:d,handler:async u=>a({command:`healthchecks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Creating`,async()=>a.healthchecks.create({body:e,zone_id:d})),{successLabel:`Created`});return}u.address===void 0&&(u.address=await l(`address`,`The hostname or IP address of the origin server to run health checks on.`)),u.name===void 0&&(u.name=await l(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)});n(await i(`Creating`,async()=>a.healthchecks.create({body:f,zone_id:d})),{successLabel:`Created`})})};function p(e){return e.usage(`$0 healthchecks delete <healthcheck-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import{i as e}from"./context-CEOHpZgd.mjs";import{a as t,r as n}from"./auth-BIr56Mbx.mjs";import{t as r}from"./output-CvQFJkvi.mjs";import{t as i}from"./dry-run-Bq0JAsbX.mjs";import{t as a}from"./progress-A61dRbXl.mjs";import{t as o}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./prompt-CGUzvBgY.mjs";function l(e){return e.usage(`$0 hostnames settings tls-single get <hostname>
|
|
3
3
|
|
|
4
4
|
Get the requested TLS setting for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get <hostname>`,describe:`Get TLS setting for hostname`,builder:l,handler:async t=>o({command:`hostnames settings tls-single get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf hostnames settings tls-single get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/hostnames/settings/${t[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(t[`setting-id`]))}/${t.hostname==null?`<hostname>`:encodeURIComponent(String(t.hostname))}`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),"setting-id":String(t[`setting-id`]??``),hostname:String(t.hostname??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});t.zoneId=s,r(await a(`Loading`,async()=>o.hostnames.settings.tlsSingle.get({zone_id:s,setting_id:t[`setting-id`],hostname:t.hostname})),{successLabel:`Loaded`})})},d={command:`tls-single`,describe:`Operations for settings.tls-single`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function f(e){return e.usage(`$0 hostnames settings tls delete <hostname>
|
|
5
5
|
|