cf 1.0.0-beta.28 → 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 +2240 -3181
- package/dist/_meta/hand-written-commands.json +38 -8
- package/dist/_meta/schemas.json +1683 -2505
- package/dist/{abuse-reports-D9edOyag.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
- package/dist/{access-CKCCSrrU.mjs → access-Cte4yyIz.mjs} +1 -1
- package/dist/{accounts-CNb9U9bK.mjs → accounts-G-x-_cEx.mjs} +58 -57
- package/dist/{acm-CdKTAToZ.mjs → acm-Bg3HqMGG.mjs} +7 -7
- package/dist/{addressing-eZI_C-b0.mjs → addressing-BwEofGEm.mjs} +46 -46
- package/dist/{agent-memory-BBHCEE7h.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
- package/dist/{ai-Csl_QNwv.mjs → ai-DWWRIQIt.mjs} +16 -16
- package/dist/{ai-audit-DlqWsQi-.mjs → ai-audit-CMEBz6ZP.mjs} +3 -3
- package/dist/ai-gateway-D2s0isU-.mjs +76 -0
- package/dist/ai-search-a0uqr9yJ.mjs +74 -0
- package/dist/{ai-security-DvU2iYkY.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-BlIecoOe.mjs → analytics-engine-BLiEaLxb.mjs} +2 -2
- package/dist/{api-security-DZ7GWOqD.mjs → api-security-B0YtHglt.mjs} +63 -63
- package/dist/{argo-Bh0_cj49.mjs → argo-BPwbzHY7.mjs} +7 -7
- package/dist/{artifacts-VZJWVq_6.mjs → artifacts-B6UwC2PH.mjs} +20 -20
- package/dist/{audit-logs-B8cGL4B9.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-DW4dJVdj.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
- package/dist/{autoconfig-C0ynlGHf.mjs → autoconfig-B4tFR6ua.mjs} +120 -116
- package/dist/{basin-catalog-TehR1sKZ.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
- package/dist/{billing-B2KusU6g.mjs → billing-TERxOuLR.mjs} +11 -11
- package/dist/{blocks-BFulF68V.mjs → blocks-C3Im7AT0.mjs} +1 -1
- package/dist/body-parser-HN91kAf0.mjs +2 -0
- package/dist/{body-unions-DNs981Ia.mjs → body-unions-D9OSaf4M.mjs} +1 -1
- package/dist/{bot-management-CXHXgrQC.mjs → bot-management-SZw9jTOC.mjs} +4 -4
- package/dist/{botnet-feed-UyK7Rfp6.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-FFxzigo4.mjs → build-yQOzZg6Z.mjs} +1 -1
- package/dist/builds-tMa3sbQU.mjs +62 -0
- package/dist/{cache-BacNNtLu.mjs → cache-b_EPh6Is.mjs} +18 -18
- package/dist/cf-DmvZ2L51.mjs +18 -0
- package/dist/{chunk-DSGVRFIS-BaNZNW-M.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-bzB9JosR.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
- package/dist/{cloud-connector-BHtf37R5.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
- package/dist/{cloudflared-QDdHMUEY.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
- package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
- package/dist/{command-D895kdlh.mjs → command-BQbZw4Kx.mjs} +1 -1
- package/dist/command-BVct0Dvr.mjs +2 -0
- package/dist/{command-DeutqL1n.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-CbxXc5IW.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-BvdKtzsX.mjs → completions-0YKvIyBT.mjs} +2 -2
- package/dist/{connector-interrupts-dUPW6Ya_.mjs → connector-interrupts-CsunbRsr.mjs} +3 -3
- package/dist/{connector-telemetry-events-DWVCqnhn.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
- package/dist/{connector-telemetry-snapshots-CeMP3qeI.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
- package/dist/{connectors-DZFGNw3i.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
- package/dist/{containers-DCzQCo79.mjs → containers-BiA_bpPR.mjs} +22 -21
- package/dist/{content-scan-XhnNJqXf.mjs → content-scan-4SA2nacB.mjs} +6 -6
- package/dist/{context-BY1Eh_Qe.mjs → context-BGm5_wTT.mjs} +1 -1
- package/dist/{cps-CohlxvuN.mjs → cps-WDmD3V5I.mjs} +3 -3
- package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
- package/dist/{custom-csrs-BVdMQjYq.mjs → custom-csrs-D-lvkyRV.mjs} +5 -5
- package/dist/{custom-hostnames-r-CxhSa1.mjs → custom-hostnames-B5BQX5m6.mjs} +12 -12
- package/dist/{custom-nameservers-CapMDyly.mjs → custom-nameservers-CZrRjcjx.mjs} +4 -4
- package/dist/{custom-pages-BVIniWfq.mjs → custom-pages-CWwjtfbj.mjs} +10 -10
- package/dist/d1-N81q-FAr.mjs +50 -0
- package/dist/{delegate-CcL6RoGw.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-C3nqxsAO.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-D-ihn_mV.mjs → dist-BxhwE-W1.mjs} +193 -193
- package/dist/{dls-N1x8sAK3.mjs → dls-5OXuxLAB.mjs} +8 -8
- package/dist/{dns-DATWP-PF.mjs → dns-Burep9O7.mjs} +59 -69
- package/dist/{dns-firewall-n3Y2ui6W.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
- package/dist/docs-BFVK88kB.mjs +3 -0
- package/dist/{dry-run-kJbjn4kG.mjs → dry-run-qsnRlRk6.mjs} +1 -1
- package/dist/{durable-objects-DHK9w-vO.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-DK_SJ0yi.mjs → email-security-DwQJszzy.mjs} +71 -71
- package/dist/{email-sending-CTQafGec.mjs → email-sending-mQd2qB-o.mjs} +21 -21
- package/dist/errors-C_bGcR0X.mjs +11 -0
- package/dist/field-extractors-MVOizTlB.mjs +8 -0
- package/dist/{firewall-CW-fAI9m.mjs → firewall-DtSIlkfL.mjs} +19 -19
- package/dist/{flagship-RiLnDwfJ.mjs → flagship-9E5gwNki.mjs} +12 -12
- package/dist/{fraud-DvfBBTe8.mjs → fraud-DjqhVJdf.mjs} +3 -3
- package/dist/generate-BzOnRBij.mjs +2 -0
- package/dist/generate-DfxZtpn9.mjs +2 -0
- package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
- package/dist/{google-tag-gateway-C5WYsSXv.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-Ch6klUp3.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
- package/dist/{iam-LlGEzRCq.mjs → iam-BK6N7NdQ.mjs} +31 -31
- package/dist/{images-C5WqUXkK.mjs → images-3bCWE6Ml.mjs} +33 -33
- package/dist/index.mjs +1 -1
- package/dist/init-BgCF9K8h.mjs +43 -0
- package/dist/{intel-vcWyslaX.mjs → intel-BQ58CJLt.mjs} +30 -30
- package/dist/{interactive-BCDFSPtq.mjs → interactive-JBA3qOUa.mjs} +9 -9
- package/dist/{internal-BhV9WjLp.mjs → internal-CWPz0sBF.mjs} +2 -2
- package/dist/{ips-CqHjVsqd.mjs → ips-3WYegiVW.mjs} +2 -2
- package/dist/{k2-CZT2Pd5J.mjs → k2-Bc_hjmiv.mjs} +5 -5
- package/dist/{kv-Ipa7dnvF.mjs → kv-DbShBhhg.mjs} +6 -6
- package/dist/{lazy-command-DbKVgdGT.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
- package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
- package/dist/{live-C9L1bNuE.mjs → live-BTtMv1a6.mjs} +2 -2
- package/dist/load-balancers-C2hg52WA.mjs +84 -0
- package/dist/{local-DIJ7SIKC.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-DG5ebyab.mjs → login-DiR-buzS.mjs} +3 -3
- package/dist/{logpush-C5Gw7F_9.mjs → logpush-CitvUX-J.mjs} +22 -22
- package/dist/{logs-y3REfHbb.mjs → logs-CfWHu4Ir.mjs} +14 -16
- package/dist/{magic-network-monitoring-BZBGZB6M.mjs → magic-network-monitoring-gU6yzzML.mjs} +17 -17
- package/dist/{magic-transit-BPV_POf5.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
- package/dist/{managed-defense-BaUBSUcz.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
- package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
- package/dist/{mcp-RPtrISTy.mjs → mcp-DqhQJVaz.mjs} +15 -15
- package/dist/{mesh-DZ4QHBPE.mjs → mesh-DXVZBNDC.mjs} +12 -12
- package/dist/{migrate-CRIUqGi2.mjs → migrate-CmXyk9vX.mjs} +1 -1
- package/dist/{monetization-CVZqM8Xo.mjs → monetization-CWg-mySr.mjs} +9 -9
- package/dist/{network-interconnects-9nS5jL__.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
- package/dist/{network-DLt2JUo1.mjs → network-jtgq5eb4.mjs} +24 -24
- package/dist/o11y-eYYs59X9.mjs +88 -0
- package/dist/oauth-BgDZMd72.mjs +5 -0
- package/dist/{oauth-Cidoyxfp.mjs → oauth-V37G-PaV.mjs} +1 -1
- package/dist/{observability-C-KNh__y.mjs → observability-CB72eC4T.mjs} +2 -2
- package/dist/{ohttp-gateway-B5nCl4s3.mjs → ohttp-gateway-K9ToEft8.mjs} +4 -4
- package/dist/{organizations-DbeeWUL4.mjs → organizations-BllV7l_c.mjs} +18 -19
- 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-EHYtSKxX.mjs → pay-per-crawl-BgsdGcBi.mjs} +18 -18
- package/dist/{pay-per-use-wdEhl8k4.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
- package/dist/pipelines-CbtmLRxt.mjs +40 -0
- package/dist/{precursor-Dx8lN4UJ.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-DgMc7Z6A.mjs → queues-DGCYUr4g.mjs} +26 -26
- package/dist/{r2-BpTVicIq.mjs → r2-DtCk-Nfi.mjs} +51 -51
- package/dist/{radar-DW-S1VUh.mjs → radar-1CwqOsMZ.mjs} +150 -150
- package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
- package/dist/{ready-d0li0X6r.mjs → ready-CcoEA7M7.mjs} +2 -2
- package/dist/{realtime-DMKHLYF4.mjs → realtime-DFUxwIG5.mjs} +80 -81
- package/dist/registrar-Cl1snz8z.mjs +43 -0
- package/dist/{registrar-sandbox-lVLB1-mC.mjs → registrar-sandbox-Cne9BVCZ.mjs} +9 -9
- package/dist/{reporting-WX8P3Y0k.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-B2ZSt_cA.mjs → resource-sharing-D8yuzJm7.mjs} +18 -18
- package/dist/{rules-CB0QQTB3.mjs → rules-DzmOQ3MB.mjs} +8 -8
- package/dist/rulesets-DsTGcgbc.mjs +42 -0
- package/dist/{rum-BZ_24qZU.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-5NkOj7Y3.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
- package/dist/schema-flags-DO3kLYBu.mjs +4 -0
- package/dist/{scim-DchxaJfE.mjs → scim-0OufLKru.mjs} +8 -8
- package/dist/{secrets-store-oAft1cFE.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
- package/dist/{security-insights-DMm0qg_m.mjs → security-insights-D2pj8-O-.mjs} +20 -20
- package/dist/{security-txt-CIt0494b.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-gNangfwc.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-DLYIHelC.mjs → spectrum-CHBGZbZF.mjs} +11 -11
- package/dist/{speed-DugG9Tm9.mjs → speed-vOlHyG3v.mjs} +11 -11
- package/dist/sql-BCuLxGSf.mjs +4 -0
- package/dist/src-ByCoEqOw.mjs +133 -0
- package/dist/{ssl-Bg4X3WGk.mjs → ssl-BA_dcVwF.mjs} +60 -62
- package/dist/startup-profile-CyQk_f_L.mjs +2 -0
- package/dist/{startup-profile-DZL2DC44.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
- package/dist/state-B6r-b_-d.mjs +2 -0
- package/dist/{state-mr5ux1Nb.mjs → state-CTLznbVs.mjs} +1 -1
- package/dist/static-assets-DGDoaJf1.mjs +386 -0
- package/dist/stream-CzlqY8hq.mjs +89 -0
- package/dist/{tags-SKz2odE_.mjs → tags-BLeaslAb.mjs} +8 -8
- package/dist/telemetry-COlodX5Z.mjs +2 -0
- package/dist/{telemetry-B4zmCpT0.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BhkhBerL.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
- package/dist/{tenants-DD-GMq0K.mjs → tenants-CRirmhxS.mjs} +3 -3
- package/dist/{tools-KW_4hvzY.mjs → tools-BRjRgZnj.mjs} +1 -1
- package/dist/tunnels-nLfIWPYT.mjs +27 -0
- package/dist/{turnstile-DhSU_Xar.mjs → turnstile-CZjXtBCr.mjs} +10 -10
- package/dist/ui-dWsVmFCG.mjs +2 -0
- package/dist/{update-check-HltjTMDE.mjs → update-check-CXMdVBhW.mjs} +1 -1
- package/dist/{update-check-CRttabfu.mjs → update-check-D_Oky9-u.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-K7gkmPvG.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-BTBerJME.mjs → vectorize-CgOfmWYq.mjs} +15 -15
- package/dist/version-CcuBNjqg.mjs +2 -0
- package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
- package/dist/{web-assets-LHPQsrnY.mjs → web-assets-CWU3jrit.mjs} +29 -29
- package/dist/{web3-BsOio0Ae.mjs → web3-CRpQ5sl4.mjs} +13 -13
- package/dist/workers-BZMvamn0.mjs +39 -0
- package/dist/{workers-for-platforms-BGp6yr6P.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
- package/dist/{workers-vpc-D8lefWDo.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
- package/dist/{workflows-B-ZIG3y7.mjs → workflows-Dd88_Nqc.mjs} +24 -24
- package/dist/{wrangler-migration-6E6wT_LZ.mjs → wrangler-migration-BzMTJPdI.mjs} +294 -294
- package/dist/zaraz-BFK0p28R.mjs +22 -0
- package/dist/{zero-trust-BZDXM5r6.mjs → zero-trust-Cdjfp0Ie.mjs} +441 -455
- package/dist/{zones-B-UV_DGE.mjs → zones-DDn5jk6I.mjs} +51 -51
- package/package.json +19 -19
- package/dist/ai-gateway-Lj4On37s.mjs +0 -74
- package/dist/ai-search-BxyhS3X7.mjs +0 -74
- package/dist/alerting-r0G2X9y9.mjs +0 -52
- package/dist/analytics-C6bfqm-W.mjs +0 -17
- package/dist/auth-B-h0BHg7.mjs +0 -2
- package/dist/auth-B6tswVxH.mjs +0 -2
- package/dist/auth-clmqFEWU.mjs +0 -7
- package/dist/body-parser-DoewLePl.mjs +0 -2
- package/dist/brand-protection-kv1ba80i.mjs +0 -14
- package/dist/browser-run-D-vRoZmf.mjs +0 -40
- package/dist/build-BzJGqb2o.mjs +0 -2
- package/dist/builds-BbxINHRP.mjs +0 -64
- package/dist/cf-BQ_LRiut.mjs +0 -18
- package/dist/chunk-SOBRPAPT-QTjnHSNs.mjs +0 -363
- package/dist/cli-B7vslRfu.mjs +0 -4
- package/dist/cloudforce-one-DWBPQDA3.mjs +0 -318
- package/dist/command-AVwd7XjE.mjs +0 -2
- package/dist/command-B87T_f2f.mjs +0 -2
- package/dist/command-CEHhi3t0.mjs +0 -2
- package/dist/command-CYmQE79n.mjs +0 -2
- package/dist/command-Ce8CVLth.mjs +0 -2
- package/dist/command-CqDudQZs.mjs +0 -2
- package/dist/command-D4YcwpVp.mjs +0 -2
- package/dist/command-D9Qyi1B0.mjs +0 -2
- package/dist/command-Dl9ICrRK.mjs +0 -2
- package/dist/command-DtCSe8Hy.mjs +0 -2
- package/dist/command-DwzVtmb3.mjs +0 -2
- package/dist/command-wtBubtZ4.mjs +0 -2
- package/dist/containers-B06OGOEB.mjs +0 -380
- package/dist/csam-scanner-BV4bHq8v.mjs +0 -8
- package/dist/d1-nJCOJZb8.mjs +0 -50
- package/dist/deploy-DJMnWFNk.mjs +0 -2
- package/dist/deploy-context-YCW3eqP1.mjs +0 -56
- package/dist/deploy-input-CQLBXFEB.mjs +0 -2
- package/dist/dev-GsYHvMah.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/docs-CRc_WOXh.mjs +0 -3
- package/dist/email-auth-ptdqNSTZ.mjs +0 -6
- package/dist/email-domains-uL22-zRY.mjs +0 -14
- package/dist/email-routing-CV43rMJC.mjs +0 -44
- package/dist/errors-VG1mgwJl.mjs +0 -11
- package/dist/field-extractors-jcZ_bAGc.mjs +0 -8
- package/dist/generate-CeeWW3eX.mjs +0 -3
- package/dist/generate-D6V4Q58z.mjs +0 -2
- package/dist/gt-BQkaDQDq.mjs +0 -3
- package/dist/healthchecks-BA1fmzTm.mjs +0 -20
- package/dist/init-EVsjBrOz.mjs +0 -43
- package/dist/leaked-credential-checks-EzT4TTjO.mjs +0 -16
- package/dist/load-balancers-Cb3VkSfc.mjs +0 -84
- package/dist/local-D5Vq6ooZ.mjs +0 -2
- package/dist/local-runtime-BZjgkacr.mjs +0 -2
- package/dist/log-DZfik9Jk.mjs +0 -2
- package/dist/login-DRJugxya.mjs +0 -2
- package/dist/managed-transforms-CjkjLzMC.mjs +0 -8
- package/dist/o11y-ySxrnP1Z.mjs +0 -88
- package/dist/oauth-CFVUl-Wv.mjs +0 -4
- package/dist/output-BZQEl3mK.mjs +0 -2
- package/dist/package-B7RgwuFR.mjs +0 -2
- package/dist/page-rules-DRw763O1.mjs +0 -38
- package/dist/pages-DfQnxiTk.mjs +0 -48
- package/dist/pipelines-DbyrI6F4.mjs +0 -40
- package/dist/previews-DEVNSip2.mjs +0 -6
- package/dist/progress-yvPscjYg.mjs +0 -2
- package/dist/project-settings-nBMEx1f-.mjs +0 -3
- package/dist/prompt-CEpZ-lQZ.mjs +0 -4
- package/dist/raw-fetch-Cl5spWC3.mjs +0 -2
- package/dist/registrar-D23gfKBi.mjs +0 -43
- package/dist/request-headers-C0FpeBhz.mjs +0 -2
- package/dist/request-tracers-qd7XOAka.mjs +0 -4
- package/dist/rulesets-DmqwixUC.mjs +0 -42
- package/dist/run-BOKI1uWa.mjs +0 -2
- package/dist/run-DBqOjD1P.mjs +0 -2
- package/dist/schema-Dj9STsWI.mjs +0 -2
- package/dist/schema-flags-CXm9iIv6.mjs +0 -4
- package/dist/session-vzNfUhPl.mjs +0 -2
- package/dist/shared-MK-_lkbn.mjs +0 -2
- package/dist/smart-shield-Boy_qbqd.mjs +0 -22
- package/dist/snippets-DdoDYXW-.mjs +0 -18
- package/dist/spawn-B5F4OIHG.mjs +0 -5
- package/dist/sql-Bb56llsb.mjs +0 -4
- package/dist/src-BoSDeQ9m.mjs +0 -133
- package/dist/startup-profile-DQVkZZpb.mjs +0 -2
- package/dist/state-DW3QZtfh.mjs +0 -2
- package/dist/stream-BuZYDbNR.mjs +0 -89
- package/dist/telemetry-DkDUr4KK.mjs +0 -2
- package/dist/tunnels-D90ztENM.mjs +0 -27
- package/dist/ui-xjCox-gU.mjs +0 -2
- package/dist/url-scanner-BRdWwka4.mjs +0 -16
- package/dist/user-Cmb1_Wu5.mjs +0 -103
- package/dist/version-6Bpy6Bgt.mjs +0 -2
- package/dist/waiting-rooms-LymmKIGr.mjs +0 -52
- package/dist/workers-BnLiOjZf.mjs +0 -39
- package/dist/workers-builds-sKpITeRk.mjs +0 -14
- package/dist/zaraz-BBKki5WS.mjs +0 -22
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,i as o,t as s}from"./context-BGm5_wTT.mjs";import{t as c}from"./dry-run-qsnRlRk6.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{t as u}from"./local-B3zt9PXR.mjs";import{t as d}from"./run-CXWkMU3x.mjs";import{t as f}from"./output-hFMAotFl.mjs";import{t as p}from"./progress-DE_G09u2.mjs";import{a as m,i as h,n as g}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";var _={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules`,body:`json`};function v(e){return e.usage(`$0 firewall access-rules create
|
|
3
3
|
|
|
4
4
|
Creates a new IP Access rule for an account or zone. The rule will apply to all zones in the account or zone. Note: To create an IP Access rule that applies to a single zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.
|
|
5
5
|
|
|
6
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).coerce(`configuration-target`,e=>
|
|
6
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).coerce(`configuration-target`,e=>l(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).coerce(`access-rule-mode`,e=>l(e,`access-rule-mode`,`text`)).option(`notes`,{type:`string`,description:`An informative summary of the rule, typically used as a reminder or explanation.`,default:``}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`create`,describe:`Create an IP Access rule`,builder:v,handler:async e=>d({command:`firewall access-rules create`,classification:{safeFlags:[`configuration-target`,`access-rule-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await a():void 0,n=e.zone===void 0?`accounts`:`zones`,o=e.zone??t??`<account-id>`;c({command:`cf firewall access-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${o}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(o)},bodyKind:`json`,body:e.body===void 0?i({configuration:{target:e[`configuration-target`],value:l(e[`configuration-value`],`configuration-value`,`text`)},mode:e[`access-rule-mode`],notes:l(e.notes,`notes`,`text`)}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),d=await t(e),m=e.zone===void 0?`accounts`:`zones`,g=m===`zones`?await o({zone:e.zone},d,{quiet:e.quiet}):e.local?u:await s();if(m===`zones`?e.zoneId=g:e.accountId=g,e.body!==void 0){let e=n,t=await p(`Creating`,async()=>d.send(_,{body:e,account_or_zone:m,account_or_zone_id:g}));f(t,{successLabel:`Created`});return}e[`access-rule-mode`]===void 0&&(e[`access-rule-mode`]=await h(`access-rule-mode`,`The action to apply to a matched request.`,[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]));let v=i({configuration:{target:e[`configuration-target`],value:l(e[`configuration-value`],`configuration-value`,`text`)},mode:e[`access-rule-mode`],notes:l(e.notes,`notes`,`text`)}),y=await p(`Creating`,async()=>d.send(_,{body:v,account_or_zone:m,account_or_zone_id:g}));f(y,{successLabel:`Created`})})};var ee={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules/${t.rule_id}`};function b(e){return e.usage(`$0 firewall access-rules delete <rule-id>
|
|
7
7
|
|
|
8
8
|
Deletes an existing IP Access rule defined. Note: This operation will affect all zones in the account or zone.
|
|
9
9
|
|
|
10
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const x={command:`delete <rule-id>`,describe:`Delete an IP Access rule`,builder:b,handler:async e=>
|
|
10
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const x={command:`delete <rule-id>`,describe:`Delete an IP Access rule`,builder:b,handler:async e=>d({command:`firewall access-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await a():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf firewall access-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/firewall/access_rules/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.zone===void 0?`accounts`:`zones`,i=r===`zones`?await o({zone:e.zone},n,{quiet:e.quiet}):e.local?u:await s();if(r===`zones`?e.zoneId=i:e.accountId=i,!await g({force:!!e.force,message:`This operation deletes the account-level IP Access Rule and affects every zone in the account.`}))return;let l=await p(`Deleting`,async()=>n.send(ee,{account_or_zone:r,account_or_zone_id:i,rule_id:e[`rule-id`]}));f(l,{successLabel:`Deleted`})})};var S={method:`PATCH`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules/${t.rule_id}`,body:`json`};function te(e){return e.usage(`$0 firewall access-rules edit <rule-id>
|
|
11
11
|
|
|
12
12
|
Updates an IP Access rule defined. Note: This operation will affect all zones in the account or zone.
|
|
13
13
|
|
|
14
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).coerce(`configuration-target`,e=>
|
|
14
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).coerce(`configuration-target`,e=>l(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).coerce(`access-rule-mode`,e=>l(e,`access-rule-mode`,`text`)).option(`notes`,{type:`string`,description:`An informative summary of the rule, typically used as a reminder or explanation.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ne={command:`edit <rule-id>`,describe:`Update an IP Access rule`,builder:te,handler:async e=>d({command:`firewall access-rules edit`,classification:{safeFlags:[`configuration-target`,`access-rule-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await a():void 0,n=e.zone===void 0?`accounts`:`zones`,o=e.zone??t??`<account-id>`;c({command:`cf firewall access-rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${n}/${o}/firewall/access_rules/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(o),"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?i({configuration:{target:e[`configuration-target`],value:l(e[`configuration-value`],`configuration-value`,`text`)},mode:e[`access-rule-mode`],notes:l(e.notes,`notes`,`text`)}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),d=await t(e),m=e.zone===void 0?`accounts`:`zones`,g=m===`zones`?await o({zone:e.zone},d,{quiet:e.quiet}):e.local?u:await s();if(m===`zones`?e.zoneId=g:e.accountId=g,e.body!==void 0){let t=n,r=await p(`Updating`,async()=>d.send(S,{body:t,account_or_zone:m,account_or_zone_id:g,rule_id:e[`rule-id`]}));f(r,{successLabel:`Updated`});return}e[`access-rule-mode`]===void 0&&(e[`access-rule-mode`]=await h(`access-rule-mode`,`The action to apply to a matched request.`,[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]));let _=i({configuration:{target:e[`configuration-target`],value:l(e[`configuration-value`],`configuration-value`,`text`)},mode:e[`access-rule-mode`],notes:l(e.notes,`notes`,`text`)}),v=await p(`Updating`,async()=>d.send(S,{body:_,account_or_zone:m,account_or_zone_id:g,rule_id:e[`rule-id`]}));f(v,{successLabel:`Updated`})})};var re={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules/${t.rule_id}`};function C(e){return e.usage(`$0 firewall access-rules get <rule-id>
|
|
15
15
|
|
|
16
16
|
Fetches the details of an IP Access rule defined.
|
|
17
17
|
|
|
18
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <rule-id>`,describe:`Get an IP Access rule`,builder:C,handler:async e=>
|
|
18
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <rule-id>`,describe:`Get an IP Access rule`,builder:C,handler:async e=>d({command:`firewall access-rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await a():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf firewall access-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/firewall/access_rules/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.zone===void 0?`accounts`:`zones`,i=r===`zones`?await o({zone:e.zone},n,{quiet:e.quiet}):e.local?u:await s();r===`zones`?e.zoneId=i:e.accountId=i;let l=await p(`Loading`,async()=>n.send(re,{account_or_zone:r,account_or_zone_id:i,rule_id:e[`rule-id`]}));f(l,{successLabel:`Loaded`})})};var T={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules`,query:[`mode`,`configuration.target`,`configuration.value`,`notes`,`match`,`page`,`per_page`,`order`,`direction`]};function E(e){return e.usage(`$0 firewall access-rules list
|
|
19
19
|
|
|
20
20
|
Fetches IP Access rules of an account or zone. These rules apply to all the zones in the account or zone. You can filter the results using several optional parameters.
|
|
21
21
|
|
|
22
22
|
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).option(`configuration-target`,{type:`string`,description:`Defines the target to search in existing rules.`,choices:[`ip`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:"Defines the target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`.\nNotes: You can search for a single IPv4 address, an IP address range with a subnet of '/16' or '/24', or a two-letter ISO-3166-1 alpha-2 country code."}).option(`notes`,{type:`string`,description:`Defines the string to search for in the notes of existing IP Access rules.
|
|
23
|
-
Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive.`}).option(`match`,{type:`string`,description:"Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Defines the requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Defines the maximum number of results requested.`}).option(`order`,{type:`string`,description:`Defines the field used to sort returned rules.`,choices:[`configuration.target`,`configuration.value`,`mode`]}).option(`direction`,{type:`string`,description:`Defines the direction used to sort returned rules.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List IP Access rules`,builder:E,handler:async e=>
|
|
23
|
+
Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive.`}).option(`match`,{type:`string`,description:"Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Defines the requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Defines the maximum number of results requested.`}).option(`order`,{type:`string`,description:`Defines the field used to sort returned rules.`,choices:[`configuration.target`,`configuration.value`,`mode`]}).option(`direction`,{type:`string`,description:`Defines the direction used to sort returned rules.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List IP Access rules`,builder:E,handler:async e=>d({command:`firewall access-rules list`,classification:{safeFlags:[`access-rule-mode`,`configuration-target`,`match`,`order`,`direction`,`dry-run`]}},e,async()=>{let n={mode:e[`access-rule-mode`],"configuration.target":e[`configuration-target`],"configuration.value":e[`configuration-value`],notes:e.notes,match:e.match,page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let t=e.zone===void 0?await a():void 0,r=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;c({command:`cf firewall access-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${r}/${i}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(r),"account-or-zone-id":String(i)},query:n,bodyKind:`none`});return}let r=await t(e),i=e.zone===void 0?`accounts`:`zones`,l=i===`zones`?await o({zone:e.zone},r,{quiet:e.quiet}):e.local?u:await s();i===`zones`?e.zoneId=l:e.accountId=l;let d=await p(`Loading`,async()=>r.send(T,{account_or_zone:i,account_or_zone_id:l,...n}));f(d,{successLabel:`Loaded`})})},O={command:`access-rules`,describe:`IP-based access rules that allow, block, challenge, or whitelist traffic globally or per-zone`,builder:e=>e.command(y).command(x).command(ne).command(w).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var k={method:`POST`,path:t=>e`/zones/${t.zone_id}/firewall/lockdowns`,body:`json`};function A(e){return e.usage(`$0 firewall lockdowns create
|
|
24
24
|
|
|
25
|
-
Creates a new Zone Lockdown rule.`).option(`configurations`,{type:`string`,description:
|
|
25
|
+
Creates a new Zone Lockdown rule.`).option(`configurations`,{type:`string`,description:'A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"target"?: "ip", "value"?: string} | {"target"?: "ip_range", "value"?: string})]. ? marks optional keys.'}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`priority`,{type:`number`,description:`The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.`}).option(`urls`,{type:`string`,array:!0,description:`The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const j={command:`create`,describe:`Create a Zone Lockdown rule`,builder:A,handler:async e=>d({command:`firewall lockdowns create`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf firewall lockdowns create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?i({configurations:n(e.configurations,`configurations`),description:l(e.description,`description`,`text`),paused:e.paused,priority:e.priority,urls:e.urls}):r(e.body)});return}let a=e.body===void 0?void 0:r(e.body),s=await t(e),u=await o({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let e=a,t=await p(`Creating`,async()=>s.send(k,{body:e,zone_id:u}));f(t,{successLabel:`Created`});return}if(e.configurations===void 0)throw Error(`--configurations is required (or pass --body with this field set).`);if(e.urls===void 0)throw Error(`--urls is required (or pass --body with this field set).`);let d=i({configurations:n(e.configurations,`configurations`),description:l(e.description,`description`,`text`),paused:e.paused,priority:e.priority,urls:e.urls}),m=await p(`Creating`,async()=>s.send(k,{body:d,zone_id:u}));f(m,{successLabel:`Created`})})};var M={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/firewall/lockdowns/${t.lock_downs_id}`};function N(e){return e.usage(`$0 firewall lockdowns delete <lock-downs-id>
|
|
26
26
|
|
|
27
|
-
Deletes an existing Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const P={command:`delete <lock-downs-id>`,describe:`Delete a Zone Lockdown rule`,builder:N,handler:async e=>
|
|
27
|
+
Deletes an existing Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const P={command:`delete <lock-downs-id>`,describe:`Delete a Zone Lockdown rule`,builder:N,handler:async e=>d({command:`firewall lockdowns delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){c({command:`cf firewall lockdowns delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns/${e[`lock-downs-id`]==null?`<lock-downs-id>`:encodeURIComponent(String(e[`lock-downs-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"lock-downs-id":String(e[`lock-downs-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=await o({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,!await g({force:!!e.force,message:`This operation deletes the Zone Lockdown rule from the zone.`}))return;let i=await p(`Deleting`,async()=>n.send(M,{zone_id:r,lock_downs_id:e[`lock-downs-id`]}));f(i,{successLabel:`Deleted`})})};var F={method:`GET`,path:t=>e`/zones/${t.zone_id}/firewall/lockdowns/${t.lock_downs_id}`};function I(e){return e.usage(`$0 firewall lockdowns get <lock-downs-id>
|
|
28
28
|
|
|
29
|
-
Fetches the details of a Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <lock-downs-id>`,describe:`Get a Zone Lockdown rule`,builder:I,handler:async e=>
|
|
29
|
+
Fetches the details of a Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <lock-downs-id>`,describe:`Get a Zone Lockdown rule`,builder:I,handler:async e=>d({command:`firewall lockdowns get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf firewall lockdowns get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns/${e[`lock-downs-id`]==null?`<lock-downs-id>`:encodeURIComponent(String(e[`lock-downs-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"lock-downs-id":String(e[`lock-downs-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=await o({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r;let i=await p(`Loading`,async()=>n.send(F,{zone_id:r,lock_downs_id:e[`lock-downs-id`]}));f(i,{successLabel:`Loaded`})})};var R={method:`GET`,path:t=>e`/zones/${t.zone_id}/firewall/lockdowns`,query:[`page`,`description`,`modified_on`,`ip`,`priority`,`uri_search`,`ip_range_search`,`per_page`,`created_on`,`description_search`,`ip_search`]};function z(e){return e.usage(`$0 firewall lockdowns list
|
|
30
30
|
|
|
31
|
-
Fetches Zone Lockdown rules. You can filter the results using several optional parameters.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`description`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`modified-on`,{type:`string`,description:`The timestamp of when the rule was last modified.`}).option(`ip`,{type:`string`,description:`A single IP address to search for in existing rules.`}).option(`priority`,{type:`number`,description:`The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.`}).option(`uri-search`,{type:`string`,description:`A single URI to search for in the list of URLs of existing rules.`}).option(`ip-range-search`,{type:`string`,description:`A single IP address range to search for in existing rules.`}).option(`per-page`,{type:`number`,description:"The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`."}).option(`created-on`,{type:`string`,description:`The timestamp of when the rule was created.`}).option(`description-search`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`ip-search`,{type:`string`,description:`A single IP address to search for in existing rules.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`list`,describe:`List Zone Lockdown rules`,builder:z,handler:async e=>
|
|
31
|
+
Fetches Zone Lockdown rules. You can filter the results using several optional parameters.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`description`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`modified-on`,{type:`string`,description:`The timestamp of when the rule was last modified.`}).option(`ip`,{type:`string`,description:`A single IP address to search for in existing rules.`}).option(`priority`,{type:`number`,description:`The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.`}).option(`uri-search`,{type:`string`,description:`A single URI to search for in the list of URLs of existing rules.`}).option(`ip-range-search`,{type:`string`,description:`A single IP address range to search for in existing rules.`}).option(`per-page`,{type:`number`,description:"The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`."}).option(`created-on`,{type:`string`,description:`The timestamp of when the rule was created.`}).option(`description-search`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`ip-search`,{type:`string`,description:`A single IP address to search for in existing rules.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`list`,describe:`List Zone Lockdown rules`,builder:z,handler:async e=>d({command:`firewall lockdowns list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,description:e.description,modified_on:e[`modified-on`],ip:e.ip,priority:e.priority,uri_search:e[`uri-search`],ip_range_search:e[`ip-range-search`],per_page:e[`per-page`],created_on:e[`created-on`],description_search:e[`description-search`],ip_search:e[`ip-search`]};if(e.dryRun){c({command:`cf firewall lockdowns list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let r=await t(e),i=await o({zone:e.zone},r,{quiet:e.quiet});e.zoneId=i;let a=await p(`Loading`,async()=>r.send(R,{zone_id:i,...n}));f(a,{successLabel:`Loaded`})})};var V={method:`PUT`,path:t=>e`/zones/${t.zone_id}/firewall/lockdowns/${t.lock_downs_id}`,body:`json`};function H(e){return e.usage(`$0 firewall lockdowns update <lock-downs-id>
|
|
32
32
|
|
|
33
|
-
Updates an existing Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,demandOption:!0}).option(`configurations`,{type:`string`,description:
|
|
33
|
+
Updates an existing Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,demandOption:!0}).option(`configurations`,{type:`string`,description:'A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"target"?: "ip", "value"?: string} | {"target"?: "ip_range", "value"?: string})]. ? marks optional keys.'}).option(`urls`,{type:`string`,array:!0,description:`The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const U={command:`update <lock-downs-id>`,describe:`Update a Zone Lockdown rule`,builder:H,handler:async e=>d({command:`firewall lockdowns update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf firewall lockdowns update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns/${e[`lock-downs-id`]==null?`<lock-downs-id>`:encodeURIComponent(String(e[`lock-downs-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"lock-downs-id":String(e[`lock-downs-id`]??``)},bodyKind:`json`,body:e.body===void 0?i({configurations:n(e.configurations,`configurations`),urls:e.urls}):r(e.body)});return}let a=e.body===void 0?void 0:r(e.body),s=await t(e),l=await o({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,e.body!==void 0){let t=a,n=await p(`Updating`,async()=>s.send(V,{body:t,zone_id:l,lock_downs_id:e[`lock-downs-id`]}));f(n,{successLabel:`Updated`});return}if(e.configurations===void 0)throw Error(`--configurations is required (or pass --body with this field set).`);if(e.urls===void 0)throw Error(`--urls is required (or pass --body with this field set).`);let u=i({configurations:n(e.configurations,`configurations`),urls:e.urls}),d=await p(`Updating`,async()=>s.send(V,{body:u,zone_id:l,lock_downs_id:e[`lock-downs-id`]}));f(d,{successLabel:`Updated`})})},W={command:`lockdowns`,describe:`Zone lockdown rules that restrict access to URLs by IP address or range`,builder:e=>e.command(j).command(P).command(L).command(B).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var G={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/payload_logging/key`};function K(e){return e.usage(`$0 firewall payload-logging delete
|
|
34
34
|
|
|
35
35
|
Deletes the payload logging public key of the account or zone.
|
|
36
36
|
|
|
37
|
-
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}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ie={command:`delete`,describe:`Delete the payload logging key`,builder:K,handler:async e=>
|
|
37
|
+
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}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ie={command:`delete`,describe:`Delete the payload logging key`,builder:K,handler:async e=>d({command:`firewall payload-logging delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await a():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf firewall payload-logging delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/firewall/payload_logging/key`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let n=await t(e),r=e.zone===void 0?`accounts`:`zones`,i=r===`zones`?await o({zone:e.zone},n,{quiet:e.quiet}):e.local?u:await s();if(r===`zones`?e.zoneId=i:e.accountId=i,!await g({force:!!e.force}))return;let l=await p(`Deleting`,async()=>n.send(G,{account_or_zone:r,account_or_zone_id:i}));f(l,{successLabel:`Deleted`})})};var q={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/payload_logging/key`};function J(e){return e.usage(`$0 firewall payload-logging get
|
|
38
38
|
|
|
39
39
|
Fetches the public key that payload logging uses to encrypt matched payloads for the account or zone.
|
|
40
40
|
|
|
41
|
-
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 Y={command:`get`,describe:`Get the payload logging key`,builder:J,handler:async e=>
|
|
41
|
+
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 Y={command:`get`,describe:`Get the payload logging key`,builder:J,handler:async e=>d({command:`firewall payload-logging get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await a():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf firewall payload-logging get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/firewall/payload_logging/key`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let n=await t(e),r=e.zone===void 0?`accounts`:`zones`,i=r===`zones`?await o({zone:e.zone},n,{quiet:e.quiet}):e.local?u:await s();r===`zones`?e.zoneId=i:e.accountId=i;let l=await p(`Loading`,async()=>n.send(q,{account_or_zone:r,account_or_zone_id:i}));f(l,{successLabel:`Loaded`})})};var X={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/payload_logging/key`,body:`json`};function ae(e){return e.usage(`$0 firewall payload-logging update
|
|
42
42
|
|
|
43
43
|
Creates or replaces the public key that payload logging uses to encrypt matched payloads for the account or zone. It applies to every zone in the account or zone that has no zone key. Requires a plan that includes payload logging (Enterprise); otherwise it returns 403.
|
|
44
44
|
|
|
45
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`public-key`,{type:`string`,description:`Defines the X25519 public key, as standard base64 of exactly 32 bytes, that encrypts matched payloads. Cloudflare stores only the public key; keep the private key to decrypt logged payloads.`}).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 oe={command:`update`,describe:`Set the payload logging key`,builder:ae,handler:async e=>
|
|
45
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`public-key`,{type:`string`,description:`Defines the X25519 public key, as standard base64 of exactly 32 bytes, that encrypts matched payloads. Cloudflare stores only the public key; keep the private key to decrypt logged payloads.`}).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 oe={command:`update`,describe:`Set the payload logging key`,builder:ae,handler:async e=>d({command:`firewall payload-logging update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await a():void 0,n=e.zone===void 0?`accounts`:`zones`,o=e.zone??t??`<account-id>`;c({command:`cf firewall payload-logging update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${o}/firewall/payload_logging/key`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(o)},bodyKind:`json`,body:e.body===void 0?i({public_key:l(e[`public-key`],`public-key`,`text`)}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),d=await t(e),h=e.zone===void 0?`accounts`:`zones`,g=h===`zones`?await o({zone:e.zone},d,{quiet:e.quiet}):e.local?u:await s();if(h===`zones`?e.zoneId=g:e.accountId=g,e.body!==void 0){let e=n,t=await p(`Updating`,async()=>d.send(X,{body:e,account_or_zone:h,account_or_zone_id:g}));f(t,{successLabel:`Updated`});return}e[`public-key`]===void 0&&(e[`public-key`]=await m(`public-key`,`Defines the X25519 public key, as standard base64 of exactly 32 bytes, that encrypts matched payloads. Cloudflare stores only the public key; keep the private key to decrypt logged payloads.`));let _=i({public_key:l(e[`public-key`],`public-key`,`text`)}),v=await p(`Updating`,async()=>d.send(X,{body:_,account_or_zone:h,account_or_zone_id:g}));f(v,{successLabel:`Updated`})})},se={command:`payload-logging`,describe:`Account-level public key that WAF payload logging uses to encrypt matched payloads`,builder:e=>e.command(ie).command(Y).command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/zones/${t.zone_id}/firewall/ua_rules`,body:`json`};function ce(e){return e.usage(`$0 firewall ua-rules create
|
|
46
46
|
|
|
47
|
-
Creates a new User Agent Blocking rule in a zone.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ua` when specifying a user agent in the rule.",choices:[`ua`]}).coerce(`configuration-target`,e=>
|
|
47
|
+
Creates a new User Agent Blocking rule in a zone.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ua` when specifying a user agent in the rule.",choices:[`ua`]}).coerce(`configuration-target`,e=>l(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`the user agent to exactly match`}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).coerce(`access-rule-mode`,e=>l(e,`access-rule-mode`,`text`)).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const le={command:`create`,describe:`Create a User Agent Blocking rule`,builder:ce,handler:async e=>d({command:`firewall ua-rules create`,classification:{safeFlags:[`configuration-target`,`access-rule-mode`,`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf firewall ua-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?i({configuration:{target:e[`configuration-target`],value:l(e[`configuration-value`],`configuration-value`,`text`)},description:l(e.description,`description`,`text`),mode:e[`access-rule-mode`],paused:e.paused}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),a=await t(e),s=await o({zone:e.zone},a,{quiet:e.quiet});if(e.zoneId=s,e.body!==void 0){let e=n,t=await p(`Creating`,async()=>a.send(Z,{body:e,zone_id:s}));f(t,{successLabel:`Created`});return}e[`access-rule-mode`]===void 0&&(e[`access-rule-mode`]=await h(`access-rule-mode`,`The action to apply to a matched request.`,[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]));let u=i({configuration:{target:e[`configuration-target`],value:l(e[`configuration-value`],`configuration-value`,`text`)},description:l(e.description,`description`,`text`),mode:e[`access-rule-mode`],paused:e.paused}),d=await p(`Creating`,async()=>a.send(Z,{body:u,zone_id:s}));f(d,{successLabel:`Created`})})};var ue={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/firewall/ua_rules/${t.ua_rule_id}`};function de(e){return e.usage(`$0 firewall ua-rules delete <ua-rule-id>
|
|
48
48
|
|
|
49
|
-
Deletes an existing User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const fe={command:`delete <ua-rule-id>`,describe:`Delete a User Agent Blocking rule`,builder:de,handler:async e=>
|
|
49
|
+
Deletes an existing User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const fe={command:`delete <ua-rule-id>`,describe:`Delete a User Agent Blocking rule`,builder:de,handler:async e=>d({command:`firewall ua-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){c({command:`cf firewall ua-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"ua-rule-id":String(e[`ua-rule-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=await o({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,!await g({force:!!e.force,message:`This operation deletes the User Agent Blocking rule from the zone.`}))return;let i=await p(`Deleting`,async()=>n.send(ue,{zone_id:r,ua_rule_id:e[`ua-rule-id`]}));f(i,{successLabel:`Deleted`})})};var pe={method:`GET`,path:t=>e`/zones/${t.zone_id}/firewall/ua_rules/${t.ua_rule_id}`};function me(e){return e.usage(`$0 firewall ua-rules get <ua-rule-id>
|
|
50
50
|
|
|
51
|
-
Fetches the details of a User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`get <ua-rule-id>`,describe:`Get a User Agent Blocking rule`,builder:me,handler:async e=>
|
|
51
|
+
Fetches the details of a User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`get <ua-rule-id>`,describe:`Get a User Agent Blocking rule`,builder:me,handler:async e=>d({command:`firewall ua-rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf firewall ua-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"ua-rule-id":String(e[`ua-rule-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=await o({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r;let i=await p(`Loading`,async()=>n.send(pe,{zone_id:r,ua_rule_id:e[`ua-rule-id`]}));f(i,{successLabel:`Loaded`})})};var he={method:`GET`,path:t=>e`/zones/${t.zone_id}/firewall/ua_rules`,query:[`page`,`description`,`per_page`,`user_agent`,`paused`]};function ge(e){return e.usage(`$0 firewall ua-rules list
|
|
52
52
|
|
|
53
|
-
Fetches User Agent Blocking rules in a zone. You can filter the results using several optional parameters.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`description`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`per-page`,{type:`number`,description:"The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`."}).option(`user-agent`,{type:`string`,description:`A string to search for in the user agent values of existing rules.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`list`,describe:`List User Agent Blocking rules`,builder:ge,handler:async e=>
|
|
53
|
+
Fetches User Agent Blocking rules in a zone. You can filter the results using several optional parameters.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`description`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`per-page`,{type:`number`,description:"The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`."}).option(`user-agent`,{type:`string`,description:`A string to search for in the user agent values of existing rules.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`list`,describe:`List User Agent Blocking rules`,builder:ge,handler:async e=>d({command:`firewall ua-rules list`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{let n={page:e.page,description:e.description,per_page:e[`per-page`],user_agent:e[`user-agent`],paused:e.paused};if(e.dryRun){c({command:`cf firewall ua-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let r=await t(e),i=await o({zone:e.zone},r,{quiet:e.quiet});e.zoneId=i;let a=await p(`Loading`,async()=>r.send(he,{zone_id:i,...n}));f(a,{successLabel:`Loaded`})})};var $={method:`PUT`,path:t=>e`/zones/${t.zone_id}/firewall/ua_rules/${t.ua_rule_id}`,body:`json`};function ve(e){return e.usage(`$0 firewall ua-rules update <ua-rule-id>
|
|
54
54
|
|
|
55
|
-
Updates an existing User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).coerce(`configuration-target`,e=>
|
|
55
|
+
Updates an existing User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).coerce(`configuration-target`,e=>l(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).coerce(`access-rule-mode`,e=>l(e,`access-rule-mode`,`text`)).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ye={command:`update <ua-rule-id>`,describe:`Update a User Agent Blocking rule`,builder:ve,handler:async e=>d({command:`firewall ua-rules update`,classification:{safeFlags:[`configuration-target`,`access-rule-mode`,`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf firewall ua-rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"ua-rule-id":String(e[`ua-rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?i({configuration:{target:e[`configuration-target`],value:l(e[`configuration-value`],`configuration-value`,`text`)},description:l(e.description,`description`,`text`),mode:e[`access-rule-mode`],paused:e.paused}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),a=await t(e),s=await o({zone:e.zone},a,{quiet:e.quiet});if(e.zoneId=s,e.body!==void 0){let t=n,r=await p(`Updating`,async()=>a.send($,{body:t,zone_id:s,ua_rule_id:e[`ua-rule-id`]}));f(r,{successLabel:`Updated`});return}e[`access-rule-mode`]===void 0&&(e[`access-rule-mode`]=await h(`access-rule-mode`,`The action to apply to a matched request.`,[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]));let u=i({configuration:{target:e[`configuration-target`],value:l(e[`configuration-value`],`configuration-value`,`text`)},description:l(e.description,`description`,`text`),mode:e[`access-rule-mode`],paused:e.paused}),d=await p(`Updating`,async()=>a.send($,{body:u,zone_id:s,ua_rule_id:e[`ua-rule-id`]}));f(d,{successLabel:`Updated`})})},be={command:`ua-rules`,describe:`Block or challenge requests based on the User-Agent header string`,builder:e=>e.command(le).command(fe).command(Q).command(_e).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`firewall`,describe:`Legacy firewall rules, zone lockdowns, access rules, user-agent blocking, and WAF packages`,builder:e=>e.command(O).command(W).command(se).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{xe as default};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-DA1PHaHi.mjs";import{i as r,o as i,r as a,t as o}from"./body-parser-HN91kAf0.mjs";import{a as s,t as c}from"./context-BGm5_wTT.mjs";import{t as l}from"./dry-run-qsnRlRk6.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{t as d}from"./local-B3zt9PXR.mjs";import{t as f}from"./run-CXWkMU3x.mjs";import{t as p}from"./output-hFMAotFl.mjs";import{t as m}from"./progress-DE_G09u2.mjs";import{a as h,n as g}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 flagship apps create
|
|
3
3
|
|
|
4
|
-
Creates an app. The returned \`id\` is used in all subsequent flag, changelog, and evaluation requests.`).option(`name`,{type:`string`,description:`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`create`,describe:`Create app`,builder:v,handler:async e=>
|
|
4
|
+
Creates an app. The returned \`id\` is used in all subsequent flag, changelog, and evaluation requests.`).option(`name`,{type:`string`,description:`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`create`,describe:`Create app`,builder:v,handler:async e=>f({command:`flagship apps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({command:`cf flagship apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?o({name:u(e.name,`name`,`text`)}):a(e.body)});return}let t=e.body===void 0?void 0:a(e.body),r=await n(e),i=e.local?d:await c();if(e.accountId=i,e.body!==void 0){let e=t,n=await m(`Creating`,async()=>r.send(_,{body:e,account_id:i}));p(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`));let f=o({name:u(e.name,`name`,`text`)}),g=await m(`Creating`,async()=>r.send(_,{body:f,account_id:i}));p(g,{successLabel:`Created`})})};function b(e){return e.usage("$0 flagship apps definitions get <app-id>\n\nReturns an app's evaluation-only flag definitions for SDKs that evaluate locally. Send the returned `ETag` in `If-None-Match` to avoid downloading unchanged definitions.").positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`if-none-match`,{type:`string`,description:"Previously returned ETag, or `*`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <app-id>`,describe:`Get flag definitions`,builder:b,handler:async e=>f({command:`flagship apps definitions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let r={};if(e[`if-none-match`]!==void 0&&(r[`If-None-Match`]=String(e[`if-none-match`])),e.dryRun){let t=await s();l({command:`cf flagship apps definitions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/definitions`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let i=await n(e),a=e.local?d:await c();e.accountId=a;let o=await m(`Loading`,async()=>t(i,`GET`,`/accounts/${a}/flagship/apps/${encodeURIComponent(String(e[`app-id`]))}/definitions`,{headers:Object.keys(r).length>0?r:void 0}));p(o,{successLabel:`Loaded`})})},S={command:`definitions`,describe:`Operations for apps.definitions`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ee={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function te(e){return e.usage(`$0 flagship apps delete <app-id>
|
|
5
5
|
|
|
6
|
-
Deletes an app and all its flags and changelog history. Returns 409 if any Worker still references this app via a Flagship binding.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <app-id>`,describe:`Delete app`,builder:te,handler:async e=>
|
|
6
|
+
Deletes an app and all its flags and changelog history. Returns 409 if any Worker still references this app via a Flagship binding.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <app-id>`,describe:`Delete app`,builder:te,handler:async e=>f({command:`flagship apps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await s();l({command:`cf flagship apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=e.local?d:await c();if(e.accountId=r,!await g({force:!!e.force,message:`Delete this Flagship app, all of its flags, and all changelog history? This action cannot be undone.`}))return;let i=await m(`Deleting`,async()=>t.send(ee,{account_id:r,app_id:e[`app-id`]}));p(i,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/evaluate`,query:[`flagKey`,`targetingKey`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function T(e){return e.usage(`$0 flagship apps evaluate get <app-id>
|
|
7
7
|
|
|
8
|
-
Evaluates a flag against the provided context. Pass context attributes as query parameters; values are coerced to numbers or booleans where unambiguous. For low-latency in-Worker evaluation, prefer the Flagship binding over this endpoint.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`flag-key`,{type:`string`,description:`The flag key to evaluate.`,demandOption:!0}).option(`targeting-key`,{type:`string`,description:`Context targeting key (per OpenFeature spec); used for percentage rollout bucketing.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <app-id>`,describe:`Evaluate flag from query context`,builder:T,handler:async e=>
|
|
8
|
+
Evaluates a flag against the provided context. Pass context attributes as query parameters; values are coerced to numbers or booleans where unambiguous. For low-latency in-Worker evaluation, prefer the Flagship binding over this endpoint.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`flag-key`,{type:`string`,description:`The flag key to evaluate.`,demandOption:!0}).option(`targeting-key`,{type:`string`,description:`Context targeting key (per OpenFeature spec); used for percentage rollout bucketing.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <app-id>`,describe:`Evaluate flag from query context`,builder:T,handler:async e=>f({command:`flagship apps evaluate get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={flagKey:e[`flag-key`],targetingKey:e[`targeting-key`]};if(e.dryRun){let n=await s();l({command:`cf flagship apps evaluate get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/evaluate`,pathParams:{"app-id":String(e[`app-id`]??``)},query:t,bodyKind:`none`});return}let r=await n(e),i=e.local?d:await c();e.accountId=i;let a=await m(`Loading`,async()=>r.send(w,{account_id:i,app_id:e[`app-id`],...t}));p(a,{successLabel:`Loaded`})})},D={command:`evaluate`,describe:`Operations for apps.evaluate`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var O={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}/changelog`,query:[`limit`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function k(e){return e.usage(`$0 flagship apps flags changelog list
|
|
9
9
|
|
|
10
|
-
Returns the audit history for a flag, newest first. Each entry includes the event type and full flag state after the change; \`update\` entries include a field-level diff. Capped at 200 entries per flag.`).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Max items to return (1–200).`}).option(`cursor`,{type:`string`,description:`Pagination cursor from a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List flag changelog entries`,builder:k,handler:async e=>
|
|
10
|
+
Returns the audit history for a flag, newest first. Each entry includes the event type and full flag state after the change; \`update\` entries include a field-level diff. Capped at 200 entries per flag.`).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Max items to return (1–200).`}).option(`cursor`,{type:`string`,description:`Pagination cursor from a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List flag changelog entries`,builder:k,handler:async e=>f({command:`flagship apps flags changelog list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={limit:e.limit,cursor:e.cursor};if(e.dryRun){let n=await s();l({command:`cf flagship apps flags changelog list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}/changelog`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},query:t,bodyKind:`none`});return}let r=await n(e),i=e.local?d:await c();e.accountId=i;let a=await m(`Loading`,async()=>r.send(O,{account_id:i,app_id:e[`app-id`],flag_key:e[`flag-key`],...t}));p(a,{successLabel:`Loaded`})})},j={command:`changelog`,describe:`Operations for apps.flags.changelog`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function N(e){return e.usage("$0 flagship apps flags create <app-id>\n\nCreates a flag. Returns 409 if the key already exists. `type` is always inferred from variation values; legacy request-side values are ignored. Optional `metadata` can be attached at creation.").positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`default-variation`,{type:`string`,description:"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`."}).option(`description`,{type:`string`,description:`Optional operator-facing description. It does not affect flag evaluation.`}).option(`enabled`,{type:`boolean`,description:"When false, the flag bypasses all rules and always serves `default_variation`."}).option(`key`,{type:`string`,description:`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`}).option(`metadata`,{type:`string`,description:'Key-value metadata associated with the flag. `null` or an empty object clears existing metadata; omission semantics depend on the endpoint (PUT clears it, PATCH preserves it). Provide as a JSON object or @path/to/file.json. Shape: {"<key>": (boolean | string | number)}.'}).option(`rules`,{type:`string`,description:'Targeting rules evaluated in ascending `priority`; the first matching rule wins. An empty array means the flag always serves `default_variation`. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"conditions": [{...}], "priority": number, "serve_variation": string, "rollout"?: {...}}]. ? marks optional keys.'}).option(`type`,{type:`string`,description:`Deprecated compatibility field. Omit it; the API ignores this value and infers the type from the flag's variations.`,choices:[`boolean`,`string`,`number`,`json`]}).coerce(`type`,e=>u(e,`type`,`text`)).option(`variations`,{type:`string`,description:`Map of variation name to value. All values share the same type (boolean, string, number, or JSON object/array), and each serialized value stays within 10KB. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": (string | number | boolean | ...more)}.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const P={command:`create <app-id>`,describe:`Create flag`,builder:N,handler:async e=>f({command:`flagship apps flags create`,classification:{safeFlags:[`enabled`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({command:`cf flagship apps flags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?o({default_variation:u(e[`default-variation`],`default-variation`,`text`),description:u(e.description,`description`,`text`),enabled:e.enabled,key:u(e.key,`key`,`text`),metadata:r(e.metadata,`metadata`),rules:i(e.rules,`rules`),type:e.type,variations:r(e.variations,`variations`,!0)},[[`metadata`],[`variations`]]):a(e.body,[{path:[`variations`],flag:`variations`}])});return}let t=e.body===void 0?void 0:a(e.body,[{path:[`variations`],flag:`variations`}]),f=await n(e),g=e.local?d:await c();if(e.accountId=g,e.body!==void 0){let n=t,r=await m(`Creating`,async()=>f.send(M,{body:n,account_id:g,app_id:e[`app-id`]}));p(r,{successLabel:`Created`});return}if(e[`default-variation`]===void 0&&(e[`default-variation`]=await h(`default-variation`,"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`.")),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.key===void 0&&(e.key=await h(`key`,`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`)),e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);if(e.variations===void 0)throw Error(`--variations is required (or pass --body with this field set).`);let _=o({default_variation:u(e[`default-variation`],`default-variation`,`text`),description:u(e.description,`description`,`text`),enabled:e.enabled,key:u(e.key,`key`,`text`),metadata:r(e.metadata,`metadata`),rules:i(e.rules,`rules`),type:e.type,variations:r(e.variations,`variations`,!0)},[[`metadata`],[`variations`]]),v=await m(`Creating`,async()=>f.send(M,{body:_,account_id:g,app_id:e[`app-id`]}));p(v,{successLabel:`Created`})})};var F={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function I(e){return e.usage(`$0 flagship apps flags delete <flag-key>
|
|
11
11
|
|
|
12
|
-
Deletes a flag permanently. After deletion propagates, direct evaluations return not found; typed binding accessors may return the caller-supplied default. Cannot be undone.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const L={command:`delete <flag-key>`,describe:`Delete flag`,builder:I,handler:async e=>
|
|
12
|
+
Deletes a flag permanently. After deletion propagates, direct evaluations return not found; typed binding accessors may return the caller-supplied default. Cannot be undone.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const L={command:`delete <flag-key>`,describe:`Delete flag`,builder:I,handler:async e=>f({command:`flagship apps flags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await s();l({command:`cf flagship apps flags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},bodyKind:`none`});return}let t=await n(e),r=e.local?d:await c();if(e.accountId=r,!await g({force:!!e.force,message:`Delete this feature flag? After the deletion propagates, evaluation requests can no longer resolve it. This action cannot be undone.`}))return;let i=await m(`Deleting`,async()=>t.send(F,{account_id:r,app_id:e[`app-id`],flag_key:e[`flag-key`]}));p(i,{successLabel:`Deleted`})})};var R={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/evaluate`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function z(e){return e.usage(`$0 flagship apps flags evaluate <app-id>
|
|
13
13
|
|
|
14
|
-
Evaluates a flag against the provided context, passed as a JSON request body (OFREP-shaped) rather than query parameters. Returns the same response shape as the GET variant.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`context`,{type:`string`,description:`Evaluation attributes keyed by name. Values may be any JSON value; the context supports up to 100 entries, nesting depth of 10, 10,000 values, and 32 KB. Provide as a JSON object or @path/to/file.json.`}).option(`flag-key`,{type:`string`,description:`Key of the flag to evaluate within the app.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`evaluate <app-id>`,describe:`Evaluate flag with JSON context`,builder:z,handler:async e=>
|
|
14
|
+
Evaluates a flag against the provided context, passed as a JSON request body (OFREP-shaped) rather than query parameters. Returns the same response shape as the GET variant.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`context`,{type:`string`,description:`Evaluation attributes keyed by name. Values may be any JSON value; the context supports up to 100 entries, nesting depth of 10, 10,000 values, and 32 KB. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": (string | number | boolean | ...more)}.`}).option(`flag-key`,{type:`string`,description:`Key of the flag to evaluate within the app.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`evaluate <app-id>`,describe:`Evaluate flag with JSON context`,builder:z,handler:async e=>f({command:`flagship apps flags evaluate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({command:`cf flagship apps flags evaluate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/evaluate`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?o({context:r(e.context,`context`),flagKey:u(e[`flag-key`],`flag-key`,`text`)},[[`context`]]):a(e.body)});return}let t=e.body===void 0?void 0:a(e.body),i=await n(e),f=e.local?d:await c();if(e.accountId=f,e.body!==void 0){let n=t,r=await m(`Creating`,async()=>i.send(R,{body:n,account_id:f,app_id:e[`app-id`]}));p(r,{successLabel:`Created`});return}e[`flag-key`]===void 0&&(e[`flag-key`]=await h(`flag-key`,`Key of the flag to evaluate within the app.`));let g=o({context:r(e.context,`context`),flagKey:u(e[`flag-key`],`flag-key`,`text`)},[[`context`]]),_=await m(`Creating`,async()=>i.send(R,{body:g,account_id:f,app_id:e[`app-id`]}));p(_,{successLabel:`Created`})})};var V={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function H(e){return e.usage(`$0 flagship apps flags get <flag-key>
|
|
15
15
|
|
|
16
|
-
Returns the full flag definition including rules, variations, metadata, and audit fields.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get <flag-key>`,describe:`Get flag`,builder:H,handler:async e=>
|
|
16
|
+
Returns the full flag definition including rules, variations, metadata, and audit fields.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get <flag-key>`,describe:`Get flag`,builder:H,handler:async e=>f({command:`flagship apps flags get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({command:`cf flagship apps flags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},bodyKind:`none`});return}let t=await n(e),r=e.local?d:await c();e.accountId=r;let i=await m(`Loading`,async()=>t.send(V,{account_id:r,app_id:e[`app-id`],flag_key:e[`flag-key`]}));p(i,{successLabel:`Loaded`})})};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags`,query:[`limit`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function W(e){return e.usage("$0 flagship apps flags list\n\nLists an app's flags ordered by key. Pass `cursor` from `result_info` to page forward; a null cursor indicates the last page.").option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Max items to return (1–200).`}).option(`cursor`,{type:`string`,description:`Pagination cursor from a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`List flags`,builder:W,handler:async e=>f({command:`flagship apps flags list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={limit:e.limit,cursor:e.cursor};if(e.dryRun){let n=await s();l({command:`cf flagship apps flags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags`,pathParams:{"app-id":String(e[`app-id`]??``)},query:t,bodyKind:`none`});return}let r=await n(e),i=e.local?d:await c();e.accountId=i;let a=await m(`Loading`,async()=>r.send(U,{account_id:i,app_id:e[`app-id`],...t}));p(a,{successLabel:`Loaded`})})};var K={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function q(e){return e.usage("$0 flagship apps flags patch <flag-key>\n\nApplies a partial update to lightweight flag fields: `enabled`, `description`, `metadata`, and `default_variation`. Only fields present in the request body are modified; omitted fields are preserved. `metadata: null` or an empty object clears metadata. `default_variation` must exist in the current `variations`. Structural changes to `variations` and `rules` use PUT. A changelog entry is appended when the flag content actually changes.").positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`default-variation`,{type:`string`,description:"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`."}).option(`description`,{type:`string`,description:`Optional operator-facing description. It does not affect flag evaluation.`}).option(`enabled`,{type:`boolean`,description:"When false, the flag bypasses all rules and always serves `default_variation`."}).option(`metadata`,{type:`string`,description:'Key-value metadata associated with the flag. `null` or an empty object clears existing metadata; omission semantics depend on the endpoint (PUT clears it, PATCH preserves it). Provide as a JSON object or @path/to/file.json. Shape: {"<key>": (boolean | string | number)}.'}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const J={command:`patch <flag-key>`,describe:`Partially update flag`,builder:q,handler:async e=>f({command:`flagship apps flags patch`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({command:`cf flagship apps flags patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},bodyKind:`json`,body:e.body===void 0?o({default_variation:u(e[`default-variation`],`default-variation`,`text`),description:u(e.description,`description`,`text`),enabled:e.enabled,metadata:r(e.metadata,`metadata`)},[[`metadata`]]):a(e.body)});return}let t=e.body===void 0?void 0:a(e.body),i=await n(e),f=e.local?d:await c();if(e.accountId=f,e.body!==void 0){let n=t,r=await m(`Updating`,async()=>i.send(K,{body:n,account_id:f,app_id:e[`app-id`],flag_key:e[`flag-key`]}));p(r,{successLabel:`Updated`});return}let h=o({default_variation:u(e[`default-variation`],`default-variation`,`text`),description:u(e.description,`description`,`text`),enabled:e.enabled,metadata:r(e.metadata,`metadata`)},[[`metadata`]]),g=await m(`Updating`,async()=>i.send(K,{body:h,account_id:f,app_id:e[`app-id`],flag_key:e[`flag-key`]}));p(g,{successLabel:`Updated`})})};var Y={method:`PUT`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}/flags/${t.flag_key}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function X(e){return e.usage(`$0 flagship apps flags update <flag-key>
|
|
17
17
|
|
|
18
|
-
Replaces the entire flag definition. Omitted fields are cleared, not preserved — read before writing. The path key identifies the flag and cannot be renamed by changing the body \`key\`. A changelog entry is appended when the flag content actually changes; identical updates are no-ops.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`default-variation`,{type:`string`,description:"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`."}).option(`description`,{type:`string`,description:`Optional operator-facing description. It does not affect flag evaluation.`}).option(`enabled`,{type:`boolean`,description:"When false, the flag bypasses all rules and always serves `default_variation`."}).option(`key`,{type:`string`,description:`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`}).option(`metadata`,{type:`string`,description:
|
|
18
|
+
Replaces the entire flag definition. Omitted fields are cleared, not preserved — read before writing. The path key identifies the flag and cannot be renamed by changing the body \`key\`. A changelog entry is appended when the flag content actually changes; identical updates are no-ops.`).positional(`flag-key`,{type:`string`,description:`Case-sensitive key identifying the flag within the app.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`default-variation`,{type:`string`,description:"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`."}).option(`description`,{type:`string`,description:`Optional operator-facing description. It does not affect flag evaluation.`}).option(`enabled`,{type:`boolean`,description:"When false, the flag bypasses all rules and always serves `default_variation`."}).option(`key`,{type:`string`,description:`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`}).option(`metadata`,{type:`string`,description:'Key-value metadata associated with the flag. `null` or an empty object clears existing metadata; omission semantics depend on the endpoint (PUT clears it, PATCH preserves it). Provide as a JSON object or @path/to/file.json. Shape: {"<key>": (boolean | string | number)}.'}).option(`rules`,{type:`string`,description:'Targeting rules evaluated in ascending `priority`; the first matching rule wins. An empty array means the flag always serves `default_variation`. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"conditions": [{...}], "priority": number, "serve_variation": string, "rollout"?: {...}}]. ? marks optional keys.'}).option(`type`,{type:`string`,description:`Deprecated compatibility field. Omit it; the API ignores this value and infers the type from the flag's variations.`,choices:[`boolean`,`string`,`number`,`json`]}).coerce(`type`,e=>u(e,`type`,`text`)).option(`variations`,{type:`string`,description:`Map of variation name to value. All values share the same type (boolean, string, number, or JSON object/array), and each serialized value stays within 10KB. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": (string | number | boolean | ...more)}.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Z={command:`update <flag-key>`,describe:`Update flag`,builder:X,handler:async e=>f({command:`flagship apps flags update`,classification:{safeFlags:[`enabled`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({command:`cf flagship apps flags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/flags/${e[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(e[`flag-key`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"flag-key":String(e[`flag-key`]??``)},bodyKind:`json`,body:e.body===void 0?o({default_variation:u(e[`default-variation`],`default-variation`,`text`),description:u(e.description,`description`,`text`),enabled:e.enabled,key:u(e.key,`key`,`text`),metadata:r(e.metadata,`metadata`),rules:i(e.rules,`rules`),type:e.type,variations:r(e.variations,`variations`,!0)},[[`metadata`],[`variations`]]):a(e.body,[{path:[`variations`],flag:`variations`}])});return}let t=e.body===void 0?void 0:a(e.body,[{path:[`variations`],flag:`variations`}]),f=await n(e),g=e.local?d:await c();if(e.accountId=g,e.body!==void 0){let n=t,r=await m(`Updating`,async()=>f.send(Y,{body:n,account_id:g,app_id:e[`app-id`],flag_key:e[`flag-key`]}));p(r,{successLabel:`Updated`});return}if(e[`default-variation`]===void 0&&(e[`default-variation`]=await h(`default-variation`,"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`.")),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.key===void 0&&(e.key=await h(`key`,`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`)),e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);if(e.variations===void 0)throw Error(`--variations is required (or pass --body with this field set).`);let _=o({default_variation:u(e[`default-variation`],`default-variation`,`text`),description:u(e.description,`description`,`text`),enabled:e.enabled,key:u(e.key,`key`,`text`),metadata:r(e.metadata,`metadata`),rules:i(e.rules,`rules`),type:e.type,variations:r(e.variations,`variations`,!0)},[[`metadata`],[`variations`]]),v=await m(`Updating`,async()=>f.send(Y,{body:_,account_id:g,app_id:e[`app-id`],flag_key:e[`flag-key`]}));p(v,{successLabel:`Updated`})})},re={command:`flags`,describe:`Operations for apps.flags`,builder:e=>e.command(P).command(L).command(B).command(ne).command(G).command(J).command(Z).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function ae(e){return e.usage(`$0 flagship apps get <app-id>
|
|
19
19
|
|
|
20
|
-
Returns an app's name and audit fields. Flag definitions are not included.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get <app-id>`,describe:`Get app`,builder:ae,handler:async e=>
|
|
20
|
+
Returns an app's name and audit fields. Flag definitions are not included.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get <app-id>`,describe:`Get app`,builder:ae,handler:async e=>f({command:`flagship apps get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({command:`cf flagship apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=e.local?d:await c();e.accountId=r;let i=await m(`Loading`,async()=>t.send(ie,{account_id:r,app_id:e[`app-id`]}));p(i,{successLabel:`Loaded`})})};var se={method:`GET`,path:t=>e`/accounts/${t.account_id}/flagship/apps`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function Q(e){return e.usage(`$0 flagship apps list
|
|
21
21
|
|
|
22
|
-
Lists all Flagship apps in the account. Returns identity and audit fields only; flag definitions are not included.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`List apps`,builder:Q,handler:async e=>
|
|
22
|
+
Lists all Flagship apps in the account. Returns identity and audit fields only; flag definitions are not included.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`List apps`,builder:Q,handler:async e=>f({command:`flagship apps list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await s();l({command:`cf flagship apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`none`});return}let t=await n(e),r=e.local?d:await c();e.accountId=r;let i=await m(`Loading`,async()=>t.send(se,{account_id:r}));p(i,{successLabel:`Loaded`})})};var $={method:`PUT`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function le(e){return e.usage(`$0 flagship apps update <app-id>
|
|
23
23
|
|
|
24
|
-
Updates an app. Only \`name\` is mutable.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ue={command:`update <app-id>`,describe:`Update app`,builder:le,handler:async e=>
|
|
24
|
+
Updates an app. Only \`name\` is mutable.`).positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ue={command:`update <app-id>`,describe:`Update app`,builder:le,handler:async e=>f({command:`flagship apps update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({command:`cf flagship apps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?o({name:u(e.name,`name`,`text`)}):a(e.body)});return}let t=e.body===void 0?void 0:a(e.body),r=await n(e),i=e.local?d:await c();if(e.accountId=i,e.body!==void 0){let n=t,a=await m(`Updating`,async()=>r.send($,{body:n,account_id:i,app_id:e[`app-id`]}));p(a,{successLabel:`Updated`});return}let f=o({name:u(e.name,`name`,`text`)}),h=await m(`Updating`,async()=>r.send($,{body:f,account_id:i,app_id:e[`app-id`]}));p(h,{successLabel:`Updated`})})},de={command:`apps`,describe:`Operations for apps`,builder:e=>e.command(y).command(C).command(oe).command(ce).command(ue).command(S).command(D).command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fe={command:`flagship`,describe:`flagship`,builder:e=>e.command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{fe as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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-
|
|
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"./telemetry-COlodX5Z.mjs";import{r as s,t as c}from"./body-parser-HN91kAf0.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";var u={method:`GET`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`};function d(e){return e.usage(`$0 fraud get
|
|
3
3
|
|
|
4
|
-
Retrieve Fraud Detection settings for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`get`,describe:`Get Fraud Detection Settings`,builder:d,handler:async e=>o({command:`fraud get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){
|
|
4
|
+
Retrieve Fraud Detection settings for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`get`,describe:`Get Fraud Detection Settings`,builder:d,handler:async e=>o({command:`fraud get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf fraud get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/fraud_detection/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(u,{zone_id:s}));i(c,{successLabel:`Loaded`})})};var p={method:`PUT`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`,body:`json`};function m(e){return e.usage("$0 fraud update\n\nUpdate Fraud Detection settings for a zone. Notes on `username_expressions` behavior: - If omitted or set to null, expressions are not modified. - If provided as an empty array `[]`, all expressions will be cleared.").option(`authentication-settings-failure-criteria-kind`,{type:`string`,description:"The type of criterion. Currently only `status_code` is supported.",choices:[`status_code`]}).coerce(`authentication-settings-failure-criteria-kind`,e=>l(e,`authentication-settings-failure-criteria-kind`,`text`)).option(`authentication-settings-failure-criteria-status-codes`,{type:`string`,array:!0,description:`HTTP status codes to match against the origin response.
|
|
5
5
|
- Maximum of 10 codes per criterion.
|
|
6
6
|
- Each code must be a valid HTTP status code (100-599).
|
|
7
7
|
- Codes are deduplicated and sorted on save.
|
|
@@ -19,4 +19,4 @@ Retrieve Fraud Detection settings for a zone.`).option(`dry-run`,{type:`boolean`
|
|
|
19
19
|
- Omit or set to null to leave unchanged on update.
|
|
20
20
|
- Provide an empty array \`[]\` to clear all expressions on update.
|
|
21
21
|
- Invalid expressions will result in a 10400 Bad Request with details in the \`messages\` array.
|
|
22
|
-
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`authentication-settings-failure-criteria-kind`,`authentication-settings-failure-criteria-status-codes`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`authentication-settings-failure-criteria-kind`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --authentication-settings-failure-criteria-* flag is set`)}return!0}).check(e=>{let t=[`authentication-settings-success-criteria-kind`,`authentication-settings-success-criteria-status-codes`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`authentication-settings-success-criteria-kind`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --authentication-settings-success-criteria-* flag is set`)}return!0})}const h={command:`update`,describe:`Update Fraud Detection Settings`,builder:m,handler:async e=>o({command:`fraud update`,classification:{safeFlags:[`authentication-settings-failure-criteria-kind`,`authentication-settings-success-criteria-kind`,`user-profiles`,`dry-run`]}},e,async()=>{if(e.dryRun){
|
|
22
|
+
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`authentication-settings-failure-criteria-kind`,`authentication-settings-failure-criteria-status-codes`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`authentication-settings-failure-criteria-kind`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --authentication-settings-failure-criteria-* flag is set`)}return!0}).check(e=>{let t=[`authentication-settings-success-criteria-kind`,`authentication-settings-success-criteria-status-codes`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`authentication-settings-success-criteria-kind`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --authentication-settings-success-criteria-* flag is set`)}return!0})}const h={command:`update`,describe:`Update Fraud Detection Settings`,builder:m,handler:async e=>o({command:`fraud update`,classification:{safeFlags:[`authentication-settings-failure-criteria-kind`,`authentication-settings-success-criteria-kind`,`user-profiles`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf fraud update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/fraud_detection/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({authentication_settings:{failure_criteria:{kind:e[`authentication-settings-failure-criteria-kind`],status_codes:e[`authentication-settings-failure-criteria-status-codes`]},success_criteria:{kind:e[`authentication-settings-success-criteria-kind`],status_codes:e[`authentication-settings-success-criteria-status-codes`]}},user_profiles:e[`user-profiles`],username_expressions:e[`username-expressions`]}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),l=await t(e),u=await n({zone:e.zone},l,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let e=o,t=await a(`Updating`,async()=>l.send(p,{body:e,zone_id:u}));i(t,{successLabel:`Updated`});return}let d=c({authentication_settings:{failure_criteria:{kind:e[`authentication-settings-failure-criteria-kind`],status_codes:e[`authentication-settings-failure-criteria-status-codes`]},success_criteria:{kind:e[`authentication-settings-success-criteria-kind`],status_codes:e[`authentication-settings-success-criteria-status-codes`]}},user_profiles:e[`user-profiles`],username_expressions:e[`username-expressions`]}),f=await a(`Updating`,async()=>l.send(p,{body:d,zone_id:u}));i(f,{successLabel:`Updated`})})},g={command:`fraud`,describe:`fraud`,builder:e=>e.command(f).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{r as e,t}from"./project-settings-D_S-UC8I.mjs";import*as n from"node:path";import*as r from"node:fs/promises";import{generateTypes as i,loadAndParseConfig as a}from"@cloudflare/config";import{RUNTIME_TYPES_MARKER as o,generateRuntimeTypes as s}from"@cloudflare/runtime-types";const c=n.join(`.cloudflare`,`types`,`index.d.ts`);function l(e,t){let r=n.relative(e,t).split(n.sep).join(`/`);return r.startsWith(`.`)?r:`./${r}`}async function u(u){let{configPath:d}=u,f=await a(d,{isPreview:!1,mode:u.mode});if(!f.result.success)throw Error(`Invalid ${t}:\n${e(f.result.error.issues)}`);let p=f.result.data.worker;if(p===void 0)throw Error(`${t} must define a Worker to generate types.`);let m=n.dirname(d),h=n.join(m,c),g;try{g=await r.readFile(h,`utf8`)}catch{}let _=i({configPath:l(n.dirname(h),d),packageName:`cf/config`});if(u.includeRuntime){let{runtimeHeader:e,runtimeTypes:t}=await s({compatibilityDate:p.compatibilityDate,compatibilityFlags:p.compatibilityFlags??[],existingContent:g});_+=`\n${e}\n${o}\n${t}`}return g!==_&&(await r.mkdir(n.dirname(h),{recursive:!0}),await r.writeFile(h,_)),h}export{u as n,c as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const e={quiet:{type:`boolean`,alias:`q`,description:`Suppress non-essential output`,global:!0,default:!1},zone:{type:`string`,alias:`z`,description:`Zone ID or domain name (overrides CLOUDFLARE_ZONE_ID)`,global:!0,coerce:e=>{if(Array.isArray(e))throw Error(`--zone can only be specified once.`);if(typeof e!=`string`||e===``)throw Error(`--zone requires a non-empty value.`);return e}},profile:{type:`string`,description:`Use a specific auth profile`,requiresArg:!0,global:!0},mode:{type:`string`,alias:`m`,description:`Mode used to evaluate project configuration`,requiresArg:!0,global:!0,coerce:e=>{if(Array.isArray(e))throw Error(`--mode can only be specified once.`);if(e===``)throw Error(`--mode requires a non-empty value.`);return e}},"temporary-account":{type:`boolean`,description:`Create or reuse a temporary account when no Cloudflare credentials are available`,global:!0,default:!1,hidden:!0},"event-code":{type:`string`,description:`Specify the event code to use when creating a temporary account for an event`,requiresArg:!0,global:!0,hidden:!0,coerce:e=>{if(Array.isArray(e))throw Error(`--event-code expects a single value.`);let t=e.trim();if(!t)throw Error(`--event-code cannot be empty.`);return t}},local:{type:`boolean`,description:`Use local resource simulations`,global:!0,default:!1},"persist-to":{type:`string`,description:`Directory holding local persisted state (default:
|
|
2
|
+
const e={quiet:{type:`boolean`,alias:`q`,description:`Suppress non-essential output`,global:!0,default:!1},zone:{type:`string`,alias:`z`,description:`Zone ID or domain name (overrides CLOUDFLARE_ZONE_ID)`,global:!0,coerce:e=>{if(Array.isArray(e))throw Error(`--zone can only be specified once.`);if(typeof e!=`string`||e===``)throw Error(`--zone requires a non-empty value.`);return e}},profile:{type:`string`,description:`Use a specific auth profile`,requiresArg:!0,global:!0},mode:{type:`string`,alias:`m`,description:`Mode used to evaluate project configuration`,requiresArg:!0,global:!0,coerce:e=>{if(Array.isArray(e))throw Error(`--mode can only be specified once.`);if(e===``)throw Error(`--mode requires a non-empty value.`);return e}},"temporary-account":{type:`boolean`,description:`Create or reuse a temporary account when no Cloudflare credentials are available`,global:!0,default:!1,hidden:!0},"event-code":{type:`string`,description:`Specify the event code to use when creating a temporary account for an event`,requiresArg:!0,global:!0,hidden:!0,coerce:e=>{if(Array.isArray(e))throw Error(`--event-code expects a single value.`);let t=e.trim();if(!t)throw Error(`--event-code cannot be empty.`);return t}},local:{type:`boolean`,description:`Use local resource simulations`,global:!0,default:!1},"persist-to":{type:`string`,description:`Directory holding local persisted state (default: .cloudflare/state next to cloudflare.config.ts)`,requiresArg:!0,global:!0}},t={help:{alias:`h`,description:`Show help`},version:{alias:`v`,description:`Show version number`}},n=Object.entries({...e,...t}).flatMap(([e,{alias:t}])=>[e,...t===void 0?[]:typeof t==`string`?[t]:t]),r=[`remote`,`cwd`,`config`,`c`,`json`,`ndjson`,`pretty`],i=new Set(n.map(s)),a=new Set(r);function o(e){let t=new Set(Array.from(e,s));return e=>{let n=s(e);return i.has(n)?`global`:a.has(n)?`future`:n.startsWith(`experimental-`)?`experimental`:/^[a-z]$/.test(n)?`single-letter`:t.has(n)?`command`:void 0}}function s(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).replace(/[_.\s]+/g,`-`).toLowerCase()}export{o as i,e as n,n as r,t};
|