cf 0.9.1 → 0.10.0

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 (262) hide show
  1. package/README.md +5 -0
  2. package/dist/_meta/agent-context.json +34 -35
  3. package/dist/_meta/commands.json +6834 -10044
  4. package/dist/_meta/schemas.json +11228 -12752
  5. package/dist/{abuse-reports-CzDAjFpo.mjs → abuse-reports-CGF4zcKf.mjs} +2 -2
  6. package/dist/{access-CxyW_sIW.mjs → access-lhLJo1v2.mjs} +1 -1
  7. package/dist/{account-Dd4-tDYJ.mjs → account-CYRm3yoN.mjs} +1 -1
  8. package/dist/account-tags-B88TotoH.mjs +9 -0
  9. package/dist/accounts-BSIAT_iP.mjs +28 -0
  10. package/dist/{acm-CHacxa3s.mjs → acm-VULm1djv.mjs} +1 -1
  11. package/dist/{addressing-BnqNmmYN.mjs → addressing-BHPBIkRY.mjs} +1 -1
  12. package/dist/{agent-context-Bu6yvDqA.mjs → agent-context-KBy48G1b.mjs} +1 -1
  13. package/dist/{agent-memory-D--BQS0W.mjs → agent-memory-DDv_Gxr7.mjs} +2 -2
  14. package/dist/{ai-audit-CfpDKXkD.mjs → ai-audit-BWZGvbca.mjs} +1 -1
  15. package/dist/{ai-gateway-oG4j_oYN.mjs → ai-gateway-jeB-sAgP.mjs} +1 -1
  16. package/dist/ai-search-BmdskMjR.mjs +7 -0
  17. package/dist/{ai-security-byjIIrfl.mjs → ai-security-CsmfcaUx.mjs} +1 -1
  18. package/dist/{ai-BnVlQDiI.mjs → ai-viHB1tgI.mjs} +1 -1
  19. package/dist/{alerting-qa8SkXlD.mjs → alerting-Bl8OqViR.mjs} +4 -4
  20. package/dist/analytics-vOxw8Hy0.mjs +3 -0
  21. package/dist/{analytics_engine-BnECMIWJ.mjs → analytics_engine-DO4-C0wD.mjs} +1 -1
  22. package/dist/{api-security-MfHbfZyf.mjs → api-security-4FVrD4n8.mjs} +1 -1
  23. package/dist/argo-CQfCgazW.mjs +2 -0
  24. package/dist/args-DlUhyGU0.mjs +2 -0
  25. package/dist/artifacts-CVDGnr2V.mjs +4 -0
  26. package/dist/{audit-logs-retFtvow.mjs → audit-logs-CzpwvQ6A.mjs} +1 -1
  27. package/dist/{auth-aazs91XL.mjs → auth-D0xZxAEa.mjs} +1 -1
  28. package/dist/{auth-DuLchM18.mjs → auth-MQEamPN9.mjs} +2 -2
  29. package/dist/{billing-CxQVqpGZ.mjs → billing-aJgapeRm.mjs} +2 -2
  30. package/dist/{bot-management-Rli7v7tg.mjs → bot-management-Y2q5d-pi.mjs} +1 -1
  31. package/dist/{botnet-feed-Cw6XSEf8.mjs → botnet-feed-DANJqfmE.mjs} +1 -1
  32. package/dist/{brand-protection-CTvnHGfV.mjs → brand-protection-CjpZWBjp.mjs} +1 -1
  33. package/dist/{browser-extension-q79xHrVW.mjs → browser-extension-BtpCbh-2.mjs} +1 -1
  34. package/dist/browser-run-BFn9h2Tz.mjs +4 -0
  35. package/dist/{build-Dji9BYmV.mjs → build-DcflwvqN.mjs} +1 -1
  36. package/dist/{cache-Cl7vKJwH.mjs → cache-VyWK1SjY.mjs} +1 -1
  37. package/dist/{calls-DtK_ANxq.mjs → calls-BxoRYxs4.mjs} +1 -1
  38. package/dist/{certificate-authorities-DZP1RzAs.mjs → certificate-authorities-D7OAFxF_.mjs} +1 -1
  39. package/dist/{cf-oSz9pud_.mjs → cf-C7DU4819.mjs} +1 -1
  40. package/dist/{chunk-LQW53VED-Xakf_rUn.mjs → chunk-LQW53VED-DLrXV-hE.mjs} +2 -2
  41. package/dist/{client-certificates-BtPU9GsQ.mjs → client-certificates-DDUv8K0a.mjs} +1 -1
  42. package/dist/{client-side-security-DAn-3jwp.mjs → client-side-security-D4ysjwWT.mjs} +1 -1
  43. package/dist/{cloud-connector-BpVcvhjZ.mjs → cloud-connector-Bhec6z2P.mjs} +1 -1
  44. package/dist/cloudforce-one-J_hn9ss9.mjs +36 -0
  45. package/dist/config.mjs +1 -1
  46. package/dist/connector-interrupts-Dycx8zFx.mjs +2 -0
  47. package/dist/{connector-telemetry-events-D5_3X7XW.mjs → connector-telemetry-events-BmxOSNtN.mjs} +1 -1
  48. package/dist/connector-telemetry-events-latest-BY2556uL.mjs +2 -0
  49. package/dist/{connector-telemetry-snapshots-CJ9gLRFR.mjs → connector-telemetry-snapshots-CdcqfKnH.mjs} +1 -1
  50. package/dist/connector-telemetry-snapshots-latest-BHYdxUEF.mjs +2 -0
  51. package/dist/{connectors-Bo6ZT8PT.mjs → connectors-BqxYMMtQ.mjs} +1 -1
  52. package/dist/{containers-Bog7j0Hw.mjs → containers-CKW081JA.mjs} +8 -8
  53. package/dist/{content-scan-D03UfK2X.mjs → content-scan-Dgd7A8KF.mjs} +1 -1
  54. package/dist/{csamScanner-DgS-7ADh.mjs → csamScanner-DYL37wLc.mjs} +1 -1
  55. package/dist/{ct-alerting-8AKtNnUg.mjs → ct-alerting-CkhSbfAs.mjs} +1 -1
  56. package/dist/{custom-certificates-4y35UC1X.mjs → custom-certificates-BzAOnEoT.mjs} +1 -1
  57. package/dist/custom-csrs-CgzG3pd3.mjs +3 -0
  58. package/dist/{custom-hostnames-CDIAnsRa.mjs → custom-hostnames-q_nsnlye.mjs} +4 -4
  59. package/dist/custom-nameservers-BUBmfhUe.mjs +3 -0
  60. package/dist/custom-pages-M7jA2Hit.mjs +3 -0
  61. package/dist/{d1-Cllm-iTT.mjs → d1-BFvMd6-S.mjs} +1 -1
  62. package/dist/{data-security-rnoSCEdL.mjs → data-security-Bji4Or_j.mjs} +2 -2
  63. package/dist/{dcv-delegation-DCRCOL6l.mjs → dcv-delegation-BuoRQ1Yh.mjs} +1 -1
  64. package/dist/{deploy-DGlmjPTS.mjs → deploy-CZ7bgNDu.mjs} +1 -1
  65. package/dist/{deploy-input-DhCo1I0I.mjs → deploy-input-CrvuoDGJ.mjs} +1 -1
  66. package/dist/{dev-BbLV0Ti-.mjs → dev-V10MG-Bg.mjs} +1 -1
  67. package/dist/{diagnostics-D5Yo2xqx.mjs → diagnostics-BTH-8nJH.mjs} +2 -2
  68. package/dist/{directory-CCndFkbQ.mjs → directory-BlH6N6Qy.mjs} +1 -1
  69. package/dist/{dispatch-namespaces-C48JQ9EA.mjs → dispatch-namespaces-BCjH1JzB.mjs} +1 -1
  70. package/dist/{dist-COfwjT96.mjs → dist-CgrMkXFx.mjs} +1 -1
  71. package/dist/{dls-BBq99pjI.mjs → dls-BF5iN78p.mjs} +1 -1
  72. package/dist/{dns-DdQYtenF.mjs → dns-CeCTNqRk.mjs} +11 -11
  73. package/dist/{dns-firewall-DdwVtm12.mjs → dns-firewall-B54MaLGm.mjs} +1 -1
  74. package/dist/{dot-prop-6SRZBKHT-C_xd7eTS.mjs → dot-prop-6SRZBKHT-wIVDg_fl.mjs} +1 -1
  75. package/dist/{durable-objects-BvxXBht_.mjs → durable-objects-D8FQORrL.mjs} +1 -1
  76. package/dist/{email-auth-DFvXKSkg.mjs → email-auth-DJK0Eb30.mjs} +1 -1
  77. package/dist/email-routing-NpmiKIrl.mjs +6 -0
  78. package/dist/{email-security-BFagcRPP.mjs → email-security-BLZ7WZ9Z.mjs} +2 -2
  79. package/dist/email-sending-dn-353Nx.mjs +7 -0
  80. package/dist/fieldExtractors-ahysj57J.mjs +3 -0
  81. package/dist/firewall-CBPGJ43p.mjs +11 -0
  82. package/dist/{flagship-FJHc4mFi.mjs → flagship-BusjRNIb.mjs} +3 -3
  83. package/dist/{fraud-AH47n-wL.mjs → fraud-BIhS8pLf.mjs} +1 -1
  84. package/dist/{google-tag-gateway-149kbuG_.mjs → google-tag-gateway-TZZ3F1tV.mjs} +1 -1
  85. package/dist/{healthchecks-DfEUG007.mjs → healthchecks-FiXIk-KP.mjs} +2 -2
  86. package/dist/{hostnames-DQUiD3Vr.mjs → hostnames-Bx0mykMR.mjs} +1 -1
  87. package/dist/{hyperdrive-RyQboMWI.mjs → hyperdrive-C8qCabBF.mjs} +1 -1
  88. package/dist/{iam-BhHYhMXO.mjs → iam-Cj63Kjc6.mjs} +1 -1
  89. package/dist/{images-CDViyKtZ.mjs → images-CBWXCDhy.mjs} +1 -1
  90. package/dist/index.mjs +1 -1
  91. package/dist/{intel-YHZbPlS3.mjs → intel-B-9Z_sJs.mjs} +2 -2
  92. package/dist/{interactive-mV8PABm6.mjs → interactive-DtsCYfrK.mjs} +1 -1
  93. package/dist/{ips-BpCdldFx.mjs → ips-qs9eGJnI.mjs} +1 -1
  94. package/dist/{keyless-certificates-oNu5jWKF.mjs → keyless-certificates-THHvoXX3.mjs} +1 -1
  95. package/dist/{keys-yYtv7Ztr.mjs → keys-D7N0j4-x.mjs} +1 -1
  96. package/dist/{kv-Bi9B4E0A.mjs → kv-BFDUCnft.mjs} +1 -1
  97. package/dist/{leaked-credential-checks-DKRjBLcr.mjs → leaked-credential-checks-DUlUCOoJ.mjs} +1 -1
  98. package/dist/load-balancers-D2zbQ8fT.mjs +6 -0
  99. package/dist/{local-DTyuGwTw.mjs → local-D-aVNu6A.mjs} +1 -1
  100. package/dist/{local-runtime-IAXhEugU.mjs → local-runtime-Dh3keC5v.mjs} +1 -1
  101. package/dist/logexplorer-CUsfZ_bS.mjs +13 -0
  102. package/dist/{logo-matches-LyDAYPbI.mjs → logo-matches-CJcthPHf.mjs} +1 -1
  103. package/dist/{logos-O9f5bGSB.mjs → logos-BS65zN8q.mjs} +1 -1
  104. package/dist/logpush-BK34mMQs.mjs +4 -0
  105. package/dist/{logs-DmWWL5f9.mjs → logs-CLAqX9h2.mjs} +1 -1
  106. package/dist/{magic-cloud-networking-XbTa6P52.mjs → magic-cloud-networking-h_ozrC5S.mjs} +1 -1
  107. package/dist/magic-network-monitoring-C7tAPNKP.mjs +4 -0
  108. package/dist/{magic-transit-DwgZeIj-.mjs → magic-transit-BtsFePMx.mjs} +5 -5
  109. package/dist/{managed-transforms-DCmogkxv.mjs → managed-transforms-Cm_KVCMB.mjs} +1 -1
  110. package/dist/{matches-BAeN8VM1.mjs → matches-InA1hwII.mjs} +1 -1
  111. package/dist/{mcp-DKZ2D050.mjs → mcp-mJ7bekNJ.mjs} +1 -1
  112. package/dist/mesh-BK4S1Ezy.mjs +4 -0
  113. package/dist/{moq-CJpE-eNj.mjs → moq-qmuVPAO0.mjs} +1 -1
  114. package/dist/{mtls-certificates-Bbm_1lQI.mjs → mtls-certificates-CU4OAAXY.mjs} +1 -1
  115. package/dist/{network-D2WRXCDe.mjs → network-D74cSy3t.mjs} +1 -1
  116. package/dist/{network-interconnects-Clq4X1U8.mjs → network-interconnects-BJ0Nc48J.mjs} +1 -1
  117. package/dist/{oauth-BPizUUqP.mjs → oauth-B0ETkNcX.mjs} +2 -2
  118. package/dist/{oauth-clients-hilWfAlm.mjs → oauth-clients-Br-smLxQ.mjs} +1 -1
  119. package/dist/{oauth-scopes-CmbgsPYd.mjs → oauth-scopes-D5bF11ju.mjs} +1 -1
  120. package/dist/observability-BWE0Gg3V.mjs +4 -0
  121. package/dist/{open-PBXRGS4R-C46yIm3u.mjs → open-PBXRGS4R-R-qesf18.mjs} +1 -1
  122. package/dist/{organization-D41rIvJa.mjs → organization-NX7yCZrq.mjs} +1 -1
  123. package/dist/{organizations-eNzfOwlP.mjs → organizations-DLhiRt8g.mjs} +1 -1
  124. package/dist/{origin-ca-certificates-DaiAmw45.mjs → origin-ca-certificates-Ff4McZRQ.mjs} +1 -1
  125. package/dist/{origin-post-quantum-encryption-7YztBged.mjs → origin-post-quantum-encryption-UuTr4_SW.mjs} +1 -1
  126. package/dist/{origin-tls-client-auth-DRwURM8s.mjs → origin-tls-client-auth-DOJ1zlH3.mjs} +1 -1
  127. package/dist/{output-DgW1hQGX.mjs → output-DrpYYfnB.mjs} +1 -1
  128. package/dist/{page-rules-B2Csdc4h.mjs → page-rules-BSz1gO-_.mjs} +1 -1
  129. package/dist/{pages-BAL6Q7OY.mjs → pages-DVDogxPs.mjs} +4 -4
  130. package/dist/{pay-per-crawl-C-1-ZAtn.mjs → pay-per-crawl-BrLXK7gT.mjs} +1 -1
  131. package/dist/{pipelines-cyQOuFLb.mjs → pipelines-BszRk4sM.mjs} +2 -2
  132. package/dist/{precursor-BrweY39h.mjs → precursor-BPNjQr76.mjs} +1 -1
  133. package/dist/progress-CsHIt3Tp.mjs +2 -0
  134. package/dist/{prompt-CDtLWxNv.mjs → prompt-DdegNPpg.mjs} +1 -1
  135. package/dist/{queries-oM8uGZy5.mjs → queries-JL1H1Biz.mjs} +1 -1
  136. package/dist/{queues-CTx04ZNw.mjs → queues-DpkYdRUE.mjs} +1 -1
  137. package/dist/{r2-CnlIUn7R.mjs → r2-CKozthw_.mjs} +4 -4
  138. package/dist/{r2-data-catalog-DLtf9d6o.mjs → r2-data-catalog-Du7hN9jA.mjs} +1 -1
  139. package/dist/radar-C-92vggG.mjs +2 -0
  140. package/dist/{rate-limits-B1YjnGue.mjs → rate-limits-yBF3qoYD.mjs} +1 -1
  141. package/dist/{raw-fetch-Dz-QBoP_.mjs → raw-fetch-CteyTOM2.mjs} +1 -1
  142. package/dist/realtimekit-CIP7lP-a.mjs +7 -0
  143. package/dist/{registrar-BEcb90RX.mjs → registrar-DKKN0M29.mjs} +3 -3
  144. package/dist/{registrar-sandbox-0i1T3zne.mjs → registrar-sandbox-DiXg8p_1.mjs} +3 -3
  145. package/dist/{registry-DDcSvd8H.mjs → registry-Bck_zFkz.mjs} +1 -1
  146. package/dist/{reporting-CLbjHlnw.mjs → reporting-fg_GKXe1.mjs} +1 -1
  147. package/dist/{request-tracers-BcKpofP1.mjs → request-tracers-CkMya96z.mjs} +1 -1
  148. package/dist/{resource-sharing-Ctdi9D-j.mjs → resource-sharing-D1pSDvtf.mjs} +1 -1
  149. package/dist/{resource-tagging-DGEyVTDN.mjs → resource-tagging-z48JGHCq.mjs} +1 -1
  150. package/dist/{rules-CmuB5rIN.mjs → rules-BTmNjDN-.mjs} +1 -1
  151. package/dist/rulesets-CsoSM-17.mjs +5 -0
  152. package/dist/{rum-QT6EP4JK.mjs → rum-DB4iO2q5.mjs} +1 -1
  153. package/dist/{schema-BeXPWeK9.mjs → schema-B34Q9tLF.mjs} +1 -1
  154. package/dist/{schema-flags-DHryz6SF.mjs → schema-flags-iGoOriJt.mjs} +1 -1
  155. package/dist/{scim-BgGsmHrL.mjs → scim-CcSyfKCH.mjs} +1 -1
  156. package/dist/sdk-ZctLa5jW.mjs +3 -0
  157. package/dist/{secrets-store-BCpFhYFv.mjs → secrets-store-DFmvtphu.mjs} +1 -1
  158. package/dist/security-center-DFKeHq5c.mjs +2 -0
  159. package/dist/{security-txt-Be2Bif0z.mjs → security-txt-DqnFpjMI.mjs} +1 -1
  160. package/dist/{session-Ckt20hHa.mjs → session-D6KHthHf.mjs} +1 -1
  161. package/dist/{share-Bz2tFTUP.mjs → share-BuwYUzOL.mjs} +1 -1
  162. package/dist/{shared-BzPQog8H.mjs → shared-VppSAQf4.mjs} +1 -1
  163. package/dist/{smart-shield-SODkOUyO.mjs → smart-shield-D6X8L7p8.mjs} +2 -2
  164. package/dist/{snippets-B5jY8v_7.mjs → snippets-DIpc9pb_.mjs} +1 -1
  165. package/dist/{spawn-CHkoow5W.mjs → spawn-O1RS01vr.mjs} +2 -2
  166. package/dist/{spectrum-BA0a42eM.mjs → spectrum-b7N1ZRAm.mjs} +1 -1
  167. package/dist/{speed-mmOjxOzo.mjs → speed-cw31yFva.mjs} +1 -1
  168. package/dist/src-D_HETJNy.mjs +108 -0
  169. package/dist/{ssl-Yr6kELqg.mjs → ssl-CsEhRVTO.mjs} +1 -1
  170. package/dist/{state-DZC531l2.mjs → state-Bb5Cbc_L.mjs} +1 -1
  171. package/dist/{stream-Cu0kYWbc.mjs → stream-DFOao6Gu.mjs} +3 -3
  172. package/dist/{submit-Dl_27e0n.mjs → submit--xTzyNPy.mjs} +1 -1
  173. package/dist/{tags-Cdo_Pwtr.mjs → tags-efICDkah.mjs} +1 -1
  174. package/dist/{tenant-EX-ANl6X.mjs → tenant-CerHuToJ.mjs} +1 -1
  175. package/dist/{tenant-custom-nameservers-BPHUeckw.mjs → tenant-custom-nameservers-C4otMBm2.mjs} +1 -1
  176. package/dist/{tools-D2Xxfkrc.mjs → tools-BHfBOZOU.mjs} +1 -1
  177. package/dist/{triggers-Bf9hbP3h.mjs → triggers-BEsiiKAf.mjs} +1 -1
  178. package/dist/{tunnel-CDYkWjnt.mjs → tunnel-DkMiNtVY.mjs} +1 -1
  179. package/dist/{tunnels-CgyX8R2J.mjs → tunnels-D0J8lJoI.mjs} +1 -1
  180. package/dist/{turnstile-BUtzlW-0.mjs → turnstile-CFmtY5bn.mjs} +2 -2
  181. package/dist/{ui-DIpjthrV.mjs → ui-DE8CNn6c.mjs} +1 -1
  182. package/dist/{url-info-CJsa1Oc9.mjs → url-info-DBCeRWwb.mjs} +1 -1
  183. package/dist/{url-normalization-BeKkOZz7.mjs → url-normalization-ClfFiruK.mjs} +1 -1
  184. package/dist/{url-scanner-Cz-yl0_3.mjs → url-scanner-CNyvg65L.mjs} +1 -1
  185. package/dist/{user-BxHjEqpd.mjs → user-bifVEQq5.mjs} +2 -2
  186. package/dist/{values-C43NurfT.mjs → values-OxkdP1tV.mjs} +1 -1
  187. package/dist/{vectorize-CjXfiFH4.mjs → vectorize-CVKu7lEt.mjs} +1 -1
  188. package/dist/{versions-BFbc90Wu.mjs → versions-BVL-Ludh.mjs} +1 -1
  189. package/dist/waiting-rooms-CmRAl51T.mjs +11 -0
  190. package/dist/{web-assets-BzM5vVzy.mjs → web-assets-C2s9kzWf.mjs} +1 -1
  191. package/dist/{web3-Ctv9HGiR.mjs → web3-y_cY91V_.mjs} +1 -1
  192. package/dist/{workers-builds-B44wc67O.mjs → workers-builds-B55-oXOa.mjs} +4 -4
  193. package/dist/{workers-D-YbIedB.mjs → workers-jDcq14GH.mjs} +6 -6
  194. package/dist/{workflows-rFuQWClt.mjs → workflows-B-kGHxFu.mjs} +2 -2
  195. package/dist/{zaraz-BA6kY-b6.mjs → zaraz-27zwjLvv.mjs} +1 -1
  196. package/dist/zero-trust-DV3sIOvu.mjs +92 -0
  197. package/dist/{zone-B_rgejLV.mjs → zone-BJix2KQ9.mjs} +1 -1
  198. package/dist/{zones-DTWO7Vvn.mjs → zones-Bkj5i92c.mjs} +1 -1
  199. package/package.json +1 -1
  200. package/dist/account-tags-65fAlHrf.mjs +0 -9
  201. package/dist/accounts-Bp5KGc6r.mjs +0 -28
  202. package/dist/ai-search-B2l3B_jn.mjs +0 -7
  203. package/dist/analytics-DeIKjC9n.mjs +0 -3
  204. package/dist/argo-DFerMyXF.mjs +0 -2
  205. package/dist/artifacts-CtyEYYDa.mjs +0 -4
  206. package/dist/browser-run-FwtwnBzA.mjs +0 -4
  207. package/dist/cloudforce-one-2PecncfX.mjs +0 -30
  208. package/dist/connector-interrupts-ollUcksZ.mjs +0 -2
  209. package/dist/custom-csrs-DwBrLh-H.mjs +0 -4
  210. package/dist/custom-nameservers-stk7ymnP.mjs +0 -3
  211. package/dist/custom-pages-vfDxrXbt.mjs +0 -4
  212. package/dist/email-CGOC_evd.mjs +0 -2
  213. package/dist/email-routing-QBRPBlyl.mjs +0 -6
  214. package/dist/email-sending-Ddhe7xjN.mjs +0 -7
  215. package/dist/filters-CGisPGD1.mjs +0 -4
  216. package/dist/firewall-DD8U-Brd.mjs +0 -11
  217. package/dist/load-balancers-jRCN75mX.mjs +0 -7
  218. package/dist/logexplorer-kO8CULiK.mjs +0 -24
  219. package/dist/logpush-dtXLu3Ck.mjs +0 -5
  220. package/dist/magic-network-monitoring-CpfkgZMp.mjs +0 -4
  221. package/dist/media-CnxgOViL.mjs +0 -2
  222. package/dist/mesh-CzIPtuaM.mjs +0 -4
  223. package/dist/observability-DXYgDdU5.mjs +0 -4
  224. package/dist/progress-B84wYh91.mjs +0 -2
  225. package/dist/radar-CGNgGh8v.mjs +0 -2
  226. package/dist/realtimekit-BPwzhNS9.mjs +0 -7
  227. package/dist/rulesets-CGaMq8vG.mjs +0 -8
  228. package/dist/sdk-m4xeaua4.mjs +0 -3
  229. package/dist/security-center-BNm4uPVB.mjs +0 -2
  230. package/dist/src-CHW7s5IS.mjs +0 -108
  231. package/dist/waiting-rooms-C5jSQv_r.mjs +0 -11
  232. package/dist/zero-trust-DOFLlUz1.mjs +0 -102
  233. package/dist/zone-tags-BWdza4rH.mjs +0 -9
  234. /package/dist/{Page-C-JHZnIy.mjs → Page-9ry_XAVC.mjs} +0 -0
  235. /package/dist/{alerts-B85uj2Vx.mjs → alerts-CRmjqOZi.mjs} +0 -0
  236. /package/dist/{autorag-Do9l_LyY.mjs → autorag-BD7cu5NU.mjs} +0 -0
  237. /package/dist/{body-parser-CYD7PKFC.mjs → body-parser-C-c9gfH1.mjs} +0 -0
  238. /package/dist/{brands-DateHCdd.mjs → brands-BhALBkX2.mjs} +0 -0
  239. /package/dist/{chunk-6EUZQHAF-l8tR2Qyj.mjs → chunk-6EUZQHAF-B7bSMYLe.mjs} +0 -0
  240. /package/dist/{chunk-Q72B4Q5Z-CPy_WJKU.mjs → chunk-Q72B4Q5Z-DVMMVVEs.mjs} +0 -0
  241. /package/dist/{clear-CB2kgcEB.mjs → clear-BgF8No7D.mjs} +0 -0
  242. /package/dist/{cli-types-BWdZbsFE.mjs → cli-types-BsTty22w.mjs} +0 -0
  243. /package/dist/{domain-info-DJHEt8JJ.mjs → domain-info-C50W5GhA.mjs} +0 -0
  244. /package/dist/{health-buY5f5pp.mjs → health-BFNZqiAm.mjs} +0 -0
  245. /package/dist/{input-validation-BBKJRoRB.mjs → input-validation-Bav2M9F-.mjs} +0 -0
  246. /package/dist/{internal-CwyoJUHh.mjs → internal-BTeSewwB.mjs} +0 -0
  247. /package/dist/{live-wEpA5V_n.mjs → live-Dkiyu30_.mjs} +0 -0
  248. /package/dist/{public-BwQqexwo-DbWj8rrr.mjs → public-BwQqexwo-CNW_dPly.mjs} +0 -0
  249. /package/dist/{rate-limit-analytics-Bf1uT0lT.mjs → rate-limit-analytics-Dz-Wv1T0.mjs} +0 -0
  250. /package/dist/{ready-CBSCPiHE.mjs → ready-TKOkKeRg.mjs} +0 -0
  251. /package/dist/{recent-submissions-Dpmq1f7z.mjs → recent-submissions-3Asm6eIi.mjs} +0 -0
  252. /package/dist/{refute-u7ZPQJZy.mjs → refute-BVz9nMyd.mjs} +0 -0
  253. /package/dist/{resolve-XgxRJ-Ys.mjs → resolve-CeBbH6Pq.mjs} +0 -0
  254. /package/dist/{scan-logo-Ba8WZAyp.mjs → scan-logo-ZteA-PUV.mjs} +0 -0
  255. /package/dist/{scan-page-Bcq3Ei86.mjs → scan-page-DWDSyzQ7.mjs} +0 -0
  256. /package/dist/{search-D9WDwnV4.mjs → search-DGNc37HK.mjs} +0 -0
  257. /package/dist/{signed-url-CjPbG5zV.mjs → signed-url-B5Qpn2mn.mjs} +0 -0
  258. /package/dist/{submission-info-Z9hhp9Rq.mjs → submission-info-FjUolE6A.mjs} +0 -0
  259. /package/dist/{theme-BePJemMn.mjs → theme-CeVf-5qG.mjs} +0 -0
  260. /package/dist/{total-queries-aKAYX1iX.mjs → total-queries-NHJj1HGq.mjs} +0 -0
  261. /package/dist/{tracked-domains-Ck7Jm4Kn.mjs → tracked-domains-CniKVHIp.mjs} +0 -0
  262. /package/dist/{verify-2yi0H93r.mjs → verify-DS1PWAJe.mjs} +0 -0
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n,h as r}from"./oauth-BPizUUqP.mjs";import{a as i,r as a}from"./auth-DuLchM18.mjs";import{t as o}from"./output-DgW1hQGX.mjs";import{n as s,t as c}from"./progress-B84wYh91.mjs";import{n as l,t as u}from"./body-parser-CYD7PKFC.mjs";import{n as d,t as f}from"./input-validation-BBKJRoRB.mjs";import{a as p,n as m}from"./prompt-CDtLWxNv.mjs";import{t as h}from"./cli-types-BWdZbsFE.mjs";import{n as ee,t as te}from"./raw-fetch-Dz-QBoP_.mjs";function g(e){return e.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 _={command:`get <asn>`,describe:`Gets an overview of the Autonomous System Number (ASN) and a list of subnets for it.`,builder:g,handler:async r=>{if(r.dryRun){s({command:`cf intel asn get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/asn/${r.asn==null?`<asn>`:encodeURIComponent(String(r.asn))}`,pathParams:{asn:String(r.asn??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.asn.get({account_id:l,asn:r.asn})),{successLabel:`Loaded`})}};function v(e){return e.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 y={command:`get <asn>`,describe:`Get ASN Subnets.`,builder:v,handler:async r=>{if(r.dryRun){s({command:`cf intel asn subnets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/asn/${r.asn==null?`<asn>`:encodeURIComponent(String(r.asn))}/subnets`,pathParams:{asn:String(r.asn??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.asn.subnets.get({account_id:l,asn:r.asn})),{successLabel:`Loaded`})}},b={command:`subnets`,describe:`Operations for asn.subnets`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},x={command:`asn`,describe:`ASN intelligence — ownership, geolocation, and subnet details for autonomous systems`,builder:e=>e.command(_).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function S(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get`,describe:`Lists all available issue types in Security Center, describing categories of security issues.`,builder:S,handler:async r=>{if(r.dryRun){s({command:`cf intel attack-surface-report issue-types get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/attack-surface-report/issue-types`,pathParams:{},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.attackSurfaceReport.issueTypes.get({account_id:l})),{successLabel:`Loaded`})}},w={command:`issue-types`,describe:`Operations for attack-surface-report.issue-types`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`class`,describe:`Retrieves Security Center issue counts aggregated by classification class.`,builder:h(T),handler:async r=>{let i={dismissed:r.dismissed,issue_class:r[`issue-class`],issue_type:r[`issue-type`],product:r.product,severity:r.severity,subject:r.subject};if(r.dryRun){s({command:`cf intel attack-surface-report issues class`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/attack-surface-report/issues/class`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.attackSurfaceReport.issues.class({account_id:u,...i})),{successLabel:`Loaded`})}};function D(e){return e.positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`dismiss`,{type:`boolean`,description:`The dismiss 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 O={command:`dismiss <issue-id>`,describe:`Deprecated endpoint for archiving Security Center insights. Use the newer archive-security-center-insight endpoint instead.`,builder:D,handler:async r=>{if(r.dryRun){s({command:`cf intel attack-surface-report issues dismiss`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/attack-surface-report/issues/${r[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(r[`issue-id`]))}/dismiss`,pathParams:{"issue-id":String(r[`issue-id`]??``)},bodyKind:`json`,body:r.body===void 0?u({dismiss:r.dismiss}):l(r.body)});return}let i=await a(r),d=r.local?e:await t();if(r.accountId=d,r.body){let e=l(r.body);o(await c(`Updating`,async()=>i.intel.attackSurfaceReport.issues.dismiss({...e,account_id:d,issue_id:r[`issue-id`]})),{successLabel:`Updated`});return}let f=u({dismiss:r.dismiss});o(await c(`Updating`,async()=>i.intel.attackSurfaceReport.issues.dismiss({...f,account_id:d,issue_id:r[`issue-id`]})),{successLabel:`Updated`})}};function k(e){return e.option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`page`,{type:`number`,description:`Specifies the current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Sets the number of results per page of results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`Lists all Security Center issues for the account, showing active security problems requiring attention.`,builder:h(k),handler:async r=>{let i={dismissed:r.dismissed,issue_class:r[`issue-class`],issue_type:r[`issue-type`],product:r.product,severity:r.severity,subject:r.subject,page:r.page,per_page:r[`per-page`]};if(r.dryRun){s({command:`cf intel attack-surface-report issues list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/attack-surface-report/issues`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.attackSurfaceReport.issues.list({account_id:u,...i})),{successLabel:`Loaded`})}};function j(e){return e.option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`severity`,describe:`Retrieves Security Center issue counts aggregated by severity level.`,builder:h(j),handler:async r=>{let i={dismissed:r.dismissed,issue_class:r[`issue-class`],issue_type:r[`issue-type`],product:r.product,severity:r.severity,subject:r.subject};if(r.dryRun){s({command:`cf intel attack-surface-report issues severity`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/attack-surface-report/issues/severity`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.attackSurfaceReport.issues.severity({account_id:u,...i})),{successLabel:`Loaded`})}};function N(e){return e.option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`type`,describe:`Retrieves Security Center issue counts aggregated by issue type.`,builder:h(N),handler:async r=>{let i={dismissed:r.dismissed,issue_class:r[`issue-class`],issue_type:r[`issue-type`],product:r.product,severity:r.severity,subject:r.subject};if(r.dryRun){s({command:`cf intel attack-surface-report issues type`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/attack-surface-report/issues/type`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.attackSurfaceReport.issues.type({account_id:u,...i})),{successLabel:`Loaded`})}},F={command:`issues`,describe:`Operations for attack-surface-report.issues`,builder:e=>e.command(E).command(O).command(A).command(M).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},I={command:`attack-surface-report`,describe:`Attack surface intelligence — exposed assets, vulnerabilities, and infrastructure mapping`,builder:e=>e.command(w).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.option(`start-end-params`,{type:`string`,description:`Start end params`}).option(`ipv4`,{type:`string`,description:`Ipv4`}).option(`page`,{type:`number`,description:`Requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results requested.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`list`,describe:`Gets a list of all the domains that have resolved to a specific IP address.`,builder:h(L),handler:async r=>{let i={start_end_params:r[`start-end-params`],ipv4:r.ipv4,page:r.page,per_page:r[`per-page`]};if(r.dryRun){s({command:`cf intel dns list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/dns`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.dns.list({account_id:u,...i})),{successLabel:`Loaded`})}},z={command:`dns`,describe:`Passive DNS data showing historical DNS resolution records for domains`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function B(e){return e.option(`domain`,{type:`string`,description:`Domain`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`get`,describe:`Gets historical security threat and content categories currently and previously assigned to a domain.`,builder:B,handler:async r=>{let i={domain:r.domain};if(r.dryRun){s({command:`cf intel domain-history get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/domain-history`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.domainHistory.get({account_id:u,...i})),{successLabel:`Loaded`})}},H={command:`domain-history`,describe:`Historical domain registration and categorization changes over time`,builder:e=>e.command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function U(e){return e.option(`domain`,{type:`string`,description:"Accepts multiple values like `?domain=cloudflare.com&domain=example.com`."}).option(`include-ranking`,{type:`boolean`,description:"Whether to include domain ranking data in the response. Defaults to\n`false` — ranking lookups are expensive at bulk scale and most\ncallers do not need them. Set to `true` to opt in. This parameter\nreplaces the deprecated `skip_ranking` (see below)."}).option(`skip-ranking`,{type:`boolean`,description:"**Deprecated.** Previously controlled whether the ranking lookup\nwas skipped (defaulted to `false`, meaning ranking ran). The\nendpoint's default behavior is being flipped — ranking is now\nopt-in via `include_ranking=true` — and this parameter will be\nsilently ignored. Remove it from your callers and use\n`include_ranking` instead."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get`,describe:"Returns security details and statistics about multiple domains in a single request. **Behavior change — domain ranking is becoming opt-in.** This endpoint previously included domain ranking data in every response and accepted a `skip_ranking=true` query parameter to opt out. That parameter is being deprecated and ranking will no longer be returned by default. Callers that want ranking data must pass `include_ranking=true`. The `skip_ranking` parameter will be silently ignored once the change ships.",builder:U,handler:async r=>{let i={domain:r.domain,include_ranking:r[`include-ranking`],skip_ranking:r[`skip-ranking`]};if(r.dryRun){s({command:`cf intel domains bulks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/domain/bulk`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.domains.bulks.get({account_id:u,...i})),{successLabel:`Loaded`})}},G={command:`bulks`,describe:`Operations for domains.bulks`,builder:e=>e.command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function K(e){return e.option(`domain`,{type:`string`,description:`Domain`}).option(`skip-dns`,{type:`boolean`,description:`Skip DNS resolution lookups for faster response.`}).option(`skip-ranking`,{type:`boolean`,description:"Skip the domain ranking lookup for faster responses. Defaults to\n`false` (ranking is included). Set to `true` to opt out — primarily\nused by callers like Cloudflare Radar that need to avoid a\ncircular dependency when building the domain details page.\nNote: the bulk endpoint (`/intel/domain/bulk`) uses opposite\ndefaults — see `include_ranking` there."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`get`,describe:`Gets security details and statistics about a domain.`,builder:K,handler:async r=>{let i={domain:r.domain,skip_dns:r[`skip-dns`],skip_ranking:r[`skip-ranking`]};if(r.dryRun){s({command:`cf intel domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/domain`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.domains.get({account_id:u,...i})),{successLabel:`Loaded`})}},J={command:`domains`,describe:`Domain intelligence — risk scores, categories, and associated infrastructure`,builder:e=>e.command(q).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Y(e){return e.option(`description`,{type:`string`,description:`The description of the example test`}).option(`name`,{type:`string`,description:`The name of the indicator feed`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const X={command:`create`,describe:`Creates a new custom threat indicator feed for sharing threat intelligence data.`,builder:Y,handler:async r=>{if(r.dryRun){s({command:`cf intel indicator-feeds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/indicator-feeds`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({description:d(r.description,`description`,`text`),name:d(r.name,`name`,`text`)}):l(r.body)});return}let i=await a(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);o(await c(`Creating`,async()=>i.intel.indicatorFeeds.create({...e,account_id:f})),{successLabel:`Created`});return}let p=u({description:d(r.description,`description`,`text`),name:d(r.name,`name`,`text`)});o(await c(`Creating`,async()=>i.intel.indicatorFeeds.create({...p,account_id:f})),{successLabel:`Created`})}};function Z(e){return e.positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`data <feed-id>`,describe:`Retrieves the raw data entries in a custom threat indicator feed.`,builder:Z,handler:async r=>{if(r.dryRun){s({command:`cf intel indicator-feeds data`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/indicator-feeds/${r[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(r[`feed-id`]))}/data`,pathParams:{"feed-id":String(r[`feed-id`]??``)},bodyKind:`none`});return}await a(r);let i=r.local?e:await t();r.accountId=i,ee((await c(`Loading`,async()=>te(`/accounts/${i}/intel/indicator-feeds/${encodeURIComponent(String(r[`feed-id`]))}/data`,{method:`GET`,local:r.local===!0,persistTo:r.persistTo}))).toString(`utf-8`))}};function ne(e){return e.positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <feed-id>`,describe:`Downloads the content of a custom threat indicator feed.`,builder:ne,handler:async r=>{if(r.dryRun){s({command:`cf intel indicator-feeds downloads get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/indicator-feeds/${r[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(r[`feed-id`]))}/download`,pathParams:{"feed-id":String(r[`feed-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.indicatorFeeds.downloads.get({account_id:l,feed_id:r[`feed-id`]})),{successLabel:`Loaded`})}},ie={command:`downloads`,describe:`Operations for indicator-feeds.downloads`,builder:e=>e.command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ae(e){return e.positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get <feed-id>`,describe:`Retrieves details for a specific custom threat indicator feed.`,builder:ae,handler:async r=>{if(r.dryRun){s({command:`cf intel indicator-feeds get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/indicator-feeds/${r[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(r[`feed-id`]))}`,pathParams:{"feed-id":String(r[`feed-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.indicatorFeeds.get({account_id:l,feed_id:r[`feed-id`]})),{successLabel:`Loaded`})}};function se(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`Retrieves details for all accessible custom threat indicator feeds.`,builder:se,handler:async r=>{if(r.dryRun){s({command:`cf intel indicator-feeds list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/indicator-feeds`,pathParams:{},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.indicatorFeeds.list({account_id:l})),{successLabel:`Loaded`})}};function le(e){return e.option(`account-tag`,{type:`string`,description:`The Cloudflare account tag of the account to change permissions on`}).option(`feed-id`,{type:`number`,description:`The ID of the feed to add/remove permissions on`}).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 ue={command:`create`,describe:`Grants access permissions for a custom threat indicator feed to other accounts.`,builder:le,handler:async r=>{if(r.dryRun){s({command:`cf intel indicator-feeds permissions create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/indicator-feeds/permissions/add`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({account_tag:d(r[`account-tag`],`account-tag`,`text`),feed_id:r[`feed-id`]}):l(r.body)});return}let i=await a(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);o(await c(`Updating`,async()=>i.intel.indicatorFeeds.permissions.create({body:e,account_id:f})),{successLabel:`Updated`});return}let p=u({account_tag:d(r[`account-tag`],`account-tag`,`text`),feed_id:r[`feed-id`]});o(await c(`Updating`,async()=>i.intel.indicatorFeeds.permissions.create({body:p,account_id:f})),{successLabel:`Updated`})}};function de(e){return e.option(`account-tag`,{type:`string`,description:`The Cloudflare account tag of the account to change permissions on`}).option(`feed-id`,{type:`number`,description:`The ID of the feed to add/remove permissions on`}).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 fe={command:`delete`,describe:`Revokes access permissions for a custom threat indicator feed.`,builder:de,handler:async r=>{if(r.dryRun){s({command:`cf intel indicator-feeds permissions delete`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/indicator-feeds/permissions/remove`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({account_tag:d(r[`account-tag`],`account-tag`,`text`),feed_id:r[`feed-id`]}):l(r.body)});return}let i=await a(r),f=r.local?e:await t();if(r.accountId=f,!await m({force:!!r.force,message:`This operation destructively removes a permission entry.`})){process.stderr.write(`Aborted.
2
+ import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n,h as r}from"./oauth-B0ETkNcX.mjs";import{a as i,r as a}from"./auth-MQEamPN9.mjs";import{t as o}from"./output-DrpYYfnB.mjs";import{n as s,t as c}from"./progress-CsHIt3Tp.mjs";import{n as l,t as u}from"./body-parser-C-c9gfH1.mjs";import{n as d,t as f}from"./input-validation-Bav2M9F-.mjs";import{a as p,n as m}from"./prompt-DdegNPpg.mjs";import{t as h}from"./cli-types-BsTty22w.mjs";import{n as ee,t as te}from"./raw-fetch-CteyTOM2.mjs";function g(e){return e.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 _={command:`get <asn>`,describe:`Gets an overview of the Autonomous System Number (ASN) and a list of subnets for it.`,builder:g,handler:async r=>{if(r.dryRun){s({command:`cf intel asn get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/asn/${r.asn==null?`<asn>`:encodeURIComponent(String(r.asn))}`,pathParams:{asn:String(r.asn??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.asn.get({account_id:l,asn:r.asn})),{successLabel:`Loaded`})}};function v(e){return e.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 y={command:`get <asn>`,describe:`Get ASN Subnets.`,builder:v,handler:async r=>{if(r.dryRun){s({command:`cf intel asn subnets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/asn/${r.asn==null?`<asn>`:encodeURIComponent(String(r.asn))}/subnets`,pathParams:{asn:String(r.asn??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.asn.subnets.get({account_id:l,asn:r.asn})),{successLabel:`Loaded`})}},b={command:`subnets`,describe:`Operations for asn.subnets`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},x={command:`asn`,describe:`ASN intelligence — ownership, geolocation, and subnet details for autonomous systems`,builder:e=>e.command(_).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function S(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get`,describe:`Lists all available issue types in Security Center, describing categories of security issues.`,builder:S,handler:async r=>{if(r.dryRun){s({command:`cf intel attack-surface-report issue-types get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/attack-surface-report/issue-types`,pathParams:{},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.attackSurfaceReport.issueTypes.get({account_id:l})),{successLabel:`Loaded`})}},w={command:`issue-types`,describe:`Operations for attack-surface-report.issue-types`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`class`,describe:`Retrieves Security Center issue counts aggregated by classification class.`,builder:h(T),handler:async r=>{let i={dismissed:r.dismissed,issue_class:r[`issue-class`],issue_type:r[`issue-type`],product:r.product,severity:r.severity,subject:r.subject};if(r.dryRun){s({command:`cf intel attack-surface-report issues class`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/attack-surface-report/issues/class`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.attackSurfaceReport.issues.class({account_id:u,...i})),{successLabel:`Loaded`})}};function D(e){return e.positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`dismiss`,{type:`boolean`,description:`The dismiss 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 O={command:`dismiss <issue-id>`,describe:`Deprecated endpoint for archiving Security Center insights. Use the newer archive-security-center-insight endpoint instead.`,builder:D,handler:async r=>{if(r.dryRun){s({command:`cf intel attack-surface-report issues dismiss`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/attack-surface-report/issues/${r[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(r[`issue-id`]))}/dismiss`,pathParams:{"issue-id":String(r[`issue-id`]??``)},bodyKind:`json`,body:r.body===void 0?u({dismiss:r.dismiss}):l(r.body)});return}let i=await a(r),d=r.local?e:await t();if(r.accountId=d,r.body){let e=l(r.body);o(await c(`Updating`,async()=>i.intel.attackSurfaceReport.issues.dismiss({...e,account_id:d,issue_id:r[`issue-id`]})),{successLabel:`Updated`});return}let f=u({dismiss:r.dismiss});o(await c(`Updating`,async()=>i.intel.attackSurfaceReport.issues.dismiss({...f,account_id:d,issue_id:r[`issue-id`]})),{successLabel:`Updated`})}};function k(e){return e.option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`page`,{type:`number`,description:`Specifies the current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Sets the number of results per page of results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`Lists all Security Center issues for the account, showing active security problems requiring attention.`,builder:h(k),handler:async r=>{let i={dismissed:r.dismissed,issue_class:r[`issue-class`],issue_type:r[`issue-type`],product:r.product,severity:r.severity,subject:r.subject,page:r.page,per_page:r[`per-page`]};if(r.dryRun){s({command:`cf intel attack-surface-report issues list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/attack-surface-report/issues`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.attackSurfaceReport.issues.list({account_id:u,...i})),{successLabel:`Loaded`})}};function j(e){return e.option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`severity`,describe:`Retrieves Security Center issue counts aggregated by severity level.`,builder:h(j),handler:async r=>{let i={dismissed:r.dismissed,issue_class:r[`issue-class`],issue_type:r[`issue-type`],product:r.product,severity:r.severity,subject:r.subject};if(r.dryRun){s({command:`cf intel attack-surface-report issues severity`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/attack-surface-report/issues/severity`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.attackSurfaceReport.issues.severity({account_id:u,...i})),{successLabel:`Loaded`})}};function N(e){return e.option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`type`,describe:`Retrieves Security Center issue counts aggregated by issue type.`,builder:h(N),handler:async r=>{let i={dismissed:r.dismissed,issue_class:r[`issue-class`],issue_type:r[`issue-type`],product:r.product,severity:r.severity,subject:r.subject};if(r.dryRun){s({command:`cf intel attack-surface-report issues type`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/attack-surface-report/issues/type`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.attackSurfaceReport.issues.type({account_id:u,...i})),{successLabel:`Loaded`})}},F={command:`issues`,describe:`Operations for attack-surface-report.issues`,builder:e=>e.command(E).command(O).command(A).command(M).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},I={command:`attack-surface-report`,describe:`Attack surface intelligence — exposed assets, vulnerabilities, and infrastructure mapping`,builder:e=>e.command(w).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.option(`start-end-params`,{type:`string`,description:`Start end params`}).option(`ipv4`,{type:`string`,description:`Ipv4`}).option(`page`,{type:`number`,description:`Requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results requested.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`list`,describe:`Gets a list of all the domains that have resolved to a specific IP address.`,builder:h(L),handler:async r=>{let i={start_end_params:r[`start-end-params`],ipv4:r.ipv4,page:r.page,per_page:r[`per-page`]};if(r.dryRun){s({command:`cf intel dns list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/dns`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.dns.list({account_id:u,...i})),{successLabel:`Loaded`})}},z={command:`dns`,describe:`Passive DNS data showing historical DNS resolution records for domains`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function B(e){return e.option(`domain`,{type:`string`,description:`Domain`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`get`,describe:`Gets historical security threat and content categories currently and previously assigned to a domain.`,builder:B,handler:async r=>{let i={domain:r.domain};if(r.dryRun){s({command:`cf intel domain-history get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/domain-history`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.domainHistory.get({account_id:u,...i})),{successLabel:`Loaded`})}},H={command:`domain-history`,describe:`Historical domain registration and categorization changes over time`,builder:e=>e.command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function U(e){return e.option(`domain`,{type:`string`,description:"Accepts multiple values like `?domain=cloudflare.com&domain=example.com`."}).option(`include-ranking`,{type:`boolean`,description:"Whether to include domain ranking data in the response. Defaults to\n`false` — ranking lookups are expensive at bulk scale and most\ncallers do not need them. Set to `true` to opt in. This parameter\nreplaces the deprecated `skip_ranking` (see below)."}).option(`skip-ranking`,{type:`boolean`,description:"**Deprecated.** Previously controlled whether the ranking lookup\nwas skipped (defaulted to `false`, meaning ranking ran). The\nendpoint's default behavior is being flipped — ranking is now\nopt-in via `include_ranking=true` — and this parameter will be\nsilently ignored. Remove it from your callers and use\n`include_ranking` instead."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get`,describe:"Returns security details and statistics about multiple domains in a single request. **Behavior change — domain ranking is becoming opt-in.** This endpoint previously included domain ranking data in every response and accepted a `skip_ranking=true` query parameter to opt out. That parameter is being deprecated and ranking will no longer be returned by default. Callers that want ranking data must pass `include_ranking=true`. The `skip_ranking` parameter will be silently ignored once the change ships.",builder:U,handler:async r=>{let i={domain:r.domain,include_ranking:r[`include-ranking`],skip_ranking:r[`skip-ranking`]};if(r.dryRun){s({command:`cf intel domains bulks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/domain/bulk`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.domains.bulks.get({account_id:u,...i})),{successLabel:`Loaded`})}},G={command:`bulks`,describe:`Operations for domains.bulks`,builder:e=>e.command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function K(e){return e.option(`domain`,{type:`string`,description:`Domain`}).option(`skip-dns`,{type:`boolean`,description:`Skip DNS resolution lookups for faster response.`}).option(`skip-ranking`,{type:`boolean`,description:"Skip the domain ranking lookup for faster responses. Defaults to\n`false` (ranking is included). Set to `true` to opt out — primarily\nused by callers like Cloudflare Radar that need to avoid a\ncircular dependency when building the domain details page.\nNote: the bulk endpoint (`/intel/domain/bulk`) uses opposite\ndefaults — see `include_ranking` there."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`get`,describe:`Gets security details and statistics about a domain.`,builder:K,handler:async r=>{let i={domain:r.domain,skip_dns:r[`skip-dns`],skip_ranking:r[`skip-ranking`]};if(r.dryRun){s({command:`cf intel domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/domain`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.domains.get({account_id:u,...i})),{successLabel:`Loaded`})}},J={command:`domains`,describe:`Domain intelligence — risk scores, categories, and associated infrastructure`,builder:e=>e.command(q).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Y(e){return e.option(`description`,{type:`string`,description:`The description of the example test`}).option(`name`,{type:`string`,description:`The name of the indicator feed`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const X={command:`create`,describe:`Creates a new custom threat indicator feed for sharing threat intelligence data.`,builder:Y,handler:async r=>{if(r.dryRun){s({command:`cf intel indicator-feeds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/indicator-feeds`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({description:d(r.description,`description`,`text`),name:d(r.name,`name`,`text`)}):l(r.body)});return}let i=await a(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);o(await c(`Creating`,async()=>i.intel.indicatorFeeds.create({...e,account_id:f})),{successLabel:`Created`});return}let p=u({description:d(r.description,`description`,`text`),name:d(r.name,`name`,`text`)});o(await c(`Creating`,async()=>i.intel.indicatorFeeds.create({...p,account_id:f})),{successLabel:`Created`})}};function Z(e){return e.positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`data <feed-id>`,describe:`Retrieves the raw data entries in a custom threat indicator feed.`,builder:Z,handler:async r=>{if(r.dryRun){s({command:`cf intel indicator-feeds data`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/indicator-feeds/${r[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(r[`feed-id`]))}/data`,pathParams:{"feed-id":String(r[`feed-id`]??``)},bodyKind:`none`});return}await a(r);let i=r.local?e:await t();r.accountId=i,ee((await c(`Loading`,async()=>te(`/accounts/${i}/intel/indicator-feeds/${encodeURIComponent(String(r[`feed-id`]))}/data`,{method:`GET`,local:r.local===!0,persistTo:r.persistTo}))).toString(`utf-8`))}};function ne(e){return e.positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <feed-id>`,describe:`Downloads the content of a custom threat indicator feed.`,builder:ne,handler:async r=>{if(r.dryRun){s({command:`cf intel indicator-feeds downloads get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/indicator-feeds/${r[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(r[`feed-id`]))}/download`,pathParams:{"feed-id":String(r[`feed-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.indicatorFeeds.downloads.get({account_id:l,feed_id:r[`feed-id`]})),{successLabel:`Loaded`})}},ie={command:`downloads`,describe:`Operations for indicator-feeds.downloads`,builder:e=>e.command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ae(e){return e.positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get <feed-id>`,describe:`Retrieves details for a specific custom threat indicator feed.`,builder:ae,handler:async r=>{if(r.dryRun){s({command:`cf intel indicator-feeds get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/indicator-feeds/${r[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(r[`feed-id`]))}`,pathParams:{"feed-id":String(r[`feed-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.indicatorFeeds.get({account_id:l,feed_id:r[`feed-id`]})),{successLabel:`Loaded`})}};function se(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`Retrieves details for all accessible custom threat indicator feeds.`,builder:se,handler:async r=>{if(r.dryRun){s({command:`cf intel indicator-feeds list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/indicator-feeds`,pathParams:{},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.indicatorFeeds.list({account_id:l})),{successLabel:`Loaded`})}};function le(e){return e.option(`account-tag`,{type:`string`,description:`The Cloudflare account tag of the account to change permissions on`}).option(`feed-id`,{type:`number`,description:`The ID of the feed to add/remove permissions on`}).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 ue={command:`create`,describe:`Grants access permissions for a custom threat indicator feed to other accounts.`,builder:le,handler:async r=>{if(r.dryRun){s({command:`cf intel indicator-feeds permissions create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/indicator-feeds/permissions/add`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({account_tag:d(r[`account-tag`],`account-tag`,`text`),feed_id:r[`feed-id`]}):l(r.body)});return}let i=await a(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);o(await c(`Updating`,async()=>i.intel.indicatorFeeds.permissions.create({body:e,account_id:f})),{successLabel:`Updated`});return}let p=u({account_tag:d(r[`account-tag`],`account-tag`,`text`),feed_id:r[`feed-id`]});o(await c(`Updating`,async()=>i.intel.indicatorFeeds.permissions.create({body:p,account_id:f})),{successLabel:`Updated`})}};function de(e){return e.option(`account-tag`,{type:`string`,description:`The Cloudflare account tag of the account to change permissions on`}).option(`feed-id`,{type:`number`,description:`The ID of the feed to add/remove permissions on`}).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 fe={command:`delete`,describe:`Revokes access permissions for a custom threat indicator feed.`,builder:de,handler:async r=>{if(r.dryRun){s({command:`cf intel indicator-feeds permissions delete`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/indicator-feeds/permissions/remove`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({account_tag:d(r[`account-tag`],`account-tag`,`text`),feed_id:r[`feed-id`]}):l(r.body)});return}let i=await a(r),f=r.local?e:await t();if(r.accountId=f,!await m({force:!!r.force,message:`This operation destructively removes a permission entry.`})){process.stderr.write(`Aborted.
3
3
  `);return}if(r.body){let e=l(r.body);o(await c(`Deleting`,async()=>i.intel.indicatorFeeds.permissions.delete({body:e,account_id:f})),{successLabel:`Deleted`});return}let p=u({account_tag:d(r[`account-tag`],`account-tag`,`text`),feed_id:r[`feed-id`]});o(await c(`Deleting`,async()=>i.intel.indicatorFeeds.permissions.delete({body:p,account_id:f})),{successLabel:`Deleted`})}};function pe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`list`,describe:`Lists current access permissions for custom threat indicator feeds.`,builder:pe,handler:async r=>{if(r.dryRun){s({command:`cf intel indicator-feeds permissions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/indicator-feeds/permissions/view`,pathParams:{},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.indicatorFeeds.permissions.list({account_id:l})),{successLabel:`Loaded`})}},he={command:`permissions`,describe:`Operations for indicator-feeds.permissions`,builder:e=>e.command(ue).command(fe).command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ge(e){return e.positional(`account-id-path`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`account-id`,{type:`number`,description:`The numeric account ID to create the provider for. Distinct from the
4
4
  path \`account_id\` parameter, which carries the account identifier
5
5
  string used for routing.
6
6
  `}).option(`name`,{type:`string`,description:`The name of the provider`}).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 _e={command:`create <account-id-path>`,describe:`Creates a new indicator feed provider for an account. Only available to Intel accounts.`,builder:ge,handler:async e=>{if(e.dryRun){s({command:`cf intel indicator-feeds providers create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/intel/indicator-feeds/permissions/createProvider`,pathParams:{"account-id-path":String(e[`account-id-path`]??``)},bodyKind:`json`,body:e.body===void 0?u({account_id:e[`account-id`],name:d(e.name,`name`,`text`)}):l(e.body)});return}let t=await a(e);if(e.body){let n=l(e.body);o(await c(`Updating`,async()=>t.intel.indicatorFeeds.providers.create({...n,account_id_path:e[`account-id-path`]})),{successLabel:`Updated`});return}if(e[`account-id`]===void 0)throw Error(`--account-id is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await p(`name`,`The name of the provider`));let n=u({account_id:e[`account-id`],name:d(e.name,`name`,`text`)});o(await c(`Updating`,async()=>t.intel.indicatorFeeds.providers.create({...n,account_id_path:e[`account-id-path`]})),{successLabel:`Updated`})}},ve={command:`providers`,describe:`Operations for indicator-feeds.providers`,builder:e=>e.command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ye(e){return e.positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`cf-async-upload`,{type:`string`,description:"Set to the literal value `1` to enqueue the upload and receive a\n`202` response with a polling URL. Any other value uses the legacy\nsynchronous response."}).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(`source`,{type:`string`,description:"The file to upload. Either a plain STIX2/CRDF body or a gzipped one (recognised by `0x1f 0x8b` magic bytes or a `.gz` filename suffix). "})}const be={command:`update <feed-id>`,describe:"Revises the raw data entries in a custom threat indicator feed. Accepts both plain and gzipped STIX2/CRDF bodies. Gzip is detected by RFC 1952 magic bytes (`0x1f 0x8b`) and/or a `.gz` filename suffix (case-insensitive) — either signal alone is sufficient to trigger the gzip path; if the body is not valid gzip, the upload fails fast. Customers are encouraged to gzip larger uploads — the api-gateway 500 MB body cap applies to the on-the-wire (compressed) size, so gzip lets a single upload carry several GiB of decompressed STIX.",builder:ye,handler:async r=>{let l={};if(r[`cf-async-upload`]!==void 0&&(l[`Cf-Async-Upload`]=String(r[`cf-async-upload`])),r.dryRun){s({command:`cf intel indicator-feeds snapshots update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/indicator-feeds/${r[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(r[`feed-id`]))}/snapshot`,pathParams:{"feed-id":String(r[`feed-id`]??``)},bodyKind:`multipart`,body:{body:r.body,file:r.file,source:r.source}});return}let u=await a(r),p=r.local?e:await t();if(r.accountId=p,r.file!==void 0||r.body!==void 0||r.source!==void 0){let e=new FormData;if(r.file){let t=f(r.file);e.append(`file`,new Blob([t]),r.file.split(/[\\/]/).filter(Boolean).pop())}else r.body!==void 0&&e.append(`file`,r.body);r.source!==void 0&&e.append(`source`,String(d(r.source,`source`,`text`)??``)),o(await c(`Updating`,async()=>i(u,`PUT`,`/accounts/${p}/intel/indicator-feeds/${encodeURIComponent(String(r[`feed-id`]))}/snapshot`,{body:e,headers:Object.keys(l).length>0?l:void 0})),{successLabel:`Updated`});return}if(r.body){let e=d(r.body,`body`,`binary`);o(await c(`Updating`,async()=>i(u,`PUT`,`/accounts/${p}/intel/indicator-feeds/${encodeURIComponent(String(r[`feed-id`]))}/snapshot`,{body:e,headers:{"Content-Type":`multipart/form-data`,...l}})),{successLabel:`Updated`});return}if(r.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},xe={command:`snapshots`,describe:`Operations for indicator-feeds.snapshots`,builder:e=>e.command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Se(e){return e.positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The new description of the feed`}).option(`is-attributable`,{type:`boolean`,description:`The new is_attributable value of the feed`}).option(`is-downloadable`,{type:`boolean`,description:`The new is_downloadable value of the feed`}).option(`is-public`,{type:`boolean`,description:`The new is_public value of the feed`}).option(`name`,{type:`string`,description:`The new name of the feed`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ce={command:`update <feed-id>`,describe:`Revises details for a specific custom threat indicator feed.`,builder:Se,handler:async r=>{if(r.dryRun){s({command:`cf intel indicator-feeds update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/indicator-feeds/${r[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(r[`feed-id`]))}`,pathParams:{"feed-id":String(r[`feed-id`]??``)},bodyKind:`json`,body:r.body===void 0?u({description:d(r.description,`description`,`text`),is_attributable:r[`is-attributable`],is_downloadable:r[`is-downloadable`],is_public:r[`is-public`],name:d(r.name,`name`,`text`)}):l(r.body)});return}let i=await a(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);o(await c(`Updating`,async()=>i.intel.indicatorFeeds.update({...e,account_id:f,feed_id:r[`feed-id`]})),{successLabel:`Updated`});return}let p=u({description:d(r.description,`description`,`text`),is_attributable:r[`is-attributable`],is_downloadable:r[`is-downloadable`],is_public:r[`is-public`],name:d(r.name,`name`,`text`)});o(await c(`Updating`,async()=>i.intel.indicatorFeeds.update({...p,account_id:f,feed_id:r[`feed-id`]})),{successLabel:`Updated`})}},we={command:`indicator-feeds`,describe:`Threat indicator feeds — subscribe to and manage curated lists of malicious IPs, domains, and URLs`,builder:e=>e.command(X).command(Q).command(oe).command(ce).command(Ce).command(ie).command(he).command(ve).command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Te(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ee={command:`get`,describe:`Returns a list of available IP list categories (e.g., anonymizer, botnetcc, malware, tor, vpn, open_proxies). This endpoint provides metadata about which IP lists are available in the system.`,builder:Te,handler:async r=>{if(r.dryRun){s({command:`cf intel ip-lists get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/ip-lists`,pathParams:{},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.ipLists.get({account_id:l})),{successLabel:`Loaded`})}},De={command:`ip-lists`,describe:`Curated IP lists used for threat detection and policy enforcement`,builder:e=>e.command(Ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Oe(e){return e.option(`ipv4`,{type:`string`,description:`Ipv4`}).option(`ipv6`,{type:`string`,description:`Ipv6`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ke={command:`get`,describe:"Gets the geolocation, ASN, infrastructure type of the ASN, and any security threat categories of an IP address. **Must provide ip query parameters.** For example, `/intel/ip?ipv4=1.1.1.1` or `/intel/ip?ipv6=2001:db8::1`.",builder:Oe,handler:async r=>{let i={ipv4:r.ipv4,ipv6:r.ipv6};if(r.dryRun){s({command:`cf intel ips get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/ip`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.ips.get({account_id:u,...i})),{successLabel:`Loaded`})}},Ae={command:`ips`,describe:`IP address intelligence — geolocation, risk assessment, and hosting provider details`,builder:e=>e.command(ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function je(e){return e.option(`content-adds`,{type:`string`,array:!0,description:`Content category IDs to add.`}).option(`content-removes`,{type:`string`,array:!0,description:`Content category IDs to remove.`}).option(`indicator-type`,{type:`string`,description:`The indicator_type field`,choices:[`domain`,`ipv4`,`ipv6`,`url`]}).option(`ip`,{type:`string`,description:"Provide only if indicator_type is `ipv4` or `ipv6`."}).option(`security-adds`,{type:`string`,array:!0,description:`Security category IDs to add.`}).option(`security-removes`,{type:`string`,array:!0,description:`Security category IDs to remove.`}).option(`url`,{type:`string`,description:"Provide only if indicator_type is `domain` or `url`. Example if indicator_type is `domain`: `example.com`. Example if indicator_type is `url`: `https://example.com/news/`."}).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 Me={command:`create`,describe:"Allows you to submit requests to change a domain’s category. Requests that include category `169` (New Domains) or category `177` (Newly Seen) in any of `content_adds`, `content_removes`, `security_adds`, or `security_removes` will be rejected with a `400 Bad Request`. These categories are automatically managed and fall off 30 days after they are applied.",builder:je,handler:async r=>{if(r.dryRun){s({command:`cf intel miscategorizations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/miscategorization`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({content_adds:r[`content-adds`],content_removes:r[`content-removes`],indicator_type:d(r[`indicator-type`],`indicator-type`,`text`),ip:d(r.ip,`ip`,`text`),security_adds:r[`security-adds`],security_removes:r[`security-removes`],url:d(r.url,`url`,`text`)}):l(r.body)});return}let i=await a(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);o(await c(`Creating`,async()=>i.intel.miscategorizations.create({...e,account_id:f})),{successLabel:`Created`});return}let p=u({content_adds:r[`content-adds`],content_removes:r[`content-removes`],indicator_type:d(r[`indicator-type`],`indicator-type`,`text`),ip:d(r.ip,`ip`,`text`),security_adds:r[`security-adds`],security_removes:r[`security-removes`],url:d(r.url,`url`,`text`)});o(await c(`Creating`,async()=>i.intel.miscategorizations.create({...p,account_id:f})),{successLabel:`Created`})}},Ne={command:`miscategorizations`,describe:`Report and track domain miscategorization corrections`,builder:e=>e.command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pe(e){return e.option(`name`,{type:`string`,description:`The name of the sinkhole.`}).option(`r2-bucket`,{type:`string`,description:`The name of the R2 bucket to store results. Required if you want to store large request bodies in R2.`}).option(`r2-id`,{type:`string`,description:`The id of the R2 instance. Required if you want to store large request bodies in R2.`}).option(`r2-secret`,{type:`string`,description:`The secret key for the R2 API token. Required if you want to store large request bodies in R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Fe={command:`create`,describe:`Create a new sinkhole. Logs of large request bodies will be truncated, but the full request body can be recorded in R2. If you wish to record large request bodies in R2, include the R2 key ID, key secret, and bucket name in the request body.`,builder:Pe,handler:async r=>{if(r.dryRun){s({command:`cf intel sinkholes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/sinkholes`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({name:d(r.name,`name`,`text`),r2_bucket:d(r[`r2-bucket`],`r2-bucket`,`text`),r2_id:d(r[`r2-id`],`r2-id`,`text`),r2_secret:d(r[`r2-secret`],`r2-secret`,`text`)}):l(r.body)});return}let i=await a(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);o(await c(`Creating`,async()=>i.intel.sinkholes.create({body:e,account_id:f})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await p(`name`,`The name of the sinkhole.`));let m=u({name:d(r.name,`name`,`text`),r2_bucket:d(r[`r2-bucket`],`r2-bucket`,`text`),r2_id:d(r[`r2-id`],`r2-id`,`text`),r2_secret:d(r[`r2-secret`],`r2-secret`,`text`)});o(await c(`Creating`,async()=>i.intel.sinkholes.create({body:m,account_id:f})),{successLabel:`Created`})}};function Ie(e){return e.positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,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 Le={command:`delete <sinkhole-id>`,describe:`Delete the specified sinkhole. The sinkhole must not have any active ingress rules defined. A 409 response code indicates that this condition is not met.`,builder:Ie,handler:async r=>{if(r.dryRun){s({command:`cf intel sinkholes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/sinkholes/${r[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(r[`sinkhole-id`]))}`,pathParams:{"sinkhole-id":String(r[`sinkhole-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,!await m({force:!!r.force})){process.stderr.write(`Aborted.
7
7
  `);return}o(await c(`Deleting`,async()=>i.intel.sinkholes.delete({account_id:l,sinkhole_id:r[`sinkhole-id`]})),{successLabel:`Deleted`})}};function Re(e){return e.positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ze={command:`get <sinkhole-id>`,describe:`Get the specified sinkhole by its unique identifier.`,builder:Re,handler:async r=>{if(r.dryRun){s({command:`cf intel sinkholes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/sinkholes/${r[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(r[`sinkhole-id`]))}`,pathParams:{"sinkhole-id":String(r[`sinkhole-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.sinkholes.get({account_id:l,sinkhole_id:r[`sinkhole-id`]})),{successLabel:`Loaded`})}};function Be(e){return e.positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`cidr`,{type:`string`,description:`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`}).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 Ve={command:`create <sinkhole-id>`,describe:`Create a new ingress rule for the specified sinkhole. The CIDR block must be a Cloudflare BYOIP associated with your account. The zone_id must be a zone with the ability to create Spectrum Apps. The sinkhole must belong to the same account as the zone.`,builder:Be,handler:async e=>{if(e.dryRun){s({command:`cf intel sinkholes ingresses create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({cidr:d(e.cidr,`cidr`,`text`)}):l(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);o(await c(`Creating`,async()=>t.intel.sinkholes.ingresses.create({body:r,zone_id:n,sinkhole_id:e[`sinkhole-id`]})),{successLabel:`Created`});return}e.cidr===void 0&&(e.cidr=await p(`cidr`,`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`));let i=u({cidr:d(e.cidr,`cidr`,`text`)});o(await c(`Creating`,async()=>t.intel.sinkholes.ingresses.create({body:i,zone_id:n,sinkhole_id:e[`sinkhole-id`]})),{successLabel:`Created`})}};function He(e){return e.positional(`ingress-id`,{type:`string`,description:`The unique identifier for the ingress rule.`,demandOption:!0}).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,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 Ue={command:`delete <ingress-id>`,describe:`Delete the specified ingress rule. The sinkhole must belong to the same account as the zone.`,builder:He,handler:async e=>{if(e.dryRun){s({command:`cf intel sinkholes ingresses delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses/${e[`ingress-id`]==null?`<ingress-id>`:encodeURIComponent(String(e[`ingress-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``),"ingress-id":String(e[`ingress-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await m({force:!!e.force})){process.stderr.write(`Aborted.
8
- `);return}o(await c(`Deleting`,async()=>t.intel.sinkholes.ingresses.delete({zone_id:n,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]})),{successLabel:`Deleted`})}};function We(e){return e.positional(`ingress-id`,{type:`string`,description:`The unique identifier for the ingress rule.`,demandOption:!0}).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ge={command:`get <ingress-id>`,describe:`Get the specified ingress rule associated with a sinkhole. The sinkhole must belong to the same account as the zone.`,builder:We,handler:async e=>{if(e.dryRun){s({command:`cf intel sinkholes ingresses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses/${e[`ingress-id`]==null?`<ingress-id>`:encodeURIComponent(String(e[`ingress-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``),"ingress-id":String(e[`ingress-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.intel.sinkholes.ingresses.get({zone_id:n,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]})),{successLabel:`Loaded`})}};function Ke(e){return e.option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qe={command:`list`,describe:`Returns all ingress rules associated with the specified sinkhole.`,builder:Ke,handler:async r=>{if(r.dryRun){s({command:`cf intel sinkholes ingresses list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/sinkholes/${r[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(r[`sinkhole-id`]))}/ingresses`,pathParams:{"sinkhole-id":String(r[`sinkhole-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.sinkholes.ingresses.list({account_id:l,sinkhole_id:r[`sinkhole-id`]})),{successLabel:`Loaded`})}};function Je(e){return e.positional(`ingress-id`,{type:`string`,description:`The unique identifier for the ingress rule.`,demandOption:!0}).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`cidr`,{type:`string`,description:`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const $={command:`update <ingress-id>`,describe:`Replaces the specified ingress rule. The sinkhole must belong to the same account as the zone.`,builder:Je,handler:async e=>{if(e.dryRun){s({command:`cf intel sinkholes ingresses update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses/${e[`ingress-id`]==null?`<ingress-id>`:encodeURIComponent(String(e[`ingress-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``),"ingress-id":String(e[`ingress-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({cidr:d(e.cidr,`cidr`,`text`)}):l(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);o(await c(`Updating`,async()=>t.intel.sinkholes.ingresses.update({body:r,zone_id:n,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]})),{successLabel:`Updated`});return}e.cidr===void 0&&(e.cidr=await p(`cidr`,`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`));let i=u({cidr:d(e.cidr,`cidr`,`text`)});o(await c(`Updating`,async()=>t.intel.sinkholes.ingresses.update({body:i,zone_id:n,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]})),{successLabel:`Updated`})}},Ye={command:`ingresses`,describe:`Operations for sinkholes.ingresses`,builder:e=>e.command(Ve).command(Ue).command(Ge).command(qe).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Xe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ze={command:`list`,describe:`Lists sinkholes owned by the account for redirecting malicious traffic.`,builder:Xe,handler:async r=>{if(r.dryRun){s({command:`cf intel sinkholes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/sinkholes`,pathParams:{},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.sinkholes.list({account_id:l})),{successLabel:`Loaded`})}};function Qe(e){return e.positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the sinkhole.`}).option(`r2-bucket`,{type:`string`,description:`The name of the R2 bucket to store results. Required if you want to store large request bodies in R2.`}).option(`r2-id`,{type:`string`,description:`The id of the R2 instance. Required if you want to store large request bodies in R2.`}).option(`r2-secret`,{type:`string`,description:`The secret key for the R2 API token. Required if you want to store large request bodies in R2.`}).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 $e={command:`update <sinkhole-id>`,describe:`Replaces the name or R2 configuration of the specified sinkhole. This is a full replacement. All fields, including r2_secret, must be re-supplied. Omitting r2_secret overwrites the stored value with an empty string.`,builder:Qe,handler:async r=>{if(r.dryRun){s({command:`cf intel sinkholes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/sinkholes/${r[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(r[`sinkhole-id`]))}`,pathParams:{"sinkhole-id":String(r[`sinkhole-id`]??``)},bodyKind:`json`,body:r.body===void 0?u({name:d(r.name,`name`,`text`),r2_bucket:d(r[`r2-bucket`],`r2-bucket`,`text`),r2_id:d(r[`r2-id`],`r2-id`,`text`),r2_secret:d(r[`r2-secret`],`r2-secret`,`text`)}):l(r.body)});return}let i=await a(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);o(await c(`Updating`,async()=>i.intel.sinkholes.update({body:e,account_id:f,sinkhole_id:r[`sinkhole-id`]})),{successLabel:`Updated`});return}r.name===void 0&&(r.name=await p(`name`,`The name of the sinkhole.`));let m=u({name:d(r.name,`name`,`text`),r2_bucket:d(r[`r2-bucket`],`r2-bucket`,`text`),r2_id:d(r[`r2-id`],`r2-id`,`text`),r2_secret:d(r[`r2-secret`],`r2-secret`,`text`)});o(await c(`Updating`,async()=>i.intel.sinkholes.update({body:m,account_id:f,sinkhole_id:r[`sinkhole-id`]})),{successLabel:`Updated`})}},et={command:`sinkholes`,describe:`Operations for sinkholes`,builder:e=>e.command(Fe).command(Le).command(ze).command(Ze).command($e).command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function tt(e){return e.option(`url`,{type:`string`,description:`The URL to look up.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const nt={command:`get`,describe:`Gets security information about a URL, including content categories and risk types. The URL must be provided as a query parameter.`,builder:tt,handler:async r=>{let i={url:r.url};if(r.dryRun){s({command:`cf intel urls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/url`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.urls.get({account_id:u,...i})),{successLabel:`Loaded`})}},rt={command:`urls`,describe:`URL intelligence operations`,builder:e=>e.command(nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function it(e){return e.option(`domain`,{type:`string`,description:`Domain`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const at={command:`get`,describe:`Retrieves WHOIS registration data for a domain, including registrant and nameserver information.`,builder:it,handler:async r=>{let i={domain:r.domain};if(r.dryRun){s({command:`cf intel whois get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/whois`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.whois.get({account_id:u,...i})),{successLabel:`Loaded`})}},ot={command:`whois`,describe:`Operations for whois`,builder:e=>e.command(at).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},st={command:`intel`,describe:`Threat intelligence lookups — IP reputation, domain info, ASN details, WHOIS, and indicator feeds`,builder:e=>e.command(x).command(I).command(z).command(H).command(J).command(we).command(De).command(Ae).command(Ne).command(et).command(rt).command(ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{st as default};
8
+ `);return}o(await c(`Deleting`,async()=>t.intel.sinkholes.ingresses.delete({zone_id:n,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]})),{successLabel:`Deleted`})}};function We(e){return e.positional(`ingress-id`,{type:`string`,description:`The unique identifier for the ingress rule.`,demandOption:!0}).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ge={command:`get <ingress-id>`,describe:`Get the specified ingress rule associated with a sinkhole. The sinkhole must belong to the same account as the zone.`,builder:We,handler:async e=>{if(e.dryRun){s({command:`cf intel sinkholes ingresses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses/${e[`ingress-id`]==null?`<ingress-id>`:encodeURIComponent(String(e[`ingress-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``),"ingress-id":String(e[`ingress-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.intel.sinkholes.ingresses.get({zone_id:n,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]})),{successLabel:`Loaded`})}};function Ke(e){return e.option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qe={command:`list`,describe:`Returns all ingress rules associated with the specified sinkhole.`,builder:Ke,handler:async i=>{if(i.dryRun){let e=i.zone===void 0?await n():void 0,t=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf intel sinkholes ingresses list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/intel/sinkholes/${i[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(i[`sinkhole-id`]))}/ingresses`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r),"sinkhole-id":String(i[`sinkhole-id`]??``)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await t();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.intel.sinkholes.ingresses.list({account_or_zone:u,account_or_zone_id:d,sinkhole_id:i[`sinkhole-id`]})),{successLabel:`Loaded`})}};function Je(e){return e.positional(`ingress-id`,{type:`string`,description:`The unique identifier for the ingress rule.`,demandOption:!0}).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`cidr`,{type:`string`,description:`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const $={command:`update <ingress-id>`,describe:`Replaces the specified ingress rule. The sinkhole must belong to the same account as the zone.`,builder:Je,handler:async e=>{if(e.dryRun){s({command:`cf intel sinkholes ingresses update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses/${e[`ingress-id`]==null?`<ingress-id>`:encodeURIComponent(String(e[`ingress-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``),"ingress-id":String(e[`ingress-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({cidr:d(e.cidr,`cidr`,`text`)}):l(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);o(await c(`Updating`,async()=>t.intel.sinkholes.ingresses.update({body:r,zone_id:n,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]})),{successLabel:`Updated`});return}e.cidr===void 0&&(e.cidr=await p(`cidr`,`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`));let i=u({cidr:d(e.cidr,`cidr`,`text`)});o(await c(`Updating`,async()=>t.intel.sinkholes.ingresses.update({body:i,zone_id:n,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]})),{successLabel:`Updated`})}},Ye={command:`ingresses`,describe:`Operations for sinkholes.ingresses`,builder:e=>e.command(Ve).command(Ue).command(Ge).command(qe).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Xe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ze={command:`list`,describe:`Lists sinkholes owned by the account for redirecting malicious traffic.`,builder:Xe,handler:async r=>{if(r.dryRun){s({command:`cf intel sinkholes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/sinkholes`,pathParams:{},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.intel.sinkholes.list({account_id:l})),{successLabel:`Loaded`})}};function Qe(e){return e.positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the sinkhole.`}).option(`r2-bucket`,{type:`string`,description:`The name of the R2 bucket to store results. Required if you want to store large request bodies in R2.`}).option(`r2-id`,{type:`string`,description:`The id of the R2 instance. Required if you want to store large request bodies in R2.`}).option(`r2-secret`,{type:`string`,description:`The secret key for the R2 API token. Required if you want to store large request bodies in R2.`}).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 $e={command:`update <sinkhole-id>`,describe:`Replaces the name or R2 configuration of the specified sinkhole. This is a full replacement. All fields, including r2_secret, must be re-supplied. Omitting r2_secret overwrites the stored value with an empty string.`,builder:Qe,handler:async r=>{if(r.dryRun){s({command:`cf intel sinkholes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/sinkholes/${r[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(r[`sinkhole-id`]))}`,pathParams:{"sinkhole-id":String(r[`sinkhole-id`]??``)},bodyKind:`json`,body:r.body===void 0?u({name:d(r.name,`name`,`text`),r2_bucket:d(r[`r2-bucket`],`r2-bucket`,`text`),r2_id:d(r[`r2-id`],`r2-id`,`text`),r2_secret:d(r[`r2-secret`],`r2-secret`,`text`)}):l(r.body)});return}let i=await a(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);o(await c(`Updating`,async()=>i.intel.sinkholes.update({body:e,account_id:f,sinkhole_id:r[`sinkhole-id`]})),{successLabel:`Updated`});return}r.name===void 0&&(r.name=await p(`name`,`The name of the sinkhole.`));let m=u({name:d(r.name,`name`,`text`),r2_bucket:d(r[`r2-bucket`],`r2-bucket`,`text`),r2_id:d(r[`r2-id`],`r2-id`,`text`),r2_secret:d(r[`r2-secret`],`r2-secret`,`text`)});o(await c(`Updating`,async()=>i.intel.sinkholes.update({body:m,account_id:f,sinkhole_id:r[`sinkhole-id`]})),{successLabel:`Updated`})}},et={command:`sinkholes`,describe:`Operations for sinkholes`,builder:e=>e.command(Fe).command(Le).command(ze).command(Ze).command($e).command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function tt(e){return e.option(`url`,{type:`string`,description:`The URL to look up.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const nt={command:`get`,describe:`Gets security information about a URL, including content categories and risk types. The URL must be provided as a query parameter.`,builder:tt,handler:async r=>{let i={url:r.url};if(r.dryRun){s({command:`cf intel urls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/url`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.urls.get({account_id:u,...i})),{successLabel:`Loaded`})}},rt={command:`urls`,describe:`URL intelligence operations`,builder:e=>e.command(nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function it(e){return e.option(`domain`,{type:`string`,description:`Domain`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const at={command:`get`,describe:`Retrieves WHOIS registration data for a domain, including registrant and nameserver information.`,builder:it,handler:async r=>{let i={domain:r.domain};if(r.dryRun){s({command:`cf intel whois get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/intel/whois`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.intel.whois.get({account_id:u,...i})),{successLabel:`Loaded`})}},ot={command:`whois`,describe:`Operations for whois`,builder:e=>e.command(at).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},st={command:`intel`,describe:`Threat intelligence lookups — IP reputation, domain info, ASN details, WHOIS, and indicator feeds`,builder:e=>e.command(x).command(I).command(z).command(H).command(J).command(we).command(De).command(Ae).command(Ne).command(et).command(rt).command(ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{st as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,r as t,t as n}from"./chunk-vbHwaUoU.mjs";import{o as r,s as i}from"./session-Ckt20hHa.mjs";import{X as a}from"./chunk-LQW53VED-Xakf_rUn.mjs";import"node:fs";import{styleText as o}from"node:util";import"node:path";import"node:os";import s,{stdin as c,stdout as l}from"node:process";import{ReadStream as u}from"node:tty";import*as d from"node:readline";import f from"node:readline";const p=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,m=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,h=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,g=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,_=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,v=/\t{1,1000}/y,y=/[\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,b=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,x=/\p{M}+/gu,S={limit:1/0,ellipsis:``},ee=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?ee(i,S,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,te=n.wideWidth??2,C=0,w=0,T=e.length,E=0,D=!1,O=T,k=Math.max(0,r-a),A=0,j=0,M=0,N=0;outer:for(;;){if(j>A||w>=T&&w>C){let t=e.slice(A,j)||e.slice(C,w);E=0;for(let e of t.replaceAll(x,``)){let t=e.codePointAt(0)||0;if(N=m(t)?d:h(t)?te:l!==f&&p(t)?l:f,M+N>k&&(O=Math.min(O,Math.max(A,C)+E)),M+N>r){D=!0;break outer}E+=e.length,M+=N}A=j=0}if(w>=T)break;if(b.lastIndex=w,b.test(e)){if(E=b.lastIndex-w,N=E*f,M+N>k&&(O=Math.min(O,w+Math.floor((k-M)/f))),M+N>r){D=!0;break}M+=N,A=C,j=w,w=C=b.lastIndex;continue}if(g.lastIndex=w,g.test(e)){if(M+o>k&&(O=Math.min(O,w)),M+o>r){D=!0;break}M+=o,A=C,j=w,w=C=g.lastIndex;continue}if(_.lastIndex=w,_.test(e)){if(E=_.lastIndex-w,N=E*s,M+N>k&&(O=Math.min(O,w+Math.floor((k-M)/s))),M+N>r){D=!0;break}M+=N,A=C,j=w,w=C=_.lastIndex;continue}if(v.lastIndex=w,v.test(e)){if(E=v.lastIndex-w,N=E*c,M+N>k&&(O=Math.min(O,w+Math.floor((k-M)/c))),M+N>r){D=!0;break}M+=N,A=C,j=w,w=C=v.lastIndex;continue}if(y.lastIndex=w,y.test(e)){if(M+u>k&&(O=Math.min(O,w)),M+u>r){D=!0;break}M+=u,A=C,j=w,w=C=y.lastIndex;continue}w+=1}return{width:D?k:M,index:D?O:T,truncated:D,ellipsed:D&&r>=a}},te={limit:1/0,ellipsis:``,ellipsisWidth:0},C=(e,t={})=>ee(e,te,t).width,w=`]8;;`,T=RegExp(`(?:\\[(?<code>\\d+)m|\\${w}(?<uri>.*))`,`y`),E=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},D=e=>`[${e}m`,O=e=>`${w}${e}`,k=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:C(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=C(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===`›`)&&(i=!0,a=t.startsWith(w,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())},A=e=>{let t=e.split(` `),n=t.length;for(;n&&!C(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},j=(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=C(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=C(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(``),k(s,r,t),c=C(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){k(s,r,t),c=C(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){k(s,r,t),c=C(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>A(e)));let l=s.join(`
2
+ import{i as e,r as t,t as n}from"./chunk-vbHwaUoU.mjs";import{o as r,s as i}from"./session-D6KHthHf.mjs";import{X as a}from"./chunk-LQW53VED-DLrXV-hE.mjs";import"node:fs";import{styleText as o}from"node:util";import"node:path";import"node:os";import s,{stdin as c,stdout as l}from"node:process";import{ReadStream as u}from"node:tty";import*as d from"node:readline";import f from"node:readline";const p=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,m=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,h=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,g=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,_=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,v=/\t{1,1000}/y,y=/[\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,b=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,x=/\p{M}+/gu,S={limit:1/0,ellipsis:``},ee=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?ee(i,S,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,te=n.wideWidth??2,C=0,w=0,T=e.length,E=0,D=!1,O=T,k=Math.max(0,r-a),A=0,j=0,M=0,N=0;outer:for(;;){if(j>A||w>=T&&w>C){let t=e.slice(A,j)||e.slice(C,w);E=0;for(let e of t.replaceAll(x,``)){let t=e.codePointAt(0)||0;if(N=m(t)?d:h(t)?te:l!==f&&p(t)?l:f,M+N>k&&(O=Math.min(O,Math.max(A,C)+E)),M+N>r){D=!0;break outer}E+=e.length,M+=N}A=j=0}if(w>=T)break;if(b.lastIndex=w,b.test(e)){if(E=b.lastIndex-w,N=E*f,M+N>k&&(O=Math.min(O,w+Math.floor((k-M)/f))),M+N>r){D=!0;break}M+=N,A=C,j=w,w=C=b.lastIndex;continue}if(g.lastIndex=w,g.test(e)){if(M+o>k&&(O=Math.min(O,w)),M+o>r){D=!0;break}M+=o,A=C,j=w,w=C=g.lastIndex;continue}if(_.lastIndex=w,_.test(e)){if(E=_.lastIndex-w,N=E*s,M+N>k&&(O=Math.min(O,w+Math.floor((k-M)/s))),M+N>r){D=!0;break}M+=N,A=C,j=w,w=C=_.lastIndex;continue}if(v.lastIndex=w,v.test(e)){if(E=v.lastIndex-w,N=E*c,M+N>k&&(O=Math.min(O,w+Math.floor((k-M)/c))),M+N>r){D=!0;break}M+=N,A=C,j=w,w=C=v.lastIndex;continue}if(y.lastIndex=w,y.test(e)){if(M+u>k&&(O=Math.min(O,w)),M+u>r){D=!0;break}M+=u,A=C,j=w,w=C=y.lastIndex;continue}w+=1}return{width:D?k:M,index:D?O:T,truncated:D,ellipsed:D&&r>=a}},te={limit:1/0,ellipsis:``,ellipsisWidth:0},C=(e,t={})=>ee(e,te,t).width,w=`]8;;`,T=RegExp(`(?:\\[(?<code>\\d+)m|\\${w}(?<uri>.*))`,`y`),E=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},D=e=>`[${e}m`,O=e=>`${w}${e}`,k=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:C(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=C(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===`›`)&&(i=!0,a=t.startsWith(w,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())},A=e=>{let t=e.split(` `),n=t.length;for(;n&&!C(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},j=(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=C(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=C(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(``),k(s,r,t),c=C(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){k(s,r,t),c=C(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){k(s,r,t),c=C(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>A(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===`›`){T.lastIndex=e+1;let t=T.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+=O(``));let e=i?E(i):void 0;i&&e&&(r+=D(e))}else t===`
5
5
  `&&(i&&E(i)&&(r+=D(i)),a&&(r+=O(a)))}return r},M=/\r?\n/;function N(e,t,n){return String(e).normalize().split(M).map(e=>j(e,t,n)).join(`
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./auth-DuLchM18.mjs";import{t}from"./output-DgW1hQGX.mjs";import{n,t as r}from"./progress-B84wYh91.mjs";function i(e){return e.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 a={command:`list`,describe:`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.`,builder:i,handler:async i=>{let a={networks:i.networks};if(i.dryRun){n({command:`cf ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/ips`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.ips.list(a)),{successLabel:`Loaded`})}},o={command:`ips`,describe:`ips`,builder:e=>e.command(a).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{o as default};
2
+ import{r as e}from"./auth-MQEamPN9.mjs";import{t}from"./output-DrpYYfnB.mjs";import{n,t as r}from"./progress-CsHIt3Tp.mjs";function i(e){return e.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 a={command:`list`,describe:`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.`,builder:i,handler:async i=>{let a={networks:i.networks};if(i.dryRun){n({command:`cf ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/ips`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.ips.list(a)),{successLabel:`Loaded`})}},o={command:`ips`,describe:`ips`,builder:e=>e.command(a).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{o as default};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{h as e}from"./oauth-BPizUUqP.mjs";import{r as t}from"./auth-DuLchM18.mjs";import{t as n}from"./output-DgW1hQGX.mjs";import{n as r,t as i}from"./progress-B84wYh91.mjs";import{n as a,t as o}from"./body-parser-CYD7PKFC.mjs";import{n as s}from"./input-validation-BBKJRoRB.mjs";import{a as c,n as l}from"./prompt-CDtLWxNv.mjs";function u(e){return e.option(`bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`],default:`ubiquitous`}).option(`certificate`,{type:`string`,description:`The zone's SSL certificate or SSL certificate and intermediate(s).`}).option(`host`,{type:`string`,description:`The keyless SSL name.`}).option(`name`,{type:`string`,description:`The keyless SSL name.`}).option(`port`,{type:`number`,description:`The keyless SSL port used to communicate between Cloudflare and the client's Keyless SSL server.`,default:24008}).option(`tunnel-private-ip`,{type:`string`,description:`Private IP of the Key Server Host.`}).option(`tunnel-vnet-id`,{type:`string`,description:`Cloudflare Tunnel Virtual Network ID.`}).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=>{if([`tunnel-private-ip`,`tunnel-vnet-id`].some(t=>e[t]!==void 0)){let t=[`tunnel-private-ip`,`tunnel-vnet-id`].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 --tunnel-* flag is set`)}return!0})}const d={command:`create`,describe:`Creates a Keyless SSL configuration that allows SSL/TLS termination without exposing private keys to Cloudflare. Keys remain on your infrastructure.`,builder:u,handler:async l=>{if(l.dryRun){r({command:`cf keyless-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/keyless_certificates`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({bundle_method:s(l[`bundle-method`],`bundle-method`,`text`),certificate:s(l.certificate,`certificate`,`text`),host:s(l.host,`host`,`text`),name:s(l.name,`name`,`text`),port:l.port,tunnel:{private_ip:s(l[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:s(l[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}):a(l.body)});return}let u=await t(l),d=await e({zone:l.zone},u,{quiet:l.quiet});if(l.zoneId=d,l.body){let e=a(l.body);n(await i(`Creating`,async()=>u.keylessCertificates.create({...e,zone_id:d})),{successLabel:`Created`});return}if(l.certificate===void 0&&(l.certificate=await c(`certificate`,`The zone's SSL certificate or SSL certificate and intermediate(s).`)),l.host===void 0&&(l.host=await c(`host`,`The keyless SSL name.`)),l.port===void 0)throw Error(`--port is required (or pass --body with this field set).`);let f=o({bundle_method:s(l[`bundle-method`],`bundle-method`,`text`),certificate:s(l.certificate,`certificate`,`text`),host:s(l.host,`host`,`text`),name:s(l.name,`name`,`text`),port:l.port,tunnel:{private_ip:s(l[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:s(l[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}});n(await i(`Creating`,async()=>u.keylessCertificates.create({...f,zone_id:d})),{successLabel:`Created`})}};function f(e){return e.positional(`keyless-certificate-id`,{type:`string`,description:`Identifier.`,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 p={command:`delete <keyless-certificate-id>`,describe:`Removes a Keyless SSL configuration. SSL connections will no longer use the keyless server for cryptographic operations.`,builder:f,handler:async a=>{if(a.dryRun){r({command:`cf keyless-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/keyless_certificates/${a[`keyless-certificate-id`]==null?`<keyless-certificate-id>`:encodeURIComponent(String(a[`keyless-certificate-id`]))}`,pathParams:{"keyless-certificate-id":String(a[`keyless-certificate-id`]??``),"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await l({force:!!a.force})){process.stderr.write(`Aborted.
2
+ import{h as e}from"./oauth-B0ETkNcX.mjs";import{r as t}from"./auth-MQEamPN9.mjs";import{t as n}from"./output-DrpYYfnB.mjs";import{n as r,t as i}from"./progress-CsHIt3Tp.mjs";import{n as a,t as o}from"./body-parser-C-c9gfH1.mjs";import{n as s}from"./input-validation-Bav2M9F-.mjs";import{a as c,n as l}from"./prompt-DdegNPpg.mjs";function u(e){return e.option(`bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`],default:`ubiquitous`}).option(`certificate`,{type:`string`,description:`The zone's SSL certificate or SSL certificate and intermediate(s).`}).option(`host`,{type:`string`,description:`The keyless SSL name.`}).option(`name`,{type:`string`,description:`The keyless SSL name.`}).option(`port`,{type:`number`,description:`The keyless SSL port used to communicate between Cloudflare and the client's Keyless SSL server.`,default:24008}).option(`tunnel-private-ip`,{type:`string`,description:`Private IP of the Key Server Host.`}).option(`tunnel-vnet-id`,{type:`string`,description:`Cloudflare Tunnel Virtual Network ID.`}).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=>{if([`tunnel-private-ip`,`tunnel-vnet-id`].some(t=>e[t]!==void 0)){let t=[`tunnel-private-ip`,`tunnel-vnet-id`].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 --tunnel-* flag is set`)}return!0})}const d={command:`create`,describe:`Creates a Keyless SSL configuration that allows SSL/TLS termination without exposing private keys to Cloudflare. Keys remain on your infrastructure.`,builder:u,handler:async l=>{if(l.dryRun){r({command:`cf keyless-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/keyless_certificates`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({bundle_method:s(l[`bundle-method`],`bundle-method`,`text`),certificate:s(l.certificate,`certificate`,`text`),host:s(l.host,`host`,`text`),name:s(l.name,`name`,`text`),port:l.port,tunnel:{private_ip:s(l[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:s(l[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}):a(l.body)});return}let u=await t(l),d=await e({zone:l.zone},u,{quiet:l.quiet});if(l.zoneId=d,l.body){let e=a(l.body);n(await i(`Creating`,async()=>u.keylessCertificates.create({...e,zone_id:d})),{successLabel:`Created`});return}if(l.certificate===void 0&&(l.certificate=await c(`certificate`,`The zone's SSL certificate or SSL certificate and intermediate(s).`)),l.host===void 0&&(l.host=await c(`host`,`The keyless SSL name.`)),l.port===void 0)throw Error(`--port is required (or pass --body with this field set).`);let f=o({bundle_method:s(l[`bundle-method`],`bundle-method`,`text`),certificate:s(l.certificate,`certificate`,`text`),host:s(l.host,`host`,`text`),name:s(l.name,`name`,`text`),port:l.port,tunnel:{private_ip:s(l[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:s(l[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}});n(await i(`Creating`,async()=>u.keylessCertificates.create({...f,zone_id:d})),{successLabel:`Created`})}};function f(e){return e.positional(`keyless-certificate-id`,{type:`string`,description:`Identifier.`,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 p={command:`delete <keyless-certificate-id>`,describe:`Removes a Keyless SSL configuration. SSL connections will no longer use the keyless server for cryptographic operations.`,builder:f,handler:async a=>{if(a.dryRun){r({command:`cf keyless-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/keyless_certificates/${a[`keyless-certificate-id`]==null?`<keyless-certificate-id>`:encodeURIComponent(String(a[`keyless-certificate-id`]))}`,pathParams:{"keyless-certificate-id":String(a[`keyless-certificate-id`]??``),"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await l({force:!!a.force})){process.stderr.write(`Aborted.
3
3
  `);return}n(await i(`Deleting`,async()=>o.keylessCertificates.delete({zone_id:s,keyless_certificate_id:a[`keyless-certificate-id`]})),{successLabel:`Deleted`})}};function m(e){return e.positional(`keyless-certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`Whether or not the Keyless SSL is on or off.`}).option(`host`,{type:`string`,description:`The keyless SSL name.`}).option(`name`,{type:`string`,description:`The keyless SSL name.`}).option(`port`,{type:`number`,description:`The keyless SSL port used to communicate between Cloudflare and the client's Keyless SSL server.`}).option(`tunnel-private-ip`,{type:`string`,description:`Private IP of the Key Server Host.`}).option(`tunnel-vnet-id`,{type:`string`,description:`Cloudflare Tunnel Virtual Network ID.`}).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=>{if([`tunnel-private-ip`,`tunnel-vnet-id`].some(t=>e[t]!==void 0)){let t=[`tunnel-private-ip`,`tunnel-vnet-id`].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 --tunnel-* flag is set`)}return!0})}const h={command:`edit <keyless-certificate-id>`,describe:`This will update attributes of a Keyless SSL. Consists of one or more of the following: host,name,port.`,builder:m,handler:async c=>{if(c.dryRun){r({command:`cf keyless-certificates edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/keyless_certificates/${c[`keyless-certificate-id`]==null?`<keyless-certificate-id>`:encodeURIComponent(String(c[`keyless-certificate-id`]))}`,pathParams:{"keyless-certificate-id":String(c[`keyless-certificate-id`]??``),"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({enabled:c.enabled,host:s(c.host,`host`,`text`),name:s(c.name,`name`,`text`),port:c.port,tunnel:{private_ip:s(c[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:s(c[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}):a(c.body)});return}let l=await t(c),u=await e({zone:c.zone},l,{quiet:c.quiet});if(c.zoneId=u,c.body){let e=a(c.body);n(await i(`Updating`,async()=>l.keylessCertificates.edit({...e,zone_id:u,keyless_certificate_id:c[`keyless-certificate-id`]})),{successLabel:`Updated`});return}let d=o({enabled:c.enabled,host:s(c.host,`host`,`text`),name:s(c.name,`name`,`text`),port:c.port,tunnel:{private_ip:s(c[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:s(c[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}});n(await i(`Updating`,async()=>l.keylessCertificates.edit({...d,zone_id:u,keyless_certificate_id:c[`keyless-certificate-id`]})),{successLabel:`Updated`})}};function g(e){return e.positional(`keyless-certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get <keyless-certificate-id>`,describe:`Get details for one Keyless SSL configuration.`,builder:g,handler:async a=>{if(a.dryRun){r({command:`cf keyless-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/keyless_certificates/${a[`keyless-certificate-id`]==null?`<keyless-certificate-id>`:encodeURIComponent(String(a[`keyless-certificate-id`]))}`,pathParams:{"keyless-certificate-id":String(a[`keyless-certificate-id`]??``),"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.keylessCertificates.get({zone_id:s,keyless_certificate_id:a[`keyless-certificate-id`]})),{successLabel:`Loaded`})}};function v(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`list`,describe:`List all Keyless SSL configurations for a given zone.`,builder:v,handler:async a=>{if(a.dryRun){r({command:`cf keyless-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/keyless_certificates`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.keylessCertificates.list({zone_id:s})),{successLabel:`Loaded`})}},b={command:`keyless-certificates`,describe:`keyless-certificates`,builder:e=>e.command(d).command(p).command(h).command(_).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n}from"./oauth-BPizUUqP.mjs";import{r}from"./auth-DuLchM18.mjs";import{t as i}from"./output-DgW1hQGX.mjs";import{n as a,t as o}from"./progress-B84wYh91.mjs";function s(e){return e.option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`list`,describe:`Lists all distinct tag keys used across resources in an account.`,builder:s,handler:async s=>{let c={cursor:s.cursor};if(s.dryRun){a({command:`cf keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/tags/keys`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.keys.list({account_id:u,...c})),{successLabel:`Loaded`})}},l={command:`keys`,describe:`keys`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{l as default};
2
+ import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n}from"./oauth-B0ETkNcX.mjs";import{r}from"./auth-MQEamPN9.mjs";import{t as i}from"./output-DrpYYfnB.mjs";import{n as a,t as o}from"./progress-CsHIt3Tp.mjs";function s(e){return e.option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`list`,describe:`Lists all distinct tag keys used across resources in an account.`,builder:s,handler:async s=>{let c={cursor:s.cursor};if(s.dryRun){a({command:`cf keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/tags/keys`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.keys.list({account_id:u,...c})),{successLabel:`Loaded`})}},l={command:`keys`,describe:`keys`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{l as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n}from"./oauth-BPizUUqP.mjs";import{a as r,r as i}from"./auth-DuLchM18.mjs";import{t as a}from"./output-DgW1hQGX.mjs";import{n as o,t as s}from"./progress-B84wYh91.mjs";import{n as c,t as l}from"./body-parser-CYD7PKFC.mjs";import{n as u,t as d}from"./input-validation-BBKJRoRB.mjs";import{a as f,n as p}from"./prompt-CDtLWxNv.mjs";import{t as m}from"./cli-types-BWdZbsFE.mjs";import{n as h,t as g}from"./raw-fetch-Dz-QBoP_.mjs";function _(e){return e.positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,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 v={command:`delete <namespace-id>`,describe:`Remove multiple KV pairs from the namespace. Body should be an array of up to 10,000 keys to be removed.`,builder:_,handler:async l=>{if(l.dryRun){o({command:`cf kv bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${l[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(l[`namespace-id`]))}/bulk/delete`,pathParams:{"namespace-id":String(l[`namespace-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let u=await i(l),d=l.local?e:await t();if(l.accountId=d,!await p({force:!!l.force,message:`This operation deletes the specified keys from the namespace.`})){process.stderr.write(`Aborted.
2
+ import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n}from"./oauth-B0ETkNcX.mjs";import{a as r,r as i}from"./auth-MQEamPN9.mjs";import{t as a}from"./output-DrpYYfnB.mjs";import{n as o,t as s}from"./progress-CsHIt3Tp.mjs";import{n as c,t as l}from"./body-parser-C-c9gfH1.mjs";import{n as u,t as d}from"./input-validation-Bav2M9F-.mjs";import{a as f,n as p}from"./prompt-DdegNPpg.mjs";import{t as m}from"./cli-types-BsTty22w.mjs";import{n as h,t as g}from"./raw-fetch-CteyTOM2.mjs";function _(e){return e.positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,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 v={command:`delete <namespace-id>`,describe:`Remove multiple KV pairs from the namespace. Body should be an array of up to 10,000 keys to be removed.`,builder:_,handler:async l=>{if(l.dryRun){o({command:`cf kv bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${l[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(l[`namespace-id`]))}/bulk/delete`,pathParams:{"namespace-id":String(l[`namespace-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let u=await i(l),d=l.local?e:await t();if(l.accountId=d,!await p({force:!!l.force,message:`This operation deletes the specified keys from the namespace.`})){process.stderr.write(`Aborted.
3
3
  `);return}if(l.body){let e=c(l.body);if(Array.isArray(e)&&e.length>1e4){let t=Math.ceil(e.length/1e4),n=null;for(let i=0;i<e.length;i+=1e4){let a=e.slice(i,i+1e4);n=await s(`Deleting: batch ${Math.floor(i/1e4)+1}/${t}`,async()=>r(u,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/bulk/delete`,{body:a}))}a(n,{successLabel:`Deleted`});return}a(await s(`Deleting`,async()=>r(u,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/bulk/delete`,{body:e})),{successLabel:`Deleted`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function y(e){return e.positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`keys`,{type:`string`,array:!0,description:`Array of keys to retrieve (maximum of 100).`}).option(`type`,{type:`string`,description:`Whether to parse JSON values in the response.`,choices:[`text`,`json`],default:`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 b={command:`get <namespace-id>`,describe:"Retrieve up to 100 KV pairs from the namespace. Keys must contain text-based values. JSON values can optionally be parsed instead of being returned as a string value. Metadata can be included if `withMetadata` is true.",builder:y,handler:async r=>{if(r.dryRun){o({command:`cf kv bulk get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/bulk/get`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`json`,body:r.body===void 0?l({keys:r.keys,type:u(r.type,`type`,`text`),withMetadata:r[`with-metadata`]}):c(r.body)});return}let d=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=c(r.body);a(await s(`Creating`,async()=>d.kv.bulk.get({...e,account_id:f,namespace_id:r[`namespace-id`]})),{successLabel:`Created`});return}if(r.keys===void 0)throw Error(`--keys is required (or pass --body with this field set).`);let p=l({keys:r.keys,type:u(r.type,`type`,`text`),withMetadata:r[`with-metadata`]});a(await s(`Creating`,async()=>d.kv.bulk.get({...p,account_id:f,namespace_id:r[`namespace-id`]})),{successLabel:`Created`})}};function x(e){return e.positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,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 S={command:`update <namespace-id>`,describe:"Write multiple keys and values at once. Body should be an array of up to 10,000 key-value pairs to be stored, along with optional expiration information. Existing values and expirations will be overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will never expire. If both are set, `expiration_ttl` is used and `expiration` is ignored. The entire request size must be 100 megabytes or less.",builder:x,handler:async l=>{if(l.dryRun){o({command:`cf kv bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${l[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(l[`namespace-id`]))}/bulk`,pathParams:{"namespace-id":String(l[`namespace-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let u=await i(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=c(l.body);if(Array.isArray(e)&&e.length>1e4){let t=Math.ceil(e.length/1e4),n=null;for(let i=0;i<e.length;i+=1e4){let a=e.slice(i,i+1e4);n=await s(`Updating: batch ${Math.floor(i/1e4)+1}/${t}`,async()=>r(u,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/bulk`,{body:a}))}a(n,{successLabel:`Updated`});return}a(await s(`Updating`,async()=>r(u,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/bulk`,{body:e})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},C={command:`bulk`,describe:`Operations for bulk`,builder:e=>e.command(v).command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.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:`Namespace identifier tag.`,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 T={command:`delete <key-name>`,describe:"Remove a KV pair from the namespace. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name.",builder:w,handler:async r=>{if(r.dryRun){o({command:`cf kv keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/values/${r[`key-name`]==null?`<key-name>`:encodeURIComponent(String(r[`key-name`]))}`,pathParams:{"key-name":String(r[`key-name`]??``),"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await p({force:!!r.force})){process.stderr.write(`Aborted.
4
4
  `);return}a(await s(`Deleting`,async()=>c.kv.keys.delete({account_id:l,namespace_id:r[`namespace-id`],key_name:r[`key-name`]})),{successLabel:`Deleted`})}};function E(e){return e.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:`Namespace identifier tag.`,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 D={command:`get <key-name>`,describe:"Returns the value associated with the given key in the given namespace. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name. If the KV-pair is set to expire at some point, the expiration time as measured in seconds since the UNIX epoch will be returned in the `expiration` response header.",builder:E,handler:async r=>{if(r.dryRun){o({command:`cf kv keys get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/values/${r[`key-name`]==null?`<key-name>`:encodeURIComponent(String(r[`key-name`]))}`,pathParams:{"key-name":String(r[`key-name`]??``),"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}await i(r);let a=r.local?e:await t();r.accountId=a;let c=await s(`Loading`,async()=>g(`/accounts/${a}/storage/kv/namespaces/${encodeURIComponent(String(r[`namespace-id`]))}/values/${encodeURIComponent(String(r[`key-name`]))}`,{method:`GET`,local:r.local===!0,persistTo:r.persistTo}));h(r.text===!0?c.toString(`utf-8`):c)}};function O(e){return e.option(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of keys returned in the response. The cursor attribute may be used to iterate over the next batch of keys if there are more than the limit.`}).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 token indicating the position from which to continue when requesting the next set of records if the amount of list results was limited by the limit parameter. A valid value for the cursor can be obtained from the `cursors` object in the `result_info` structure."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`Lists a namespace's keys.`,builder:O,handler:async r=>{let c={limit:r.limit,prefix:r.prefix,cursor:r.cursor};if(r.dryRun){o({command:`cf kv keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/keys`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.kv.keys.list({account_id:u,namespace_id:r[`namespace-id`],...c})),{successLabel:`Loaded`})}};function A(e){return e.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:`Namespace identifier tag.`,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:`Expires the key after a number of seconds. Must be at least 60.`}).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:`The metadata`})}const j={command:`update <key-name>`,describe:"Write a value identified by a key. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name. Body should be the value to be stored. If JSON metadata to be associated with the key/value pair is needed, use `multipart/form-data` content type for your PUT request (see dropdown below in `REQUEST BODY SCHEMA`). Existing values, expirations, and metadata will be overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will never expire. If both are set, `expiration_ttl` is used and `expiration` is ignored.",builder:A,handler:async c=>{let l={expiration:c.expiration,expiration_ttl:c[`expiration-ttl`]};if(c.dryRun){o({command:`cf kv keys update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${c[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(c[`namespace-id`]))}/values/${c[`key-name`]==null?`<key-name>`:encodeURIComponent(String(c[`key-name`]))}`,pathParams:{"key-name":String(c[`key-name`]??``),"namespace-id":String(c[`namespace-id`]??``)},query:l,bodyKind:c.metadata===void 0?`octet-stream`:`multipart`,body:c.metadata===void 0?c.body:{body:c.body,file:c.file,metadata:c.metadata}});return}let f=await i(c),p=c.local?e:await t();if(c.accountId=p,c.metadata!==void 0){let e=new FormData;if(c.file){let t=d(c.file);e.append(`value`,new Blob([t]),c.file.split(/[\\/]/).filter(Boolean).pop())}else c.body!==void 0&&e.append(`value`,c.body);c.metadata!==void 0&&e.append(`metadata`,String(u(c.metadata,`metadata`,`text`)??``)),a(await s(`Updating`,async()=>r(f,`PUT`,`/accounts/${p}/storage/kv/namespaces/${encodeURIComponent(String(c[`namespace-id`]))}/values/${encodeURIComponent(String(c[`key-name`]))}`,{body:e})),{successLabel:`Updated`});return}if(c.file){let e=d(c.file);a(await s(`Updating`,async()=>r(f,`PUT`,`/accounts/${p}/storage/kv/namespaces/${encodeURIComponent(String(c[`namespace-id`]))}/values/${encodeURIComponent(String(c[`key-name`]))}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Updated`});return}if(c.body){let e=u(c.body,`body`,`binary`),t=new URLSearchParams(Object.entries(l).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();a(await s(`Updating`,async()=>r(f,`PUT`,`/accounts/${p}/storage/kv/namespaces/${encodeURIComponent(String(c[`namespace-id`]))}/values/${encodeURIComponent(String(c[`key-name`]))}${t?`?`+t:``}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Updated`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},M={command:`keys`,describe:`Operations for keys`,builder:e=>e.command(T).command(D).command(k).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.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:`Namespace identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get <key-name>`,describe:"Returns the metadata associated with the given key in the given namespace. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name.",builder:N,handler:async r=>{if(r.dryRun){o({command:`cf kv metadata get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/metadata/${r[`key-name`]==null?`<key-name>`:encodeURIComponent(String(r[`key-name`]))}`,pathParams:{"key-name":String(r[`key-name`]??``),"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.kv.metadata.get({account_id:l,namespace_id:r[`namespace-id`],key_name:r[`key-name`]})),{successLabel:`Loaded`})}},F={command:`metadata`,describe:`Operations for metadata`,builder:e=>e.command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function I(e){return e.option(`jurisdiction`,{type:`string`,description:`Specify the jurisdiction to restrict the KV namespace to durably store data within. Can only be set at namespace creation time.`,choices:[`eu`,`fedramp`,`us`]}).option(`title`,{type:`string`,description:`A human-readable string name for a Namespace.`}).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 L={command:`create`,describe:"Creates a namespace under the given title. A `400` is returned if the account already owns a namespace with this title. A namespace must be explicitly deleted to be replaced.",builder:I,handler:async r=>{if(r.dryRun){o({command:`cf kv namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({jurisdiction:u(r.jurisdiction,`jurisdiction`,`text`),title:u(r.title,`title`,`text`)}):c(r.body)});return}let d=await i(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=c(r.body);a(await s(`Creating`,async()=>d.kv.namespaces.create({...e,account_id:p})),{successLabel:`Created`});return}r.title===void 0&&(r.title=await f(`title`,`A human-readable string name for a Namespace.`));let m=l({jurisdiction:u(r.jurisdiction,`jurisdiction`,`text`),title:u(r.title,`title`,`text`)});a(await s(`Creating`,async()=>d.kv.namespaces.create({...m,account_id:p})),{successLabel:`Created`})}};function R(e){return e.positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,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 z={command:`delete <namespace-id>`,describe:`Deletes the namespace corresponding to the given ID.`,builder:R,handler:async r=>{if(r.dryRun){o({command:`cf kv namespaces delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await p({force:!!r.force})){process.stderr.write(`Aborted.
5
5
  `);return}a(await s(`Deleting`,async()=>c.kv.namespaces.delete({account_id:l,namespace_id:r[`namespace-id`]})),{successLabel:`Deleted`})}};function B(e){return e.positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`get <namespace-id>`,describe:`Get the namespace corresponding to the given ID.`,builder:B,handler:async r=>{if(r.dryRun){o({command:`cf kv namespaces get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.kv.namespaces.get({account_id:l,namespace_id:r[`namespace-id`]})),{successLabel:`Loaded`})}};function H(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`order`,{type:`string`,description:`Field to order results by.`,choices:[`id`,`title`]}).option(`direction`,{type:`string`,description:`Direction to order namespaces.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`list`,describe:`Returns the namespaces owned by an account.`,builder:m(H),handler:async r=>{let c={page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf kv namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.kv.namespaces.list({account_id:u,...c})),{successLabel:`Loaded`})}};function W(e){return e.positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`title`,{type:`string`,description:`A human-readable string name for a Namespace.`}).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:`update <namespace-id>`,describe:`Modifies a namespace's title.`,builder:W,handler:async r=>{if(r.dryRun){o({command:`cf kv namespaces update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`json`,body:r.body===void 0?l({title:u(r.title,`title`,`text`)}):c(r.body)});return}let d=await i(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=c(r.body);a(await s(`Updating`,async()=>d.kv.namespaces.update({...e,account_id:p,namespace_id:r[`namespace-id`]})),{successLabel:`Updated`});return}r.title===void 0&&(r.title=await f(`title`,`A human-readable string name for a Namespace.`));let m=l({title:u(r.title,`title`,`text`)});a(await s(`Updating`,async()=>d.kv.namespaces.update({...m,account_id:p,namespace_id:r[`namespace-id`]})),{successLabel:`Updated`})}},K={command:`namespaces`,describe:`Operations for namespaces`,builder:e=>e.command(L).command(z).command(V).command(U).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},q={command:`kv`,describe:`kv`,builder:e=>e.command(C).command(M).command(F).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{q as default};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{h as e}from"./oauth-BPizUUqP.mjs";import{r as t}from"./auth-DuLchM18.mjs";import{t as n}from"./output-DgW1hQGX.mjs";import{n as r,t as i}from"./progress-B84wYh91.mjs";import{n as a,t as o}from"./body-parser-CYD7PKFC.mjs";import{n as s}from"./input-validation-BBKJRoRB.mjs";import{n as c}from"./prompt-CDtLWxNv.mjs";function l(e){return e.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 u={command:`create`,describe:'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.',builder:l,handler:async c=>{if(c.dryRun){r({command:`cf leaked-credential-checks detections create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({password:s(c.password,`password`,`text`),username:s(c.username,`username`,`text`)}):a(c.body)});return}let l=await t(c),u=await e({zone:c.zone},l,{quiet:c.quiet});if(c.zoneId=u,c.body){let e=a(c.body);n(await i(`Creating`,async()=>l.leakedCredentialChecks.detections.create({body:e,zone_id:u})),{successLabel:`Created`});return}let d=o({password:s(c.password,`password`,`text`),username:s(c.username,`username`,`text`)});n(await i(`Creating`,async()=>l.leakedCredentialChecks.detections.create({body:d,zone_id:u})),{successLabel:`Created`})}};function d(e){return e.positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,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 f={command:`delete <detection-id>`,describe:`Delete a user-defined detection location, identified by its detection ID. Incoming requests are then scanned using only the default scan locations and the detection locations that remain.`,builder:d,handler:async a=>{if(a.dryRun){r({command:`cf leaked-credential-checks detections delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/leaked-credential-checks/detections/${a[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(a[`detection-id`]))}`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``),"detection-id":String(a[`detection-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await c({force:!!a.force,message:`This operation deletes a Leaked Credential Checks custom detection location.`})){process.stderr.write(`Aborted.
2
+ import{h as e}from"./oauth-B0ETkNcX.mjs";import{r as t}from"./auth-MQEamPN9.mjs";import{t as n}from"./output-DrpYYfnB.mjs";import{n as r,t as i}from"./progress-CsHIt3Tp.mjs";import{n as a,t as o}from"./body-parser-C-c9gfH1.mjs";import{n as s}from"./input-validation-Bav2M9F-.mjs";import{n as c}from"./prompt-DdegNPpg.mjs";function l(e){return e.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 u={command:`create`,describe:'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.',builder:l,handler:async c=>{if(c.dryRun){r({command:`cf leaked-credential-checks detections create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({password:s(c.password,`password`,`text`),username:s(c.username,`username`,`text`)}):a(c.body)});return}let l=await t(c),u=await e({zone:c.zone},l,{quiet:c.quiet});if(c.zoneId=u,c.body){let e=a(c.body);n(await i(`Creating`,async()=>l.leakedCredentialChecks.detections.create({body:e,zone_id:u})),{successLabel:`Created`});return}let d=o({password:s(c.password,`password`,`text`),username:s(c.username,`username`,`text`)});n(await i(`Creating`,async()=>l.leakedCredentialChecks.detections.create({body:d,zone_id:u})),{successLabel:`Created`})}};function d(e){return e.positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,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 f={command:`delete <detection-id>`,describe:`Delete a user-defined detection location, identified by its detection ID. Incoming requests are then scanned using only the default scan locations and the detection locations that remain.`,builder:d,handler:async a=>{if(a.dryRun){r({command:`cf leaked-credential-checks detections delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/leaked-credential-checks/detections/${a[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(a[`detection-id`]))}`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``),"detection-id":String(a[`detection-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await c({force:!!a.force,message:`This operation deletes a Leaked Credential Checks custom detection location.`})){process.stderr.write(`Aborted.
3
3
  `);return}n(await i(`Deleting`,async()=>o.leakedCredentialChecks.detections.delete({zone_id:s,detection_id:a[`detection-id`]})),{successLabel:`Deleted`})}};function p(e){return e.positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`get <detection-id>`,describe:`Get the username and password expressions of a single user-defined detection location, identified by its detection ID.`,builder:p,handler:async a=>{if(a.dryRun){r({command:`cf leaked-credential-checks detections get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/leaked-credential-checks/detections/${a[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(a[`detection-id`]))}`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``),"detection-id":String(a[`detection-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.leakedCredentialChecks.detections.get({zone_id:s,detection_id:a[`detection-id`]})),{successLabel:`Loaded`})}};function h(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`List the user-defined detection locations configured for Leaked Credential Checks, each with its own identifier. A custom detection location tells the WAF where to find the username and password in requests to your application.`,builder:h,handler:async a=>{if(a.dryRun){r({command:`cf leaked-credential-checks detections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.leakedCredentialChecks.detections.list({zone_id:s})),{successLabel:`Loaded`})}};function _(e){return e.positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,demandOption:!0}).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 v={command:`update <detection-id>`,describe:`Update the username and password expressions of an existing detection location, identified by its detection ID. Both expressions are overwritten, so omitting the password expression clears it.`,builder:_,handler:async c=>{if(c.dryRun){r({command:`cf leaked-credential-checks detections update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/leaked-credential-checks/detections/${c[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(c[`detection-id`]))}`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"detection-id":String(c[`detection-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({password:s(c.password,`password`,`text`),username:s(c.username,`username`,`text`)}):a(c.body)});return}let l=await t(c),u=await e({zone:c.zone},l,{quiet:c.quiet});if(c.zoneId=u,c.body){let e=a(c.body);n(await i(`Updating`,async()=>l.leakedCredentialChecks.detections.update({body:e,zone_id:u,detection_id:c[`detection-id`]})),{successLabel:`Updated`});return}let d=o({password:s(c.password,`password`,`text`),username:s(c.username,`username`,`text`)});n(await i(`Updating`,async()=>l.leakedCredentialChecks.detections.update({body:d,zone_id:u,detection_id:c[`detection-id`]})),{successLabel:`Updated`})}},y={command:`detections`,describe:`Custom detection locations that tell the WAF where to find usernames and passwords in requests`,builder:e=>e.command(u).command(f).command(m).command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get`,describe:`Get the current Leaked Credential Checks status for the zone. While enabled, Cloudflare scans incoming requests for usernames and passwords that were exposed in known data breaches.`,builder:b,handler:async a=>{if(a.dryRun){r({command:`cf leaked-credential-checks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/leaked-credential-checks`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.leakedCredentialChecks.get({zone_id:s})),{successLabel:`Loaded`})}};function S(e){return e.option(`enabled`,{type:`boolean`,description:`Determines whether or not Leaked Credential Checks are enabled.`}).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:`Defines the overall status for Leaked Credential Checks.`})}const C={command:`update`,describe:"Update the Leaked Credential Checks status for the zone, enabling or disabling the detection. While enabled, the detection populates the `cf.waf.credential_check.*` fields, which you can reference in custom rules and rate limiting rules to challenge or block requests carrying compromised credentials.",builder:S,handler:async s=>{if(s.dryRun){r({command:`cf leaked-credential-checks update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/leaked-credential-checks`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?o({enabled:s.enabled}):a(s.body)});return}let l=await t(s),u=await e({zone:s.zone},l,{quiet:s.quiet});if(s.zoneId=u,!await c({force:!!s.force,message:`This operation toggles Leaked Credential Checks for a zone.`})){process.stderr.write(`Aborted.
4
4
  `);return}if(s.body){let e=a(s.body);n(await i(`Deleting`,async()=>l.leakedCredentialChecks.update({body:e,zone_id:u})),{successLabel:`Deleted`});return}let d=o({enabled:s.enabled});n(await i(`Deleting`,async()=>l.leakedCredentialChecks.update({body:d,zone_id:u})),{successLabel:`Deleted`})}},w={command:`leaked-credential-checks`,describe:`Detect compromised credentials in login requests by checking against known breach databases`,builder:e=>e.command(x).command(C).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};