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
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-DA1PHaHi.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{a as i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-hFMAotFl.mjs";import{t as c}from"./progress-DE_G09u2.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{c as u,i as d,n as f,o as p,r as m,t as h}from"./body-parser-HN91kAf0.mjs";import{n as g}from"./input-validation-D7z60HJH.mjs";import{a as _,i as v,n as y}from"./prompt-D274Im1O.mjs";import{t as b}from"./body-unions-D9OSaf4M.mjs";var ee={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}/cancel`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function te(e){return e.usage(`$0 builds cancel <build-uuid>
|
|
3
|
+
|
|
4
|
+
Cancel a queued or running build.`).positional(`build-uuid`,{type:`string`,description:`UUID of the build, as returned by builds list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`cancel <build-uuid>`,describe:`Cancel a Workers build`,builder:te,handler:async e=>l({command:`builds cancel`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds cancel`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/builds/${e[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(e[`build-uuid`]))}/cancel`,pathParams:{"build-uuid":String(e[`build-uuid`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Updating`,async()=>t.send(ee,{account_id:l,build_uuid:e[`build-uuid`]}));s(u,{successLabel:`Updated`})})};function re(e){return e.usage(`$0 builds create <worker>
|
|
5
|
+
|
|
6
|
+
Start a production build for a branch or commit.`).positional(`worker`,{type:`string`,description:`Script tag of the Worker.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name (required if commit_hash not provided)`}).option(`commit-hash`,{type:`string`,description:`Git commit hash (required if branch not provided)`}).option(`seed-repo-branch`,{type:`string`,description:`Repository branch to seed.`}).option(`seed-repo-files`,{type:`string`,description:`Files to add or replace for this build. Maximum 2. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"content": string, "filename": string, "isBase64"?: boolean, "replace"?: string}]. ? marks optional keys.`}).option(`seed-repo-owner`,{type:`string`,description:`Repository owner or namespace.`}).option(`seed-repo-path`,{type:`string`,description:`Path within the repository to seed.`}).option(`seed-repo-provider`,{type:`string`,description:`Source control provider for the seed repository.`,choices:[`github`,`gitlab`]}).coerce(`seed-repo-provider`,e=>g(e,`seed-repo-provider`,`text`)).option(`seed-repo-repository`,{type:`string`,description:`Repository name.`}).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=[`seed-repo-branch`,`seed-repo-files`,`seed-repo-owner`,`seed-repo-path`,`seed-repo-provider`,`seed-repo-repository`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`seed-repo-owner`,`seed-repo-provider`,`seed-repo-repository`].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 --seed-repo-* flag is set`)}return!0})}const ie={command:`create <worker>`,describe:`Start a Worker build`,builder:re,handler:async e=>l({command:`builds create`,classification:{safeFlags:[`seed-repo-provider`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/builds`,pathParams:{worker:String(e.worker??``)},bodyKind:`json`,body:e.body===void 0?h({branch:g(e.branch,`branch`,`text`),commit_hash:g(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:g(e[`seed-repo-branch`],`seed-repo-branch`,`text`),files:p(e[`seed-repo-files`],`seed-repo-files`),owner:g(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:g(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:g(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}):m(e.body)});return}let l=e.body===void 0?void 0:m(e.body),d=await n(e),f=e.local?o:await a();if(e.accountId=f,e.body!==void 0){let n=l,r=await c(`Creating`,async()=>t(d,`POST`,`/accounts/${f}/builds/workers/${encodeURIComponent(String(e.worker))}/builds`,{body:n}));s(r,{successLabel:`Created`});return}let _={};e.branch!==void 0&&u(_,[`branch`],g(e.branch,`branch`,`text`)),e[`commit-hash`]!==void 0&&u(_,[`commit_hash`],g(e[`commit-hash`],`commit-hash`,`text`)),e[`seed-repo-branch`]!==void 0&&u(_,[`seed_repo`,`branch`],g(e[`seed-repo-branch`],`seed-repo-branch`,`text`)),e[`seed-repo-files`]!==void 0&&u(_,[`seed_repo`,`files`],p(e[`seed-repo-files`],`seed-repo-files`)),e[`seed-repo-owner`]!==void 0&&u(_,[`seed_repo`,`owner`],g(e[`seed-repo-owner`],`seed-repo-owner`,`text`)),e[`seed-repo-path`]!==void 0&&u(_,[`seed_repo`,`path`],g(e[`seed-repo-path`],`seed-repo-path`,`text`)),e[`seed-repo-provider`]!==void 0&&u(_,[`seed_repo`,`provider`],e[`seed-repo-provider`]),e[`seed-repo-repository`]!==void 0&&u(_,[`seed_repo`,`repository`],g(e[`seed-repo-repository`],`seed-repo-repository`,`text`));let v=await c(`Creating`,async()=>t(d,`POST`,`/accounts/${f}/builds/workers/${encodeURIComponent(String(e.worker))}/builds`,{body:_}));s(v,{successLabel:`Created`})})};function ae(e){return e.usage(`$0 builds deploy-hooks create <worker>
|
|
7
|
+
|
|
8
|
+
Create an HTTP hook that starts a build for a selected Worker branch.`).positional(`worker`,{type:`string`,description:`Name or script tag of the Worker.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name.`}).option(`deploy-hook-name`,{type:`string`,description:`Deploy hook name (1-58 characters).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`create <worker>`,describe:`Create a deploy hook`,builder:ae,handler:async e=>l({command:`builds deploy-hooks create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds deploy-hooks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/deploy_hooks`,pathParams:{worker:String(e.worker??``)},bodyKind:`json`,body:e.body===void 0?h({branch:g(e.branch,`branch`,`text`),deploy_hook_name:g(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}):m(e.body)});return}let l=e.body===void 0?void 0:m(e.body),d=await n(e),f=e.local?o:await a();if(e.accountId=f,e.body!==void 0){let n=l,r=await c(`Creating`,async()=>t(d,`POST`,`/accounts/${f}/builds/workers/${encodeURIComponent(String(e.worker))}/deploy_hooks`,{body:n}));s(r,{successLabel:`Created`});return}e.branch===void 0&&(e.branch=await _(`branch`,`Git branch name.`)),e[`deploy-hook-name`]===void 0&&(e[`deploy-hook-name`]=await _(`deploy-hook-name`,`Deploy hook name (1-58 characters).`));let p={};e.branch!==void 0&&u(p,[`branch`],g(e.branch,`branch`,`text`)),e[`deploy-hook-name`]!==void 0&&u(p,[`deploy_hook_name`],g(e[`deploy-hook-name`],`deploy-hook-name`,`text`));let v=await c(`Creating`,async()=>t(d,`POST`,`/accounts/${f}/builds/workers/${encodeURIComponent(String(e.worker))}/deploy_hooks`,{body:p}));s(v,{successLabel:`Created`})})};function S(e){return e.usage(`$0 builds deploy-hooks delete <deploy-hook-uuid>
|
|
9
|
+
|
|
10
|
+
Delete a deploy hook so its UUID can no longer start builds.`).positional(`deploy-hook-uuid`,{type:`string`,description:`UUID of the deploy hook, as returned by deploy-hooks list.`,demandOption:!0}).option(`worker`,{type:`string`,description:`Name or script tag of the Worker.`,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 <deploy-hook-uuid>`,describe:`Delete a deploy hook`,builder:S,handler:async e=>l({command:`builds deploy-hooks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds deploy-hooks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{worker:String(e.worker??``),"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();if(e.accountId=u,!await y({force:!!e.force,message:`This operation deletes the deploy hook. Requests to its URL will no longer start builds.`}))return;let d=await c(`Deleting`,async()=>t(l,`DELETE`,`/accounts/${u}/builds/workers/${encodeURIComponent(String(e.worker))}/deploy_hooks/${encodeURIComponent(String(e[`deploy-hook-uuid`]))}`));s(d,{successLabel:`Deleted`})})};function w(e){return e.usage(`$0 builds deploy-hooks get <deploy-hook-uuid>
|
|
11
|
+
|
|
12
|
+
Retrieve the name, branch, Worker identifier, and timestamps for a deploy hook.`).positional(`deploy-hook-uuid`,{type:`string`,description:`UUID of the deploy hook, as returned by deploy-hooks list.`,demandOption:!0}).option(`worker`,{type:`string`,description:`Name or script tag of the Worker.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <deploy-hook-uuid>`,describe:`Get a deploy hook`,builder:w,handler:async e=>l({command:`builds deploy-hooks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds deploy-hooks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{worker:String(e.worker??``),"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>t(l,`GET`,`/accounts/${u}/builds/workers/${encodeURIComponent(String(e.worker))}/deploy_hooks/${encodeURIComponent(String(e[`deploy-hook-uuid`]))}`));s(d,{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 builds deploy-hooks list
|
|
13
|
+
|
|
14
|
+
List the branch-specific deploy hooks configured for a Worker.`).option(`worker`,{type:`string`,description:`Name or script tag of the Worker.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List deploy hooks`,builder:E,handler:async e=>l({command:`builds deploy-hooks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds deploy-hooks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/deploy_hooks`,pathParams:{worker:String(e.worker??``)},bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>t(l,`GET`,`/accounts/${u}/builds/workers/${encodeURIComponent(String(e.worker))}/deploy_hooks`));s(d,{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 builds deploy-hooks update <deploy-hook-uuid>
|
|
15
|
+
|
|
16
|
+
Replace the name and target branch for a deploy hook.`).positional(`deploy-hook-uuid`,{type:`string`,description:`UUID of the deploy hook, as returned by deploy-hooks list.`,demandOption:!0}).option(`worker`,{type:`string`,description:`Name or script tag of the Worker.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name.`}).option(`deploy-hook-name`,{type:`string`,description:`Deploy hook name (1-58 characters).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const k={command:`update <deploy-hook-uuid>`,describe:`Update a deploy hook`,builder:O,handler:async e=>l({command:`builds deploy-hooks update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds deploy-hooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{worker:String(e.worker??``),"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?h({branch:g(e.branch,`branch`,`text`),deploy_hook_name:g(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}):m(e.body)});return}let l=e.body===void 0?void 0:m(e.body),d=await n(e),f=e.local?o:await a();if(e.accountId=f,e.body!==void 0){let n=l,r=await c(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/builds/workers/${encodeURIComponent(String(e.worker))}/deploy_hooks/${encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,{body:n}));s(r,{successLabel:`Updated`});return}e.branch===void 0&&(e.branch=await _(`branch`,`Git branch name.`)),e[`deploy-hook-name`]===void 0&&(e[`deploy-hook-name`]=await _(`deploy-hook-name`,`Deploy hook name (1-58 characters).`));let p={};e.branch!==void 0&&u(p,[`branch`],g(e.branch,`branch`,`text`)),e[`deploy-hook-name`]!==void 0&&u(p,[`deploy_hook_name`],g(e[`deploy-hook-name`],`deploy-hook-name`,`text`));let v=await c(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/builds/workers/${encodeURIComponent(String(e.worker))}/deploy_hooks/${encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,{body:p}));s(v,{successLabel:`Updated`})})},A={command:`deploy-hooks`,describe:`Manage branch-specific HTTP hooks that start builds.`,builder:e=>e.command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var j={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function M(e){return e.usage(`$0 builds get <build-uuid>
|
|
17
|
+
|
|
18
|
+
Retrieve status, outcome, timestamps, trigger settings, and source metadata for a build UUID.`).positional(`build-uuid`,{type:`string`,description:`UUID of the build, as returned by builds list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`get <build-uuid>`,describe:`Get a Workers build`,builder:M,handler:async e=>l({command:`builds get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/builds/${e[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(e[`build-uuid`]))}`,pathParams:{"build-uuid":String(e[`build-uuid`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(j,{account_id:l,build_uuid:e[`build-uuid`]}));s(u,{successLabel:`Loaded`})})};var P={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/account/limits`,errors:{401:`UnauthorizedError`}};function F(e){return e.usage(`$0 builds limits get
|
|
19
|
+
|
|
20
|
+
Return whether the account's build-minute allowance is exhausted and when it refreshes.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get`,describe:`Get build-minute availability`,builder:F,handler:async e=>l({command:`builds limits get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();r({command:`cf builds limits get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/account/limits`,pathParams:{},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(P,{account_id:l}));s(u,{successLabel:`Loaded`})})},L={command:`limits`,describe:`View build-minute availability and refresh information.`,builder:e=>e.command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(e){return e.usage(`$0 builds list
|
|
21
|
+
|
|
22
|
+
List paginated build records associated with a Worker.`).option(`worker`,{type:`string`,description:`Script tag of the Worker.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`list`,describe:`List builds for a Worker`,builder:R,handler:async e=>l({command:`builds list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await i();r({command:`cf builds list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/builds`,pathParams:{worker:String(e.worker??``)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.local?o:await a();e.accountId=d;let f=await c(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/builds/workers/${encodeURIComponent(String(e.worker))}/builds`,{query:l}));s(f,{successLabel:`Loaded`})})};var B={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}/logs`,query:[`cursor`],errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function V(e){return e.usage(`$0 builds logs <build-uuid>
|
|
23
|
+
|
|
24
|
+
Retrieve cursor-paginated log lines for a build UUID.`).positional(`build-uuid`,{type:`string`,description:`UUID of the build, as returned by builds list.`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Pagination cursor for log retrieval.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`logs <build-uuid>`,describe:`Get Workers build logs`,builder:V,handler:async e=>l({command:`builds logs`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={cursor:e.cursor};if(e.dryRun){let n=await i();r({command:`cf builds logs`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/builds/builds/${e[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(e[`build-uuid`]))}/logs`,pathParams:{"build-uuid":String(e[`build-uuid`]??``)},query:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(B,{account_id:u,build_uuid:e[`build-uuid`],...t}));s(d,{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 builds previews create-build <preview>
|
|
25
|
+
|
|
26
|
+
Trigger a build for a single Preview.`).positional(`preview`,{type:`string`,description:`ID of the Preview.`,demandOption:!0}).option(`worker`,{type:`string`,description:`Script tag of the Worker.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name (required if commit_hash not provided)`}).option(`commit-hash`,{type:`string`,description:`Git commit hash (required if branch not provided)`}).option(`seed-repo-branch`,{type:`string`,description:`Repository branch to seed.`}).option(`seed-repo-files`,{type:`string`,description:`Files to add or replace for this build. Maximum 2. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"content": string, "filename": string, "isBase64"?: boolean, "replace"?: string}]. ? marks optional keys.`}).option(`seed-repo-owner`,{type:`string`,description:`Repository owner or namespace.`}).option(`seed-repo-path`,{type:`string`,description:`Path within the repository to seed.`}).option(`seed-repo-provider`,{type:`string`,description:`Source control provider for the seed repository.`,choices:[`github`,`gitlab`]}).coerce(`seed-repo-provider`,e=>g(e,`seed-repo-provider`,`text`)).option(`seed-repo-repository`,{type:`string`,description:`Repository name.`}).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=[`seed-repo-branch`,`seed-repo-files`,`seed-repo-owner`,`seed-repo-path`,`seed-repo-provider`,`seed-repo-repository`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`seed-repo-owner`,`seed-repo-provider`,`seed-repo-repository`].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 --seed-repo-* flag is set`)}return!0})}const W={command:`create-build <preview>`,describe:`Create preview build`,builder:U,handler:async e=>l({command:`builds previews create-build`,classification:{safeFlags:[`seed-repo-provider`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds previews create-build`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/previews/${e.preview==null?`<preview>`:encodeURIComponent(String(e.preview))}/builds`,pathParams:{worker:String(e.worker??``),preview:String(e.preview??``)},bodyKind:`json`,body:e.body===void 0?h({branch:g(e.branch,`branch`,`text`),commit_hash:g(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:g(e[`seed-repo-branch`],`seed-repo-branch`,`text`),files:p(e[`seed-repo-files`],`seed-repo-files`),owner:g(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:g(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:g(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}):m(e.body)});return}let l=e.body===void 0?void 0:m(e.body),d=await n(e),f=e.local?o:await a();if(e.accountId=f,e.body!==void 0){let n=l,r=await c(`Creating`,async()=>t(d,`POST`,`/accounts/${f}/builds/workers/${encodeURIComponent(String(e.worker))}/previews/${encodeURIComponent(String(e.preview))}/builds`,{body:n}));s(r,{successLabel:`Created`});return}let _={};e.branch!==void 0&&u(_,[`branch`],g(e.branch,`branch`,`text`)),e[`commit-hash`]!==void 0&&u(_,[`commit_hash`],g(e[`commit-hash`],`commit-hash`,`text`)),e[`seed-repo-branch`]!==void 0&&u(_,[`seed_repo`,`branch`],g(e[`seed-repo-branch`],`seed-repo-branch`,`text`)),e[`seed-repo-files`]!==void 0&&u(_,[`seed_repo`,`files`],p(e[`seed-repo-files`],`seed-repo-files`)),e[`seed-repo-owner`]!==void 0&&u(_,[`seed_repo`,`owner`],g(e[`seed-repo-owner`],`seed-repo-owner`,`text`)),e[`seed-repo-path`]!==void 0&&u(_,[`seed_repo`,`path`],g(e[`seed-repo-path`],`seed-repo-path`,`text`)),e[`seed-repo-provider`]!==void 0&&u(_,[`seed_repo`,`provider`],e[`seed-repo-provider`]),e[`seed-repo-repository`]!==void 0&&u(_,[`seed_repo`,`repository`],g(e[`seed-repo-repository`],`seed-repo-repository`,`text`));let v=await c(`Creating`,async()=>t(d,`POST`,`/accounts/${f}/builds/workers/${encodeURIComponent(String(e.worker))}/previews/${encodeURIComponent(String(e.preview))}/builds`,{body:_}));s(v,{successLabel:`Created`})})};function G(e){return e.usage(`$0 builds previews get <preview>
|
|
27
|
+
|
|
28
|
+
Retrieve a single Preview of a Worker, including the build settings it currently uses.`).positional(`preview`,{type:`string`,description:`ID of the Preview.`,demandOption:!0}).option(`worker`,{type:`string`,description:`Script tag of the Worker.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get <preview>`,describe:`Get preview`,builder:G,handler:async e=>l({command:`builds previews get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds previews get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/previews/${e.preview==null?`<preview>`:encodeURIComponent(String(e.preview))}`,pathParams:{worker:String(e.worker??``),preview:String(e.preview??``)},bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>t(l,`GET`,`/accounts/${u}/builds/workers/${encodeURIComponent(String(e.worker))}/previews/${encodeURIComponent(String(e.preview))}`));s(d,{successLabel:`Loaded`})})};function q(e){return e.usage(`$0 builds previews list-builds <preview>
|
|
29
|
+
|
|
30
|
+
List the builds of a single Preview with pagination.`).positional(`preview`,{type:`string`,description:`ID of the Preview.`,demandOption:!0}).option(`worker`,{type:`string`,description:`Script tag of the Worker.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`list-builds <preview>`,describe:`List builds by preview`,builder:q,handler:async e=>l({command:`builds previews list-builds`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await i();r({command:`cf builds previews list-builds`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/previews/${e.preview==null?`<preview>`:encodeURIComponent(String(e.preview))}/builds`,pathParams:{worker:String(e.worker??``),preview:String(e.preview??``)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.local?o:await a();e.accountId=d;let f=await c(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/builds/workers/${encodeURIComponent(String(e.worker))}/previews/${encodeURIComponent(String(e.preview))}/builds`,{query:l}));s(f,{successLabel:`Loaded`})})};function oe(e){return e.usage(`$0 builds previews list
|
|
31
|
+
|
|
32
|
+
List the Previews of a Worker with pagination.`).option(`worker`,{type:`string`,description:`Script tag of the Worker.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`list`,describe:`List previews`,builder:oe,handler:async e=>l({command:`builds previews list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await i();r({command:`cf builds previews list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/previews`,pathParams:{worker:String(e.worker??``)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.local?o:await a();e.accountId=d;let f=await c(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/builds/workers/${encodeURIComponent(String(e.worker))}/previews`,{query:l}));s(f,{successLabel:`Loaded`})})};function ce(e){return e.usage(`$0 builds previews update <preview>
|
|
33
|
+
|
|
34
|
+
Update a single Preview of a Worker. Supports partial updates to the tracked branch, the automation flags, and the build settings.`).positional(`preview`,{type:`string`,description:`ID of the Preview.`,demandOption:!0}).option(`worker`,{type:`string`,description:`Script tag of the Worker.`,demandOption:!0}).option(`auto-build`,{type:`boolean`,description:`Whether pushes to the git branch build this Preview. Deploy hooks, manual builds, and retries run regardless of this setting.`}).option(`auto-delete`,{type:`boolean`,description:`Whether deleting the git branch also deletes this Preview.`}).option(`branch`,{type:`string`,description:`Git branch this Preview tracks`}).option(`settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`settings-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": ({...} | null)}.`}).option(`settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a Preview. At least one field must be provided, and omitted fields are left unchanged.`})}const le={command:`update <preview>`,describe:`Update preview`,builder:ce,handler:async e=>l({command:`builds previews update`,classification:{safeFlags:[`auto-build`,`auto-delete`,`settings-build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds previews update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/previews/${e.preview==null?`<preview>`:encodeURIComponent(String(e.preview))}`,pathParams:{worker:String(e.worker??``),preview:String(e.preview??``)},bodyKind:`json`,body:e.body===void 0?h({auto_build:e[`auto-build`],auto_delete:e[`auto-delete`],branch:g(e.branch,`branch`,`text`),settings:{build_caching_enabled:e[`settings-build-caching-enabled`],build_command:g(e[`settings-build-command`],`settings-build-command`,`text`),build_token_uuid:g(e[`settings-build-token-uuid`],`settings-build-token-uuid`,`text`),deploy_command:g(e[`settings-deploy-command`],`settings-deploy-command`,`text`),environment_variables:d(e[`settings-environment-variables`],`settings-environment-variables`),path_excludes:e[`settings-path-excludes`],path_includes:e[`settings-path-includes`],root_directory:g(e[`settings-root-directory`],`settings-root-directory`,`text`)}},[[`settings`,`environment_variables`]]):m(e.body)});return}let l=e.body===void 0?void 0:m(e.body),f=await n(e),p=e.local?o:await a();if(e.accountId=p,e.body!==void 0){let n=l,r=await c(`Updating`,async()=>t(f,`PATCH`,`/accounts/${p}/builds/workers/${encodeURIComponent(String(e.worker))}/previews/${encodeURIComponent(String(e.preview))}`,{body:n}));s(r,{successLabel:`Updated`});return}let _={};e[`auto-build`]!==void 0&&u(_,[`auto_build`],e[`auto-build`]),e[`auto-delete`]!==void 0&&u(_,[`auto_delete`],e[`auto-delete`]),e.branch!==void 0&&u(_,[`branch`],g(e.branch,`branch`,`text`)),e[`settings-build-caching-enabled`]!==void 0&&u(_,[`settings`,`build_caching_enabled`],e[`settings-build-caching-enabled`]),e[`settings-build-command`]!==void 0&&u(_,[`settings`,`build_command`],g(e[`settings-build-command`],`settings-build-command`,`text`)),e[`settings-build-token-uuid`]!==void 0&&u(_,[`settings`,`build_token_uuid`],g(e[`settings-build-token-uuid`],`settings-build-token-uuid`,`text`)),e[`settings-deploy-command`]!==void 0&&u(_,[`settings`,`deploy_command`],g(e[`settings-deploy-command`],`settings-deploy-command`,`text`)),e[`settings-environment-variables`]!==void 0&&u(_,[`settings`,`environment_variables`],d(e[`settings-environment-variables`],`settings-environment-variables`)),e[`settings-path-excludes`]!==void 0&&u(_,[`settings`,`path_excludes`],e[`settings-path-excludes`]),e[`settings-path-includes`]!==void 0&&u(_,[`settings`,`path_includes`],e[`settings-path-includes`]),e[`settings-root-directory`]!==void 0&&u(_,[`settings`,`root_directory`],g(e[`settings-root-directory`],`settings-root-directory`,`text`));let v=await c(`Updating`,async()=>t(f,`PATCH`,`/accounts/${p}/builds/workers/${encodeURIComponent(String(e.worker))}/previews/${encodeURIComponent(String(e.preview))}`,{body:_}));s(v,{successLabel:`Updated`})})},ue={command:`previews`,describe:`Manage the Previews that Workers Builds creates for non-production branches.`,builder:e=>e.command(W).command(K).command(se).command(J).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/repos/${t.provider_type}/${t.provider_account_id}/${t.repo_id}/config_autofill`,query:[`branch`,`root_directory`],errors:{401:`UnauthorizedError`}};function fe(e){return e.usage(`$0 builds repos config-autofill get <repo-id>
|
|
35
|
+
|
|
36
|
+
Analyze repository for automatic configuration detection`).positional(`repo-id`,{type:`string`,description:`Provider-specific repository identifier.`,demandOption:!0}).option(`provider-type`,{type:`string`,description:`SCM provider type`,demandOption:!0}).option(`provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name.`,demandOption:!0}).option(`root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`get <repo-id>`,describe:`Get repository configuration autofill`,builder:fe,handler:async e=>l({command:`builds repos config-autofill get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={branch:e.branch,root_directory:e[`root-directory`]};if(e.dryRun){let n=await i();r({command:`cf builds repos config-autofill get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/builds/repos/${e[`provider-type`]==null?`<provider-type>`:encodeURIComponent(String(e[`provider-type`]))}/${e[`provider-account-id`]==null?`<provider-account-id>`:encodeURIComponent(String(e[`provider-account-id`]))}/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}/config_autofill`,pathParams:{"provider-type":String(e[`provider-type`]??``),"provider-account-id":String(e[`provider-account-id`]??``),"repo-id":String(e[`repo-id`]??``)},query:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(de,{account_id:u,provider_type:e[`provider-type`],provider_account_id:e[`provider-account-id`],repo_id:e[`repo-id`],...t}));s(d,{successLabel:`Loaded`})})},me={command:`config-autofill`,describe:`Operations for repos.config-autofill`,builder:e=>e.command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var he={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/repos/connections/${t.repo_connection_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function ge(e){return e.usage(`$0 builds repos connections delete <repo-connection-uuid>
|
|
37
|
+
|
|
38
|
+
Delete a saved repository connection.`).positional(`repo-connection-uuid`,{type:`string`,description:`Repository connection UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _e={command:`delete <repo-connection-uuid>`,describe:`Delete a repository connection`,builder:ge,handler:async e=>l({command:`builds repos connections delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds repos connections delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/repos/connections/${e[`repo-connection-uuid`]==null?`<repo-connection-uuid>`:encodeURIComponent(String(e[`repo-connection-uuid`]))}`,pathParams:{"repo-connection-uuid":String(e[`repo-connection-uuid`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await y({force:!!e.force,message:`This operation deletes the repository connection.`}))return;let u=await c(`Deleting`,async()=>t.send(he,{account_id:l,repo_connection_uuid:e[`repo-connection-uuid`]}));s(u,{successLabel:`Deleted`})})};var Y={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/repos/connections`,body:`json`,errors:{401:`UnauthorizedError`}};function ve(e){return e.usage(`$0 builds repos connections upsert
|
|
39
|
+
|
|
40
|
+
Save the repository connection required by build triggers.`).option(`provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`}).option(`provider-account-name`,{type:`string`,description:`Human-readable name of the account or namespace that owns the repository.`}).option(`provider-type`,{type:`string`,description:`Source control provider.`,choices:[`github`,`gitlab`,`gitlab_internal`,`origin`]}).coerce(`provider-type`,e=>g(e,`provider-type`,`text`)).option(`repo-id`,{type:`string`,description:`Provider-specific repository identifier.`}).option(`repo-name`,{type:`string`,description:`Human-readable repository name.`}).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:`upsert`,describe:`Create or update a repository connection`,builder:ve,handler:async e=>l({command:`builds repos connections upsert`,classification:{safeFlags:[`provider-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds repos connections upsert`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/repos/connections`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({provider_account_id:g(e[`provider-account-id`],`provider-account-id`,`text`),provider_account_name:g(e[`provider-account-name`],`provider-account-name`,`text`),provider_type:e[`provider-type`],repo_id:g(e[`repo-id`],`repo-id`,`text`),repo_name:g(e[`repo-name`],`repo-name`,`text`)}):m(e.body)});return}let t=e.body===void 0?void 0:m(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=t,n=await c(`Updating`,async()=>l.send(Y,{body:e,account_id:u}));s(n,{successLabel:`Updated`});return}e[`provider-account-id`]===void 0&&(e[`provider-account-id`]=await _(`provider-account-id`,`Provider-specific identifier of the account or namespace that owns the repository.`)),e[`provider-account-name`]===void 0&&(e[`provider-account-name`]=await _(`provider-account-name`,`Human-readable name of the account or namespace that owns the repository.`)),e[`provider-type`]===void 0&&(e[`provider-type`]=await v(`provider-type`,`Source control provider.`,[`github`,`gitlab`,`gitlab_internal`,`origin`])),e[`repo-id`]===void 0&&(e[`repo-id`]=await _(`repo-id`,`Provider-specific repository identifier.`)),e[`repo-name`]===void 0&&(e[`repo-name`]=await _(`repo-name`,`Human-readable repository name.`));let d=h({provider_account_id:g(e[`provider-account-id`],`provider-account-id`,`text`),provider_account_name:g(e[`provider-account-name`],`provider-account-name`,`text`),provider_type:e[`provider-type`],repo_id:g(e[`repo-id`],`repo-id`,`text`),repo_name:g(e[`repo-name`],`repo-name`,`text`)}),f=await c(`Updating`,async()=>l.send(Y,{body:d,account_id:u}));s(f,{successLabel:`Updated`})})},be={command:`connections`,describe:`Operations for repos.connections`,builder:e=>e.command(_e).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`repos`,describe:`Manage source repository connections for Workers Builds.`,builder:e=>e.command(me).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Se(e){return e.usage(`$0 builds retry <build-uuid>
|
|
41
|
+
|
|
42
|
+
Start a new build from the branch and commit of a stopped build.`).positional(`build-uuid`,{type:`string`,description:`UUID of the build, as returned by builds list.`,demandOption:!0}).option(`worker`,{type:`string`,description:`Script tag of the Worker.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ce={command:`retry <build-uuid>`,describe:`Retry a Worker build`,builder:Se,handler:async e=>l({command:`builds retry`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds retry`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/builds/${e[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(e[`build-uuid`]))}/retry`,pathParams:{worker:String(e.worker??``),"build-uuid":String(e[`build-uuid`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/builds/workers/${encodeURIComponent(String(e.worker))}/builds/${encodeURIComponent(String(e[`build-uuid`]))}/retry`));s(d,{successLabel:`Created`})})};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/tokens`,body:`json`,errors:{401:`UnauthorizedError`}};function we(e){return e.usage(`$0 builds tokens create
|
|
43
|
+
|
|
44
|
+
Create a new build authentication token`).option(`build-token-name`,{type:`string`,description:`The build_token_name field`}).option(`build-token-secret`,{type:`string`,description:`The build_token_secret field`}).option(`cloudflare-token-id`,{type:`string`,description:`The cloudflare_token_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Te={command:`create`,describe:`Create build token`,builder:we,handler:async e=>l({command:`builds tokens create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/tokens`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({build_token_name:g(e[`build-token-name`],`build-token-name`,`text`),build_token_secret:g(e[`build-token-secret`],`build-token-secret`,`text`),cloudflare_token_id:g(e[`cloudflare-token-id`],`cloudflare-token-id`,`text`)}):m(e.body)});return}let t=e.body===void 0?void 0:m(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(X,{body:e,account_id:u}));s(n,{successLabel:`Created`});return}e[`build-token-name`]===void 0&&(e[`build-token-name`]=await _(`build-token-name`,`The build_token_name field`)),e[`build-token-secret`]===void 0&&(e[`build-token-secret`]=await _(`build-token-secret`,`The build_token_secret field`)),e[`cloudflare-token-id`]===void 0&&(e[`cloudflare-token-id`]=await _(`cloudflare-token-id`,`The cloudflare_token_id field`));let d=h({build_token_name:g(e[`build-token-name`],`build-token-name`,`text`),build_token_secret:g(e[`build-token-secret`],`build-token-secret`,`text`),cloudflare_token_id:g(e[`cloudflare-token-id`],`cloudflare-token-id`,`text`)}),f=await c(`Creating`,async()=>l.send(X,{body:d,account_id:u}));s(f,{successLabel:`Created`})})};var Ee={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/tokens/${t.build_token_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function De(e){return e.usage(`$0 builds tokens delete <build-token-uuid>
|
|
45
|
+
|
|
46
|
+
Delete a stored build token owned by the current user.`).positional(`build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`,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 Oe={command:`delete <build-token-uuid>`,describe:`Delete a build token`,builder:De,handler:async e=>l({command:`builds tokens delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds tokens delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/tokens/${e[`build-token-uuid`]==null?`<build-token-uuid>`:encodeURIComponent(String(e[`build-token-uuid`]))}`,pathParams:{"build-token-uuid":String(e[`build-token-uuid`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await y({force:!!e.force,message:`This operation deletes the build token. Builds that use it will fail to deploy.`}))return;let u=await c(`Deleting`,async()=>t.send(Ee,{account_id:l,build_token_uuid:e[`build-token-uuid`]}));s(u,{successLabel:`Deleted`})})};var ke={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/tokens`,query:[`page`,`per_page`],errors:{401:`UnauthorizedError`}};function Ae(e){return e.usage(`$0 builds tokens list
|
|
47
|
+
|
|
48
|
+
List metadata for build tokens available to the current user without returning their secrets.`).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`list`,describe:`List build tokens`,builder:Ae,handler:async e=>l({command:`builds tokens list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();r({command:`cf builds tokens list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/tokens`,pathParams:{},query:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ke,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})},Me={command:`tokens`,describe:`Manage credentials used by Workers Builds to deploy Workers.`,builder:e=>e.command(Te).command(Oe).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ne={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds`,query:[`version_ids`],errors:{401:`UnauthorizedError`}};function Pe(e){return e.usage(`$0 builds versions get
|
|
49
|
+
|
|
50
|
+
Retrieve builds associated with one or more Worker version IDs.`).option(`version-ids`,{type:`string`,description:`Comma-separated list of version UUIDs (max 20).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fe={command:`get`,describe:`Get builds by Worker version`,builder:Pe,handler:async e=>l({command:`builds versions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={version_ids:e[`version-ids`]};if(e.dryRun){let e=await i();r({command:`cf builds versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/builds`,pathParams:{},query:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ne,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})},Ie={command:`versions`,describe:`Find builds associated with Worker versions.`,builder:e=>e.command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/workers`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function Le(e){return e.usage(`$0 builds workers create <script-tag>
|
|
51
|
+
|
|
52
|
+
Connect a Worker tag to a repository and production build settings.`).positional(`script-tag`,{type:`string`,description:`Script tag of the Worker.`,demandOption:!0}).option(`git-repository-branch`,{type:`string`,description:`Git branch to watch for builds`}).option(`git-repository-provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`}).option(`git-repository-provider-account-name`,{type:`string`,description:`Human-readable name of the account or namespace that owns the repository.`}).option(`git-repository-provider-type`,{type:`string`,description:`The git_repository.provider_type field`,choices:[`github`,`gitlab`,`gitlab_internal`,`origin`]}).coerce(`git-repository-provider-type`,e=>g(e,`git-repository-provider-type`,`text`)).option(`git-repository-repo-id`,{type:`string`,description:`Provider-specific repository identifier.`}).option(`git-repository-repo-name`,{type:`string`,description:`Human-readable repository name.`}).option(`git-repository-grant-id`,{type:`string`,description:`Grant ID required for grant-backed providers`}).option(`previews-base-config-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`,default:!0}).option(`previews-base-config-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`previews-base-config-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`previews-base-config-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`previews-base-config-environment-variables`,{type:`string`,description:`Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": {...}}.`}).option(`previews-base-config-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`previews-base-config-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`previews-base-config-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`,default:`/`}).option(`previews-enabled`,{type:`boolean`,description:`Whether Previews are enabled for this Worker`}).option(`production-settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`,default:!0}).option(`production-settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`production-settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`production-settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`production-settings-environment-variables`,{type:`string`,description:`Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": {...}}.`}).option(`production-settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`production-settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`production-settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`,default:`/`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating a Worker build configuration.`})}const Q=[{path:[`git_repository`],selector:`provider_type`,variants:[{values:[`github`,`gitlab`],schema:{type:`object`,properties:{branch:{type:`string`},provider_account_id:{type:`string`},provider_account_name:{type:`string`},provider_type:{enum:[`github`,`gitlab`]},repo_id:{type:`string`},repo_name:{type:`string`}},required:[`branch`,`provider_account_id`,`provider_account_name`,`provider_type`,`repo_id`,`repo_name`],additionalProperties:!1}},{values:[`gitlab_internal`,`origin`],schema:{type:`object`,properties:{branch:{type:`string`},grant_id:{type:`string`},provider_account_id:{type:`string`},provider_account_name:{type:`string`},provider_type:{enum:[`gitlab_internal`,`origin`]},repo_id:{type:`string`},repo_name:{type:`string`}},required:[`branch`,`grant_id`,`provider_account_id`,`provider_account_name`,`provider_type`,`repo_id`,`repo_name`],additionalProperties:!1}}]}],Re={command:`create <script-tag>`,describe:`Create Worker build configuration`,builder:Le,handler:async e=>l({command:`builds workers create`,classification:{safeFlags:[`git-repository-provider-type`,`previews-base-config-build-caching-enabled`,`previews-enabled`,`production-settings-build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds workers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?b(h({git_repository:{branch:g(e[`git-repository-branch`],`git-repository-branch`,`text`),provider_account_id:g(e[`git-repository-provider-account-id`],`git-repository-provider-account-id`,`text`),provider_account_name:g(e[`git-repository-provider-account-name`],`git-repository-provider-account-name`,`text`),provider_type:e[`git-repository-provider-type`],repo_id:g(e[`git-repository-repo-id`],`git-repository-repo-id`,`text`),repo_name:g(e[`git-repository-repo-name`],`git-repository-repo-name`,`text`),grant_id:g(e[`git-repository-grant-id`],`git-repository-grant-id`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:g(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:g(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:g(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:g(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:g(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:g(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:g(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:g(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)},script_tag:e[`script-tag`]},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]),Q):f(m(e.body),[{name:`script-tag`,field:`script_tag`,value:e[`script-tag`]}])});return}let t=e.body===void 0?void 0:f(m(e.body),[{name:`script-tag`,field:`script_tag`,value:e[`script-tag`]}]),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(Z,{body:e,account_id:u}));s(n,{successLabel:`Created`});return}if(e[`git-repository-branch`]===void 0&&(e[`git-repository-branch`]=await _(`git-repository-branch`,`Git branch to watch for builds`)),e[`git-repository-provider-account-id`]===void 0&&(e[`git-repository-provider-account-id`]=await _(`git-repository-provider-account-id`,`Provider-specific identifier of the account or namespace that owns the repository.`)),e[`git-repository-provider-account-name`]===void 0&&(e[`git-repository-provider-account-name`]=await _(`git-repository-provider-account-name`,`Human-readable name of the account or namespace that owns the repository.`)),e[`git-repository-provider-type`]===void 0&&(e[`git-repository-provider-type`]=await v(`git-repository-provider-type`,`The git_repository.provider_type field`,[`github`,`gitlab`,`gitlab_internal`,`origin`])),e[`git-repository-repo-id`]===void 0&&(e[`git-repository-repo-id`]=await _(`git-repository-repo-id`,`Provider-specific repository identifier.`)),e[`git-repository-repo-name`]===void 0&&(e[`git-repository-repo-name`]=await _(`git-repository-repo-name`,`Human-readable repository name.`)),e[`previews-base-config-build-command`]===void 0&&(e[`previews-base-config-build-command`]=await _(`previews-base-config-build-command`,`Command to build the Worker.`)),e[`previews-base-config-build-token-uuid`]===void 0&&(e[`previews-base-config-build-token-uuid`]=await _(`previews-base-config-build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`previews-base-config-deploy-command`]===void 0&&(e[`previews-base-config-deploy-command`]=await _(`previews-base-config-deploy-command`,`Command to deploy the Worker.`)),e[`previews-enabled`]===void 0)throw Error(`--previews-enabled is required (or pass --body with this field set).`);e[`production-settings-build-command`]===void 0&&(e[`production-settings-build-command`]=await _(`production-settings-build-command`,`Command to build the Worker.`)),e[`production-settings-build-token-uuid`]===void 0&&(e[`production-settings-build-token-uuid`]=await _(`production-settings-build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`production-settings-deploy-command`]===void 0&&(e[`production-settings-deploy-command`]=await _(`production-settings-deploy-command`,`Command to deploy the Worker.`));let p=h({git_repository:{branch:g(e[`git-repository-branch`],`git-repository-branch`,`text`),provider_account_id:g(e[`git-repository-provider-account-id`],`git-repository-provider-account-id`,`text`),provider_account_name:g(e[`git-repository-provider-account-name`],`git-repository-provider-account-name`,`text`),provider_type:e[`git-repository-provider-type`],repo_id:g(e[`git-repository-repo-id`],`git-repository-repo-id`,`text`),repo_name:g(e[`git-repository-repo-name`],`git-repository-repo-name`,`text`),grant_id:g(e[`git-repository-grant-id`],`git-repository-grant-id`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:g(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:g(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:g(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:g(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:g(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:g(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:g(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:g(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)},script_tag:e[`script-tag`]},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]);b(p,Q);let y=await c(`Creating`,async()=>l.send(Z,{body:p,account_id:u}));s(y,{successLabel:`Created`})})};function ze(e){return e.usage(`$0 builds workers delete <worker>
|
|
53
|
+
|
|
54
|
+
Delete build settings and triggers for a Worker tag and cancel unfinished builds. The Worker is not deleted.`).positional(`worker`,{type:`string`,description:`Script tag of the Worker.`,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 Be={command:`delete <worker>`,describe:`Delete Worker build configuration`,builder:ze,handler:async e=>l({command:`builds workers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds workers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}`,pathParams:{worker:String(e.worker??``)},bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();if(e.accountId=u,!await y({force:!!e.force,message:`This operation deletes the Worker build configuration and its triggers, and cancels unfinished builds. The Worker is not deleted.`}))return;let d=await c(`Deleting`,async()=>t(l,`DELETE`,`/accounts/${u}/builds/workers/${encodeURIComponent(String(e.worker))}`));s(d,{successLabel:`Deleted`})})};function Ve(e){return e.usage(`$0 builds workers get <worker>
|
|
55
|
+
|
|
56
|
+
Retrieve the repository and production build settings associated with a Worker tag.`).positional(`worker`,{type:`string`,description:`Script tag of the Worker.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $={command:`get <worker>`,describe:`Get Worker build configuration`,builder:Ve,handler:async e=>l({command:`builds workers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds workers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}`,pathParams:{worker:String(e.worker??``)},bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>t(l,`GET`,`/accounts/${u}/builds/workers/${encodeURIComponent(String(e.worker))}`));s(d,{successLabel:`Loaded`})})};function He(e){return e.usage(`$0 builds workers migrate-to-previews <worker>
|
|
57
|
+
|
|
58
|
+
Migrate a Worker's legacy non-production trigger to Previews. The legacy build settings become the Previews base config and the legacy trigger is removed.`).positional(`worker`,{type:`string`,description:`Script tag of the Worker.`,demandOption:!0}).option(`deploy-command`,{type:`string`,description:`Deploy command for the migrated Preview settings. Omit it to have the existing 'wrangler versions upload' command rewritten to 'wrangler preview' automatically, which fails with 400 when the existing command cannot be rewritten.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Request body for migrating a Worker's legacy non-production trigger to Previews.`})}const Ue={command:`migrate-to-previews <worker>`,describe:`Migrate worker to previews`,builder:He,handler:async e=>l({command:`builds workers migrate-to-previews`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds workers migrate-to-previews`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/migrate_to_previews`,pathParams:{worker:String(e.worker??``)},bodyKind:`json`,body:e.body===void 0?h({deploy_command:g(e[`deploy-command`],`deploy-command`,`text`)}):m(e.body)});return}let l=e.body===void 0?void 0:m(e.body),d=await n(e),f=e.local?o:await a();if(e.accountId=f,!await y({force:!!e.force,message:`This operation switches the Worker to Previews and removes its legacy non-production trigger. It cannot be reversed.`}))return;if(e.body!==void 0){let n=l,r=await c(`Processing`,async()=>t(d,`POST`,`/accounts/${f}/builds/workers/${encodeURIComponent(String(e.worker))}/migrate_to_previews`,{body:n}));s(r,{successLabel:`Done`});return}let p={};e[`deploy-command`]!==void 0&&u(p,[`deploy_command`],g(e[`deploy-command`],`deploy-command`,`text`));let _=await c(`Processing`,async()=>t(d,`POST`,`/accounts/${f}/builds/workers/${encodeURIComponent(String(e.worker))}/migrate_to_previews`,{body:p}));s(_,{successLabel:`Done`})})};function We(e){return e.usage(`$0 builds workers purge-cache <worker>
|
|
59
|
+
|
|
60
|
+
Delete cached dependencies and build artifacts for a Worker's production and Preview builds.`).positional(`worker`,{type:`string`,description:`Script tag of the Worker.`,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 Ge={command:`purge-cache <worker>`,describe:`Purge a Worker's build cache`,builder:We,handler:async e=>l({command:`builds workers purge-cache`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf builds workers purge-cache`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/purge_build_cache`,pathParams:{worker:String(e.worker??``)},bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();if(e.accountId=u,!await y({force:!!e.force,message:`This operation purges the build cache for the Worker.`}))return;let d=await c(`Processing`,async()=>t(l,`POST`,`/accounts/${u}/builds/workers/${encodeURIComponent(String(e.worker))}/purge_build_cache`));s(d,{successLabel:`Done`})})};function Ke(e){return e.usage(`$0 builds workers update <worker>
|
|
61
|
+
|
|
62
|
+
Update the build configuration for a Worker script. Supports partial updates to git repository settings, production build settings, and Preview settings.`).positional(`worker`,{type:`string`,description:`Script tag of the Worker.`,demandOption:!0}).option(`patch-existing-previews`,{type:`string`,description:`Apply a previews_base_config patch to every existing Preview of the Worker as well as to the base config.`,choices:[`true`,`false`]}).option(`git-repository-branch`,{type:`string`,description:`New git branch to watch for builds`}).option(`previews-base-config-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`previews-base-config-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`previews-base-config-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`previews-base-config-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`previews-base-config-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": ({...} | null)}.`}).option(`previews-base-config-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`previews-base-config-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`previews-base-config-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`previews-enabled`,{type:`boolean`,description:`Enable or disable Previews for this Worker. Enabling requires previews_base_config to already exist or to be sent in the same request.`}).option(`production-settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`production-settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`production-settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`production-settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`production-settings-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": ({...} | null)}.`}).option(`production-settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`production-settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`production-settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a Worker build configuration. At least one field must be provided.`})}const qe={command:`update <worker>`,describe:`Update Worker build configuration`,builder:Ke,handler:async e=>l({command:`builds workers update`,classification:{safeFlags:[`patch-existing-previews`,`previews-base-config-build-caching-enabled`,`previews-enabled`,`production-settings-build-caching-enabled`,`dry-run`]}},e,async()=>{let l={patch_existing_previews:e[`patch-existing-previews`]};if(e.dryRun){let t=await i();r({command:`cf builds workers update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}`,pathParams:{worker:String(e.worker??``)},query:l,bodyKind:`json`,body:e.body===void 0?h({git_repository:{branch:g(e[`git-repository-branch`],`git-repository-branch`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:g(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:g(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:g(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:g(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:g(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:g(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:g(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:g(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)}},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]):m(e.body)});return}let f=e.body===void 0?void 0:m(e.body),p=await n(e),_=e.local?o:await a();if(e.accountId=_,e.body!==void 0){let n=f,r=new URLSearchParams(Object.entries(l).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),i=await c(`Updating`,async()=>t(p,`PATCH`,`/accounts/${_}/builds/workers/${encodeURIComponent(String(e.worker))}${r?`?`+r:``}`,{body:n}));s(i,{successLabel:`Updated`});return}let v={};e[`git-repository-branch`]!==void 0&&u(v,[`git_repository`,`branch`],g(e[`git-repository-branch`],`git-repository-branch`,`text`)),e[`previews-base-config-build-caching-enabled`]!==void 0&&u(v,[`previews_base_config`,`build_caching_enabled`],e[`previews-base-config-build-caching-enabled`]),e[`previews-base-config-build-command`]!==void 0&&u(v,[`previews_base_config`,`build_command`],g(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`)),e[`previews-base-config-build-token-uuid`]!==void 0&&u(v,[`previews_base_config`,`build_token_uuid`],g(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`)),e[`previews-base-config-deploy-command`]!==void 0&&u(v,[`previews_base_config`,`deploy_command`],g(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`)),e[`previews-base-config-environment-variables`]!==void 0&&u(v,[`previews_base_config`,`environment_variables`],d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`)),e[`previews-base-config-path-excludes`]!==void 0&&u(v,[`previews_base_config`,`path_excludes`],e[`previews-base-config-path-excludes`]),e[`previews-base-config-path-includes`]!==void 0&&u(v,[`previews_base_config`,`path_includes`],e[`previews-base-config-path-includes`]),e[`previews-base-config-root-directory`]!==void 0&&u(v,[`previews_base_config`,`root_directory`],g(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)),e[`previews-enabled`]!==void 0&&u(v,[`previews_enabled`],e[`previews-enabled`]),e[`production-settings-build-caching-enabled`]!==void 0&&u(v,[`production_settings`,`build_caching_enabled`],e[`production-settings-build-caching-enabled`]),e[`production-settings-build-command`]!==void 0&&u(v,[`production_settings`,`build_command`],g(e[`production-settings-build-command`],`production-settings-build-command`,`text`)),e[`production-settings-build-token-uuid`]!==void 0&&u(v,[`production_settings`,`build_token_uuid`],g(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`)),e[`production-settings-deploy-command`]!==void 0&&u(v,[`production_settings`,`deploy_command`],g(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`)),e[`production-settings-environment-variables`]!==void 0&&u(v,[`production_settings`,`environment_variables`],d(e[`production-settings-environment-variables`],`production-settings-environment-variables`)),e[`production-settings-path-excludes`]!==void 0&&u(v,[`production_settings`,`path_excludes`],e[`production-settings-path-excludes`]),e[`production-settings-path-includes`]!==void 0&&u(v,[`production_settings`,`path_includes`],e[`production-settings-path-includes`]),e[`production-settings-root-directory`]!==void 0&&u(v,[`production_settings`,`root_directory`],g(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`));let y=new URLSearchParams(Object.entries(l).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),b=await c(`Updating`,async()=>t(p,`PATCH`,`/accounts/${_}/builds/workers/${encodeURIComponent(String(e.worker))}${y?`?`+y:``}`,{body:v}));s(b,{successLabel:`Updated`})})},Je={command:`workers`,describe:`Manage repository-backed build configuration for Workers.`,builder:e=>e.command(Re).command(Be).command($).command(Ue).command(Ge).command(qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ye={command:`builds`,describe:`Build and deploy Workers from connected repositories, then inspect build status and logs.`,builder:e=>e.command(ne).command(ie).command(N).command(z).command(H).command(Ce).command(A).command(L).command(ue).command(xe).command(Me).command(Ie).command(Je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ye as default};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-B-h0BHg7.mjs";import{i as r}from"./context-BY1Eh_Qe.mjs";import{t as i}from"./output-BZQEl3mK.mjs";import{t as a}from"./dry-run-kJbjn4kG.mjs";import{t as o}from"./progress-yvPscjYg.mjs";import{t as s}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as c,t as l}from"./body-parser-DoewLePl.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-CEpZ-lQZ.mjs";var m={method:`POST`,path:t=>e`/zones/${t.zone_id}/environments/${t.environment_id}/invalidate_cache`,body:`json`};function h(e){return e.usage("$0 cache invalidate-environment <environment-id>\n\nMarks cached content as stale for one environment of the zone. Content cached for the zone's other environments, including production, is not affected. Otherwise this works like `POST /zones/{zone_id}/invalidate_cache`: the next request for invalidated content makes Cloudflare revalidate it with your origin, and the request body takes the same fields. Environments are part of [Version Management](https://developers.cloudflare.com/version-management/). To delete the content instead, use `POST /zones/{zone_id}/environments/{environment_id}/purge_cache`. Invalidating by URL (`files`) does not work for environments that select requests by IP address, country, ASN, or threat score, and fails with error `1136`. Use `tags`, `hosts`, `prefixes`, or `purge_everything` for those environments. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").positional(`environment-id`,{type:`string`,description:`The environment ID, from Version Management.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`invalidate-environment <environment-id>`,describe:`Invalidate Cached Content by Environment`,builder:h,handler:async e=>s({command:`cache invalidate-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache invalidate-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/environments/${e[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(e[`environment-id`]))}/invalidate_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"environment-id":String(e[`environment-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=e.body===void 0?void 0:c(e.body),l=await n(e),u=await r({zone:e.zone},l,{quiet:e.quiet});if(e.zoneId=u,!await p({force:!!e.force,message:`This operation marks the selected content in the environment's cache as stale.`}))return;if(e.body!==void 0){let t=s,n=await o(`Processing`,async()=>l.send(m,{body:t,zone_id:u,environment_id:e[`environment-id`]}));i(n,{successLabel:`Done`});return}let d=await o(`Processing`,async()=>t(l,`POST`,`/zones/${e.zoneId}/environments/${encodeURIComponent(String(e[`environment-id`]))}/invalidate_cache`));i(d,{successLabel:`Done`})})};var _={method:`POST`,path:t=>e`/zones/${t.zone_id}/invalidate_cache`,body:`json`};function ee(e){return e.usage("$0 cache invalidate\n\nMarks cached content as stale in every Cloudflare data center and cache tier, including Cache Reserve. The content stays in cache. The next request for it makes Cloudflare revalidate it with your origin, using the `ETag` and `Last-Modified` values it was cached with: - If your origin answers `304 Not Modified`, Cloudflare serves the cached copy without downloading it again, and `CF-Cache-Status` is `REVALIDATED`. - If your origin sends a full response, Cloudflare serves and caches the new content, and `CF-Cache-Status` is `EXPIRED`. With Tiered Cache, each tier revalidates with the tier above it, so a visitor can see `EXPIRED` even when your origin answered `304`. Until content is revalidated, your `stale-while-revalidate` and `stale-if-error` directives still apply, counted from the time you invalidated it. For example, if your origin fails during revalidation, Cloudflare can keep serving the stale copy for the `stale-if-error` window. ### Invalidate or purge? - **Invalidate** when content may not have changed, for example after a deploy. Unchanged content costs your origin a `304` instead of a full response. That saving needs an origin that sends `ETag` or `Last-Modified` and answers conditional requests. Otherwise, every revalidation downloads the full response. - **Purge**, with `POST /zones/{zone_id}/purge_cache`, when content must not be served again, for example content you removed for legal or security reasons. Invalidating takes the same request bodies as purging, needs the same permission, and counts against the same rate limits. After a broad invalidation, such as `purge_everything`, expect more conditional requests to your origin while visitors request the invalidated content again. ### Choose what to invalidate Send one of these fields in the request body: - `files`: specific URLs. If your cache key includes request headers, send each URL with the header values it was cached with. - `tags`: all content whose `Cache-Tag` response header contains one of the tags. - `hosts`: all content cached for the hostnames. - `prefixes`: all content whose URL starts with one of the prefixes. - `purge_everything`: all cached content in the zone. ### Check the result A `200` response with `success: true` means Cloudflare accepted the request. To check, request an invalidated URL and confirm that the `CF-Cache-Status` response header is `REVALIDATED` or `EXPIRED`. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`invalidate`,describe:`Invalidate Cached Content`,builder:ee,handler:async e=>s({command:`cache invalidate`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache invalidate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/invalidate_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=e.body===void 0?void 0:c(e.body),l=await n(e),u=await r({zone:e.zone},l,{quiet:e.quiet});if(e.zoneId=u,!await p({force:!!e.force,message:`This operation marks the selected content in the zone's cache as stale.`}))return;if(e.body!==void 0){let e=s,t=await o(`Processing`,async()=>l.send(_,{body:e,zone_id:u}));i(t,{successLabel:`Done`});return}let d=await o(`Processing`,async()=>t(l,`POST`,`/zones/${e.zoneId}/invalidate_cache`));i(d,{successLabel:`Done`})})};var ne={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/batch`,body:`json`};function re(e){return e.usage("$0 cache origin-cloud-regions bulk delete\n\nRemoves up to 100 IP-to-cloud-region mappings in a single request. Each IP is validated independently — successfully deleted items are returned in the `succeeded` array and IPs that could not be found or are invalid are returned in the `failed` array.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`delete`,describe:`Batch delete origin cloud region mappings`,builder:re,handler:async e=>s({command:`cache origin-cloud-regions bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions bulk delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body,[],100)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let t=e.body===void 0?void 0:c(e.body,[],100),s=await n(e),l=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,await p({force:!!e.force,message:`Are you sure you want to delete these Origin Cloud Region configurations?`})&&e.body!==void 0){let e=t,n=await o(`Deleting`,async()=>s.send(ne,{body:e,zone_id:l}));i(n,{successLabel:`Deleted`})}})};var ae={method:`PUT`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/batch`,body:`json`};function v(e){return e.usage("$0 cache origin-cloud-regions bulk update\n\nUpserts up to 100 IP-to-cloud-region mappings in a single request. Items in the request body are created or replaced; mappings not included in the request body are preserved unchanged (this is a merge operation, not a full collection replacement). Each item is validated independently — valid items are applied and invalid items are returned in the `failed` array. The vendor and region for every item are validated against the list from `GET /zones/{zone_id}/origin/cloud_regions/supported_regions`.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`update`,describe:`Batch create or replace origin cloud region mappings`,builder:v,handler:async e=>s({command:`cache origin-cloud-regions bulk update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body,[],100)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let t=e.body===void 0?void 0:c(e.body,[],100),s=await n(e),l=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,e.body!==void 0){let e=t,n=await o(`Updating`,async()=>s.send(ae,{body:e,zone_id:l}));i(n,{successLabel:`Updated`})}})},b={command:`bulk`,describe:`Operations for origin-cloud-regions.bulk`,builder:e=>e.command(ie).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`};function S(e){return e.usage(`$0 cache origin-cloud-regions delete <origin-ip>
|
|
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}from"./context-BGm5_wTT.mjs";import{r as i,t as a}from"./body-parser-HN91kAf0.mjs";import{t as o}from"./dry-run-qsnRlRk6.mjs";import{t as s}from"./output-hFMAotFl.mjs";import{t as c}from"./run-CXWkMU3x.mjs";import{t as l}from"./progress-DE_G09u2.mjs";import{a as u,i as d,n as f}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";var m={method:`POST`,path:t=>e`/zones/${t.zone_id}/environments/${t.environment_id}/invalidate_cache`,body:`json`};function h(e){return e.usage("$0 cache invalidate-environment <environment-id>\n\nMarks cached content as stale for one environment of the zone. Content cached for the zone's other environments, including production, is not affected. Otherwise this works like `POST /zones/{zone_id}/invalidate_cache`: the next request for invalidated content makes Cloudflare revalidate it with your origin, and the request body takes the same fields. Environments are part of [Version Management](https://developers.cloudflare.com/version-management/). To delete the content instead, use `POST /zones/{zone_id}/environments/{environment_id}/purge_cache`. Invalidating by URL (`files`) does not work for environments that select requests by IP address, country, ASN, or threat score, and fails with error `1136`. Use `tags`, `hosts`, `prefixes`, or `purge_everything` for those environments. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").positional(`environment-id`,{type:`string`,description:`The environment ID, from Version Management.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`invalidate-environment <environment-id>`,describe:`Invalidate Cached Content by Environment`,builder:h,handler:async e=>c({command:`cache invalidate-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf cache invalidate-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/environments/${e[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(e[`environment-id`]))}/invalidate_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"environment-id":String(e[`environment-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:i(e.body)});return}let a=e.body===void 0?void 0:i(e.body),c=await n(e),u=await r({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,!await f({force:!!e.force,message:`This operation marks the selected content in the environment's cache as stale.`}))return;if(e.body!==void 0){let t=a,n=await l(`Processing`,async()=>c.send(m,{body:t,zone_id:u,environment_id:e[`environment-id`]}));s(n,{successLabel:`Done`});return}let d=await l(`Processing`,async()=>t(c,`POST`,`/zones/${e.zoneId}/environments/${encodeURIComponent(String(e[`environment-id`]))}/invalidate_cache`));s(d,{successLabel:`Done`})})};var _={method:`POST`,path:t=>e`/zones/${t.zone_id}/invalidate_cache`,body:`json`};function ee(e){return e.usage("$0 cache invalidate\n\nMarks cached content as stale in every Cloudflare data center and cache tier, including Cache Reserve. The content stays in cache. The next request for it makes Cloudflare revalidate it with your origin, using the `ETag` and `Last-Modified` values it was cached with: - If your origin answers `304 Not Modified`, Cloudflare serves the cached copy without downloading it again, and `CF-Cache-Status` is `REVALIDATED`. - If your origin sends a full response, Cloudflare serves and caches the new content, and `CF-Cache-Status` is `EXPIRED`. With Tiered Cache, each tier revalidates with the tier above it, so a visitor can see `EXPIRED` even when your origin answered `304`. Until content is revalidated, your `stale-while-revalidate` and `stale-if-error` directives still apply, counted from the time you invalidated it. For example, if your origin fails during revalidation, Cloudflare can keep serving the stale copy for the `stale-if-error` window. ### Invalidate or purge? - **Invalidate** when content may not have changed, for example after a deploy. Unchanged content costs your origin a `304` instead of a full response. That saving needs an origin that sends `ETag` or `Last-Modified` and answers conditional requests. Otherwise, every revalidation downloads the full response. - **Purge**, with `POST /zones/{zone_id}/purge_cache`, when content must not be served again, for example content you removed for legal or security reasons. Invalidating takes the same request bodies as purging, needs the same permission, and counts against the same rate limits. After a broad invalidation, such as `purge_everything`, expect more conditional requests to your origin while visitors request the invalidated content again. ### Choose what to invalidate Send one of these fields in the request body: - `files`: specific URLs. If your cache key includes request headers, send each URL with the header values it was cached with. - `tags`: all content whose `Cache-Tag` response header contains one of the tags. - `hosts`: all content cached for the hostnames. - `prefixes`: all content whose URL starts with one of the prefixes. - `purge_everything`: all cached content in the zone. ### Check the result A `200` response with `success: true` means Cloudflare accepted the request. To check, request an invalidated URL and confirm that the `CF-Cache-Status` response header is `REVALIDATED` or `EXPIRED`. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`invalidate`,describe:`Invalidate Cached Content`,builder:ee,handler:async e=>c({command:`cache invalidate`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf cache invalidate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/invalidate_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:i(e.body)});return}let a=e.body===void 0?void 0:i(e.body),c=await n(e),u=await r({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,!await f({force:!!e.force,message:`This operation marks the selected content in the zone's cache as stale.`}))return;if(e.body!==void 0){let e=a,t=await l(`Processing`,async()=>c.send(_,{body:e,zone_id:u}));s(t,{successLabel:`Done`});return}let d=await l(`Processing`,async()=>t(c,`POST`,`/zones/${e.zoneId}/invalidate_cache`));s(d,{successLabel:`Done`})})};var ne={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/batch`,body:`json`};function re(e){return e.usage("$0 cache origin-cloud-regions bulk delete\n\nRemoves up to 100 IP-to-cloud-region mappings in a single request. Each IP is validated independently — successfully deleted items are returned in the `succeeded` array and IPs that could not be found or are invalid are returned in the `failed` array.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`delete`,describe:`Batch delete origin cloud region mappings`,builder:re,handler:async e=>c({command:`cache origin-cloud-regions bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf cache origin-cloud-regions bulk delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:i(e.body,[],100)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let t=e.body===void 0?void 0:i(e.body,[],100),a=await n(e),c=await r({zone:e.zone},a,{quiet:e.quiet});if(e.zoneId=c,await f({force:!!e.force,message:`Are you sure you want to delete these Origin Cloud Region configurations?`})&&e.body!==void 0){let e=t,n=await l(`Deleting`,async()=>a.send(ne,{body:e,zone_id:c}));s(n,{successLabel:`Deleted`})}})};var ae={method:`PUT`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/batch`,body:`json`};function v(e){return e.usage("$0 cache origin-cloud-regions bulk update\n\nUpserts up to 100 IP-to-cloud-region mappings in a single request. Items in the request body are created or replaced; mappings not included in the request body are preserved unchanged (this is a merge operation, not a full collection replacement). Each item is validated independently — valid items are applied and invalid items are returned in the `failed` array. The vendor and region for every item are validated against the list from `GET /zones/{zone_id}/origin/cloud_regions/supported_regions`.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`update`,describe:`Batch create or replace origin cloud region mappings`,builder:v,handler:async e=>c({command:`cache origin-cloud-regions bulk update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf cache origin-cloud-regions bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:i(e.body,[],100)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let t=e.body===void 0?void 0:i(e.body,[],100),a=await n(e),c=await r({zone:e.zone},a,{quiet:e.quiet});if(e.zoneId=c,e.body!==void 0){let e=t,n=await l(`Updating`,async()=>a.send(ae,{body:e,zone_id:c}));s(n,{successLabel:`Updated`})}})},b={command:`bulk`,describe:`Operations for origin-cloud-regions.bulk`,builder:e=>e.command(ie).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`};function S(e){return e.usage(`$0 cache origin-cloud-regions delete <origin-ip>
|
|
3
3
|
|
|
4
|
-
Removes the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup. Returns the deleted IP on success. Returns 404 if no mapping exists for the specified IP. When the last mapping for the zone is removed the underlying rule record is also deleted.`).positional(`origin-ip`,{type:`string`,description:`Origin IP address whose mapping should be deleted.`,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 <origin-ip>`,describe:`Delete an origin cloud region mapping`,builder:S,handler:async e=>
|
|
4
|
+
Removes the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup. Returns the deleted IP on success. Returns 404 if no mapping exists for the specified IP. When the last mapping for the zone is removed the underlying rule record is also deleted.`).positional(`origin-ip`,{type:`string`,description:`Origin IP address whose mapping should be deleted.`,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 <origin-ip>`,describe:`Delete an origin cloud region mapping`,builder:S,handler:async e=>c({command:`cache origin-cloud-regions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf cache origin-cloud-regions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/${e[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(e[`origin-ip`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"origin-ip":String(e[`origin-ip`]??``)},bodyKind:`none`});return}let t=await n(e),i=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=i,!await f({force:!!e.force,message:`Are you sure you want to delete this Origin Cloud Region configuration?`}))return;let a=await l(`Deleting`,async()=>t.send(x,{zone_id:i,origin_ip:e[`origin-ip`]}));s(a,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`};function T(e){return e.usage(`$0 cache origin-cloud-regions get <origin-ip>
|
|
5
5
|
|
|
6
|
-
Returns the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup (RFC 5952 for IPv6). Returns 404 if the zone has no mappings or if the specified IP has no mapping.`).positional(`origin-ip`,{type:`string`,description:`Origin IP address to look up. IPv4 and IPv6 are supported.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <origin-ip>`,describe:`Get an origin cloud region mapping`,builder:T,handler:async e=>
|
|
6
|
+
Returns the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup (RFC 5952 for IPv6). Returns 404 if the zone has no mappings or if the specified IP has no mapping.`).positional(`origin-ip`,{type:`string`,description:`Origin IP address to look up. IPv4 and IPv6 are supported.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <origin-ip>`,describe:`Get an origin cloud region mapping`,builder:T,handler:async e=>c({command:`cache origin-cloud-regions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf cache origin-cloud-regions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/${e[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(e[`origin-ip`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"origin-ip":String(e[`origin-ip`]??``)},bodyKind:`none`});return}let t=await n(e),i=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=i;let a=await l(`Loading`,async()=>t.send(w,{zone_id:i,origin_ip:e[`origin-ip`]}));s(a,{successLabel:`Loaded`})})};var D={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions`,query:[`page`,`per_page`]};function O(e){return e.usage(`$0 cache origin-cloud-regions list
|
|
7
7
|
|
|
8
|
-
Returns all IP-to-cloud-region mappings configured for the zone with pagination support. Each mapping tells Cloudflare which cloud vendor and region hosts the origin at that IP, enabling the edge to route via the nearest Tiered Cache upper-tier co-located with that cloud provider. Returns an empty array when no mappings exist.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List origin cloud region mappings`,builder:O,handler:async e=>
|
|
8
|
+
Returns all IP-to-cloud-region mappings configured for the zone with pagination support. Each mapping tells Cloudflare which cloud vendor and region hosts the origin at that IP, enabling the edge to route via the nearest Tiered Cache upper-tier co-located with that cloud provider. Returns an empty array when no mappings exist.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List origin cloud region mappings`,builder:O,handler:async e=>c({command:`cache origin-cloud-regions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){o({command:`cf cache origin-cloud-regions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let i=await n(e),a=await r({zone:e.zone},i,{quiet:e.quiet});e.zoneId=a;let c=await l(`Loading`,async()=>i.send(D,{zone_id:a,...t}));s(c,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/supported_regions`};function j(e){return e.usage(`$0 cache origin-cloud-regions regions list-supported
|
|
9
9
|
|
|
10
|
-
Returns the cloud vendors and regions that are valid values for origin cloud region mappings. Each region includes the Tiered Cache upper-tier colocation codes that will be used for cache routing when a mapping targeting that region is active. Requires the zone to have Tiered Cache enabled.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list-supported`,describe:`List supported cloud vendors and regions`,builder:j,handler:async e=>s({command:`cache origin-cloud-regions regions list-supported`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions regions list-supported`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/supported_regions`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=s;let c=await o(`Loading`,async()=>t.send(A,{zone_id:s}));i(c,{successLabel:`Loaded`})})},N={command:`regions`,describe:`Operations for origin-cloud-regions.regions`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`PUT`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`,body:`json`};function F(e){return e.usage("$0 cache origin-cloud-regions update <origin-ip>\n\nCreates a new IP-to-cloud-region mapping or replaces the existing mapping for the specified IP. PUT is idempotent — calling it repeatedly with the same body produces the same result. The IP path parameter is normalized to canonical form (RFC 5952 for IPv6) before storage. The vendor and region are validated against the list from `GET /zones/{zone_id}/origin/cloud_regions/supported_regions`. Returns 400 if the `origin_ip` in the body does not match the URL path parameter. Returns 403 (code 1164) when the zone has reached the limit of 3,500 IP mappings.").positional(`origin-ip`,{type:`string`,description:`Origin IP address to create or replace.`,demandOption:!0}).option(`region`,{type:`string`,description:`Cloud vendor region identifier. Must be a valid region for the specified vendor as returned by the supported_regions endpoint.`}).option(`vendor`,{type:`string`,description:`Cloud vendor hosting the origin. Must be one of the supported vendors.`,choices:[`aws`,`azure`,`gcp`,`oci`]}).coerce(`vendor`,e=>u(e,`vendor`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or replacing an origin cloud region mapping.`})}const I={command:`update <origin-ip>`,describe:`Create or replace an origin cloud region mapping`,builder:F,handler:async e=>s({command:`cache origin-cloud-regions update`,classification:{safeFlags:[`vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/${e[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(e[`origin-ip`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"origin-ip":String(e[`origin-ip`]??``)},bodyKind:`json`,body:e.body===void 0?l({region:u(e.region,`region`,`text`),vendor:e.vendor}):c(e.body)});return}let t=e.body===void 0?void 0:c(e.body),s=await n(e),p=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=p,e.body!==void 0){let n=t,r=await o(`Updating`,async()=>s.send(P,{body:n,zone_id:p,origin_ip:e[`origin-ip`]}));i(r,{successLabel:`Updated`});return}e.region===void 0&&(e.region=await d(`region`,`Cloud vendor region identifier. Must be a valid region for the specified vendor as returned by the supported_regions endpoint.`)),e.vendor===void 0&&(e.vendor=await f(`vendor`,`Cloud vendor hosting the origin. Must be one of the supported vendors.`,[`aws`,`azure`,`gcp`,`oci`]));let m=l({region:u(e.region,`region`,`text`),vendor:e.vendor}),h=await o(`Updating`,async()=>s.send(P,{body:m,zone_id:p,origin_ip:e[`origin-ip`]}));i(h,{successLabel:`Updated`})})},L={command:`origin-cloud-regions`,describe:`Manage Origin Cloud Regions routing and failover configurations`,builder:e=>e.command(C).command(E).command(k).command(I).command(b).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`POST`,path:t=>e`/zones/${t.zone_id}/environments/${t.environment_id}/purge_cache`,body:`json`};function z(e){return e.usage("$0 cache purge-environment <environment-id>\n\nDeletes cached content for one environment of the zone. Content cached for the zone's other environments, including production, is not affected. Otherwise this works like `POST /zones/{zone_id}/purge_cache`: the next request for purged content is a cache `MISS`, and the request body takes the same fields. Environments are part of [Version Management](https://developers.cloudflare.com/version-management/). To keep content cached and have Cloudflare revalidate it instead, use `POST /zones/{zone_id}/environments/{environment_id}/invalidate_cache`. Purging by URL (`files`) does not work for environments that select requests by IP address, country, ASN, or threat score, and fails with error `1136`. Use `tags`, `hosts`, `prefixes`, or `purge_everything` for those environments. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").positional(`environment-id`,{type:`string`,description:`The environment ID, from Version Management.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`purge-environment <environment-id>`,describe:`Purge Cached Content by Environment`,builder:z,handler:async e=>s({command:`cache purge-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache purge-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/environments/${e[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(e[`environment-id`]))}/purge_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"environment-id":String(e[`environment-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=e.body===void 0?void 0:c(e.body),l=await n(e),u=await r({zone:e.zone},l,{quiet:e.quiet});if(e.zoneId=u,!await p({force:!!e.force,message:`This operation deletes the selected content from the environment's cache.`}))return;if(e.body!==void 0){let t=s,n=await o(`Processing`,async()=>l.send(R,{body:t,zone_id:u,environment_id:e[`environment-id`]}));i(n,{successLabel:`Done`});return}let d=await o(`Processing`,async()=>t(l,`POST`,`/zones/${e.zoneId}/environments/${encodeURIComponent(String(e[`environment-id`]))}/purge_cache`));i(d,{successLabel:`Done`})})};var V={method:`POST`,path:t=>e`/zones/${t.zone_id}/purge_cache`,body:`json`};function H(e){return e.usage("$0 cache purge\n\nDeletes cached content in every Cloudflare data center and cache tier, including Cache Reserve. The next request for purged content is a cache `MISS`: Cloudflare fetches the full response from your origin and caches it again. Cloudflare does not serve purged content from cache again, even if your origin is unavailable. To keep content cached and have Cloudflare revalidate it with your origin instead, use `POST /zones/{zone_id}/invalidate_cache`. ### Choose what to purge Send one of these fields in the request body: - `files`: specific URLs. If your cache key includes request headers, send each URL with the header values it was cached with. - `tags`: all content whose `Cache-Tag` response header contains one of the tags. - `hosts`: all content cached for the hostnames. - `prefixes`: all content whose URL starts with one of the prefixes. - `purge_everything`: all cached content in the zone. ### Check the result A `200` response with `success: true` means Cloudflare accepted the request. It does not confirm that any content was cached or removed. To check, request a purged URL and confirm that the `CF-Cache-Status` response header is `MISS`. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const U={command:`purge`,describe:`Purge Cached Content`,builder:H,handler:async e=>s({command:`cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/purge_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=e.body===void 0?void 0:c(e.body),l=await n(e),u=await r({zone:e.zone},l,{quiet:e.quiet});if(e.zoneId=u,!await p({force:!!e.force,message:`This operation deletes the selected content from the zone's cache.`}))return;if(e.body!==void 0){let e=s,t=await o(`Processing`,async()=>l.send(V,{body:e,zone_id:u}));i(t,{successLabel:`Done`});return}let d=await o(`Processing`,async()=>t(l,`POST`,`/zones/${e.zoneId}/purge_cache`));i(d,{successLabel:`Done`})})};var W={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/cache/regional_tiered_cache`,body:`json`};function G(e){return e.usage(`$0 cache settings regional-tiered-cache edit
|
|
10
|
+
Returns the cloud vendors and regions that are valid values for origin cloud region mappings. Each region includes the Tiered Cache upper-tier colocation codes that will be used for cache routing when a mapping targeting that region is active. Requires the zone to have Tiered Cache enabled.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list-supported`,describe:`List supported cloud vendors and regions`,builder:j,handler:async e=>c({command:`cache origin-cloud-regions regions list-supported`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf cache origin-cloud-regions regions list-supported`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/supported_regions`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),i=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=i;let a=await l(`Loading`,async()=>t.send(A,{zone_id:i}));s(a,{successLabel:`Loaded`})})},N={command:`regions`,describe:`Operations for origin-cloud-regions.regions`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`PUT`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`,body:`json`};function F(e){return e.usage("$0 cache origin-cloud-regions update <origin-ip>\n\nCreates a new IP-to-cloud-region mapping or replaces the existing mapping for the specified IP. PUT is idempotent — calling it repeatedly with the same body produces the same result. The IP path parameter is normalized to canonical form (RFC 5952 for IPv6) before storage. The vendor and region are validated against the list from `GET /zones/{zone_id}/origin/cloud_regions/supported_regions`. Returns 400 if the `origin_ip` in the body does not match the URL path parameter. Returns 403 (code 1164) when the zone has reached the limit of 3,500 IP mappings.").positional(`origin-ip`,{type:`string`,description:`Origin IP address to create or replace.`,demandOption:!0}).option(`region`,{type:`string`,description:`Cloud vendor region identifier. Must be a valid region for the specified vendor as returned by the supported_regions endpoint.`}).option(`vendor`,{type:`string`,description:`Cloud vendor hosting the origin. Must be one of the supported vendors.`,choices:[`aws`,`azure`,`gcp`,`oci`]}).coerce(`vendor`,e=>p(e,`vendor`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or replacing an origin cloud region mapping.`})}const I={command:`update <origin-ip>`,describe:`Create or replace an origin cloud region mapping`,builder:F,handler:async e=>c({command:`cache origin-cloud-regions update`,classification:{safeFlags:[`vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf cache origin-cloud-regions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/${e[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(e[`origin-ip`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"origin-ip":String(e[`origin-ip`]??``)},bodyKind:`json`,body:e.body===void 0?a({region:p(e.region,`region`,`text`),vendor:e.vendor}):i(e.body)});return}let t=e.body===void 0?void 0:i(e.body),c=await n(e),f=await r({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=f,e.body!==void 0){let n=t,r=await l(`Updating`,async()=>c.send(P,{body:n,zone_id:f,origin_ip:e[`origin-ip`]}));s(r,{successLabel:`Updated`});return}e.region===void 0&&(e.region=await u(`region`,`Cloud vendor region identifier. Must be a valid region for the specified vendor as returned by the supported_regions endpoint.`)),e.vendor===void 0&&(e.vendor=await d(`vendor`,`Cloud vendor hosting the origin. Must be one of the supported vendors.`,[`aws`,`azure`,`gcp`,`oci`]));let m=a({region:p(e.region,`region`,`text`),vendor:e.vendor}),h=await l(`Updating`,async()=>c.send(P,{body:m,zone_id:f,origin_ip:e[`origin-ip`]}));s(h,{successLabel:`Updated`})})},L={command:`origin-cloud-regions`,describe:`Manage Origin Cloud Regions routing and failover configurations`,builder:e=>e.command(C).command(E).command(k).command(I).command(b).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`POST`,path:t=>e`/zones/${t.zone_id}/environments/${t.environment_id}/purge_cache`,body:`json`};function z(e){return e.usage("$0 cache purge-environment <environment-id>\n\nDeletes cached content for one environment of the zone. Content cached for the zone's other environments, including production, is not affected. Otherwise this works like `POST /zones/{zone_id}/purge_cache`: the next request for purged content is a cache `MISS`, and the request body takes the same fields. Environments are part of [Version Management](https://developers.cloudflare.com/version-management/). To keep content cached and have Cloudflare revalidate it instead, use `POST /zones/{zone_id}/environments/{environment_id}/invalidate_cache`. Purging by URL (`files`) does not work for environments that select requests by IP address, country, ASN, or threat score, and fails with error `1136`. Use `tags`, `hosts`, `prefixes`, or `purge_everything` for those environments. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").positional(`environment-id`,{type:`string`,description:`The environment ID, from Version Management.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`purge-environment <environment-id>`,describe:`Purge Cached Content by Environment`,builder:z,handler:async e=>c({command:`cache purge-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf cache purge-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/environments/${e[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(e[`environment-id`]))}/purge_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"environment-id":String(e[`environment-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:i(e.body)});return}let a=e.body===void 0?void 0:i(e.body),c=await n(e),u=await r({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,!await f({force:!!e.force,message:`This operation deletes the selected content from the environment's cache.`}))return;if(e.body!==void 0){let t=a,n=await l(`Processing`,async()=>c.send(R,{body:t,zone_id:u,environment_id:e[`environment-id`]}));s(n,{successLabel:`Done`});return}let d=await l(`Processing`,async()=>t(c,`POST`,`/zones/${e.zoneId}/environments/${encodeURIComponent(String(e[`environment-id`]))}/purge_cache`));s(d,{successLabel:`Done`})})};var V={method:`POST`,path:t=>e`/zones/${t.zone_id}/purge_cache`,body:`json`};function H(e){return e.usage("$0 cache purge\n\nDeletes cached content in every Cloudflare data center and cache tier, including Cache Reserve. The next request for purged content is a cache `MISS`: Cloudflare fetches the full response from your origin and caches it again. Cloudflare does not serve purged content from cache again, even if your origin is unavailable. To keep content cached and have Cloudflare revalidate it with your origin instead, use `POST /zones/{zone_id}/invalidate_cache`. ### Choose what to purge Send one of these fields in the request body: - `files`: specific URLs. If your cache key includes request headers, send each URL with the header values it was cached with. - `tags`: all content whose `Cache-Tag` response header contains one of the tags. - `hosts`: all content cached for the hostnames. - `prefixes`: all content whose URL starts with one of the prefixes. - `purge_everything`: all cached content in the zone. ### Check the result A `200` response with `success: true` means Cloudflare accepted the request. It does not confirm that any content was cached or removed. To check, request a purged URL and confirm that the `CF-Cache-Status` response header is `MISS`. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const U={command:`purge`,describe:`Purge Cached Content`,builder:H,handler:async e=>c({command:`cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/purge_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:i(e.body)});return}let a=e.body===void 0?void 0:i(e.body),c=await n(e),u=await r({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,!await f({force:!!e.force,message:`This operation deletes the selected content from the zone's cache.`}))return;if(e.body!==void 0){let e=a,t=await l(`Processing`,async()=>c.send(V,{body:e,zone_id:u}));s(t,{successLabel:`Done`});return}let d=await l(`Processing`,async()=>t(c,`POST`,`/zones/${e.zoneId}/purge_cache`));s(d,{successLabel:`Done`})})};var W={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/cache/regional_tiered_cache`,body:`json`};function G(e){return e.usage(`$0 cache settings regional-tiered-cache edit
|
|
11
11
|
|
|
12
|
-
Instructs Cloudflare to check a regional hub data center on the way to your upper tier. This can help improve performance for smart and custom tiered cache topologies.`).option(`value`,{type:`string`,description:`Value of the Regional Tiered Cache zone setting.`,choices:[`on`,`off`]}).coerce(`value`,e=>
|
|
12
|
+
Instructs Cloudflare to check a regional hub data center on the way to your upper tier. This can help improve performance for smart and custom tiered cache topologies.`).option(`value`,{type:`string`,description:`Value of the Regional Tiered Cache zone setting.`,choices:[`on`,`off`]}).coerce(`value`,e=>p(e,`value`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const K={command:`edit`,describe:`Change Regional Tiered Cache setting`,builder:G,handler:async e=>c({command:`cache settings regional-tiered-cache edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf cache settings regional-tiered-cache edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/regional_tiered_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?a({value:e.value}):i(e.body)});return}let t=e.body===void 0?void 0:i(e.body),c=await n(e),u=await r({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let e=t,n=await l(`Updating`,async()=>c.send(W,{body:e,zone_id:u}));s(n,{successLabel:`Updated`});return}e.value===void 0&&(e.value=await d(`value`,`Value of the Regional Tiered Cache zone setting.`,[`on`,`off`]));let f=a({value:e.value}),p=await l(`Updating`,async()=>c.send(W,{body:f,zone_id:u}));s(p,{successLabel:`Updated`})})};var q={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/regional_tiered_cache`};function J(e){return e.usage(`$0 cache settings regional-tiered-cache get
|
|
13
13
|
|
|
14
|
-
Instructs Cloudflare to check a regional hub data center on the way to your upper tier. This can help improve performance for smart and custom tiered cache topologies.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get`,describe:`Get Regional Tiered Cache setting`,builder:J,handler:async e=>
|
|
14
|
+
Instructs Cloudflare to check a regional hub data center on the way to your upper tier. This can help improve performance for smart and custom tiered cache topologies.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get`,describe:`Get Regional Tiered Cache setting`,builder:J,handler:async e=>c({command:`cache settings regional-tiered-cache get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf cache settings regional-tiered-cache get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/regional_tiered_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),i=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=i;let a=await l(`Loading`,async()=>t.send(q,{zone_id:i}));s(a,{successLabel:`Loaded`})})},se={command:`regional-tiered-cache`,describe:`Restrict tiered cache topology to data centers within a specific geographic region`,builder:e=>e.command(K).command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ce={method:`POST`,path:t=>e`/zones/${t.zone_id}/cache/cache_reserve_clear`};function le(e){return e.usage(`$0 cache settings reserve clear
|
|
15
15
|
|
|
16
|
-
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ue={command:`clear`,describe:`Start Cache Reserve Clear`,builder:le,handler:async e=>
|
|
16
|
+
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ue={command:`clear`,describe:`Start Cache Reserve Clear`,builder:le,handler:async e=>c({command:`cache settings reserve clear`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf cache settings reserve clear`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/cache_reserve_clear`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),i=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=i,!await f({force:!!e.force,message:`This operation permanently clears Cache Reserve for this zone and cannot be undone.`}))return;let a=await l(`Processing`,async()=>t.send(ce,{zone_id:i}));s(a,{successLabel:`Done`})})};var Y={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/cache/cache_reserve`,body:`json`};function de(e){return e.usage(`$0 cache settings reserve edit
|
|
17
17
|
|
|
18
|
-
Increase cache lifetimes by automatically storing all cacheable files into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve) for more information.`).option(`value`,{type:`string`,description:`Value of the Cache Reserve zone setting.`,choices:[`on`,`off`]}).coerce(`value`,e=>
|
|
18
|
+
Increase cache lifetimes by automatically storing all cacheable files into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve) for more information.`).option(`value`,{type:`string`,description:`Value of the Cache Reserve zone setting.`,choices:[`on`,`off`]}).coerce(`value`,e=>p(e,`value`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const fe={command:`edit`,describe:`Change Cache Reserve setting`,builder:de,handler:async e=>c({command:`cache settings reserve edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf cache settings reserve edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/cache_reserve`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?a({value:e.value}):i(e.body)});return}let t=e.body===void 0?void 0:i(e.body),c=await n(e),u=await r({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let e=t,n=await l(`Updating`,async()=>c.send(Y,{body:e,zone_id:u}));s(n,{successLabel:`Updated`});return}e.value===void 0&&(e.value=await d(`value`,`Value of the Cache Reserve zone setting.`,[`on`,`off`]));let f=a({value:e.value}),p=await l(`Updating`,async()=>c.send(Y,{body:f,zone_id:u}));s(p,{successLabel:`Updated`})})};var pe={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/cache_reserve`};function me(e){return e.usage(`$0 cache settings reserve get
|
|
19
19
|
|
|
20
|
-
Increase cache lifetimes by automatically storing all cacheable files into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve) for more information.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`get`,describe:`Get Cache Reserve setting`,builder:me,handler:async e=>
|
|
20
|
+
Increase cache lifetimes by automatically storing all cacheable files into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve) for more information.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`get`,describe:`Get Cache Reserve setting`,builder:me,handler:async e=>c({command:`cache settings reserve get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf cache settings reserve get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/cache_reserve`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),i=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=i;let a=await l(`Loading`,async()=>t.send(pe,{zone_id:i}));s(a,{successLabel:`Loaded`})})};var ge={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/cache_reserve_clear`};function _e(e){return e.usage(`$0 cache settings reserve status
|
|
21
21
|
|
|
22
|
-
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`status`,describe:`Get Cache Reserve Clear`,builder:_e,handler:async e=>
|
|
22
|
+
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`status`,describe:`Get Cache Reserve Clear`,builder:_e,handler:async e=>c({command:`cache settings reserve status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf cache settings reserve status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/cache_reserve_clear`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),i=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=i;let a=await l(`Loading`,async()=>t.send(ge,{zone_id:i}));s(a,{successLabel:`Loaded`})})},ye={command:`reserve`,describe:`Persistent storage tier that keeps cached assets even after eviction from edge caches`,builder:e=>e.command(ue).command(fe).command(he).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/zones/${t.zone_id}/cache/tiered_cache_smart_topology_enable`,body:`json`};function be(e){return e.usage(`$0 cache settings smart-tiered-cache create
|
|
23
23
|
|
|
24
|
-
Smart Tiered Cache dynamically selects the single closest upper tier for each of your website's origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`value`,{type:`string`,description:`Enable or disable the Smart Tiered Cache.`,choices:[`on`,`off`]}).coerce(`value`,e=>
|
|
24
|
+
Smart Tiered Cache dynamically selects the single closest upper tier for each of your website's origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`value`,{type:`string`,description:`Enable or disable the Smart Tiered Cache.`,choices:[`on`,`off`]}).coerce(`value`,e=>p(e,`value`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update enablement of Smart Tiered Cache.`})}const xe={command:`create`,describe:`Create Smart Tiered Cache setting`,builder:be,handler:async e=>c({command:`cache settings smart-tiered-cache create`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf cache settings smart-tiered-cache create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?a({value:e.value}):i(e.body)});return}let t=e.body===void 0?void 0:i(e.body),c=await n(e),u=await r({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let e=t,n=await l(`Creating`,async()=>c.send(X,{body:e,zone_id:u}));s(n,{successLabel:`Created`});return}e.value===void 0&&(e.value=await d(`value`,`Enable or disable the Smart Tiered Cache.`,[`on`,`off`]));let f=a({value:e.value}),p=await l(`Creating`,async()=>c.send(X,{body:f,zone_id:u}));s(p,{successLabel:`Created`})})};var Se={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/cache/tiered_cache_smart_topology_enable`};function Ce(e){return e.usage(`$0 cache settings smart-tiered-cache delete
|
|
25
25
|
|
|
26
|
-
Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).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 we={command:`delete`,describe:`Delete Smart Tiered Cache setting`,builder:Ce,handler:async e=>
|
|
26
|
+
Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).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 we={command:`delete`,describe:`Delete Smart Tiered Cache setting`,builder:Ce,handler:async e=>c({command:`cache settings smart-tiered-cache delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf cache settings smart-tiered-cache delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),i=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=i,!await f({force:!!e.force}))return;let a=await l(`Deleting`,async()=>t.send(Se,{zone_id:i}));s(a,{successLabel:`Deleted`})})};var Z={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/cache/tiered_cache_smart_topology_enable`,body:`json`};function Te(e){return e.usage(`$0 cache settings smart-tiered-cache edit
|
|
27
27
|
|
|
28
|
-
Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`value`,{type:`string`,description:`Enable or disable the Smart Tiered Cache.`,choices:[`on`,`off`]}).coerce(`value`,e=>
|
|
28
|
+
Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`value`,{type:`string`,description:`Enable or disable the Smart Tiered Cache.`,choices:[`on`,`off`]}).coerce(`value`,e=>p(e,`value`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update enablement of Smart Tiered Cache.`})}const Ee={command:`edit`,describe:`Patch Smart Tiered Cache setting`,builder:Te,handler:async e=>c({command:`cache settings smart-tiered-cache edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf cache settings smart-tiered-cache edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?a({value:e.value}):i(e.body)});return}let t=e.body===void 0?void 0:i(e.body),c=await n(e),u=await r({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let e=t,n=await l(`Updating`,async()=>c.send(Z,{body:e,zone_id:u}));s(n,{successLabel:`Updated`});return}e.value===void 0&&(e.value=await d(`value`,`Enable or disable the Smart Tiered Cache.`,[`on`,`off`]));let f=a({value:e.value}),p=await l(`Updating`,async()=>c.send(Z,{body:f,zone_id:u}));s(p,{successLabel:`Updated`})})};var De={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/tiered_cache_smart_topology_enable`};function Oe(e){return e.usage(`$0 cache settings smart-tiered-cache get
|
|
29
29
|
|
|
30
|
-
Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`get`,describe:`Get Smart Tiered Cache setting`,builder:Oe,handler:async e=>
|
|
30
|
+
Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`get`,describe:`Get Smart Tiered Cache setting`,builder:Oe,handler:async e=>c({command:`cache settings smart-tiered-cache get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf cache settings smart-tiered-cache get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),i=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=i;let a=await l(`Loading`,async()=>t.send(De,{zone_id:i}));s(a,{successLabel:`Loaded`})})},ke={command:`smart-tiered-cache`,describe:`Automatically determine the best upper-tier data centers for tiered cache topology`,builder:e=>e.command(xe).command(we).command(Ee).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ae={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/cache/variants`};function je(e){return e.usage(`$0 cache settings variants delete
|
|
31
31
|
|
|
32
|
-
Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).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 Me={command:`delete`,describe:`Delete variants setting`,builder:je,handler:async e=>
|
|
32
|
+
Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).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 Me={command:`delete`,describe:`Delete variants setting`,builder:je,handler:async e=>c({command:`cache settings variants delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf cache settings variants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/variants`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),i=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=i,!await f({force:!!e.force}))return;let a=await l(`Deleting`,async()=>t.send(Ae,{zone_id:i}));s(a,{successLabel:`Deleted`})})};var $={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/cache/variants`,body:`json`};function Ne(e){return e.usage(`$0 cache settings variants edit
|
|
33
33
|
|
|
34
|
-
Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).option(`value-avif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for avif.`}).option(`value-bmp`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for bmp.`}).option(`value-gif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for gif.`}).option(`value-jp2`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jp2.`}).option(`value-jpeg`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpeg.`}).option(`value-jpg`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpg.`}).option(`value-jpg2`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpg2.`}).option(`value-png`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for png.`}).option(`value-tif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for tif.`}).option(`value-tiff`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for tiff.`}).option(`value-webp`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for webp.`}).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 Pe={command:`edit`,describe:`Change variants setting`,builder:Ne,handler:async e=>
|
|
34
|
+
Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).option(`value-avif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for avif.`}).option(`value-bmp`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for bmp.`}).option(`value-gif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for gif.`}).option(`value-jp2`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jp2.`}).option(`value-jpeg`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpeg.`}).option(`value-jpg`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpg.`}).option(`value-jpg2`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpg2.`}).option(`value-png`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for png.`}).option(`value-tif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for tif.`}).option(`value-tiff`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for tiff.`}).option(`value-webp`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for webp.`}).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 Pe={command:`edit`,describe:`Change variants setting`,builder:Ne,handler:async e=>c({command:`cache settings variants edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf cache settings variants edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/variants`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?a({value:{avif:e[`value-avif`],bmp:e[`value-bmp`],gif:e[`value-gif`],jp2:e[`value-jp2`],jpeg:e[`value-jpeg`],jpg:e[`value-jpg`],jpg2:e[`value-jpg2`],png:e[`value-png`],tif:e[`value-tif`],tiff:e[`value-tiff`],webp:e[`value-webp`]}}):i(e.body)});return}let t=e.body===void 0?void 0:i(e.body),c=await n(e),u=await r({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let e=t,n=await l(`Updating`,async()=>c.send($,{body:e,zone_id:u}));s(n,{successLabel:`Updated`});return}let d=a({value:{avif:e[`value-avif`],bmp:e[`value-bmp`],gif:e[`value-gif`],jp2:e[`value-jp2`],jpeg:e[`value-jpeg`],jpg:e[`value-jpg`],jpg2:e[`value-jpg2`],png:e[`value-png`],tif:e[`value-tif`],tiff:e[`value-tiff`],webp:e[`value-webp`]}}),f=await l(`Updating`,async()=>c.send($,{body:d,zone_id:u}));s(f,{successLabel:`Updated`})})};var Fe={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/variants`};function Ie(e){return e.usage(`$0 cache settings variants get
|
|
35
35
|
|
|
36
|
-
Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`get`,describe:`Get variants setting`,builder:Ie,handler:async e=>
|
|
36
|
+
Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`get`,describe:`Get variants setting`,builder:Ie,handler:async e=>c({command:`cache settings variants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf cache settings variants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/variants`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),i=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=i;let a=await l(`Loading`,async()=>t.send(Fe,{zone_id:i}));s(a,{successLabel:`Loaded`})})},Re={command:`variants`,describe:`Serve different cached versions of an image based on the Accept header (WebP, AVIF, etc.)`,builder:e=>e.command(Me).command(Pe).command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ze={command:`settings`,describe:`Configure Cache Reserve, tiered caching, and variant serving`,builder:e=>e.command(se).command(ye).command(ke).command(Re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Be={command:`cache`,describe:`Purge cached content and configure Cache Reserve, tiered caching, and variant serving`,builder:e=>e.command(te).command(g).command(U).command(B).command(L).command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Be as default};
|