cf 1.0.0-beta.30 → 1.0.0-beta.32

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 (232) hide show
  1. package/README.md +1 -1
  2. package/dist/_meta/commands.json +2404 -1420
  3. package/dist/_meta/schemas.json +1875 -956
  4. package/dist/{abuse-reports-Dzop8iDe.mjs → abuse-reports-DYm1nDLb.mjs} +1 -1
  5. package/dist/{access-2NeD3Gu8.mjs → access-Be_7nPz4.mjs} +1 -1
  6. package/dist/{accounts-CeJbhhX4.mjs → accounts-DXULGfnh.mjs} +3 -3
  7. package/dist/{acm-Dub0B14J.mjs → acm-Btsz5gzV.mjs} +1 -1
  8. package/dist/{addressing-BzWJU8m6.mjs → addressing-DBQ5dUBd.mjs} +1 -1
  9. package/dist/{agent-memory-2l9zyQFA.mjs → agent-memory-Df0q-68_.mjs} +1 -1
  10. package/dist/{ai-laLv3daG.mjs → ai-CJfI9JI2.mjs} +1 -1
  11. package/dist/{ai-audit-rgNePq5W.mjs → ai-audit-Dv37OLES.mjs} +1 -1
  12. package/dist/{ai-gateway-e9b8CcL6.mjs → ai-gateway-BRSUY1QZ.mjs} +5 -5
  13. package/dist/{ai-search-DZ0AqoPe.mjs → ai-search-Bxv4hDG9.mjs} +3 -3
  14. package/dist/{ai-security-CQuBTtmw.mjs → ai-security-ByNRXyJv.mjs} +1 -1
  15. package/dist/{alerting-_4ra-f_v.mjs → alerting-UkiCzqAq.mjs} +2 -4
  16. package/dist/{analytics-DLNn4bJ4.mjs → analytics-B4Wq2vJx.mjs} +1 -1
  17. package/dist/{analytics-engine-CY45yWuL.mjs → analytics-engine-BbwIXL0f.mjs} +1 -1
  18. package/dist/{api-security-BSvJAjJV.mjs → api-security-B6YETCDG.mjs} +1 -1
  19. package/dist/{argo-xzl0p--1.mjs → argo-CHSOLyFh.mjs} +1 -1
  20. package/dist/{artifacts-DAS14gcM.mjs → artifacts-1xMBpJLr.mjs} +1 -1
  21. package/dist/{audit-logs-3nYyCGQA.mjs → audit-logs-Cz__6-PH.mjs} +1 -1
  22. package/dist/auth-Byb5Y3o4.mjs +2 -0
  23. package/dist/{auth-cj71dGxS.mjs → auth-CRq9OQKr.mjs} +1 -1
  24. package/dist/{auth-B0mFB6nU.mjs → auth-CrBQca61.mjs} +1 -1
  25. package/dist/{auth-token-D9MnaZ-L.mjs → auth-token-BEkR6ulS.mjs} +1 -1
  26. package/dist/{autoconfig-DoLQ5ct8.mjs → autoconfig-BDEt9orA.mjs} +386 -120
  27. package/dist/{basin-catalog-BbCsAKyZ.mjs → basin-catalog-DRVVY1Ff.mjs} +1 -1
  28. package/dist/{billing-BsiLsjWJ.mjs → billing-CInp7pBa.mjs} +1 -1
  29. package/dist/{blocks-DK5qAzLe.mjs → blocks-DGXsHh9X.mjs} +1 -1
  30. package/dist/{bot-management-DkErOsIO.mjs → bot-management--NcaqMij.mjs} +1 -1
  31. package/dist/{botnet-feed-CK4_PKrf.mjs → botnet-feed-DbPZ3Wzl.mjs} +1 -1
  32. package/dist/{brand-protection-Czt-2Ei5.mjs → brand-protection-B3s-8soV.mjs} +2 -2
  33. package/dist/{browser-run-DLMdEaSJ.mjs → browser-run-B9hyiK7P.mjs} +1 -1
  34. package/dist/build-Bd56lS7c.mjs +2 -0
  35. package/dist/{build-DiEXOgHH.mjs → build-I3m3uZn6.mjs} +1 -1
  36. package/dist/{builds-D--zUbR2.mjs → builds-D0mRyKe3.mjs} +1 -1
  37. package/dist/{cache-C8PQmkjD.mjs → cache-eKHZG4U7.mjs} +1 -1
  38. package/dist/{cf-QIG83e0V.mjs → cf-MAiSK--E.mjs} +1 -1
  39. package/dist/{chunk-DSGVRFIS-CeCM3XGQ.mjs → chunk-DSGVRFIS-L76IWWlr.mjs} +1 -1
  40. package/dist/{chunk-Q5KVZMHK-Bjvrcihk.mjs → chunk-Q5KVZMHK-CYhKv3kZ.mjs} +1 -1
  41. package/dist/{cli-BBv5YMan.mjs → cli-hFt2ZEED.mjs} +1 -1
  42. package/dist/{client-side-security-CFxePUL9.mjs → client-side-security-BvIdcAtV.mjs} +1 -1
  43. package/dist/{cloud-connector-BitfLQ3s.mjs → cloud-connector-B-04mm0j.mjs} +1 -1
  44. package/dist/{cloudflared-DKh4JK7j.mjs → cloudflared-DynBXmdP.mjs} +1 -1
  45. package/dist/{cloudforce-one-D2dzA7VD.mjs → cloudforce-one-BAGybQNM.mjs} +139 -143
  46. package/dist/command-5bkZXAlq.mjs +2 -0
  47. package/dist/{command-BORazCDG.mjs → command-BCECG198.mjs} +1 -1
  48. package/dist/{command-BC_nezLE.mjs → command-BaFQsuac.mjs} +1 -1
  49. package/dist/{command-C2HYwGn_.mjs → command-BdnTjDyg.mjs} +1 -1
  50. package/dist/{command-n7QausoH.mjs → command-BkCc_9UI.mjs} +1 -1
  51. package/dist/{command-B6ustzcW.mjs → command-CQU92hcH.mjs} +1 -1
  52. package/dist/{command-D5FrTb2N.mjs → command-CdB1DQZl.mjs} +1 -1
  53. package/dist/{command-DoXuskBZ.mjs → command-CoR-c8lP.mjs} +1 -1
  54. package/dist/{command-iwrZ2Sb1.mjs → command-D-a4KxcW.mjs} +1 -1
  55. package/dist/{command-aeKPI1bt.mjs → command-D6wod_eb.mjs} +1 -1
  56. package/dist/{command-Xqidhyr_.mjs → command-DSPEpZHp.mjs} +1 -1
  57. package/dist/{command-BwcAuPBr.mjs → command-EG23K_k6.mjs} +1 -1
  58. package/dist/{command-s15KaL-x.mjs → command-Ux0DLWdC.mjs} +1 -1
  59. package/dist/{command-CQhD3Q1t.mjs → command-oko8tT2c.mjs} +1 -1
  60. package/dist/{completions-BAUSggys.mjs → completions-CdlqoV7q.mjs} +1 -1
  61. package/dist/{connector-interrupts-D9tI84Fk.mjs → connector-interrupts-D9iiu7ZU.mjs} +1 -1
  62. package/dist/{connector-telemetry-events-Bs9wLYwc.mjs → connector-telemetry-events-C8ouyC4A.mjs} +1 -1
  63. package/dist/{connector-telemetry-snapshots-CbwE4lrE.mjs → connector-telemetry-snapshots-Ck9btYy7.mjs} +1 -1
  64. package/dist/{connectors-LyJN1htu.mjs → connectors-kGPYvin5.mjs} +1 -1
  65. package/dist/{containers-CKs7ZyZq.mjs → containers-DIf9nmcC.mjs} +2 -2
  66. package/dist/{content-scan-BQRz7C7Z.mjs → content-scan-Cr0i9wJK.mjs} +1 -1
  67. package/dist/{context-DlFhI9cN.mjs → context-DsVjrTbe.mjs} +1 -1
  68. package/dist/{cps-DYlXx89C.mjs → cps-BHmMKg5Q.mjs} +1 -1
  69. package/dist/{csam-scanner-BFANxGD-.mjs → csam-scanner-DGTOi2EL.mjs} +1 -1
  70. package/dist/{custom-csrs-BX4aCeof.mjs → custom-csrs-DpLkO9_M.mjs} +1 -1
  71. package/dist/{custom-hostnames-BRYABKN3.mjs → custom-hostnames-beJnRWcQ.mjs} +1 -1
  72. package/dist/{custom-nameservers-CP1Vf1TD.mjs → custom-nameservers-B1WtaEDH.mjs} +1 -1
  73. package/dist/{custom-pages-BNL69ToU.mjs → custom-pages-BVXmc-u6.mjs} +1 -1
  74. package/dist/{d1-D4AZsUKn.mjs → d1-DYQBKGMz.mjs} +1 -1
  75. package/dist/{delegate-BKlomUk6.mjs → delegate-4bIHEQ8-.mjs} +1 -1
  76. package/dist/delegate.mjs +1 -1
  77. package/dist/{deploy-LbXgSfAd.mjs → deploy-DEq6UKzb.mjs} +1 -1
  78. package/dist/{deploy-context-BYw6gbl-.mjs → deploy-context-DJNsb7w-.mjs} +1 -1
  79. package/dist/deploy-input-Bkll8tDW.mjs +2 -0
  80. package/dist/{dev-DaFSd8WC.mjs → dev-DIguZvJE.mjs} +1 -1
  81. package/dist/{diagnostics-Dk3pyWx_.mjs → diagnostics-DyCPKwXL.mjs} +1 -1
  82. package/dist/{discover-DGsMj9ZN.mjs → discover-DtcZCeSh.mjs} +1 -1
  83. package/dist/discover-Dxb5yh9L.mjs +2 -0
  84. package/dist/{disk-cache-nbuwH1Dh.mjs → disk-cache-BVfJigfC.mjs} +1 -1
  85. package/dist/{dist-DwxlJ9Ms.mjs → dist-BoDdDWjK.mjs} +33 -33
  86. package/dist/{dls-DU6EdhQK.mjs → dls-BXGJug7c.mjs} +1 -1
  87. package/dist/{dns-3QDtCu6f.mjs → dns-Ev7l7p2X.mjs} +25 -25
  88. package/dist/{dns-firewall-Bbrr_0_a.mjs → dns-firewall-CrkTqlYI.mjs} +1 -1
  89. package/dist/{docs-lLLKcLr_.mjs → docs-Dx9n33S3.mjs} +1 -1
  90. package/dist/{durable-objects-DPf1DMeq.mjs → durable-objects-ChKP2Y6u.mjs} +1 -1
  91. package/dist/{email-auth-DOlEoi8q.mjs → email-auth-B-n1rKim.mjs} +1 -1
  92. package/dist/{email-routing-D56SPGty.mjs → email-routing-Dfs1g7hk.mjs} +1 -1
  93. package/dist/{email-security-CSawx0kD.mjs → email-security-B9wpMLHr.mjs} +1 -1
  94. package/dist/{email-sending-CgFi0cLA.mjs → email-sending-DUyDi24R.mjs} +3 -3
  95. package/dist/{errors-CilNjDVk.mjs → errors-CUuKkONZ.mjs} +1 -1
  96. package/dist/{field-extractors-FvIgySB4.mjs → field-extractors-B_R4gU51.mjs} +1 -1
  97. package/dist/{firewall-BrTvywhW.mjs → firewall-B5_DMZ5c.mjs} +1 -1
  98. package/dist/{flagship-BGFN1Epo.mjs → flagship-D_jWMrT9.mjs} +1 -1
  99. package/dist/{fraud-DzK6OIO3.mjs → fraud-BPywqzR5.mjs} +1 -1
  100. package/dist/{google-tag-gateway-Cd9v8A7Z.mjs → google-tag-gateway-B8SGqWxf.mjs} +1 -1
  101. package/dist/{healthchecks-Cm7EHaBA.mjs → healthchecks-C1NL0A-K.mjs} +1 -1
  102. package/dist/{hyperdrive-CVaSt0qX.mjs → hyperdrive-C1C_n591.mjs} +1 -1
  103. package/dist/{iam-CWN62Mi4.mjs → iam-BWm6OeLJ.mjs} +1 -1
  104. package/dist/{images-Bo_pdvQC.mjs → images-CU9B4ml9.mjs} +1 -1
  105. package/dist/index.mjs +1 -1
  106. package/dist/{init-Dwmpc_S-.mjs → init-DJGas0DL.mjs} +1 -1
  107. package/dist/{intel-CQFYeGEA.mjs → intel-COtK2F9g.mjs} +1 -1
  108. package/dist/{interactive-DCbIwYxy.mjs → interactive-CQ29h7qo.mjs} +1 -1
  109. package/dist/{ips-jTSzoqMU.mjs → ips-Dv5eyxgM.mjs} +1 -1
  110. package/dist/{k2-utE2lCYd.mjs → k2-CdhxgeiI.mjs} +1 -1
  111. package/dist/{kv-Cdh5hHte.mjs → kv-gNSTaGhd.mjs} +1 -1
  112. package/dist/{lazy-command-QoHlmXHW.mjs → lazy-command-CJcN1Ze6.mjs} +1 -1
  113. package/dist/{leaked-credential-checks-CqApscD3.mjs → leaked-credential-checks-B222QFHE.mjs} +1 -1
  114. package/dist/{load-balancers-w_4Uz9Gi.mjs → load-balancers-CM-4BY5q.mjs} +1 -1
  115. package/dist/{login-CS3KxVbk.mjs → login-Csb8Ld0x.mjs} +1 -1
  116. package/dist/login-bHCEjxRS.mjs +2 -0
  117. package/dist/{logpush-C76I5dgN.mjs → logpush-CmothcrK.mjs} +1 -1
  118. package/dist/{logs-B5aCYVCv.mjs → logs-CnKqBsDl.mjs} +1 -1
  119. package/dist/{magic-network-monitoring-CGf7cVQ9.mjs → magic-network-monitoring-BEdRTgMa.mjs} +1 -1
  120. package/dist/{magic-transit-CN5noqOR.mjs → magic-transit-CXjc5Yo4.mjs} +1 -1
  121. package/dist/{managed-defense-DAGr0UGm.mjs → managed-defense-BuOxTHAO.mjs} +1 -1
  122. package/dist/{managed-transforms-_SuwzZ-5.mjs → managed-transforms-BlqW4xkh.mjs} +1 -1
  123. package/dist/{mcp-CzedsjOf.mjs → mcp-ubFVHsP4.mjs} +1 -1
  124. package/dist/{mesh-DXX1S3pX.mjs → mesh-DQS7KfDF.mjs} +1 -1
  125. package/dist/{migrate-CvRQ4x3_.mjs → migrate-fY24KHV_.mjs} +1 -1
  126. package/dist/{monetization-8nt9PYln.mjs → monetization-CagZDoKh.mjs} +1 -1
  127. package/dist/{network-CaiRDY2e.mjs → network-BB35dF4N.mjs} +1 -1
  128. package/dist/{network-interconnects-Ad6JbAVd.mjs → network-interconnects-Dy4m1jMu.mjs} +2 -2
  129. package/dist/{o11y-DD2Hfnzi.mjs → o11y-Dmll3yib.mjs} +4 -4
  130. package/dist/{oauth-CQRlNgt5.mjs → oauth-Dv7Wucj6.mjs} +1 -1
  131. package/dist/{oauth-BUcV_xbm.mjs → oauth-NljTb7u9.mjs} +1 -1
  132. package/dist/observability-rtMYSCht.mjs +4 -0
  133. package/dist/{ohttp-gateway-Sej9-GCm.mjs → ohttp-gateway-BM3nsC92.mjs} +1 -1
  134. package/dist/{organizations-DwYsCbYD.mjs → organizations-Xus5102w.mjs} +1 -1
  135. package/dist/package-BJWSNfbc.mjs +2 -0
  136. package/dist/{page-rules-CjufEmIt.mjs → page-rules-BKoA5eaf.mjs} +1 -1
  137. package/dist/{pages-Dj0Cdf3G.mjs → pages-CLhvyehs.mjs} +4 -4
  138. package/dist/{pay-per-crawl-DPVlluRA.mjs → pay-per-crawl-BLjKJl62.mjs} +1 -1
  139. package/dist/{pay-per-use-DhuLjaoo.mjs → pay-per-use-FbddmVNv.mjs} +1 -1
  140. package/dist/{pipelines-D2pM69oq.mjs → pipelines-BsJkvK-K.mjs} +1 -1
  141. package/dist/{precursor-DzuA1m8D.mjs → precursor-oLj-WPJH.mjs} +1 -1
  142. package/dist/{previews-CHHd5Rx7.mjs → previews-BRPPf7UU.mjs} +3 -3
  143. package/dist/{progress-AML-AVs4.mjs → progress-DItBn6ZV.mjs} +1 -1
  144. package/dist/{prompt-Bnon9lfK.mjs → prompt-BGz3DNLz.mjs} +1 -1
  145. package/dist/{queues-GDwznw0o.mjs → queues-DAnbmO-t.mjs} +3 -3
  146. package/dist/{r2-B3Xkb0S4.mjs → r2-DNN91rtN.mjs} +2 -2
  147. package/dist/{radar-fBT7VIO2.mjs → radar-YWsfV39d.mjs} +150 -150
  148. package/dist/{raw-fetch-0T1SwPa1.mjs → raw-fetch-CmI3Ol3q.mjs} +1 -1
  149. package/dist/{realtime-B7mR3XtY.mjs → realtime-CfsgoOsd.mjs} +1 -1
  150. package/dist/{registrar-DOoxlZc7.mjs → registrar-N1c89kFV.mjs} +1 -1
  151. package/dist/{registrar-sandbox-DC7xAqqc.mjs → registrar-sandbox-D5lsoy-x.mjs} +1 -1
  152. package/dist/{reporting-DlD7J6Pq.mjs → reporting-CI5TLvj4.mjs} +1 -1
  153. package/dist/{request-headers-BEYXy4JN.mjs → request-headers-CUwBDAwI.mjs} +1 -1
  154. package/dist/{request-tracers-DYCGkszp.mjs → request-tracers-DO63p3ou.mjs} +1 -1
  155. package/dist/{resource-sharing-D_bUv7E8.mjs → resource-sharing-CxdcY5n1.mjs} +1 -1
  156. package/dist/{rules-C4cu3_jr.mjs → rules-DuuULmp2.mjs} +1 -1
  157. package/dist/{rulesets-Bl4mLnXA.mjs → rulesets-3_8IWMfL.mjs} +1 -1
  158. package/dist/{rum-DE_uJb09.mjs → rum-DkfsMJa7.mjs} +1 -1
  159. package/dist/run-C9SxROBF.mjs +2 -0
  160. package/dist/{run-DAg7dfIW.mjs → run-DAK_kbUa.mjs} +1 -1
  161. package/dist/{schema-cache-CTVUtkAl.mjs → schema-cache-BcbUfb3D.mjs} +1 -1
  162. package/dist/{scim-Dz4r0fnH.mjs → scim-DCR6AQp5.mjs} +1 -1
  163. package/dist/{secrets-store-C2GwCUKs.mjs → secrets-store-C3v0_Us9.mjs} +1 -1
  164. package/dist/{security-insights-DZCm5D3U.mjs → security-insights-0el4fk-S.mjs} +4 -2
  165. package/dist/security-txt-CcsEaOm5.mjs +8 -0
  166. package/dist/{session-BEsQIuwP.mjs → session-CgJ6kB79.mjs} +1 -1
  167. package/dist/shared-DjaJ-SCM.mjs +2 -0
  168. package/dist/{smart-shield-C2uSFcGN.mjs → smart-shield-BxTEZqtZ.mjs} +1 -1
  169. package/dist/{snippets-BoaGEAC6.mjs → snippets-CH4PcqCg.mjs} +1 -1
  170. package/dist/{spawn-B4y5Urjv.mjs → spawn-B681PPG2.mjs} +2 -2
  171. package/dist/{spectrum-Bb0KXA8R.mjs → spectrum-DconVKYG.mjs} +1 -1
  172. package/dist/{speed-zKYgLTHA.mjs → speed-Euqtk0Vc.mjs} +1 -1
  173. package/dist/{sql-pjWozuvl.mjs → sql-UNZoawTj.mjs} +1 -1
  174. package/dist/{src-B8i6_XGg.mjs → src-CSSFtpQM.mjs} +5 -5
  175. package/dist/{ssl-C5bg1X0i.mjs → ssl-CGWF2ZSz.mjs} +9 -9
  176. package/dist/startup-profile-ajl_yZx2.mjs +2 -0
  177. package/dist/{startup-profile-CyIelqtC.mjs → startup-profile-ne34QxOx.mjs} +1 -1
  178. package/dist/{state-BI_wSuID.mjs → state-BFClIYM_.mjs} +1 -1
  179. package/dist/state-V1KLVkd6.mjs +2 -0
  180. package/dist/{static-assets-CTv7XwIQ.mjs → static-assets-CWo7dxyW.mjs} +164 -164
  181. package/dist/{stream-C_FiNrLV.mjs → stream-B3tkAx82.mjs} +1 -1
  182. package/dist/{tags-CXlivF3y.mjs → tags-CKnt6RT6.mjs} +9 -9
  183. package/dist/telemetry-B3S5OfOn.mjs +2 -0
  184. package/dist/{telemetry-CtQWhsmy.mjs → telemetry-COJrOM3V.mjs} +1 -1
  185. package/dist/{tenant-custom-nameservers-DBg9Hzvn.mjs → tenant-custom-nameservers-BdVLeMsA.mjs} +1 -1
  186. package/dist/{tenants-89Q0u5_Q.mjs → tenants-C8Emd5Ou.mjs} +1 -1
  187. package/dist/{tunnels-CL2fIINH.mjs → tunnels-vUfvvRWt.mjs} +15 -13
  188. package/dist/{turnstile-D6GtQULo.mjs → turnstile-D-6e0ShA.mjs} +1 -1
  189. package/dist/ui-YBIkZLZt.mjs +2 -0
  190. package/dist/{update-check-0kpbTLvy.mjs → update-check-BW_N6gX4.mjs} +1 -1
  191. package/dist/{update-check-D3axIoUi.mjs → update-check-CvzNuZHG.mjs} +1 -1
  192. package/dist/update-check-worker.mjs +1 -1
  193. package/dist/{url-normalization--iS57OT_.mjs → url-normalization-Bfj-1zgi.mjs} +1 -1
  194. package/dist/{url-scanner-C6AtXGc2.mjs → url-scanner-CcZzqvrj.mjs} +1 -1
  195. package/dist/{user-C5vRYIta.mjs → user-CYHyVzic.mjs} +1 -1
  196. package/dist/{vectorize-C1Kxb1Ou.mjs → vectorize-69UvmqNI.mjs} +1 -1
  197. package/dist/version-5uL0ecbB.mjs +2 -0
  198. package/dist/{waiting-rooms-BCVZY9vI.mjs → waiting-rooms-Dj92gXpa.mjs} +1 -1
  199. package/dist/{web-assets-D2gXqKZS.mjs → web-assets-vbQ0MSCd.mjs} +1 -1
  200. package/dist/{web3-CJDZQCOk.mjs → web3-0Sz4gIto.mjs} +1 -1
  201. package/dist/{whoami-BEad9QUB.mjs → whoami-C4xRnPxf.mjs} +3 -3
  202. package/dist/whoami-wYc70ks4.mjs +2 -0
  203. package/dist/{workers-DzXSJMv9.mjs → workers-BQM8pUYu.mjs} +18 -18
  204. package/dist/{workers-for-platforms-CvazgrqD.mjs → workers-for-platforms-BfXIqCm4.mjs} +1 -1
  205. package/dist/{workers-vpc-DP4QC6UC.mjs → workers-vpc-CR3tfj4I.mjs} +1 -1
  206. package/dist/{workflows-BSOj56io.mjs → workflows-DpQgBIHz.mjs} +1 -1
  207. package/dist/{wrangler-migration-DZ9Oelof.mjs → wrangler-migration-ChTsuUHx.mjs} +57 -57
  208. package/dist/{zaraz-BnQvKXFy.mjs → zaraz-BPOBM0-W.mjs} +1 -1
  209. package/dist/{zero-trust-DsslXRub.mjs → zero-trust-Cridhy7G.mjs} +21 -17
  210. package/dist/{zones-DQ3SjGsZ.mjs → zones-BIKClc2S.mjs} +3 -3
  211. package/package.json +13 -13
  212. package/dist/auth-CXR2vsII.mjs +0 -2
  213. package/dist/build-ByjJ6yIB.mjs +0 -2
  214. package/dist/command-ycXauMSv.mjs +0 -2
  215. package/dist/deploy-input-BFWpjDVr.mjs +0 -2
  216. package/dist/discover-D9FNaCDK.mjs +0 -2
  217. package/dist/internal-CYrPZ9IX.mjs +0 -4
  218. package/dist/live-hZgMkXJf.mjs +0 -4
  219. package/dist/login-BBSJytOt.mjs +0 -2
  220. package/dist/observability-BzKBUUSf.mjs +0 -4
  221. package/dist/package-DXaRIx2f.mjs +0 -2
  222. package/dist/ready-BkXNDNTd.mjs +0 -4
  223. package/dist/run-Cg9utScS.mjs +0 -2
  224. package/dist/security-txt-Dbi9KxNc.mjs +0 -8
  225. package/dist/shared-DqW2vICA.mjs +0 -2
  226. package/dist/signed-url-BhHSAUam.mjs +0 -4
  227. package/dist/startup-profile-Dif7XOsU.mjs +0 -2
  228. package/dist/state-xUh3Z77T.mjs +0 -2
  229. package/dist/telemetry-DDs3zhdw.mjs +0 -2
  230. package/dist/ui-CY75N4Tm.mjs +0 -2
  231. package/dist/version-pcpa_kv3.mjs +0 -2
  232. package/dist/whoami-2eFTt0-Y.mjs +0 -2
@@ -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-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
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-CRq9OQKr.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{a as i,i as a,t as o}from"./context-DsVjrTbe.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-DAK_kbUa.mjs";import{t as f}from"./progress-DItBn6ZV.mjs";import"./telemetry-B3S5OfOn.mjs";import{a as p,i as m,n as h}from"./prompt-BGz3DNLz.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-CmI3Ol3q.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-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};
2
+ import{n as e,r as t,t as n}from"./src-CSSFtpQM.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-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.
2
+ import"./telemetry-B3S5OfOn.mjs";import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{n,z as r}from"./dist-BoDdDWjK.mjs";import"./src-CSSFtpQM.mjs";import{i,n as a,t as o}from"./autoconfig-BDEt9orA.mjs";import{i as s}from"./delegate-4bIHEQ8-.mjs";import{n as c,r as l}from"./dialog-CD94-Kzw.mjs";import{t as ee}from"./progress-DItBn6ZV.mjs";import{t as u}from"./project-settings-D_S-UC8I.mjs";import"./ui-YBIkZLZt.mjs";import{t as d}from"./log-Brx-wjJW.mjs";import{n as f}from"./run-DAK_kbUa.mjs";import{n as p}from"./version-5uL0ecbB.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-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>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-CRq9OQKr.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{a as i,i as a,t as o}from"./context-DsVjrTbe.mjs";import{t as s}from"./local-B3zt9PXR.mjs";import{t as c}from"./output-PRKYaJuo.mjs";import{t as l}from"./progress-DItBn6ZV.mjs";import{t as u}from"./run-DAK_kbUa.mjs";import"./telemetry-B3S5OfOn.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-CmI3Ol3q.mjs";import{a as _,n as v}from"./prompt-BGz3DNLz.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-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(`
2
+ import{n as e,r as t,t as n}from"./rolldown-runtime-BNtqjh-B.mjs";import{H as r}from"./dist-BoDdDWjK.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-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
2
+ import{n as e}from"./auth-CRq9OQKr.mjs";import{t}from"./dry-run-mrA7FFLR.mjs";import{t as n}from"./output-PRKYaJuo.mjs";import{t as r}from"./progress-DItBn6ZV.mjs";import{t as i}from"./run-DAK_kbUa.mjs";import"./telemetry-B3S5OfOn.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-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>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{r as n,t as r}from"./body-parser-HN91kAf0.mjs";import{a as i,t as a}from"./context-DsVjrTbe.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-DAK_kbUa.mjs";import{t as u}from"./output-PRKYaJuo.mjs";import{t as d}from"./progress-DItBn6ZV.mjs";import{a as f,n as p}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.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
 
@@ -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-cj71dGxS.mjs";import{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,n as p}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{n as g,t as _}from"./raw-fetch-0T1SwPa1.mjs";var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/bulk/delete`,body:`json`};function y(e){return e.usage(`$0 kv bulk delete <namespace-id>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-CRq9OQKr.mjs";import{r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,t as o}from"./context-DsVjrTbe.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-DAK_kbUa.mjs";import{t as d}from"./progress-DItBn6ZV.mjs";import{a as f,n as p}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{n as g,t as _}from"./raw-fetch-CmI3Ol3q.mjs";var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/bulk/delete`,body:`json`};function y(e){return e.usage(`$0 kv bulk delete <namespace-id>
3
3
 
4
4
  Deletes up to 10,000 key-value pairs from the specified Workers KV namespace. Send a JSON array of the key names to delete. The result reports the number of successful deletions and any keys that failed and should be retried.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ee={command:`delete <namespace-id>`,describe:`Delete multiple key-value pairs`,builder:y,handler:async e=>u({command:`kv bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf kv bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk/delete`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:r(e.body,[],1e4)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let t=e.body===void 0?void 0:r(e.body,[],1e4),i=await n(e),u=e.local?c:await o();if(e.accountId=u,await p({force:!!e.force,message:`This operation deletes the specified keys and their values from the Workers KV namespace.`})&&e.body!==void 0){let n=t,r=await d(`Processing`,async()=>i.send(v,{body:n,account_id:u,namespace_id:e[`namespace-id`]}));l(r,{successLabel:`Done`})}})};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/bulk/get`,body:`json`};function x(e){return e.usage("$0 kv bulk get <namespace-id>\n\nRetrieves the text-based values of up to 100 keys from the specified Workers KV namespace. The result maps each requested key to its value. Set `type` to `json` to parse JSON values instead of returning strings, and set `withMetadata` to `true` to include metadata with each value. Binary values are not supported by this operation.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`keys`,{type:`string`,array:!0,description:`Array of keys to retrieve (maximum of 100).`}).option(`type`,{type:`string`,description:"Return values as strings with `text`, or parse stored JSON values with `json`.",choices:[`text`,`json`],default:`text`}).coerce(`type`,e=>m(e,`type`,`text`)).option(`with-metadata`,{type:`boolean`,description:`Whether to include metadata in the response.`,default:!1}).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 S={command:`get <namespace-id>`,describe:`Get multiple key-value pairs`,builder:x,handler:async e=>u({command:`kv bulk get`,classification:{safeFlags:[`type`,`with-metadata`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf kv bulk get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk/get`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?i({keys:e.keys,type:e.type,withMetadata:e[`with-metadata`]}):r(e.body)});return}let t=e.body===void 0?void 0:r(e.body),u=await n(e),f=e.local?c:await o();if(e.accountId=f,e.body!==void 0){let n=t,r=await d(`Creating`,async()=>u.send(b,{body:n,account_id:f,namespace_id:e[`namespace-id`]}));l(r,{successLabel:`Created`});return}if(e.keys===void 0)throw Error(`--keys is required (or pass --body with this field set).`);let p=i({keys:e.keys,type:e.type,withMetadata:e[`with-metadata`]}),m=await d(`Creating`,async()=>u.send(b,{body:p,account_id:f,namespace_id:e[`namespace-id`]}));l(m,{successLabel:`Created`})})};var C={method:`PUT`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/bulk`,body:`json`};function w(e){return e.usage("$0 kv bulk put <namespace-id>\n\nWrites up to 10,000 key-value pairs to the specified Workers KV namespace from a JSON array, with optional metadata and expiration settings for each pair. Existing values and expirations are overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will not expire. If both are set, `expiration_ttl` takes precedence. The entire request must be 100 megabytes or less. The result reports the number of successful writes and any keys that failed and should be retried.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const T={command:`put <namespace-id>`,describe:`Write multiple key-value pairs`,builder:w,handler:async e=>u({command:`kv bulk put`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf kv bulk put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:r(e.body,[],1e4)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let t=e.body===void 0?void 0:r(e.body,[],1e4),i=await n(e),u=e.local?c:await o();if(e.accountId=u,e.body!==void 0){let n=t,r=await d(`Updating`,async()=>i.send(C,{body:n,account_id:u,namespace_id:e[`namespace-id`]}));l(r,{successLabel:`Updated`})}})},E={command:`bulk`,describe:`Operations for bulk`,builder:e=>e.command(ee).command(S).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/values/${t.key_name}`};function O(e){return e.usage("$0 kv keys delete <key-name>\n\nDeletes the specified key and its value from the Workers KV namespace. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const k={command:`delete <key-name>`,describe:`Delete a key-value pair`,builder:O,handler:async e=>u({command:`kv keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf kv keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/values/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``),"key-name":String(e[`key-name`]??``)},bodyKind:`none`});return}let t=await n(e),r=e.local?c:await o();if(e.accountId=r,!await p({force:!!e.force,message:`This operation deletes the selected key-value pair from the Workers KV namespace.`}))return;let i=await d(`Deleting`,async()=>t.send(D,{account_id:r,namespace_id:e[`namespace-id`],key_name:e[`key-name`]}));l(i,{successLabel:`Deleted`})})};function A(e){return e.usage("$0 kv keys get <key-name>\n\nReturns the value stored under the specified key in the Workers KV namespace as raw bytes. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL. If the key-value pair expires, the `expiration` response header contains its expiration time in seconds since the UNIX epoch.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const j={command:`get <key-name>`,describe:`Get a key's value`,builder:A,handler:async e=>u({command:`kv keys get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf kv keys get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/values/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``),"key-name":String(e[`key-name`]??``)},bodyKind:`none`});return}await n(e);let t=e.local?c:await o();e.accountId=t;let r=await d(`Loading`,async()=>_(`/accounts/${t}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));g(e.text===!0?r.toString(`utf-8`):r)})};var M={method:`GET`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/keys`,query:[`limit`,`prefix`,`cursor`]};function N(e){return e.usage("$0 kv keys list\n\nLists key names in the specified Workers KV namespace, with expiration times and metadata when present. Use `prefix` to filter names and `cursor` to request the next page. Values are not included.").option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`limit`,{type:`number`,description:"Maximum number of keys to return in one response. Pass `result_info.cursor` from the response as `cursor` to request the next page."}).option(`prefix`,{type:`string`,description:`Filters returned keys by a name prefix. Exact matches and any key names that begin with the prefix will be returned.`}).option(`cursor`,{type:`string`,description:"Opaque pagination token from `result_info.cursor` in the previous response. Pass it unchanged to request the next page of keys."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`List keys in a namespace`,builder:N,handler:async e=>u({command:`kv keys list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={limit:e.limit,prefix:e.prefix,cursor:e.cursor};if(e.dryRun){let n=await a();s({command:`cf kv keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/keys`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},query:t,bodyKind:`none`});return}let r=await n(e),i=e.local?c:await o();e.accountId=i;let u=await d(`Loading`,async()=>r.send(M,{account_id:i,namespace_id:e[`namespace-id`],...t}));l(u,{successLabel:`Loaded`})})};function F(e){return e.usage("$0 kv keys put <key-name>\n\nWrites a value under the specified key in the Workers KV namespace, creating the key-value pair or replacing its existing value, expiration, and metadata. Send the value as an `application/octet-stream` request body, or use `multipart/form-data` with a `value` part and an optional JSON `metadata` part. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will not expire. If both are set, `expiration_ttl` takes precedence.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`expiration`,{type:`number`,description:`Expires the key at a certain time, measured in number of seconds since the UNIX epoch.`}).option(`expiration-ttl`,{type:`number`,description:"Number of seconds until the key expires. Must be at least 60. Takes precedence over `expiration` when both are specified."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A byte sequence to be stored, up to 25 MiB in length.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`metadata`,{type:`string`,description:`Associates arbitrary JSON data with a key/value pair.`})}const te={command:`put <key-name>`,describe:`Write a key-value pair with optional metadata`,builder:F,handler:async e=>u({command:`kv keys put`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let r={expiration:e.expiration,expiration_ttl:e[`expiration-ttl`]};if(e.dryRun){let t=await a();s({command:`cf kv keys put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/values/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``),"key-name":String(e[`key-name`]??``)},query:r,bodyKind:e.metadata===void 0?`octet-stream`:`multipart`,body:e.metadata===void 0?e.body:{body:e.body,file:e.file,metadata:e.metadata}});return}if(e.body===void 0&&e.file===void 0&&e.metadata===void 0)throw Error(`--body or --file is required for this command. Pass --body '<value>' or --file path/to/file.`);let i=e.metadata!==void 0||e.file!==void 0?void 0:m(e.body,`body`,`binary`),u=await n(e),f=e.local?c:await o();if(e.accountId=f,e.metadata!==void 0){let n=new FormData;if(e.file!==void 0){let t=h(e.file);n.append(`value`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&n.append(`value`,e.body);e.metadata!==void 0&&n.append(`metadata`,String(m(e.metadata,`metadata`,`text`)??``));let r=await d(`Updating`,async()=>t(u,`PUT`,`/accounts/${f}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}`,{body:n}));l(r,{successLabel:`Updated`})}else if(e.file!==void 0){let n=h(e.file),r=await d(`Updating`,async()=>t(u,`PUT`,`/accounts/${f}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}`,{body:n,headers:{"Content-Type":`application/octet-stream`}}));l(r,{successLabel:`Updated`})}else if(e.body!==void 0){let n=i,a=new URLSearchParams(Object.entries(r).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),o=await d(`Updating`,async()=>t(u,`PUT`,`/accounts/${f}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}${a?`?`+a:``}`,{body:n,headers:{"Content-Type":`application/octet-stream`}}));l(o,{successLabel:`Updated`})}})},I={command:`keys`,describe:`Operations for keys`,builder:e=>e.command(k).command(j).command(P).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var L={method:`GET`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/metadata/${t.key_name}`};function R(e){return e.usage("$0 kv metadata get <key-name>\n\nReturns the JSON metadata associated with the specified key in the Workers KV namespace, without retrieving its value. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get <key-name>`,describe:`Get a key's metadata`,builder:R,handler:async e=>u({command:`kv metadata get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf kv metadata get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/metadata/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``),"key-name":String(e[`key-name`]??``)},bodyKind:`none`});return}let t=await n(e),r=e.local?c:await o();e.accountId=r;let i=await d(`Loading`,async()=>t.send(L,{account_id:r,namespace_id:e[`namespace-id`],key_name:e[`key-name`]}));l(i,{successLabel:`Loaded`})})},B={command:`metadata`,describe:`Operations for metadata`,builder:e=>e.command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces`,body:`json`};function H(e){return e.usage(`$0 kv namespaces create
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- function e(e,t,n,r){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{let t=await n();if(r===null){await t.default.handler(e);return}let{runWithTelemetry:i}=await import(`./run-Cg9utScS.mjs`);await i(r,e,()=>t.default.handler(e))}}}export{e as t};
2
+ function e(e,t,n,r){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{let t=await n();if(r===null){await t.default.handler(e);return}let{runWithTelemetry:i}=await import(`./run-C9SxROBF.mjs`);await i(r,e,()=>t.default.handler(e))}}}export{e 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-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{n as o}from"./input-validation-D7z60HJH.mjs";import{t as s}from"./run-DAg7dfIW.mjs";import{t as c}from"./output-PRKYaJuo.mjs";import{t as l}from"./progress-AML-AVs4.mjs";import"./telemetry-DDs3zhdw.mjs";import{n as u}from"./prompt-Bnon9lfK.mjs";var d={method:`POST`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections`,body:`json`};function f(e){return e.usage(`$0 leaked-credential-checks detections create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{i as n}from"./context-DsVjrTbe.mjs";import{r,t as i}from"./body-parser-HN91kAf0.mjs";import{t as a}from"./dry-run-mrA7FFLR.mjs";import{n as o}from"./input-validation-D7z60HJH.mjs";import{t as s}from"./run-DAK_kbUa.mjs";import{t as c}from"./output-PRKYaJuo.mjs";import{t as l}from"./progress-DItBn6ZV.mjs";import"./telemetry-B3S5OfOn.mjs";import{n as u}from"./prompt-BGz3DNLz.mjs";var d={method:`POST`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections`,body:`json`};function f(e){return e.usage(`$0 leaked-credential-checks detections create
3
3
 
4
4
  Create a detection location for credentials that the default scan locations do not cover, using Rules language expressions such as \`lookup_json_string(http.request.body.raw, "user")\`. Only the username expression is required, and Leaked Credential Checks must be enabled on the zone.`).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const p={command:`create`,describe:`Create a custom detection location for a zone.`,builder:f,handler:async e=>s({command:`leaked-credential-checks detections create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf leaked-credential-checks detections create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?i({password:o(e.password,`password`,`text`),username:o(e.username,`username`,`text`)}):r(e.body)});return}let s=e.body===void 0?void 0:r(e.body),u=await t(e),f=await n({zone:e.zone},u,{quiet:e.quiet});if(e.zoneId=f,e.body!==void 0){let e=s,t=await l(`Creating`,async()=>u.send(d,{body:e,zone_id:f}));c(t,{successLabel:`Created`});return}let p=i({password:o(e.password,`password`,`text`),username:o(e.username,`username`,`text`)}),m=await l(`Creating`,async()=>u.send(d,{body:p,zone_id:f}));c(m,{successLabel:`Created`})})};var m={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections/${t.detection_id}`};function h(e){return e.usage(`$0 leaked-credential-checks detections delete <detection-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-cj71dGxS.mjs";import{i as n,o as r,r as i,t as a}from"./body-parser-HN91kAf0.mjs";import{a as o,i 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`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers`,body:`json`};function v(e){return e.usage(`$0 load-balancers account create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{i as n,o as r,r as i,t as a}from"./body-parser-HN91kAf0.mjs";import{a as o,i as s,t as c}from"./context-DsVjrTbe.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-DAK_kbUa.mjs";import{t as p}from"./output-PRKYaJuo.mjs";import{t as m}from"./progress-DItBn6ZV.mjs";import{a as h,n as g}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";var _={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers`,body:`json`};function v(e){return e.usage(`$0 load-balancers account create
3
3
 
4
4
  Create a new account or zone-scoped load balancer.
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BGHWSKCw.mjs";import{c as t,v as n}from"./chunk-Q5KVZMHK-Bjvrcihk.mjs";import{c as r,d as i,f as a,g as o,h as s,i as c,o as l,r as u,s as d,u as f}from"./oauth-BUcV_xbm.mjs";import"./ui-CY75N4Tm.mjs";import{t as p}from"./log-Brx-wjJW.mjs";import{n as m,t as h}from"./output-PRKYaJuo.mjs";import g from"node:path";function _(e,t,n){if(!e.profile)return;let r=n?` ${n}`:``;throw Error(`The --profile flag cannot be used with \`cf auth ${t}\`.${r}`)}function v(){if(t({allowGlobalAuthKey:!1})!==void 0)throw Error(`Cannot manage auth profiles while CLOUDFLARE_API_TOKEN is set. Unset CLOUDFLARE_API_TOKEN and try again.`)}const y={command:`create <name>`,describe:`Create or re-authenticate a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name for the auth profile`,demandOption:!0}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async e=>{_(e,`create`,"Pass the profile name as the command argument: `cf auth create <name>`."),v(),n(e.name);let t=l().configs.exists(e.name);await f({browser:e.browser,device:e.device,scopes:e.scopes,profile:e.name}),m(t?`Profile "${e.name}" re-authenticated.`:`Profile "${e.name}" created.`),p.info(`To use this profile in a directory, run:`,`cf auth activate ${e.name}`)}},b={command:`delete <name>`,describe:`Delete a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to delete`,demandOption:!0}),handler:async t=>{_(t,`delete`),v(),n(t.name);let r=l();if(!r.configs.exists(t.name))throw Error(`Profile "${t.name}" does not exist.`);let a=r.bindings.removeAllBindingsForProfile(t.name);a.length>0&&p.info([`Removed directory bindings:`,...a.map(e=>` ${e}`)].join(`
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import{c as t,v as n}from"./chunk-Q5KVZMHK-CYhKv3kZ.mjs";import{c as r,d as i,f as a,g as o,h as s,i as c,o as l,r as u,s as d,u as f}from"./oauth-NljTb7u9.mjs";import"./ui-YBIkZLZt.mjs";import{t as p}from"./log-Brx-wjJW.mjs";import{n as m,t as h}from"./output-PRKYaJuo.mjs";import g from"node:path";function _(e,t,n){if(!e.profile)return;let r=n?` ${n}`:``;throw Error(`The --profile flag cannot be used with \`cf auth ${t}\`.${r}`)}function v(){if(t({allowGlobalAuthKey:!1})!==void 0)throw Error(`Cannot manage auth profiles while CLOUDFLARE_API_TOKEN is set. Unset CLOUDFLARE_API_TOKEN and try again.`)}const y={command:`create <name>`,describe:`Create or re-authenticate a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name for the auth profile`,demandOption:!0}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async e=>{_(e,`create`,"Pass the profile name as the command argument: `cf auth create <name>`."),v(),n(e.name);let t=l().configs.exists(e.name);await f({browser:e.browser,device:e.device,scopes:e.scopes,profile:e.name}),m(t?`Profile "${e.name}" re-authenticated.`:`Profile "${e.name}" created.`),p.info(`To use this profile in a directory, run:`,`cf auth activate ${e.name}`)}},b={command:`delete <name>`,describe:`Delete a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to delete`,demandOption:!0}),handler:async t=>{_(t,`delete`),v(),n(t.name);let r=l();if(!r.configs.exists(t.name))throw Error(`Profile "${t.name}" does not exist.`);let a=r.bindings.removeAllBindingsForProfile(t.name);a.length>0&&p.info([`Removed directory bindings:`,...a.map(e=>` ${e}`)].join(`
3
3
  `)),await i(t.name),r.configs.delete(t.name),m(`Profile "${t.name}" deleted.`);let o=r.bindings.getProfileForDirectory(process.cwd());o?p.info(`Active profile for this directory: ${o}.`):r.configs.exists(`default`)?p.info(`This directory now uses the default profile.`):p.info(`No active profile for this directory. Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`)}},x={command:`activate <name> [dir]`,describe:`Bind a named auth profile to a directory`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to activate`,demandOption:!0}).positional(`dir`,{type:`string`,description:`Directory to bind the profile to (defaults to current directory)`}),handler:e=>{_(e,`activate`,"Pass the profile name as the command argument: `cf auth activate <name>`."),v(),n(e.name);let t=l();if(!t.configs.exists(e.name))throw Error(`Profile "${e.name}" does not exist. Run \`cf auth create ${e.name}\` first.`);let r=e.dir??process.cwd();t.bindings.activate(e.name,r),m(`Profile "${e.name}" activated for "${g.resolve(r)}".`)}},S={command:`deactivate [dir]`,describe:`Remove the auth profile binding from a directory`,builder:e=>e.positional(`dir`,{type:`string`,description:`Directory to unbind (defaults to current directory). Must be the exact directory the profile was bound to.`}),handler:t=>{_(t,`deactivate`),v();let n=l(),r=t.dir??process.cwd(),{removedProfile:i,newResolution:a}=n.bindings.deactivate(r);m(`Profile "${i}" deactivated from "${g.resolve(r)}".`),a.profile===void 0?p.info(`Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`):a.profile==="default"?p.info(`This directory now uses the default profile.`):p.info(`Now using: ${a.profile} (${a.source}).`)}},C={command:`list`,describe:`List all auth profiles`,handler:e=>{_(e,`list`);let t=l(),n=t.bindings.read(),r={};for(let[e,t]of Object.entries(n))(r[t]??=[]).push(e);h(t.configs.list().map(e=>({name:e,boundDirectories:r[e]??[]})))}},w={safeFlags:[`force`,`browser`,`device`,`use-keyring`,`useKeyring`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}},T={command:`login`,describe:`Authenticate with Cloudflare`,builder:e=>e.option(`force`,{type:`boolean`,alias:`f`,description:`Force re-authentication even if already logged in`,default:!1}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}).option(`use-keyring`,{type:`boolean`,description:`Encrypt OAuth credentials using the OS keychain (persisted across invocations; use --no-use-keyring to disable)`}),handler:async n=>{_(n,`login`,"Run `cf auth create <name>` to authenticate a named profile.");let i=u();if(i!=="default"&&p.warn(`This directory has profile "${i}" active. ${e.code(`cf auth login`)} updates the default profile, not "${i}". To re-authenticate "${i}", run:`,`cf auth create ${i}`),o(`default`),n.useKeyring!==void 0&&s(n.useKeyring),t({allowGlobalAuthKey:!1})!==void 0){p.warn(`${e.code(`CLOUDFLARE_API_TOKEN`)} is set and takes precedence. Unset it to log in via OAuth.`);return}if(!n.force&&r()){if(await d()){let t=a(),n=[`You are already logged in.`,`${e.info(`Config file:`)} ${e.muted(c())}`];t?.expiration_time&&n.push(`${e.info(`Token expires:`)} ${new Date(t.expiration_time).toLocaleString()}`),n.push(`Run ${e.code(`cf auth login --force`)} to re-authenticate, or ${e.code(`cf auth logout`)} to log out.`),p.info(n.join(`
4
4
  `));return}p.warn(`Existing tokens are invalid or expired. Starting fresh login...`)}else n.force&&r()&&p.info(`Re-authenticating...`);if(p.info(`Starting OAuth login flow...`),!await f({browser:n.browser,device:n.device,scopes:n.scopes,profile:`default`}))return;let l=a(),m=[`${e.info(`Config file:`)} ${e.muted(c())}`];l?.scopes&&m.push(l.scopes.length>5?`${e.info(`Scopes:`)} ${l.scopes.length} granted. Run ${e.code(`cf auth scopes`)} to view them by product or ${e.code(`cf auth scopes --all`)} for the full list.`:`${e.info(`Scopes:`)} ${l.scopes.join(`, `)}`),l?.expiration_time&&m.push(`${e.info(`Token expires:`)} ${new Date(l.expiration_time).toLocaleString()}`),p.info(m.join(`
5
5
  `))}};export{y as a,C as c,_ as i,w as n,S as o,x as r,b as s,T as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import"./telemetry-B3S5OfOn.mjs";import"./ui-YBIkZLZt.mjs";import{n as t}from"./run-DAK_kbUa.mjs";import{t as n}from"./log-Brx-wjJW.mjs";import{n as r,t as i}from"./login-Csb8Ld0x.mjs";const a={...i,describe:!1,handler:async t=>{t.quiet||n.info(`${e.code(`cf login`)} is an alias for ${e.code(`cf auth login`)}. Authentication commands are under ${e.code(`cf auth`)}.`),await i.handler(t)}};var o=t(a,{command:`login`,classification:r});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-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,r as d,t as f}from"./body-parser-HN91kAf0.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,n as h}from"./prompt-Bnon9lfK.mjs";var g={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/datasets/${t.dataset_id}/fields`};function _(e){return e.usage(`$0 logpush account-datasets fields get <dataset-id>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{t as n}from"./dry-run-mrA7FFLR.mjs";import{a as r,i,t as a}from"./context-DsVjrTbe.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-PRKYaJuo.mjs";import{t as c}from"./progress-DItBn6ZV.mjs";import{t as l}from"./run-DAK_kbUa.mjs";import"./telemetry-B3S5OfOn.mjs";import{i as u,r as d,t as f}from"./body-parser-HN91kAf0.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,n as h}from"./prompt-BGz3DNLz.mjs";var g={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/datasets/${t.dataset_id}/fields`};function _(e){return e.usage(`$0 logpush account-datasets fields get <dataset-id>
3
3
 
4
4
  Lists all fields available for a dataset. The response result is. an object with key-value pairs, where keys are field names, and values are descriptions.
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-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{o as d,r as f,t as p}from"./body-parser-HN91kAf0.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,n as _}from"./prompt-Bnon9lfK.mjs";var v={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/available`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function y(e){return e.usage(`$0 logs datasets available
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-CRq9OQKr.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{a as i,i as a,t as o}from"./context-DsVjrTbe.mjs";import{t as s}from"./local-B3zt9PXR.mjs";import{t as c}from"./output-PRKYaJuo.mjs";import{t as l}from"./progress-DItBn6ZV.mjs";import{t as u}from"./run-DAK_kbUa.mjs";import"./telemetry-B3S5OfOn.mjs";import{o as d,r as f,t as p}from"./body-parser-HN91kAf0.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,n as _}from"./prompt-BGz3DNLz.mjs";var v={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/available`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function y(e){return e.usage(`$0 logs datasets available
3
3
 
4
4
  Returns all dataset types that this account or zone can create. Each entry includes the dataset schema and timestamp field. The schema shows all possible fields for a dataset. However, not all fields may be available for your account or zone. When creating or updating a dataset, only fields available to your account or zone can be enabled. If you request a field that is not available, you will receive an error.
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-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{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{a as p,i as m,n as h}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/mnm/config`,body:`json`};function _(e){return e.usage(`$0 magic-network-monitoring configs create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,t as o}from"./context-DsVjrTbe.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-DAK_kbUa.mjs";import{t as d}from"./output-PRKYaJuo.mjs";import{t as f}from"./progress-DItBn6ZV.mjs";import{a as p,i as m,n as h}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/mnm/config`,body:`json`};function _(e){return e.usage(`$0 magic-network-monitoring configs create
3
3
 
4
4
  Create a new network monitoring configuration.`).option(`default-sampling`,{type:`number`,description:`Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.`,default:1}).option(`name`,{type:`string`,description:`The account name.`}).option(`router-ips`,{type:`string`,array:!0,description:`The router_ips field`}).option(`warp-devices`,{type:`string`,description:`The warp_devices field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"id": string, "name": string, "router_ip": string}].`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create account configuration`,builder:_,handler:async e=>u({command:`magic-network-monitoring configs create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf magic-network-monitoring configs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({default_sampling:e[`default-sampling`],name:c(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:n(e[`warp-devices`],`warp-devices`)}):r(e.body)});return}let u=e.body===void 0?void 0:r(e.body),m=await t(e),h=e.local?l:await o();if(e.accountId=h,e.body!==void 0){let e=u,t=await f(`Creating`,async()=>m.send(g,{body:e,account_id:h}));d(t,{successLabel:`Created`});return}if(e[`default-sampling`]===void 0)throw Error(`--default-sampling is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await p(`name`,`The account name.`));let _=i({default_sampling:e[`default-sampling`],name:c(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:n(e[`warp-devices`],`warp-devices`)}),v=await f(`Creating`,async()=>m.send(g,{body:_,account_id:h}));d(v,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/mnm/config`};function b(e){return e.usage(`$0 magic-network-monitoring configs delete
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-cj71dGxS.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{a as 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{a as u,i as d,n as f}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";import{c as p,i as m,o as h,r as g,t as _}from"./body-parser-HN91kAf0.mjs";import{n as v}from"./input-validation-D7z60HJH.mjs";import{n as y,t as ee}from"./raw-fetch-0T1SwPa1.mjs";var te={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`};function ne(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules bulk-delete
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-CRq9OQKr.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{a as i,t as a}from"./context-DsVjrTbe.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-PRKYaJuo.mjs";import{t as c}from"./progress-DItBn6ZV.mjs";import{t as l}from"./run-DAK_kbUa.mjs";import{a as u,i as d,n as f}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";import{c as p,i as m,o as h,r as g,t as _}from"./body-parser-HN91kAf0.mjs";import{n as v}from"./input-validation-D7z60HJH.mjs";import{n as y,t as ee}from"./raw-fetch-CmI3Ol3q.mjs";var te={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`};function ne(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules bulk-delete
3
3
 
4
4
  Delete all DNS Protection rules for an account.`).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 re={command:`bulk-delete`,describe:`Delete all DNS Protection rules.`,builder:ne,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();r({command:`cf magic-transit advanced-dns-protection configs dns protection rules bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(te,{account_id:l}));s(u,{successLabel:`Deleted`})})};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`,body:`json`};function ie(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules 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{i as t,n}from"./auth-cj71dGxS.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{a as 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{c 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}from"./prompt-Bnon9lfK.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`,409:`ConflictError`,410:`GoneError`}};function _(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-CRq9OQKr.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{a as i,t as a}from"./context-DsVjrTbe.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-PRKYaJuo.mjs";import{t as c}from"./progress-DItBn6ZV.mjs";import{t as l}from"./run-DAK_kbUa.mjs";import"./telemetry-B3S5OfOn.mjs";import{c 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}from"./prompt-BGz3DNLz.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`,409:`ConflictError`,410:`GoneError`}};function _(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
3
3
 
4
4
  Gets the repository projection of the active operator-reviewed scan report. \`scan_id\` is the customer scan's stable request ID.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <scan-id>`,describe:`Get reviewed vulnerability report`,builder:_,handler:async e=>l({command:`managed-defense vulnerability-discovery reports get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf managed-defense vulnerability-discovery reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}/report`,pathParams:{"repo-id":String(e[`repo-id`]??``),"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(g,{account_id:l,repo_id:e[`repo-id`],scan_id:e[`scan-id`]}));s(u,{successLabel:`Loaded`})})},y={command:`reports`,describe:`Operations for vulnerability-discovery.reports`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/token`,errors:{404:`NotFoundError`}};function x(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories create-token <repo-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-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{n as s}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";import{o as c,r as l,t as u}from"./body-parser-HN91kAf0.mjs";var d={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/managed_headers`,response:!1};function f(e){return e.usage(`$0 managed-transforms delete
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{i as n}from"./context-DsVjrTbe.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{t as i}from"./output-PRKYaJuo.mjs";import{t as a}from"./progress-DItBn6ZV.mjs";import{t as o}from"./run-DAK_kbUa.mjs";import{n as s}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";import{o as c,r as l,t as u}from"./body-parser-HN91kAf0.mjs";var d={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/managed_headers`,response:!1};function f(e){return e.usage(`$0 managed-transforms delete
3
3
 
4
4
  Disables all Managed Transforms.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const p={command:`delete`,describe:`Delete Managed Transforms`,builder:f,handler:async e=>o({command:`managed-transforms delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf managed-transforms delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,!await s({force:!!e.force}))return;let l=await a(`Deleting`,async()=>o.send(d,{zone_id:c}));i(l,{successLabel:`Deleted`})})};var m={method:`GET`,path:t=>e`/zones/${t.zone_id}/managed_headers`};function h(e){return e.usage(`$0 managed-transforms 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-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";import{o as l,r as u,t as d}from"./body-parser-HN91kAf0.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-Bnon9lfK.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`,`response_status`],errors:{400:`BadRequestError`}};function _(e){return e.usage(`$0 mcp portals account-tool-call-analytics
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{t as n}from"./dry-run-mrA7FFLR.mjs";import{a as r,t as i}from"./context-DsVjrTbe.mjs";import{t as a}from"./local-B3zt9PXR.mjs";import{t as o}from"./output-PRKYaJuo.mjs";import{t as s}from"./progress-DItBn6ZV.mjs";import{t as c}from"./run-DAK_kbUa.mjs";import"./telemetry-B3S5OfOn.mjs";import{o as l,r as u,t as d}from"./body-parser-HN91kAf0.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-BGz3DNLz.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`,`response_status`],errors:{400:`BadRequestError`}};function _(e){return e.usage(`$0 mcp portals account-tool-call-analytics
3
3
 
4
4
  Returns daily or monthly tool-call counts across the account.`).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`response-status`,{type:`string`,description:`Response status to count; 'all' counts every status`,choices:[`success`,`error`,`cached`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`account-tool-call-analytics`,describe:`Account-global MCP tool-call timeseries`,builder:_,handler:async e=>c({command:`mcp portals account-tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`response-status`,`dry-run`]}},e,async()=>{let c={granularity:e.granularity,aggregate:e.aggregate,tz:e.tz,days:e.days,response_status:e[`response-status`]};if(e.dryRun){let e=await r();n({command:`cf mcp portals account-tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,pathParams:{},query:c,bodyKind:`none`});return}let l=await t(e),u=e.local?a:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(g,{account_id:u,...c}));o(d,{successLabel:`Loaded`})})};var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals`,body:`json`,errors:{400:`BadRequestError`}};function b(e){return e.usage(`$0 mcp portals 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{i as t,n}from"./auth-cj71dGxS.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{a as 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{c 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,i as g,n as _}from"./prompt-Bnon9lfK.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`};function y(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-CRq9OQKr.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{a as i,t as a}from"./context-DsVjrTbe.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-PRKYaJuo.mjs";import{t as c}from"./progress-DItBn6ZV.mjs";import{t as l}from"./run-DAK_kbUa.mjs";import"./telemetry-B3S5OfOn.mjs";import{c 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,i as g,n as _}from"./prompt-BGz3DNLz.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`};function y(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
3
3
 
4
4
  Gets the high-availability configuration for a Mesh node.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <tunnel-id>`,describe:`Get Mesh node HA configuration`,builder:y,handler:async e=>l({command:`mesh nodes configurations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf mesh nodes configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(v,{account_id:l,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Loaded`})})};var x={method:`PUT`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`,body:`json`};function S(e){return e.usage(`$0 mesh nodes configurations update <tunnel-id>
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BGHWSKCw.mjs";import"./ui-CY75N4Tm.mjs";import{i as t,r as n,t as r}from"./wrangler-migration-DZ9Oelof.mjs";function i(e){return e.positional(`path`,{type:`string`,description:`Path to a Wrangler configuration file`}).option(`bundler`,{choices:[`vite`,`wrangler`],description:`Bundler to use in the migrated project (defaults to vite when @cloudflare/vite-plugin is declared, otherwise wrangler)`}).option(`dry-run`,{type:`boolean`,default:!1,description:`Show the files that would change without writing them`}).option(`force`,{type:`boolean`,default:!1,description:`Run even if the Git worktree is not clean`}).option(`install`,{type:`boolean`,default:!0,description:`Install cf as a project dependency (use --no-install to skip)`})}function a(t){console.error(e.muted(t===`vite`?`Using the Vite bundler because @cloudflare/vite-plugin is declared. Pass --bundler wrangler to override.`:`Using the Wrangler bundler because @cloudflare/vite-plugin is not declared. Pass --bundler vite to override.`))}const o={command:`migrate [path]`,describe:`Migrate a Wrangler project to cf`,builder:i,handler:async e=>{let i=await n(e.path),o=e.bundler??await r(i);e.bundler===void 0&&a(o),await t(i,{bundler:o,dryRun:e[`dry-run`],force:e.force,installDependencies:e.install})}};export{o as default};
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import"./ui-YBIkZLZt.mjs";import{i as t,r as n,t as r}from"./wrangler-migration-ChTsuUHx.mjs";function i(e){return e.positional(`path`,{type:`string`,description:`Path to a Wrangler configuration file`}).option(`bundler`,{choices:[`vite`,`wrangler`],description:`Bundler to use in the migrated project (defaults to vite when @cloudflare/vite-plugin is declared, otherwise wrangler)`}).option(`dry-run`,{type:`boolean`,default:!1,description:`Show the files that would change without writing them`}).option(`force`,{type:`boolean`,default:!1,description:`Run even if the Git worktree is not clean`}).option(`install`,{type:`boolean`,default:!0,description:`Install cf as a project dependency (use --no-install to skip)`})}function a(t){console.error(e.muted(t===`vite`?`Using the Vite bundler because @cloudflare/vite-plugin is declared. Pass --bundler wrangler to override.`:`Using the Wrangler bundler because @cloudflare/vite-plugin is not declared. Pass --bundler vite to override.`))}const o={command:`migrate [path]`,describe:`Migrate a Wrangler project to cf`,builder:i,handler:async e=>{let i=await n(e.path),o=e.bundler??await r(i);e.bundler===void 0&&a(o),await t(i,{bundler:o,dryRun:e[`dry-run`],force:e.force,installDependencies:e.install})}};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-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{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{n as p}from"./prompt-Bnon9lfK.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/monetization`,body:`json`,constants:{acceptedTermsOfService:!0}};function g(e){return e.usage(`$0 monetization account-eligibility check
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,i as o,t as s}from"./context-DsVjrTbe.mjs";import{t as c}from"./dry-run-mrA7FFLR.mjs";import{t as l}from"./local-B3zt9PXR.mjs";import{t as u}from"./output-PRKYaJuo.mjs";import{t as d}from"./run-DAK_kbUa.mjs";import{t as f}from"./progress-DItBn6ZV.mjs";import"./telemetry-B3S5OfOn.mjs";import{n as p}from"./prompt-BGz3DNLz.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/monetization`,body:`json`,constants:{acceptedTermsOfService:!0}};function g(e){return e.usage(`$0 monetization account-eligibility check
3
3
 
4
4
  Checks the account or zone for Monetization Gateway eligibility and returns its pending, approved, or rejected decision.
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-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}/teamnet/routes`,body:`json`};function h(e){return e.usage(`$0 network routes cidr create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{r as n,t as r}from"./body-parser-HN91kAf0.mjs";import{a as i,t as a}from"./context-DsVjrTbe.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-DAK_kbUa.mjs";import{t as u}from"./output-PRKYaJuo.mjs";import{t as d}from"./progress-DItBn6ZV.mjs";import{a as f,n as p}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/teamnet/routes`,body:`json`};function h(e){return e.usage(`$0 network routes cidr create
3
3
 
4
4
  Routes a private network through a Cloudflare Tunnel.`).option(`comment`,{type:`string`,description:`Optional remark describing the route.`,default:``}).option(`network`,{type:`string`,description:`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`}).option(`virtual-network-id`,{type:`string`,description:`UUID of the virtual network.`}).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 tunnel route`,builder:h,handler:async e=>l({command:`network routes cidr create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf network routes cidr create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/teamnet/routes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?r({comment:s(e.comment,`comment`,`text`),network:s(e.network,`network`,`text`),virtual_network_id:s(e[`virtual-network-id`],`virtual-network-id`,`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.network===void 0&&(e.network=await f(`network`,`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`));let g=r({comment:s(e.comment,`comment`,`text`),network:s(e.network,`network`,`text`),virtual_network_id:s(e[`virtual-network-id`],`virtual-network-id`,`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}/teamnet/routes/${t.route_id}`};function v(e){return e.usage(`$0 network routes cidr delete <route-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-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}/cni/cnis`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 network-interconnects cnis create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{r as n,t as r}from"./body-parser-HN91kAf0.mjs";import{a as i,t as a}from"./context-DsVjrTbe.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-DAK_kbUa.mjs";import{t as u}from"./output-PRKYaJuo.mjs";import{t as d}from"./progress-DItBn6ZV.mjs";import{a as f,n as p}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/cni/cnis`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 network-interconnects cnis create
3
3
 
4
4
  Creates a new Cloud Network Interconnect (CNI) for private network connectivity between Cloudflare and your infrastructure. CNIs enable dedicated, high-performance network links.`).option(`account`,{type:`string`,description:`Customer account tag`}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Extra set of static prefixes to advertise to the customer's end of the session
5
5
  Prefixes containing host bits will be normalized to contain network bits only.
@@ -43,7 +43,7 @@ character:
43
43
  In other words, MD5 keys may contain any printable ASCII character aside from newline
44
44
  (0x0A), quotation mark (\`"\`), vertical tab (0x0B), carriage return (0x0D), tab (0x09),
45
45
  form feed (0x0C), and the question mark (\`?\`). Requests specifying an MD5 key with one
46
- or more of these disallowed characters will be rejected.`}).option(`bgp-mode`,{type:`string`,description:"The BGP mode for a CNI.\nOne of the following:\n* `dynamic_route_exchange`\n* `advertise_only`",choices:[`dynamic_route_exchange`,`advertise_only`]}).coerce(`bgp-mode`,e=>s(e,`bgp-mode`,`text`)).option(`cust-ip`,{type:`string`,description:`Customer end of the point-to-point link
46
+ or more of these disallowed characters will be rejected.`}).option(`bgp-mode`,{type:`string`,description:`Controls the customer-facing route exchange behavior. Omitting this field during an update preserves the current mode. When enabling BGP on a BGP-disabled CNI, an omitted or null mode defaults to AdvertiseOnly. Otherwise, null clears the explicitly selected mode.`,choices:[`dynamic_route_exchange`,`advertise_only`]}).coerce(`bgp-mode`,e=>s(e,`bgp-mode`,`text`)).option(`cust-ip`,{type:`string`,description:`Customer end of the point-to-point link
47
47
 
48
48
  This should always be inside the same prefix as \`p2p_ip\`.`}).option(`id`,{type:`string`,description:`The id field`}).option(`interconnect`,{type:`string`,description:`Interconnect identifier hosting this CNI`}).option(`magic-conduit-name`,{type:`string`,description:`The magic.conduit_name field`}).option(`magic-description`,{type:`string`,description:`The magic.description field`}).option(`magic-mtu`,{type:`number`,description:`The magic.mtu field`}).option(`p2p-ip`,{type:`string`,description:`Cloudflare end of the point-to-point link`}).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=[`bgp-customer-asn`,`bgp-extra-prefixes`,`bgp-md5-key`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`bgp-customer-asn`,`bgp-extra-prefixes`].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 --bgp-* flag is set`)}return!0})}const E={command:`update <cni>`,describe:`Modify stored information about a CNI object`,builder:T,handler:async e=>l({command:`network-interconnects cnis update`,classification:{safeFlags:[`bgp-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf network-interconnects cnis update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cni/cnis/${e.cni==null?`<cni>`:encodeURIComponent(String(e.cni))}`,pathParams:{cni:String(e.cni??``)},bodyKind:`json`,body:e.body===void 0?r({account:s(e.account,`account`,`text`),bgp:{customer_asn:e[`bgp-customer-asn`],extra_prefixes:e[`bgp-extra-prefixes`],md5_key:s(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},bgp_mode:e[`bgp-mode`],cust_ip:s(e[`cust-ip`],`cust-ip`,`text`),id:s(e.id,`id`,`text`),interconnect:s(e.interconnect,`interconnect`,`text`),magic:{conduit_name:s(e[`magic-conduit-name`],`magic-conduit-name`,`text`),description:s(e[`magic-description`],`magic-description`,`text`),mtu:e[`magic-mtu`]},p2p_ip:s(e[`p2p-ip`],`p2p-ip`,`text`)}):n(e.body)});return}let l=e.body===void 0?void 0:n(e.body),p=await t(e),m=e.local?c:await a();if(e.accountId=m,e.body!==void 0){let t=l,n=await d(`Updating`,async()=>p.send(w,{body:t,account_id:m,cni:e.cni}));u(n,{successLabel:`Updated`});return}if(e.account===void 0&&(e.account=await f(`account`,`Customer account tag`)),e[`cust-ip`]===void 0&&(e[`cust-ip`]=await f(`cust-ip`,"Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`.")),e.id===void 0&&(e.id=await f(`id`,`The id field`)),e.interconnect===void 0&&(e.interconnect=await f(`interconnect`,`Interconnect identifier hosting this CNI`)),e[`magic-conduit-name`]===void 0&&(e[`magic-conduit-name`]=await f(`magic-conduit-name`,`The magic.conduit_name field`)),e[`magic-description`]===void 0&&(e[`magic-description`]=await f(`magic-description`,`The magic.description field`)),e[`magic-mtu`]===void 0)throw Error(`--magic-mtu is required (or pass --body with this field set).`);e[`p2p-ip`]===void 0&&(e[`p2p-ip`]=await f(`p2p-ip`,`Cloudflare end of the point-to-point link`));let h=r({account:s(e.account,`account`,`text`),bgp:{customer_asn:e[`bgp-customer-asn`],extra_prefixes:e[`bgp-extra-prefixes`],md5_key:s(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},bgp_mode:e[`bgp-mode`],cust_ip:s(e[`cust-ip`],`cust-ip`,`text`),id:s(e.id,`id`,`text`),interconnect:s(e.interconnect,`interconnect`,`text`),magic:{conduit_name:s(e[`magic-conduit-name`],`magic-conduit-name`,`text`),description:s(e[`magic-description`],`magic-description`,`text`),mtu:e[`magic-mtu`]},p2p_ip:s(e[`p2p-ip`],`p2p-ip`,`text`)}),g=await d(`Updating`,async()=>p.send(w,{body:h,account_id:m,cni:e.cni}));u(g,{successLabel:`Updated`})})},D={command:`cnis`,describe:`Cloud Network Interconnect (CNI) connections — private links from cloud providers to Cloudflare`,builder:e=>e.command(g).command(y).command(b).command(C).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var O={method:`POST`,path:t=>e`/accounts/${t.account_id}/cni/interconnects`,body:`json`,errors:{400:`BadRequestError`,500:`InternalServerError`}};function k(e){return e.usage(`$0 network-interconnects interconnects create
49
49
 
@@ -1,11 +1,11 @@
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-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,i as g,n as _}from"./prompt-Bnon9lfK.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/traces/${t.traceId}/events`,query:[`from`,`to`,`per_page`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function ee(e){return e.usage(`$0 o11y agents traces events <traceId>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{t as n}from"./dry-run-mrA7FFLR.mjs";import{a as r,i,t as a}from"./context-DsVjrTbe.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-PRKYaJuo.mjs";import{t as c}from"./progress-DItBn6ZV.mjs";import{t as l}from"./run-DAK_kbUa.mjs";import"./telemetry-B3S5OfOn.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,i as g,n as _}from"./prompt-BGz3DNLz.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/traces/${t.traceId}/events`,query:[`from`,`to`,`per_page`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function ee(e){return e.usage(`$0 o11y agents traces events <traceId>
3
3
 
4
- Returns a page of authorized canonical otel events for a Trace containing named Agent activity, using the existing events-query flow. Searches the full 7-day retention unless from or to narrow it. Events are ordered by event timestamp and ID, newest first. Continue with result_info.cursors.after; one page is not a complete span tree.`).positional(`trace-id`,{type:`string`,description:`Trace ID: 32 hexadecimal characters, matched case-insensitively.`,demandOption:!0}).option(`from`,{type:`number`,description:`Optional. Narrows the search, which by default covers the full 7-day retention, so any retained Trace ID can be fetched without a window. Start as Unix epoch milliseconds; the effective value is in result_info.from.`}).option(`to`,{type:`number`,description:`Optional. Narrows the search; end as Unix epoch milliseconds. Defaults to now.`}).option(`per-page`,{type:`number`,description:`Maximum items to return per page. Defaults to 100.`}).option(`cursor`,{type:`string`,description:`Opaque cursor from result_info.cursors.after in the previous response. Send it with the same filters; its window replaces from and to.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`events <traceId>`,describe:`List Agent Trace events`,builder:ee,handler:async e=>l({command:`o11y agents traces events`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={from:e.from,to:e.to,per_page:e[`per-page`],cursor:e.cursor};if(e.dryRun){let t=await r();n({command:`cf o11y agents traces events`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/agents/traces/${e[`trace-id`]==null?`<trace-id>`:encodeURIComponent(String(e[`trace-id`]))}/events`,pathParams:{"trace-id":String(e[`trace-id`]??``)},query:i,bodyKind:`none`});return}let l=await t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(v,{account_id:u,traceId:e[`trace-id`],...i}));s(d,{successLabel:`Loaded`})})};var y={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/traces/${t.traceId}`,query:[`from`,`to`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function b(e){return e.usage(`$0 o11y agents traces get <traceId>
4
+ Returns a page of a Trace's Agent spans (invoke_agent, chat, execute_tool) and their events, newest first. Trace and span IDs are the same as in the Worker's trace, and each span's parentSpanId links it into the Agent tree. Searches the full 7-day retention unless from or to narrow it. Continue with result_info.cursors.after; one page may not hold the whole tree.`).positional(`trace-id`,{type:`string`,description:`Trace ID: 32 hexadecimal characters, matched case-insensitively.`,demandOption:!0}).option(`from`,{type:`number`,description:`Optional. Narrows the search, which by default covers the full 7-day retention, so any retained Trace ID can be fetched without a window. Start as Unix epoch milliseconds; the effective value is in result_info.from.`}).option(`to`,{type:`number`,description:`Optional. Narrows the search; end as Unix epoch milliseconds. Defaults to now.`}).option(`per-page`,{type:`number`,description:`Maximum items to return per page. Defaults to 100.`}).option(`cursor`,{type:`string`,description:`Opaque cursor from result_info.cursors.after in the previous response. Send it with the same filters; its window replaces from and to.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`events <traceId>`,describe:`List Agent Trace events`,builder:ee,handler:async e=>l({command:`o11y agents traces events`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={from:e.from,to:e.to,per_page:e[`per-page`],cursor:e.cursor};if(e.dryRun){let t=await r();n({command:`cf o11y agents traces events`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/agents/traces/${e[`trace-id`]==null?`<trace-id>`:encodeURIComponent(String(e[`trace-id`]))}/events`,pathParams:{"trace-id":String(e[`trace-id`]??``)},query:i,bodyKind:`none`});return}let l=await t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(v,{account_id:u,traceId:e[`trace-id`],...i}));s(d,{successLabel:`Loaded`})})};var y={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/traces/${t.traceId}`,query:[`from`,`to`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function b(e){return e.usage(`$0 o11y agents traces get <traceId>
5
5
 
6
- Returns the summary of one Trace containing named Agent activity, with the same fields as the Trace list. Searches the full 7-day retention unless from or to narrow it. List the Trace's events with /agents/traces/{traceId}/events.`).positional(`trace-id`,{type:`string`,description:`Trace ID: 32 hexadecimal characters, matched case-insensitively.`,demandOption:!0}).option(`from`,{type:`number`,description:`Optional. Narrows the search, which by default covers the full 7-day retention, so any retained Trace ID can be fetched without a window. Start as Unix epoch milliseconds; the effective value is in result_info.from.`}).option(`to`,{type:`number`,description:`Optional. Narrows the search; end as Unix epoch milliseconds. Defaults to now.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get <traceId>`,describe:`Get an Agent Trace`,builder:b,handler:async e=>l({command:`o11y agents traces get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={from:e.from,to:e.to};if(e.dryRun){let t=await r();n({command:`cf o11y agents traces get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/agents/traces/${e[`trace-id`]==null?`<trace-id>`:encodeURIComponent(String(e[`trace-id`]))}`,pathParams:{"trace-id":String(e[`trace-id`]??``)},query:i,bodyKind:`none`});return}let l=await t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(y,{account_id:u,traceId:e[`trace-id`],...i}));s(d,{successLabel:`Loaded`})})};var re={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/traces`,query:[`service`,`agent`,`from`,`to`,`per_page`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function ie(e){return e.usage(`$0 o11y agents traces list
6
+ Returns the summary of one Trace with Agent activity, with the same fields as the Trace list. Searches the full 7-day retention unless from or to narrow it. List the Trace's Agent spans with /agents/traces/{traceId}/events.`).positional(`trace-id`,{type:`string`,description:`Trace ID: 32 hexadecimal characters, matched case-insensitively.`,demandOption:!0}).option(`from`,{type:`number`,description:`Optional. Narrows the search, which by default covers the full 7-day retention, so any retained Trace ID can be fetched without a window. Start as Unix epoch milliseconds; the effective value is in result_info.from.`}).option(`to`,{type:`number`,description:`Optional. Narrows the search; end as Unix epoch milliseconds. Defaults to now.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get <traceId>`,describe:`Get an Agent Trace`,builder:b,handler:async e=>l({command:`o11y agents traces get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={from:e.from,to:e.to};if(e.dryRun){let t=await r();n({command:`cf o11y agents traces get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/agents/traces/${e[`trace-id`]==null?`<trace-id>`:encodeURIComponent(String(e[`trace-id`]))}`,pathParams:{"trace-id":String(e[`trace-id`]??``)},query:i,bodyKind:`none`});return}let l=await t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(y,{account_id:u,traceId:e[`trace-id`],...i}));s(d,{successLabel:`Loaded`})})};var re={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/traces`,query:[`service`,`agent`,`from`,`to`,`per_page`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function ie(e){return e.usage(`$0 o11y agents traces list
7
7
 
8
- Lists Traces with a named Agent invocation in the window, ordered by lastActivityMs, newest first, including work without a Conversation ID. The window defaults to the last 24 hours. Summaries include the Agent names and Conversation IDs seen, authorized Trace duration, chat input/output/total tokens, models, providers, LLM/tool call counts and span-error counts within the effective window.`).option(`service`,{type:`string`,description:`Only include work in which an Agent of this Worker service took part.`}).option(`agent`,{type:`string`,description:`Only include work in which an Agent with this gen_ai.agent.name took part. With service, both must match the same Agent.`}).option(`from`,{type:`number`,description:`Start of the search window, as Unix epoch milliseconds. Defaults to 24 hours before to. Clamped to the 7-day retention boundary; the effective value is in result_info.from.`}).option(`to`,{type:`number`,description:`End of the search window, as Unix epoch milliseconds. Defaults to now.`}).option(`per-page`,{type:`number`,description:`Maximum items to return per page. Defaults to 20.`}).option(`cursor`,{type:`string`,description:`Opaque cursor from result_info.cursors.after in the previous response. Send it with the same filters; its window replaces from and to.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`list`,describe:`List Agent Traces`,builder:ie,handler:async e=>l({command:`o11y agents traces list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={service:e.service,agent:e.agent,from:e.from,to:e.to,per_page:e[`per-page`],cursor:e.cursor};if(e.dryRun){let e=await r();n({command:`cf o11y agents traces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/agents/traces`,pathParams:{},query:i,bodyKind:`none`});return}let l=await t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(re,{account_id:u,...i}));s(d,{successLabel:`Loaded`})})},oe={command:`traces`,describe:`Operations for agents.traces`,builder:e=>e.command(te).command(ne).command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},se={command:`agents`,describe:`Operations for agents`,builder:e=>e.command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/destinations`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function ce(e){return e.usage(`$0 o11y destinations create
8
+ Lists Traces with Agent activity in the window, newest activity first, including work without a Conversation ID. The window defaults to the last 24 hours. Each summary covers the Trace's Agent spans (invoke_agent, chat, execute_tool): the Agents and Conversation IDs seen, duration, token usage, models, providers, and LLM call, tool call and error counts.`).option(`service`,{type:`string`,description:`Only include work in which an Agent of this Worker service took part.`}).option(`agent`,{type:`string`,description:`Only include work in which an Agent with this gen_ai.agent.name took part. With service, both must match the same Agent.`}).option(`from`,{type:`number`,description:`Start of the search window, as Unix epoch milliseconds. Defaults to 24 hours before to. Clamped to the 7-day retention boundary; the effective value is in result_info.from.`}).option(`to`,{type:`number`,description:`End of the search window, as Unix epoch milliseconds. Defaults to now.`}).option(`per-page`,{type:`number`,description:`Maximum items to return per page. Defaults to 20.`}).option(`cursor`,{type:`string`,description:`Opaque cursor from result_info.cursors.after in the previous response. Send it with the same filters; its window replaces from and to.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`list`,describe:`List Agent Traces`,builder:ie,handler:async e=>l({command:`o11y agents traces list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={service:e.service,agent:e.agent,from:e.from,to:e.to,per_page:e[`per-page`],cursor:e.cursor};if(e.dryRun){let e=await r();n({command:`cf o11y agents traces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/agents/traces`,pathParams:{},query:i,bodyKind:`none`});return}let l=await t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(re,{account_id:u,...i}));s(d,{successLabel:`Loaded`})})},oe={command:`traces`,describe:`Operations for agents.traces`,builder:e=>e.command(te).command(ne).command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},se={command:`agents`,describe:`Operations for agents`,builder:e=>e.command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/destinations`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function ce(e){return e.usage(`$0 o11y destinations create
9
9
 
10
10
  Create a new Workers Observability Telemetry Destination.`).option(`configuration-headers`,{type:`string`,description:`The configuration.headers field. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": string}.`}).option(`configuration-logpush-dataset`,{type:`string`,description:`The configuration.logpushDataset field`,choices:[`opentelemetry-traces`,`opentelemetry-logs`,`opentelemetry-metrics`]}).coerce(`configuration-logpush-dataset`,e=>m(e,`configuration-logpush-dataset`,`text`)).option(`configuration-type`,{type:`string`,description:`The configuration.type field`,choices:[`logpush`]}).coerce(`configuration-type`,e=>m(e,`configuration-type`,`text`)).option(`configuration-url`,{type:`string`,description:`The configuration.url field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`skip-preflight-check`,{type:`boolean`,description:`The skipPreflightCheck field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const le={command:`create`,describe:`Create Destination`,builder:ce,handler:async e=>l({command:`o11y destinations create`,classification:{safeFlags:[`configuration-logpush-dataset`,`configuration-type`,`enabled`,`skip-preflight-check`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf o11y destinations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/destinations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({configuration:{headers:u(e[`configuration-headers`],`configuration-headers`,!0),logpushDataset:e[`configuration-logpush-dataset`],type:e[`configuration-type`],url:m(e[`configuration-url`],`configuration-url`,`text`)},enabled:e.enabled,name:m(e.name,`name`,`text`),skipPreflightCheck:e[`skip-preflight-check`]},[[`configuration`,`headers`]]):f(e.body,[{path:[`configuration`,`headers`],flag:`configuration-headers`}])});return}let i=e.body===void 0?void 0:f(e.body,[{path:[`configuration`,`headers`],flag:`configuration-headers`}]),l=await t(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(x,{body:e,account_id:d}));s(t,{successLabel:`Created`});return}if(e[`configuration-headers`]===void 0)throw Error(`--configuration-headers is required (or pass --body with this field set).`);if(e[`configuration-logpush-dataset`]===void 0&&(e[`configuration-logpush-dataset`]=await g(`configuration-logpush-dataset`,`The configuration.logpushDataset field`,[`opentelemetry-traces`,`opentelemetry-logs`,`opentelemetry-metrics`])),e[`configuration-type`]===void 0&&(e[`configuration-type`]=await g(`configuration-type`,`The configuration.type field`,[`logpush`])),e[`configuration-url`]===void 0&&(e[`configuration-url`]=await h(`configuration-url`,`The configuration.url field`)),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await h(`name`,`The name field`));let _=p({configuration:{headers:u(e[`configuration-headers`],`configuration-headers`,!0),logpushDataset:e[`configuration-logpush-dataset`],type:e[`configuration-type`],url:m(e[`configuration-url`],`configuration-url`,`text`)},enabled:e.enabled,name:m(e.name,`name`,`text`),skipPreflightCheck:e[`skip-preflight-check`]},[[`configuration`,`headers`]]),v=await c(`Creating`,async()=>l.send(x,{body:_,account_id:d}));s(v,{successLabel:`Created`})})};var ue={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/observability/destinations/${t.slug}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function de(e){return e.usage(`$0 o11y destinations delete <slug>
11
11
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export{n as getActiveAccountId,a as getOrSelectAccountId,l as isTemporaryAccountRequested,p as requireTemporaryAccount,m as resolveProfile,_ as setTemporaryAccountRequested}from"./oauth-BUcV_xbm.mjs";
2
+ export{n as getActiveAccountId,a as getOrSelectAccountId,l as isTemporaryAccountRequested,p as requireTemporaryAccount,m as resolveProfile,_ as setTemporaryAccountRequested}from"./oauth-NljTb7u9.mjs";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{c as e,i as t,l as n,o as r}from"./log-Brx-wjJW.mjs";import{n as i,o as a,r as o,s}from"./cf-QIG83e0V.mjs";import{n as c,t as l}from"./version-pcpa_kv3.mjs";import{t as u}from"./args-BAOHroBC.mjs";import{t as d}from"./cli-exit-CstFZ1eJ.mjs";import{n as f}from"./context-DlFhI9cN.mjs";import{i as p}from"./dialog-CD94-Kzw.mjs";import{t as m}from"./errors-CilNjDVk.mjs";import{n as h}from"./interactive-wQM7Blhm.mjs";import{t as g}from"./session-BEsQIuwP.mjs";import{n as _,t as v}from"./project-settings-D_S-UC8I.mjs";import{n as y}from"./blocks-DK5qAzLe.mjs";import{r as b}from"./theme-BGHWSKCw.mjs";import{relative as x}from"node:path";function S(e,n={}){let{cwd:r=process.cwd(),output:i=process.stderr}=n,a=n.columns??(i.columns||80),o=_(r),s=o?x(r,o):v,c=`To use this account automatically in future, configure accountId in ${s}:`,l=/* @__PURE__ */ new Set([`accountId`,s]),u=y(c,Math.max(20,a-3)).map(e=>e.split(` `).map(e=>{let t=e.replace(/:$/,``);return l.has(t)?`${b.code(t)}${e.slice(t.length)}`:e}).join(` `));t.info(u.join(`
2
+ import{c as e,i as t,l as n,o as r}from"./log-Brx-wjJW.mjs";import{n as i,o as a,r as o,s}from"./cf-MAiSK--E.mjs";import{n as c,t as l}from"./version-5uL0ecbB.mjs";import{t as u}from"./args-BAOHroBC.mjs";import{t as d}from"./cli-exit-CstFZ1eJ.mjs";import{n as f}from"./context-DsVjrTbe.mjs";import{i as p}from"./dialog-CD94-Kzw.mjs";import{t as m}from"./errors-CUuKkONZ.mjs";import{n as h}from"./interactive-wQM7Blhm.mjs";import{t as g}from"./session-CgJ6kB79.mjs";import{n as _,t as v}from"./project-settings-D_S-UC8I.mjs";import{n as y}from"./blocks-DGXsHh9X.mjs";import{r as b}from"./theme-BGHWSKCw.mjs";import{relative as x}from"node:path";function S(e,n={}){let{cwd:r=process.cwd(),output:i=process.stderr}=n,a=n.columns??(i.columns||80),o=_(r),s=o?x(r,o):v,c=`To use this account automatically in future, configure accountId in ${s}:`,l=/* @__PURE__ */ new Set([`accountId`,s]),u=y(c,Math.max(20,a-3)).map(e=>e.split(` `).map(e=>{let t=e.replace(/:$/,``);return l.has(t)?`${b.code(t)}${e.slice(t.length)}`:e}).join(` `));t.info(u.join(`
3
3
  `),{output:i});let d=`accountId: ${b.jsonString(JSON.stringify(e))},`,f=o?[d]:[`import { defineConfig } from "cf/config";`,``,`export default defineConfig({`,` ${d}`,`});`],p=` `.repeat(3);i.write(`\n${f.map(e=>e&&p+e).join(`
4
4
  `)}\n\n`),t.info(`Alternatively, set the ${b.code(`CLOUDFLARE_ACCOUNT_ID`)} environment variable.`,{output:i}),i.write(`
5
5
  `)}const C={debug:(...e)=>{process.env.DEBUG&&console.error(...e)},info:(...e)=>console.error(...e),log:(...e)=>console.error(...e),warn:(...e)=>console.error(...e),error:(...e)=>console.error(...e)};var w=class extends Error{};async function T(t){if(h())throw new w;g(c);let r=await e({message:p(t),output:process.stderr});if(n(r)||typeof r!=`string`)throw new d(130,{cancelled:!0});return r}async function E(e,t){if(h())throw new w;g(c);let i=await r({message:e,output:process.stderr,options:t.choices.map(({title:e,value:t})=>({label:e,value:t}))});if(n(i)||typeof i!=`string`)throw new d(130,{cancelled:!0});return u()||S(i),i}const D=i({logger:C,userAgent:l,prompt:T,select:E,isNoDefaultValueProvidedError:e=>e instanceof w});let O=!1;function k(e,t){O=e,D.setTemporaryAllowed(e,t)}function A(){return O}async function j(e){if(!A())throw Error(`Temporary accounts require --temporary-account.`);try{let t=await D.requireAuth({compliance_region:e?.complianceRegion??await f(e)}),{apiToken:n}=D.requireApiToken();return{accountId:t,apiToken:n}}catch(e){throw e instanceof Error&&(e.message=e.message.replaceAll(/--temporary(?!-account)/g,`--temporary-account`)),e}}async function M(e,t){try{return await D.getOrSelectAccountId({account_id:e,compliance_region:t?.complianceRegion??await f(t)})}catch(e){throw e instanceof Error&&!(`reason`in e)&&`telemetryMessage`in e&&e.telemetryMessage===`cfetch auth login required`&&h()&&D.getAPIToken()===void 0?new m(e.message,{cause:e}):e}}function N(){return D.getActiveAccountId({})}async function P(){return D.fetchAllAccounts({compliance_region:await f()},{throwOnEmpty:!1})}async function F(e){if(e?.scopes&&!s(e.scopes))throw Error(`One or more of the requested scopes are not valid cf OAuth scopes.`);return D.login({compliance_region:await f()},{browser:e?.browser??!0,device:e?.device??!0,...e?.scopes&&{scopes:e.scopes},...e?.profile&&{profile:e.profile}})}function I(e){return D.logout(e)}function L(e){D.setProfile(e)}function R(e){a(e,{logger:C,getCredentialStore:()=>D.getCredentialStore()})}function z(){return D.getActiveProfile()}function B(){return o({logger:C})}function V(e,t=process.cwd()){let n=B().resolve({profile:e,cwd:t});return L(n),n}function H(){return D.getOAuthTokenFromLocalState()}function U(){return D.readAuthCredentials()?.oauth_token!==void 0}function W(){return D.readAuthCredentials()}function G(){return D.getCredentialStore().path()}export{k as _,M as a,U as c,I as d,W as f,L as g,R as h,G as i,A as l,V as m,N as n,B as o,j as p,z as r,H as s,P as t,F as u};
@@ -0,0 +1,4 @@
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-CRq9OQKr.mjs";import{t as n}from"./dry-run-mrA7FFLR.mjs";import{a as r,t as i}from"./context-DsVjrTbe.mjs";import{t as a}from"./local-B3zt9PXR.mjs";import{t as o}from"./output-PRKYaJuo.mjs";import{t as s}from"./progress-DItBn6ZV.mjs";import{t as c}from"./run-DAK_kbUa.mjs";import"./telemetry-B3S5OfOn.mjs";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/observability/usage/limit`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function u(e){return e.usage(`$0 observability usage-limit get
3
+
4
+ Whether Workers Observability is keeping fewer of the account's events, because it passed its daily limit or for another reason, and what that limit is. Daily limits reset at 00:00 UTC; paid accounts are brought back in stages over the following hours.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get usage limit status`,builder:u,handler:async e=>c({command:`observability usage-limit get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();n({command:`cf observability usage-limit get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/observability/usage/limit`,pathParams:{},bodyKind:`none`});return}let c=await t(e),u=e.local?a:await i();e.accountId=u;let d=await s(`Loading`,async()=>c.send(l,{account_id:u}));o(d,{successLabel:`Loaded`})})},f={command:`usage-limit`,describe:`Operations for usage-limit`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},p={command:`observability`,describe:`observability`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{p as default};