cf 1.0.0-beta.29 → 1.0.0-beta.30

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 (237) hide show
  1. package/dist/_meta/commands.json +584 -96
  2. package/dist/_meta/hand-written-commands.json +7 -1
  3. package/dist/_meta/schemas.json +182 -48
  4. package/dist/{abuse-reports-DqXYX_6F.mjs → abuse-reports-Dzop8iDe.mjs} +1 -1
  5. package/dist/{access-Cte4yyIz.mjs → access-2NeD3Gu8.mjs} +1 -1
  6. package/dist/{accounts-G-x-_cEx.mjs → accounts-CeJbhhX4.mjs} +1 -1
  7. package/dist/{acm-Bg3HqMGG.mjs → acm-Dub0B14J.mjs} +1 -1
  8. package/dist/{addressing-BwEofGEm.mjs → addressing-BzWJU8m6.mjs} +1 -1
  9. package/dist/{agent-memory-DhwZ2KRw.mjs → agent-memory-2l9zyQFA.mjs} +1 -1
  10. package/dist/{ai-audit-CMEBz6ZP.mjs → ai-audit-rgNePq5W.mjs} +1 -1
  11. package/dist/{ai-gateway-D2s0isU-.mjs → ai-gateway-e9b8CcL6.mjs} +2 -2
  12. package/dist/{ai-DWWRIQIt.mjs → ai-laLv3daG.mjs} +1 -1
  13. package/dist/{ai-search-a0uqr9yJ.mjs → ai-search-DZ0AqoPe.mjs} +1 -1
  14. package/dist/{ai-security-H_RqjRoL.mjs → ai-security-CQuBTtmw.mjs} +1 -1
  15. package/dist/{alerting-Bgp9rE4I.mjs → alerting-_4ra-f_v.mjs} +1 -1
  16. package/dist/{analytics-CFYM82FD.mjs → analytics-DLNn4bJ4.mjs} +1 -1
  17. package/dist/{analytics-engine-BLiEaLxb.mjs → analytics-engine-CY45yWuL.mjs} +1 -1
  18. package/dist/{api-security-B0YtHglt.mjs → api-security-BSvJAjJV.mjs} +1 -1
  19. package/dist/{argo-BPwbzHY7.mjs → argo-xzl0p--1.mjs} +1 -1
  20. package/dist/{artifacts-B6UwC2PH.mjs → artifacts-DAS14gcM.mjs} +1 -1
  21. package/dist/{audit-logs-kG97iEnI.mjs → audit-logs-3nYyCGQA.mjs} +1 -1
  22. package/dist/auth-B0mFB6nU.mjs +3 -0
  23. package/dist/auth-CXR2vsII.mjs +2 -0
  24. package/dist/{auth-DA1PHaHi.mjs → auth-cj71dGxS.mjs} +1 -1
  25. package/dist/{auth-token-CE3Wa5-b.mjs → auth-token-D9MnaZ-L.mjs} +1 -1
  26. package/dist/{autoconfig-B4tFR6ua.mjs → autoconfig-DoLQ5ct8.mjs} +1 -1
  27. package/dist/{basin-catalog-DzVEPupy.mjs → basin-catalog-BbCsAKyZ.mjs} +1 -1
  28. package/dist/{billing-TERxOuLR.mjs → billing-BsiLsjWJ.mjs} +1 -1
  29. package/dist/{blocks-C3Im7AT0.mjs → blocks-DK5qAzLe.mjs} +1 -1
  30. package/dist/{body-unions-D9OSaf4M.mjs → body-unions-QFGGUlIr.mjs} +1 -1
  31. package/dist/{bot-management-SZw9jTOC.mjs → bot-management-DkErOsIO.mjs} +1 -1
  32. package/dist/{botnet-feed-DjdAeUtb.mjs → botnet-feed-CK4_PKrf.mjs} +1 -1
  33. package/dist/{brand-protection-BpA7Gmf1.mjs → brand-protection-Czt-2Ei5.mjs} +1 -1
  34. package/dist/{browser-run-BvjfMK3f.mjs → browser-run-DLMdEaSJ.mjs} +20 -20
  35. package/dist/build-ByjJ6yIB.mjs +2 -0
  36. package/dist/{build-yQOzZg6Z.mjs → build-DiEXOgHH.mjs} +1 -1
  37. package/dist/{builds-tMa3sbQU.mjs → builds-D--zUbR2.mjs} +1 -1
  38. package/dist/{cache-b_EPh6Is.mjs → cache-C8PQmkjD.mjs} +1 -1
  39. package/dist/{cf-DmvZ2L51.mjs → cf-QIG83e0V.mjs} +6 -6
  40. package/dist/{chunk-DSGVRFIS-Cj7pO-YQ.mjs → chunk-DSGVRFIS-CeCM3XGQ.mjs} +1 -1
  41. package/dist/{chunk-Q5KVZMHK-WOCEMyET.mjs → chunk-Q5KVZMHK-Bjvrcihk.mjs} +2 -2
  42. package/dist/{cli-Cc7ujzAy.mjs → cli-BBv5YMan.mjs} +1 -1
  43. package/dist/{client-side-security-DVkeCzcC.mjs → client-side-security-CFxePUL9.mjs} +1 -1
  44. package/dist/{cloud-connector-MVf4acRR.mjs → cloud-connector-BitfLQ3s.mjs} +1 -1
  45. package/dist/{cloudflared-BOkMl8Gm.mjs → cloudflared-DKh4JK7j.mjs} +1 -1
  46. package/dist/{cloudforce-one-KrCfQbRx.mjs → cloudforce-one-D2dzA7VD.mjs} +1 -1
  47. package/dist/{command-C4_lMRkw.mjs → command-B6ustzcW.mjs} +1 -1
  48. package/dist/{command-DqOU7Ql2.mjs → command-BC_nezLE.mjs} +1 -1
  49. package/dist/{command-CJ3ldWrA.mjs → command-BORazCDG.mjs} +1 -1
  50. package/dist/{command-DONwHpqZ.mjs → command-BwcAuPBr.mjs} +1 -1
  51. package/dist/{command-HW7k43qu.mjs → command-C2HYwGn_.mjs} +1 -1
  52. package/dist/{command-NqM0lo4a.mjs → command-CQhD3Q1t.mjs} +1 -1
  53. package/dist/{command-DHODgfFZ.mjs → command-D5FrTb2N.mjs} +1 -1
  54. package/dist/{command-D2XkyO1e.mjs → command-DoXuskBZ.mjs} +1 -1
  55. package/dist/{command-bwVDyMv4.mjs → command-Xqidhyr_.mjs} +1 -1
  56. package/dist/{command-BQbZw4Kx.mjs → command-aeKPI1bt.mjs} +1 -1
  57. package/dist/{command-yzqs4m83.mjs → command-b1KxgQwf.mjs} +1 -1
  58. package/dist/{command-DdYnSf-8.mjs → command-iwrZ2Sb1.mjs} +1 -1
  59. package/dist/{command-DIIaZx_f.mjs → command-n7QausoH.mjs} +1 -1
  60. package/dist/{command-BVct0Dvr.mjs → command-s15KaL-x.mjs} +1 -1
  61. package/dist/{command-CyOdBNur.mjs → command-ycXauMSv.mjs} +1 -1
  62. package/dist/{completions-0YKvIyBT.mjs → completions-BAUSggys.mjs} +1 -1
  63. package/dist/{connector-interrupts-CsunbRsr.mjs → connector-interrupts-D9tI84Fk.mjs} +1 -1
  64. package/dist/{connector-telemetry-events-DmQPD7xC.mjs → connector-telemetry-events-Bs9wLYwc.mjs} +1 -1
  65. package/dist/{connector-telemetry-snapshots-C62iHjC9.mjs → connector-telemetry-snapshots-CbwE4lrE.mjs} +1 -1
  66. package/dist/{connectors-Bg0MU6ZT.mjs → connectors-LyJN1htu.mjs} +1 -1
  67. package/dist/{containers-BiA_bpPR.mjs → containers-CKs7ZyZq.mjs} +2 -2
  68. package/dist/{content-scan-4SA2nacB.mjs → content-scan-BQRz7C7Z.mjs} +1 -1
  69. package/dist/{context-BGm5_wTT.mjs → context-DlFhI9cN.mjs} +1 -1
  70. package/dist/{cps-WDmD3V5I.mjs → cps-DYlXx89C.mjs} +1 -1
  71. package/dist/{csam-scanner-Rmy-hBEA.mjs → csam-scanner-BFANxGD-.mjs} +1 -1
  72. package/dist/{custom-csrs-D-lvkyRV.mjs → custom-csrs-BX4aCeof.mjs} +1 -1
  73. package/dist/{custom-hostnames-B5BQX5m6.mjs → custom-hostnames-BRYABKN3.mjs} +1 -1
  74. package/dist/{custom-nameservers-CZrRjcjx.mjs → custom-nameservers-CP1Vf1TD.mjs} +1 -1
  75. package/dist/{custom-pages-CWwjtfbj.mjs → custom-pages-BNL69ToU.mjs} +1 -1
  76. package/dist/{d1-N81q-FAr.mjs → d1-D4AZsUKn.mjs} +1 -1
  77. package/dist/{delegate-livNdiwK.mjs → delegate-BKlomUk6.mjs} +1 -1
  78. package/dist/delegate.mjs +1 -1
  79. package/dist/{deploy-Ok4ncy06.mjs → deploy-LbXgSfAd.mjs} +1 -1
  80. package/dist/{deploy-context-B_lLfxt7.mjs → deploy-context-BYw6gbl-.mjs} +9 -9
  81. package/dist/{deploy-input-JZlEJwKB.mjs → deploy-input-BFWpjDVr.mjs} +1 -1
  82. package/dist/{dev-DxbkJkzc.mjs → dev-DaFSd8WC.mjs} +1 -1
  83. package/dist/{diagnostics-DlJzpO8b.mjs → diagnostics-Dk3pyWx_.mjs} +1 -1
  84. package/dist/disk-cache-nbuwH1Dh.mjs +2 -0
  85. package/dist/{dist-BxhwE-W1.mjs → dist-DwxlJ9Ms.mjs} +4 -1
  86. package/dist/{dls-5OXuxLAB.mjs → dls-DU6EdhQK.mjs} +1 -1
  87. package/dist/{dns-Burep9O7.mjs → dns-3QDtCu6f.mjs} +1 -1
  88. package/dist/{dns-firewall-hUHaQ0DE.mjs → dns-firewall-Bbrr_0_a.mjs} +1 -1
  89. package/dist/{docs-BFVK88kB.mjs → docs-lLLKcLr_.mjs} +1 -1
  90. package/dist/{dry-run-qsnRlRk6.mjs → dry-run-mrA7FFLR.mjs} +1 -1
  91. package/dist/{durable-objects-D6R8S2Dk.mjs → durable-objects-DPf1DMeq.mjs} +1 -1
  92. package/dist/{email-auth--2KCzZNA.mjs → email-auth-DOlEoi8q.mjs} +1 -1
  93. package/dist/{email-routing-DzaExfVf.mjs → email-routing-D56SPGty.mjs} +1 -1
  94. package/dist/{email-security-DwQJszzy.mjs → email-security-CSawx0kD.mjs} +1 -1
  95. package/dist/{email-sending-mQd2qB-o.mjs → email-sending-CgFi0cLA.mjs} +1 -1
  96. package/dist/{errors-C_bGcR0X.mjs → errors-CilNjDVk.mjs} +1 -1
  97. package/dist/{field-extractors-MVOizTlB.mjs → field-extractors-FvIgySB4.mjs} +1 -1
  98. package/dist/{firewall-DtSIlkfL.mjs → firewall-BrTvywhW.mjs} +1 -1
  99. package/dist/{flagship-9E5gwNki.mjs → flagship-BGFN1Epo.mjs} +1 -1
  100. package/dist/{fraud-DjqhVJdf.mjs → fraud-DzK6OIO3.mjs} +1 -1
  101. package/dist/{google-tag-gateway-BM5GmCZa.mjs → google-tag-gateway-Cd9v8A7Z.mjs} +1 -1
  102. package/dist/{healthchecks-CEZ5f3XJ.mjs → healthchecks-Cm7EHaBA.mjs} +1 -1
  103. package/dist/{hyperdrive-Da8hCcUw.mjs → hyperdrive-CVaSt0qX.mjs} +1 -1
  104. package/dist/{iam-BK6N7NdQ.mjs → iam-CWN62Mi4.mjs} +1 -1
  105. package/dist/{images-3bCWE6Ml.mjs → images-Bo_pdvQC.mjs} +1 -1
  106. package/dist/index.mjs +1 -1
  107. package/dist/{init-BgCF9K8h.mjs → init-Dwmpc_S-.mjs} +1 -1
  108. package/dist/{intel-BQ58CJLt.mjs → intel-CQFYeGEA.mjs} +1 -1
  109. package/dist/{interactive-JBA3qOUa.mjs → interactive-DCbIwYxy.mjs} +1 -1
  110. package/dist/{internal-CWPz0sBF.mjs → internal-CYrPZ9IX.mjs} +1 -1
  111. package/dist/{ips-3WYegiVW.mjs → ips-jTSzoqMU.mjs} +1 -1
  112. package/dist/{k2-Bc_hjmiv.mjs → k2-utE2lCYd.mjs} +1 -1
  113. package/dist/{kv-DbShBhhg.mjs → kv-Cdh5hHte.mjs} +1 -1
  114. package/dist/{lazy-command-CbGyEqFK.mjs → lazy-command-QoHlmXHW.mjs} +1 -1
  115. package/dist/{leaked-credential-checks-DgPefxP9.mjs → leaked-credential-checks-CqApscD3.mjs} +1 -1
  116. package/dist/{live-BTtMv1a6.mjs → live-hZgMkXJf.mjs} +1 -1
  117. package/dist/{load-balancers-C2hg52WA.mjs → load-balancers-w_4Uz9Gi.mjs} +1 -1
  118. package/dist/login-BBSJytOt.mjs +2 -0
  119. package/dist/{login-DiR-buzS.mjs → login-CS3KxVbk.mjs} +2 -2
  120. package/dist/{logpush-CitvUX-J.mjs → logpush-C76I5dgN.mjs} +1 -1
  121. package/dist/{logs-CfWHu4Ir.mjs → logs-B5aCYVCv.mjs} +1 -1
  122. package/dist/{magic-network-monitoring-gU6yzzML.mjs → magic-network-monitoring-CGf7cVQ9.mjs} +1 -1
  123. package/dist/{magic-transit-B3JY9u5o.mjs → magic-transit-CN5noqOR.mjs} +1 -1
  124. package/dist/{managed-defense-C_EQ-NYp.mjs → managed-defense-DAGr0UGm.mjs} +1 -1
  125. package/dist/{managed-transforms-DIGl6JkM.mjs → managed-transforms-_SuwzZ-5.mjs} +1 -1
  126. package/dist/{mcp-DqhQJVaz.mjs → mcp-CzedsjOf.mjs} +1 -1
  127. package/dist/{mesh-DXVZBNDC.mjs → mesh-DXX1S3pX.mjs} +1 -1
  128. package/dist/{migrate-CmXyk9vX.mjs → migrate-CvRQ4x3_.mjs} +1 -1
  129. package/dist/{monetization-CWg-mySr.mjs → monetization-8nt9PYln.mjs} +1 -1
  130. package/dist/{network-jtgq5eb4.mjs → network-CaiRDY2e.mjs} +1 -1
  131. package/dist/{network-interconnects-DhfKL5tG.mjs → network-interconnects-Ad6JbAVd.mjs} +1 -1
  132. package/dist/{o11y-eYYs59X9.mjs → o11y-DD2Hfnzi.mjs} +1 -1
  133. package/dist/{oauth-BgDZMd72.mjs → oauth-BUcV_xbm.mjs} +1 -1
  134. package/dist/{oauth-V37G-PaV.mjs → oauth-CQRlNgt5.mjs} +1 -1
  135. package/dist/{observability-CB72eC4T.mjs → observability-BzKBUUSf.mjs} +1 -1
  136. package/dist/{ohttp-gateway-K9ToEft8.mjs → ohttp-gateway-Sej9-GCm.mjs} +1 -1
  137. package/dist/{organizations-BllV7l_c.mjs → organizations-DwYsCbYD.mjs} +1 -1
  138. package/dist/{output-hFMAotFl.mjs → output-PRKYaJuo.mjs} +1 -1
  139. package/dist/package-DXaRIx2f.mjs +2 -0
  140. package/dist/{page-rules-BVmi-ZFW.mjs → page-rules-CjufEmIt.mjs} +1 -1
  141. package/dist/{pages-5spcBpX1.mjs → pages-Dj0Cdf3G.mjs} +2 -2
  142. package/dist/{pay-per-crawl-BgsdGcBi.mjs → pay-per-crawl-DPVlluRA.mjs} +1 -1
  143. package/dist/{pay-per-use-CzmI1kEA.mjs → pay-per-use-DhuLjaoo.mjs} +1 -1
  144. package/dist/{pipelines-CbtmLRxt.mjs → pipelines-D2pM69oq.mjs} +12 -10
  145. package/dist/{precursor-Dk8YOKf_.mjs → precursor-DzuA1m8D.mjs} +1 -1
  146. package/dist/{previews-Bv1HMMtO.mjs → previews-CHHd5Rx7.mjs} +1 -1
  147. package/dist/{progress-DE_G09u2.mjs → progress-AML-AVs4.mjs} +1 -1
  148. package/dist/prompt-Bnon9lfK.mjs +4 -0
  149. package/dist/{queues-DGCYUr4g.mjs → queues-GDwznw0o.mjs} +1 -1
  150. package/dist/{r2-DtCk-Nfi.mjs → r2-B3Xkb0S4.mjs} +49 -49
  151. package/dist/{radar-1CwqOsMZ.mjs → radar-fBT7VIO2.mjs} +1 -1
  152. package/dist/{raw-fetch-DhlyWQtk.mjs → raw-fetch-0T1SwPa1.mjs} +1 -1
  153. package/dist/{ready-CcoEA7M7.mjs → ready-BkXNDNTd.mjs} +1 -1
  154. package/dist/{realtime-DFUxwIG5.mjs → realtime-B7mR3XtY.mjs} +1 -1
  155. package/dist/{registrar-Cl1snz8z.mjs → registrar-DOoxlZc7.mjs} +9 -9
  156. package/dist/{registrar-sandbox-Cne9BVCZ.mjs → registrar-sandbox-DC7xAqqc.mjs} +1 -1
  157. package/dist/{reporting-D9FC-Z-3.mjs → reporting-DlD7J6Pq.mjs} +1 -1
  158. package/dist/{request-headers-Bopp5lH_.mjs → request-headers-BEYXy4JN.mjs} +1 -1
  159. package/dist/{request-tracers-CSSB9_aW.mjs → request-tracers-DYCGkszp.mjs} +1 -1
  160. package/dist/{resource-sharing-D8yuzJm7.mjs → resource-sharing-D_bUv7E8.mjs} +1 -1
  161. package/dist/{rules-DzmOQ3MB.mjs → rules-C4cu3_jr.mjs} +1 -1
  162. package/dist/{rulesets-DsTGcgbc.mjs → rulesets-Bl4mLnXA.mjs} +1 -1
  163. package/dist/{rum-DrJLI93T.mjs → rum-DE_uJb09.mjs} +1 -1
  164. package/dist/run-Cg9utScS.mjs +2 -0
  165. package/dist/{run-CXWkMU3x.mjs → run-DAg7dfIW.mjs} +1 -1
  166. package/dist/sanitize-DHx5dAJu.mjs +2 -0
  167. package/dist/{schema-CfZOW8Zw.mjs → schema-BX822YfT.mjs} +1 -1
  168. package/dist/schema-cache-CTVUtkAl.mjs +3 -0
  169. package/dist/{schema-flags-DO3kLYBu.mjs → schema-flags-YgeJ6Bey.mjs} +1 -1
  170. package/dist/{scim-0OufLKru.mjs → scim-Dz4r0fnH.mjs} +1 -1
  171. package/dist/{secrets-store-BQeLzFxv.mjs → secrets-store-C2GwCUKs.mjs} +1 -1
  172. package/dist/{security-insights-D2pj8-O-.mjs → security-insights-DZCm5D3U.mjs} +1 -1
  173. package/dist/{security-txt-SKtgW4n-.mjs → security-txt-Dbi9KxNc.mjs} +1 -1
  174. package/dist/session-BEsQIuwP.mjs +2 -0
  175. package/dist/{shared-D_2KLpP3.mjs → shared-DqW2vICA.mjs} +1 -1
  176. package/dist/{signed-url-CcE2zQ4Y.mjs → signed-url-BhHSAUam.mjs} +1 -1
  177. package/dist/{smart-shield-Dod9Gs6T.mjs → smart-shield-C2uSFcGN.mjs} +1 -1
  178. package/dist/{snippets-DrrdpLnS.mjs → snippets-BoaGEAC6.mjs} +1 -1
  179. package/dist/{spawn-DNf-Ge8d.mjs → spawn-B4y5Urjv.mjs} +1 -1
  180. package/dist/{spectrum-CHBGZbZF.mjs → spectrum-Bb0KXA8R.mjs} +1 -1
  181. package/dist/{speed-vOlHyG3v.mjs → speed-zKYgLTHA.mjs} +1 -1
  182. package/dist/{sql-BCuLxGSf.mjs → sql-pjWozuvl.mjs} +1 -1
  183. package/dist/src-B8i6_XGg.mjs +133 -0
  184. package/dist/{ssl-BA_dcVwF.mjs → ssl-C5bg1X0i.mjs} +1 -1
  185. package/dist/{startup-profile-uh-F0HRS.mjs → startup-profile-CyIelqtC.mjs} +1 -1
  186. package/dist/startup-profile-Dif7XOsU.mjs +2 -0
  187. package/dist/{state-CTLznbVs.mjs → state-BI_wSuID.mjs} +1 -1
  188. package/dist/state-xUh3Z77T.mjs +2 -0
  189. package/dist/{static-assets-DGDoaJf1.mjs → static-assets-CTv7XwIQ.mjs} +3 -3
  190. package/dist/{stream-CzlqY8hq.mjs → stream-C_FiNrLV.mjs} +1 -1
  191. package/dist/string-width-D6-CGlwN.mjs +2 -0
  192. package/dist/{tags-BLeaslAb.mjs → tags-CXlivF3y.mjs} +1 -1
  193. package/dist/{telemetry-DF7A5Bpk.mjs → telemetry-CtQWhsmy.mjs} +1 -1
  194. package/dist/telemetry-DDs3zhdw.mjs +2 -0
  195. package/dist/{tenant-custom-nameservers-C5rh6jPf.mjs → tenant-custom-nameservers-DBg9Hzvn.mjs} +1 -1
  196. package/dist/{tenants-CRirmhxS.mjs → tenants-89Q0u5_Q.mjs} +1 -1
  197. package/dist/{tools-BRjRgZnj.mjs → tools-aVtEAIvu.mjs} +1 -1
  198. package/dist/{tunnels-nLfIWPYT.mjs → tunnels-CL2fIINH.mjs} +2 -2
  199. package/dist/{turnstile-CZjXtBCr.mjs → turnstile-D6GtQULo.mjs} +1 -1
  200. package/dist/ui-CY75N4Tm.mjs +2 -0
  201. package/dist/{update-check-CXMdVBhW.mjs → update-check-0kpbTLvy.mjs} +1 -1
  202. package/dist/{update-check-D_Oky9-u.mjs → update-check-D3axIoUi.mjs} +1 -1
  203. package/dist/update-check-worker.mjs +1 -1
  204. package/dist/{url-normalization-DTKgJHE8.mjs → url-normalization--iS57OT_.mjs} +1 -1
  205. package/dist/{url-scanner-9XW3zLaU.mjs → url-scanner-C6AtXGc2.mjs} +1 -1
  206. package/dist/{user-Bk1BIqZ5.mjs → user-C5vRYIta.mjs} +1 -1
  207. package/dist/{vectorize-CgOfmWYq.mjs → vectorize-C1Kxb1Ou.mjs} +1 -1
  208. package/dist/version-pcpa_kv3.mjs +2 -0
  209. package/dist/{waiting-rooms-C3nTKfK9.mjs → waiting-rooms-BCVZY9vI.mjs} +1 -1
  210. package/dist/{web-assets-CWU3jrit.mjs → web-assets-D2gXqKZS.mjs} +1 -1
  211. package/dist/{web3-CRpQ5sl4.mjs → web3-CJDZQCOk.mjs} +1 -1
  212. package/dist/whoami-2eFTt0-Y.mjs +2 -0
  213. package/dist/whoami-BEad9QUB.mjs +8 -0
  214. package/dist/{workers-BZMvamn0.mjs → workers-DzXSJMv9.mjs} +2 -2
  215. package/dist/{workers-for-platforms-C7F2ev-5.mjs → workers-for-platforms-CvazgrqD.mjs} +2 -2
  216. package/dist/{workers-vpc-ztEKvWmq.mjs → workers-vpc-DP4QC6UC.mjs} +1 -1
  217. package/dist/{workflows-Dd88_Nqc.mjs → workflows-BSOj56io.mjs} +1 -1
  218. package/dist/{wrangler-migration-BzMTJPdI.mjs → wrangler-migration-DZ9Oelof.mjs} +6 -3
  219. package/dist/{zaraz-BFK0p28R.mjs → zaraz-BnQvKXFy.mjs} +1 -1
  220. package/dist/{zero-trust-Cdjfp0Ie.mjs → zero-trust-DsslXRub.mjs} +1 -1
  221. package/dist/{zones-DDn5jk6I.mjs → zones-DQ3SjGsZ.mjs} +1 -1
  222. package/package.json +14 -13
  223. package/dist/auth-Czr8ChBB.mjs +0 -2
  224. package/dist/auth-Dwfa4S3h.mjs +0 -7
  225. package/dist/build-CCwo_ydV.mjs +0 -2
  226. package/dist/login-CK3nn9a5.mjs +0 -2
  227. package/dist/package-oNVeacC9.mjs +0 -2
  228. package/dist/prompt-D274Im1O.mjs +0 -4
  229. package/dist/run-C5yPsiO2.mjs +0 -2
  230. package/dist/schema-cache-CtqAs0PP.mjs +0 -3
  231. package/dist/session-COdP8BXD.mjs +0 -2
  232. package/dist/src-ByCoEqOw.mjs +0 -133
  233. package/dist/startup-profile-CyQk_f_L.mjs +0 -2
  234. package/dist/state-B6r-b_-d.mjs +0 -2
  235. package/dist/telemetry-COlodX5Z.mjs +0 -2
  236. package/dist/ui-dWsVmFCG.mjs +0 -2
  237. package/dist/version-CcuBNjqg.mjs +0 -2
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{c as e}from"./build-yQOzZg6Z.mjs";import{existsSync as t,readFileSync as n,statSync as r}from"node:fs";import{dirname as i,join as a,sep as o}from"node:path";const s={esm:`esm`,cjs:`commonjs`,python:`python`,"python-requirement":`python-requirement`,wasm:`compiled-wasm`,text:`text`,data:`buffer`,json:`text`};function c(e,t,n,r,a){let o=process.cwd(),s=t.main??``;return{entry:{file:s,projectRoot:o,configPath:e.configPath,format:`modules`,moduleRoot:s?i(s):e.bundleDir??``,exports:[]},name:e.config.name,compatibilityDate:t.compatibility_date,compatibilityFlags:t.compatibility_flags??[],assetsDir:p(e,t),main:t.main??void 0,keepVars:t.keep_vars??!1,dryRun:r[`dry-run`],env:void 0,outfile:void 0,tag:r.tag,message:r.message,secretsFile:r[`secrets-file`],experimentalAutoCreate:!0,accountId:n,sendMetrics:!1,resourcesProvision:!0,skipProvisioningConfigWriteback:!0,skipLastDeployedFromApiCheck:!1,containers:a,cliVars:{},isWorkersSite:!1,useServiceEnvApiPath:!1}}function l(e,t,n,r,i){return{...c(e,t,n,r,i),command:`deploy`,resourcesProvision:r.provision??!0,containersRollout:r[`containers-rollout`],triggers:t.triggers?.crons,routes:f(t),logpush:t.logpush,dispatchNamespace:r[`dispatch-namespace`],strict:!r.force,strictModeAbortMessage:"Aborting the upload operation because of conflicts. Rerun with `cf deploy --force` to override and upload anyway.",legacyAssetPaths:void 0,oldAssetTtl:void 0}}function u(e,t,n,r,i){return{...c(e,t,n,r,i),command:`versions upload`,strict:!0,previewAlias:r[`preview-alias`]}}function d(e,t,n,r){return{config:t,accountId:n,scriptName:t.name??e.config.name,crons:t.triggers?.crons,routes:f(t),firstDeploy:!1,dryRun:r[`dry-run`],validated:!1}}function f(e){return e.routes?e.routes:e.route?[e.route]:[]}function p(t,n){let r=t.assetsDir;if(!r)return;let i=!!n.main,a=n.assets?.run_worker_first;if(!i&&a)throw new e(`assets.run_worker_first requires a Worker entrypoint, but no main module is configured.`);return{directory:r,binding:n.assets?.binding,directoryExists:!0}}function m(i,o){if(!o.manifest||!i.bundleDir)return{modules:[],sourceMaps:void 0,dependencies:{},resolvedEntryPointPath:``,bundleType:`esm`,content:``};let{mainModule:c,modules:l}=o.manifest;h(c,i.bundleDir);let u=a(i.bundleDir,c);if(!t(u))throw new e(`Main module not found: ${u}`);let d=l?.[c]?.type??`esm`;if(d===`sourcemap`)throw new e(`Main module "${c}" cannot be a sourcemap.`);let f=n(u,`utf8`),p=s[d],m=[],g=[],_={};if(_[u]={bytesInOutput:r(u).size},l)for(let[o,u]of Object.entries(l)){if(o===c)continue;h(o,i.bundleDir);let l=a(i.bundleDir,o);if(u.type===`sourcemap`){if(!t(l))throw new e(`Module not found: ${l}`);g.push({name:o,content:n(l,`utf8`)});continue}if(!t(l))throw new e(`Module not found: ${l}`);let d=u.type===`wasm`||u.type===`data`?n(l):n(l,`utf8`);m.push({name:o,filePath:l,content:d,type:s[u.type]}),_[l]={bytesInOutput:r(l).size}}return{modules:m,sourceMaps:g.length>0?g:void 0,dependencies:_,resolvedEntryPointPath:u,bundleType:p,content:f}}function h(t,n){let r=a(n,t);if(r!==n&&!r.startsWith(n+o))throw new e(`Module path "${t}" escapes the bundle directory.`)}export{u as i,l as n,d as r,m as t};
2
+ import{c as e}from"./build-DiEXOgHH.mjs";import{existsSync as t,readFileSync as n,statSync as r}from"node:fs";import{dirname as i,join as a,sep as o}from"node:path";const s={esm:`esm`,cjs:`commonjs`,python:`python`,"python-requirement":`python-requirement`,wasm:`compiled-wasm`,text:`text`,data:`buffer`,json:`text`};function c(e,t,n,r,a){let o=process.cwd(),s=t.main??``;return{entry:{file:s,projectRoot:o,configPath:e.configPath,format:`modules`,moduleRoot:s?i(s):e.bundleDir??``,exports:[]},name:e.config.name,compatibilityDate:t.compatibility_date,compatibilityFlags:t.compatibility_flags??[],assetsDir:p(e,t),main:t.main??void 0,keepVars:t.keep_vars??!1,dryRun:r[`dry-run`],env:void 0,outfile:void 0,tag:r.tag,message:r.message,secretsFile:r[`secrets-file`],experimentalAutoCreate:!0,accountId:n,sendMetrics:!1,resourcesProvision:!0,skipProvisioningConfigWriteback:!0,skipLastDeployedFromApiCheck:!1,containers:a,cliVars:{},isWorkersSite:!1,useServiceEnvApiPath:!1}}function l(e,t,n,r,i){return{...c(e,t,n,r,i),command:`deploy`,resourcesProvision:r.provision??!0,containersRollout:r[`containers-rollout`],triggers:t.triggers?.crons,routes:f(t),logpush:t.logpush,dispatchNamespace:r[`dispatch-namespace`],strict:!r.force,strictModeAbortMessage:"Aborting the upload operation because of conflicts. Rerun with `cf deploy --force` to override and upload anyway.",legacyAssetPaths:void 0,oldAssetTtl:void 0}}function u(e,t,n,r,i){return{...c(e,t,n,r,i),command:`versions upload`,strict:!0,previewAlias:r[`preview-alias`]}}function d(e,t,n,r){return{config:t,accountId:n,scriptName:t.name??e.config.name,crons:t.triggers?.crons,routes:f(t),firstDeploy:!1,dryRun:r[`dry-run`],validated:!1}}function f(e){return e.routes?e.routes:e.route?[e.route]:[]}function p(t,n){let r=t.assetsDir;if(!r)return;let i=!!n.main,a=n.assets?.run_worker_first;if(!i&&a)throw new e(`assets.run_worker_first requires a Worker entrypoint, but no main module is configured.`);return{directory:r,binding:n.assets?.binding,directoryExists:!0}}function m(i,o){if(!o.manifest||!i.bundleDir)return{modules:[],sourceMaps:void 0,dependencies:{},resolvedEntryPointPath:``,bundleType:`esm`,content:``};let{mainModule:c,modules:l}=o.manifest;h(c,i.bundleDir);let u=a(i.bundleDir,c);if(!t(u))throw new e(`Main module not found: ${u}`);let d=l?.[c]?.type??`esm`;if(d===`sourcemap`)throw new e(`Main module "${c}" cannot be a sourcemap.`);let f=n(u,`utf8`),p=s[d],m=[],g=[],_={};if(_[u]={bytesInOutput:r(u).size},l)for(let[o,u]of Object.entries(l)){if(o===c)continue;h(o,i.bundleDir);let l=a(i.bundleDir,o);if(u.type===`sourcemap`){if(!t(l))throw new e(`Module not found: ${l}`);g.push({name:o,content:n(l,`utf8`)});continue}if(!t(l))throw new e(`Module not found: ${l}`);let d=u.type===`wasm`||u.type===`data`?n(l):n(l,`utf8`);m.push({name:o,filePath:l,content:d,type:s[u.type]}),_[l]={bytesInOutput:r(l).size}}return{modules:m,sourceMaps:g.length>0?g:void 0,dependencies:_,resolvedEntryPointPath:u,bundleType:p,content:f}}function h(t,n){let r=a(n,t);if(r!==n&&!r.startsWith(n+o))throw new e(`Module path "${t}" escapes the bundle directory.`)}export{u as i,l as n,d as r,m as t};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BGHWSKCw.mjs";import{i as t,r as n}from"./autoconfig-B4tFR6ua.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";import"./ui-dWsVmFCG.mjs";import{n as i,t as a}from"./spawn-DNf-Ge8d.mjs";const o={command:`dev [implArgs..]`,describe:`Run the project's Cloudflare dev server`,builder:t=>t.positional(`implArgs`,{type:`string`,array:!0,describe:`Arguments forwarded to the selected development server`}).parserConfiguration({"unknown-options-as-args":!0,"populate--":!0,"parse-positional-numbers":!1,"camel-case-expansion":!1}).epilogue(`cf dev starts the appropriate development server for your project. It runs your framework's dev command when available, falling back to an installed Cloudflare dev server.
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import{i as t,r as n}from"./autoconfig-DoLQ5ct8.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";import"./ui-CY75N4Tm.mjs";import{n as i,t as a}from"./spawn-B4y5Urjv.mjs";const o={command:`dev [implArgs..]`,describe:`Run the project's Cloudflare dev server`,builder:t=>t.positional(`implArgs`,{type:`string`,array:!0,describe:`Arguments forwarded to the selected development server`}).parserConfiguration({"unknown-options-as-args":!0,"populate--":!0,"parse-positional-numbers":!1,"camel-case-expansion":!1}).epilogue(`cf dev starts the appropriate development server for your project. It runs your framework's dev command when available, falling back to an installed Cloudflare dev server.
3
3
 
4
4
  Arguments are forwarded to the selected development server. Supported arguments depend on that server. Use ${e.brand(`--`)} to separate server arguments from cf options; it does not bypass server validation. ${e.brand(`--mode`)} is forwarded when the selected framework supports it.`),handler:async e=>{let o=process.cwd(),{details:s}=await n(o),c=[...e.implArgs??[],...e[`--`]??[]],l=e.mode?[`--mode`,e.mode]:[],u=e.profile===void 0?{}:{CLOUDFLARE_AUTH_PROFILE:e.profile};if(s?.devCommand){if(e.mode&&!s.framework?.supportsMode)throw Error(`The detected command \`${s.devCommand}\` does not currently support \`--mode\`.`);let n=await t(s.devCommand,o,{preferLocal:!0,env:{...s.env,...u},args:[...l,...c],output:`inherit`});throw new r(n.exitCode,{signal:n.signal})}let d=i(o),f=await a(d,`dev`,[...l,...c],{env:u,output:`inherit`});throw new r(f.exitCode,{signal:f.signal})}};export{o as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{r as n,t as r}from"./body-parser-HN91kAf0.mjs";import{a as i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./dry-run-qsnRlRk6.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import{t as u}from"./output-hFMAotFl.mjs";import{t as d}from"./progress-DE_G09u2.mjs";import{a as f,i as p,n as m}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/diagnostics/endpoint-healthchecks`,body:`json`,constants:{check_type:`icmp`}};function g(e){return e.usage(`$0 diagnostics endpoint-healthchecks create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{r as n,t as r}from"./body-parser-HN91kAf0.mjs";import{a as i,t as a}from"./context-DlFhI9cN.mjs";import{t as o}from"./dry-run-mrA7FFLR.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./run-DAg7dfIW.mjs";import{t as u}from"./output-PRKYaJuo.mjs";import{t as d}from"./progress-AML-AVs4.mjs";import{a as f,i as p,n as m}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/diagnostics/endpoint-healthchecks`,body:`json`,constants:{check_type:`icmp`}};function g(e){return e.usage(`$0 diagnostics endpoint-healthchecks create
3
3
 
4
4
  Create Endpoint Health Check.`).option(`check-type`,{type:`string`,description:`type of check to perform`,choices:[`icmp`],default:`icmp`}).coerce(`check-type`,e=>s(e,`check-type`,`text`)).option(`endpoint`,{type:`string`,description:`the IP address of the host to perform checks against`}).option(`name`,{type:`string`,description:`Optional name associated with this check`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Endpoint Health Check`,builder:g,handler:async e=>l({command:`diagnostics endpoint-healthchecks create`,classification:{safeFlags:[`check-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf diagnostics endpoint-healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/diagnostics/endpoint-healthchecks`,pathParams:{},bodyKind:`json`,body:e.body===void 0?r({check_type:e[`check-type`],endpoint:s(e.endpoint,`endpoint`,`text`),name:s(e.name,`name`,`text`)}):n(e.body)});return}let l=e.body===void 0?void 0:n(e.body),m=await t(e),g=e.local?c:await a();if(e.accountId=g,e.body!==void 0){let e=l,t=await d(`Creating`,async()=>m.send(h,{body:e,account_id:g}));u(t,{successLabel:`Created`});return}e[`check-type`]===void 0&&(e[`check-type`]=await p(`check-type`,`type of check to perform`,[`icmp`])),e.endpoint===void 0&&(e.endpoint=await f(`endpoint`,`the IP address of the host to perform checks against`));let _=r({check_type:e[`check-type`],endpoint:s(e.endpoint,`endpoint`,`text`),name:s(e.name,`name`,`text`)}),v=await d(`Creating`,async()=>m.send(h,{body:_,account_id:g}));u(v,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/diagnostics/endpoint-healthchecks/${t.id}`};function y(e){return e.usage(`$0 diagnostics endpoint-healthchecks delete <id>
5
5
 
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a as e}from"./cf-QIG83e0V.mjs";import{n as t}from"./version-pcpa_kv3.mjs";import{mkdirSync as n,readFileSync as r,writeFileSync as i}from"node:fs";import{dirname as a,join as o}from"node:path";import{createHash as s}from"node:crypto";function c(n,r){let i=s(`sha256`).update([t,...r].join(` `)).digest(`hex`).slice(0,32);return o(e(),`cache`,n,`${i}.json`)}function l(e,t,n,i){try{let a=JSON.parse(r(c(e,t),`utf-8`));return typeof a?.fetchedAt==`number`&&Date.now()-a.fetchedAt<=n?i(a.value):void 0}catch{return}}function u(e,t,r){try{let o=c(e,t);n(a(o),{recursive:!0}),i(o,JSON.stringify({fetchedAt:Date.now(),value:r}),`utf-8`)}catch{}}export{u as n,l as t};
@@ -369,7 +369,10 @@ Service bindings, Durable Object bindings, and Tail consumers connect to other W
369
369
  /* c8 ignore start */
370
370
  #e=WD.platform===`win32`?`SIGINT`:`SIGHUP`;
371
371
  /* c8 ignore stop */
372
- #t=new zD;#n;#r;#i;#a={};#o=!1;constructor(e){super(),this.#n=e,this.#a={};for(let t of PD)this.#a[t]=()=>{let n=this.#n.listeners(t),{count:r}=this.#t,i=e;if(typeof i.__signal_exit_emitter__==`object`&&typeof i.__signal_exit_emitter__.count==`number`&&(r+=i.__signal_exit_emitter__.count),n.length===r){this.unload();let n=this.#t.emit(`exit`,null,t),r=t===`SIGHUP`?this.#e:t;n||e.kill(e.pid,r)}};this.#i=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!FD(this.#n))return()=>{};this.#o===!1&&this.load();let n=t?.alwaysLast?`afterExit`:`exit`;return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(let e of PD)try{let t=this.#a[e];t&&this.#n.on(e,t)}catch{}this.#n.emit=(e,...t)=>this.#c(e,...t),this.#n.reallyExit=e=>this.#s(e)}}unload(){this.#o&&(this.#o=!1,PD.forEach(e=>{let t=this.#a[e];if(!t)throw Error(`Listener not defined for signal: `+e);try{this.#n.removeListener(e,t)}catch{}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#i,--this.#t.count)}#s(e){return FD(this.#n)?(this.#n.exitCode=e||0,this.#t.emit(`exit`,this.#n.exitCode,null),this.#i.call(this.#n,this.#n.exitCode)):0}#c(e,...t){let n=this.#r;if(e===`exit`&&FD(this.#n)){typeof t[0]==`number`&&(this.#n.exitCode=t[0]);let r=n.call(this.#n,e,...t);return this.#t.emit(`exit`,this.#n.exitCode,null),r}return n.call(this.#n,e,...t)}},WD=globalThis.process,{onExit:GD,load:KD,unload:qD}=VD(FD(WD)?new UD(WD):new HD);function JD(e){return e??=process.cwd(),I.join(e,`.wrangler`)}a(JD,`getWranglerHiddenDirPath`);var YD=864e5,XD=/* @__PURE__ */ new Set;function ZD(e){if(XD.has(e))return;XD.add(e);let t;try{t=M.readdirSync(e,{withFileTypes:!0})}catch{return}let n=Date.now()-YD;for(let r of t){if(!r.isDirectory())continue;let t=I.join(e,r.name);try{M.statSync(t).mtimeMs<n&&ob(t)}catch{}}}a(ZD,`sweepStaleWranglerTmpDirs`);function QD(e,t,n=!0){let r=I.join(JD(e),`tmp`);M.mkdirSync(r,{recursive:!0}),ZD(r);let i=I.join(r,`${t}-`),o=M.realpathSync(M.mkdtempSync(i)),s=/* @__PURE__ */ a(()=>{if(n)try{ob(o)}catch{}},`cleanupDir`),c=GD(s);return{path:o,remove(){c(),s()}}}a(QD,`getWranglerTmpDir`);function $D(e,...t){return new S({text:e,notes:t.map(e=>({text:e})),telemetryMessage:!1})}a($D,`buildDetailedError`);function eO(e){if(e.message===`workers.api.error.email_verification_required`)throw $D(`Please verify your account's email address and try again.`,`Check your email for a verification link, or login to https://dash.cloudflare.com and request a new one.`)}a(eO,`maybeThrowFriendlyError`);function tO(e,t){t.debugWithSanitization?.(`HEADERS:`,JSON.stringify(Ae(e),null,2))}a(tO,`logHeaders`);async function nO(e,t,n={},r,i,a,o,s){xe(s,`credentials are required for performApiFetch`);let c=n.method??`GET`;xe(t.startsWith(`/`),`CF API fetch - resource path must start with a "/" but got "${t}"`);let l=wO(new IC.Headers(n.headers));mO(l,s),l.set(`User-Agent`,r),CO(l),Qb(l);let u=a?`?${a.toString()}`:``;return i.debug(`-- START CF API REQUEST: ${c} ${Pb(e)}${t}`),i.debugWithSanitization?.(`QUERY STRING:`,u),tO(l,i),i.debugWithSanitization?.(`INIT:`,JSON.stringify({...n,headers:Ae(new IC.Headers(n.headers))},null,2)),i.debugWithSanitization!==void 0&&n.body instanceof IC.FormData&&(i.loggerLevel===void 0||i.loggerLevel===`debug`)&&i.debugWithSanitization?.(`BODY:`,Rb()?`<multipart body>`:await new IC.Response(n.body).text(),null,2),i.debug(`-- END CF API REQUEST`),await(0,IC.fetch)(`${Pb(e)}${t}${u}`,{method:c,...n,headers:l,signal:o})}a(nO,`performApiFetchBase`);async function rO(e,t,n={},r,i,a,o,s){let c=n.method??`GET`,l=await nO(e,t,n,r,i,a,o,s),u=await l.text();i.debug(`-- START CF API RESPONSE:`,l.statusText,l.status),tO(l.headers,i),i.debugWithSanitization?.(`RESPONSE:`,u),i.debug(`-- END CF API RESPONSE`);let d=lO(l.headers);if(!u&&(l.status===204||l.status===205))return{response:{result:{},success:!0,errors:[],messages:[]},status:l.status,retryAfterMs:d};sO(l.headers)&&bO(l.headers,c,t,l.status,l.statusText,d);try{return{response:h(u),status:l.status,retryAfterMs:d}}catch{let e=uO(l.headers);throw new T({text:`Received a malformed response from the API`,notes:[{text:oO(u,100)},{text:`${c} ${t} -> ${l.status} ${l.statusText}`},...e?[{text:`Cloudflare Ray ID: ${e}`}]:[]],status:l.status,retryAfterMs:d,telemetryMessage:!1})}}a(rO,`fetchInternalBase`);async function iO(e,t,n={},r,i,a,o,s){let{response:c,status:l,retryAfterMs:u}=await rO(e,t,n,r,i,a,o,s);if(c.success)return c.result;yO(t,c,l,u)}a(iO,`fetchResultBase`);async function aO(e,t,n={},r,i,a,o){let s=[],c=!0,l;for(;c;){l&&(a=new L(a),a.set(`cursor`,l));let{response:u,status:d,retryAfterMs:f}=await rO(e,t,n,r,i,a,void 0,o);u.success?(s.push(...u.result),SO(u.result_info)?l=u.result_info?.cursor:c=!1):yO(t,u,d,f)}return s}a(aO,`fetchListResultBase`);function oO(e,t){let{length:n}=e;return n<=t?e:`${e.substring(0,t)}... (length = ${n})`}a(oO,`truncate`);function sO(e){return e.get(`cf-mitigated`)===`challenge`}a(sO,`isWAFBlockResponse`);function cO(e){if(!e)return;if(/^\d+$/.test(e.trim()))return Number(e)*1e3;let t=new Date(e);if(!Number.isNaN(t.getTime()))return Math.max(0,t.getTime()-Date.now())}a(cO,`parseRetryAfterValue`);function lO(e){return cO(e.get(`Retry-After`))}a(lO,`parseRetryAfterMs`);function uO(e){return e.get(`cf-ray`)??void 0}a(uO,`extractWAFBlockRayId`);function dO(e){return(/* @__PURE__ */ RegExp(`/accounts/([a-zA-Z0-9]+)/?`)).exec(e)?.[1]}a(dO,`extractAccountTag`);function fO(e){let t=e?.page,n=e?.per_page,r=e?.total_count;return t!==void 0&&n!==void 0&&r!==void 0&&t*n<r}a(fO,`hasMorePages`);function pO(e,t=0){let n=` `.repeat(t),r=e.message??``,i=`error_chain`in e?e.error_chain?.map(e=>`
372
+ #t=new zD;#n;#r;#i;#a={};#o=!1;constructor(e){super(),this.#n=e,this.#a={};for(let t of PD)this.#a[t]=()=>{let n=this.#n.listeners(t),{count:r}=this.#t,i=e;if(typeof i.__signal_exit_emitter__==`object`&&typeof i.__signal_exit_emitter__.count==`number`&&(r+=i.__signal_exit_emitter__.count),n.length===r){this.unload();let n=this.#t.emit(`exit`,null,t),r=t===`SIGHUP`?this.#e:t;n||e.kill(e.pid,r)}};this.#i=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!FD(this.#n))return()=>{};this.#o===!1&&this.load();let n=t?.alwaysLast?`afterExit`:`exit`;return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(let e of PD)try{let t=this.#a[e];t&&this.#n.on(e,t)}catch{}this.#n.emit=(e,...t)=>this.#c(e,...t),this.#n.reallyExit=e=>this.#s(e)}}unload(){this.#o&&(this.#o=!1,PD.forEach(e=>{let t=this.#a[e];if(!t)throw Error(`Listener not defined for signal: `+e);try{this.#n.removeListener(e,t)}catch{}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#i,--this.#t.count)}#s(e){return FD(this.#n)?(this.#n.exitCode=e||0,this.#t.emit(`exit`,this.#n.exitCode,null),this.#i.call(this.#n,this.#n.exitCode)):0}#c(e,...t){let n=this.#r;if(e===`exit`&&FD(this.#n)){typeof t[0]==`number`&&(this.#n.exitCode=t[0]);let r=n.call(this.#n,e,...t);return this.#t.emit(`exit`,this.#n.exitCode,null),r}return n.call(this.#n,e,...t)}},WD=globalThis.process,{onExit:GD,load:KD,unload:qD}=VD(FD(WD)?new UD(WD):new HD);function JD(e){return e??=process.cwd(),I.join(e,`.wrangler`)}a(JD,`getWranglerHiddenDirPath`);var YD=864e5,XD=/* @__PURE__ */ new Set;function ZD(e){if(XD.has(e))return;XD.add(e);let t;try{t=M.readdirSync(e,{withFileTypes:!0})}catch{return}let n=Date.now()-YD;for(let r of t){if(!r.isDirectory())continue;let t=I.join(e,r.name);try{M.statSync(t).mtimeMs<n&&ob(t)}catch{}}}a(ZD,`sweepStaleWranglerTmpDirs`);function QD(e,t,n=!0){let r=I.join(JD(e),`tmp`);M.mkdirSync(r,{recursive:!0}),ZD(r);let i=I.join(r,`${t}-`),o=M.realpathSync(M.mkdtempSync(i)),s=/* @__PURE__ */ a(()=>{if(n)try{ob(o)}catch{}},`cleanupDir`),c=GD(s);return{path:o,remove(){c(),s()}}}a(QD,`getWranglerTmpDir`),class{static{a(this,`MetricsRegistry`)}counters=[];createCounter(e,t){let n={name:e,help:t,value:0};return this.counters.push(n),{inc:/* @__PURE__ */ a(()=>{n.value++},`inc`),add:/* @__PURE__ */ a(e=>{if(e<0)throw Error(`Counter value cannot decrease`);n.value+=e},`add`)}}metrics(){return this.counters.map(e=>{let t=``;return e.help.length>0&&(t+=`# HELP ${e.name} ${e.help}
373
+ `),t+=`# TYPE ${e.name} counter
374
+ `,t+=`${e.name} ${e.value}
375
+ `,t}).join(``)}};function $D(e,...t){return new S({text:e,notes:t.map(e=>({text:e})),telemetryMessage:!1})}a($D,`buildDetailedError`);function eO(e){if(e.message===`workers.api.error.email_verification_required`)throw $D(`Please verify your account's email address and try again.`,`Check your email for a verification link, or login to https://dash.cloudflare.com and request a new one.`)}a(eO,`maybeThrowFriendlyError`);function tO(e,t){t.debugWithSanitization?.(`HEADERS:`,JSON.stringify(Ae(e),null,2))}a(tO,`logHeaders`);async function nO(e,t,n={},r,i,a,o,s){xe(s,`credentials are required for performApiFetch`);let c=n.method??`GET`;xe(t.startsWith(`/`),`CF API fetch - resource path must start with a "/" but got "${t}"`);let l=wO(new IC.Headers(n.headers));mO(l,s),l.set(`User-Agent`,r),CO(l),Qb(l);let u=a?`?${a.toString()}`:``;return i.debug(`-- START CF API REQUEST: ${c} ${Pb(e)}${t}`),i.debugWithSanitization?.(`QUERY STRING:`,u),tO(l,i),i.debugWithSanitization?.(`INIT:`,JSON.stringify({...n,headers:Ae(new IC.Headers(n.headers))},null,2)),i.debugWithSanitization!==void 0&&n.body instanceof IC.FormData&&(i.loggerLevel===void 0||i.loggerLevel===`debug`)&&i.debugWithSanitization?.(`BODY:`,Rb()?`<multipart body>`:await new IC.Response(n.body).text(),null,2),i.debug(`-- END CF API REQUEST`),await(0,IC.fetch)(`${Pb(e)}${t}${u}`,{method:c,...n,headers:l,signal:o})}a(nO,`performApiFetchBase`);async function rO(e,t,n={},r,i,a,o,s){let c=n.method??`GET`,l=await nO(e,t,n,r,i,a,o,s),u=await l.text();i.debug(`-- START CF API RESPONSE:`,l.statusText,l.status),tO(l.headers,i),i.debugWithSanitization?.(`RESPONSE:`,u),i.debug(`-- END CF API RESPONSE`);let d=lO(l.headers);if(!u&&(l.status===204||l.status===205))return{response:{result:{},success:!0,errors:[],messages:[]},status:l.status,retryAfterMs:d};sO(l.headers)&&bO(l.headers,c,t,l.status,l.statusText,d);try{return{response:h(u),status:l.status,retryAfterMs:d}}catch{let e=uO(l.headers);throw new T({text:`Received a malformed response from the API`,notes:[{text:oO(u,100)},{text:`${c} ${t} -> ${l.status} ${l.statusText}`},...e?[{text:`Cloudflare Ray ID: ${e}`}]:[]],status:l.status,retryAfterMs:d,telemetryMessage:!1})}}a(rO,`fetchInternalBase`);async function iO(e,t,n={},r,i,a,o,s){let{response:c,status:l,retryAfterMs:u}=await rO(e,t,n,r,i,a,o,s);if(c.success)return c.result;yO(t,c,l,u)}a(iO,`fetchResultBase`);async function aO(e,t,n={},r,i,a,o){let s=[],c=!0,l;for(;c;){l&&(a=new L(a),a.set(`cursor`,l));let{response:u,status:d,retryAfterMs:f}=await rO(e,t,n,r,i,a,void 0,o);u.success?(s.push(...u.result),SO(u.result_info)?l=u.result_info?.cursor:c=!1):yO(t,u,d,f)}return s}a(aO,`fetchListResultBase`);function oO(e,t){let{length:n}=e;return n<=t?e:`${e.substring(0,t)}... (length = ${n})`}a(oO,`truncate`);function sO(e){return e.get(`cf-mitigated`)===`challenge`}a(sO,`isWAFBlockResponse`);function cO(e){if(!e)return;if(/^\d+$/.test(e.trim()))return Number(e)*1e3;let t=new Date(e);if(!Number.isNaN(t.getTime()))return Math.max(0,t.getTime()-Date.now())}a(cO,`parseRetryAfterValue`);function lO(e){return cO(e.get(`Retry-After`))}a(lO,`parseRetryAfterMs`);function uO(e){return e.get(`cf-ray`)??void 0}a(uO,`extractWAFBlockRayId`);function dO(e){return(/* @__PURE__ */ RegExp(`/accounts/([a-zA-Z0-9]+)/?`)).exec(e)?.[1]}a(dO,`extractAccountTag`);function fO(e){let t=e?.page,n=e?.per_page,r=e?.total_count;return t!==void 0&&n!==void 0&&r!==void 0&&t*n<r}a(fO,`hasMorePages`);function pO(e,t=0){let n=` `.repeat(t),r=e.message??``,i=`error_chain`in e?e.error_chain?.map(e=>`
373
376
 
374
377
  ${n}- ${pO(e,t+1)}`).join(`
375
378
  `)??``:``;return(e.code?`${r} [code: ${e.code}]`:r)+(e.documentation_url?`
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{r as n,t as r}from"./body-parser-HN91kAf0.mjs";import{a as i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./dry-run-qsnRlRk6.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import{t as u}from"./output-hFMAotFl.mjs";import{t as d}from"./progress-DE_G09u2.mjs";import{a as f,n as p}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/dls/regional_services/prefix_bindings`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,409:`ConflictError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 dls regional-services prefix-bindings create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{r as n,t as r}from"./body-parser-HN91kAf0.mjs";import{a as i,t as a}from"./context-DlFhI9cN.mjs";import{t as o}from"./dry-run-mrA7FFLR.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./run-DAg7dfIW.mjs";import{t as u}from"./output-PRKYaJuo.mjs";import{t as d}from"./progress-AML-AVs4.mjs";import{a as f,n as p}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/dls/regional_services/prefix_bindings`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,409:`ConflictError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 dls regional-services prefix-bindings create
3
3
 
4
4
  Bind a CIDR from a BYOIP prefix to a region. This requires the **IP Prefixes Write** permission in addition to **DLS Write**, because the binding is created against a BYOIP prefix in Addressing.`).option(`cidr`,{type:`string`,description:`IP prefix in CIDR notation to bind.`}).option(`prefix-id`,{type:`string`,description:`The ID of the parent IP prefix that contains the CIDR.`}).option(`region-key`,{type:`string`,description:`Region key from managed regions (e.g., "us", "eu").`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create a DLS prefix binding`,builder:h,handler:async e=>l({command:`dls regional-services prefix-bindings create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf dls regional-services prefix-bindings create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dls/regional_services/prefix_bindings`,pathParams:{},bodyKind:`json`,body:e.body===void 0?r({cidr:s(e.cidr,`cidr`,`text`),prefix_id:s(e[`prefix-id`],`prefix-id`,`text`),region_key:s(e[`region-key`],`region-key`,`text`)}):n(e.body)});return}let l=e.body===void 0?void 0:n(e.body),p=await t(e),h=e.local?c:await a();if(e.accountId=h,e.body!==void 0){let e=l,t=await d(`Creating`,async()=>p.send(m,{body:e,account_id:h}));u(t,{successLabel:`Created`});return}e.cidr===void 0&&(e.cidr=await f(`cidr`,`IP prefix in CIDR notation to bind.`)),e[`prefix-id`]===void 0&&(e[`prefix-id`]=await f(`prefix-id`,`The ID of the parent IP prefix that contains the CIDR.`)),e[`region-key`]===void 0&&(e[`region-key`]=await f(`region-key`,`Region key from managed regions (e.g., "us", "eu").`));let g=r({cidr:s(e.cidr,`cidr`,`text`),prefix_id:s(e[`prefix-id`],`prefix-id`,`text`),region_key:s(e[`region-key`],`region-key`,`text`)}),_=await d(`Creating`,async()=>p.send(m,{body:g,account_id:h}));u(_,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dls/regional_services/prefix_bindings/${t.binding_id}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 dls regional-services prefix-bindings delete <binding-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-DA1PHaHi.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{a as i,i as a,t as o}from"./context-BGm5_wTT.mjs";import{t as s}from"./output-hFMAotFl.mjs";import{t as c}from"./progress-DE_G09u2.mjs";import{a as l,n as u}from"./prompt-D274Im1O.mjs";import{t as d}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{o as f,r as p,t as m}from"./body-parser-HN91kAf0.mjs";import{n as h,t as g}from"./input-validation-D7z60HJH.mjs";import{n as ee,t as te}from"./raw-fetch-DhlyWQtk.mjs";import{t as _}from"./local-B3zt9PXR.mjs";var ne={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/dnssec`};function re(e){return e.usage(`$0 dns dnssec delete
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-cj71dGxS.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{a as i,i as a,t as o}from"./context-DlFhI9cN.mjs";import{t as s}from"./output-PRKYaJuo.mjs";import{t as c}from"./progress-AML-AVs4.mjs";import{a as l,n as u}from"./prompt-Bnon9lfK.mjs";import{t as d}from"./run-DAg7dfIW.mjs";import"./telemetry-DDs3zhdw.mjs";import{o as f,r as p,t as m}from"./body-parser-HN91kAf0.mjs";import{n as h,t as g}from"./input-validation-D7z60HJH.mjs";import{n as ee,t as te}from"./raw-fetch-0T1SwPa1.mjs";import{t as _}from"./local-B3zt9PXR.mjs";var ne={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/dnssec`};function re(e){return e.usage(`$0 dns dnssec delete
3
3
 
4
4
  Delete DNSSEC.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ie={command:`delete`,describe:`Delete DNSSEC records`,builder:re,handler:async e=>d({command:`dns dnssec delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf dns dnssec delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dnssec`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),i=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=i,!await u({force:!!e.force}))return;let o=await c(`Deleting`,async()=>t.send(ne,{zone_id:i}));s(o,{successLabel:`Deleted`})})};var v={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/dnssec`,body:`json`};function ae(e){return e.usage(`$0 dns dnssec edit
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{i as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,t as o}from"./context-BGm5_wTT.mjs";import{t as s}from"./dry-run-qsnRlRk6.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{t as l}from"./local-B3zt9PXR.mjs";import{t as u}from"./run-CXWkMU3x.mjs";import{t as d}from"./output-hFMAotFl.mjs";import{t as f}from"./progress-DE_G09u2.mjs";import"./telemetry-COlodX5Z.mjs";import{n as p}from"./prompt-D274Im1O.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/dns_firewall`,body:`json`};function h(e){return e.usage(`$0 dns-firewall create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{i as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,t as o}from"./context-DlFhI9cN.mjs";import{t as s}from"./dry-run-mrA7FFLR.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{t as l}from"./local-B3zt9PXR.mjs";import{t as u}from"./run-DAg7dfIW.mjs";import{t as d}from"./output-PRKYaJuo.mjs";import{t as f}from"./progress-AML-AVs4.mjs";import"./telemetry-DDs3zhdw.mjs";import{n as p}from"./prompt-Bnon9lfK.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/dns_firewall`,body:`json`};function h(e){return e.usage(`$0 dns-firewall create
3
3
 
4
4
  Create a DNS Firewall cluster`).option(`attack-mitigation-enabled`,{type:`boolean`,description:`When enabled, automatically mitigate random-prefix attacks to protect upstream DNS servers`}).option(`attack-mitigation-only-when-upstream-unhealthy`,{type:`boolean`,description:`Only mitigate attacks when upstream servers seem unhealthy`}).option(`deprecate-any-requests`,{type:`boolean`,description:`Whether to refuse to answer queries for the ANY type`}).option(`ecs-fallback`,{type:`boolean`,description:`Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent`}).option(`maximum-cache-ttl`,{type:`number`,description:`By default, Cloudflare attempts to cache responses for as long as
5
5
  indicated by the TTL received from upstream nameservers. This setting
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./output-hFMAotFl.mjs";import{n as t}from"./request-headers-Bopp5lH_.mjs";import{t as n}from"./run-CXWkMU3x.mjs";const r=`https://developers.cloudflare.com`;function i(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function a(e){return i(e)?e.success===!1?e.error===void 0||typeof e.error==`string`:e.success===!0&&i(e.result)&&Array.isArray(e.result.chunks)&&e.result.chunks.every(e=>{if(!i(e)||!i(e.item)||typeof e.item.key!=`string`||e.item.key.length===0)return!1;let t=e.item.metadata;return t===void 0||i(t)&&(t.title===void 0||typeof t.title==`string`)&&(t.description===void 0||typeof t.description==`string`)}):!1}function o(e){let t;try{t=new URL(e,`${r}/`)}catch{throw Error(`Cloudflare docs search returned an invalid URL.`)}if(t.origin!==r||t.username||t.password)throw Error(`Cloudflare docs search returned an invalid URL.`);return t.href}async function s(e){let n=AbortSignal.timeout(3e4),r;try{r=await fetch(`https://ai-search.developers.cloudflare.com/api/ai-search/search`,{method:`POST`,headers:{...t(),"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({messages:[{role:`user`,content:e}],stream:!1,ai_search_options:{retrieval:{metadata_only:!0,max_num_results:5}}}),signal:n})}catch(e){throw Error(n.aborted?`Cloudflare docs search timed out. Try again.`:`Unable to reach Cloudflare docs search. Check your connection and try again.`,{cause:e})}if(!r.ok)throw Error(`Cloudflare docs search failed (HTTP ${r.status}).`);let i;try{i=await r.json()}catch(e){throw Error(n.aborted?`Cloudflare docs search timed out. Try again.`:`Cloudflare docs search returned an invalid JSON response.`,{cause:e})}if(!a(i))throw Error(`Cloudflare docs search returned an invalid response.`);if(!i.success)throw Error(`Cloudflare docs search failed: ${i.error??`Unknown error`}`);return i.result.chunks.slice(0,5).map(({item:e})=>({title:e.metadata?.title??`Untitled`,description:e.metadata?.description??``,url:o(e.key)}))}const c={command:`search <query>`,describe:`Search live Cloudflare documentation, guides, tutorials, and examples`,builder:e=>e.positional(`query`,{describe:`Search terms or a question about Cloudflare`,type:`string`,demandOption:!0,coerce:e=>{let t=e.trim();if(!t)throw Error(`query must not be empty.`);return t}}).example(`cf docs search "schedule a worker"`,`Find guides and examples`).epilogue(`Returns up to five ranked JSON results with title, description, and url. No Cloudflare login is required.
2
+ import{t as e}from"./output-PRKYaJuo.mjs";import{n as t}from"./request-headers-BEYXy4JN.mjs";import{t as n}from"./run-DAg7dfIW.mjs";const r=`https://developers.cloudflare.com`;function i(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function a(e){return i(e)?e.success===!1?e.error===void 0||typeof e.error==`string`:e.success===!0&&i(e.result)&&Array.isArray(e.result.chunks)&&e.result.chunks.every(e=>{if(!i(e)||!i(e.item)||typeof e.item.key!=`string`||e.item.key.length===0)return!1;let t=e.item.metadata;return t===void 0||i(t)&&(t.title===void 0||typeof t.title==`string`)&&(t.description===void 0||typeof t.description==`string`)}):!1}function o(e){let t;try{t=new URL(e,`${r}/`)}catch{throw Error(`Cloudflare docs search returned an invalid URL.`)}if(t.origin!==r||t.username||t.password)throw Error(`Cloudflare docs search returned an invalid URL.`);return t.href}async function s(e){let n=AbortSignal.timeout(3e4),r;try{r=await fetch(`https://ai-search.developers.cloudflare.com/api/ai-search/search`,{method:`POST`,headers:{...t(),"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({messages:[{role:`user`,content:e}],stream:!1,ai_search_options:{retrieval:{metadata_only:!0,max_num_results:5}}}),signal:n})}catch(e){throw Error(n.aborted?`Cloudflare docs search timed out. Try again.`:`Unable to reach Cloudflare docs search. Check your connection and try again.`,{cause:e})}if(!r.ok)throw Error(`Cloudflare docs search failed (HTTP ${r.status}).`);let i;try{i=await r.json()}catch(e){throw Error(n.aborted?`Cloudflare docs search timed out. Try again.`:`Cloudflare docs search returned an invalid JSON response.`,{cause:e})}if(!a(i))throw Error(`Cloudflare docs search returned an invalid response.`);if(!i.success)throw Error(`Cloudflare docs search failed: ${i.error??`Unknown error`}`);return i.result.chunks.slice(0,5).map(({item:e})=>({title:e.metadata?.title??`Untitled`,description:e.metadata?.description??``,url:o(e.key)}))}const c={command:`search <query>`,describe:`Search live Cloudflare documentation, guides, tutorials, and examples`,builder:e=>e.positional(`query`,{describe:`Search terms or a question about Cloudflare`,type:`string`,demandOption:!0,coerce:e=>{let t=e.trim();if(!t)throw Error(`query must not be empty.`);return t}}).example(`cf docs search "schedule a worker"`,`Find guides and examples`).epilogue(`Returns up to five ranked JSON results with title, description, and url. No Cloudflare login is required.
3
3
  Fetch a result's URL with Accept: text/markdown to read the full page as Markdown.`),handler:t=>n({command:`docs search`,recordArgs:!1,searchQuery:t.query},t,async()=>{e(await s(t.query))})},l={command:`docs`,describe:`Search live Cloudflare documentation`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{l as default};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./output-hFMAotFl.mjs";function t(e,t){let n=(e,t)=>{let r=t[0];if(r===void 0||typeof e!=`object`||!e)return e;if(Array.isArray(e))return e.map(e=>n(e,t));let i=e[r];return i===void 0?e:{...e,[r]:t.length===1?`<redacted>`:n(i,t.slice(1))}},r=e;for(let e of t)r=n(r,e);return r}function n({sensitiveBodyPaths:n,...r}){n?.length?e({...r,body:t(r.body,n)}):e(r)}export{n as t};
2
+ import{t as e}from"./output-PRKYaJuo.mjs";function t(e,t){let n=(e,t)=>{let r=t[0];if(r===void 0||typeof e!=`object`||!e)return e;if(Array.isArray(e))return e.map(e=>n(e,t));let i=e[r];return i===void 0?e:{...e,[r]:t.length===1?`<redacted>`:n(i,t.slice(1))}},r=e;for(let e of t)r=n(r,e);return r}function n({sensitiveBodyPaths:n,...r}){n?.length?e({...r,body:t(r.body,n)}):e(r)}export{n as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./dry-run-qsnRlRk6.mjs";import{a as r,t as i}from"./context-BGm5_wTT.mjs";import{t as a}from"./local-B3zt9PXR.mjs";import{t as o}from"./output-hFMAotFl.mjs";import{t as s}from"./progress-DE_G09u2.mjs";import{t as c}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/durable_objects/namespaces`,query:[`page`,`per_page`]};function u(e){return e.usage(`$0 durable-objects namespaces list
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{t as n}from"./dry-run-mrA7FFLR.mjs";import{a as r,t as i}from"./context-DlFhI9cN.mjs";import{t as a}from"./local-B3zt9PXR.mjs";import{t as o}from"./output-PRKYaJuo.mjs";import{t as s}from"./progress-AML-AVs4.mjs";import{t as c}from"./run-DAg7dfIW.mjs";import"./telemetry-DDs3zhdw.mjs";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/durable_objects/namespaces`,query:[`page`,`per_page`]};function u(e){return e.usage(`$0 durable-objects namespaces list
3
3
 
4
4
  Returns the Durable Object namespaces owned by an account.`).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`list`,describe:`List Durable Object Namespaces`,builder:u,handler:async e=>c({command:`durable-objects namespaces list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();n({command:`cf durable-objects namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/durable_objects/namespaces`,pathParams:{},query:c,bodyKind:`none`});return}let u=await t(e),d=e.local?a:await i();e.accountId=d;let f=await s(`Loading`,async()=>u.send(l,{account_id:d,...c}));o(f,{successLabel:`Loaded`})})};var f={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/durable_objects/namespaces/${t.id}/objects`,query:[`limit`,`cursor`]};function p(e){return e.usage(`$0 durable-objects namespaces objects list
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{i as n}from"./context-BGm5_wTT.mjs";import{r,t as i}from"./body-parser-HN91kAf0.mjs";import{t as a}from"./dry-run-qsnRlRk6.mjs";import{t as o}from"./output-hFMAotFl.mjs";import{t as s}from"./run-CXWkMU3x.mjs";import{t as c}from"./progress-DE_G09u2.mjs";import"./telemetry-COlodX5Z.mjs";var l={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/email/auth/dmarc-reports`,body:`json`};function u(e){return e.usage("$0 email-auth dmarc-reports edit\n\nUpdates the DMARC report configuration for a zone. At least one of `enabled` or `skip_wizard` must be provided. When enabling, the handler will ensure the DMARC RUA record exists in DNS.").option(`enabled`,{type:`boolean`,description:`Enable or disable DMARC reports for this zone`}).option(`skip-wizard`,{type:`boolean`,description:`Skip the DMARC setup wizard`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for PATCH /dmarc-reports`})}const d={command:`edit`,describe:`Configure DMARC Reports`,builder:u,handler:async e=>s({command:`email-auth dmarc-reports edit`,classification:{safeFlags:[`enabled`,`skip-wizard`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf email-auth dmarc-reports edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/auth/dmarc-reports`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?i({enabled:e.enabled,skip_wizard:e[`skip-wizard`]}):r(e.body)});return}let s=e.body===void 0?void 0:r(e.body),u=await t(e),d=await n({zone:e.zone},u,{quiet:e.quiet});if(e.zoneId=d,e.body!==void 0){let e=s,t=await c(`Updating`,async()=>u.send(l,{body:e,zone_id:d}));o(t,{successLabel:`Updated`});return}let f=i({enabled:e.enabled,skip_wizard:e[`skip-wizard`]}),p=await c(`Updating`,async()=>u.send(l,{body:f,zone_id:d}));o(p,{successLabel:`Updated`})})};var f={method:`GET`,path:t=>e`/zones/${t.zone_id}/email/auth/dmarc-reports`};function p(e){return e.usage(`$0 email-auth dmarc-reports get
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{i as n}from"./context-DlFhI9cN.mjs";import{r,t as i}from"./body-parser-HN91kAf0.mjs";import{t as a}from"./dry-run-mrA7FFLR.mjs";import{t as o}from"./output-PRKYaJuo.mjs";import{t as s}from"./run-DAg7dfIW.mjs";import{t as c}from"./progress-AML-AVs4.mjs";import"./telemetry-DDs3zhdw.mjs";var l={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/email/auth/dmarc-reports`,body:`json`};function u(e){return e.usage("$0 email-auth dmarc-reports edit\n\nUpdates the DMARC report configuration for a zone. At least one of `enabled` or `skip_wizard` must be provided. When enabling, the handler will ensure the DMARC RUA record exists in DNS.").option(`enabled`,{type:`boolean`,description:`Enable or disable DMARC reports for this zone`}).option(`skip-wizard`,{type:`boolean`,description:`Skip the DMARC setup wizard`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for PATCH /dmarc-reports`})}const d={command:`edit`,describe:`Configure DMARC Reports`,builder:u,handler:async e=>s({command:`email-auth dmarc-reports edit`,classification:{safeFlags:[`enabled`,`skip-wizard`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf email-auth dmarc-reports edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/auth/dmarc-reports`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?i({enabled:e.enabled,skip_wizard:e[`skip-wizard`]}):r(e.body)});return}let s=e.body===void 0?void 0:r(e.body),u=await t(e),d=await n({zone:e.zone},u,{quiet:e.quiet});if(e.zoneId=d,e.body!==void 0){let e=s,t=await c(`Updating`,async()=>u.send(l,{body:e,zone_id:d}));o(t,{successLabel:`Updated`});return}let f=i({enabled:e.enabled,skip_wizard:e[`skip-wizard`]}),p=await c(`Updating`,async()=>u.send(l,{body:f,zone_id:d}));o(p,{successLabel:`Updated`})})};var f={method:`GET`,path:t=>e`/zones/${t.zone_id}/email/auth/dmarc-reports`};function p(e){return e.usage(`$0 email-auth dmarc-reports get
3
3
 
4
4
  Retrieves the current DMARC report configuration and status for a zone. Returns the RUA prefix, enabled status, approved sources, and DNS records.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`get`,describe:`Get DMARC Report Status`,builder:p,handler:async e=>s({command:`email-auth dmarc-reports get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf email-auth dmarc-reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/auth/dmarc-reports`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let r=await t(e),i=await n({zone:e.zone},r,{quiet:e.quiet});e.zoneId=i;let s=await c(`Loading`,async()=>r.send(f,{zone_id:i}));o(s,{successLabel:`Loaded`})})},h={command:`dmarc-reports`,describe:`Operations for dmarc-reports`,builder:e=>e.command(d).command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var g={method:`GET`,path:t=>e`/zones/${t.zone_id}/email/auth/spf/inspect`,query:[`id`]};function _(e){return e.usage(`$0 email-auth spf inspect
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,i as o,t as s}from"./context-BGm5_wTT.mjs";import{t as c}from"./dry-run-qsnRlRk6.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{t as u}from"./local-B3zt9PXR.mjs";import{t as d}from"./run-CXWkMU3x.mjs";import{t as f}from"./output-hFMAotFl.mjs";import{t as p}from"./progress-DE_G09u2.mjs";import{a as m,i as h,n as g}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/email/routing/addresses`,body:`json`,errors:{422:`UnprocessableEntityError`}};function v(e){return e.usage(`$0 email-routing addresses create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,i as o,t as s}from"./context-DlFhI9cN.mjs";import{t as c}from"./dry-run-mrA7FFLR.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{t as u}from"./local-B3zt9PXR.mjs";import{t as d}from"./run-DAg7dfIW.mjs";import{t as f}from"./output-PRKYaJuo.mjs";import{t as p}from"./progress-AML-AVs4.mjs";import{a as m,i as h,n as g}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/email/routing/addresses`,body:`json`,errors:{422:`UnprocessableEntityError`}};function v(e){return e.usage(`$0 email-routing addresses create
3
3
 
4
4
  Create a destination address to forward your emails to. Destination addresses need to be verified before they can be used.`).option(`email`,{type:`string`,description:`The contact email address of the user.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`create`,describe:`Create a destination address`,builder:v,handler:async e=>d({command:`email-routing addresses create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf email-routing addresses create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/routing/addresses`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({email:l(e.email,`email`,`text`)}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),o=await t(e),d=e.local?u:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await p(`Creating`,async()=>o.send(_,{body:e,account_id:d}));f(t,{successLabel:`Created`});return}e.email===void 0&&(e.email=await m(`email`,`The contact email address of the user.`));let h=i({email:l(e.email,`email`,`text`)}),g=await p(`Creating`,async()=>o.send(_,{body:h,account_id:d}));f(g,{successLabel:`Created`})})};var b={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email/routing/addresses/${t.destination_address_identifier}`,errors:{404:`NotFoundError`}};function x(e){return e.usage(`$0 email-routing addresses delete <destination-address-identifier>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,t as o}from"./context-BGm5_wTT.mjs";import{t as s}from"./dry-run-qsnRlRk6.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./output-hFMAotFl.mjs";import{t as u}from"./run-CXWkMU3x.mjs";import{t as d}from"./progress-DE_G09u2.mjs";import{a as f,i as p,n as m}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/batch`,body:`json`};function _(e){return e.usage(`$0 email-security allow-policies batch
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,t as o}from"./context-DlFhI9cN.mjs";import{t as s}from"./dry-run-mrA7FFLR.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./output-PRKYaJuo.mjs";import{t as u}from"./run-DAg7dfIW.mjs";import{t as d}from"./progress-AML-AVs4.mjs";import{a as f,i as p,n as m}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/batch`,body:`json`};function _(e){return e.usage(`$0 email-security allow-policies batch
3
3
 
4
4
  Executes multiple allow policy operations atomically: delete, partially update, replace, and create allow policies in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the allow policies to delete. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"id": string}].`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the policy's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"comments"?: (string | null), "expires_at"?: (string | null), "is_acceptable_sender"?: boolean, "is_exempt_recipient"?: boolean, "is_recipient"?: boolean, ...more} & {"id": string})]. ? marks optional keys.`}).option(`posts`,{type:`string`,description:`Allow policies to create. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"is_acceptable_sender": boolean, "is_exempt_recipient": boolean, "is_regex": boolean, "is_trusted_sender": boolean, "pattern": string, ...more}].`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the policy's ID and every field of its new value. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"is_acceptable_sender": boolean, "is_exempt_recipient": boolean, "is_regex": boolean, "is_trusted_sender": boolean, "pattern": string, ...more} & {"id": string})].`}).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 ee={command:`batch`,describe:`Batch allow policy operations`,builder:_,handler:async e=>u({command:`email-security allow-policies batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf email-security allow-policies batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({deletes:n(e.deletes,`deletes`),patches:n(e.patches,`patches`),posts:n(e.posts,`posts`),puts:n(e.puts,`puts`)}):r(e.body)});return}let u=e.body===void 0?void 0:r(e.body),f=await t(e),p=e.local?c:await o();if(e.accountId=p,!await m({force:!!e.force,message:`This operation may delete the selected allow policies and restore normal security scanning and disposition actions for matching emails.`}))return;if(e.body!==void 0){let e=u,t=await d(`Processing`,async()=>f.send(g,{body:e,account_id:p}));l(t,{successLabel:`Done`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let h=i({deletes:n(e.deletes,`deletes`),patches:n(e.patches,`patches`),posts:n(e.posts,`posts`),puts:n(e.puts,`puts`)}),_=await d(`Processing`,async()=>f.send(g,{body:h,account_id:p}));l(_,{successLabel:`Done`})})};var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies`,body:`json`};function te(e){return e.usage(`$0 email-security allow-policies create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./dry-run-qsnRlRk6.mjs";import{a as r,i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-hFMAotFl.mjs";import{t as c}from"./progress-DE_G09u2.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{i as u,o as d,r as f,t as p}from"./body-parser-HN91kAf0.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-D274Im1O.mjs";import{t as _}from"./body-unions-D9OSaf4M.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/messages/${t.message_id}`,response:`binary-response`,errors:{404:`NotFoundError`,500:`InternalServerError`}};function ee(e){return e.usage(`$0 email-sending get <message-id>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{t as n}from"./dry-run-mrA7FFLR.mjs";import{a as r,i,t as a}from"./context-DlFhI9cN.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-PRKYaJuo.mjs";import{t as c}from"./progress-AML-AVs4.mjs";import{t as l}from"./run-DAg7dfIW.mjs";import"./telemetry-DDs3zhdw.mjs";import{i as u,o as d,r as f,t as p}from"./body-parser-HN91kAf0.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-Bnon9lfK.mjs";import{t as _}from"./body-unions-QFGGUlIr.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/messages/${t.message_id}`,response:`binary-response`,errors:{404:`NotFoundError`,500:`InternalServerError`}};function ee(e){return e.usage(`$0 email-sending get <message-id>
3
3
 
4
4
  Returns the raw RFC 5322 MIME message for the given account and message id.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <message-id>`,describe:`Fetch an email message`,builder:ee,handler:async e=>l({command:`email-sending get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf email-sending get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/messages/${e[`message-id`]==null?`<message-id>`:encodeURIComponent(String(e[`message-id`]))}`,pathParams:{"message-id":String(e[`message-id`]??``)},bodyKind:`none`});return}let i=await t(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(v,{account_id:l,message_id:e[`message-id`]}));s(u,{successLabel:`Loaded`})})};var b={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/limits`,errors:{403:`ForbiddenError`}};function te(e){return e.usage(`$0 email-sending limits get
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./chunk-AAQI36FL-e6E5HW1g.mjs";import{n as t}from"./version-CcuBNjqg.mjs";import{t as n}from"./session-COdP8BXD.mjs";import{i as r,t as i}from"./blocks-C3Im7AT0.mjs";import{r as a}from"./theme-BGHWSKCw.mjs";import{i as o}from"./api-Dnt6lRJG.mjs";var s=class extends Error{};function c(e){return e instanceof s||`telemetryMessage`in e&&e.telemetryMessage===`cfetch auth login required`&&`reason`in e&&e.reason===`no-credentials-non-interactive`}function l(e){try{let t=new URL(e);return`${t.pathname.replace(/^\/client\/v\d+/,``)}${t.search}`}catch{return e}}function u(e){return Array.isArray(e)?e.flatMap(e=>{if(typeof e==`string`)return[{message:e}];if(typeof e!=`object`||!e)return[];let t=e,n=typeof t.code==`number`?t.code:void 0,r=typeof t.message==`string`?t.message:void 0;return n!==void 0||r!==void 0?[{code:n,message:r}]:[]}):[]}function d(s){if(n(t),s instanceof o){let e=s.statusCode,t=s.body,n=e===void 0?`Envelope Error`:p(e),o=typeof t==`object`&&t?t:void 0,c=[...u(o?.errors).map(e=>({...e,isError:!0})),...u(o?.messages).map(e=>({...e,isError:!1}))],d=s.rawResponse?.url?`HTTP ${l(s.rawResponse.url)}`:void 0,f=e===void 0?n:`${e} ${n}`,m=d?`${f} · ${d}`:f,h=a.muted(m),g=``;return c.length>0?g=c.map((e,t)=>{let n=typeof e.code==`number`?a.error(a.bold(`[${e.code}]`)):e.isError?a.error(a.bold(`[error]`)):void 0,r=a.bold(e.message??``),i=n?`${n} ${r}`:r;return t===c.length-1?`${i}\n${h}`:i}).join(`
2
+ import{t as e}from"./chunk-AAQI36FL-e6E5HW1g.mjs";import{n as t}from"./version-pcpa_kv3.mjs";import{t as n}from"./session-BEsQIuwP.mjs";import{i as r,t as i}from"./blocks-DK5qAzLe.mjs";import{r as a}from"./theme-BGHWSKCw.mjs";import{i as o}from"./api-Dnt6lRJG.mjs";var s=class extends Error{};function c(e){return e instanceof s||`telemetryMessage`in e&&e.telemetryMessage===`cfetch auth login required`&&`reason`in e&&e.reason===`no-credentials-non-interactive`}function l(e){try{let t=new URL(e);return`${t.pathname.replace(/^\/client\/v\d+/,``)}${t.search}`}catch{return e}}function u(e){return Array.isArray(e)?e.flatMap(e=>{if(typeof e==`string`)return[{message:e}];if(typeof e!=`object`||!e)return[];let t=e,n=typeof t.code==`number`?t.code:void 0,r=typeof t.message==`string`?t.message:void 0;return n!==void 0||r!==void 0?[{code:n,message:r}]:[]}):[]}function d(s){if(n(t),s instanceof o){let e=s.statusCode,t=s.body,n=e===void 0?`Envelope Error`:p(e),o=typeof t==`object`&&t?t:void 0,c=[...u(o?.errors).map(e=>({...e,isError:!0})),...u(o?.messages).map(e=>({...e,isError:!1}))],d=s.rawResponse?.url?`HTTP ${l(s.rawResponse.url)}`:void 0,f=e===void 0?n:`${e} ${n}`,m=d?`${f} · ${d}`:f,h=a.muted(m),g=``;return c.length>0?g=c.map((e,t)=>{let n=typeof e.code==`number`?a.error(a.bold(`[${e.code}]`)):e.isError?a.error(a.bold(`[error]`)):void 0,r=a.bold(e.message??``),i=n?`${n} ${r}`:r;return t===c.length-1?`${i}\n${h}`:i}).join(`
3
3
 
4
4
  `):(g=a.error(a.bold(s.message||m)),s.message&&m&&(g+=`\n${h}`)),console.error(i(g,void 0,{title:`APIError`,rawMessage:!0})),e===401?console.error(`
5
5
  `+r(`Try running: cf auth login`)):e===403&&console.error(`
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./dry-run-qsnRlRk6.mjs";import{a as r,t as i}from"./context-BGm5_wTT.mjs";import{t as a}from"./local-B3zt9PXR.mjs";import{t as o}from"./output-hFMAotFl.mjs";import{t as s}from"./progress-DE_G09u2.mjs";import{t as c}from"./run-CXWkMU3x.mjs";import{n as l}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";import{o as u,r as d,t as f}from"./body-parser-HN91kAf0.mjs";var p={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/field_extractors/${t.extractor}`,errors:{404:`NotFoundError`}};function m(e){return e.usage(`$0 field-extractors delete <extractor>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{t as n}from"./dry-run-mrA7FFLR.mjs";import{a as r,t as i}from"./context-DlFhI9cN.mjs";import{t as a}from"./local-B3zt9PXR.mjs";import{t as o}from"./output-PRKYaJuo.mjs";import{t as s}from"./progress-AML-AVs4.mjs";import{t as c}from"./run-DAg7dfIW.mjs";import{n as l}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";import{o as u,r as d,t as f}from"./body-parser-HN91kAf0.mjs";var p={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/field_extractors/${t.extractor}`,errors:{404:`NotFoundError`}};function m(e){return e.usage(`$0 field-extractors delete <extractor>
3
3
 
4
4
  Deletes all custom extraction rules for an extractor type.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const h={command:`delete <extractor>`,describe:`Delete Field Extractor`,builder:m,handler:async e=>c({command:`field-extractors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf field-extractors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/field_extractors/${e.extractor==null?`<extractor>`:encodeURIComponent(String(e.extractor))}`,pathParams:{extractor:String(e.extractor??``)},bodyKind:`none`});return}let c=await t(e),u=e.local?a:await i();if(e.accountId=u,!await l({force:!!e.force}))return;let d=await s(`Deleting`,async()=>c.send(p,{account_id:u,extractor:e.extractor}));o(d,{successLabel:`Deleted`})})};var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/field_extractors/${t.extractor}`,errors:{404:`NotFoundError`}};function _(e){return e.usage(`$0 field-extractors get <extractor>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,i as o,t as s}from"./context-BGm5_wTT.mjs";import{t as c}from"./dry-run-qsnRlRk6.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{t as u}from"./local-B3zt9PXR.mjs";import{t as d}from"./run-CXWkMU3x.mjs";import{t as f}from"./output-hFMAotFl.mjs";import{t as p}from"./progress-DE_G09u2.mjs";import{a as m,i as h,n as g}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";var _={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules`,body:`json`};function v(e){return e.usage(`$0 firewall access-rules create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,i as o,t as s}from"./context-DlFhI9cN.mjs";import{t as c}from"./dry-run-mrA7FFLR.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{t as u}from"./local-B3zt9PXR.mjs";import{t as d}from"./run-DAg7dfIW.mjs";import{t as f}from"./output-PRKYaJuo.mjs";import{t as p}from"./progress-AML-AVs4.mjs";import{a as m,i as h,n as g}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";var _={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules`,body:`json`};function v(e){return e.usage(`$0 firewall access-rules create
3
3
 
4
4
  Creates a new IP Access rule for an account or zone. The rule will apply to all zones in the account or zone. Note: To create an IP Access rule that applies to a single zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-DA1PHaHi.mjs";import{i as r,o as i,r as a,t as o}from"./body-parser-HN91kAf0.mjs";import{a as s,t as c}from"./context-BGm5_wTT.mjs";import{t as l}from"./dry-run-qsnRlRk6.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{t as d}from"./local-B3zt9PXR.mjs";import{t as f}from"./run-CXWkMU3x.mjs";import{t as p}from"./output-hFMAotFl.mjs";import{t as m}from"./progress-DE_G09u2.mjs";import{a as h,n as g}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 flagship apps create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-cj71dGxS.mjs";import{i as r,o as i,r as a,t as o}from"./body-parser-HN91kAf0.mjs";import{a as s,t as c}from"./context-DlFhI9cN.mjs";import{t as l}from"./dry-run-mrA7FFLR.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{t as d}from"./local-B3zt9PXR.mjs";import{t as f}from"./run-DAg7dfIW.mjs";import{t as p}from"./output-PRKYaJuo.mjs";import{t as m}from"./progress-AML-AVs4.mjs";import{a as h,n as g}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 flagship apps create
3
3
 
4
4
  Creates an app. The returned \`id\` is used in all subsequent flag, changelog, and evaluation requests.`).option(`name`,{type:`string`,description:`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`create`,describe:`Create app`,builder:v,handler:async e=>f({command:`flagship apps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({command:`cf flagship apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?o({name:u(e.name,`name`,`text`)}):a(e.body)});return}let t=e.body===void 0?void 0:a(e.body),r=await n(e),i=e.local?d:await c();if(e.accountId=i,e.body!==void 0){let e=t,n=await m(`Creating`,async()=>r.send(_,{body:e,account_id:i}));p(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`));let f=o({name:u(e.name,`name`,`text`)}),g=await m(`Creating`,async()=>r.send(_,{body:f,account_id:i}));p(g,{successLabel:`Created`})})};function b(e){return e.usage("$0 flagship apps definitions get <app-id>\n\nReturns an app's evaluation-only flag definitions for SDKs that evaluate locally. Send the returned `ETag` in `If-None-Match` to avoid downloading unchanged definitions.").positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`if-none-match`,{type:`string`,description:"Previously returned ETag, or `*`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <app-id>`,describe:`Get flag definitions`,builder:b,handler:async e=>f({command:`flagship apps definitions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let r={};if(e[`if-none-match`]!==void 0&&(r[`If-None-Match`]=String(e[`if-none-match`])),e.dryRun){let t=await s();l({command:`cf flagship apps definitions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/definitions`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let i=await n(e),a=e.local?d:await c();e.accountId=a;let o=await m(`Loading`,async()=>t(i,`GET`,`/accounts/${a}/flagship/apps/${encodeURIComponent(String(e[`app-id`]))}/definitions`,{headers:Object.keys(r).length>0?r:void 0}));p(o,{successLabel:`Loaded`})})},S={command:`definitions`,describe:`Operations for apps.definitions`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ee={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function te(e){return e.usage(`$0 flagship apps delete <app-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{i as n}from"./context-BGm5_wTT.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{t as i}from"./output-hFMAotFl.mjs";import{t as a}from"./progress-DE_G09u2.mjs";import{t as o}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{r as s,t as c}from"./body-parser-HN91kAf0.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";var u={method:`GET`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`};function d(e){return e.usage(`$0 fraud get
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{i as n}from"./context-DlFhI9cN.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{t as i}from"./output-PRKYaJuo.mjs";import{t as a}from"./progress-AML-AVs4.mjs";import{t as o}from"./run-DAg7dfIW.mjs";import"./telemetry-DDs3zhdw.mjs";import{r as s,t as c}from"./body-parser-HN91kAf0.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";var u={method:`GET`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`};function d(e){return e.usage(`$0 fraud get
3
3
 
4
4
  Retrieve Fraud Detection settings for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`get`,describe:`Get Fraud Detection Settings`,builder:d,handler:async e=>o({command:`fraud get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf fraud get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/fraud_detection/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(u,{zone_id:s}));i(c,{successLabel:`Loaded`})})};var p={method:`PUT`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`,body:`json`};function m(e){return e.usage("$0 fraud update\n\nUpdate Fraud Detection settings for a zone. Notes on `username_expressions` behavior: - If omitted or set to null, expressions are not modified. - If provided as an empty array `[]`, all expressions will be cleared.").option(`authentication-settings-failure-criteria-kind`,{type:`string`,description:"The type of criterion. Currently only `status_code` is supported.",choices:[`status_code`]}).coerce(`authentication-settings-failure-criteria-kind`,e=>l(e,`authentication-settings-failure-criteria-kind`,`text`)).option(`authentication-settings-failure-criteria-status-codes`,{type:`string`,array:!0,description:`HTTP status codes to match against the origin response.
5
5
  - Maximum of 10 codes per criterion.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{i as n}from"./context-BGm5_wTT.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{t as i}from"./output-hFMAotFl.mjs";import{t as a}from"./progress-DE_G09u2.mjs";import{t as o}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{r as s,t as c}from"./body-parser-HN91kAf0.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u}from"./prompt-D274Im1O.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/settings/google-tag-gateway/config`};function f(e){return e.usage(`$0 google-tag-gateway config get
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{i as n}from"./context-DlFhI9cN.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{t as i}from"./output-PRKYaJuo.mjs";import{t as a}from"./progress-AML-AVs4.mjs";import{t as o}from"./run-DAg7dfIW.mjs";import"./telemetry-DDs3zhdw.mjs";import{r as s,t as c}from"./body-parser-HN91kAf0.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u}from"./prompt-Bnon9lfK.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/settings/google-tag-gateway/config`};function f(e){return e.usage(`$0 google-tag-gateway config get
3
3
 
4
4
  Gets the Google Tag Gateway configuration for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`get`,describe:`Get Google Tag Gateway configuration`,builder:f,handler:async e=>o({command:`google-tag-gateway config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf google-tag-gateway config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/google-tag-gateway/config`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(d,{zone_id:s}));i(c,{successLabel:`Loaded`})})};var m={method:`PUT`,path:t=>e`/zones/${t.zone_id}/settings/google-tag-gateway/config`,body:`json`};function h(e){return e.usage(`$0 google-tag-gateway config update
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{i as n}from"./context-BGm5_wTT.mjs";import{i as r,r as i,t as a}from"./body-parser-HN91kAf0.mjs";import{t as o}from"./dry-run-qsnRlRk6.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{t as c}from"./run-CXWkMU3x.mjs";import{t as l}from"./output-hFMAotFl.mjs";import{t as u}from"./progress-DE_G09u2.mjs";import{a as d,n as f}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/healthchecks`,body:`json`};function m(e){return e.usage(`$0 healthchecks create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{i as n}from"./context-DlFhI9cN.mjs";import{i as r,r as i,t as a}from"./body-parser-HN91kAf0.mjs";import{t as o}from"./dry-run-mrA7FFLR.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{t as c}from"./run-DAg7dfIW.mjs";import{t as l}from"./output-PRKYaJuo.mjs";import{t as u}from"./progress-AML-AVs4.mjs";import{a as d,n as f}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/healthchecks`,body:`json`};function m(e){return e.usage(`$0 healthchecks create
3
3
 
4
4
  Create a new health check.`).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`,default:1}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`,default:1}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": [string]}.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>s(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>s(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Create Health Check`,builder:m,handler:async e=>c({command:`healthchecks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?a({address:s(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:s(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:s(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:r(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:s(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:s(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:s(e.type,`type`,`text`)},[[`http_config`,`header`]]):i(e.body)});return}let c=e.body===void 0?void 0:i(e.body),f=await t(e),m=await n({zone:e.zone},f,{quiet:e.quiet});if(e.zoneId=m,e.body!==void 0){let e=c,t=await u(`Creating`,async()=>f.send(p,{body:e,zone_id:m}));l(t,{successLabel:`Created`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let h=a({address:s(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:s(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:s(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:r(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:s(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:s(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:s(e.type,`type`,`text`)},[[`http_config`,`header`]]),g=await u(`Creating`,async()=>f.send(p,{body:h,zone_id:m}));l(g,{successLabel:`Created`})})};var g={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/healthchecks/${t.healthcheck_id}`};function _(e){return e.usage(`$0 healthchecks delete <healthcheck-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{r as n,t as r}from"./body-parser-HN91kAf0.mjs";import{a as i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./dry-run-qsnRlRk6.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import{t as u}from"./output-hFMAotFl.mjs";import{t as d}from"./progress-DE_G09u2.mjs";import{a as f,i as p,n as m}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs`,body:`json`};function g(e){return e.usage(`$0 hyperdrive create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{r as n,t as r}from"./body-parser-HN91kAf0.mjs";import{a as i,t as a}from"./context-DlFhI9cN.mjs";import{t as o}from"./dry-run-mrA7FFLR.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./run-DAg7dfIW.mjs";import{t as u}from"./output-PRKYaJuo.mjs";import{t as d}from"./progress-AML-AVs4.mjs";import{a as f,i as p,n as m}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs`,body:`json`};function g(e){return e.usage(`$0 hyperdrive create
3
3
 
4
4
  Creates and returns a new Hyperdrive configuration. For a PlanetScale integration, the Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard.`).option(`mtls-ca-certificate-id`,{type:`string`,description:`Define CA certificate ID obtained after uploading CA cert.`}).option(`mtls-certificate-id`,{type:`string`,description:`Define mTLS certificate ID obtained after uploading client cert.`}).option(`mtls-sslmode`,{type:`string`,description:"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.",choices:[`require`,`verify-ca`,`verify-full`,`REQUIRED`,`VERIFY_CA`,`VERIFY_IDENTITY`]}).coerce(`mtls-sslmode`,e=>s(e,`mtls-sslmode`,`text`)).option(`name`,{type:`string`,description:`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`}).option(`origin-connection-limit`,{type:`number`,description:`The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{t as a}from"./dry-run-qsnRlRk6.mjs";import{a as o,t as s}from"./context-BGm5_wTT.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{t as l}from"./local-B3zt9PXR.mjs";import{t as u}from"./output-hFMAotFl.mjs";import{t as d}from"./run-CXWkMU3x.mjs";import{t as f}from"./progress-DE_G09u2.mjs";import{a as p,i as m,n as h}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";import{t as g}from"./list-ByCv9-Fl.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/oauth_clients`,body:`json`};function v(e){return e.usage(`$0 iam oauth-clients create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{t as a}from"./dry-run-mrA7FFLR.mjs";import{a as o,t as s}from"./context-DlFhI9cN.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{t as l}from"./local-B3zt9PXR.mjs";import{t as u}from"./output-PRKYaJuo.mjs";import{t as d}from"./run-DAg7dfIW.mjs";import{t as f}from"./progress-AML-AVs4.mjs";import{a as p,i as m,n as h}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";import{t as g}from"./list-ByCv9-Fl.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/oauth_clients`,body:`json`};function v(e){return e.usage(`$0 iam oauth-clients create
3
3
 
4
4
  Create a new OAuth client for an account.`).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).coerce(`token-endpoint-auth-method`,e=>c(e,`token-endpoint-auth-method`,`text`)).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`create`,describe:`Create OAuth Client`,builder:v,handler:async e=>d({command:`iam oauth-clients create`,classification:{safeFlags:[`token-endpoint-auth-method`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();a({command:`cf iam oauth-clients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({allowed_cors_origins:e[`allowed-cors-origins`],client_name:c(e[`client-name`],`client-name`,`text`),client_uri:c(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:c(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:c(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:c(e[`tos-uri`],`tos-uri`,`text`)}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),d=await t(e),h=e.local?l:await s();if(e.accountId=h,e.body!==void 0){let e=n,t=await f(`Creating`,async()=>d.send(_,{body:e,account_id:h}));u(t,{successLabel:`Created`});return}if(e[`client-name`]===void 0&&(e[`client-name`]=await p(`client-name`,`Human-readable name of the OAuth client.`)),e[`grant-types`]===void 0)throw Error(`--grant-types is required (or pass --body with this field set).`);if(e[`redirect-uris`]===void 0)throw Error(`--redirect-uris is required (or pass --body with this field set).`);if(e[`response-types`]===void 0)throw Error(`--response-types is required (or pass --body with this field set).`);if(e.scopes===void 0)throw Error(`--scopes is required (or pass --body with this field set).`);e[`token-endpoint-auth-method`]===void 0&&(e[`token-endpoint-auth-method`]=await m(`token-endpoint-auth-method`,`The authentication method the client uses at the token endpoint.`,[`none`,`client_secret_basic`,`client_secret_post`]));let g=i({allowed_cors_origins:e[`allowed-cors-origins`],client_name:c(e[`client-name`],`client-name`,`text`),client_uri:c(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:c(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:c(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:c(e[`tos-uri`],`tos-uri`,`text`)}),v=await f(`Creating`,async()=>d.send(_,{body:g,account_id:h}));u(v,{successLabel:`Created`})})};var b={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}/rotate_secret`};function ee(e){return e.usage(`$0 iam oauth-clients delete-rotated-secret <oauth-client-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-DA1PHaHi.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{a as i,i as a,t as o}from"./context-BGm5_wTT.mjs";import{n as s,t as c}from"./input-validation-D7z60HJH.mjs";import{t as l}from"./local-B3zt9PXR.mjs";import{t as u}from"./output-hFMAotFl.mjs";import{t as d}from"./run-CXWkMU3x.mjs";import{t as f}from"./progress-DE_G09u2.mjs";import"./telemetry-COlodX5Z.mjs";import{a as p,i as m,n as h}from"./prompt-D274Im1O.mjs";import{i as g,o as _,r as v,t as y}from"./body-parser-HN91kAf0.mjs";import{n as b,t as x}from"./raw-fetch-DhlyWQtk.mjs";var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v1`,pathParams:[`account_id`],body:`form`};function ee(e){return e.usage(`$0 images create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-cj71dGxS.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{a as i,i as a,t as o}from"./context-DlFhI9cN.mjs";import{n as s,t as c}from"./input-validation-D7z60HJH.mjs";import{t as l}from"./local-B3zt9PXR.mjs";import{t as u}from"./output-PRKYaJuo.mjs";import{t as d}from"./run-DAg7dfIW.mjs";import{t as f}from"./progress-AML-AVs4.mjs";import"./telemetry-DDs3zhdw.mjs";import{a as p,i as m,n as h}from"./prompt-Bnon9lfK.mjs";import{i as g,o as _,r as v,t as y}from"./body-parser-HN91kAf0.mjs";import{n as b,t as x}from"./raw-fetch-0T1SwPa1.mjs";var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v1`,pathParams:[`account_id`],body:`form`};function ee(e){return e.usage(`$0 images create
3
3
 
4
4
  Upload an image to CF Images. Images up to 10 Megabytes can be uploaded using a single HTTP POST (multipart/form-data) request by sending an image file or passing a URL accessible to the API.`).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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`id`,{type:`string`,description:`An optional custom unique identifier for your image.`}).option(`metadata`,{type:`string`,description:`User modifiable key-value store. Can use used for keeping references to another system of record for managing images.`}).option(`require-signed-urls`,{type:`boolean`,description:`Indicates whether the image requires a signature token for the access.`}).option(`url`,{type:`string`,description:`A URL to fetch an image from origin. Only needed when type is uploading from a URL.`})}const te={command:`create`,describe:`Upload an image`,builder:ee,handler:async e=>d({command:`images create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf images create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file,creator:e.creator,id:e.id,metadata:e.metadata,"require-signed-urls":e[`require-signed-urls`],url:e.url}});return}let a=await n(e),d=e.local?l:await o();if(e.accountId=d,e.file!==void 0||e.body!==void 0||e.creator!==void 0||e.id!==void 0||e.metadata!==void 0||e[`require-signed-urls`]!==void 0||e.url!==void 0){let n=new FormData;if(e.file!==void 0){let t=c(e.file);n.append(`file`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&n.append(`file`,e.body);if(e.creator!==void 0&&n.append(`creator`,String(s(e.creator,`creator`,`text`)??``)),e.id!==void 0&&n.append(`id`,String(s(e.id,`id`,`text`)??``)),e.metadata!==void 0){let t=typeof e.metadata==`string`?s(e.metadata,`metadata`,`text`):e.metadata;n.append(`metadata`,typeof t==`string`?t:JSON.stringify(t))}e[`require-signed-urls`]!==void 0&&n.append(`requireSignedURLs`,String(e[`require-signed-urls`])),e.url!==void 0&&n.append(`url`,String(s(e.url,`url`,`text`)??``));let r=await f(`Creating`,async()=>t(a,`POST`,`/accounts/${d}/images/v1`,{body:n}));u(r,{successLabel:`Created`});return}if(e.body!==void 0){let n=s(e.body,`body`,`binary`),r=await f(`Creating`,async()=>t(a,`POST`,`/accounts/${d}/images/v1`,{body:n,headers:{"Content-Type":`multipart/form-data`}}));u(r,{successLabel:`Created`});return}let p=await f(`Creating`,async()=>a.send(S,{account_id:d}));u(p,{successLabel:`Created`})})};var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v1/${t.image_id}`};function re(e){return e.usage(`$0 images delete <image-id>
5
5
 
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,r as t,t as n}from"./src-ByCoEqOw.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";export{r as CliExit,n as buildCli,e as main,t as runMain};
2
+ import{n as e,r as t,t as n}from"./src-B8i6_XGg.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";export{r as CliExit,n as buildCli,e as main,t as runMain};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./telemetry-COlodX5Z.mjs";import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{n,z as r}from"./dist-BxhwE-W1.mjs";import"./src-ByCoEqOw.mjs";import{i,n as a,t as o}from"./autoconfig-B4tFR6ua.mjs";import{i as s}from"./delegate-livNdiwK.mjs";import{n as c,r as l}from"./dialog-CD94-Kzw.mjs";import{t as ee}from"./progress-DE_G09u2.mjs";import{t as u}from"./project-settings-D_S-UC8I.mjs";import"./ui-dWsVmFCG.mjs";import{t as d}from"./log-Brx-wjJW.mjs";import{n as f}from"./run-CXWkMU3x.mjs";import{n as p}from"./version-CcuBNjqg.mjs";import{basename as m,dirname as h,isAbsolute as g,join as _,relative as v,resolve as y}from"node:path";import{mkdir as b,readdir as x,stat as S,writeFile as C}from"node:fs/promises";const w={"@cloudflare/vite-plugin":`beta`,typescript:`^7.0.2`,vite:`^8.3.0`};function te(e){return{".gitignore":M(),"cloudflare.config.ts":D(e),"package.json":A(e),...e.packageManager===`pnpm`?{"pnpm-workspace.yaml":T()}:{},"src/index.ts":k(),"tsconfig.json":j(),"vite.config.ts":O()}}function T(){return`# Approve build scripts needed by the generated Worker's dependencies.
2
+ import"./telemetry-DDs3zhdw.mjs";import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{n,z as r}from"./dist-DwxlJ9Ms.mjs";import"./src-B8i6_XGg.mjs";import{i,n as a,t as o}from"./autoconfig-DoLQ5ct8.mjs";import{i as s}from"./delegate-BKlomUk6.mjs";import{n as c,r as l}from"./dialog-CD94-Kzw.mjs";import{t as ee}from"./progress-AML-AVs4.mjs";import{t as u}from"./project-settings-D_S-UC8I.mjs";import"./ui-CY75N4Tm.mjs";import{t as d}from"./log-Brx-wjJW.mjs";import{n as f}from"./run-DAg7dfIW.mjs";import{n as p}from"./version-pcpa_kv3.mjs";import{basename as m,dirname as h,isAbsolute as g,join as _,relative as v,resolve as y}from"node:path";import{mkdir as b,readdir as x,stat as S,writeFile as C}from"node:fs/promises";const w={"@cloudflare/vite-plugin":`beta`,typescript:`^7.0.2`,vite:`^8.3.0`};function te(e){return{".gitignore":M(),"cloudflare.config.ts":D(e),"package.json":A(e),...e.packageManager===`pnpm`?{"pnpm-workspace.yaml":T()}:{},"src/index.ts":k(),"tsconfig.json":j(),"vite.config.ts":O()}}function T(){return`# Approve build scripts needed by the generated Worker's dependencies.
3
3
  allowBuilds:
4
4
  esbuild: true
5
5
  workerd: true
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-DA1PHaHi.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{a as i,i as a,t as o}from"./context-BGm5_wTT.mjs";import{t as s}from"./local-B3zt9PXR.mjs";import{t as c}from"./output-hFMAotFl.mjs";import{t as l}from"./progress-DE_G09u2.mjs";import{t as u}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{r as d,t as f}from"./body-parser-HN91kAf0.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{n as h,t as g}from"./raw-fetch-DhlyWQtk.mjs";import{a as _,n as v}from"./prompt-D274Im1O.mjs";var ee={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}`};function te(e){return e.usage(`$0 intel asn get <asn>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-cj71dGxS.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{a as i,i as a,t as o}from"./context-DlFhI9cN.mjs";import{t as s}from"./local-B3zt9PXR.mjs";import{t as c}from"./output-PRKYaJuo.mjs";import{t as l}from"./progress-AML-AVs4.mjs";import{t as u}from"./run-DAg7dfIW.mjs";import"./telemetry-DDs3zhdw.mjs";import{r as d,t as f}from"./body-parser-HN91kAf0.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{n as h,t as g}from"./raw-fetch-0T1SwPa1.mjs";import{a as _,n as v}from"./prompt-Bnon9lfK.mjs";var ee={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}`};function te(e){return e.usage(`$0 intel asn get <asn>
3
3
 
4
4
  Gets an overview of the Autonomous System Number (ASN) and a list of subnets for it.`).positional(`asn`,{type:`string`,description:`Asn`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get <asn>`,describe:`Get ASN Overview.`,builder:te,handler:async e=>u({command:`intel asn get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf intel asn get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/asn/${e.asn==null?`<asn>`:encodeURIComponent(String(e.asn))}`,pathParams:{asn:String(e.asn??``)},bodyKind:`none`});return}let t=await n(e),a=e.local?s:await o();e.accountId=a;let u=await l(`Loading`,async()=>t.send(ee,{account_id:a,asn:e.asn}));c(u,{successLabel:`Loaded`})})};var re={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}/subnets`};function ie(e){return e.usage(`$0 intel asn subnets list
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,r as t,t as n}from"./rolldown-runtime-BNtqjh-B.mjs";import{H as r}from"./dist-BxhwE-W1.mjs";import{t as i}from"./src-COwxoocl.mjs";import{r as a}from"./interactive-wQM7Blhm.mjs";import{n as o,t as s}from"./ansi-styles-kSC6bEIq.mjs";import c,{exit as l,stdin as u,stdout as d}from"node:process";import"node:os";import"node:tty";import{styleText as f}from"node:util";import p from"node:readline";const{white:m,gray:h,dim:g,hidden:_,bold:v,cyanBright:y,bgCyan:b}=r,x=r.hex(`#BD5B08`),S=r.hex(`#111`),C=r.hex(`#0E838F`),w=S.bgHex(`#0E838F`),ee=r.hex(`#AB2526`),te=S.bgHex(`#AB2526`),ne=r.hex(`#218529`),re=S.bgHex(`#218529`),ie=r.hex(`#7F7322`),ae=S.bgHex(`#7F7322`);var oe=class extends Error{constructor(e,t){super(e),this.signal=t}};const se=e=>e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,ce=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,le=e=>e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,ue=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,T=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,E=/\t{1,1000}/y,de=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,D=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,fe=/\p{M}+/gu,pe={limit:1/0,ellipsis:``},me=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?me(i,pe,n).width:0),o=n.ansiWidth??0,s=n.controlWidth??0,c=n.tabWidth??8,l=n.ambiguousWidth??1,u=n.emojiWidth??2,d=n.fullWidthWidth??2,f=n.regularWidth??1,p=n.wideWidth??2,m=0,h=0,g=e.length,_=0,v=!1,y=g,b=Math.max(0,r-a),x=0,S=0,C=0,w=0;outer:for(;;){if(S>x||h>=g&&h>m){let t=e.slice(x,S)||e.slice(m,h);_=0;for(let e of t.replaceAll(fe,``)){let t=e.codePointAt(0)||0;if(w=ce(t)?d:le(t)?p:l!==f&&se(t)?l:f,C+w>b&&(y=Math.min(y,Math.max(x,m)+_)),C+w>r){v=!0;break outer}_+=e.length,C+=w}x=S=0}if(h>=g)break;if(D.lastIndex=h,D.test(e)){if(_=D.lastIndex-h,w=_*f,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/f))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=D.lastIndex}else if(ue.lastIndex=h,ue.test(e)){if(C+o>b&&(y=Math.min(y,h)),C+o>r){v=!0;break}C+=o,x=m,S=h,h=m=ue.lastIndex}else if(T.lastIndex=h,T.test(e)){if(_=T.lastIndex-h,w=_*s,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/s))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=T.lastIndex}else if(E.lastIndex=h,E.test(e)){if(_=E.lastIndex-h,w=_*c,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/c))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=E.lastIndex}else if(de.lastIndex=h,de.test(e)){if(C+u>b&&(y=Math.min(y,h)),C+u>r){v=!0;break}C+=u,x=m,S=h,h=m=de.lastIndex}else h+=1}return{width:v?b:C,index:v?y:g,truncated:v,ellipsed:v&&r>=a}},he={limit:1/0,ellipsis:``,ellipsisWidth:0},O=(e,t={})=>me(e,he,t).width,ge=`]8;;`,_e=RegExp(`(?:\\[(?<code>\\d+)m|\\${ge}(?<uri>.*))`,`y`),ve=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},ye=e=>`[${e}m`,be=e=>`${ge}${e}`,xe=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:O(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=O(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===`›`)&&(i=!0,a=t.startsWith(ge,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},Se=e=>{let t=e.split(` `),n=t.length;for(;n&&!O(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},Ce=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=O(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=O(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),xe(s,r,t),c=O(s.at(-1)??``)}else{if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){xe(s,r,t),c=O(s.at(-1)??``);continue}s.push(``),c=0}c+i>t&&n.wordWrap===!1?(xe(s,r,t),c=O(s.at(-1)??``)):(s[s.length-1]+=r,c+=i)}}n.trim!==!1&&(s=s.map(e=>Se(e)));let l=s.join(`
2
+ import{n as e,r as t,t as n}from"./rolldown-runtime-BNtqjh-B.mjs";import{H as r}from"./dist-DwxlJ9Ms.mjs";import{t as i}from"./src-COwxoocl.mjs";import{r as a}from"./interactive-wQM7Blhm.mjs";import{n as o,t as s}from"./ansi-styles-kSC6bEIq.mjs";import c,{exit as l,stdin as u,stdout as d}from"node:process";import"node:os";import"node:tty";import{styleText as f}from"node:util";import p from"node:readline";const{white:m,gray:h,dim:g,hidden:_,bold:v,cyanBright:y,bgCyan:b}=r,x=r.hex(`#BD5B08`),S=r.hex(`#111`),C=r.hex(`#0E838F`),w=S.bgHex(`#0E838F`),ee=r.hex(`#AB2526`),te=S.bgHex(`#AB2526`),ne=r.hex(`#218529`),re=S.bgHex(`#218529`),ie=r.hex(`#7F7322`),ae=S.bgHex(`#7F7322`);var oe=class extends Error{constructor(e,t){super(e),this.signal=t}};const se=e=>e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,ce=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,le=e=>e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,ue=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,T=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,E=/\t{1,1000}/y,de=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,D=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,fe=/\p{M}+/gu,pe={limit:1/0,ellipsis:``},me=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?me(i,pe,n).width:0),o=n.ansiWidth??0,s=n.controlWidth??0,c=n.tabWidth??8,l=n.ambiguousWidth??1,u=n.emojiWidth??2,d=n.fullWidthWidth??2,f=n.regularWidth??1,p=n.wideWidth??2,m=0,h=0,g=e.length,_=0,v=!1,y=g,b=Math.max(0,r-a),x=0,S=0,C=0,w=0;outer:for(;;){if(S>x||h>=g&&h>m){let t=e.slice(x,S)||e.slice(m,h);_=0;for(let e of t.replaceAll(fe,``)){let t=e.codePointAt(0)||0;if(w=ce(t)?d:le(t)?p:l!==f&&se(t)?l:f,C+w>b&&(y=Math.min(y,Math.max(x,m)+_)),C+w>r){v=!0;break outer}_+=e.length,C+=w}x=S=0}if(h>=g)break;if(D.lastIndex=h,D.test(e)){if(_=D.lastIndex-h,w=_*f,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/f))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=D.lastIndex}else if(ue.lastIndex=h,ue.test(e)){if(C+o>b&&(y=Math.min(y,h)),C+o>r){v=!0;break}C+=o,x=m,S=h,h=m=ue.lastIndex}else if(T.lastIndex=h,T.test(e)){if(_=T.lastIndex-h,w=_*s,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/s))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=T.lastIndex}else if(E.lastIndex=h,E.test(e)){if(_=E.lastIndex-h,w=_*c,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/c))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=E.lastIndex}else if(de.lastIndex=h,de.test(e)){if(C+u>b&&(y=Math.min(y,h)),C+u>r){v=!0;break}C+=u,x=m,S=h,h=m=de.lastIndex}else h+=1}return{width:v?b:C,index:v?y:g,truncated:v,ellipsed:v&&r>=a}},he={limit:1/0,ellipsis:``,ellipsisWidth:0},O=(e,t={})=>me(e,he,t).width,ge=`]8;;`,_e=RegExp(`(?:\\[(?<code>\\d+)m|\\${ge}(?<uri>.*))`,`y`),ve=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},ye=e=>`[${e}m`,be=e=>`${ge}${e}`,xe=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:O(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=O(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===`›`)&&(i=!0,a=t.startsWith(ge,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},Se=e=>{let t=e.split(` `),n=t.length;for(;n&&!O(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},Ce=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=O(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=O(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),xe(s,r,t),c=O(s.at(-1)??``)}else{if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){xe(s,r,t),c=O(s.at(-1)??``);continue}s.push(``),c=0}c+i>t&&n.wordWrap===!1?(xe(s,r,t),c=O(s.at(-1)??``)):(s[s.length-1]+=r,c+=i)}}n.trim!==!1&&(s=s.map(e=>Se(e)));let l=s.join(`
3
3
  `),u=!1;for(let e=0;e<l.length;e++){let t=l[e];if(r+=t,!u)u=t>=`\ud800`&&t<=`\udbff`;else continue;if(t===`\x1B`||t===`›`){_e.lastIndex=e+1;let t=_e.exec(l)?.groups;if(t?.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t?.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}if(l[e+1]===`
4
4
  `){a&&(r+=be(``));let e=i?ve(i):void 0;i&&e&&(r+=ye(e))}else t===`
5
5
  `&&(i&&ve(i)&&(r+=ye(i)),a&&(r+=be(a)))}return r},we=/\r?\n/;function Te(e,t,n){return String(e).normalize().split(we).map(e=>Ce(e,t,n)).join(`
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-DA1PHaHi.mjs";import{t}from"./dry-run-qsnRlRk6.mjs";import{t as n}from"./output-hFMAotFl.mjs";import{t as r}from"./progress-DE_G09u2.mjs";import{t as i}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";var a={method:`POST`,path:()=>`/internal/submit`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function o(e){return e.usage(`$0 internal submit create
2
+ import{n as e}from"./auth-cj71dGxS.mjs";import{t}from"./dry-run-mrA7FFLR.mjs";import{t as n}from"./output-PRKYaJuo.mjs";import{t as r}from"./progress-AML-AVs4.mjs";import{t as i}from"./run-DAg7dfIW.mjs";import"./telemetry-DDs3zhdw.mjs";var a={method:`POST`,path:()=>`/internal/submit`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function o(e){return e.usage(`$0 internal submit create
3
3
 
4
4
  Internal route for testing URL submissions.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`create`,describe:`Internal route for testing URL submissions`,builder:o,handler:async o=>i({command:`internal submit create`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){t({command:`cf internal submit create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/internal/submit`,pathParams:{},bodyKind:`none`});return}let i=await e(o),s=await r(`Creating`,async()=>i.send(a));n(s,{successLabel:`Created`})})},c={command:`submit`,describe:`Operations for submit`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},l={command:`internal`,describe:`internal`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{l as default};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-DA1PHaHi.mjs";import{t}from"./dry-run-qsnRlRk6.mjs";import{t as n}from"./output-hFMAotFl.mjs";import{t as r}from"./progress-DE_G09u2.mjs";import{t as i}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";var a={method:`GET`,path:()=>`/ips`,query:[`networks`]};function o(e){return e.usage(`$0 ips list
2
+ import{n as e}from"./auth-cj71dGxS.mjs";import{t}from"./dry-run-mrA7FFLR.mjs";import{t as n}from"./output-PRKYaJuo.mjs";import{t as r}from"./progress-AML-AVs4.mjs";import{t as i}from"./run-DAg7dfIW.mjs";import"./telemetry-DDs3zhdw.mjs";var a={method:`GET`,path:()=>`/ips`,query:[`networks`]};function o(e){return e.usage(`$0 ips list
3
3
 
4
4
  Get IPs used on the Cloudflare/JD Cloud network, see https://www.cloudflare.com/ips for Cloudflare IPs or https://developers.cloudflare.com/china-network/reference/infrastructure/ for JD Cloud IPs.`).option(`networks`,{type:`string`,description:"Specified as `jdcloud` to list IPs used by JD Cloud data centers."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`list`,describe:`Cloudflare/JD Cloud IP Details`,builder:o,handler:async o=>i({command:`ips list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let i={networks:o.networks};if(o.dryRun){t({command:`cf ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/ips`,pathParams:{},query:i,bodyKind:`none`});return}let s=await e(o),c=await r(`Loading`,async()=>s.send(a,i));n(c,{successLabel:`Loaded`})})},c={command:`ips`,describe:`ips`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{r as n,t as r}from"./body-parser-HN91kAf0.mjs";import{a as i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./dry-run-qsnRlRk6.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import{t as u}from"./output-hFMAotFl.mjs";import{t as d}from"./progress-DE_G09u2.mjs";import{a as f,n as p}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/k2/streams`,body:`json`};function h(e){return e.usage("$0 k2 streams create\n\nCreate a new K2 stream. HTTP is disabled when `http` is omitted. Enabled HTTP requires authentication and allows all origins unless `authentication` or `cors` say otherwise. At least one input must be enabled.").option(`http-authentication`,{type:`boolean`,description:`Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false, the endpoint accepts unauthenticated records. Defaults to true when HTTP is enabled without a stored value.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:"Allows browser requests from these HTTP or HTTPS origins. Use a wildcard only as the sole origin. An empty list blocks cross-origin browser requests. Defaults to `['*']` when HTTP is enabled without stored origins."}).option(`http-enabled`,{type:`boolean`,description:`Indicates whether the HTTP endpoint accepts records.`}).option(`name`,{type:`string`,description:`Specifies the name of the K2 stream.`}).option(`retention-seconds`,{type:`number`,description:`Sets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive.`,default:604800}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates whether Workers bindings can produce records to the stream.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0})}const g={command:`create`,describe:`Create K2 stream`,builder:h,handler:async e=>l({command:`k2 streams create`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf k2 streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams`,pathParams:{},bodyKind:`json`,body:e.body===void 0?r({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:s(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}):n(e.body)});return}let l=e.body===void 0?void 0:n(e.body),p=await t(e),h=e.local?c:await a();if(e.accountId=h,e.body!==void 0){let e=l,t=await d(`Creating`,async()=>p.send(m,{body:e,account_id:h}));u(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`Specifies the name of the K2 stream.`));let g=r({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:s(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}),_=await d(`Creating`,async()=>p.send(m,{body:g,account_id:h}));u(_,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`};function v(e){return e.usage(`$0 k2 streams delete <stream-id>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{r as n,t as r}from"./body-parser-HN91kAf0.mjs";import{a as i,t as a}from"./context-DlFhI9cN.mjs";import{t as o}from"./dry-run-mrA7FFLR.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./run-DAg7dfIW.mjs";import{t as u}from"./output-PRKYaJuo.mjs";import{t as d}from"./progress-AML-AVs4.mjs";import{a as f,n as p}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/k2/streams`,body:`json`};function h(e){return e.usage("$0 k2 streams create\n\nCreate a new K2 stream. HTTP is disabled when `http` is omitted. Enabled HTTP requires authentication and allows all origins unless `authentication` or `cors` say otherwise. At least one input must be enabled.").option(`http-authentication`,{type:`boolean`,description:`Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false, the endpoint accepts unauthenticated records. Defaults to true when HTTP is enabled without a stored value.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:"Allows browser requests from these HTTP or HTTPS origins. Use a wildcard only as the sole origin. An empty list blocks cross-origin browser requests. Defaults to `['*']` when HTTP is enabled without stored origins."}).option(`http-enabled`,{type:`boolean`,description:`Indicates whether the HTTP endpoint accepts records.`}).option(`name`,{type:`string`,description:`Specifies the name of the K2 stream.`}).option(`retention-seconds`,{type:`number`,description:`Sets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive.`,default:604800}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates whether Workers bindings can produce records to the stream.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0})}const g={command:`create`,describe:`Create K2 stream`,builder:h,handler:async e=>l({command:`k2 streams create`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf k2 streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams`,pathParams:{},bodyKind:`json`,body:e.body===void 0?r({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:s(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}):n(e.body)});return}let l=e.body===void 0?void 0:n(e.body),p=await t(e),h=e.local?c:await a();if(e.accountId=h,e.body!==void 0){let e=l,t=await d(`Creating`,async()=>p.send(m,{body:e,account_id:h}));u(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`Specifies the name of the K2 stream.`));let g=r({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:s(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}),_=await d(`Creating`,async()=>p.send(m,{body:g,account_id:h}));u(_,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`};function v(e){return e.usage(`$0 k2 streams delete <stream-id>
3
3
 
4
4
  Delete a K2 stream in an account. Deleting a stream that does not exist also succeeds.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,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 y={command:`delete <stream-id>`,describe:`Delete K2 stream`,builder:v,handler:async e=>l({command:`k2 streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf k2 streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?c:await a();if(e.accountId=r,!await p({force:!!e.force}))return;let s=await d(`Deleting`,async()=>n.send(_,{account_id:r,stream_id:e[`stream-id`]}));u(s,{successLabel:`Deleted`})})};var b={method:`GET`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`};function x(e){return e.usage(`$0 k2 streams get <stream-id>
5
5