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{n as t}from"./auth-cj71dGxS.mjs";import{i as n}from"./context-DlFhI9cN.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{t as i}from"./output-PRKYaJuo.mjs";import{t as a}from"./progress-AML-AVs4.mjs";import{t as o}from"./run-DAg7dfIW.mjs";import"./telemetry-DDs3zhdw.mjs";import{o as s,r as c,t as l}from"./body-parser-HN91kAf0.mjs";import{n as u}from"./prompt-Bnon9lfK.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/ai-security/custom-topics`};function f(e){return e.usage(`$0 ai-security custom-topics get
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"./telemetry-B3S5OfOn.mjs";import{o as s,r as c,t as l}from"./body-parser-HN91kAf0.mjs";import{n as u}from"./prompt-BGz3DNLz.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/ai-security/custom-topics`};function f(e){return e.usage(`$0 ai-security custom-topics get
3
3
 
4
4
  Get the custom topic categories defined for the zone. While AI Security for Apps is enabled, it scores every incoming prompt against these topics and writes the scores to the \`cf.llm.prompt.custom_topic_categories\` field, keyed by topic label. Topics can be configured while the detection is disabled, but no prompt is scored until you enable it.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`get`,describe:`Get the AI Security for Apps custom topics of a zone.`,builder:f,handler:async e=>o({command:`ai-security custom-topics get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf ai-security custom-topics get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(d,{zone_id:s}));i(c,{successLabel:`Loaded`})})};var m={method:`PUT`,path:t=>e`/zones/${t.zone_id}/ai-security/custom-topics`,body:`json`};function h(e){return e.usage("$0 ai-security custom-topics update\n\nUpdate the custom topic list of the zone, overwriting it entirely with the topics in the request, so include every topic you want to keep. Changes can take up to a minute to propagate. Each entry has a `label`, used to reference the topic in rule expressions and analytics, and a `topic` description, which the classifier scores prompts against while AI Security for Apps is enabled. The following rules apply: - A zone can hold at most 20 topics. - `label` must be 2–20 characters, using only lowercase letters (a–z), digits (0–9), and hyphens. - `topic` must be 2–50 UTF-8 bytes. Text in any language is supported, including spaces, numbers, punctuation, and symbols. Tabs, line breaks, invalid text, and invisible formatting characters are not allowed. - Labels must be unique within the zone, and so must topic descriptions.").option(`topics`,{type:`string`,description:`Custom topic categories for AI Security for Apps content detection. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"label": string, "topic": string}].`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`update`,describe:`Update the AI Security for Apps custom topics of a zone.`,builder:h,handler:async e=>o({command:`ai-security custom-topics update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf ai-security custom-topics update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({topics:s(e.topics,`topics`)}):c(e.body)});return}let o=e.body===void 0?void 0:c(e.body),d=await t(e),f=await n({zone:e.zone},d,{quiet:e.quiet});if(e.zoneId=f,!await u({force:!!e.force,message:`This operation overwrites the AI Security for Apps custom topics for a zone.`}))return;if(e.body!==void 0){let e=o,t=await a(`Updating`,async()=>d.send(m,{body:e,zone_id:f}));i(t,{successLabel:`Updated`});return}let p=l({topics:s(e.topics,`topics`)}),h=await a(`Updating`,async()=>d.send(m,{body:p,zone_id:f}));i(h,{successLabel:`Updated`})})},_={command:`custom-topics`,describe:`Organization-specific topic categories used by AI Security for Apps content detection`,builder:e=>e.command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var v={method:`GET`,path:t=>e`/zones/${t.zone_id}/ai-security/settings`};function y(e){return e.usage(`$0 ai-security get
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{a as l,i as u,n as d}from"./prompt-Bnon9lfK.mjs";import{o as f,r as p,t as m}from"./body-parser-HN91kAf0.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{n as g,t as _}from"./raw-fetch-0T1SwPa1.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/available_alerts`};function y(e){return e.usage(`$0 alerting available-alerts list
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{a as l,i as u,n as d}from"./prompt-BGz3DNLz.mjs";import{o as f,r as p,t as m}from"./body-parser-HN91kAf0.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{n as g,t as _}from"./raw-fetch-CmI3Ol3q.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/available_alerts`};function y(e){return e.usage(`$0 alerting available-alerts list
3
3
 
4
4
  Gets a list of all alert types for which an account is eligible.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`Get Alert Types`,builder:y,handler:async e=>c({command:`alerting available-alerts list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();n({command:`cf alerting available-alerts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/available_alerts`,pathParams:{},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(v,{account_id:l}));o(u,{successLabel:`Loaded`})})},ee={command:`available-alerts`,describe:`Operations for available-alerts`,builder:e=>e.command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/eligible`};function ne(e){return e.usage(`$0 alerting destinations eligible get
5
5
 
@@ -19,9 +19,7 @@ Delete a configured webhook destination.`).positional(`webhook-id`,{type:`string
19
19
 
20
20
  Get details for a single webhooks destination.`).positional(`webhook-id`,{type:`string`,description:`The unique identifier of a webhook`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <webhook-id>`,describe:`Get a webhook`,builder:V,handler:async e=>c({command:`alerting destinations webhooks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf alerting destinations webhooks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/destinations/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(B,{account_id:l,webhook_id:e[`webhook-id`]}));o(u,{successLabel:`Loaded`})})};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/webhooks`};function W(e){return e.usage(`$0 alerting destinations webhooks list
21
21
 
22
- Gets a list of all configured webhook destinations.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`List webhooks`,builder:W,handler:async e=>c({command:`alerting destinations webhooks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();n({command:`cf alerting destinations webhooks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/destinations/webhooks`,pathParams:{},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(U,{account_id:l}));o(u,{successLabel:`Loaded`})})};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/webhooks/${t.webhook_id}`,body:`json`};function q(e){return e.usage(`$0 alerting destinations webhooks update <webhook-id>
23
-
24
- Update a webhook destination.`).positional(`webhook-id`,{type:`string`,description:`The unique identifier of a webhook`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`}).option(`secret`,{type:`string`,description:"Optional secret that will be passed in the `cf-webhook-auth` header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any API response body."}).option(`url`,{type:`string`,description:`The POST endpoint to call when dispatching a notification.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const J={command:`update <webhook-id>`,describe:`Update a webhook`,builder:q,handler:async e=>c({command:`alerting destinations webhooks update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf alerting destinations webhooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/destinations/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({name:h(e.name,`name`,`text`),secret:h(e.secret,`secret`,`text`),url:h(e.url,`url`,`text`)}):p(e.body),sensitiveBodyPaths:[[`secret`]]});return}let c=e.body===void 0?void 0:p(e.body),u=await t(e),d=e.local?a:await i();if(e.accountId=d,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>u.send(K,{body:t,account_id:d,webhook_id:e[`webhook-id`]}));o(n,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await l(`name`,`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`)),e.url===void 0&&(e.url=await l(`url`,`The POST endpoint to call when dispatching a notification.`));let f=m({name:h(e.name,`name`,`text`),secret:h(e.secret,`secret`,`text`),url:h(e.url,`url`,`text`)}),g=await s(`Updating`,async()=>u.send(K,{body:f,account_id:d,webhook_id:e[`webhook-id`]}));o(g,{successLabel:`Updated`})})},Y={command:`webhooks`,describe:`Operations for destinations.webhooks`,builder:e=>e.command(I).command(z).command(H).command(G).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ae={command:`destinations`,describe:`Operations for destinations`,builder:e=>e.command(ie).command(N).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oe={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/history`,query:[`per_page`,`before`,`page`,`since`]};function se(e){return e.usage(`$0 alerting history list
22
+ Gets a list of all configured webhook destinations.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`List webhooks`,builder:W,handler:async e=>c({command:`alerting destinations webhooks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();n({command:`cf alerting destinations webhooks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/destinations/webhooks`,pathParams:{},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(U,{account_id:l}));o(u,{successLabel:`Loaded`})})};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/webhooks/${t.webhook_id}`,body:`json`};function q(e){return e.usage("$0 alerting destinations webhooks update <webhook-id>\n\nUpdate a webhook destination. Only `name` can be updated. `url` and `secret` are immutable; to change them, delete the webhook and create a new one.").positional(`webhook-id`,{type:`string`,description:`The unique identifier of a webhook`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const J={command:`update <webhook-id>`,describe:`Update a webhook`,builder:q,handler:async e=>c({command:`alerting destinations webhooks update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf alerting destinations webhooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/destinations/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({name:h(e.name,`name`,`text`)}):p(e.body)});return}let c=e.body===void 0?void 0:p(e.body),u=await t(e),d=e.local?a:await i();if(e.accountId=d,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>u.send(K,{body:t,account_id:d,webhook_id:e[`webhook-id`]}));o(n,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await l(`name`,`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`));let f=m({name:h(e.name,`name`,`text`)}),g=await s(`Updating`,async()=>u.send(K,{body:f,account_id:d,webhook_id:e[`webhook-id`]}));o(g,{successLabel:`Updated`})})},Y={command:`webhooks`,describe:`Operations for destinations.webhooks`,builder:e=>e.command(I).command(z).command(H).command(G).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ae={command:`destinations`,describe:`Operations for destinations`,builder:e=>e.command(ie).command(N).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oe={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/history`,query:[`per_page`,`before`,`page`,`since`]};function se(e){return e.usage(`$0 alerting history list
25
23
 
26
24
  Gets a list of history records for notifications sent to an account. The records are displayed for last \`x\` number of days based on the zone plan (free = 30, pro = 30, biz = 30, ent = 90).`).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`before`,{type:`string`,description:`Limit the returned results to history records older than the specified date. This must be a timestamp that conforms to RFC3339.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`since`,{type:`string`,description:`Limit the returned results to history records newer than the specified date. This must be a timestamp that conforms to RFC3339.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`List History`,builder:se,handler:async e=>c({command:`alerting history list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={per_page:e[`per-page`],before:e.before,page:e.page,since:e.since};if(e.dryRun){let e=await r();n({command:`cf alerting history list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/history`,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(oe,{account_id:u,...c}));o(d,{successLabel:`Loaded`})})},le={command:`history`,describe:`Operations for history`,builder:e=>e.command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/alerting/v3/policies`,body:`json`};function ue(e){return e.usage(`$0 alerting policies create
27
25
 
@@ -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"./output-PRKYaJuo.mjs";import{t as s}from"./progress-AML-AVs4.mjs";import"./telemetry-DDs3zhdw.mjs";import{t as c}from"./run-DAg7dfIW.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{t as p}from"./local-B3zt9PXR.mjs";import{a as m}from"./prompt-Bnon9lfK.mjs";var h={method:`GET`,path:t=>e`/zones/${t.zone_id}/analytics/latency/colos`};function g(e){return e.usage(`$0 analytics latency colos get
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"./output-PRKYaJuo.mjs";import{t as s}from"./progress-DItBn6ZV.mjs";import"./telemetry-B3S5OfOn.mjs";import{t as c}from"./run-DAK_kbUa.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{t as p}from"./local-B3zt9PXR.mjs";import{a as m}from"./prompt-BGz3DNLz.mjs";var h={method:`GET`,path:t=>e`/zones/${t.zone_id}/analytics/latency/colos`};function g(e){return e.usage(`$0 analytics latency colos get
3
3
 
4
4
  Retrieves Argo Smart Routing analytics broken down by geographic points of presence (PoPs). Shows latency improvements and routing efficiency per location.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get`,describe:`Argo Analytics for a zone at different PoPs`,builder:g,handler:async e=>c({command:`analytics latency colos get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){n({command:`cf analytics latency colos get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/analytics/latency/colos`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let r=await t(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let c=await s(`Loading`,async()=>r.send(h,{zone_id:a}));o(c,{successLabel:`Loaded`})})},v={command:`colos`,describe:`Operations for latency.colos`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`GET`,path:t=>e`/zones/${t.zone_id}/analytics/latency`,query:[`bins`]};function b(e){return e.usage(`$0 analytics latency get
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,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{n as a,t as o}from"./input-validation-D7z60HJH.mjs";import{t as s}from"./local-B3zt9PXR.mjs";import{t as c}from"./output-PRKYaJuo.mjs";import{t as l}from"./run-DAg7dfIW.mjs";import{t as u}from"./progress-AML-AVs4.mjs";import"./telemetry-DDs3zhdw.mjs";function d(e){return e.usage(`$0 analytics-engine sql query
2
+ import{i as e,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{n as a,t as o}from"./input-validation-D7z60HJH.mjs";import{t as s}from"./local-B3zt9PXR.mjs";import{t as c}from"./output-PRKYaJuo.mjs";import{t as l}from"./run-DAK_kbUa.mjs";import{t as u}from"./progress-DItBn6ZV.mjs";import"./telemetry-B3S5OfOn.mjs";function d(e){return e.usage(`$0 analytics-engine sql query
3
3
 
4
4
  Executes a SQL query against Workers Analytics Engine data. Pass the SQL query in the request body as plain text. The response uses newline-delimited JSON (NDJSON) by default, or a single JSON object when the query includes a FORMAT JSON clause. Prefer this method for longer queries that may exceed URL length limits.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Plain-text request body (without JSON quotes)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const f={command:`query`,describe:`Execute an Analytics Engine SQL query via request body`,builder:d,handler:async d=>l({command:`analytics-engine sql query`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){let e=await r();n({command:`cf analytics-engine sql query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/analytics_engine/sql`,pathParams:{},bodyKind:`octet-stream`,body:d.file===void 0?d.body:{file:d.file}});return}if(d.body===void 0&&d.file===void 0)throw Error(`--body or --file is required for this command. Pass --body '<value>' or --file path/to/file.`);let l=d.file===void 0?a(d.body,`body`,`binary`):void 0,f=await t(d),p=d.local?s:await i();if(d.accountId=p,d.file!==void 0){let t=o(d.file),n=await u(`Loading`,async()=>e(f,`POST`,`/accounts/${p}/analytics_engine/sql`,{body:t,headers:{"Content-Type":`text/plain`}}));c(n,{successLabel:`Loaded`})}else if(d.body!==void 0){let t=l,n=await u(`Loading`,async()=>e(f,`POST`,`/accounts/${p}/analytics_engine/sql`,{body:t,headers:{"Content-Type":`text/plain`}}));c(n,{successLabel:`Loaded`})}})},p={command:`sql`,describe:`Operations for sql`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},m={command:`analytics-engine`,describe:`analytics-engine`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m 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{i as t,n}from"./auth-cj71dGxS.mjs";import{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"./output-PRKYaJuo.mjs";import{t as f}from"./run-DAg7dfIW.mjs";import{t as p}from"./progress-AML-AVs4.mjs";import{a as m,i as h,n as g}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";import{t as _}from"./local-B3zt9PXR.mjs";var v={method:`POST`,path:t=>e`/zones/${t.zone_id}/schema_validation/schemas`,body:`json`,constants:{kind:`openapi_v3`}};function ee(e){return e.usage(`$0 api-security schema-validation schemas 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{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"./output-PRKYaJuo.mjs";import{t as f}from"./run-DAK_kbUa.mjs";import{t as p}from"./progress-DItBn6ZV.mjs";import{a as m,i as h,n as g}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";import{t as _}from"./local-B3zt9PXR.mjs";var v={method:`POST`,path:t=>e`/zones/${t.zone_id}/schema_validation/schemas`,body:`json`,constants:{kind:`openapi_v3`}};function ee(e){return e.usage(`$0 api-security schema-validation schemas create
3
3
 
4
4
  Uploads an OpenAPI schema that defines expected request formats for API operations.`).option(`kind`,{type:`string`,description:`The kind of the schema`,choices:[`openapi_v3`]}).coerce(`kind`,e=>u(e,`kind`,`text`)).option(`name`,{type:`string`,description:`A human-readable name for the schema`}).option(`source`,{type:`string`,description:`The raw schema, e.g., the OpenAPI schema, either as JSON or YAML`}).option(`validation-enabled`,{type:`boolean`,description:`An indicator if this schema is enabled`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`create`,describe:`Upload a schema`,builder:ee,handler:async e=>f({command:`api-security schema-validation schemas create`,classification:{safeFlags:[`kind`,`validation-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf api-security schema-validation schemas create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/schema_validation/schemas`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?a({kind:e.kind,name:u(e.name,`name`,`text`),source:u(e.source,`source`,`text`),validation_enabled:e[`validation-enabled`]}):i(e.body)});return}let t=e.body===void 0?void 0:i(e.body),r=await n(e),o=await s({zone:e.zone},r,{quiet:e.quiet});if(e.zoneId=o,e.body!==void 0){let e=t,n=await p(`Creating`,async()=>r.send(v,{body:e,zone_id:o}));d(n,{successLabel:`Created`});return}if(e.kind===void 0&&(e.kind=await h(`kind`,`The kind of the schema`,[`openapi_v3`])),e.name===void 0&&(e.name=await m(`name`,`A human-readable name for the schema`)),e.source===void 0&&(e.source=await m(`source`,`The raw schema, e.g., the OpenAPI schema, either as JSON or YAML`)),e[`validation-enabled`]===void 0)throw Error(`--validation-enabled is required (or pass --body with this field set).`);let c=a({kind:e.kind,name:u(e.name,`name`,`text`),source:u(e.source,`source`,`text`),validation_enabled:e[`validation-enabled`]}),f=await p(`Creating`,async()=>r.send(v,{body:c,zone_id:o}));d(f,{successLabel:`Created`})})};var te={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/schema_validation/schemas/${t.schema_id}`};function ne(e){return e.usage(`$0 api-security schema-validation schemas delete <schema-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{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{r as u,t as d}from"./body-parser-HN91kAf0.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{i as p}from"./prompt-Bnon9lfK.mjs";var m={method:`GET`,path:t=>e`/accounts/${t.account_id}/argo/count_zones_enabled`};function h(e){return e.usage(`$0 argo smart-routing count-zones-enabled-for-account
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{r as u,t as d}from"./body-parser-HN91kAf0.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{i as p}from"./prompt-BGz3DNLz.mjs";var m={method:`GET`,path:t=>e`/accounts/${t.account_id}/argo/count_zones_enabled`};function h(e){return e.usage(`$0 argo smart-routing count-zones-enabled-for-account
3
3
 
4
4
  Returns the number of zones that have Argo Smart Routing enabled for the specified account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`count-zones-enabled-for-account`,describe:`Get count of zones with Argo Smart Routing enabled for account`,builder:h,handler:async e=>l({command:`argo smart-routing count-zones-enabled-for-account`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();n({command:`cf argo smart-routing count-zones-enabled-for-account`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/argo/count_zones_enabled`,pathParams:{},bodyKind:`none`});return}let i=await t(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(m,{account_id:l}));s(u,{successLabel:`Loaded`})})};var _={method:`GET`,path:()=>`/user/argo/count_zones_enabled`};function v(e){return e.usage(`$0 argo smart-routing count-zones-enabled-for-user
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";import{n as m,t as h}from"./raw-fetch-0T1SwPa1.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,409:`ConflictError`,500:`InternalServerError`}};function _(e){return e.usage(`$0 artifacts namespaces 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";import{n as m,t as h}from"./raw-fetch-CmI3Ol3q.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,409:`ConflictError`,500:`InternalServerError`}};function _(e){return e.usage(`$0 artifacts namespaces create
3
3
 
4
4
  Creates an empty Artifacts namespace for an account.`).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`unrestricted`,`us`,`eu`,`fedramp`],default:`unrestricted`}).coerce(`jurisdiction`,e=>s(e,`jurisdiction`,`text`)).option(`namespace`,{type:`string`,description:`The namespace 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 v={command:`create`,describe:`Create a namespace`,builder:_,handler:async e=>l({command:`artifacts namespaces create`,classification:{safeFlags:[`jurisdiction`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf artifacts namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/artifacts/namespaces`,pathParams:{},bodyKind:`json`,body:e.body===void 0?r({jurisdiction:e.jurisdiction,namespace:s(e.namespace,`namespace`,`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 e=l,t=await d(`Creating`,async()=>p.send(g,{body:e,account_id:m}));u(t,{successLabel:`Created`});return}e.namespace===void 0&&(e.namespace=await f(`namespace`,`The namespace field`));let h=r({jurisdiction:e.jurisdiction,namespace:s(e.namespace,`namespace`,`text`)}),_=await d(`Creating`,async()=>p.send(g,{body:h,account_id:m}));u(_,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces/${t.namespace}`,response:!1,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function b(e){return e.usage(`$0 artifacts namespaces delete <namespace>
5
5
 
@@ -1,4 +1,4 @@
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";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/audit_logs`,query:[`id`,`export`,`action.type`,`actor.ip`,`actor.email`,`since`,`before`,`zone.name`,`direction`,`per_page`,`page`,`hide_user_logs`]};function u(e){return e.usage(`$0 audit-logs list
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}/audit_logs`,query:[`id`,`export`,`action.type`,`actor.ip`,`actor.email`,`since`,`before`,`zone.name`,`direction`,`per_page`,`page`,`hide_user_logs`]};function u(e){return e.usage(`$0 audit-logs list
3
3
 
4
4
  Gets a list of audit logs for an account. Can be filtered by who made the change, on which zone, and the timeframe of the change.`).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`export`,{type:`boolean`,description:`Indicates that this request is an export of logs in CSV format.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-ip`,{type:`string`,description:`Filters by the IP address of the request that made the change by specific IP address or valid CIDR Range.`}).option(`actor-email`,{type:`string`,description:`Filters by the email address of the actor that made the change.`}).option(`since`,{type:`string`,description:`Since`}).option(`before`,{type:`string`,description:`Before`}).option(`zone-name`,{type:`string`,description:`Filters by the name of the zone associated to the change.`}).option(`direction`,{type:`string`,description:`Changes the direction of the chronological sorting.`,choices:[`desc`,`asc`]}).option(`per-page`,{type:`number`,description:`Sets the number of results to return per page.`}).option(`page`,{type:`number`,description:`Defines which page of results to return.`}).option(`hide-user-logs`,{type:`boolean`,description:`Indicates whether or not to hide user level audit logs.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`list`,describe:`Get account audit logs`,builder:u,handler:async e=>c({command:`audit-logs list`,classification:{safeFlags:[`export`,`direction`,`hide-user-logs`,`dry-run`]}},e,async()=>{let c={id:e.id,export:e.export,"action.type":e[`action-type`],"actor.ip":e[`actor-ip`],"actor.email":e[`actor-email`],since:e.since,before:e.before,"zone.name":e[`zone-name`],direction:e.direction,per_page:e[`per-page`],page:e.page,hide_user_logs:e[`hide-user-logs`]};if(e.dryRun){let e=await r();n({command:`cf audit-logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/audit_logs`,pathParams:{},query:c,bodyKind:`none`});return}let u=await t(e),d=e.local?a:await i();e.accountId=d;let f=await s(`Loading`,async()=>u.send(l,{account_id:d,...c}));o(f,{successLabel:`Loaded`})})},f={command:`audit-logs`,describe:`audit-logs`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f as default};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export{n as createCommandClient}from"./auth-CRq9OQKr.mjs";import"./context-DsVjrTbe.mjs";import"./oauth-NljTb7u9.mjs";import"./auth-token-BEkR6ulS.mjs";
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{J as e,U as t}from"./dist-DwxlJ9Ms.mjs";import{t as n}from"./auth-token-D9MnaZ-L.mjs";import{a as r,n as i}from"./context-DlFhI9cN.mjs";import{l as a}from"./oauth-BUcV_xbm.mjs";import{n as o}from"./request-headers-BEYXy4JN.mjs";import{i as s,r as c,t as l}from"./api-Dnt6lRJG.mjs";const u=6e4;function d(e){return(n,r)=>{if(!process.env.CLOUDFLARE_API_HEADERS)return e(n,r);let i={...r,duplex:`half`},a=new Request(n,i);return t(a.headers),e(a)}}function f(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream}var p={method:`GET`,path:()=>`/accounts`,query:[`name`,`page`,`per_page`,`direction`]},m={method:`GET`,path:()=>`/memberships`,query:[`account.name`,`page`,`per_page`,`order`,`direction`,`name`,`status`]};function h(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream||e instanceof URLSearchParams}function g(e){return Object.keys(e).some(e=>e.toLowerCase()===`content-type`)}async function _(e){let t=e.headers.get(`content-type`)??``;try{return t.includes(`application/json`)?await e.json():await e.text()}catch{return null}}function v(e,t,n){if(n!=null&&n!==``){if(Array.isArray(n))for(let r of n)v(e,t,r);else e.append(t,String(n))}}function y(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))v(t,n,r);return t.toString()}function b(e,t,n){let r=new URL(t.endsWith(`/`)?t:`${t}/`),i=new URL(e.startsWith(`/`)?e.slice(1):e,r);if(i.origin!==r.origin)throw Error(`Refusing to send an authenticated request to ${i.origin} (expected ${r.origin})`);let a=y(n??{});return a&&(i.search=a),i.toString()}const x=/* @__PURE__ */ new WeakMap,S=/* @__PURE__ */ new WeakMap;async function C(e,t,n,r={}){let i=e.baseUrl,a=b(n,i,r.query),o={...r.headers},l;r.body!==void 0&&(h(r.body)||typeof r.body==`string`&&g(o)?l=r.body:(o[`Content-Type`]??=`application/json`,l=JSON.stringify(r.body)));let u=r.timeout===void 0&&f(l)?S.get(e):void 0,d=r.timeout??x.get(e)??6e4,p;try{p=await(u??e).fetch(a,{method:t,headers:o,body:l,signal:r.signal},{timeoutInSeconds:r.timeout===void 0?void 0:r.timeout/1e3,abortSignal:r.signal})}catch(e){throw r.signal?.aborted?Error(`Request aborted`):e===`timeout`||e instanceof Error&&e.name===`AbortError`?Error(u?`Request timed out`:`Request timed out after ${d}ms`):e instanceof Error?Error(`Request failed: ${e.message}`):e}if(!p.ok)throw new s({statusCode:p.status,body:await _(p),rawResponse:{status:p.status,statusText:p.statusText,url:p.url||a,headers:p.headers,redirected:p.redirected,type:p.type}});if(p.status===204)return null;let m=p.headers.get(`content-type`)??``;if(!m.includes(`application/json`)&&r.preserveNonJsonBytes)return Buffer.from(await p.arrayBuffer());let v=await p.text();if(v===``)return null;if(!m.includes(`application/json`))return v;let y=JSON.parse(v);if(y.success===!1){let e=y.errors?.map(e=>e.message).filter(Boolean).join(`, `)||`unknown error`;throw new s({message:`API error: ${e}`,statusCode:p.status,body:y})}return`result`in y?c(y.result,y.result_info):y}function w(e){let t={baseUrl:e.baseURL??`https://api.cloudflare.com/client/v4`,auth:async()=>({headers:{Authorization:`Bearer ${e.apiToken}`}}),headers:e.defaultHeaders,timeoutInSeconds:(e.timeout??6e4)/1e3,maxRetries:0,fetch:e.customApiHeaders===!1?e.fetch??globalThis.fetch:d(e.fetch??globalThis.fetch)},n=new l(t);return x.set(n,e.timeout??6e4),e.timeout===void 0&&S.set(n,new l({...t,timeoutInSeconds:void 0})),n}async function T(t){if(a())return;let s=await r();if(s)return s;try{let r=await n(),a=e({compliance_region:await i()}),s=t-Date.now();if(s<=0)return;let c=w({apiToken:r,baseURL:a,defaultHeaders:o()}),l={timeoutInSeconds:s/1e3,maxRetries:0},[u,d]=await Promise.allSettled([c.send(p,{per_page:50},l),c.send(m,{per_page:50},l)]);if(u.status===`rejected`)return;let f=u.value;if((f.result_info?.total_count??f.result.length)>f.result.length)return;let h=f.result;if(d.status===`fulfilled`){let e=d.value.result??[];if((d.value.result_info?.total_count??e.length)>e.length)return;let t=new Set(e.map(e=>e.account?.id).filter(e=>e!==void 0));h=h.filter(e=>t.has(e.id))}return h.length===1?h[0]?.id:void 0}catch{return}}async function E(t){if(t.dryRun&&a())throw Error(`This command's dry run cannot be used with --temporary-account. Remove --dry-run to run the command for real.`);let r=e({compliance_region:await i()});if(t.local){let{createLocalFetch:e}=await import(`./local-DRxctCh9.mjs`);return w({apiToken:`cf-local-mode-no-auth`,customApiHeaders:!1,baseURL:r,defaultHeaders:o(),fetch:e({persistTo:t.persistTo,apiBaseUrl:r})})}return w({apiToken:await n(),baseURL:r,defaultHeaders:o()})}export{T as a,f as c,C as i,d as l,E as n,m as o,y as r,p as s,w as t,u};
2
+ import{J as e,U as t}from"./dist-BoDdDWjK.mjs";import{t as n}from"./auth-token-BEkR6ulS.mjs";import{a as r,n as i}from"./context-DsVjrTbe.mjs";import{l as a}from"./oauth-NljTb7u9.mjs";import{n as o}from"./request-headers-CUwBDAwI.mjs";import{i as s,r as c,t as l}from"./api-Dnt6lRJG.mjs";const u=6e4;function d(e){return(n,r)=>{if(!process.env.CLOUDFLARE_API_HEADERS)return e(n,r);let i={...r,duplex:`half`},a=new Request(n,i);return t(a.headers),e(a)}}function f(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream}var p={method:`GET`,path:()=>`/accounts`,query:[`name`,`page`,`per_page`,`direction`]},m={method:`GET`,path:()=>`/memberships`,query:[`account.name`,`page`,`per_page`,`order`,`direction`,`name`,`status`]};function h(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream||e instanceof URLSearchParams}function g(e){return Object.keys(e).some(e=>e.toLowerCase()===`content-type`)}async function _(e){let t=e.headers.get(`content-type`)??``;try{return t.includes(`application/json`)?await e.json():await e.text()}catch{return null}}function v(e,t,n){if(n!=null&&n!==``){if(Array.isArray(n))for(let r of n)v(e,t,r);else e.append(t,String(n))}}function y(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))v(t,n,r);return t.toString()}function b(e,t,n){let r=new URL(t.endsWith(`/`)?t:`${t}/`),i=new URL(e.startsWith(`/`)?e.slice(1):e,r);if(i.origin!==r.origin)throw Error(`Refusing to send an authenticated request to ${i.origin} (expected ${r.origin})`);let a=y(n??{});return a&&(i.search=a),i.toString()}const x=/* @__PURE__ */ new WeakMap,S=/* @__PURE__ */ new WeakMap;async function C(e,t,n,r={}){let i=e.baseUrl,a=b(n,i,r.query),o={...r.headers},l;r.body!==void 0&&(h(r.body)||typeof r.body==`string`&&g(o)?l=r.body:(o[`Content-Type`]??=`application/json`,l=JSON.stringify(r.body)));let u=r.timeout===void 0&&f(l)?S.get(e):void 0,d=r.timeout??x.get(e)??6e4,p;try{p=await(u??e).fetch(a,{method:t,headers:o,body:l,signal:r.signal},{timeoutInSeconds:r.timeout===void 0?void 0:r.timeout/1e3,abortSignal:r.signal})}catch(e){throw r.signal?.aborted?Error(`Request aborted`):e===`timeout`||e instanceof Error&&e.name===`AbortError`?Error(u?`Request timed out`:`Request timed out after ${d}ms`):e instanceof Error?Error(`Request failed: ${e.message}`):e}if(!p.ok)throw new s({statusCode:p.status,body:await _(p),rawResponse:{status:p.status,statusText:p.statusText,url:p.url||a,headers:p.headers,redirected:p.redirected,type:p.type}});if(p.status===204)return null;let m=p.headers.get(`content-type`)??``;if(!m.includes(`application/json`)&&r.preserveNonJsonBytes)return Buffer.from(await p.arrayBuffer());let v=await p.text();if(v===``)return null;if(!m.includes(`application/json`))return v;let y=JSON.parse(v);if(y.success===!1){let e=y.errors?.map(e=>e.message).filter(Boolean).join(`, `)||`unknown error`;throw new s({message:`API error: ${e}`,statusCode:p.status,body:y})}return`result`in y?c(y.result,y.result_info):y}function w(e){let t={baseUrl:e.baseURL??`https://api.cloudflare.com/client/v4`,auth:async()=>({headers:{Authorization:`Bearer ${e.apiToken}`}}),headers:e.defaultHeaders,timeoutInSeconds:(e.timeout??6e4)/1e3,maxRetries:0,fetch:e.customApiHeaders===!1?e.fetch??globalThis.fetch:d(e.fetch??globalThis.fetch)},n=new l(t);return x.set(n,e.timeout??6e4),e.timeout===void 0&&S.set(n,new l({...t,timeoutInSeconds:void 0})),n}async function T(t){if(a())return;let s=await r();if(s)return s;try{let r=await n(),a=e({compliance_region:await i()}),s=t-Date.now();if(s<=0)return;let c=w({apiToken:r,baseURL:a,defaultHeaders:o()}),l={timeoutInSeconds:s/1e3,maxRetries:0},[u,d]=await Promise.allSettled([c.send(p,{per_page:50},l),c.send(m,{per_page:50},l)]);if(u.status===`rejected`)return;let f=u.value;if((f.result_info?.total_count??f.result.length)>f.result.length)return;let h=f.result;if(d.status===`fulfilled`){let e=d.value.result??[];if((d.value.result_info?.total_count??e.length)>e.length)return;let t=new Set(e.map(e=>e.account?.id).filter(e=>e!==void 0));h=h.filter(e=>t.has(e.id))}return h.length===1?h[0]?.id:void 0}catch{return}}async function E(t){if(t.dryRun&&a())throw Error(`This command's dry run cannot be used with --temporary-account. Remove --dry-run to run the command for real.`);let r=e({compliance_region:await i()});if(t.local){let{createLocalFetch:e}=await import(`./local-DRxctCh9.mjs`);return w({apiToken:`cf-local-mode-no-auth`,customApiHeaders:!1,baseURL:r,defaultHeaders:o(),fetch:e({persistTo:t.persistTo,apiBaseUrl:r})})}return w({apiToken:await n(),baseURL:r,defaultHeaders:o()})}export{T as a,f as c,C as i,d as l,E as n,m as o,y as r,p as s,w as t,u};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BGHWSKCw.mjs";import"./telemetry-DDs3zhdw.mjs";import{a as t,c as n,i as r,n as i,o as a,r as o,s,t as c}from"./login-CS3KxVbk.mjs";import{d as l,f as u,r as d}from"./oauth-BUcV_xbm.mjs";import"./ui-CY75N4Tm.mjs";import{n as f}from"./run-DAg7dfIW.mjs";import{t as p}from"./log-Brx-wjJW.mjs";import{c as m}from"./chunk-Q5KVZMHK-Bjvrcihk.mjs";import{n as h}from"./schema-cache-CTVUtkAl.mjs";import{a as g,i as _,n as v,o as y,r as b,s as x,t as S}from"./whoami-BEad9QUB.mjs";const C={command:`logout`,describe:`Log out and remove stored credentials`,handler:async t=>{r(t,`logout`,"Run `cf auth delete <name>` to remove a named profile.");let n=d();n!=="default"&&p.warn(`This directory has profile "${n}" active. ${e.code(`cf auth logout`)} removes the default profile's token, not "${n}". To delete "${n}", run:`,`cf auth delete ${n}`),await l(`default`)}};function w(e){let t=d();return t==="default"?e?`cf auth login --force`:`cf auth login`:`cf auth create ${t}`}function T(t){let n=t?.statusCode;return n===401||n===403?`your login was rejected; run ${e.code(w(!0))} to log in again`:h(t)}const E={command:`scopes [product]`,describe:`Show the OAuth scopes granted to the current login, by product`,builder:e=>e.positional(`product`,{type:`string`,description:`Show the granted permissions in product areas matching this name, such as dns or developer`}).option(`all`,{type:`boolean`,description:`Show every granted permission, grouped by product`,default:!1}).option(`filter`,{type:`string`,description:`Show the granted permissions whose scope contains this term`}),handler:async t=>{if(t[`temporary-account`]||t[`event-code`]!==void 0)throw Error(`--temporary-account and --event-code are not supported by cf auth scopes.`);if(m({allowGlobalAuthKey:!1})!==void 0){p.warn(`${e.code(`CLOUDFLARE_API_TOKEN`)} is set, so its own permissions apply rather than OAuth scopes.`);return}let n=u();if(n?.oauth_token===void 0){p.info(`Not logged in. Run ${e.code(w(!1))} to log in.`);return}let{scopes:r}=n;if(!r){p.info(`This login didn't record its scopes. Run ${e.code(w(!0))} to log in again.`);return}if(!g(r)){p.info(`No product scopes granted. Run ${e.code(w(!0))} to log in with the default scopes.`);return}let i;try{i=await x(async()=>{let{createCommandClient:e}=await import(`./auth-CXR2vsII.mjs`);return e(t)})}catch(e){p.warn(`Couldn't load Cloudflare's scope catalogue (${T(e)}), so scopes are listed without product groups.`),console.log(r.join(`
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import"./telemetry-B3S5OfOn.mjs";import{a as t,c as n,i as r,n as i,o as a,r as o,s,t as c}from"./login-Csb8Ld0x.mjs";import{d as l,f as u,r as d}from"./oauth-NljTb7u9.mjs";import"./ui-YBIkZLZt.mjs";import{n as f}from"./run-DAK_kbUa.mjs";import{t as p}from"./log-Brx-wjJW.mjs";import{c as m}from"./chunk-Q5KVZMHK-CYhKv3kZ.mjs";import{n as h}from"./schema-cache-BcbUfb3D.mjs";import{a as g,i as _,n as v,o as y,r as b,s as x,t as S}from"./whoami-C4xRnPxf.mjs";const C={command:`logout`,describe:`Log out and remove stored credentials`,handler:async t=>{r(t,`logout`,"Run `cf auth delete <name>` to remove a named profile.");let n=d();n!=="default"&&p.warn(`This directory has profile "${n}" active. ${e.code(`cf auth logout`)} removes the default profile's token, not "${n}". To delete "${n}", run:`,`cf auth delete ${n}`),await l(`default`)}};function w(e){let t=d();return t==="default"?e?`cf auth login --force`:`cf auth login`:`cf auth create ${t}`}function T(t){let n=t?.statusCode;return n===401||n===403?`your login was rejected; run ${e.code(w(!0))} to log in again`:h(t)}const E={command:`scopes [product]`,describe:`Show the OAuth scopes granted to the current login, by product`,builder:e=>e.positional(`product`,{type:`string`,description:`Show the granted permissions in product areas matching this name, such as dns or developer`}).option(`all`,{type:`boolean`,description:`Show every granted permission, grouped by product`,default:!1}).option(`filter`,{type:`string`,description:`Show the granted permissions whose scope contains this term`}),handler:async t=>{if(t[`temporary-account`]||t[`event-code`]!==void 0)throw Error(`--temporary-account and --event-code are not supported by cf auth scopes.`);if(m({allowGlobalAuthKey:!1})!==void 0){p.warn(`${e.code(`CLOUDFLARE_API_TOKEN`)} is set, so its own permissions apply rather than OAuth scopes.`);return}let n=u();if(n?.oauth_token===void 0){p.info(`Not logged in. Run ${e.code(w(!1))} to log in.`);return}let{scopes:r}=n;if(!r){p.info(`This login didn't record its scopes. Run ${e.code(w(!0))} to log in again.`);return}if(!g(r)){p.info(`No product scopes granted. Run ${e.code(w(!0))} to log in with the default scopes.`);return}let i;try{i=await x(async()=>{let{createCommandClient:e}=await import(`./auth-Byb5Y3o4.mjs`);return e(t)})}catch(e){p.warn(`Couldn't load Cloudflare's scope catalogue (${T(e)}), so scopes are listed without product groups.`),console.log(r.join(`
3
3
  `));return}if(t.product===void 0&&!t.all&&t.filter===void 0){console.log(_(r,i)),p.info(`Run ${e.code(`cf auth scopes <product>`)} to see a product's permissions, or ${e.code(`cf auth scopes --all`)} for every granted product.`);return}let{product:a}=t;a!==void 0&&!v(i).some(e=>y(e,a))?p.info(`No product area matches "${a}". Run ${e.code(`cf auth scopes --filter ${a}`)} to search scope names instead.`):console.log(b(r,i,{product:t.product,filter:t.filter})||e.muted(`No granted scopes match.`))}},D={command:`auth`,describe:`Manage authentication and profiles`,builder:e=>e.command(f(c,{command:`auth login`,classification:i})).command(O(C,`auth logout`)).command(O(S,`auth whoami`,[`json`])).command(O(E,`auth scopes`,[`all`])).command(O(t,`auth create`,[`browser`,`device`])).command(O(s,`auth delete`)).command(O(o,`auth activate`)).command(O(a,`auth deactivate`)).command(O(n,`auth list`)).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e,t,n=[],r){return f(e,{command:t,classification:{safeFlags:n,shortFlagAliases:r}})}export{D as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{c as e}from"./chunk-Q5KVZMHK-Bjvrcihk.mjs";import{t}from"./errors-CilNjDVk.mjs";import{c as n,l as r,p as i,s as a}from"./oauth-BUcV_xbm.mjs";async function o(o){if(r())return(await i(o)).apiToken;let s=e({allowGlobalAuthKey:!1});if(s&&`apiToken`in s)return s.apiToken;let c=await a();if(c)return c;throw n()?Error(`Could not refresh your stored OAuth token. Check your connection and retry, or run 'cf auth login' to authenticate again.`):new t(`No authentication token found.
2
+ import{c as e}from"./chunk-Q5KVZMHK-CYhKv3kZ.mjs";import{t}from"./errors-CUuKkONZ.mjs";import{c as n,l as r,p as i,s as a}from"./oauth-NljTb7u9.mjs";async function o(o){if(r())return(await i(o)).apiToken;let s=e({allowGlobalAuthKey:!1});if(s&&`apiToken`in s)return s.apiToken;let c=await a();if(c)return c;throw n()?Error(`Could not refresh your stored OAuth token. Check your connection and retry, or run 'cf auth login' to authenticate again.`):new t(`No authentication token found.
3
3
 
4
4
  Please set one of the following:
5
5
  1. Set the CLOUDFLARE_API_TOKEN environment variable