cf 1.0.0-beta.13 → 1.0.0-beta.15

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.
Files changed (443) hide show
  1. package/README.md +10 -0
  2. package/dist/_meta/commands.json +5039 -2465
  3. package/dist/_meta/hand-written-commands.json +375 -22
  4. package/dist/_meta/schemas.json +2607 -1038
  5. package/dist/abuse-reports-CnQBtN1G.mjs +24 -0
  6. package/dist/access-BzmXSwzj.mjs +2 -0
  7. package/dist/account-tags-2qPWbW17.mjs +15 -0
  8. package/dist/accounts-B0Byg-AV.mjs +132 -0
  9. package/dist/acm-DgAu0cnk.mjs +15 -0
  10. package/dist/addressing-J1oa0ML2.mjs +105 -0
  11. package/dist/agent-memory-4KGou-tm.mjs +34 -0
  12. package/dist/ai-WY7wVQfA.mjs +31 -0
  13. package/dist/ai-audit-D38HaEoZ.mjs +6 -0
  14. package/dist/ai-gateway-C0gIipT8.mjs +80 -0
  15. package/dist/ai-search-ClwnPU-9.mjs +79 -0
  16. package/dist/ai-security-BIsvFPYV.mjs +10 -0
  17. package/dist/alerting-MHhv28oO.mjs +56 -0
  18. package/dist/analytics-BfBz7bqB.mjs +17 -0
  19. package/dist/analytics_engine-CXVdBF1n.mjs +4 -0
  20. package/dist/api-eMuS5GI1.mjs +3 -0
  21. package/dist/api-security-DUCfcdC1.mjs +154 -0
  22. package/dist/argo-CUlzI4v3.mjs +14 -0
  23. package/dist/artifacts-BLfWGzBg.mjs +43 -0
  24. package/dist/audit-logs-CsfIm2QS.mjs +4 -0
  25. package/dist/auth-8Sm4uLGM.mjs +2 -0
  26. package/dist/auth-C6u9qIGO.mjs +2 -0
  27. package/dist/auth-CGRemu5W.mjs +2 -0
  28. package/dist/{auth-token-pNQrX_9O.mjs → auth-token-DkkYg4DP.mjs} +1 -1
  29. package/dist/{autoconfig-sD7Frryg.mjs → autoconfig-B0ESZ8DJ.mjs} +2 -2
  30. package/dist/basin-catalog-CrKRYJ0b.mjs +46 -0
  31. package/dist/billing-NxehgXrR.mjs +23 -0
  32. package/dist/blocks-Bat9A8V_.mjs +5 -0
  33. package/dist/bot-management-C993iQKL.mjs +9 -0
  34. package/dist/botnet-feed-CZ4vYk5y.mjs +11 -0
  35. package/dist/brand-protection-ADVgIi0l.mjs +27 -0
  36. package/dist/browser-run-CEptKZYl.mjs +42 -0
  37. package/dist/build-Bm6kGyzo.mjs +2 -0
  38. package/dist/{build-HmSXqjGn.mjs → build-sBpqm9ga.mjs} +1 -1
  39. package/dist/builds-DqtiTH7p.mjs +71 -0
  40. package/dist/cache-hX5QxmI0.mjs +45 -0
  41. package/dist/certificate-authorities-BOcybjc1.mjs +6 -0
  42. package/dist/cf-Bq4pA4n6.mjs +18 -0
  43. package/dist/{chunk-TAK63GWY-DdMktrgc.mjs → chunk-2HLTAS5V-D7COzUOd.mjs} +2 -2
  44. package/dist/chunk-2K52M2W5-CYxfQXUq.mjs +363 -0
  45. package/dist/{chunk-DSGVRFIS-C1_SEtRK.mjs → chunk-DSGVRFIS-C5SqiTOz.mjs} +1 -1
  46. package/dist/{cli-DeJc9U8z.mjs → cli-R8h3OKZI.mjs} +1 -1
  47. package/dist/client-certificates-Bez_ArKE.mjs +13 -0
  48. package/dist/client-side-security-CSmA50Bv.mjs +63 -0
  49. package/dist/cloud-connector-0Wivqi7S.mjs +6 -0
  50. package/dist/{cloudflared--1Ws1RJy.mjs → cloudflared-By8BzYXc.mjs} +1 -1
  51. package/dist/cloudforce-one-J-rU6k1U.mjs +405 -0
  52. package/dist/{command-Dh7RmjFu.mjs → command-0BOb1pgV.mjs} +1 -1
  53. package/dist/{command-DUhX8Dcr.mjs → command-BCJN-ZM2.mjs} +1 -1
  54. package/dist/{command-BvfKhMl7.mjs → command-BG-kLOnS.mjs} +1 -1
  55. package/dist/{command-Cu7dcaHT.mjs → command-BIsI-mMX.mjs} +1 -1
  56. package/dist/{command-83uVfXh9.mjs → command-BKDbbA-L.mjs} +1 -1
  57. package/dist/command-BWQIKu6I.mjs +2 -0
  58. package/dist/{command-D3fyhdy-.mjs → command-Bdy69UFU.mjs} +1 -1
  59. package/dist/{command-BDe67N_n.mjs → command-Bgb-3yPg.mjs} +1 -1
  60. package/dist/{command-_rqD0hXF.mjs → command-C6w1OdoC.mjs} +1 -1
  61. package/dist/{command-oNVwyjGB.mjs → command-CKW6UhTh.mjs} +1 -1
  62. package/dist/{command-Bpzp8Mz2.mjs → command-DCQgsd2U.mjs} +1 -1
  63. package/dist/{command-CcuLC6CJ.mjs → command-DIs-Nqtl.mjs} +1 -1
  64. package/dist/command-DPn5ANHs.mjs +2 -0
  65. package/dist/{command-CG6RvZs0.mjs → command-DZfKHiru.mjs} +1 -1
  66. package/dist/{command-BlIb6RR2.mjs → command-DppVezAB.mjs} +1 -1
  67. package/dist/{completions-D06AO7A8.mjs → completions-CpNGTlUX.mjs} +1 -1
  68. package/dist/config.mjs +0 -0
  69. package/dist/connector-interrupts-CH-DaLuo.mjs +6 -0
  70. package/dist/connector-telemetry-events-X3Fod9nl.mjs +6 -0
  71. package/dist/connector-telemetry-snapshots-D-WR4npQ.mjs +6 -0
  72. package/dist/connectors-CORKD31m.mjs +15 -0
  73. package/dist/containers-BboUbx3k.mjs +78 -0
  74. package/dist/containers-Di3_Vopq.mjs +376 -0
  75. package/dist/content-scan-DXGREAXa.mjs +14 -0
  76. package/dist/{context-q7UaYK69.mjs → context-A6T-NKPI.mjs} +2 -2
  77. package/dist/cps-1BoOLtTq.mjs +6 -0
  78. package/dist/create-OXylMu6m.mjs +2 -0
  79. package/dist/csamScanner-CHfbfeup.mjs +10 -0
  80. package/dist/ct-alerting-DlH4ILQo.mjs +5 -0
  81. package/dist/custom-certificates-zJqJZ2Th.mjs +17 -0
  82. package/dist/custom-csrs-DoLIGqYL.mjs +11 -0
  83. package/dist/custom-hostnames-YfV-aoAK.mjs +27 -0
  84. package/dist/custom-nameservers-BV43gmgt.mjs +9 -0
  85. package/dist/custom-pages-CoOU1Cdx.mjs +21 -0
  86. package/dist/d1-DujBmzLa.mjs +94 -0
  87. package/dist/dcv-delegation-CPLsVYOl.mjs +4 -0
  88. package/dist/delegate.mjs +0 -0
  89. package/dist/deploy-context-tEhwEXnA.mjs +56 -0
  90. package/dist/{deploy-input-Cc0_2QlW.mjs → deploy-input-BqJ7GVZ-.mjs} +1 -1
  91. package/dist/{deploy-CWNm1-5v.mjs → deploy-wNujfGUJ.mjs} +1 -1
  92. package/dist/{dev-ZA8itQE7.mjs → dev-EtnMYA7K.mjs} +1 -1
  93. package/dist/diagnostics-B3TYPVRi.mjs +15 -0
  94. package/dist/dist-DZRTPMMA.mjs +449 -0
  95. package/dist/dls-CWm1HRF0.mjs +17 -0
  96. package/dist/dns-CjAFU7Z9.mjs +144 -0
  97. package/dist/dns-firewall-BooBP9ap.mjs +71 -0
  98. package/dist/docs-C5XB7HdG.mjs +3 -0
  99. package/dist/{dotenv-DpXaxfho.mjs → dotenv-usOKkeW7.mjs} +3 -3
  100. package/dist/{dry-run-DRj2_uV3.mjs → dry-run-C2KjGX10.mjs} +1 -1
  101. package/dist/durable-objects-CSrMQDCE.mjs +6 -0
  102. package/dist/email-auth-Bp1Mui-n.mjs +6 -0
  103. package/dist/email-routing-CVF6SwQt.mjs +45 -0
  104. package/dist/email-security-mYZtazae.mjs +158 -0
  105. package/dist/email-sending-BqaKU_Xu.mjs +47 -0
  106. package/dist/error-sanitization-CIQOep3I.mjs +2 -0
  107. package/dist/error-sanitization-pOyzm2F1.mjs +2 -0
  108. package/dist/fieldExtractors-CAGZVmYg.mjs +9 -0
  109. package/dist/firewall-DgTDsYOt.mjs +36 -0
  110. package/dist/flagship-Db3PxxyZ.mjs +28 -0
  111. package/dist/fraud-BEOQczy8.mjs +22 -0
  112. package/dist/get-By1q8YlI.mjs +2 -0
  113. package/dist/get-CRKvqCu6.mjs +2 -0
  114. package/dist/get-iPUHxD1r.mjs +2 -0
  115. package/dist/google-tag-gateway-DjLQ9wo0.mjs +6 -0
  116. package/dist/hand-written-dry-run-B82fRl2N.mjs +2 -0
  117. package/dist/healthchecks-C3ScnKss.mjs +22 -0
  118. package/dist/{hostnames-sF999-6H.mjs → hostnames-DU0k-xO9.mjs} +6 -6
  119. package/dist/hyperdrive-IpCCLCRd.mjs +37 -0
  120. package/dist/iam-96CYM8Vw.mjs +52 -0
  121. package/dist/images-AB9EgZgT.mjs +71 -0
  122. package/dist/index.mjs +1 -1
  123. package/dist/{init-1w_mcgk3.mjs → init-D2nPoW4f.mjs} +2 -2
  124. package/dist/intel-BKb4RLvS.mjs +76 -0
  125. package/dist/ips-z9APCV_b.mjs +4 -0
  126. package/dist/k2-Bv-HiJ29.mjs +11 -0
  127. package/dist/keyless-certificates-ChgSGHq4.mjs +13 -0
  128. package/dist/keys-BhngDsDa.mjs +4 -0
  129. package/dist/kv-CB5MQVGP.mjs +15 -0
  130. package/dist/{lazy-command-BDiIwpss.mjs → lazy-command-CaZ1kdlW.mjs} +1 -1
  131. package/dist/leaked-credential-checks-Bsi2WpSU.mjs +18 -0
  132. package/dist/load-balancers-0gXZNCeI.mjs +76 -0
  133. package/dist/{local-DlT72Xpn.mjs → local-Dil4fTWX.mjs} +1 -1
  134. package/dist/local-DxWDQDnG.mjs +2 -0
  135. package/dist/{local-runtime-CokO6qaX.mjs → local-runtime-B7TKFu6E.mjs} +1 -1
  136. package/dist/login-CiQGR8ha.mjs +5 -0
  137. package/dist/login-Ik98G4K6.mjs +2 -0
  138. package/dist/logo-matches-DmoF5Otu.mjs +6 -0
  139. package/dist/logos-BL6ohIMH.mjs +7 -0
  140. package/dist/logpush-UVopW68t.mjs +46 -0
  141. package/dist/logs-BVfxiEiM.mjs +36 -0
  142. package/dist/magic-cloud-networking-B5S3aM6f.mjs +71 -0
  143. package/dist/magic-network-monitoring-CDSJPP47.mjs +36 -0
  144. package/dist/magic-transit-TcDTKM43.mjs +386 -0
  145. package/dist/managed-defense-C88HL0pg.mjs +18 -0
  146. package/dist/managed-transforms-Ja41Tahl.mjs +9 -0
  147. package/dist/matches-BL_Y-9Yq.mjs +6 -0
  148. package/dist/mcp-BWp5Q09R.mjs +32 -0
  149. package/dist/mesh-lFPLRWhV.mjs +26 -0
  150. package/dist/{migrate-CZNq63Uj.mjs → migrate-6e5mJ79R.mjs} +1 -1
  151. package/dist/monetization-BIc4Bwo2.mjs +20 -0
  152. package/dist/mtls-certificates-CVBw-Jli.mjs +13 -0
  153. package/dist/network-Wig0qbaC.mjs +50 -0
  154. package/dist/network-interconnects-C16z1HuQ.mjs +72 -0
  155. package/dist/o11y-Bhy4qDRm.mjs +93 -0
  156. package/dist/oauth-CfEedDZi.mjs +4 -0
  157. package/dist/oauth-clients-eXjmK5yf.mjs +16 -0
  158. package/dist/{oauth-mspHHU5U.mjs → oauth-oWaW7ICv.mjs} +1 -1
  159. package/dist/oauth-scopes-DZWn50EA.mjs +4 -0
  160. package/dist/organization-QdAQTrKa.mjs +71 -0
  161. package/dist/organizations-CgAQYdK5.mjs +4 -0
  162. package/dist/origin-ca-certificates-BklXqp8X.mjs +11 -0
  163. package/dist/origin-post-quantum-encryption-Dg16ueT4.mjs +6 -0
  164. package/dist/origin-tls-client-auth-d8bDU5zU.mjs +30 -0
  165. package/dist/output-Co4xdFf6.mjs +2 -0
  166. package/dist/page-rules-CgMkC6YR.mjs +39 -0
  167. package/dist/pages-CkBtOOf8.mjs +54 -0
  168. package/dist/path-DRw6Y-nd.mjs +2 -0
  169. package/dist/pay-per-crawl-CnGXOWyz.mjs +38 -0
  170. package/dist/pay-per-use-HbfxpATr.mjs +33 -0
  171. package/dist/pipelines-CnO9CCs0.mjs +44 -0
  172. package/dist/precursor-Bc55XJdQ.mjs +4 -0
  173. package/dist/previews-C7vZrajd.mjs +7 -0
  174. package/dist/progress-D5po7ScB.mjs +2 -0
  175. package/dist/prompt-BAJpE3jV.mjs +4 -0
  176. package/dist/queries-BJAH4B74.mjs +9 -0
  177. package/dist/queues-D4G8vvwi.mjs +57 -0
  178. package/dist/r2-CJ8rD6Jb.mjs +128 -0
  179. package/dist/{radar-DrQLcbkq.mjs → radar-DgaxOdcd.mjs} +150 -150
  180. package/dist/raw-fetch-yY-wX5Xx.mjs +2 -0
  181. package/dist/realtime-DU09m7L7.mjs +172 -0
  182. package/dist/registrar-Cj7OfvGs.mjs +43 -0
  183. package/dist/registrar-sandbox-CA0Mua-j.mjs +56 -0
  184. package/dist/{registry-CHowrQsZ.mjs → registry-CRnk93ur.mjs} +1 -1
  185. package/dist/reporting-3kDVF5c8.mjs +14 -0
  186. package/dist/{request-headers-DiJeDAn1.mjs → request-headers-D_eQn93b.mjs} +1 -1
  187. package/dist/request-tracers-VBD4R3s3.mjs +4 -0
  188. package/dist/resolve-BpgXeklt.mjs +2 -0
  189. package/dist/resolve-C3FmNlSO.mjs +2 -0
  190. package/dist/resource-sharing-BtUF3psS.mjs +40 -0
  191. package/dist/resource-tagging--90INP8_.mjs +4 -0
  192. package/dist/rules-CcwPngVo.mjs +18 -0
  193. package/dist/rulesets-CfdruY82.mjs +37 -0
  194. package/dist/rum-RLkdfSL7.mjs +30 -0
  195. package/dist/run-CUNhH5CQ.mjs +2 -0
  196. package/dist/{run-BvHwWWUX.mjs → run-DASYqJsY.mjs} +1 -1
  197. package/dist/{schema-elj12WOx.mjs → schema-S3pUZwpI.mjs} +1 -1
  198. package/dist/{schema-flags-BzoBGPWk.mjs → schema-flags-CShtn7ya.mjs} +1 -1
  199. package/dist/scim-BZYsTPIL.mjs +18 -0
  200. package/dist/secrets-store-C_-FkSH_.mjs +24 -0
  201. package/dist/security-insights-BVBEaZmD.mjs +40 -0
  202. package/dist/security-txt--IoHrHee.mjs +9 -0
  203. package/dist/session-Cq3YNLoI.mjs +2 -0
  204. package/dist/shared-zNQNv1im.mjs +2 -0
  205. package/dist/smart-shield-CByC4_60.mjs +24 -0
  206. package/dist/snippets-DB-jiZAV.mjs +20 -0
  207. package/dist/{spawn-IysxuTNW.mjs → spawn-DQttFH05.mjs} +1 -1
  208. package/dist/spectrum-Bs2g1BmK.mjs +83 -0
  209. package/dist/speed-Bq4evEnJ.mjs +24 -0
  210. package/dist/sql-XGci7hZC.mjs +4 -0
  211. package/dist/src-GiuwAT55.mjs +125 -0
  212. package/dist/ssl-KJTLW1NR.mjs +45 -0
  213. package/dist/{startup-profile-CdJWgNjd.mjs → startup-profile-BOaseXnO.mjs} +1 -1
  214. package/dist/startup-profile-BwEZFVGS.mjs +2 -0
  215. package/dist/{state-BDSvdSdP.mjs → state-Boubf1X6.mjs} +1 -1
  216. package/dist/state-CODDG9Nx.mjs +2 -0
  217. package/dist/stream-BotgYspF.mjs +102 -0
  218. package/dist/submit-C5VytaHP.mjs +4 -0
  219. package/dist/{tags-CA1xMM96.mjs → tags-3Hq-B9qp.mjs} +2 -2
  220. package/dist/{telemetry-Cm39QJ-M.mjs → telemetry-3FJOXl_C.mjs} +1 -1
  221. package/dist/telemetry-BhKfwxyh.mjs +2 -0
  222. package/dist/tenant-BgX5onPc.mjs +10 -0
  223. package/dist/tenant-custom-nameservers-BVG8v1Xo.mjs +9 -0
  224. package/dist/theme-BGHWSKCw.mjs +6 -0
  225. package/dist/{tools-CSc5DmFi.mjs → tools-BCCRUENY.mjs} +1 -1
  226. package/dist/tunnels-CThOI3qH.mjs +29 -0
  227. package/dist/turnstile-BgZaUx-g.mjs +33 -0
  228. package/dist/ui-BtIBQeaG.mjs +2 -0
  229. package/dist/update-check-Yy7Ivq2V.mjs +2 -0
  230. package/dist/{update-check-CMXSdres.mjs → update-check-jb89ih_g.mjs} +1 -1
  231. package/dist/update-check-worker.mjs +1 -1
  232. package/dist/url-info-DQERN0Xq.mjs +4 -0
  233. package/dist/url-normalization-Cb1hofqv.mjs +9 -0
  234. package/dist/url-scanner-gHgx1bW7.mjs +16 -0
  235. package/dist/user-CdKzIuSi.mjs +112 -0
  236. package/dist/values-EwA8Sx0w.mjs +4 -0
  237. package/dist/vectorize-DejgIJIv.mjs +32 -0
  238. package/dist/version-B6MnUIqV.mjs +2 -0
  239. package/dist/waiting-rooms-BNR1HvAP.mjs +53 -0
  240. package/dist/web-assets-iglnzkTV.mjs +64 -0
  241. package/dist/web3-JBUU6IVt.mjs +28 -0
  242. package/dist/workers-CDp4kLTJ.mjs +40 -0
  243. package/dist/workers-builds-CSb9Dglt.mjs +14 -0
  244. package/dist/workers-for-platforms-D4srNZvt.mjs +40 -0
  245. package/dist/workers-vpc-LPC8TadH.mjs +13 -0
  246. package/dist/workflows-DN_VqWJC.mjs +52 -0
  247. package/dist/{wrangler-migration-C6FKHER1.mjs → wrangler-migration-DxTB5yPT.mjs} +1 -1
  248. package/dist/zaraz-DDErl5yc.mjs +22 -0
  249. package/dist/zero-trust-M88XX3uD.mjs +957 -0
  250. package/dist/zone-BsGvedmN.mjs +4 -0
  251. package/dist/zones-l_sRKrVl.mjs +124 -0
  252. package/package.json +17 -20
  253. package/dist/Page-BShsqCXr.mjs +0 -2
  254. package/dist/abuse-reports-BjU1s8cf.mjs +0 -24
  255. package/dist/access-C_G2MZnA.mjs +0 -2
  256. package/dist/account-tags-CaXDDeZ4.mjs +0 -15
  257. package/dist/accounts-BALwxDQY.mjs +0 -131
  258. package/dist/acm-CP9EaXQN.mjs +0 -15
  259. package/dist/addressing-DRlaxqrI.mjs +0 -93
  260. package/dist/agent-memory-vGhlfZBx.mjs +0 -34
  261. package/dist/ai-CJtbWfB9.mjs +0 -31
  262. package/dist/ai-audit-C0BJNqZZ.mjs +0 -6
  263. package/dist/ai-gateway-BQtv3U3x.mjs +0 -80
  264. package/dist/ai-search-DGU1Y5By.mjs +0 -79
  265. package/dist/ai-security-CFTaYk_X.mjs +0 -10
  266. package/dist/alerting-1hun27JC.mjs +0 -56
  267. package/dist/analytics-DXUSjvzT.mjs +0 -17
  268. package/dist/analytics_engine-CQsnL09C.mjs +0 -4
  269. package/dist/api-security-BXhrfR6-.mjs +0 -154
  270. package/dist/argo-LPUCTnee.mjs +0 -14
  271. package/dist/args-CfbYkeXd.mjs +0 -2
  272. package/dist/artifacts-Dt6easua.mjs +0 -43
  273. package/dist/audit-logs-CVznAM2Z.mjs +0 -4
  274. package/dist/auth-CGLsxbc6.mjs +0 -2
  275. package/dist/auth-CrmVwfpJ.mjs +0 -2
  276. package/dist/auth-eQr-kQCH.mjs +0 -2
  277. package/dist/banner-D03JEqRs.mjs +0 -2
  278. package/dist/basin-catalog-ZQICw-zF.mjs +0 -46
  279. package/dist/billing-Dy1-dV_B.mjs +0 -23
  280. package/dist/bot-management-DTgPwL7O.mjs +0 -9
  281. package/dist/botnet-feed-xb98Cj3Y.mjs +0 -11
  282. package/dist/brand-protection-Ck3okE2k.mjs +0 -27
  283. package/dist/browser-run-DJGJSzFX.mjs +0 -42
  284. package/dist/build-B1L6xrgC.mjs +0 -2
  285. package/dist/builds-CYxcZtkG.mjs +0 -71
  286. package/dist/cache-D9tSfovH.mjs +0 -45
  287. package/dist/certificate-authorities-CpiveTFC.mjs +0 -6
  288. package/dist/cf-BxsXrVeh.mjs +0 -18
  289. package/dist/chunk-NDZDTP46-Bjx_wtJe.mjs +0 -361
  290. package/dist/cli-types-9oYmRTHJ.mjs +0 -2
  291. package/dist/client-certificates-CF6YZyvP.mjs +0 -13
  292. package/dist/client-side-security-BLoe9kS5.mjs +0 -63
  293. package/dist/cloud-connector-DXRUHsjt.mjs +0 -6
  294. package/dist/cloudforce-one-CBLxXi6v.mjs +0 -447
  295. package/dist/command-DwXiDOeH.mjs +0 -2
  296. package/dist/command-UiHLJ8Ji.mjs +0 -2
  297. package/dist/connector-interrupts-DelTmNyw.mjs +0 -6
  298. package/dist/connector-telemetry-events-BwxR3G8d.mjs +0 -6
  299. package/dist/connector-telemetry-snapshots-Bqq-hrpJ.mjs +0 -6
  300. package/dist/connectors-D-m3rEpk.mjs +0 -15
  301. package/dist/containers-CVNfEjJs.mjs +0 -78
  302. package/dist/containers-DeoZyeQe.mjs +0 -375
  303. package/dist/content-scan-W0BNzbQp.mjs +0 -14
  304. package/dist/cps-BZ6hqRb5.mjs +0 -6
  305. package/dist/csamScanner-Bo1t3CLh.mjs +0 -10
  306. package/dist/ct-alerting-E03faC7p.mjs +0 -5
  307. package/dist/custom-certificates-CUySSPzi.mjs +0 -17
  308. package/dist/custom-csrs-gNpWkJPQ.mjs +0 -11
  309. package/dist/custom-hostnames-abGBAbx7.mjs +0 -27
  310. package/dist/custom-nameservers-BgNXol1P.mjs +0 -9
  311. package/dist/custom-pages-DMKX3aoD.mjs +0 -21
  312. package/dist/d1-CE08YqYk.mjs +0 -93
  313. package/dist/dcv-delegation-B5YUEWu0.mjs +0 -4
  314. package/dist/deploy-context-Dr6bxNcB.mjs +0 -56
  315. package/dist/diagnostics-UMbG6m4n.mjs +0 -15
  316. package/dist/dist-BHEmAAHr.mjs +0 -487
  317. package/dist/dls-DIl16mLp.mjs +0 -17
  318. package/dist/dns-QUpgljRG.mjs +0 -144
  319. package/dist/dns-firewall-BZwJXHLj.mjs +0 -71
  320. package/dist/durable-objects-BCj4ykpU.mjs +0 -6
  321. package/dist/email-auth-DlHIYhCk.mjs +0 -6
  322. package/dist/email-routing-UKVS4DYy.mjs +0 -45
  323. package/dist/email-security-CZjfRIg0.mjs +0 -158
  324. package/dist/email-sending-Dquc880C.mjs +0 -47
  325. package/dist/error-sanitization-DE_zSrXw.mjs +0 -2
  326. package/dist/error-sanitization-DOCQ9Ykh.mjs +0 -2
  327. package/dist/errors-_sob7Ihu.mjs +0 -3
  328. package/dist/fieldExtractors-BbwDRquU.mjs +0 -9
  329. package/dist/firewall--mTfDnCJ.mjs +0 -36
  330. package/dist/flagship-cfoSwwM9.mjs +0 -28
  331. package/dist/fraud-Dcsq3EYK.mjs +0 -22
  332. package/dist/google-tag-gateway-DPKSkZQi.mjs +0 -6
  333. package/dist/healthchecks-D78hIIBC.mjs +0 -22
  334. package/dist/hyperdrive-qWACKfA4.mjs +0 -37
  335. package/dist/iam-Bvg_PayW.mjs +0 -52
  336. package/dist/images-DI_lEZ4L.mjs +0 -71
  337. package/dist/intel-BxElBUMP.mjs +0 -76
  338. package/dist/ips-DWoaKxi7.mjs +0 -4
  339. package/dist/k2-tFjaftl-.mjs +0 -11
  340. package/dist/keyless-certificates-BrvxHU4J.mjs +0 -13
  341. package/dist/keys-DcwTYKRf.mjs +0 -4
  342. package/dist/kv-htXS-7uP.mjs +0 -15
  343. package/dist/leaked-credential-checks-bvGrLOmQ.mjs +0 -18
  344. package/dist/load-balancers-BNTUt4yG.mjs +0 -76
  345. package/dist/local-DlDumOSC.mjs +0 -2
  346. package/dist/login-BGF_I_LT.mjs +0 -5
  347. package/dist/login-Ccw-mYwT.mjs +0 -2
  348. package/dist/logo-matches-tE8LTKgg.mjs +0 -6
  349. package/dist/logos-Bj845Mcw.mjs +0 -7
  350. package/dist/logpush-Cs8JdvKi.mjs +0 -46
  351. package/dist/logs-C92XZvNu.mjs +0 -36
  352. package/dist/magic-cloud-networking-hNp5MMw-.mjs +0 -71
  353. package/dist/magic-network-monitoring-68GuWAnv.mjs +0 -36
  354. package/dist/magic-transit-DNd7gu4j.mjs +0 -383
  355. package/dist/managed-defense-B_wCAuFD.mjs +0 -18
  356. package/dist/managed-transforms-DZdxHPOh.mjs +0 -9
  357. package/dist/matches-B65CkflD.mjs +0 -6
  358. package/dist/mcp-DrJW5ayK.mjs +0 -32
  359. package/dist/mesh-DfVzYTn1.mjs +0 -26
  360. package/dist/monetization-BGaI8CMO.mjs +0 -20
  361. package/dist/mtls-certificates-BsU2emDD.mjs +0 -13
  362. package/dist/network-BEMD8P0U.mjs +0 -50
  363. package/dist/network-interconnects-DMu_fcbo.mjs +0 -68
  364. package/dist/o11y-C1a4gDGF.mjs +0 -93
  365. package/dist/oauth-Bj5Ne1o8.mjs +0 -9
  366. package/dist/oauth-clients-p4Etdqy_.mjs +0 -16
  367. package/dist/oauth-scopes-B2IabFza.mjs +0 -4
  368. package/dist/organization-CdXt7AVZ.mjs +0 -75
  369. package/dist/organizations-5S6xEp7T.mjs +0 -4
  370. package/dist/origin-ca-certificates-_VJAoK1D.mjs +0 -11
  371. package/dist/origin-post-quantum-encryption-GcldDsT2.mjs +0 -6
  372. package/dist/origin-tls-client-auth-DZHld9fA.mjs +0 -30
  373. package/dist/output-BOe-3AQG.mjs +0 -2
  374. package/dist/page-rules-o1tAMMsD.mjs +0 -39
  375. package/dist/pages-CmiOhjSl.mjs +0 -54
  376. package/dist/pay-per-crawl-BsnOxGYU.mjs +0 -38
  377. package/dist/pay-per-use-BXWMCSyE.mjs +0 -33
  378. package/dist/pipelines-DWLQC0F6.mjs +0 -44
  379. package/dist/precursor-B6DjBib6.mjs +0 -4
  380. package/dist/previews-dUKEBGSM.mjs +0 -4
  381. package/dist/progress-BtkTVcHI.mjs +0 -2
  382. package/dist/prompt-RlgRrmbm.mjs +0 -3
  383. package/dist/queries-yLwoJRHV.mjs +0 -9
  384. package/dist/queues-CnJRaE1o.mjs +0 -57
  385. package/dist/r2-CuC6-zQX.mjs +0 -128
  386. package/dist/raw-fetch-B4NvWuZD.mjs +0 -2
  387. package/dist/realtime-CjsnzHxD.mjs +0 -172
  388. package/dist/registrar-BgOsxTnX.mjs +0 -43
  389. package/dist/registrar-sandbox-3ikBD9fB.mjs +0 -56
  390. package/dist/reporting-hE127s5r.mjs +0 -14
  391. package/dist/request-tracers-BCwLxmPN.mjs +0 -4
  392. package/dist/resolve-CaTBV-c6.mjs +0 -2
  393. package/dist/resolve-DCGSzUDQ.mjs +0 -2
  394. package/dist/resource-sharing-2qvWUuMa.mjs +0 -40
  395. package/dist/resource-tagging-Dwx7iL3v.mjs +0 -4
  396. package/dist/rules-DxVQ6jIg.mjs +0 -18
  397. package/dist/rulesets-Cdh8YjI9.mjs +0 -37
  398. package/dist/rum-a4CMq4Qu.mjs +0 -30
  399. package/dist/run-CkbrPJPx.mjs +0 -2
  400. package/dist/scim-B8XlXl8v.mjs +0 -18
  401. package/dist/secrets-store-Cqhedh_i.mjs +0 -24
  402. package/dist/security-insights-le2-DteL.mjs +0 -40
  403. package/dist/security-txt-cCArWXur.mjs +0 -9
  404. package/dist/session-C1BhT1ZJ.mjs +0 -2
  405. package/dist/shared-BPjcpXuA.mjs +0 -2
  406. package/dist/smart-shield-Csyh8hwB.mjs +0 -24
  407. package/dist/snippets-DUWx25q6.mjs +0 -20
  408. package/dist/spectrum-Da3UYSOR.mjs +0 -83
  409. package/dist/speed-NxlMnB2e.mjs +0 -24
  410. package/dist/sql-CNdHAlQ8.mjs +0 -4
  411. package/dist/src-JfLDUxFr.mjs +0 -125
  412. package/dist/ssl-BtaX2WEJ.mjs +0 -45
  413. package/dist/startup-profile-B2l0ChVu.mjs +0 -2
  414. package/dist/state-JB4_BU1o.mjs +0 -2
  415. package/dist/stream-C1Ijjzn4.mjs +0 -102
  416. package/dist/submit-MdkuU_Pt.mjs +0 -4
  417. package/dist/telemetry-BsYO3nxG.mjs +0 -2
  418. package/dist/tenant-BB6Oszcl.mjs +0 -10
  419. package/dist/tenant-custom-nameservers-BsbgYAEo.mjs +0 -9
  420. package/dist/theme-CQ_TYifs.mjs +0 -6
  421. package/dist/tunnels-CRFtyHWz.mjs +0 -29
  422. package/dist/turnstile-DBXWo_Xe.mjs +0 -33
  423. package/dist/ui-YmjF66Ct.mjs +0 -5
  424. package/dist/update-check-C2oVEbXx.mjs +0 -2
  425. package/dist/url-info-t-XAs0Mk.mjs +0 -4
  426. package/dist/url-normalization-Cs4F8e0a.mjs +0 -9
  427. package/dist/url-scanner-CBIoDbTx.mjs +0 -16
  428. package/dist/user-CevdOMoa.mjs +0 -112
  429. package/dist/values-CjNlkbIh.mjs +0 -4
  430. package/dist/vectorize-9d9tPmg5.mjs +0 -32
  431. package/dist/version-BdVUXLnK.mjs +0 -2
  432. package/dist/waiting-rooms--5WmrWb3.mjs +0 -53
  433. package/dist/web-assets-BHot_MU8.mjs +0 -64
  434. package/dist/web3-CYfWAF6b.mjs +0 -28
  435. package/dist/workers-S17M0n3h.mjs +0 -40
  436. package/dist/workers-builds-Dw7ho3So.mjs +0 -14
  437. package/dist/workers-for-platforms-A3yjyLh3.mjs +0 -40
  438. package/dist/workers-vpc-BZ2xXtC3.mjs +0 -13
  439. package/dist/workflows-BgGrVpSR.mjs +0 -43
  440. package/dist/zaraz-BsD2dMI3.mjs +0 -22
  441. package/dist/zero-trust-CA3iGQbG.mjs +0 -837
  442. package/dist/zone-D2M4EZD0.mjs +0 -4
  443. package/dist/zones-BoOC_JzC.mjs +0 -124
@@ -1,45 +0,0 @@
1
- #!/usr/bin/env node
2
- import{i as e,n as t}from"./auth-CGLsxbc6.mjs";import{i as n}from"./context-q7UaYK69.mjs";import{t as r}from"./output-BOe-3AQG.mjs";import{t as i}from"./dry-run-DRj2_uV3.mjs";import{t as a}from"./progress-BtkTVcHI.mjs";import{t as o}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,i as d,n as f}from"./prompt-RlgRrmbm.mjs";function p(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 m={command:`invalidate-environment <environment-id>`,describe:`Invalidate Cached Content by Environment`,builder:p,handler:async c=>o({command:`cache invalidate-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache invalidate-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/environments/${c[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(c[`environment-id`]))}/invalidate_cache`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"environment-id":String(c[`environment-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await t(c),l=await n({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,!await f({force:!!c.force,message:`This operation marks the selected content in the environment's cache as stale.`})){process.stderr.write(`Aborted.
3
- `);return}if(c.body){let e=s(c.body),t=await a(`Deleting`,async()=>o.cache.invalidateEnvironment({body:e,zone_id:l,environment_id:c[`environment-id`]}));r(t,{successLabel:`Deleted`});return}let u=await a(`Deleting`,async()=>e(o,`POST`,`/zones/${c.zoneId}/environments/${encodeURIComponent(String(c[`environment-id`]))}/invalidate_cache`));r(u,{successLabel:`Deleted`})})};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 h={command:`invalidate`,describe:`Invalidate Cached Content`,builder:ee,handler:async c=>o({command:`cache invalidate`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache invalidate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/invalidate_cache`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await t(c),l=await n({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,!await f({force:!!c.force,message:`This operation marks the selected content in the zone's cache as stale.`})){process.stderr.write(`Aborted.
4
- `);return}if(c.body){let e=s(c.body),t=await a(`Deleting`,async()=>o.cache.invalidate({body:e,zone_id:l}));r(t,{successLabel:`Deleted`});return}let u=await a(`Deleting`,async()=>e(o,`POST`,`/zones/${c.zoneId}/invalidate_cache`));r(u,{successLabel:`Deleted`})})};function g(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 _={command:`bulk-delete`,describe:`Batch delete origin cloud region mappings`,builder:g,handler:async c=>o({command:`cache origin-cloud-regions bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache origin-cloud-regions bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await t(c);if(c.zoneId=await n({zone:c.zone},o,{quiet:c.quiet}),!await f({force:!!c.force,message:`Are you sure you want to delete these Origin Cloud Region configurations?`})){process.stderr.write(`Aborted.
5
- `);return}if(c.body){let t=s(c.body);if(Array.isArray(t)&&t.length>100){let n=Math.ceil(t.length/100),i=null;for(let r=0;r<t.length;r+=100){let s=t.slice(r,r+100),l=Math.floor(r/100)+1;i=await a(`Deleting: batch ${l}/${n}`,async()=>e(o,`DELETE`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:s}))}r(i,{successLabel:`Deleted`});return}let n=await a(`Deleting`,async()=>e(o,`DELETE`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:t}));r(n,{successLabel:`Deleted`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.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:`bulk-update`,describe:`Batch create or replace origin cloud region mappings`,builder:v,handler:async c=>o({command:`cache origin-cloud-regions bulk-update`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){i({command:`cf cache origin-cloud-regions bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await t(c);if(c.zoneId=await n({zone:c.zone},o,{quiet:c.quiet}),c.body){let t=s(c.body);if(Array.isArray(t)&&t.length>100){let n=Math.ceil(t.length/100),i=null;for(let r=0;r<t.length;r+=100){let s=t.slice(r,r+100),l=Math.floor(r/100)+1;i=await a(`Updating: batch ${l}/${n}`,async()=>e(o,`PUT`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:s}))}r(i,{successLabel:`Updated`});return}let n=await a(`Updating`,async()=>e(o,`PUT`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:t}));r(n,{successLabel:`Updated`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function b(e){return e.usage(`$0 cache origin-cloud-regions delete <origin-ip>
6
-
7
- 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 x={command:`delete <origin-ip>`,describe:`Delete an origin cloud region mapping`,builder:b,handler:async e=>o({command:`cache origin-cloud-regions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({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 o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force,message:`Are you sure you want to delete this Origin Cloud Region configuration?`})){process.stderr.write(`Aborted.
8
- `);return}let c=await a(`Deleting`,async()=>o.cache.originCloudRegions.delete({zone_id:s,origin_ip:e[`origin-ip`]}));r(c,{successLabel:`Deleted`})})};function S(e){return e.usage(`$0 cache origin-cloud-regions get <origin-ip>
9
-
10
- 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 C={command:`get <origin-ip>`,describe:`Get an origin cloud region mapping`,builder:S,handler:async e=>o({command:`cache origin-cloud-regions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({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 o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.cache.originCloudRegions.get({zone_id:s,origin_ip:e[`origin-ip`]}));r(c,{successLabel:`Loaded`})})};function w(e){return e.usage(`$0 cache origin-cloud-regions list
11
-
12
- 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 T={command:`list`,describe:`List origin cloud region mappings`,builder:w,handler:async e=>o({command:`cache origin-cloud-regions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`]};if(e.dryRun){i({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:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.cache.originCloudRegions.list({zone_id:c,...o}));r(l,{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 cache origin-cloud-regions supported-regions
13
-
14
- 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 D={command:`supported-regions`,describe:`List supported cloud vendors and regions`,builder:E,handler:async e=>o({command:`cache origin-cloud-regions supported-regions`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf cache origin-cloud-regions supported-regions`,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 o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.cache.originCloudRegions.supportedRegions({zone_id:s}));r(c,{successLabel:`Loaded`})})};function O(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`]}).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 k={command:`update <origin-ip>`,describe:`Create or replace an origin cloud region mapping`,builder:O,handler:async e=>o({command:`cache origin-cloud-regions update`,classification:{safeFlags:[`vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){i({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?c({region:l(e.region,`region`,`text`),vendor:l(e.vendor,`vendor`,`text`)}):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.cache.originCloudRegions.update({body:t,zone_id:f,origin_ip:e[`origin-ip`]}));r(n,{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 p=c({region:l(e.region,`region`,`text`),vendor:l(e.vendor,`vendor`,`text`)}),m=await a(`Updating`,async()=>o.cache.originCloudRegions.update({body:p,zone_id:f,origin_ip:e[`origin-ip`]}));r(m,{successLabel:`Updated`})})},A={command:`origin-cloud-regions`,describe:`Manage Origin Cloud Regions routing and failover configurations`,builder:e=>e.command(_).command(y).command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(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 M={command:`purge-environment <environment-id>`,describe:`Purge Cached Content by Environment`,builder:j,handler:async c=>o({command:`cache purge-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache purge-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/environments/${c[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(c[`environment-id`]))}/purge_cache`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"environment-id":String(c[`environment-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await t(c),l=await n({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,!await f({force:!!c.force,message:`This operation deletes the selected content from the environment's cache.`})){process.stderr.write(`Aborted.
15
- `);return}if(c.body){let e=s(c.body),t=await a(`Deleting`,async()=>o.cache.purgeEnvironment({body:e,zone_id:l,environment_id:c[`environment-id`]}));r(t,{successLabel:`Deleted`});return}let u=await a(`Deleting`,async()=>e(o,`POST`,`/zones/${c.zoneId}/environments/${encodeURIComponent(String(c[`environment-id`]))}/purge_cache`));r(u,{successLabel:`Deleted`})})};function N(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 P={command:`purge`,describe:`Purge Cached Content`,builder:N,handler:async c=>o({command:`cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/purge_cache`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await t(c),l=await n({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,!await f({force:!!c.force,message:`This operation deletes the selected content from the zone's cache.`})){process.stderr.write(`Aborted.
16
- `);return}if(c.body){let e=s(c.body),t=await a(`Deleting`,async()=>o.cache.purge({body:e,zone_id:l}));r(t,{successLabel:`Deleted`});return}let u=await a(`Deleting`,async()=>e(o,`POST`,`/zones/${c.zoneId}/purge_cache`));r(u,{successLabel:`Deleted`})})};function F(e){return e.usage(`$0 cache settings regional-tiered-cache edit
17
-
18
- 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`]}).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 I={command:`edit`,describe:`Change Regional Tiered Cache setting`,builder:F,handler:async e=>o({command:`cache settings regional-tiered-cache edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){i({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?c({value:l(e.value,`value`,`text`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.cache.settings.regionalTieredCache.edit({...t,zone_id:u}));r(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=c({value:l(e.value,`value`,`text`)}),p=await a(`Updating`,async()=>o.cache.settings.regionalTieredCache.edit({...f,zone_id:u}));r(p,{successLabel:`Updated`})})};function L(e){return e.usage(`$0 cache settings regional-tiered-cache get
19
-
20
- 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 R={command:`get`,describe:`Get Regional Tiered Cache setting`,builder:L,handler:async e=>o({command:`cache settings regional-tiered-cache get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({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 o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.cache.settings.regionalTieredCache.get({zone_id:s}));r(c,{successLabel:`Loaded`})})},te={command:`regional-tiered-cache`,describe:`Restrict tiered cache topology to data centers within a specific geographic region`,builder:e=>e.command(I).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage(`$0 cache settings reserve clear
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}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const B={command:`clear`,describe:`Start Cache Reserve Clear`,builder:z,handler:async e=>o({command:`cache settings reserve clear`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({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 o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force,message:`This operation permanently clears Cache Reserve for this zone and cannot be undone.`})){process.stderr.write(`Aborted.
23
- `);return}let c=await a(`Deleting`,async()=>o.cache.settings.reserve.clear({zone_id:s}));r(c,{successLabel:`Deleted`})})};function V(e){return e.usage(`$0 cache settings reserve edit
24
-
25
- 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`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`edit`,describe:`Change Cache Reserve setting`,builder:V,handler:async e=>o({command:`cache settings reserve edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){i({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?c({value:l(e.value,`value`,`text`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.cache.settings.reserve.edit({...t,zone_id:u}));r(n,{successLabel:`Updated`});return}e.value===void 0&&(e.value=await d(`value`,`Value of the Cache Reserve zone setting.`,[`on`,`off`]));let f=c({value:l(e.value,`value`,`text`)}),p=await a(`Updating`,async()=>o.cache.settings.reserve.edit({...f,zone_id:u}));r(p,{successLabel:`Updated`})})};function U(e){return e.usage(`$0 cache settings reserve get
26
-
27
- 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 W={command:`get`,describe:`Get Cache Reserve setting`,builder:U,handler:async e=>o({command:`cache settings reserve get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({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 o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.cache.settings.reserve.get({zone_id:s}));r(c,{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 cache settings reserve status
28
-
29
- 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 K={command:`status`,describe:`Get Cache Reserve Clear`,builder:G,handler:async e=>o({command:`cache settings reserve status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({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 o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.cache.settings.reserve.status({zone_id:s}));r(c,{successLabel:`Loaded`})})},q={command:`reserve`,describe:`Persistent storage tier that keeps cached assets even after eviction from edge caches`,builder:e=>e.command(B).command(H).command(W).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function J(e){return e.usage(`$0 cache settings smart-tiered-cache create
30
-
31
- 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`]}).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 Y={command:`create`,describe:`Create Smart Tiered Cache setting`,builder:J,handler:async e=>o({command:`cache settings smart-tiered-cache create`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){i({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?c({value:l(e.value,`value`,`text`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.cache.settings.smartTieredCache.create({body:t,zone_id:u}));r(n,{successLabel:`Created`});return}e.value===void 0&&(e.value=await d(`value`,`Enable or disable the Smart Tiered Cache.`,[`on`,`off`]));let f=c({value:l(e.value,`value`,`text`)}),p=await a(`Creating`,async()=>o.cache.settings.smartTieredCache.create({body:f,zone_id:u}));r(p,{successLabel:`Created`})})};function X(e){return e.usage(`$0 cache settings smart-tiered-cache delete
32
-
33
- 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 Z={command:`delete`,describe:`Delete Smart Tiered Cache setting`,builder:X,handler:async e=>o({command:`cache settings smart-tiered-cache delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({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 o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force})){process.stderr.write(`Aborted.
34
- `);return}let c=await a(`Deleting`,async()=>o.cache.settings.smartTieredCache.delete({zone_id:s}));r(c,{successLabel:`Deleted`})})};function Q(e){return e.usage(`$0 cache settings smart-tiered-cache edit
35
-
36
- 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`]}).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 ne={command:`edit`,describe:`Patch Smart Tiered Cache setting`,builder:Q,handler:async e=>o({command:`cache settings smart-tiered-cache edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){i({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?c({value:l(e.value,`value`,`text`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.cache.settings.smartTieredCache.edit({body:t,zone_id:u}));r(n,{successLabel:`Updated`});return}e.value===void 0&&(e.value=await d(`value`,`Enable or disable the Smart Tiered Cache.`,[`on`,`off`]));let f=c({value:l(e.value,`value`,`text`)}),p=await a(`Updating`,async()=>o.cache.settings.smartTieredCache.edit({body:f,zone_id:u}));r(p,{successLabel:`Updated`})})};function re(e){return e.usage(`$0 cache settings smart-tiered-cache get
37
-
38
- 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 ie={command:`get`,describe:`Get Smart Tiered Cache setting`,builder:re,handler:async e=>o({command:`cache settings smart-tiered-cache get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({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 o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.cache.settings.smartTieredCache.get({zone_id:s}));r(c,{successLabel:`Loaded`})})},ae={command:`smart-tiered-cache`,describe:`Automatically determine the best upper-tier data centers for tiered cache topology`,builder:e=>e.command(Y).command(Z).command(ne).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oe(e){return e.usage(`$0 cache settings variants delete
39
-
40
- 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 $={command:`delete`,describe:`Delete variants setting`,builder:oe,handler:async e=>o({command:`cache settings variants delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({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 o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force})){process.stderr.write(`Aborted.
41
- `);return}let c=await a(`Deleting`,async()=>o.cache.settings.variants.delete({zone_id:s}));r(c,{successLabel:`Deleted`})})};function se(e){return e.usage(`$0 cache settings variants edit
42
-
43
- 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 ce={command:`edit`,describe:`Change variants setting`,builder:se,handler:async e=>o({command:`cache settings variants edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({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?c({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`]}}):s(e.body)});return}let o=await t(e),l=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=l,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.cache.settings.variants.edit({...t,zone_id:l}));r(n,{successLabel:`Updated`});return}let u=c({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`]}}),d=await a(`Updating`,async()=>o.cache.settings.variants.edit({...u,zone_id:l}));r(d,{successLabel:`Updated`})})};function le(e){return e.usage(`$0 cache settings variants get
44
-
45
- 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 ue={command:`get`,describe:`Get variants setting`,builder:le,handler:async e=>o({command:`cache settings variants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({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 o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.cache.settings.variants.get({zone_id:s}));r(c,{successLabel:`Loaded`})})},de={command:`variants`,describe:`Serve different cached versions of an image based on the Accept header (WebP, AVIF, etc.)`,builder:e=>e.command($).command(ce).command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fe={command:`settings`,describe:`Configure Cache Reserve, tiered caching, and variant serving`,builder:e=>e.command(te).command(q).command(ae).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},pe={command:`cache`,describe:`Purge cached content and configure Cache Reserve, tiered caching, and variant serving`,builder:e=>e.command(h).command(m).command(P).command(M).command(A).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{pe as default};
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import{n as e}from"./auth-CGLsxbc6.mjs";import{i as t}from"./context-q7UaYK69.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-BtkTVcHI.mjs";import{t as a}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";function l(e){return e.usage(`$0 certificate-authorities hostname-associations get
3
-
4
- List Hostname Associations.`).option(`mtls-certificate-id`,{type:`string`,description:`The UUID to match against for a certificate that was uploaded to the mTLS Certificate Management endpoint. If no mtls_certificate_id is given, the results will be the hostnames associated to your active Cloudflare Managed CA.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`List Hostname Associations`,builder:l,handler:async o=>a({command:`certificate-authorities hostname-associations get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let a={mtls_certificate_id:o[`mtls-certificate-id`]};if(o.dryRun){r({command:`cf certificate-authorities hostname-associations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/certificate_authorities/hostname_associations`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c;let l=await i(`Loading`,async()=>s.certificateAuthorities.hostnameAssociations.get({zone_id:c,...a}));n(l,{successLabel:`Loaded`})})};function d(e){return e.usage(`$0 certificate-authorities hostname-associations update
5
-
6
- Replace Hostname Associations.`).option(`hostnames`,{type:`string`,array:!0,description:`The hostnames field`}).option(`mtls-certificate-id`,{type:`string`,description:`The UUID for a certificate that was uploaded to the mTLS Certificate Management endpoint. If no mtls_certificate_id is given, the hostnames will be associated to your active Cloudflare Managed CA.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const f={command:`update`,describe:`Replace Hostname Associations`,builder:d,handler:async l=>a({command:`certificate-authorities hostname-associations update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf certificate-authorities hostname-associations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/certificate_authorities/hostname_associations`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({hostnames:l.hostnames,mtls_certificate_id:c(l[`mtls-certificate-id`],`mtls-certificate-id`,`text`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body),t=await i(`Updating`,async()=>a.certificateAuthorities.hostnameAssociations.update({...e,zone_id:u}));n(t,{successLabel:`Updated`});return}let d=s({hostnames:l.hostnames,mtls_certificate_id:c(l[`mtls-certificate-id`],`mtls-certificate-id`,`text`)}),f=await i(`Updating`,async()=>a.certificateAuthorities.hostnameAssociations.update({...d,zone_id:u}));n(f,{successLabel:`Updated`})})},p={command:`hostname-associations`,describe:`Operations for hostname-associations`,builder:e=>e.command(u).command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},m={command:`certificate-authorities`,describe:`certificate-authorities`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
@@ -1,18 +0,0 @@
1
- #!/usr/bin/env node
2
- import{$ as e,D as t,E as n,K as r,L as i,N as a,d as o,h as s,k as c,q as l,rt as u}from"./dist-BHEmAAHr.mjs";import{N as d,O as f}from"./chunk-TAK63GWY-DdMktrgc.mjs";import{a as p,c as m,d as h,f as ee,h as g,i as _,l as v,m as y,n as te,o as ne,p as re,r as b,s as ie,t as ae,u as x}from"./chunk-NDZDTP46-Bjx_wtJe.mjs";import{createRequire as S}from"node:module";import{chmodSync as C,existsSync as w,mkdirSync as T,readFileSync as E,readdirSync as D,rmSync as O,writeFileSync as k}from"node:fs";import A from"node:path";import{URLSearchParams as oe}from"node:url";S(import.meta.url||(typeof __filename==`string`?__filename:`/`));function j(e){function t(){return A.resolve(e(),`preferences.json`)}g(t,`getUserPreferencesPath`);function n(){try{let e=E(t(),`utf8`),n=JSON.parse(e);return typeof n==`object`&&n?n:{}}catch{return{}}}g(n,`readUserPreferences`);function r(e){let r={...n(),...e},i=t();T(A.dirname(i),{recursive:!0}),k(i,JSON.stringify(r,null,` `),{encoding:`utf-8`})}return g(r,`updateUserPreferences`),{readUserPreferences:n,updateUserPreferences:r}}g(j,`createPreferences`);var M=6e4,N=525600,P=43200,F=1440,I=Symbol.for(`constructDateFrom`);function L(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&I in e?e[I](t):e instanceof Date?new e.constructor(t):new Date(t)}g(L,`constructFrom`);function R(e,t){return L(t||e,e)}g(R,`toDate`);var z={};function B(){return z}g(B,`getDefaultOptions`);function V(e){let t=R(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-n}g(V,`getTimezoneOffsetInMilliseconds`);function H(e,...t){let n=L.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}g(H,`normalizeDates`);function U(e,t){let n=+R(e)-R(t);return n<0?-1:n>0?1:n}g(U,`compareAsc`);function se(e){return L(e,Date.now())}g(se,`constructNow`);function ce(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}g(ce,`getRoundingMethod`);var le={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},ue=/* @__PURE__ */ g((e,t,n)=>{let r,i=le[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r},`formatDistance`);function W(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}g(W,`buildFormatLongFn`);var de={date:W({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:W({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:W({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},fe={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},pe=/* @__PURE__ */ g((e,t,n,r)=>fe[e],`formatRelative`);function G(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}g(G,`buildLocalizeFn`);var me={ordinalNumber:/* @__PURE__ */ g((e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},`ordinalNumber`),era:G({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:G({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:/* @__PURE__ */ g(e=>e-1,`argumentCallback`)}),month:G({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:G({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:G({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function K(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?ge(s,e=>e.test(o)):he(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}g(K,`buildMatchFn`);function he(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}g(he,`findKey`);function ge(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}g(ge,`findIndex`);function _e(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}g(_e,`buildMatchPatternFn`);var ve={code:`en-US`,formatDistance:ue,formatLong:de,formatRelative:pe,localize:me,match:{ordinalNumber:_e({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:/* @__PURE__ */ g(e=>parseInt(e,10),`valueCallback`)}),era:K({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:K({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:/* @__PURE__ */ g(e=>e+1,`valueCallback`)}),month:K({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:K({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:K({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function ye(e,t,n){let r=B(),i=n?.locale??r.locale??ve,a=U(e,t);if(isNaN(a))throw RangeError(`Invalid time value`);let o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[s,c]=H(n?.in,...a>0?[t,e]:[e,t]),l=ce(n?.roundingMethod??`round`),u=c.getTime()-s.getTime(),d=u/M,f=(u-(V(c)-V(s)))/M,p=n?.unit,m;if(m=p||(d<1?`second`:d<60?`minute`:d<F?`hour`:f<P?`day`:f<N?`month`:`year`),m===`second`){let e=l(u/1e3);return i.formatDistance(`xSeconds`,e,o)}if(m===`minute`){let e=l(d);return i.formatDistance(`xMinutes`,e,o)}if(m===`hour`){let e=l(d/60);return i.formatDistance(`xHours`,e,o)}if(m===`day`){let e=l(f/F);return i.formatDistance(`xDays`,e,o)}if(m===`month`){let e=l(f/P);return e===12&&p!==`month`?i.formatDistance(`xYears`,1,o):i.formatDistance(`xMonths`,e,o)}{let e=l(f/N);return i.formatDistance(`xYears`,e,o)}}g(ye,`formatDistanceStrict`);function be(e,t){return ye(e,se(e),t)}g(be,`formatDistanceToNowStrict`);function q(e,t){return{read:/* @__PURE__ */ g(()=>{let n=t();if(!w(n))return;let r=f(n);try{return x(e,r)}catch{return}},`read`),write(n){let r=t();T(A.dirname(r),{recursive:!0}),k(r,ee(e,n),{encoding:`utf-8`,mode:384}),C(r,384)},clear(){let e=t(),n=w(e);return O(e,{force:!0}),n},path:t}}g(q,`createFileStorage`);function xe(e){let{temporaryAccountLogger:t,prompt:n}=e;return/* @__PURE__ */ g(async function(e,r){if(c())return t.log(r),!0;let i=await n(e);return typeof i==`string`&&i.trim().toLowerCase()===`yes`},`ensureTemporaryTermsAccepted`)}g(xe,`createTemporaryTermsPrompt`);var Se=[9106,1e4];function J(e){return e?.code}g(J,`getErrorCode`);function Ce(e){let t=J(e);return t!==void 0&&Se.includes(t)}g(Ce,`isMembershipsInaccessible`);function we(e){return{"no-credentials-non-interactive":`Could not authenticate because no credentials were found and the environment is non-interactive. Set a CLOUDFLARE_API_TOKEN environment variable or run \`${e}\` in an interactive terminal first.`,"no-credentials-login-failed":`No credentials were found and the login attempt was unsuccessful. Run \`${e}\` to try again.`,"token-expired-non-interactive":`Your auth token has expired and could not be refreshed, and the environment is non-interactive. Run \`${e}\` in an interactive terminal or set a CLOUDFLARE_API_TOKEN.`,"token-expired-login-failed":`Your auth token has expired and could not be refreshed, and the login attempt was unsuccessful. Run \`${e}\` to try again.`,"token-refresh-unreachable":`Your auth token has expired and could not be refreshed because the Cloudflare auth server could not be reached. This is usually a network problem (connectivity, proxy, or IPv6), not an invalid login: your stored credentials were left unchanged. Check your connection and try again.`}}g(we,`notLoggedInErrorBodies`);function Te(e,t,n){let r=new Date(t.claim.expiresAt);e.log(_`
3
- Temporary account ready:
4
- Account: ${t.account.name} (${n?`reused`:`created`})
5
- Claim within: ${be(r)}
6
- Claim URL: ${t.claim.url}
7
- `)}g(Te,`logTemporaryPreviewAccount`);function Ee(e,r){let{logger:u}=r,f=r.temporaryAccountLogger??u,p=e.cliName,m=we(e.commands.login),h=`
8
- Run \`${e.commands.whoami}\` to check your current authentication status.`,ee=j(e.getConfigPath),_=o(u,e.cacheNamespace?{namespace:e.cacheNamespace}:void 0),v=ae({serviceName:e.keyringServiceName,getConfigPath:e.getConfigPath,isKeyringEnabled:/* @__PURE__ */ g(()=>ee.readUserPreferences().keyring_enabled===!0,`isKeyringEnabled`),logger:u,isNonInteractiveOrCI:c,loginCommand:e.commands.login,format:e.fileFormat}),y=e.allowGlobalAuthKey??!0,b=te({logger:u,isNonInteractiveOrCI:c,openInBrowser:/* @__PURE__ */ g(e=>a(e,u),`openInBrowser`),hasEnvCredentials:/* @__PURE__ */ g(()=>ne({allowGlobalAuthKey:y})!==void 0,`hasEnvCredentials`),purgeOnLoginOrLogout:_.purgeConfigCaches,clientId:e.clientId,consent:e.consent,displayName:e.displayName,deviceLoginCommand:e.commands.deviceLogin,redirectUri:e.redirectUri,storageFactory:v.storageFactory,allowGlobalAuthKey:y,temporary:{storage:q(e.fileFormat,e.getTemporaryAccountConfigPath),prompt:xe({temporaryAccountLogger:f,prompt:r.prompt}),temporaryAccountLogger:f}});function x(e){b.setProfile(e)}g(x,`setProfile`);function S(){return b.getActiveProfile()}g(S,`getActiveProfile`);function C(){return v.getActiveStore(b.getActiveProfile())}g(C,`getCredentialStore`);function w(e,t){b.setTemporaryAllowed(e,t)}g(w,`setTemporaryAllowed`);function T(){return b.getAPIToken()}g(T,`getAPIToken`);function E(){return b.requireApiToken()}g(E,`requireApiToken`);function D(t,n){return{complianceConfig:t,scopes:n?.scopes??e.getDefaultScopeKeys(),browser:n?.browser??!0,callbackHost:n?.callbackHost,callbackPort:n?.callbackPort,profile:n?.profile,device:n?.device??e.useDeviceFlowByDefault??!1}}g(D,`withLoginDefaults`);async function O(e,t){return b.login(D(e,t))}g(O,`login`);async function k(e){return b.logout(e)}g(k,`logout`);async function A(e,t){return b.getActiveTemporaryAccount()?{loggedIn:!0}:b.loginOrRefreshIfRequired(D(e,t))}g(A,`loginOrRefreshIfRequired`);async function M(){return b.getOAuthTokenFromLocalState()}g(M,`getOAuthTokenFromLocalState`);function N(){return b.getScopes()}g(N,`getScopes`);function P(){return v.storageFactory(S()).read()}g(P,`readAuthCredentials`);function F(e){v.storageFactory(S()).write(e)}g(F,`writeAuthCredentials`);function I(){let t=b.getActiveProfile();return t==="default"?`${e.accountCachePrefix}.json`:`${e.accountCachePrefix}-${t}.json`}g(I,`getAccountCacheFileName`);function L(e){_.saveToConfigCache(I(),{account:e})}g(L,`saveAccountToCache`);function R(){return _.getConfigCache(I()).account}g(R,`getAccountFromCache`);async function z(e,t,a){let o=[],c=!0,l=1,d;for(;c;){d=new oe(d),d.set(`page`,String(l));let{response:f,status:p}=await s(e,t,{},r.userAgent,u,d,void 0,a);f.success?(o.push(...f.result),n(f.result_info)?l+=1:c=!1):i(t,f,p)}return o}g(z,`fetchAccountsPaged`);async function B(t,n={}){let{throwOnEmpty:r=!0}=n,i=await A(t);if(!i.loggedIn)throw new d(`Not logged in. ${m[i.reason]}${h}`,{telemetryMessage:`cfetch auth login required`});let a=E(),[o,s]=await Promise.allSettled([z(t,`/accounts`,a),z(t,`/memberships`,a)]);if(o.status===`rejected`)throw o.reason;if(s.status===`rejected`){if(Ce(s.reason)){if(o.status===`fulfilled`&&o.value.length>0)return o.value;throw J(s.reason)===9106?new d(`Failed to automatically retrieve account IDs for the logged in user.
9
- You may have incorrect permissions on your API token, or an environment variable such as CLOUDFLARE_API_TOKEN, CLOUDFLARE_API_KEY, or CLOUDFLARE_EMAIL may be set to an invalid value.
10
- Check your environment and unset or correct any Cloudflare credential variables, or run \`${e.commands.login}\` to re-authenticate.
11
- You can also skip this account check by adding an \`account_id\` in your ${e.getConfigFileLabel()} file, or by setting the value of CLOUDFLARE_ACCOUNT_ID`,{telemetryMessage:`user account fetch permission denied`}):new d(`Failed to automatically retrieve account IDs for the logged in user.
12
- You may have incorrect permissions on your API token, or your authentication may have expired. Try running \`${e.commands.login}\` to re-authenticate. You can also skip this account check by adding an \`account_id\` in your ${e.getConfigFileLabel()} file, or by setting the value of CLOUDFLARE_ACCOUNT_ID`,{telemetryMessage:`user account fetch permission denied`})}throw s.reason}let c=new Set(s.value.map(e=>e.account.id)),l=o.value.filter(e=>c.has(e.id));if(l.length===0&&r)throw new d(`Failed to automatically retrieve account IDs for the logged in user.
13
- In a non-interactive environment, it is mandatory to specify an account ID, either by assigning its value to CLOUDFLARE_ACCOUNT_ID, or as \`account_id\` in your ${e.getConfigFileLabel()} file.
14
- Alternatively, try running \`${e.commands.login}\` to re-authenticate.`,{telemetryMessage:`user account fetch empty`});return l}g(B,`fetchAllAccounts`);function V(t){let n=b.getActiveTemporaryAccount();return n?n.account.id:t.account_id?re(t.account_id,`set as \`account_id\` in your ${e.getConfigFileLabel()} file`):ie()||R()?.id}g(V,`getActiveAccountId`);async function H(n){let i=V(n);if(i)return i;let a=await B(n);if(a.length===1)return L({id:a[0].id,name:a[0].name}),a[0].id;try{let e=await r.select(`Select an account`,{choices:a.map(e=>({title:e.name,value:e.id}))}),t=a.find(t=>t.id===e);if(!t)throw Error(`Selected account not found in accounts list`);return L({id:t.id,name:t.name}),e}catch(n){if(r.isNoDefaultValueProvidedError(n)){let n=t();throw new d(`More than one account available but unable to select one in non-interactive mode.
15
- Please set the appropriate \`account_id\` in your ${e.getConfigFileLabel()} file or assign it to the \`CLOUDFLARE_ACCOUNT_ID\` environment variable.
16
- Available accounts are (\`<name>\`: \`<account_id>\`):
17
- ${a.map(e=>` \`${n?`(redacted)`:e.name}\`: \`${e.id}\``).join(`
18
- `)}`,{telemetryMessage:`user account selection unavailable`})}throw n}}g(H,`getOrSelectAccountId`);async function U(e){if(b.isTemporaryAllowed()){if(l(e)!==`public`)throw new d(`Temporary accounts aren't available when the compliance region is not set to public.`,{telemetryMessage:`user temporary account unavailable in compliance region`});let t=b.getActiveTemporaryAccount();if(t)return t.account.id;if(T())throw new d("You're already authenticated with Cloudflare, so `--temporary` can't be used. Temporary preview accounts are only for unauthenticated use. Either remove `--temporary` to use your existing account, or log out (and unset CLOUDFLARE_API_TOKEN) first.",{telemetryMessage:`user temporary account already authenticated`});let{account:n,cached:r}=await b.activateTemporaryAccount();return Te(f,n,r),n.account.id}let t=await A(e);if(!t.loggedIn)throw t.reason===`no-credentials-non-interactive`||t.reason===`token-expired-non-interactive`?new d(`In a non-interactive environment, it's necessary to set a CLOUDFLARE_API_TOKEN environment variable for ${p} to work. Please go to https://developers.cloudflare.com/fundamentals/api/get-started/create-token/ for instructions on how to create an api token, and assign its value to CLOUDFLARE_API_TOKEN.`,{telemetryMessage:`user auth missing api token non interactive`}):t.reason===`token-refresh-unreachable`?new d(m[t.reason],{telemetryMessage:`user auth token refresh unreachable`}):new d(`Did not login, quitting...`,{telemetryMessage:`user login cancelled`});let n=await H(e);if(!n)throw new d(`No account id found, quitting...`,{telemetryMessage:`user auth missing account id`});return n}return g(U,`requireAuth`),{setProfile:x,getActiveProfile:S,getCredentialStore:C,setTemporaryAllowed:w,getAPIToken:T,requireApiToken:E,login:O,logout:k,loginOrRefreshIfRequired:A,getOAuthTokenFromLocalState:M,getScopes:N,readAuthCredentials:P,writeAuthCredentials:F,getActiveAccountId:V,getOrSelectAccountId:H,getAccountFromCache:R,fetchAllAccounts:B,requireAuth:U}}g(Ee,`createCloudflareAuth`);var De=`profiles/directory-bindings.json`,Oe=`.enc`;function Y(e){let{logger:t,getConfigPath:n,keyringServiceName:r,format:i}=e,a=`.${i}`;function o(e){return p(n(),e,i)}g(o,`plaintextPath`);function s(e){return v(n(),e)}g(s,`encryptedPath`);function c(){return A.dirname(o(`default`))}g(c,`getProfileConfigDirectory`);let l={exists(e){return w(o(e))||w(s(e))},list(){let e=c();if(!w(e))return[];let t=/* @__PURE__ */ new Set;for(let n of D(e))n.endsWith(a)?t.add(n.slice(0,-a.length)):n.endsWith(Oe)&&t.add(n.slice(0,-Oe.length));return[...t]},delete(e){let{backendAvailable:a,encryptedFileExisted:s}=h({serviceName:r,configPath:n(),profile:e,format:i});q(i,()=>o(e)).clear(),s&&!a&&t.warn(`Removed the credential files for profile "${e}", but the keyring backend was not reachable on this host so its keyring entry could not be cleared. Clear it manually if it persists.`)}};function u(){return A.join(n(),De)}return g(u,`getDirectoryBindingsPath`),b({configs:l,bindings:{read(){try{let e=E(u(),`utf-8`);return JSON.parse(e)}catch{return{}}},write(e){let t=u();T(A.dirname(t),{recursive:!0}),k(t,JSON.stringify(e,null,` `),`utf-8`)}}})}g(Y,`createCloudflareProfileStore`);function ke(e){let{loginCommand:t,createProfileCommand:n,keyringServiceName:r,getConfigPath:i,format:a,preferences:o}=e,{readUserPreferences:s,updateUserPreferences:c}=o;function l(e){return e??`default`}g(l,`describeProfile`);function u(e){let t=[];w(v(i()))&&t.push(void 0);let n=Y({logger:e,getConfigPath:i,keyringServiceName:r,format:a});for(let e of n.configs.list()){try{y(e)}catch{continue}w(v(i(),e))&&t.push(e)}return t}g(u,`listEncryptedProfiles`);function d(e){let o=u(e);if(o.length===0)return;let s=[],c=[];for(let t of o)try{let{backendAvailable:e}=h({serviceName:r,configPath:i(),profile:t,format:a});s.push(l(t)),e||c.push(l(t))}catch(n){e.warn(`Failed to remove encrypted credentials for profile "${l(t)}": ${n instanceof Error?n.message:String(n)}. You may need to clear them manually.`)}if(s.length>0){let r=n?`Re-authenticate with \`${t}\` (default profile) or \`${n} <name>\` (named profiles).`:`Re-authenticate with \`${t}\`.`;e.log(`Removed encrypted credentials for ${s.map(e=>`"${e}"`).join(`, `)}. ${r}`)}c.length>0&&e.warn(`The keyring backend was not reachable on this host, so the keyring entry for ${c.map(e=>`"${e}"`).join(`, `)} could not be cleared. Clear it manually if it persists.`)}g(d,`scrubAllEncryptedProfiles`);function f(e,t){let{logger:n,getCredentialStore:r}=t,i=s().keyring_enabled===!0,a=m();if(a!==void 0&&a!==e&&n.warn(`CLOUDFLARE_AUTH_USE_KEYRING=${a} overrides ${e?`enabling`:`disabling`} keyring storage for this command.`),!e&&a!==!0&&d(n),c({keyring_enabled:e}),e&&a!==!1)try{r().kind!==`encrypted-file`&&(c({keyring_enabled:i}),n.warn(`Keyring storage isn't available on this host (see warning above), so it was not enabled. Try again once the keyring backend is reachable.`))}catch(e){throw c({keyring_enabled:i}),e}return{enabled:s().keyring_enabled===!0}}return g(f,`setKeyringPreference`),{setKeyringPreference:f}}g(ke,`createKeyringPreference`);function Ae(e){let{getConfigPath:t,format:n}=e;function r(e){return p(t(),e,n)}g(r,`getAuthConfigFilePath`);function i(e){return v(t(),e)}g(i,`getEncryptedAuthConfigFilePath`);function a(e){return q(n,()=>r(e))}g(a,`defaultAuthConfigStorage`);function o(e,t){a(t).write(e)}g(o,`writeAuthConfigFile`);function s(e){return a(e).read()}return g(s,`readAuthConfigFile`),{getAuthConfigFilePath:r,getEncryptedAuthConfigFilePath:i,defaultAuthConfigStorage:a,readAuthConfigFile:s,writeAuthConfigFile:o}}g(Ae,`createAuthConfigFileHelpers`),S(import.meta.url||(typeof __filename==`string`?__filename:`/`));var X=`cloudflare`,je=`cf`,Me=`cf`,Ne=`http://localhost:8877/oauth/callback`,Pe={granted:{url:`https://welcome.developers.workers.dev/cf-oauth-consent-granted`},denied:{url:`https://welcome.developers.workers.dev/cf-oauth-consent-denied`,error:"Error: Consent denied. You must grant consent to cf in order to login.\nIf you don't want to do this consider passing an API token via the `CLOUDFLARE_API_TOKEN` environment variable"}},Fe=u({variableName:`CLOUDFLARE_CLIENT_ID`,defaultValue:/* @__PURE__ */ g(()=>`cbca97e7-c331-4cdd-8fd8-e25a451b98bf`,`defaultValue`)});function Z(){return e({appName:`cloudflare`,leadingDot:!1,useLegacyHomeDir:!1})}g(Z,`getCfConfigPath`);var Ie=/* @__PURE__ */ `access:read,access:write,account:read,account_api_tokens:create,agw:read,agw:run,agw:write,ai:read,ai:write,ai-search:read,ai-search:run,ai-search:write,aiaudit:read,aiaudit:write,aig:read,aig:write,auditlogs:read,billing:read,billing:write,browser:read,browser:write,cfone:read,cfone:write,cloudchamber:write,connectivity:admin,connectivity:bind,connectivity:read,constellation:write,containers:write,d1:write,dex:read,dex:write,dns_analytics:read,dns_records:edit,dns_records:read,dns_settings:read,email_routing:read,email_routing:write,email_sending:read,email_sending:write,firstpartytags:write,images:read,images:write,lb:edit,lb:read,logpush:read,logpush:write,mcp_portals:read,mcp_portals:write,notebook-examples:read,notebook-managed:read,notification:read,notification:write,oauth_account_ssl_and_certificates_write,offline,openid,pages:read,pages:write,pipelines:read,pipelines:setup,pipelines:write,query_cache:write,queues:write,r2_catalog:write,radar:read,rag:read,rag:write,registrar:read,registrar:write,secrets_store:read,secrets_store:write,sso-connector:read,sso-connector:write,ssl_certs:write,teams:pii,teams:read,teams:secure_location,teams:write,url_scanner:read,url_scanner:write,user:read,vectorize:write,workers:read,workers:write,workers_builds:read,workers_builds:write,workers_deployments:read,workers_kv:write,workers_observability:read,workers_observability:write,workers_observability_telemetry:write,workers_routes:write,workers_scripts:write,workers_tail:read,zone:read,account-analytics.read,account-ssl-and-certificates.write,ssl-and-certificates.read,ssl-and-certificates.write,registrar-domains.read,registrar-domains.admin,logs.read,logs.write,websearch.run,snippets.read,snippets.write,access-acct.read,access-acct.revoke,access-acct.write,access-app.read,access-app.revoke,access-app.write,access-audit-log.read,access-certificate.read,access-certificate.write,access-custom-page.read,access-custom-page.write,access-device-posture.read,access-device-posture.write,access-group.read,access-group.write,access-idp.read,access-idp.write,access-key.read,access-key.write,access-org.read,access-org.revoke,access-org.write,access-policy-test.read,access-policy-test.write,access-policy.read,access-policy.write,access-population.read,access-population.write,access-saml-certificate.read,access-saml-certificate.write,access-scim-log.read,access-seats.write,access-service-token.read,access-service-token.write,access-ssh-auditing.read,access-ssh-auditing.write,access-tag.read,access-tag.write,access-users.read,access-users.write,access.read,access.revoke,access.write,account-api-gateway.read,account-api-gateway.write,account-custom-asset.read,account-custom-asset.write,account-custom-error-rules.read,account-custom-error-rules.write,account-custom-pages.read,account-custom-pages.write,account-disable-esc.read,account-disable-esc.write,account-dns-settings.read,account-dns-settings.write,account-firewall-access-rules.read,account-firewall-access-rules.write,account-logs.read,account-logs.write,account-rule-lists.read,account-rule-lists.write,account-rulesets.read,account-rulesets.write,account-security-center-insights.read,account-security-center-insights.write,account-settings.read,account-settings.write,account-ssl-and-certificates.read,account-waf.read,account-waf.write,account-waiting-rooms.read,address-maps.read,address-maps.write,agent-memory.write,agw.read,agw.run,agw.write,ai-search.index,ai-search.metadata_read,ai-search.read,ai-search.run,ai-search.write,ai.read,ai.write,aiaudit.read,aiaudit.write,aig.metadata_read,aig.read,aig.run,aig.write,analytics.read,api-gateway.read,api-gateway.write,apps.write,argotunnel.read,argotunnel.write,artifacts.read,artifacts.write,bot-management-feedback.read,bot-management-feedback.write,bot-management.read,bot-management.write,browser-rendering.read,browser-rendering.write,cache-settings.read,cache-settings.write,cache.purge,calls.read,calls.write,casb.read,casb.write,cf-agents.read,cf-agents.write,challenge-widgets.read,challenge-widgets.write,chinanetwork-steering.read,chinanetwork-steering.write,cloud-connector.read,cloud-connector.write,cloud-email-security.read,cloud-email-security.write,cloudchamber.read,cloudchamber.write,cloudforce-one.read,cloudforce-one.write,config-settings.read,config-settings.write,connectivity-directory.admin,connectivity-directory.bind,connectivity-directory.read,constellation.read,constellation.write,containers.read,containers.write,custom-errors.read,custom-errors.write,custom-pages.read,custom-pages.write,d1.metadata_read,d1.read,d1.write,ddos-botnet-feed.read,ddos-botnet-feed.write,ddos-protection.read,ddos-protection.write,dls.read,dls.write,dns-firewall.read,dns-firewall.write,dns-view.read,dns-view.write,dns.read,dns.write,domain-page-shield.read,domain-page.shield,dynamic-redirect.read,dynamic-redirect.write,email-routing-account-rule.read,email-routing-address.read,email-routing-address.write,email-routing-rule.read,email-routing-rule.write,email-routing-suppression.read,email-routing-suppression.write,email-security-dmarcreports.read,email-security-dmarcreports.write,email-sending.read,email-sending.write,fbm.admin,fbm.read,fbm.write,field-extractor.read,field-extractor.write,firewall-for-ai.read,firewall-for-ai.write,firewall-services.read,firewall-services.write,flagship.evaluate,flagship.read,flagship.write,fraud-detection-pii.read,fraud-detection.read,fraud-detection.write,fraud-events.write,fraud-feedback.read,fraud-feedback.write,healthcheck.read,healthcheck.write,http-applications.read,http-applications.write,http-ddos-managed-ruleset.read,http-ddos-managed-ruleset.write,images.metadata_read,images.read,images.write,integration.write,intel.read,intel.write,iot.read,iot.write,ip-prefix-bgp-on-demand.read,ip-prefix-bgp-on-demand.write,ip-prefix.read,ip-prefix.write,k2.consume,k2.produce,k2.read,k2.write,l4-ddos-managed-ruleset.read,l4-ddos-managed-ruleset.write,load-balancers-account.read,load-balancers-account.write,load-balancers.read,load-balancers.write,load-balancing-monitors-and-pools.read,load-balancing-monitors-and-pools.write,magic-firewall.read,magic-firewall.write,magic-transit.read,magic-transit.write,magic-wan.read,magic-wan.write,managed-headers.read,managed-headers.write,mass-url-redirects.read,mass-url-redirects.write,mcp-portals.read,mcp-portals.write,memberships.read,memberships.write,messaging.edit,messaging.metadata_read,messaging.read,moq.read,moq.write,notifications.read,notifications.write,origin.read,origin.write,page-rules.read,page-rules.write,page-shield.read,page.read,page.shield,page.write,pages.metadata_read,payments-gateway.read,payments-gateway.write,pcaps-api.read,pcaps-api.write,pipelines.read,pipelines.send,pipelines.write,precursor.read,precursor.write,pubsub.read,pubsub.write,query-cache.read,query-cache.write,queues.metadata_read,queues.read,queues.write,r2-catalog-sql.read,r2-catalog.read,r2-catalog.write,radar.read,rag.read,rag.run,rag.write,realtime.admin,realtime.read,realtime.write,registrar-sandbox-domains.admin,registrar-sandbox-domains.read,reports-application-security-report.read,request-tracer.read,resource-library.read,resource-library.write,resource-sharing.read,response-compression.read,response-compression.write,sanitize.read,sanitize.write,secrets-store.read,secrets-store.write,select-configuration.read,select-configuration.write,stream.metadata_read,stream.read,stream.write,tag.read,tag.write,teams-cds-compute-account.read,teams-cds-compute-account.write,teams-connector-cloudflared.monitoring,teams-connector-cloudflared.read,teams-connector-cloudflared.write,teams-connector-warp.read,teams-connector-warp.write,teams-connectors.read,teams-connectors.write,teams-dex.read,teams-dex.write,teams-networks.read,teams-networks.write,teams-pii.read,teams-resilience.read,teams-resilience.write,teams-secure.location,teams.read,teams.report,teams.write,transform-rules.read,transform-rules.write,trust-and-safety.read,trust-and-safety.write,url-scanner.read,url-scanner.write,user-details.read,user-details.write,vectorize.read,vectorize.write,waiting-rooms.read,waiting-rooms.write,web3-hostnames.read,web3-hostnames.write,websearch.metadata_read,websearch.read,websearch.write,workers-ci.read,workers-ci.write,workers-kv-storage.metadata_read,workers-kv-storage.read,workers-kv-storage.write,workers-observability-telemetry.write,workers-observability.read,workers-observability.write,workers-r2-bucket-item.read,workers-r2-bucket-item.write,workers-r2.metadata_read,workers-r2.read,workers-r2.write,workers-routes.read,workers-routes.write,workers-scripts.bind,workers-scripts.read,workers-scripts.write,workers-tail.read,workers_ai.metadata_read,zaraz.edit,zaraz.read,zaraz.write,zone-access.read,zone-access.revoke,zone-access.write,zone-custom-asset.read,zone-custom-asset.write,zone-disable-esc.read,zone-disable-esc.write,zone-dns-settings.read,zone-dns-settings.write,zone-observability.read,zone-observability.write,zone-security-center-insights.read,zone-security-center-insights.write,zone-settings.read,zone-settings.write,zone-transform-rules.read,zone-transform-rules.write,zone-versioning.read,zone-versioning.write,zone-waf.read,zone-waf.write,zone.read,zone.write`.split(`,`),Le=/* @__PURE__ */ new Set([`billing:read`,`billing:write`,`email_routing:read`,`email_sending:read`,`notebook-managed:read`,`oauth_account_ssl_and_certificates_write`]),Re=Ie.filter(e=>!Le.has(e)),Q=[...Re];function ze(e){Q=e}g(ze,`setLoginScopeKeys`);var Be=new Set(Re);function Ve(e){return e.every(e=>Be.has(e))}g(Ve,`validateScopeKeys`);function He(){let e=r();return e===`production`?`cloudflare-temporary-account.json`:`cloudflare-temporary-account.${e}.json`}g(He,`getTemporaryAccountConfigFile`);function Ue(){return A.join(Z(),He())}g(Ue,`getCfTemporaryAccountConfigPath`);function We(e){return q(`json`,e)}g(We,`createJsonFileStorage`);var{getAuthConfigFilePath:Ge,getEncryptedAuthConfigFilePath:Ke,defaultAuthConfigStorage:qe,readAuthConfigFile:Je,writeAuthConfigFile:Ye}=Ae({getConfigPath:Z,format:`json`}),$={cliName:je,displayName:Me,commands:{login:`cf auth login`,whoami:`cf auth whoami`,createProfile:`cf auth create`,deviceLogin:`cf auth login`},keyringServiceName:X,clientId:Fe,consent:Pe,redirectUri:Ne,useDeviceFlowByDefault:!0,allowGlobalAuthKey:!1,getConfigPath:Z,getTemporaryAccountConfigPath:Ue,fileFormat:`json`,accountCachePrefix:`cloudflare-account`,cacheNamespace:`cloudflare`,getConfigFileLabel:/* @__PURE__ */ g(()=>`cf config`,`getConfigFileLabel`),getDefaultScopeKeys:/* @__PURE__ */ g(()=>Q,`getDefaultScopeKeys`)},Xe=j(Z),{readUserPreferences:Ze,updateUserPreferences:Qe}=Xe;function $e(e){return Ee($,e)}g($e,`createCfAuth`);function et(e){return Y({logger:e.logger,getConfigPath:Z,keyringServiceName:X,format:`json`})}g(et,`createCfProfileStore`);var tt=ke({loginCommand:$.commands.login,createProfileCommand:$.commands.createProfile,keyringServiceName:X,getConfigPath:Z,format:`json`,preferences:Xe});function nt(e,t){return tt.setKeyringPreference(e,t)}g(nt,`setKeyringPreference`);export{Ve as a,Z as i,et as n,We as r,$e as t};