cf 1.0.0-beta.27 → 1.0.0-beta.29
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 +10 -3
- package/dist/_meta/commands.json +7966 -5034
- package/dist/_meta/hand-written-commands.json +40 -10
- package/dist/_meta/schemas.json +3153 -3736
- package/dist/{abuse-reports-RxXqfDEW.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
- package/dist/{access-BxEprr2f.mjs → access-Cte4yyIz.mjs} +1 -1
- package/dist/{accounts-DU2ZNYqP.mjs → accounts-G-x-_cEx.mjs} +58 -57
- package/dist/{acm-CBCIKBJ4.mjs → acm-Bg3HqMGG.mjs} +7 -7
- package/dist/{addressing-BKxiLRHk.mjs → addressing-BwEofGEm.mjs} +46 -46
- package/dist/{agent-memory-DkBpQYUL.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
- package/dist/ai-DWWRIQIt.mjs +30 -0
- package/dist/ai-audit-CMEBz6ZP.mjs +6 -0
- package/dist/ai-gateway-D2s0isU-.mjs +76 -0
- package/dist/ai-search-a0uqr9yJ.mjs +74 -0
- package/dist/{ai-security-CvZfP2JC.mjs → ai-security-H_RqjRoL.mjs} +4 -4
- package/dist/alerting-Bgp9rE4I.mjs +52 -0
- package/dist/analytics-CFYM82FD.mjs +17 -0
- package/dist/analytics-engine-BLiEaLxb.mjs +4 -0
- package/dist/api-Dnt6lRJG.mjs +3 -0
- package/dist/{api-security-BbcvDtff.mjs → api-security-B0YtHglt.mjs} +63 -63
- package/dist/argo-BPwbzHY7.mjs +14 -0
- package/dist/{artifacts-2R2sxIKO.mjs → artifacts-B6UwC2PH.mjs} +20 -20
- package/dist/{audit-logs-LoBB1OO_.mjs → audit-logs-kG97iEnI.mjs} +2 -2
- package/dist/auth-Czr8ChBB.mjs +2 -0
- package/dist/auth-DA1PHaHi.mjs +2 -0
- package/dist/auth-Dwfa4S3h.mjs +7 -0
- package/dist/{auth-token-BwpERbnG.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
- package/dist/{autoconfig-B2w-woU0.mjs → autoconfig-B4tFR6ua.mjs} +118 -114
- package/dist/{basin-catalog-AgOHGiPI.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
- package/dist/billing-TERxOuLR.mjs +22 -0
- package/dist/{blocks-C8vyXIAT.mjs → blocks-C3Im7AT0.mjs} +1 -1
- package/dist/body-parser-HN91kAf0.mjs +2 -0
- package/dist/{body-unions-CjpNjwSW.mjs → body-unions-D9OSaf4M.mjs} +1 -1
- package/dist/{bot-management-fwxKIbaB.mjs → bot-management-SZw9jTOC.mjs} +4 -4
- package/dist/{botnet-feed-DCYB5kYZ.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
- package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
- package/dist/browser-run-BvjfMK3f.mjs +40 -0
- package/dist/build-CCwo_ydV.mjs +2 -0
- package/dist/build-yQOzZg6Z.mjs +2 -0
- package/dist/builds-tMa3sbQU.mjs +62 -0
- package/dist/cache-b_EPh6Is.mjs +36 -0
- package/dist/cf-DmvZ2L51.mjs +18 -0
- package/dist/{chunk-DSGVRFIS-DQwKND2c.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
- package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
- package/dist/cli-Cc7ujzAy.mjs +4 -0
- package/dist/{client-side-security-VmZzMy-m.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
- package/dist/{cloud-connector-bMlFnqP0.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
- package/dist/{cloudflared-Ba4KWdTO.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
- package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
- package/dist/{command-BxZBNPxG.mjs → command-BQbZw4Kx.mjs} +1 -1
- package/dist/command-BVct0Dvr.mjs +2 -0
- package/dist/{command-BiIVclNA.mjs → command-C4_lMRkw.mjs} +1 -1
- package/dist/command-CJ3ldWrA.mjs +2 -0
- package/dist/command-CyOdBNur.mjs +2 -0
- package/dist/command-D2XkyO1e.mjs +2 -0
- package/dist/command-DHODgfFZ.mjs +2 -0
- package/dist/command-DIIaZx_f.mjs +2 -0
- package/dist/command-DONwHpqZ.mjs +2 -0
- package/dist/command-DdYnSf-8.mjs +2 -0
- package/dist/command-DqOU7Ql2.mjs +2 -0
- package/dist/{command-pMoNdd22.mjs → command-HW7k43qu.mjs} +1 -1
- package/dist/command-NqM0lo4a.mjs +2 -0
- package/dist/command-bwVDyMv4.mjs +2 -0
- package/dist/command-yzqs4m83.mjs +2 -0
- package/dist/{completions-DRzBiqpv.mjs → completions-0YKvIyBT.mjs} +2 -2
- package/dist/connector-interrupts-CsunbRsr.mjs +6 -0
- package/dist/{connector-telemetry-events-BbAOUt9h.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
- package/dist/{connector-telemetry-snapshots-DcpBx7Qx.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
- package/dist/{connectors-D1WFLJoE.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
- package/dist/containers-BiA_bpPR.mjs +76 -0
- package/dist/{content-scan-D1GfPSL0.mjs → content-scan-4SA2nacB.mjs} +6 -6
- package/dist/{context-Dp4CXG22.mjs → context-BGm5_wTT.mjs} +1 -1
- package/dist/{cps-D4uhzg3k.mjs → cps-WDmD3V5I.mjs} +3 -3
- package/dist/create-DmLDMvrj.mjs +2 -0
- package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
- package/dist/custom-csrs-D-lvkyRV.mjs +18 -0
- package/dist/custom-hostnames-B5BQX5m6.mjs +24 -0
- package/dist/custom-nameservers-CZrRjcjx.mjs +12 -0
- package/dist/custom-pages-CWwjtfbj.mjs +38 -0
- package/dist/d1-N81q-FAr.mjs +50 -0
- package/dist/{delegate-B4bKqF7i.mjs → delegate-livNdiwK.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/deploy-Ok4ncy06.mjs +2 -0
- package/dist/deploy-context-B_lLfxt7.mjs +55 -0
- package/dist/deploy-input-JZlEJwKB.mjs +2 -0
- package/dist/dev-DxbkJkzc.mjs +4 -0
- package/dist/{diagnostics-D1CUs2o9.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
- package/dist/dialog-CD94-Kzw.mjs +2 -0
- package/dist/discover-D9FNaCDK.mjs +2 -0
- package/dist/discover-DGsMj9ZN.mjs +2 -0
- package/dist/{dist-D5qkmHhC.mjs → dist-BxhwE-W1.mjs} +202 -193
- package/dist/{dls-DWBiYzY1.mjs → dls-5OXuxLAB.mjs} +8 -8
- package/dist/dns-Burep9O7.mjs +142 -0
- package/dist/{dns-firewall-DH9xIT5H.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
- package/dist/docs-BFVK88kB.mjs +3 -0
- package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-qsnRlRk6.mjs} +1 -1
- package/dist/{durable-objects-DF0MYpnV.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
- package/dist/email-auth--2KCzZNA.mjs +6 -0
- package/dist/email-routing-DzaExfVf.mjs +44 -0
- package/dist/{email-security-CnNa1YON.mjs → email-security-DwQJszzy.mjs} +71 -71
- package/dist/{email-sending-CpDSw-Eb.mjs → email-sending-mQd2qB-o.mjs} +21 -21
- package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
- package/dist/error-sanitization-D069tpKk.mjs +2 -0
- package/dist/errors-C_bGcR0X.mjs +11 -0
- package/dist/field-extractors-MVOizTlB.mjs +8 -0
- package/dist/{firewall-CY_oem-d.mjs → firewall-DtSIlkfL.mjs} +19 -19
- package/dist/flagship-9E5gwNki.mjs +24 -0
- package/dist/{fraud-CSUKLh8X.mjs → fraud-DjqhVJdf.mjs} +3 -3
- package/dist/generate-BzOnRBij.mjs +2 -0
- package/dist/generate-DfxZtpn9.mjs +2 -0
- package/dist/get-3XNn0upb.mjs +2 -0
- package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
- package/dist/{google-tag-gateway-C2skt6t-.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
- package/dist/gt-BV-jij5q.mjs +4 -0
- package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
- package/dist/{hyperdrive-FcBbpew4.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
- package/dist/{iam-8T74DNhH.mjs → iam-BK6N7NdQ.mjs} +31 -31
- package/dist/{images-C3JUaf6b.mjs → images-3bCWE6Ml.mjs} +33 -33
- package/dist/index.mjs +1 -1
- package/dist/init-BgCF9K8h.mjs +43 -0
- package/dist/intel-BQ58CJLt.mjs +62 -0
- package/dist/{interactive-CKHdGvkh.mjs → interactive-JBA3qOUa.mjs} +9 -9
- package/dist/{internal-CamuESs0.mjs → internal-CWPz0sBF.mjs} +2 -2
- package/dist/{ips-DinCNnWj.mjs → ips-3WYegiVW.mjs} +2 -2
- package/dist/k2-Bc_hjmiv.mjs +10 -0
- package/dist/kv-DbShBhhg.mjs +12 -0
- package/dist/{lazy-command-WB1FOuew.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
- package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
- package/dist/{live-B6AsI_E5.mjs → live-BTtMv1a6.mjs} +2 -2
- package/dist/load-balancers-C2hg52WA.mjs +84 -0
- package/dist/{local-CgBhtmON.mjs → local-B3zt9PXR.mjs} +1 -1
- package/dist/local-DRxctCh9.mjs +2 -0
- package/dist/local-runtime-BOnDiMDc.mjs +2 -0
- package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
- package/dist/log-DBAHla_W.mjs +2 -0
- package/dist/login-CK3nn9a5.mjs +2 -0
- package/dist/{login-BJHaTERg.mjs → login-DiR-buzS.mjs} +3 -3
- package/dist/{logpush-qhlxsioM.mjs → logpush-CitvUX-J.mjs} +22 -22
- package/dist/{logs-bI54CJ0w.mjs → logs-CfWHu4Ir.mjs} +14 -16
- package/dist/magic-network-monitoring-gU6yzzML.mjs +34 -0
- package/dist/{magic-transit-BwDyySHJ.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
- package/dist/{managed-defense-CsBBkfeQ.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
- package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
- package/dist/{mcp-CyI0sDmL.mjs → mcp-DqhQJVaz.mjs} +15 -15
- package/dist/{mesh-Czr0UCP4.mjs → mesh-DXVZBNDC.mjs} +12 -12
- package/dist/{migrate-DKDWYrz2.mjs → migrate-CmXyk9vX.mjs} +1 -1
- package/dist/{monetization-NUgfDtSy.mjs → monetization-CWg-mySr.mjs} +9 -9
- package/dist/{network-interconnects-DuIBe8fK.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
- package/dist/{network-B42zrBic.mjs → network-jtgq5eb4.mjs} +24 -24
- package/dist/o11y-eYYs59X9.mjs +88 -0
- package/dist/oauth-BgDZMd72.mjs +5 -0
- package/dist/{oauth-BLQ1-y3R.mjs → oauth-V37G-PaV.mjs} +1 -1
- package/dist/{observability-BxhJQCgZ.mjs → observability-CB72eC4T.mjs} +2 -2
- package/dist/ohttp-gateway-K9ToEft8.mjs +8 -0
- package/dist/organizations-BllV7l_c.mjs +70 -0
- package/dist/output-hFMAotFl.mjs +2 -0
- package/dist/package-oNVeacC9.mjs +2 -0
- package/dist/page-rules-BVmi-ZFW.mjs +35 -0
- package/dist/pages-5spcBpX1.mjs +48 -0
- package/dist/pay-per-crawl-BgsdGcBi.mjs +36 -0
- package/dist/{pay-per-use-VatiU-Nt.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
- package/dist/pipelines-CbtmLRxt.mjs +40 -0
- package/dist/{precursor-D3VH2MXT.mjs → precursor-Dk8YOKf_.mjs} +2 -2
- package/dist/previews-Bv1HMMtO.mjs +6 -0
- package/dist/progress-DE_G09u2.mjs +2 -0
- package/dist/project-settings-D_S-UC8I.mjs +3 -0
- package/dist/prompt-D274Im1O.mjs +4 -0
- package/dist/queues-DGCYUr4g.mjs +52 -0
- package/dist/r2-DtCk-Nfi.mjs +112 -0
- package/dist/{radar-CvLtu-Vr.mjs → radar-1CwqOsMZ.mjs} +150 -150
- package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
- package/dist/{ready-gsGEaWLL.mjs → ready-CcoEA7M7.mjs} +2 -2
- package/dist/{realtime-DiCEgFTC.mjs → realtime-DFUxwIG5.mjs} +80 -81
- package/dist/registrar-Cl1snz8z.mjs +43 -0
- package/dist/registrar-sandbox-Cne9BVCZ.mjs +58 -0
- package/dist/{reporting-BiHgnT8L.mjs → reporting-D9FC-Z-3.mjs} +7 -7
- package/dist/request-headers-Bopp5lH_.mjs +2 -0
- package/dist/request-tracers-CSSB9_aW.mjs +4 -0
- package/dist/resource-sharing-D8yuzJm7.mjs +36 -0
- package/dist/{rules-CRhe_ca9.mjs → rules-DzmOQ3MB.mjs} +8 -8
- package/dist/rulesets-DsTGcgbc.mjs +42 -0
- package/dist/{rum-BfnWHW_d.mjs → rum-DrJLI93T.mjs} +14 -14
- package/dist/run-C5yPsiO2.mjs +2 -0
- package/dist/run-CXWkMU3x.mjs +2 -0
- package/dist/schema-CfZOW8Zw.mjs +2 -0
- package/dist/{schema-cache-BIo0Gi2H.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
- package/dist/schema-flags-DO3kLYBu.mjs +4 -0
- package/dist/scim-0OufLKru.mjs +16 -0
- package/dist/{secrets-store-DgtzZRze.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
- package/dist/{security-insights-SlUGW3F_.mjs → security-insights-D2pj8-O-.mjs} +20 -20
- package/dist/{security-txt-C3YS0REz.mjs → security-txt-SKtgW4n-.mjs} +4 -4
- package/dist/session-COdP8BXD.mjs +2 -0
- package/dist/shared-D_2KLpP3.mjs +2 -0
- package/dist/{signed-url-ClLk45_J.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
- package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
- package/dist/snippets-DrrdpLnS.mjs +18 -0
- package/dist/spawn-DNf-Ge8d.mjs +5 -0
- package/dist/{spectrum-Cj0BMtg2.mjs → spectrum-CHBGZbZF.mjs} +11 -11
- package/dist/{speed-BrVeZRyX.mjs → speed-vOlHyG3v.mjs} +11 -11
- package/dist/sql-BCuLxGSf.mjs +4 -0
- package/dist/src-ByCoEqOw.mjs +133 -0
- package/dist/{ssl-Bx4LCutF.mjs → ssl-BA_dcVwF.mjs} +60 -62
- package/dist/startup-profile-CyQk_f_L.mjs +2 -0
- package/dist/{startup-profile-DqaYNT0b.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
- package/dist/state-B6r-b_-d.mjs +2 -0
- package/dist/{state-BmzOLELo.mjs → state-CTLznbVs.mjs} +1 -1
- package/dist/{containers-DINLx5_i.mjs → static-assets-DGDoaJf1.mjs} +216 -210
- package/dist/stream-CzlqY8hq.mjs +89 -0
- package/dist/{tags-xVzjZxdt.mjs → tags-BLeaslAb.mjs} +8 -8
- package/dist/telemetry-COlodX5Z.mjs +2 -0
- package/dist/{telemetry-CJ9URio3.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-M7Fxqh2W.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
- package/dist/tenants-CRirmhxS.mjs +13 -0
- package/dist/{tools-C-vmgYSv.mjs → tools-BRjRgZnj.mjs} +1 -1
- package/dist/tunnels-nLfIWPYT.mjs +27 -0
- package/dist/{turnstile-B_Ugzgom.mjs → turnstile-CZjXtBCr.mjs} +10 -10
- package/dist/ui-dWsVmFCG.mjs +2 -0
- package/dist/{update-check-DRr0eRhB.mjs → update-check-CXMdVBhW.mjs} +1 -1
- package/dist/{update-check-DHUo4FOJ.mjs → update-check-D_Oky9-u.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-CZRQH_pJ.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
- package/dist/url-scanner-9XW3zLaU.mjs +16 -0
- package/dist/user-Bk1BIqZ5.mjs +103 -0
- package/dist/vectorize-CgOfmWYq.mjs +30 -0
- package/dist/verify-B9ILCohg.mjs +2 -0
- package/dist/verify-BCuWaO-L.mjs +2 -0
- package/dist/version-CcuBNjqg.mjs +2 -0
- package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
- package/dist/{web-assets-CgQXsp8m.mjs → web-assets-CWU3jrit.mjs} +29 -29
- package/dist/web3-CRpQ5sl4.mjs +26 -0
- package/dist/workers-BZMvamn0.mjs +39 -0
- package/dist/{workers-for-platforms-5RkV9MVp.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
- package/dist/{workers-vpc-Bt4OQbwM.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
- package/dist/workflows-Dd88_Nqc.mjs +48 -0
- package/dist/{wrangler-migration-BbmGOu8l.mjs → wrangler-migration-BzMTJPdI.mjs} +302 -293
- package/dist/zaraz-BFK0p28R.mjs +22 -0
- package/dist/zero-trust-Cdjfp0Ie.mjs +1008 -0
- package/dist/{zones-DTAcguf6.mjs → zones-DDn5jk6I.mjs} +51 -51
- package/package.json +20 -20
- package/dist/ai-DqEN_hhg.mjs +0 -30
- package/dist/ai-audit-BmzOgt6x.mjs +0 -6
- package/dist/ai-gateway-B0uiYVHq.mjs +0 -74
- package/dist/ai-search-DbZIxdio.mjs +0 -74
- package/dist/alerting-BjGwBxZT.mjs +0 -52
- package/dist/analytics-C7kT_H-W.mjs +0 -17
- package/dist/analytics-engine-BHpcNSdD.mjs +0 -4
- package/dist/api-X3wKppsT.mjs +0 -3
- package/dist/argo-D1VONzu-.mjs +0 -14
- package/dist/auth-CspwoBlp.mjs +0 -2
- package/dist/auth-D499YE2n.mjs +0 -7
- package/dist/auth-FK2eLQ02.mjs +0 -2
- package/dist/billing-DRNww0iC.mjs +0 -24
- package/dist/body-parser-BKcZS9iJ.mjs +0 -2
- package/dist/brand-protection-BVICLzBc.mjs +0 -26
- package/dist/browser-run-CEk-NIgP.mjs +0 -40
- package/dist/build-CRm2TQq8.mjs +0 -2
- package/dist/build-DO_GNhRl.mjs +0 -2
- package/dist/builds-CoazxuN-.mjs +0 -64
- package/dist/cache-jlLJLSu7.mjs +0 -36
- package/dist/cf-hP0SOgC6.mjs +0 -18
- package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +0 -363
- package/dist/cli-Nqf58-1c.mjs +0 -4
- package/dist/cloudforce-one-CCaIBOAo.mjs +0 -318
- package/dist/command-BASaTmJc.mjs +0 -2
- package/dist/command-Bih1HLr3.mjs +0 -2
- package/dist/command-ByYf12-8.mjs +0 -2
- package/dist/command-C0qCuw03.mjs +0 -2
- package/dist/command-C2FVMd1b.mjs +0 -2
- package/dist/command-C4OgtX_x.mjs +0 -2
- package/dist/command-C5Kqc5Km.mjs +0 -2
- package/dist/command-CFxyp8Uo.mjs +0 -2
- package/dist/command-CZAR85ba.mjs +0 -2
- package/dist/command-CelQVrZL.mjs +0 -2
- package/dist/command-CrAlzysj.mjs +0 -2
- package/dist/command-MxFFWqMg.mjs +0 -2
- package/dist/connector-interrupts-CrTeSyaM.mjs +0 -6
- package/dist/containers-BOBEs1Gk.mjs +0 -75
- package/dist/create-BtmuVqVL.mjs +0 -2
- package/dist/csam-scanner-DOOUBeBM.mjs +0 -8
- package/dist/custom-csrs-DtdFo5YZ.mjs +0 -18
- package/dist/custom-hostnames-ccdlELaD.mjs +0 -24
- package/dist/custom-nameservers-p3gDjfva.mjs +0 -12
- package/dist/custom-pages-DAkKVzgR.mjs +0 -38
- package/dist/d1-CDIyRdh4.mjs +0 -52
- package/dist/deploy-BaC5Ty7F.mjs +0 -2
- package/dist/deploy-context-DTTgNGro.mjs +0 -56
- package/dist/deploy-input-mAy06fAI.mjs +0 -2
- package/dist/dev-De-HszNT.mjs +0 -4
- package/dist/dialog-D5lus4M4.mjs +0 -2
- package/dist/discover-6kAmVMPp.mjs +0 -2
- package/dist/discover-C06Syc2B.mjs +0 -2
- package/dist/dns-wMjf1t6-.mjs +0 -152
- package/dist/docs-BA7qslb2.mjs +0 -3
- package/dist/email-auth-BShMFXn4.mjs +0 -6
- package/dist/email-domains-CDSbVclP.mjs +0 -14
- package/dist/email-routing-CBCkbg_F.mjs +0 -44
- package/dist/error-sanitization-B025CygB.mjs +0 -2
- package/dist/errors-DatLr-iR.mjs +0 -11
- package/dist/field-extractors-BwGdMnTr.mjs +0 -8
- package/dist/flagship-Bat5EZCk.mjs +0 -24
- package/dist/generate-CeeWW3eX.mjs +0 -3
- package/dist/generate-D6V4Q58z.mjs +0 -2
- package/dist/get-Be821dio.mjs +0 -2
- package/dist/gt-BQkaDQDq.mjs +0 -3
- package/dist/healthchecks-uC43QKQd.mjs +0 -20
- package/dist/init-BEVVz4_P.mjs +0 -43
- package/dist/intel-DRy4rHrt.mjs +0 -62
- package/dist/k2-wsanPL3y.mjs +0 -10
- package/dist/kv-BLSPcEnH.mjs +0 -12
- package/dist/leaked-credential-checks-CSZd9hBQ.mjs +0 -16
- package/dist/load-balancers-gap5u4b1.mjs +0 -84
- package/dist/local-CFsO9Tkg.mjs +0 -2
- package/dist/local-runtime-CmlJ20uJ.mjs +0 -2
- package/dist/log-DZfik9Jk.mjs +0 -2
- package/dist/login-BfuOf-Yi.mjs +0 -2
- package/dist/magic-network-monitoring-CX3TaMTu.mjs +0 -34
- package/dist/managed-transforms-CUC-uAbW.mjs +0 -8
- package/dist/o11y-oEUpMC3O.mjs +0 -86
- package/dist/oauth-BmSFLp_s.mjs +0 -4
- package/dist/organization-CEnlXwrl.mjs +0 -70
- package/dist/organizations-Dt86ToxE.mjs +0 -4
- package/dist/origin-post-quantum-encryption-lX-uaJSL.mjs +0 -6
- package/dist/output-BJEgbI0G.mjs +0 -2
- package/dist/package-CiRJBRHO.mjs +0 -2
- package/dist/page-rules-J6LhwR-s.mjs +0 -38
- package/dist/pages-BksdnChs.mjs +0 -48
- package/dist/pay-per-crawl-BLcbHRoR.mjs +0 -36
- package/dist/pipelines-B5AoB3f3.mjs +0 -40
- package/dist/previews-DzJ85fsr.mjs +0 -6
- package/dist/progress-DLri-rA7.mjs +0 -2
- package/dist/project-settings-nBMEx1f-.mjs +0 -3
- package/dist/prompt-D0dXwuME.mjs +0 -4
- package/dist/queues-BsAck4To.mjs +0 -52
- package/dist/r2-BYjdHDEZ.mjs +0 -112
- package/dist/raw-fetch-DQeDx1wT.mjs +0 -2
- package/dist/registrar-D4wdgWpo.mjs +0 -43
- package/dist/registrar-sandbox-B6yopzdG.mjs +0 -58
- package/dist/request-headers-CoxHUNcB.mjs +0 -2
- package/dist/request-tracers-817HTytF.mjs +0 -4
- package/dist/resource-sharing-CW9xxtq5.mjs +0 -36
- package/dist/rulesets-CKyc-Xlx.mjs +0 -42
- package/dist/run-Ciw_GIrC.mjs +0 -2
- package/dist/run-DD45EQTm.mjs +0 -2
- package/dist/schema-DuLIZRhA.mjs +0 -2
- package/dist/schema-flags-DrqvwQNw.mjs +0 -4
- package/dist/scim-C4iRWNYB.mjs +0 -16
- package/dist/session-D2yuwO4i.mjs +0 -2
- package/dist/shared--uVkAAd7.mjs +0 -2
- package/dist/smart-shield-Dn95hqUH.mjs +0 -22
- package/dist/snippets-BNUKOajz.mjs +0 -18
- package/dist/spawn-DuT4snxu.mjs +0 -5
- package/dist/sql-BX1pBqj3.mjs +0 -4
- package/dist/src-DPnUfK4c.mjs +0 -131
- package/dist/startup-profile-tZNb2HGz.mjs +0 -2
- package/dist/state-Uwfrmw5I.mjs +0 -2
- package/dist/stream-BRzr6yh0.mjs +0 -89
- package/dist/telemetry-Pt5GpCKD.mjs +0 -2
- package/dist/tunnels-DQVXKUKA.mjs +0 -27
- package/dist/ui-FYultowZ.mjs +0 -2
- package/dist/url-scanner-BH4PLy16.mjs +0 -16
- package/dist/user-Bn82Qw0Y.mjs +0 -103
- package/dist/vectorize-DoVVz_sh.mjs +0 -30
- package/dist/version-Zr2oF8mY.mjs +0 -2
- package/dist/waiting-rooms-QUW131o3.mjs +0 -52
- package/dist/web3-TY9s6Swn.mjs +0 -26
- package/dist/workers-B3uJqJKc.mjs +0 -39
- package/dist/workers-builds-BgGY0IGk.mjs +0 -14
- package/dist/workflows-6m85DdqF.mjs +0 -48
- package/dist/zaraz-8WSJ7l0L.mjs +0 -22
- package/dist/zero-trust-DK0cqDZv.mjs +0 -1022
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./dry-run-qsnRlRk6.mjs";import{a as r,t as i}from"./context-BGm5_wTT.mjs";import{t as a}from"./local-B3zt9PXR.mjs";import{t as o}from"./output-hFMAotFl.mjs";import{t as s}from"./progress-DE_G09u2.mjs";import{t as c}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{r as l,t as u}from"./body-parser-HN91kAf0.mjs";import{a as d,n as f}from"./prompt-D274Im1O.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";var m={method:`GET`,path:t=>e`/accounts/${t.account_id}/secrets_store/quota`};function h(e){return e.usage(`$0 secrets-store quota get
|
|
3
3
|
|
|
4
|
-
Lists the number of secrets used in the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get`,describe:`View secret usage`,builder:h,handler:async e=>c({command:`secrets-store quota get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();
|
|
4
|
+
Lists the number of secrets used in the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get`,describe:`View secret usage`,builder:h,handler:async e=>c({command:`secrets-store quota get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();n({command:`cf secrets-store quota get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secrets_store/quota`,pathParams:{},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(m,{account_id:l}));o(u,{successLabel:`Loaded`})})},_={command:`quota`,describe:`Account quota limits for secrets stores, secrets count, and storage capacity`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/secrets_store/stores/${t.store_id}/secrets`,body:`json`};function y(e){return e.usage(`$0 secrets-store secrets bulk-delete
|
|
5
5
|
|
|
6
|
-
Deletes one or more secrets.`).option(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`ids`,{type:`string`,array:!0,description:`List of secret identifier tags to delete.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk deleting secrets.`})}const b={command:`bulk-delete`,describe:`Delete secrets`,builder:y,handler:async e=>c({command:`secrets-store secrets bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();
|
|
6
|
+
Deletes one or more secrets.`).option(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`ids`,{type:`string`,array:!0,description:`List of secret identifier tags to delete.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk deleting secrets.`})}const b={command:`bulk-delete`,describe:`Delete secrets`,builder:y,handler:async e=>c({command:`secrets-store secrets bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf secrets-store secrets bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/secrets_store/stores/${e[`store-id`]==null?`<store-id>`:encodeURIComponent(String(e[`store-id`]))}/secrets`,pathParams:{"store-id":String(e[`store-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({ids:e.ids}):l(e.body)});return}let c=e.body===void 0?void 0:l(e.body),d=await t(e),p=e.local?a:await i();if(e.accountId=p,!await f({force:!!e.force,message:`This operation permanently deletes the specified secrets and cannot be undone.`}))return;if(e.body!==void 0){let t=c,n=await s(`Deleting`,async()=>d.send(v,{body:t,account_id:p,store_id:e[`store-id`]}));o(n,{successLabel:`Deleted`});return}if(e.ids===void 0)throw Error(`--ids is required (or pass --body with this field set).`);let m=u({ids:e.ids}),h=await s(`Deleting`,async()=>d.send(v,{body:m,account_id:p,store_id:e[`store-id`]}));o(h,{successLabel:`Deleted`})})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/secrets_store/stores/${t.store_id}/secrets`,body:`json`};function S(e){return e.usage(`$0 secrets-store secrets create <store-id>
|
|
7
7
|
|
|
8
|
-
Creates a secret in the account.`).positional(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`create <store-id>`,describe:`Create a secret`,builder:S,handler:async e=>c({command:`secrets-store secrets create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();
|
|
8
|
+
Creates a secret in the account.`).positional(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`create <store-id>`,describe:`Create a secret`,builder:S,handler:async e=>c({command:`secrets-store secrets create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf secrets-store secrets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/secrets_store/stores/${e[`store-id`]==null?`<store-id>`:encodeURIComponent(String(e[`store-id`]))}/secrets`,pathParams:{"store-id":String(e[`store-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:l(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let c=e.body===void 0?void 0:l(e.body),u=await t(e),d=e.local?a:await i();if(e.accountId=d,e.body!==void 0){let t=c,n=await s(`Creating`,async()=>u.send(x,{body:t,account_id:d,store_id:e[`store-id`]}));o(n,{successLabel:`Created`})}})};var w={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/secrets_store/stores/${t.store_id}/secrets/${t.secret_id}`};function T(e){return e.usage(`$0 secrets-store secrets delete <secret-id>
|
|
9
9
|
|
|
10
|
-
Deletes a single secret.`).positional(`secret-id`,{type:`string`,description:`Secret identifier.`,demandOption:!0}).option(`store-id`,{type:`string`,description:`Store 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 E={command:`delete <secret-id>`,describe:`Delete a secret`,builder:T,handler:async e=>c({command:`secrets-store secrets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();
|
|
10
|
+
Deletes a single secret.`).positional(`secret-id`,{type:`string`,description:`Secret identifier.`,demandOption:!0}).option(`store-id`,{type:`string`,description:`Store 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 E={command:`delete <secret-id>`,describe:`Delete a secret`,builder:T,handler:async e=>c({command:`secrets-store secrets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf secrets-store secrets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/secrets_store/stores/${e[`store-id`]==null?`<store-id>`:encodeURIComponent(String(e[`store-id`]))}/secrets/${e[`secret-id`]==null?`<secret-id>`:encodeURIComponent(String(e[`secret-id`]))}`,pathParams:{"store-id":String(e[`store-id`]??``),"secret-id":String(e[`secret-id`]??``)},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(w,{account_id:l,store_id:e[`store-id`],secret_id:e[`secret-id`]}));o(u,{successLabel:`Deleted`})})};var D={method:`POST`,path:t=>e`/accounts/${t.account_id}/secrets_store/stores/${t.store_id}/secrets/${t.secret_id}/duplicate`,body:`json`};function O(e){return e.usage(`$0 secrets-store secrets duplicate <secret-id>
|
|
11
11
|
|
|
12
|
-
Creates a duplicate of the secret, keeping the value.`).positional(`secret-id`,{type:`string`,description:`Secret identifier.`,demandOption:!0}).option(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`comment`,{type:`string`,description:`Freeform text describing the secret.`}).option(`name`,{type:`string`,description:`The name of the secret.`}).option(`scopes`,{type:`string`,array:!0,description:`The list of services that can use this secret. Omit it on create or duplicate to inherit the store's scopes. An empty list lets no service use the secret.`}).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:`duplicate <secret-id>`,describe:`Duplicate Secret`,builder:O,handler:async e=>c({command:`secrets-store secrets duplicate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();
|
|
12
|
+
Creates a duplicate of the secret, keeping the value.`).positional(`secret-id`,{type:`string`,description:`Secret identifier.`,demandOption:!0}).option(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`comment`,{type:`string`,description:`Freeform text describing the secret.`}).option(`name`,{type:`string`,description:`The name of the secret.`}).option(`scopes`,{type:`string`,array:!0,description:`The list of services that can use this secret. Omit it on create or duplicate to inherit the store's scopes. An empty list lets no service use the secret.`}).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:`duplicate <secret-id>`,describe:`Duplicate Secret`,builder:O,handler:async e=>c({command:`secrets-store secrets duplicate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf secrets-store secrets duplicate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/secrets_store/stores/${e[`store-id`]==null?`<store-id>`:encodeURIComponent(String(e[`store-id`]))}/secrets/${e[`secret-id`]==null?`<secret-id>`:encodeURIComponent(String(e[`secret-id`]))}/duplicate`,pathParams:{"store-id":String(e[`store-id`]??``),"secret-id":String(e[`secret-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({comment:p(e.comment,`comment`,`text`),name:p(e.name,`name`,`text`),scopes:e.scopes}):l(e.body)});return}let c=e.body===void 0?void 0:l(e.body),f=await t(e),m=e.local?a:await i();if(e.accountId=m,e.body!==void 0){let t=c,n=await s(`Creating`,async()=>f.send(D,{body:t,account_id:m,store_id:e[`store-id`],secret_id:e[`secret-id`]}));o(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await d(`name`,`The name of the secret.`));let h=u({comment:p(e.comment,`comment`,`text`),name:p(e.name,`name`,`text`),scopes:e.scopes}),g=await s(`Creating`,async()=>f.send(D,{body:h,account_id:m,store_id:e[`store-id`],secret_id:e[`secret-id`]}));o(g,{successLabel:`Created`})})};var A={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/secrets_store/stores/${t.store_id}/secrets/${t.secret_id}`,body:`json`};function j(e){return e.usage(`$0 secrets-store secrets edit <secret-id>
|
|
13
13
|
|
|
14
|
-
Updates a single secret.`).positional(`secret-id`,{type:`string`,description:`Secret identifier.`,demandOption:!0}).option(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`comment`,{type:`string`,description:`Freeform text describing the secret.`}).option(`scopes`,{type:`string`,array:!0,description:`The list of services that can use this secret, or null when the secret inherits its store's scopes. Set it to null in a patch to inherit again. An empty list lets no service use the secret.`}).option(`value`,{type:`string`,description:`The value of the secret. Maximum 64 KiB (65,536 bytes). Note that this is 'write only' - the API never returns this value; it exists only to create or modify secrets.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`edit <secret-id>`,describe:`Patch a secret`,builder:j,handler:async e=>c({command:`secrets-store secrets edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();
|
|
14
|
+
Updates a single secret.`).positional(`secret-id`,{type:`string`,description:`Secret identifier.`,demandOption:!0}).option(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`comment`,{type:`string`,description:`Freeform text describing the secret.`}).option(`scopes`,{type:`string`,array:!0,description:`The list of services that can use this secret, or null when the secret inherits its store's scopes. Set it to null in a patch to inherit again. An empty list lets no service use the secret.`}).option(`value`,{type:`string`,description:`The value of the secret. Maximum 64 KiB (65,536 bytes). Note that this is 'write only' - the API never returns this value; it exists only to create or modify secrets.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`edit <secret-id>`,describe:`Patch a secret`,builder:j,handler:async e=>c({command:`secrets-store secrets edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf secrets-store secrets edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/secrets_store/stores/${e[`store-id`]==null?`<store-id>`:encodeURIComponent(String(e[`store-id`]))}/secrets/${e[`secret-id`]==null?`<secret-id>`:encodeURIComponent(String(e[`secret-id`]))}`,pathParams:{"store-id":String(e[`store-id`]??``),"secret-id":String(e[`secret-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({comment:p(e.comment,`comment`,`text`),scopes:e.scopes,value:p(e.value,`value`,`text`)}):l(e.body),sensitiveBodyPaths:[[`value`]]});return}let c=e.body===void 0?void 0:l(e.body),d=await t(e),f=e.local?a:await i();if(e.accountId=f,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>d.send(A,{body:t,account_id:f,store_id:e[`store-id`],secret_id:e[`secret-id`]}));o(n,{successLabel:`Updated`});return}let m=u({comment:p(e.comment,`comment`,`text`),scopes:e.scopes,value:p(e.value,`value`,`text`)}),h=await s(`Updating`,async()=>d.send(A,{body:m,account_id:f,store_id:e[`store-id`],secret_id:e[`secret-id`]}));o(h,{successLabel:`Updated`})})};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/secrets_store/stores/${t.store_id}/secrets/${t.secret_id}`};function P(e){return e.usage(`$0 secrets-store secrets get <secret-id>
|
|
15
15
|
|
|
16
|
-
Returns details of a single secret.`).positional(`secret-id`,{type:`string`,description:`Secret identifier.`,demandOption:!0}).option(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <secret-id>`,describe:`Get a secret by ID`,builder:P,handler:async e=>c({command:`secrets-store secrets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();
|
|
16
|
+
Returns details of a single secret.`).positional(`secret-id`,{type:`string`,description:`Secret identifier.`,demandOption:!0}).option(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <secret-id>`,describe:`Get a secret by ID`,builder:P,handler:async e=>c({command:`secrets-store secrets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf secrets-store secrets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/secrets_store/stores/${e[`store-id`]==null?`<store-id>`:encodeURIComponent(String(e[`store-id`]))}/secrets/${e[`secret-id`]==null?`<secret-id>`:encodeURIComponent(String(e[`secret-id`]))}`,pathParams:{"store-id":String(e[`store-id`]??``),"secret-id":String(e[`secret-id`]??``)},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(N,{account_id:l,store_id:e[`store-id`],secret_id:e[`secret-id`]}));o(u,{successLabel:`Loaded`})})};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/secrets_store/stores/${t.store_id}/secrets`,query:[`direction`,`page`,`per_page`,`search`,`order`,`scopes`],joined:[`scopes`]};function L(e){return e.usage(`$0 secrets-store secrets list
|
|
17
17
|
|
|
18
|
-
Lists all store secrets.`).option(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Direction to sort objects.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Number of objects to return per page.`}).option(`search`,{type:`string`,description:`Search secrets using a filter string, filtering across name and comment.`}).option(`order`,{type:`string`,description:`Order secrets by values in the given field.`,choices:[`name`,`comment`,`created`,`modified`,`status`]}).option(`scopes`,{type:`string`,array:!0,description:`Only secrets with the given scopes will be returned.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`list`,describe:`List store secrets`,builder:L,handler:async e=>c({command:`secrets-store secrets list`,classification:{safeFlags:[`direction`,`order`,`dry-run`]}},e,async()=>{let c={direction:e.direction,page:e.page,per_page:e[`per-page`],search:e.search,order:e.order,scopes:e.scopes};if(e.dryRun){let t=await r();
|
|
18
|
+
Lists all store secrets.`).option(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Direction to sort objects.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Number of objects to return per page.`}).option(`search`,{type:`string`,description:`Search secrets using a filter string, filtering across name and comment.`}).option(`order`,{type:`string`,description:`Order secrets by values in the given field.`,choices:[`name`,`comment`,`created`,`modified`,`status`]}).option(`scopes`,{type:`string`,array:!0,description:`Only secrets with the given scopes will be returned.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`list`,describe:`List store secrets`,builder:L,handler:async e=>c({command:`secrets-store secrets list`,classification:{safeFlags:[`direction`,`order`,`dry-run`]}},e,async()=>{let c={direction:e.direction,page:e.page,per_page:e[`per-page`],search:e.search,order:e.order,scopes:e.scopes};if(e.dryRun){let t=await r();n({command:`cf secrets-store secrets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/secrets_store/stores/${e[`store-id`]==null?`<store-id>`:encodeURIComponent(String(e[`store-id`]))}/secrets`,pathParams:{"store-id":String(e[`store-id`]??``)},query:c,bodyKind:`none`});return}let l=await t(e),u=e.local?a:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(I,{account_id:u,store_id:e[`store-id`],...c}));o(d,{successLabel:`Loaded`})})},z={command:`secrets`,describe:`Encrypted key-value secrets within a store. Pass --store-id to scope.`,builder:e=>e.command(b).command(C).command(E).command(k).command(M).command(F).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`GET`,path:t=>e`/accounts/${t.account_id}/secrets_store/stores/${t.store_id}`};function V(e){return e.usage(`$0 secrets-store stores get <store-id>
|
|
19
19
|
|
|
20
|
-
Returns details of a single store.`).positional(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <store-id>`,describe:`Get a store by ID`,builder:V,handler:async e=>c({command:`secrets-store stores get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();
|
|
20
|
+
Returns details of a single store.`).positional(`store-id`,{type:`string`,description:`Store identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <store-id>`,describe:`Get a store by ID`,builder:V,handler:async e=>c({command:`secrets-store stores get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf secrets-store stores get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/secrets_store/stores/${e[`store-id`]==null?`<store-id>`:encodeURIComponent(String(e[`store-id`]))}`,pathParams:{"store-id":String(e[`store-id`]??``)},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(B,{account_id:l,store_id:e[`store-id`]}));o(u,{successLabel:`Loaded`})})};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/secrets_store/stores`,query:[`direction`,`page`,`per_page`,`order`],errors:{503:`ServiceUnavailableError`}};function W(e){return e.usage(`$0 secrets-store stores list
|
|
21
21
|
|
|
22
|
-
Lists
|
|
22
|
+
Lists account stores from an eventually consistent projection. Returns retryable HTTP 503 until initial backfill completes; empty accounts are ready immediately.`).option(`direction`,{type:`string`,description:`Direction to sort objects.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Number of objects to return per page.`}).option(`order`,{type:`string`,description:`Order stores by values in the given field.`,choices:[`name`,`created`,`modified`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`List account stores`,builder:W,handler:async e=>c({command:`secrets-store stores list`,classification:{safeFlags:[`direction`,`order`,`dry-run`]}},e,async()=>{let c={direction:e.direction,page:e.page,per_page:e[`per-page`],order:e.order};if(e.dryRun){let e=await r();n({command:`cf secrets-store stores list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secrets_store/stores`,pathParams:{},query:c,bodyKind:`none`});return}let l=await t(e),u=e.local?a:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(U,{account_id:u,...c}));o(d,{successLabel:`Loaded`})})},K={command:`stores`,describe:`Secret stores that hold encrypted key-value secrets accessible by Workers and services`,builder:e=>e.command(H).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},q={command:`secrets-store`,describe:`Centralized secret management — store API keys, tokens, and credentials for use across Workers and other products`,builder:e=>e.command(_).command(z).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{q as default};
|
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./dry-run-qsnRlRk6.mjs";import{a as r,i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-hFMAotFl.mjs";import{t as c}from"./progress-DE_G09u2.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{r as u,t as d}from"./body-parser-HN91kAf0.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{n as p,t as m}from"./raw-fetch-DhlyWQtk.mjs";var h={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/${t.issue_id}/audit-log`,query:[`per_page`,`cursor`,`field_changed`,`changed_by`,`since`,`before`,`order`]};function g(e){return e.usage(`$0 security-insights audit-logs get <issue-id>
|
|
3
3
|
|
|
4
4
|
Lists audit log entries for a specific Security Center insight, showing changes to its status and classification over time.
|
|
5
5
|
|
|
6
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`cursor`,{type:`string`,description:`Opaque cursor for pagination. Use the cursor value from result_info of the previous response.`}).option(`field-changed`,{type:`string`,description:`Filter by the field that was changed.`,choices:[`status`,`user_classification`]}).option(`changed-by`,{type:`string`,description:`Filter by the actor that made the change.`}).option(`since`,{type:`string`,description:`Filter entries changed at or after this timestamp (RFC 3339).`}).option(`before`,{type:`string`,description:`Filter entries changed before this timestamp (RFC 3339).`}).option(`order`,{type:`string`,description:`Sort order for results. Use 'asc' for oldest first or 'desc' for newest first.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
6
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`cursor`,{type:`string`,description:`Opaque cursor for pagination. Use the cursor value from result_info of the previous response.`}).option(`field-changed`,{type:`string`,description:`Filter by the field that was changed.`,choices:[`status`,`user_classification`]}).option(`changed-by`,{type:`string`,description:`Filter by the actor that made the change.`}).option(`since`,{type:`string`,description:`Filter entries changed at or after this timestamp (RFC 3339).`}).option(`before`,{type:`string`,description:`Filter entries changed before this timestamp (RFC 3339).`}).option(`order`,{type:`string`,description:`Sort order for results. Use 'asc' for oldest first or 'desc' for newest first.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get <issue-id>`,describe:`Retrieves Issue Audit Log`,builder:g,handler:async e=>l({command:`security-insights audit-logs get`,classification:{safeFlags:[`field-changed`,`order`,`dry-run`]}},e,async()=>{let l={per_page:e[`per-page`],cursor:e.cursor,field_changed:e[`field-changed`],changed_by:e[`changed-by`],since:e.since,before:e.before,order:e.order};if(e.dryRun){let t=e.zone===void 0?await r():void 0,i=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;n({command:`cf security-insights audit-logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${i}/${a}/security-center/insights/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}/audit-log`,pathParams:{"account-or-zone":String(i),"account-or-zone-id":String(a),"issue-id":String(e[`issue-id`]??``)},query:l,bodyKind:`none`});return}let u=await t(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?o:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(h,{account_or_zone:d,account_or_zone_id:f,issue_id:e[`issue-id`],...l}));s(p,{successLabel:`Loaded`})})};var ee={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/audit-log`,query:[`per_page`,`cursor`,`field_changed`,`changed_by`,`since`,`before`,`order`]};function v(e){return e.usage(`$0 security-insights audit-logs list
|
|
7
7
|
|
|
8
8
|
Lists audit log entries for all Security Center insights in the account or zone, showing changes to insight status and classification.
|
|
9
9
|
|
|
10
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`cursor`,{type:`string`,description:`Opaque cursor for pagination. Use the cursor value from result_info of the previous response.`}).option(`field-changed`,{type:`string`,description:`Filter by the field that was changed.`,choices:[`status`,`user_classification`]}).option(`changed-by`,{type:`string`,description:`Filter by the actor that made the change.`}).option(`since`,{type:`string`,description:`Filter entries changed at or after this timestamp (RFC 3339).`}).option(`before`,{type:`string`,description:`Filter entries changed before this timestamp (RFC 3339).`}).option(`order`,{type:`string`,description:`Sort order for results. Use 'asc' for oldest first or 'desc' for newest first.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
10
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`cursor`,{type:`string`,description:`Opaque cursor for pagination. Use the cursor value from result_info of the previous response.`}).option(`field-changed`,{type:`string`,description:`Filter by the field that was changed.`,choices:[`status`,`user_classification`]}).option(`changed-by`,{type:`string`,description:`Filter by the actor that made the change.`}).option(`since`,{type:`string`,description:`Filter entries changed at or after this timestamp (RFC 3339).`}).option(`before`,{type:`string`,description:`Filter entries changed before this timestamp (RFC 3339).`}).option(`order`,{type:`string`,description:`Sort order for results. Use 'asc' for oldest first or 'desc' for newest first.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`list`,describe:`Retrieves account or zone Audit Log`,builder:v,handler:async e=>l({command:`security-insights audit-logs list`,classification:{safeFlags:[`field-changed`,`order`,`dry-run`]}},e,async()=>{let l={per_page:e[`per-page`],cursor:e.cursor,field_changed:e[`field-changed`],changed_by:e[`changed-by`],since:e.since,before:e.before,order:e.order};if(e.dryRun){let t=e.zone===void 0?await r():void 0,i=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;n({command:`cf security-insights audit-logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${i}/${a}/security-center/insights/audit-log`,pathParams:{"account-or-zone":String(i),"account-or-zone-id":String(a)},query:l,bodyKind:`none`});return}let u=await t(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?o:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(ee,{account_or_zone:d,account_or_zone_id:f,...l}));s(p,{successLabel:`Loaded`})})},te={command:`audit-logs`,describe:`Operations for audit-logs`,builder:e=>e.command(_).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`PATCH`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/${t.issue_id}/classification`,body:`json`};function ne(e){return e.usage(`$0 security-insights classify <issue-id>
|
|
11
11
|
|
|
12
12
|
Updates the user classification for a Security Center insight. Valid values are 'false_positive' or 'accept_risk'. To reset, set classification to null. Cannot change directly between classification values - must reset to null first.
|
|
13
13
|
|
|
14
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`classification`,{type:`string`,description:`User-defined classification for the insight. Can be 'false_positive', 'accept_risk', 'other', or null.`,choices:[`false_positive`,`accept_risk`,`other`]}).coerce(`classification`,e=>f(e,`classification`,`text`)).option(`rationale`,{type:`string`,description:`Rationale for the classification change. Required when classification is 'accept_risk' or 'other'.`}).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
|
|
14
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`classification`,{type:`string`,description:`User-defined classification for the insight. Can be 'false_positive', 'accept_risk', 'other', or null.`,choices:[`false_positive`,`accept_risk`,`other`]}).coerce(`classification`,e=>f(e,`classification`,`text`)).option(`rationale`,{type:`string`,description:`Rationale for the classification change. Required when classification is 'accept_risk' or 'other'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`classify <issue-id>`,describe:`Updates Security Center Insight Classification`,builder:ne,handler:async e=>l({command:`security-insights classify`,classification:{safeFlags:[`classification`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,i=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;n({command:`cf security-insights classify`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${i}/${a}/security-center/insights/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}/classification`,pathParams:{"account-or-zone":String(i),"account-or-zone-id":String(a),"issue-id":String(e[`issue-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({classification:e.classification,rationale:f(e.rationale,`rationale`,`text`)}):u(e.body)});return}let l=e.body===void 0?void 0:u(e.body),p=await t(e),m=e.zone===void 0?`accounts`:`zones`,h=m===`zones`?await i({zone:e.zone},p,{quiet:e.quiet}):e.local?o:await a();if(m===`zones`?e.zoneId=h:e.accountId=h,e.body!==void 0){let t=l,n=await c(`Updating`,async()=>p.send(b,{body:t,account_or_zone:m,account_or_zone_id:h,issue_id:e[`issue-id`]}));s(n,{successLabel:`Updated`});return}let g=d({classification:e.classification,rationale:f(e.rationale,`rationale`,`text`)}),_=await c(`Updating`,async()=>p.send(b,{body:g,account_or_zone:m,account_or_zone_id:h,issue_id:e[`issue-id`]}));s(_,{successLabel:`Updated`})})};var S={method:`GET`,path:t=>e`/accounts/${t.account_id}/security-center/insights/${t.issue_id}/context`};function C(e){return e.usage(`$0 security-insights context get <issue-id>
|
|
15
15
|
|
|
16
|
-
Returns the full context payload for an insight. This endpoint is used for insights with large payloads that are not included inline in the list response.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
16
|
+
Returns the full context payload for an insight. This endpoint is used for insights with large payloads that are not included inline in the list response.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <issue-id>`,describe:`Retrieves Security Center Insight Context`,builder:C,handler:async e=>l({command:`security-insights context get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf security-insights context get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/security-center/insights/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}/context`,pathParams:{"issue-id":String(e[`issue-id`]??``)},bodyKind:`none`});return}let i=await t(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(S,{account_id:l,issue_id:e[`issue-id`]}));s(u,{successLabel:`Loaded`})})},T={command:`context`,describe:`Operations for context`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var E={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/class`,query:[`dismissed`,`issue_class`,`issue_type`,`product`,`source`,`severity`,`subject`,`issue_class~neq`,`issue_type~neq`,`product~neq`,`severity~neq`,`subject~neq`]};function D(e){return e.usage(`$0 security-insights count by-class
|
|
17
17
|
|
|
18
18
|
Retrieves Security Center insight counts aggregated by classification class.
|
|
19
19
|
|
|
20
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,array:!0,description:`Issue class`}).option(`issue-type`,{type:`string`,array:!0,description:`Issue type`}).option(`product`,{type:`string`,array:!0,description:`Product`}).option(`source`,{type:`string`,array:!0,description:`Source`}).option(`severity`,{type:`string`,array:!0,description:`Severity`}).option(`subject`,{type:`string`,array:!0,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
20
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,array:!0,description:`Issue class`}).option(`issue-type`,{type:`string`,array:!0,description:`Issue type`}).option(`product`,{type:`string`,array:!0,description:`Product`}).option(`source`,{type:`string`,array:!0,description:`Source`}).option(`severity`,{type:`string`,array:!0,description:`Severity`}).option(`subject`,{type:`string`,array:!0,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`by-class`,describe:`Retrieves Security Center Insight Counts by Class`,builder:D,handler:async e=>l({command:`security-insights count by-class`,classification:{safeFlags:[`dismissed`,`dry-run`]}},e,async()=>{let l={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,source:e.source,severity:e.severity,subject:e.subject};if(e.dryRun){let t=e.zone===void 0?await r():void 0,i=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;n({command:`cf security-insights count by-class`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${i}/${a}/security-center/insights/class`,pathParams:{"account-or-zone":String(i),"account-or-zone-id":String(a)},query:l,bodyKind:`none`});return}let u=await t(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?o:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(E,{account_or_zone:d,account_or_zone_id:f,...l}));s(p,{successLabel:`Loaded`})})};var k={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/partner-count`,query:[`source`]};function A(e){return e.usage(`$0 security-insights count by-partner
|
|
21
21
|
|
|
22
22
|
Retrieves the uncapped count of active, non-dismissed, unclassified RiskRecon insights for the account or zone.
|
|
23
23
|
|
|
24
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`source`,{type:`string`,description:`Source`,choices:[`riskrecon`],demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
24
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`source`,{type:`string`,description:`Source`,choices:[`riskrecon`],demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`by-partner`,describe:`Retrieves a Partner Security Center Insight Count`,builder:A,handler:async e=>l({command:`security-insights count by-partner`,classification:{safeFlags:[`source`,`dry-run`]}},e,async()=>{let l={source:e.source};if(e.dryRun){let t=e.zone===void 0?await r():void 0,i=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;n({command:`cf security-insights count by-partner`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${i}/${a}/security-center/insights/partner-count`,pathParams:{"account-or-zone":String(i),"account-or-zone-id":String(a)},query:l,bodyKind:`none`});return}let u=await t(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?o:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(k,{account_or_zone:d,account_or_zone_id:f,...l}));s(p,{successLabel:`Loaded`})})};var M={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/severity`,query:[`dismissed`,`issue_class`,`issue_type`,`product`,`source`,`severity`,`subject`,`issue_class~neq`,`issue_type~neq`,`product~neq`,`severity~neq`,`subject~neq`]};function N(e){return e.usage(`$0 security-insights count by-severity
|
|
25
25
|
|
|
26
26
|
Retrieves Security Center insight counts aggregated by severity level (critical, high, medium, low).
|
|
27
27
|
|
|
28
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,array:!0,description:`Issue class`}).option(`issue-type`,{type:`string`,array:!0,description:`Issue type`}).option(`product`,{type:`string`,array:!0,description:`Product`}).option(`source`,{type:`string`,array:!0,description:`Source`}).option(`severity`,{type:`string`,array:!0,description:`Severity`}).option(`subject`,{type:`string`,array:!0,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
28
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,array:!0,description:`Issue class`}).option(`issue-type`,{type:`string`,array:!0,description:`Issue type`}).option(`product`,{type:`string`,array:!0,description:`Product`}).option(`source`,{type:`string`,array:!0,description:`Source`}).option(`severity`,{type:`string`,array:!0,description:`Severity`}).option(`subject`,{type:`string`,array:!0,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`by-severity`,describe:`Retrieves Security Center Insight Counts by Severity`,builder:N,handler:async e=>l({command:`security-insights count by-severity`,classification:{safeFlags:[`dismissed`,`dry-run`]}},e,async()=>{let l={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,source:e.source,severity:e.severity,subject:e.subject};if(e.dryRun){let t=e.zone===void 0?await r():void 0,i=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;n({command:`cf security-insights count by-severity`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${i}/${a}/security-center/insights/severity`,pathParams:{"account-or-zone":String(i),"account-or-zone-id":String(a)},query:l,bodyKind:`none`});return}let u=await t(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?o:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(M,{account_or_zone:d,account_or_zone_id:f,...l}));s(p,{successLabel:`Loaded`})})};var F={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/type`,query:[`dismissed`,`issue_class`,`issue_type`,`product`,`source`,`severity`,`subject`,`issue_class~neq`,`issue_type~neq`,`product~neq`,`severity~neq`,`subject~neq`]};function I(e){return e.usage(`$0 security-insights count by-type
|
|
29
29
|
|
|
30
30
|
Retrieves Security Center insight counts aggregated by insight type.
|
|
31
31
|
|
|
32
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,array:!0,description:`Issue class`}).option(`issue-type`,{type:`string`,array:!0,description:`Issue type`}).option(`product`,{type:`string`,array:!0,description:`Product`}).option(`source`,{type:`string`,array:!0,description:`Source`}).option(`severity`,{type:`string`,array:!0,description:`Severity`}).option(`subject`,{type:`string`,array:!0,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
32
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,array:!0,description:`Issue class`}).option(`issue-type`,{type:`string`,array:!0,description:`Issue type`}).option(`product`,{type:`string`,array:!0,description:`Product`}).option(`source`,{type:`string`,array:!0,description:`Source`}).option(`severity`,{type:`string`,array:!0,description:`Severity`}).option(`subject`,{type:`string`,array:!0,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`by-type`,describe:`Retrieves Security Center Insight Counts by Type`,builder:I,handler:async e=>l({command:`security-insights count by-type`,classification:{safeFlags:[`dismissed`,`dry-run`]}},e,async()=>{let l={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,source:e.source,severity:e.severity,subject:e.subject};if(e.dryRun){let t=e.zone===void 0?await r():void 0,i=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;n({command:`cf security-insights count by-type`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${i}/${a}/security-center/insights/type`,pathParams:{"account-or-zone":String(i),"account-or-zone-id":String(a)},query:l,bodyKind:`none`});return}let u=await t(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?o:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(F,{account_or_zone:d,account_or_zone_id:f,...l}));s(p,{successLabel:`Loaded`})})},R={command:`count`,describe:`Operations for count`,builder:e=>e.command(O).command(j).command(P).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var z={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/${t.issue_id}/dismiss`,body:`json`};function B(e){return e.usage(`$0 security-insights dismiss <issue-id>
|
|
33
33
|
|
|
34
34
|
Archives a Security Center insight for an account or zone, removing it from the active insights list while preserving historical data.
|
|
35
35
|
|
|
36
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`dismiss`,{type:`boolean`,description:`The dismiss field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
36
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`dismiss`,{type:`boolean`,description:`The dismiss field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const V={command:`dismiss <issue-id>`,describe:`Archives Security Center Insight`,builder:B,handler:async e=>l({command:`security-insights dismiss`,classification:{safeFlags:[`dismiss`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,i=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;n({command:`cf security-insights dismiss`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${i}/${a}/security-center/insights/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}/dismiss`,pathParams:{"account-or-zone":String(i),"account-or-zone-id":String(a),"issue-id":String(e[`issue-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({dismiss:e.dismiss}):u(e.body)});return}let l=e.body===void 0?void 0:u(e.body),f=await t(e),p=e.zone===void 0?`accounts`:`zones`,m=p===`zones`?await i({zone:e.zone},f,{quiet:e.quiet}):e.local?o:await a();if(p===`zones`?e.zoneId=m:e.accountId=m,e.body!==void 0){let t=l,n=await c(`Updating`,async()=>f.send(z,{body:t,account_or_zone:p,account_or_zone_id:m,issue_id:e[`issue-id`]}));s(n,{successLabel:`Updated`});return}let h=d({dismiss:e.dismiss}),g=await c(`Updating`,async()=>f.send(z,{body:h,account_or_zone:p,account_or_zone_id:m,issue_id:e[`issue-id`]}));s(g,{successLabel:`Updated`})})};var H={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights`,query:[`dismissed`,`issue_class`,`issue_type`,`product`,`source`,`severity`,`subject`,`issue_class~neq`,`issue_type~neq`,`product~neq`,`severity~neq`,`subject~neq`,`page`,`per_page`]};function U(e){return e.usage(`$0 security-insights list
|
|
37
37
|
|
|
38
38
|
Lists all Security Center insights for the account or zone, showing security findings and recommendations.
|
|
39
39
|
|
|
40
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,array:!0,description:`Issue class`}).option(`issue-type`,{type:`string`,array:!0,description:`Issue type`}).option(`product`,{type:`string`,array:!0,description:`Product`}).option(`source`,{type:`string`,array:!0,description:`Source`}).option(`severity`,{type:`string`,array:!0,description:`Severity`}).option(`subject`,{type:`string`,array:!0,description:`Subject`}).option(`page`,{type:`number`,description:`Specifies the current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Sets the number of results per page of results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
40
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,array:!0,description:`Issue class`}).option(`issue-type`,{type:`string`,array:!0,description:`Issue type`}).option(`product`,{type:`string`,array:!0,description:`Product`}).option(`source`,{type:`string`,array:!0,description:`Source`}).option(`severity`,{type:`string`,array:!0,description:`Severity`}).option(`subject`,{type:`string`,array:!0,description:`Subject`}).option(`page`,{type:`number`,description:`Specifies the current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Sets the number of results per page of results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`Retrieves Security Center Insights`,builder:U,handler:async e=>l({command:`security-insights list`,classification:{safeFlags:[`dismissed`,`dry-run`]}},e,async()=>{let l={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,source:e.source,severity:e.severity,subject:e.subject,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=e.zone===void 0?await r():void 0,i=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;n({command:`cf security-insights list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${i}/${a}/security-center/insights`,pathParams:{"account-or-zone":String(i),"account-or-zone-id":String(a)},query:l,bodyKind:`none`});return}let u=await t(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?o:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(H,{account_or_zone:d,account_or_zone_id:f,...l}));s(p,{successLabel:`Loaded`})})};var G={method:`GET`,path:t=>e`/accounts/${t.account_id}/security-center/partners/${t.partner}/settings`};function K(e){return e.usage(`$0 security-insights partners settings get <partner>
|
|
41
41
|
|
|
42
|
-
Returns whether the account has enabled the selected partner integration and, if enabled, whether the account has been matched with the partner. An integration that has not been configured is returned as disabled.`).positional(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
42
|
+
Returns whether the account has enabled the selected partner integration and, if enabled, whether the account has been matched with the partner. An integration that has not been configured is returned as disabled.`).positional(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`get <partner>`,describe:`Retrieves Partner Integration Settings`,builder:K,handler:async e=>l({command:`security-insights partners settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf security-insights partners settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/security-center/partners/${e.partner==null?`<partner>`:encodeURIComponent(String(e.partner))}/settings`,pathParams:{partner:String(e.partner??``)},bodyKind:`none`});return}let i=await t(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(G,{account_id:l,partner:e.partner}));s(u,{successLabel:`Loaded`})})};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/security-center/partners/${t.partner}/settings`,body:`json`};function re(e){return e.usage(`$0 security-insights partners settings update <partner>
|
|
43
43
|
|
|
44
|
-
Enables or disables the selected partner integration for the account. Enabling the integration for the first time also schedules an account scan for that partner.`).positional(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`Whether the partner integration is enabled for the account.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Y={command:`update <partner>`,describe:`Updates Partner Integration Settings`,builder:
|
|
44
|
+
Enables or disables the selected partner integration for the account. Enabling the integration for the first time also schedules an account scan for that partner.`).positional(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`Whether the partner integration is enabled for the account.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Y={command:`update <partner>`,describe:`Updates Partner Integration Settings`,builder:re,handler:async e=>l({command:`security-insights partners settings update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf security-insights partners settings update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/security-center/partners/${e.partner==null?`<partner>`:encodeURIComponent(String(e.partner))}/settings`,pathParams:{partner:String(e.partner??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled}):u(e.body)});return}let i=e.body===void 0?void 0:u(e.body),l=await t(e),f=e.local?o:await a();if(e.accountId=f,e.body!==void 0){let t=i,n=await c(`Creating`,async()=>l.send(J,{body:t,account_id:f,partner:e.partner}));s(n,{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let p=d({enabled:e.enabled}),m=await c(`Creating`,async()=>l.send(J,{body:p,account_id:f,partner:e.partner}));s(m,{successLabel:`Created`})})},X={command:`settings`,describe:`Operations for partners.settings`,builder:e=>e.command(q).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ie(e){return e.usage(`$0 security-insights partners shadow-hosts list
|
|
45
45
|
|
|
46
|
-
Lists partner-discovered hosts beneath the zone that are not in the account.`).option(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`cursor`,{type:`string`,description:"Opaque cursor from the previous response's `result_info.cursor`. Omit for the first page."}).option(`per-page`,{type:`number`,description:`Number of premium partner asset results per page. Values other than 1 must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`list`,describe:`Lists Partner-Discovered Shadow Hosts for a Zone`,builder:ie,handler:async e=>l({command:`security-insights partners shadow-hosts list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let
|
|
46
|
+
Lists partner-discovered hosts beneath the zone that are not in the account.`).option(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`cursor`,{type:`string`,description:"Opaque cursor from the previous response's `result_info.cursor`. Omit for the first page."}).option(`per-page`,{type:`number`,description:`Number of premium partner asset results per page. Values other than 1 must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`list`,describe:`Lists Partner-Discovered Shadow Hosts for a Zone`,builder:ie,handler:async e=>l({command:`security-insights partners shadow-hosts list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let r={cursor:e.cursor,per_page:e[`per-page`]};if(e.dryRun){n({command:`cf security-insights partners shadow-hosts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/security-center/partners/${e.partner==null?`<partner>`:encodeURIComponent(String(e.partner))}/shadow-hosts`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),partner:String(e.partner??``)},query:r,bodyKind:`none`});return}let a=await t(e);e.zoneId=await i({zone:e.zone},a,{quiet:e.quiet});let o=new URLSearchParams(Object.entries(r).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),s=await c(`Loading`,async()=>m(`/zones/${e.zoneId}/security-center/partners/${encodeURIComponent(String(e.partner))}/shadow-hosts${o?`?`+o:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));p(s.toString(`utf-8`))})},oe={command:`shadow-hosts`,describe:`Operations for partners.shadow-hosts`,builder:e=>e.command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function se(e){return e.usage(`$0 security-insights partners shadow-zone-hosts list
|
|
47
47
|
|
|
48
|
-
Lists hosts discovered beneath a shadow-zone domain. This endpoint is available only to premium accounts and supports JSON and CSV output.`).option(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`domain`,{type:`string`,description:`The shadow-zone domain.`,demandOption:!0}).option(`cursor`,{type:`string`,description:"Opaque cursor from the previous response's `result_info.cursor`. Omit for the first page."}).option(`per-page`,{type:`number`,description:`Number of premium partner asset results per page. Values other than 1 must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`Lists Hosts in a Partner-Discovered Shadow Zone`,builder:se,handler:async e=>l({command:`security-insights partners shadow-zone-hosts list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={cursor:e.cursor,per_page:e[`per-page`]};if(e.dryRun){let t=await r();
|
|
48
|
+
Lists hosts discovered beneath a shadow-zone domain. This endpoint is available only to premium accounts and supports JSON and CSV output.`).option(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`domain`,{type:`string`,description:`The shadow-zone domain.`,demandOption:!0}).option(`cursor`,{type:`string`,description:"Opaque cursor from the previous response's `result_info.cursor`. Omit for the first page."}).option(`per-page`,{type:`number`,description:`Number of premium partner asset results per page. Values other than 1 must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`Lists Hosts in a Partner-Discovered Shadow Zone`,builder:se,handler:async e=>l({command:`security-insights partners shadow-zone-hosts list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={cursor:e.cursor,per_page:e[`per-page`]};if(e.dryRun){let t=await r();n({command:`cf security-insights partners shadow-zone-hosts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/security-center/partners/${e.partner==null?`<partner>`:encodeURIComponent(String(e.partner))}/shadow-zones/${e.domain==null?`<domain>`:encodeURIComponent(String(e.domain))}/hosts`,pathParams:{partner:String(e.partner??``),domain:String(e.domain??``)},query:i,bodyKind:`none`});return}await t(e);let s=e.local?o:await a();e.accountId=s;let l=new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await c(`Loading`,async()=>m(`/accounts/${s}/security-center/partners/${encodeURIComponent(String(e.partner))}/shadow-zones/${encodeURIComponent(String(e.domain))}/hosts${l?`?`+l:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));p(u.toString(`utf-8`))})},le={command:`shadow-zone-hosts`,describe:`Operations for partners.shadow-zone-hosts`,builder:e=>e.command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ue(e){return e.usage(`$0 security-insights partners shadow-zones list
|
|
49
49
|
|
|
50
|
-
Lists domains discovered by the selected partner that are not in the account. Baseline accounts receive the total count only; premium accounts receive paginated items and may request CSV output.`).option(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`cursor`,{type:`string`,description:"Opaque cursor from the previous response's `result_info.cursor`. Omit for the first page."}).option(`per-page`,{type:`number`,description:`Number of premium partner asset results per page. Values other than 1 must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`list`,describe:`Lists Partner-Discovered Shadow Zones`,builder:ue,handler:async e=>l({command:`security-insights partners shadow-zones list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={cursor:e.cursor,per_page:e[`per-page`]};if(e.dryRun){let t=await r();
|
|
50
|
+
Lists domains discovered by the selected partner that are not in the account. Baseline accounts receive the total count only; premium accounts receive paginated items and may request CSV output.`).option(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`cursor`,{type:`string`,description:"Opaque cursor from the previous response's `result_info.cursor`. Omit for the first page."}).option(`per-page`,{type:`number`,description:`Number of premium partner asset results per page. Values other than 1 must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`list`,describe:`Lists Partner-Discovered Shadow Zones`,builder:ue,handler:async e=>l({command:`security-insights partners shadow-zones list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={cursor:e.cursor,per_page:e[`per-page`]};if(e.dryRun){let t=await r();n({command:`cf security-insights partners shadow-zones list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/security-center/partners/${e.partner==null?`<partner>`:encodeURIComponent(String(e.partner))}/shadow-zones`,pathParams:{partner:String(e.partner??``)},query:i,bodyKind:`none`});return}await t(e);let s=e.local?o:await a();e.accountId=s;let l=new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await c(`Loading`,async()=>m(`/accounts/${s}/security-center/partners/${encodeURIComponent(String(e.partner))}/shadow-zones${l?`?`+l:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));p(u.toString(`utf-8`))})},fe={command:`shadow-zones`,describe:`Operations for partners.shadow-zones`,builder:e=>e.command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},pe={command:`partners`,describe:`Operations for partners`,builder:e=>e.command(X).command(oe).command(le).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var me={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/scans`};function he(e){return e.usage(`$0 security-insights scans list
|
|
51
51
|
|
|
52
52
|
Returns the most recent on-demand scans for the account or zone, up to a maximum of 5. Each scan includes its ID, start time, and current status. This includes both account or zone-wide and zone-scoped scans. Also returns quota information showing how many scans have been used and how many remain in the current 24-hour window.
|
|
53
53
|
|
|
54
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`list`,describe:`Get Recent account or zone Scans`,builder:he,handler:async e=>l({command:`security-insights scans list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,
|
|
54
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`list`,describe:`Get Recent account or zone Scans`,builder:he,handler:async e=>l({command:`security-insights scans list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,i=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;n({command:`cf security-insights scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${i}/${a}/security-center/insights/scans`,pathParams:{"account-or-zone":String(i),"account-or-zone-id":String(a)},bodyKind:`none`});return}let l=await t(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?o:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(me,{account_or_zone:u,account_or_zone_id:d}));s(f,{successLabel:`Loaded`})})};var Z={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/security-center/insights/scans`,body:`json`};function _e(e){return e.usage(`$0 security-insights scans start
|
|
55
55
|
|
|
56
56
|
Initiates an on-demand security scan for the entire account or zone, scanning all zones associated with the account or zone. Rate limited to 5 scans per account or zone per 24-hour window.
|
|
57
57
|
|
|
58
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`issue-type`,{type:`string`,description:`The issue_type field`,choices:[`compliance_violation`,`email_security`,`exposed_infrastructure`,`insecure_configuration`,`weak_authentication`,`configuration_suggestion`]}).coerce(`issue-type`,e=>f(e,`issue-type`,`text`)).option(`issue-class`,{type:`string`,description:`The issue_class field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for starting an on-demand scan. Specify issue_type or issue_class to scope the scan, or provide an empty object to scan all issue types.`}).conflicts(`issue-type`,[`issue-class`]).conflicts(`issue-class`,[`issue-type`])}const ve={command:`start`,describe:`Start On-Demand account or zone Scan`,builder:_e,handler:async e=>l({command:`security-insights scans start`,classification:{safeFlags:[`issue-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,
|
|
58
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`issue-type`,{type:`string`,description:`The issue_type field`,choices:[`compliance_violation`,`email_security`,`exposed_infrastructure`,`insecure_configuration`,`weak_authentication`,`configuration_suggestion`]}).coerce(`issue-type`,e=>f(e,`issue-type`,`text`)).option(`issue-class`,{type:`string`,description:`The issue_class field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for starting an on-demand scan. Specify issue_type or issue_class to scope the scan, or provide an empty object to scan all issue types.`}).conflicts(`issue-type`,[`issue-class`]).conflicts(`issue-class`,[`issue-type`])}const ve={command:`start`,describe:`Start On-Demand account or zone Scan`,builder:_e,handler:async e=>l({command:`security-insights scans start`,classification:{safeFlags:[`issue-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,i=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;n({command:`cf security-insights scans start`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${i}/${a}/security-center/insights/scans`,pathParams:{"account-or-zone":String(i),"account-or-zone-id":String(a)},bodyKind:`json`,body:e.body===void 0?d({issue_type:e[`issue-type`],issue_class:f(e[`issue-class`],`issue-class`,`text`)}):u(e.body)});return}let l=e.body===void 0?void 0:u(e.body),p=await t(e),m=e.zone===void 0?`accounts`:`zones`,h=m===`zones`?await i({zone:e.zone},p,{quiet:e.quiet}):e.local?o:await a();if(m===`zones`?e.zoneId=h:e.accountId=h,e.body!==void 0){let e=l,t=await c(`Creating`,async()=>p.send(Z,{body:e,account_or_zone:m,account_or_zone_id:h}));s(t,{successLabel:`Created`});return}let g=d({issue_type:e[`issue-type`],issue_class:f(e[`issue-class`],`issue-class`,`text`)}),_=await c(`Creating`,async()=>p.send(Z,{body:g,account_or_zone:m,account_or_zone_id:h}));s(_,{successLabel:`Created`})})},ye={command:`scans`,describe:`Operations for scans`,builder:e=>e.command(ge).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var be={method:`GET`,path:t=>e`/accounts/${t.account_id}/security-center/state`};function xe(e){return e.usage(`$0 security-insights state get
|
|
59
59
|
|
|
60
|
-
Returns account-level Security Center state: whether scans are enabled for the account and whether the account was recently reactivated from a dormant state.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`get`,describe:`Retrieves Account State`,builder:xe,handler:async e=>l({command:`security-insights state get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();
|
|
60
|
+
Returns account-level Security Center state: whether scans are enabled for the account and whether the account was recently reactivated from a dormant state.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`get`,describe:`Retrieves Account State`,builder:xe,handler:async e=>l({command:`security-insights state get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();n({command:`cf security-insights state get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/security-center/state`,pathParams:{},bodyKind:`none`});return}let i=await t(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(be,{account_id:l}));s(u,{successLabel:`Loaded`})})};var $={method:`PUT`,path:t=>e`/accounts/${t.account_id}/security-center/state`,body:`json`};function Se(e){return e.usage(`$0 security-insights state update
|
|
61
61
|
|
|
62
|
-
Updates account-level Security Center state. Currently supports enabling or disabling scans for the account. Returns the account's state after the update.`).option(`scans-enabled`,{type:`boolean`,description:`Enable or disable scans for the account.`}).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 Ce={command:`update`,describe:`Updates Account State`,builder:Se,handler:async e=>l({command:`security-insights state update`,classification:{safeFlags:[`scans-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();
|
|
62
|
+
Updates account-level Security Center state. Currently supports enabling or disabling scans for the account. Returns the account's state after the update.`).option(`scans-enabled`,{type:`boolean`,description:`Enable or disable scans for the account.`}).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 Ce={command:`update`,describe:`Updates Account State`,builder:Se,handler:async e=>l({command:`security-insights state update`,classification:{safeFlags:[`scans-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf security-insights state update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/security-center/state`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({scans_enabled:e[`scans-enabled`]}):u(e.body)});return}let i=e.body===void 0?void 0:u(e.body),l=await t(e),f=e.local?o:await a();if(e.accountId=f,e.body!==void 0){let e=i,t=await c(`Updating`,async()=>l.send($,{body:e,account_id:f}));s(t,{successLabel:`Updated`});return}if(e[`scans-enabled`]===void 0)throw Error(`--scans-enabled is required (or pass --body with this field set).`);let p=d({scans_enabled:e[`scans-enabled`]}),m=await c(`Updating`,async()=>l.send($,{body:p,account_id:f}));s(m,{successLabel:`Updated`})})},we={command:`state`,describe:`Operations for state`,builder:e=>e.command(Q).command(Ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Te={command:`security-insights`,describe:`security-insights`,builder:e=>e.command(x).command(V).command(W).command(te).command(T).command(R).command(pe).command(ye).command(we).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Te as default};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{i as n}from"./context-BGm5_wTT.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{t as i}from"./output-hFMAotFl.mjs";import{t as a}from"./progress-DE_G09u2.mjs";import{t as o}from"./run-CXWkMU3x.mjs";import{n as s}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";import{r as c,t as l}from"./body-parser-HN91kAf0.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";var d={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/security-center/securitytxt`};function f(e){return e.usage(`$0 security-txt delete
|
|
3
3
|
|
|
4
|
-
Removes the security.txt file configuration for a zone. The /.well-known/security.txt endpoint will no longer be served.`).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`,describe:`Deletes security.txt`,builder:f,handler:async e=>o({command:`security-txt delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){
|
|
4
|
+
Removes the security.txt file configuration for a zone. The /.well-known/security.txt endpoint will no longer be served.`).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`,describe:`Deletes security.txt`,builder:f,handler:async e=>o({command:`security-txt delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf security-txt delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/security-center/securitytxt`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,!await s({force:!!e.force}))return;let l=await a(`Deleting`,async()=>o.send(d,{zone_id:c}));i(l,{successLabel:`Deleted`})})};var m={method:`GET`,path:t=>e`/zones/${t.zone_id}/security-center/securitytxt`};function h(e){return e.usage(`$0 security-txt get
|
|
5
5
|
|
|
6
|
-
Retrieves the current security.txt file configuration for a zone, used for security vulnerability reporting.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get`,describe:`Retrieves security.txt`,builder:h,handler:async e=>o({command:`security-txt get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){
|
|
6
|
+
Retrieves the current security.txt file configuration for a zone, used for security vulnerability reporting.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get`,describe:`Retrieves security.txt`,builder:h,handler:async e=>o({command:`security-txt get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf security-txt get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/security-center/securitytxt`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(m,{zone_id:s}));i(c,{successLabel:`Loaded`})})};var _={method:`PUT`,path:t=>e`/zones/${t.zone_id}/security-center/securitytxt`,body:`json`};function v(e){return e.usage(`$0 security-txt update
|
|
7
7
|
|
|
8
|
-
Updates the security.txt file configuration for a zone, which provides security researchers with vulnerability reporting information.`).option(`acknowledgments`,{type:`string`,array:!0,description:`The acknowledgments field`}).option(`canonical`,{type:`string`,array:!0,description:`The canonical field`}).option(`contact`,{type:`string`,array:!0,description:`The contact field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`encryption`,{type:`string`,array:!0,description:`The encryption field`}).option(`expires`,{type:`string`,description:`The expires field`}).option(`hiring`,{type:`string`,array:!0,description:`The hiring field`}).option(`policy`,{type:`string`,array:!0,description:`The policy field`}).option(`preferred-languages`,{type:`string`,description:`The preferred_languages field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`update`,describe:`Updates security.txt`,builder:v,handler:async e=>o({command:`security-txt update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){
|
|
8
|
+
Updates the security.txt file configuration for a zone, which provides security researchers with vulnerability reporting information.`).option(`acknowledgments`,{type:`string`,array:!0,description:`The acknowledgments field`}).option(`canonical`,{type:`string`,array:!0,description:`The canonical field`}).option(`contact`,{type:`string`,array:!0,description:`The contact field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`encryption`,{type:`string`,array:!0,description:`The encryption field`}).option(`expires`,{type:`string`,description:`The expires field`}).option(`hiring`,{type:`string`,array:!0,description:`The hiring field`}).option(`policy`,{type:`string`,array:!0,description:`The policy field`}).option(`preferred-languages`,{type:`string`,description:`The preferred_languages field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`update`,describe:`Updates security.txt`,builder:v,handler:async e=>o({command:`security-txt update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf security-txt update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/security-center/securitytxt`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({acknowledgments:e.acknowledgments,canonical:e.canonical,contact:e.contact,enabled:e.enabled,encryption:e.encryption,expires:u(e.expires,`expires`,`text`),hiring:e.hiring,policy:e.policy,preferred_languages:u(e[`preferred-languages`],`preferred-languages`,`text`)}):c(e.body)});return}let o=e.body===void 0?void 0:c(e.body),s=await t(e),d=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=d,e.body!==void 0){let e=o,t=await a(`Updating`,async()=>s.send(_,{body:e,zone_id:d}));i(t,{successLabel:`Updated`});return}let f=l({acknowledgments:e.acknowledgments,canonical:e.canonical,contact:e.contact,enabled:e.enabled,encryption:e.encryption,expires:u(e.expires,`expires`,`text`),hiring:e.hiring,policy:e.policy,preferred_languages:u(e[`preferred-languages`],`preferred-languages`,`text`)}),p=await a(`Updating`,async()=>s.send(_,{body:f,zone_id:d}));i(p,{successLabel:`Updated`})})},b={command:`security-txt`,describe:`Manage the /.well-known/security.txt file that tells security researchers how to report vulnerabilities`,builder:e=>e.command(p).command(g).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{c as e}from"./chunk-Q5KVZMHK-WOCEMyET.mjs";import{r as t}from"./blocks-C3Im7AT0.mjs";import{r as n}from"./theme-BGHWSKCw.mjs";let r=!1,i=!1,a=!1;function o(e,n={}){r||i||(n.quiet||!process.stderr.isTTY?i=!0:(process.stderr.write(`${t(e,n.update)}\n`),r=!0))}function s(t){!r||i||a||t==="default"||e({allowGlobalAuthKey:!1})!==void 0||(process.stderr.write(`${n.muted(`Active profile:`)} ${n.info(t)}\n`),a=!0)}export{s as n,o as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{_ as e,d as t,f as n,t as r}from"./deploy-context-B_lLfxt7.mjs";import{a as i,d as a,f as o,r as s,s as c}from"./static-assets-DGDoaJf1.mjs";import{J as l,X as u,at as d}from"./dist-BxhwE-W1.mjs";import{a as f,i as p,n as m,o as h,r as g,s as _}from"./build-yQOzZg6Z.mjs";import{t as v}from"./cli-exit-CstFZ1eJ.mjs";import{i as y,r as b}from"./dotenv-DKRemNCH.mjs";import{i as x,n as S,t as C}from"./deploy-input-JZlEJwKB.mjs";import{t as w}from"./log-Brx-wjJW.mjs";import{readBuildOutput as T}from"@cloudflare/build-output-utils";function E(e){return e.option(`prebuilt`,{type:`boolean`,description:`Deploy existing Build Output Specification files without building`,default:!1}).option(`tag`,{type:`string`,description:`A tag to associate with this Worker Version`,requiresArg:!0}).option(`message`,{type:`string`,description:`A message to associate with this Worker Version`,requiresArg:!0}).option(`secrets-file`,{type:`string`,description:"Path to a file containing secrets to upload with the version (JSON or .env format). Dotenv values expand $VAR and ${VAR} using process environment values and earlier file values; process environment values override file values, including empty values. Only declared file keys are uploaded. Only use trusted dotenv secrets files: they can read and upload any process environment value. Escape literal dollar signs with \\$ or use JSON.",requiresArg:!0}).option(`dry-run`,{describe:`Build a project and run checks without actually uploading the Worker`,type:`boolean`,default:!1}).option(`worker`,g)}async function D(e,t){if(!e.prebuilt){if(await m(e.mode,{worker:e.worker,dryRun:e[`dry-run`]})===`setup-needed`){w.success(`--dry-run: exiting now.`);return}w.message(``)}return b(e,()=>O(e,t))}async function O(m,g){let{workers:b,rootConfig:E,containers:D}=await T(process.cwd());if(E.buildContext.isPreview){let e=[`cf previews deploy`,...m.prebuilt?[`--prebuilt`]:[],...E.buildContext.mode===void 0?[]:[`--mode`,E.buildContext.mode]].join(` `);throw Error(`This build output is for a Preview. Run ${e} instead.`)}_(m.mode,E.buildContext.mode),h(E.accountId,m[`temporary-account`]===!0);let O=f(b,m.worker),k=p(O,E),A=y(k.wranglerConfig),j=C(O,k.builtConfig),M=u(A),{authToken:N,accountId:P}=await i({accountId:E.accountId,complianceRegion:M,dryRun:m[`dry-run`]}),F=r(N);o(F),e({logger:F.logger,fetchResult:F.fetchResult,fetchPagedListResult:F.fetchPagedListResult}),P!==void 0&&D.length>0&&n(P,N,l(A));let I=s(D,A,{accountId:P,containersRollout:m[`containers-rollout`]}),L,R=!1,z=process.exitCode;try{if(process.exitCode=void 0,g.command===`Deploy`){let e=S(O,A,P,m,I);w.section(`Deploy`),{versionId:L}=await c(e,A,j,{deployCommand:`cf deploy`,versionsDeployCommand:`cf workers deployments create --worker <worker-name> --strategy percentage --versions <versions-json>`,d1ListCommand:`cf d1 list`,d1DeleteCommand:`cf d1 delete <database-id>`,queueCreateCommand:e=>`cf queues create --queue-name ${e}`,secretPutCommand:`cf workers secrets update --worker <worker-name> --type secret_text`,workersDevConfigFieldName:`workersDev`,workersDevConfigAssignment:e=>`workersDev: ${e}`,previewUrlsConfigFieldName:`previewUrls`,previewUrlsConfigAssignment:e=>`previewUrls: ${e}`,configFileName:`cloudflare.config.ts`,observabilityTargetPercentageField:`targetInstancePercentage`,observabilityTargetCountField:`targetInstanceCount`,syncWorkersSite:void 0,analyseBundle:void 0})}else{let e=x(O,A,P,m,I);w.section(`Upload`),{versionId:L}=await a(e,A,j,{deployCommand:`cf deploy`,versionsUploadCommand:`cf workers versions create`,versionsDeployCommand:`cf workers deployments create --worker <worker-name> --strategy percentage --versions <versions-json>`,triggersDeployCommand:`cf workers triggers deploy`,d1ListCommand:`cf d1 list`,d1DeleteCommand:`cf d1 delete <database-id>`,queueCreateCommand:e=>`cf queues create --queue-name ${e}`,versionsSecretPutCommand:`wrangler versions secret put`,analyseBundle:void 0})}R=L===null&&process.exitCode===1&&!m[`dry-run`]}finally{process.exitCode??=z}if(R)throw new v(1);L===null||m[`dry-run`]||g.command===`Deploy`&&m[`containers-rollout`]===`none`||await t([...g.command===`Deploy`?I.standard.builtImages:[],...I.durableObjects.builtImages],d()),m[`dry-run`]||w.success(`${g.command} complete`)}export{E as n,D as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-DA1PHaHi.mjs";import{t}from"./dry-run-qsnRlRk6.mjs";import{t as n}from"./output-hFMAotFl.mjs";import{t as r}from"./progress-DE_G09u2.mjs";import{t as i}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";var a={method:`GET`,path:()=>`/signed-url`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function o(e){return e.usage(`$0 signed-url get
|
|
3
3
|
|
|
4
|
-
Internal route for testing signed URLs.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get`,describe:`Internal route for testing signed URLs`,builder:o,handler:async o=>i({command:`signed-url get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){
|
|
4
|
+
Internal route for testing signed URLs.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get`,describe:`Internal route for testing signed URLs`,builder:o,handler:async o=>i({command:`signed-url get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){t({command:`cf signed-url get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/signed-url`,pathParams:{},bodyKind:`none`});return}let i=await e(o),s=await r(`Loading`,async()=>i.send(a));n(s,{successLabel:`Loaded`})})},c={command:`signed-url`,describe:`signed-url`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{i as n}from"./context-BGm5_wTT.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{t as i}from"./output-hFMAotFl.mjs";import{t as a}from"./progress-DE_G09u2.mjs";import{t as o}from"./run-CXWkMU3x.mjs";import{a as s,n as c}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";import{i as l,o as u,r as d,t as f}from"./body-parser-HN91kAf0.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";var m={method:`POST`,path:t=>e`/zones/${t.zone_id}/smart_shield/cache_reserve_clear`};function h(e){return e.usage(`$0 smart-shield cache-reserve-clear clear
|
|
3
|
+
|
|
4
|
+
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).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 g={command:`clear`,describe:`Start Cache Reserve Clear`,builder:h,handler:async e=>o({command:`smart-shield cache-reserve-clear clear`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf smart-shield cache-reserve-clear clear`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/cache_reserve_clear`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await c({force:!!e.force,message:`This operation permanently clears Cache Reserve for this zone and cannot be undone.`}))return;let l=await a(`Processing`,async()=>o.send(m,{zone_id:s}));i(l,{successLabel:`Done`})})};var _={method:`GET`,path:t=>e`/zones/${t.zone_id}/smart_shield/cache_reserve_clear`};function v(e){return e.usage(`$0 smart-shield cache-reserve-clear status
|
|
5
|
+
|
|
6
|
+
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`status`,describe:`Get Cache Reserve Clear`,builder:v,handler:async e=>o({command:`smart-shield cache-reserve-clear status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf smart-shield cache-reserve-clear status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/cache_reserve_clear`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(_,{zone_id:s}));i(c,{successLabel:`Loaded`})})},b={command:`cache-reserve-clear`,describe:`Cache Reserve Clear operations`,builder:e=>e.command(g).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`GET`,path:t=>e`/zones/${t.zone_id}/smart_shield`,errors:{500:`InternalServerError`,502:`BadGatewayError`}};function S(e){return e.usage(`$0 smart-shield get
|
|
7
|
+
|
|
8
|
+
Retrieve Smart Shield Settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get`,describe:`Get Smart Shield Settings`,builder:S,handler:async e=>o({command:`smart-shield get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf smart-shield get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(x,{zone_id:s}));i(c,{successLabel:`Loaded`})})};var w={method:`POST`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks`,body:`json`};function T(e){return e.usage(`$0 smart-shield health-checks create
|
|
9
|
+
|
|
10
|
+
Create a new health check.`).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`,default:1}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`,default:1}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": [string]}.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>p(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>p(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const E={command:`create`,describe:`Create Health Check`,builder:T,handler:async e=>o({command:`smart-shield health-checks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf smart-shield health-checks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/healthchecks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({address:p(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:p(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:p(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:l(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:p(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:p(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:p(e.type,`type`,`text`)},[[`http_config`,`header`]]):d(e.body)});return}let o=e.body===void 0?void 0:d(e.body),c=await t(e),u=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let e=o,t=await a(`Creating`,async()=>c.send(w,{body:e,zone_id:u}));i(t,{successLabel:`Created`});return}e.address===void 0&&(e.address=await s(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await s(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let m=f({address:p(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:p(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:p(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:l(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:p(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:p(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:p(e.type,`type`,`text`)},[[`http_config`,`header`]]),h=await a(`Creating`,async()=>c.send(w,{body:m,zone_id:u}));i(h,{successLabel:`Created`})})};var D={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks/${t.healthcheck_id}`};function O(e){return e.usage(`$0 smart-shield health-checks delete <healthcheck-id>
|
|
11
|
+
|
|
12
|
+
Delete a health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const k={command:`delete <healthcheck-id>`,describe:`Delete Health Check`,builder:O,handler:async e=>o({command:`smart-shield health-checks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf smart-shield health-checks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await c({force:!!e.force}))return;let l=await a(`Deleting`,async()=>o.send(D,{zone_id:s,healthcheck_id:e[`healthcheck-id`]}));i(l,{successLabel:`Deleted`})})};var A={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks/${t.healthcheck_id}`,body:`json`};function j(e){return e.usage(`$0 smart-shield health-checks edit <healthcheck-id>
|
|
13
|
+
|
|
14
|
+
Patch a configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": [string]}.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>p(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>p(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`edit <healthcheck-id>`,describe:`Patch Health Check`,builder:j,handler:async e=>o({command:`smart-shield health-checks edit`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf smart-shield health-checks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({address:p(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:p(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:p(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:l(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:p(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:p(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:p(e.type,`type`,`text`)},[[`http_config`,`header`]]):d(e.body)});return}let o=e.body===void 0?void 0:d(e.body),c=await t(e),u=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>c.send(A,{body:t,zone_id:u,healthcheck_id:e[`healthcheck-id`]}));i(n,{successLabel:`Updated`});return}e.address===void 0&&(e.address=await s(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await s(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let m=f({address:p(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:p(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:p(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:l(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:p(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:p(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:p(e.type,`type`,`text`)},[[`http_config`,`header`]]),h=await a(`Updating`,async()=>c.send(A,{body:m,zone_id:u,healthcheck_id:e[`healthcheck-id`]}));i(h,{successLabel:`Updated`})})};var N={method:`GET`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks/${t.healthcheck_id}`};function P(e){return e.usage(`$0 smart-shield health-checks get <healthcheck-id>
|
|
15
|
+
|
|
16
|
+
Fetch a single configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <healthcheck-id>`,describe:`Health Check Details`,builder:P,handler:async e=>o({command:`smart-shield health-checks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf smart-shield health-checks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(N,{zone_id:s,healthcheck_id:e[`healthcheck-id`]}));i(c,{successLabel:`Loaded`})})};var I={method:`GET`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks`,query:[`page`,`per_page`]};function L(e){return e.usage(`$0 smart-shield health-checks list
|
|
17
|
+
|
|
18
|
+
List configured health checks.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page. Must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`list`,describe:`List Health Checks`,builder:L,handler:async e=>o({command:`smart-shield health-checks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`]};if(e.dryRun){r({command:`cf smart-shield health-checks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/healthchecks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(I,{zone_id:c,...o}));i(l,{successLabel:`Loaded`})})};var z={method:`PUT`,path:t=>e`/zones/${t.zone_id}/smart_shield/healthchecks/${t.healthcheck_id}`,body:`json`,constants:{success:!0}};function B(e){return e.usage(`$0 smart-shield health-checks update <healthcheck-id>
|
|
19
|
+
|
|
20
|
+
Update a configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`errors`,{type:`string`,description:`The errors field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"code": number, "message": string}].`}).option(`messages`,{type:`string`,description:`The messages field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"code": number, "message": string}].`}).option(`result-address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`result-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(`result-consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`result-consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`result-description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`result-http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`result-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(`result-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(`result-http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`result-http-config-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": [string]}.`}).option(`result-http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`result-http-config-method`,e=>p(e,`result-http-config-method`,`text`)).option(`result-http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`result-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(`result-interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`result-name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`result-retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`result-suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`result-tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`result-tcp-config-method`,e=>p(e,`result-tcp-config-method`,`text`)).option(`result-tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`result-timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`result-type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`success`,{type:`boolean`,description:`Whether the API call was successful.`}).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 V={command:`update <healthcheck-id>`,describe:`Update Health Check`,builder:B,handler:async e=>o({command:`smart-shield health-checks update`,classification:{safeFlags:[`result-http-config-allow-insecure`,`result-http-config-follow-redirects`,`result-http-config-method`,`result-suspended`,`result-tcp-config-method`,`success`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf smart-shield health-checks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield/healthchecks/${e[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(e[`healthcheck-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"healthcheck-id":String(e[`healthcheck-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({errors:u(e.errors,`errors`),messages:u(e.messages,`messages`),result:{address:p(e[`result-address`],`result-address`,`text`),check_regions:e[`result-check-regions`],consecutive_fails:e[`result-consecutive-fails`],consecutive_successes:e[`result-consecutive-successes`],description:p(e[`result-description`],`result-description`,`text`),http_config:{allow_insecure:e[`result-http-config-allow-insecure`],expected_body:p(e[`result-http-config-expected-body`],`result-http-config-expected-body`,`text`),expected_codes:e[`result-http-config-expected-codes`],follow_redirects:e[`result-http-config-follow-redirects`],header:l(e[`result-http-config-header`],`result-http-config-header`),method:e[`result-http-config-method`],path:p(e[`result-http-config-path`],`result-http-config-path`,`text`),port:e[`result-http-config-port`]},interval:e[`result-interval`],name:p(e[`result-name`],`result-name`,`text`),retries:e[`result-retries`],suspended:e[`result-suspended`],tcp_config:{method:e[`result-tcp-config-method`],port:e[`result-tcp-config-port`]},timeout:e[`result-timeout`],type:p(e[`result-type`],`result-type`,`text`)},success:e.success},[[`result`,`http_config`,`header`]]):d(e.body)});return}let o=e.body===void 0?void 0:d(e.body),s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=c,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>s.send(z,{body:t,zone_id:c,healthcheck_id:e[`healthcheck-id`]}));i(n,{successLabel:`Updated`});return}if(e.errors===void 0)throw Error(`--errors is required (or pass --body with this field set).`);if(e.messages===void 0)throw Error(`--messages is required (or pass --body with this field set).`);if(e.success===void 0)throw Error(`--success is required (or pass --body with this field set).`);let m=f({errors:u(e.errors,`errors`),messages:u(e.messages,`messages`),result:{address:p(e[`result-address`],`result-address`,`text`),check_regions:e[`result-check-regions`],consecutive_fails:e[`result-consecutive-fails`],consecutive_successes:e[`result-consecutive-successes`],description:p(e[`result-description`],`result-description`,`text`),http_config:{allow_insecure:e[`result-http-config-allow-insecure`],expected_body:p(e[`result-http-config-expected-body`],`result-http-config-expected-body`,`text`),expected_codes:e[`result-http-config-expected-codes`],follow_redirects:e[`result-http-config-follow-redirects`],header:l(e[`result-http-config-header`],`result-http-config-header`),method:e[`result-http-config-method`],path:p(e[`result-http-config-path`],`result-http-config-path`,`text`),port:e[`result-http-config-port`]},interval:e[`result-interval`],name:p(e[`result-name`],`result-name`,`text`),retries:e[`result-retries`],suspended:e[`result-suspended`],tcp_config:{method:e[`result-tcp-config-method`],port:e[`result-tcp-config-port`]},timeout:e[`result-timeout`],type:p(e[`result-type`],`result-type`,`text`)},success:e.success},[[`result`,`http_config`,`header`]]),h=await a(`Updating`,async()=>s.send(z,{body:m,zone_id:c,healthcheck_id:e[`healthcheck-id`]}));i(h,{successLabel:`Updated`})})},H={command:`health-checks`,describe:`Health checks operations`,builder:e=>e.command(E).command(k).command(M).command(F).command(R).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/smart_shield`,body:`json`,errors:{500:`InternalServerError`,502:`BadGatewayError`}};function W(e){return e.usage(`$0 smart-shield update
|
|
21
|
+
|
|
22
|
+
Set Smart Shield Settings.`).option(`cache-reserve-value`,{type:`string`,description:`Specifies the enablement value of Cache Reserve.`,choices:[`on`,`off`]}).coerce(`cache-reserve-value`,e=>p(e,`cache-reserve-value`,`text`)).option(`regional-tiered-cache-value`,{type:`string`,description:`Specifies the enablement value of Regional Tiered Cache.`,choices:[`on`,`off`]}).coerce(`regional-tiered-cache-value`,e=>p(e,`regional-tiered-cache-value`,`text`)).option(`smart-routing-value`,{type:`string`,description:`Specifies the enablement value of Smart Routing.`,choices:[`on`,`off`]}).coerce(`smart-routing-value`,e=>p(e,`smart-routing-value`,`text`)).option(`smart-tiered-cache-value`,{type:`string`,description:`Specifies the enablement value of Smart Tiered Cache.`,choices:[`on`,`off`]}).coerce(`smart-tiered-cache-value`,e=>p(e,`smart-tiered-cache-value`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The patch body for Smart Shield.`})}const G={command:`update`,describe:`Patch Smart Shield Settings`,builder:W,handler:async e=>o({command:`smart-shield update`,classification:{safeFlags:[`cache-reserve-value`,`regional-tiered-cache-value`,`smart-routing-value`,`smart-tiered-cache-value`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf smart-shield update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/smart_shield`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({cache_reserve:{value:e[`cache-reserve-value`]},regional_tiered_cache:{value:e[`regional-tiered-cache-value`]},smart_routing:{value:e[`smart-routing-value`]},smart_tiered_cache:{value:e[`smart-tiered-cache-value`]}}):d(e.body)});return}let o=e.body===void 0?void 0:d(e.body),s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=c,e.body!==void 0){let e=o,t=await a(`Updating`,async()=>s.send(U,{body:e,zone_id:c}));i(t,{successLabel:`Updated`});return}let l=f({cache_reserve:{value:e[`cache-reserve-value`]},regional_tiered_cache:{value:e[`regional-tiered-cache-value`]},smart_routing:{value:e[`smart-routing-value`]},smart_tiered_cache:{value:e[`smart-tiered-cache-value`]}}),u=await a(`Updating`,async()=>s.send(U,{body:l,zone_id:c}));i(u,{successLabel:`Updated`})})},K={command:`smart-shield`,describe:`Smart Shield settings, health checks, and cache reserve management`,builder:e=>e.command(C).command(G).command(b).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{K as default};
|