cf 0.11.0 → 0.12.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 (244) hide show
  1. package/dist/_meta/agent-context.json +3 -3
  2. package/dist/_meta/commands.json +149 -5
  3. package/dist/_meta/hand-written-commands.json +181 -5
  4. package/dist/{abuse-reports-sDBTV0qZ.mjs → abuse-reports-D40QFl-y.mjs} +1 -1
  5. package/dist/{access-DcNzuCue.mjs → access-Dl2IU1ID.mjs} +1 -1
  6. package/dist/{account-BX90zXn5.mjs → account-CPbieCZ4.mjs} +1 -1
  7. package/dist/{account-tags-Bz3JG5hI.mjs → account-tags-skfP7H8k.mjs} +1 -1
  8. package/dist/{accounts-DCuW3xyZ.mjs → accounts-CSgR6909.mjs} +1 -1
  9. package/dist/{acm-zjfShZLS.mjs → acm-CVvCTaNk.mjs} +1 -1
  10. package/dist/{addressing-DORQ64Ux.mjs → addressing-Uq5hEDDP.mjs} +1 -1
  11. package/dist/{agent-context-BgPR_aQr.mjs → agent-context-BvuDdaJb.mjs} +1 -1
  12. package/dist/{agent-memory-C0hAUMeC.mjs → agent-memory-BrHMIU0E.mjs} +1 -1
  13. package/dist/{ai-audit-DnU3vn3E.mjs → ai-audit-BoZuL84i.mjs} +1 -1
  14. package/dist/{ai-gateway-COOrr_Yw.mjs → ai-gateway-DE50Jem1.mjs} +1 -1
  15. package/dist/{ai-search-DKbN9Tyd.mjs → ai-search-Fx7NHCHB.mjs} +1 -1
  16. package/dist/{ai-security-C_I5lo58.mjs → ai-security-DyLbY9kv.mjs} +1 -1
  17. package/dist/{ai-BpEBGMT2.mjs → ai-v2fP1r0s.mjs} +1 -1
  18. package/dist/{alerting-4T8gmZs-.mjs → alerting-5mFZjTcD.mjs} +1 -1
  19. package/dist/{analytics-Bxh4TCP7.mjs → analytics-BygTfozw.mjs} +1 -1
  20. package/dist/{analytics_engine-fV56bjVN.mjs → analytics_engine-4L-q362P.mjs} +1 -1
  21. package/dist/{api-security-COk_i184.mjs → api-security-DjFsRYWx.mjs} +1 -1
  22. package/dist/{argo-DIRfvxvv.mjs → argo-TzXPN7tz.mjs} +1 -1
  23. package/dist/args-CDgWUP4J.mjs +2 -0
  24. package/dist/{artifacts-BBfXNfUg.mjs → artifacts-dEw2UUBV.mjs} +1 -1
  25. package/dist/{audit-logs-BlOrlAWe.mjs → audit-logs-CqY7zzwv.mjs} +1 -1
  26. package/dist/{auth-DPhNN3Ly.mjs → auth-CPLdkOC7.mjs} +1 -1
  27. package/dist/{auth-D3X9HYhD.mjs → auth-DY_Y2bXC.mjs} +2 -2
  28. package/dist/{billing-B9e4PnvN.mjs → billing-DHQuRT8S.mjs} +1 -1
  29. package/dist/{bot-management-D2JVeS-V.mjs → bot-management-CfqG79hF.mjs} +1 -1
  30. package/dist/{botnet-feed-BTzTYs5d.mjs → botnet-feed-BOeNnDoH.mjs} +1 -1
  31. package/dist/{brand-protection-C5Q6Gpw9.mjs → brand-protection-DYttrKIM.mjs} +1 -1
  32. package/dist/{browser-extension-u5uA0Lwk.mjs → browser-extension-CTUCdgfn.mjs} +1 -1
  33. package/dist/{browser-run-CHGOCTdG.mjs → browser-run-373D4e1i.mjs} +1 -1
  34. package/dist/build-D0ir_S70.mjs +2 -0
  35. package/dist/{cache-C6V7PbQM.mjs → cache-DJXBmc3w.mjs} +1 -1
  36. package/dist/{calls-Bye8Tyy-.mjs → calls-COO0Eoz1.mjs} +1 -1
  37. package/dist/{certificate-authorities-B-U_e6JJ.mjs → certificate-authorities-DbHLmKbd.mjs} +1 -1
  38. package/dist/{cf-Ds4JFovl.mjs → cf-yPz_IqW6.mjs} +11 -11
  39. package/dist/{chunk-LQW53VED-22IYZovK.mjs → chunk-LQW53VED-9MACsvSG.mjs} +25 -25
  40. package/dist/{chunk-QBZBEHZB-CKzQKcIp.mjs → chunk-QBZBEHZB-yeyhVUeD.mjs} +1 -1
  41. package/dist/{client-certificates-3RrC-6LG.mjs → client-certificates-RBRqYP3f.mjs} +1 -1
  42. package/dist/{client-side-security-DIdKvRMT.mjs → client-side-security-HOmA37et.mjs} +1 -1
  43. package/dist/{cloud-connector-CL1jPQud.mjs → cloud-connector-C7hw1c1f.mjs} +1 -1
  44. package/dist/{cloudforce-one-DULeqLkR.mjs → cloudforce-one-DLOj76q4.mjs} +1 -1
  45. package/dist/command-BV87D4tR.mjs +2 -0
  46. package/dist/{completions-CqgGKRAC.mjs → completions-BnD46cXe.mjs} +1 -1
  47. package/dist/config.d.mts +305 -332
  48. package/dist/config.mjs +1 -1
  49. package/dist/{connector-interrupts-CXlLObDv.mjs → connector-interrupts-DY-z_LrH.mjs} +1 -1
  50. package/dist/{connector-telemetry-events-BrYX4ig4.mjs → connector-telemetry-events-DCXmcAc9.mjs} +1 -1
  51. package/dist/{connector-telemetry-snapshots-BdeBQYcM.mjs → connector-telemetry-snapshots-D8GNuzx3.mjs} +1 -1
  52. package/dist/{connectors-BQwyBJ4_.mjs → connectors-fEOn-J_i.mjs} +1 -1
  53. package/dist/containers-BDBsEs7-.mjs +58 -0
  54. package/dist/{content-scan-DNzhXYkY.mjs → content-scan-Cmj9--XY.mjs} +1 -1
  55. package/dist/{csamScanner-CFq5s1Q3.mjs → csamScanner-BRXyMCyH.mjs} +1 -1
  56. package/dist/{ct-alerting-CH6UmsGQ.mjs → ct-alerting-9AvYys-f.mjs} +1 -1
  57. package/dist/{custom-certificates-DnG73Wg2.mjs → custom-certificates-C5qrlyhb.mjs} +1 -1
  58. package/dist/{custom-csrs-bhClr2SU.mjs → custom-csrs-BgOnTbBW.mjs} +1 -1
  59. package/dist/{custom-hostnames-C0eiGvG9.mjs → custom-hostnames-CbQD9aYo.mjs} +1 -1
  60. package/dist/{custom-nameservers-CVMhhLm6.mjs → custom-nameservers-2ZajBkRC.mjs} +1 -1
  61. package/dist/{custom-pages-DTINMR30.mjs → custom-pages-Buki_Cb8.mjs} +1 -1
  62. package/dist/{d1-sKdExJYF.mjs → d1-n2in0cSF.mjs} +1 -1
  63. package/dist/{data-security-mV3a6UfW.mjs → data-security-DzOQMkv3.mjs} +1 -1
  64. package/dist/{dcv-delegation-dBu3jdRw.mjs → dcv-delegation-BTP9LCOm.mjs} +1 -1
  65. package/dist/deploy-BUSz35vq.mjs +2 -0
  66. package/dist/deploy-input-BvD9aRP1.mjs +2 -0
  67. package/dist/dev-DY_DquQx.mjs +4 -0
  68. package/dist/{diagnostics-CJV6qWUA.mjs → diagnostics-BvHV8kQb.mjs} +1 -1
  69. package/dist/{directory-B5zCMusW.mjs → directory-BeiSyg8A.mjs} +1 -1
  70. package/dist/{dispatch-namespaces-Dg5lu5xX.mjs → dispatch-namespaces-Dp8Jjpwy.mjs} +1 -1
  71. package/dist/dist-BBx1io2f.mjs +2 -0
  72. package/dist/dist-Cb9TJ2VV.mjs +9 -0
  73. package/dist/dist-DV7LR38l.mjs +387 -0
  74. package/dist/dist-DvizctjW.mjs +48 -0
  75. package/dist/{dls-t0hnIe_P.mjs → dls-BwoU29mS.mjs} +1 -1
  76. package/dist/{dns-C8FC2hbh.mjs → dns-DISAfuzj.mjs} +1 -1
  77. package/dist/{dns-firewall-CuhhUm55.mjs → dns-firewall-wBcCx_ua.mjs} +1 -1
  78. package/dist/dry-run-ILZRVpnp.mjs +2 -0
  79. package/dist/{durable-objects-BLrgM3Cw.mjs → durable-objects-DhDL3San.mjs} +1 -1
  80. package/dist/{email-auth-BmYrl0pO.mjs → email-auth-BROqK6-C.mjs} +1 -1
  81. package/dist/{email-routing-CF3_Z957.mjs → email-routing-BZXHDAOO.mjs} +1 -1
  82. package/dist/{email-security-F7OYcMkZ.mjs → email-security-DVumybrk.mjs} +1 -1
  83. package/dist/{email-sending-EyU3WvGQ.mjs → email-sending-CDQ3_wyz.mjs} +1 -1
  84. package/dist/{fieldExtractors-Cno37T2m.mjs → fieldExtractors-Cy1rxHEF.mjs} +1 -1
  85. package/dist/{firewall-8YWWy4iB.mjs → firewall-C0g5X7Zd.mjs} +1 -1
  86. package/dist/{flagship-C4x0l-8J.mjs → flagship-fFBiZUz-.mjs} +1 -1
  87. package/dist/{fraud-HR_SdUx3.mjs → fraud-CjIETOaM.mjs} +1 -1
  88. package/dist/{google-tag-gateway-BdcS0WnX.mjs → google-tag-gateway-hPa5IHUx.mjs} +1 -1
  89. package/dist/{healthchecks-4qOvjrTN.mjs → healthchecks-CoycpTf9.mjs} +1 -1
  90. package/dist/{hostnames-DehdYOMz.mjs → hostnames-x_Yezxpr.mjs} +1 -1
  91. package/dist/{hyperdrive-3gD3hn70.mjs → hyperdrive-BlfrTwSq.mjs} +1 -1
  92. package/dist/{iam-DR72hmii.mjs → iam-Bk7K_PPO.mjs} +1 -1
  93. package/dist/{images-CeKc5JPh.mjs → images-BAEFb9q1.mjs} +1 -1
  94. package/dist/index.mjs +1 -1
  95. package/dist/{intel-DtFix9WL.mjs → intel-DDkyJVaP.mjs} +1 -1
  96. package/dist/interactive-CRnq-B5I.mjs +11 -0
  97. package/dist/{interactive-C7M55Wxx.mjs → interactive-cytQzL94.mjs} +1 -1
  98. package/dist/{ips-CtWCjXAN.mjs → ips-DU0ti0i0.mjs} +1 -1
  99. package/dist/{keyless-certificates-Dk24yQFz.mjs → keyless-certificates-E1P9jBTb.mjs} +1 -1
  100. package/dist/{keys-BmhG6Kn1.mjs → keys-DqldTZqH.mjs} +1 -1
  101. package/dist/{kv-BuVPAuZP.mjs → kv-CcfCfnwq.mjs} +1 -1
  102. package/dist/{leaked-credential-checks-XcZmt1I-.mjs → leaked-credential-checks-CqmKaEbd.mjs} +1 -1
  103. package/dist/{load-balancers-CylN-l7n.mjs → load-balancers-Dg4pDad1.mjs} +1 -1
  104. package/dist/{local-Be3lg_9E.mjs → local-DGiIS1uM.mjs} +1 -1
  105. package/dist/local-runtime--IQr44qq.mjs +2 -0
  106. package/dist/{logexplorer-CvRPoKbj.mjs → logexplorer-Bu2mG5rh.mjs} +1 -1
  107. package/dist/{logo-matches-Heuft3yF.mjs → logo-matches-CWUzxY7G.mjs} +1 -1
  108. package/dist/{logos-DRYjGBDq.mjs → logos-BTfdkDPi.mjs} +1 -1
  109. package/dist/{logpush-Dve9jOMp.mjs → logpush-BZyay3h2.mjs} +1 -1
  110. package/dist/{logs-SC86FE89.mjs → logs-BqF7jjQO.mjs} +1 -1
  111. package/dist/{magic-cloud-networking-DXzeqwX-.mjs → magic-cloud-networking-Dhd8pTyM.mjs} +1 -1
  112. package/dist/{magic-network-monitoring-DW0Jl74i.mjs → magic-network-monitoring-D0FnkjuN.mjs} +1 -1
  113. package/dist/{magic-transit-BK_3asH2.mjs → magic-transit-B5skt0G7.mjs} +1 -1
  114. package/dist/{managed-transforms-B6TV4qoE.mjs → managed-transforms-B6X_crcJ.mjs} +1 -1
  115. package/dist/{matches-Iss9Fo4R.mjs → matches-DeYaB4I0.mjs} +1 -1
  116. package/dist/{mcp-8wxXT6JU.mjs → mcp-ChjBiMx2.mjs} +1 -1
  117. package/dist/{mesh-Bf9UAS4J.mjs → mesh-DRVAFLBX.mjs} +1 -1
  118. package/dist/{moq-ZKMFOeVz.mjs → moq-DE7VDEFS.mjs} +1 -1
  119. package/dist/{mtls-certificates-DoWm6GiE.mjs → mtls-certificates-Cbc3uAkN.mjs} +1 -1
  120. package/dist/{network-B1lBARU9.mjs → network-CDPZNFbn.mjs} +1 -1
  121. package/dist/{network-interconnects-CLYIFHfU.mjs → network-interconnects-CMRs_chR.mjs} +1 -1
  122. package/dist/{oauth-DuEONNgC.mjs → oauth-DAa7SwkM.mjs} +4 -4
  123. package/dist/{oauth-clients-DgiTzLzu.mjs → oauth-clients-DAI_gcuL.mjs} +1 -1
  124. package/dist/{oauth-scopes-BOBRMxjm.mjs → oauth-scopes-BE6xF4_h.mjs} +1 -1
  125. package/dist/{observability-Jya7-zkl.mjs → observability-DnyI8rPJ.mjs} +1 -1
  126. package/dist/{organization-CYxYV4e0.mjs → organization-yh0mSUdI.mjs} +1 -1
  127. package/dist/{organizations-SacGUW44.mjs → organizations-B3aU-RCG.mjs} +1 -1
  128. package/dist/{origin-ca-certificates-Ph1bJGQ1.mjs → origin-ca-certificates-BaNWfVqf.mjs} +1 -1
  129. package/dist/{origin-post-quantum-encryption-BBLiGAGB.mjs → origin-post-quantum-encryption-CIUtQgyv.mjs} +1 -1
  130. package/dist/{origin-tls-client-auth-DSDgTN2X.mjs → origin-tls-client-auth-CvEpbX2Q.mjs} +1 -1
  131. package/dist/{page-rules-BqEyFR2c.mjs → page-rules-CzbyXbt6.mjs} +1 -1
  132. package/dist/{pages-CQ7ZVWk1.mjs → pages-CX8yefTI.mjs} +1 -1
  133. package/dist/{pay-per-crawl-BMe_3_Qj.mjs → pay-per-crawl-v4vBOMWD.mjs} +1 -1
  134. package/dist/{pipelines-6De2Pe2C.mjs → pipelines-BZ1KGupx.mjs} +1 -1
  135. package/dist/{precursor-iwK-1P_d.mjs → precursor-D42A9ay5.mjs} +1 -1
  136. package/dist/{progress-BqQcF5QH.mjs → progress-jYW64HY7.mjs} +1 -1
  137. package/dist/{project-settings-C_1-JI6Y.mjs → project-settings-BN7tL0c7.mjs} +2 -2
  138. package/dist/{prompt-B0sWIs9c.mjs → prompt-CyATfGUu.mjs} +1 -1
  139. package/dist/{public-BYCVISMH-DnMJ5Jct.mjs → public-BMg6-Hxh-DgIH5obr.mjs} +1 -1
  140. package/dist/{queries-c7zvnfEQ.mjs → queries-xvETUjUE.mjs} +1 -1
  141. package/dist/{queues-BU6y16qS.mjs → queues-CpqHDtxF.mjs} +1 -1
  142. package/dist/{r2-data-catalog-B-tw-JdG.mjs → r2-data-catalog-DgKmlTKR.mjs} +1 -1
  143. package/dist/{r2-Jo3QMahK.mjs → r2-jhmLvD1z.mjs} +1 -1
  144. package/dist/{radar-DIYAMEof.mjs → radar-C2J16wpX.mjs} +1 -1
  145. package/dist/{rate-limits-DewOcznT.mjs → rate-limits-CoH9Xma0.mjs} +1 -1
  146. package/dist/{raw-fetch-Cc-MjHeL.mjs → raw-fetch-CNKIypJ7.mjs} +1 -1
  147. package/dist/{realtimekit-cnZEVNDn.mjs → realtimekit-CDs0Z5WW.mjs} +1 -1
  148. package/dist/{registrar-BsWr_aPM.mjs → registrar-BI5ewTAk.mjs} +1 -1
  149. package/dist/{registrar-sandbox-BlcpUyIH.mjs → registrar-sandbox-al1znWMc.mjs} +1 -1
  150. package/dist/{registry-jifR3_Y6.mjs → registry-5-I2XLwF.mjs} +1 -1
  151. package/dist/{reporting--1AyTV7k.mjs → reporting-CxsdHAH3.mjs} +1 -1
  152. package/dist/{request-tracers-C_VX7X6-.mjs → request-tracers-DJJCncft.mjs} +1 -1
  153. package/dist/{resource-sharing-Br5dqr3o.mjs → resource-sharing-qQGn8AEn.mjs} +1 -1
  154. package/dist/{resource-tagging-C33U6T74.mjs → resource-tagging-aTtpX5e5.mjs} +1 -1
  155. package/dist/{rules-BfjzALMi.mjs → rules-PpsDU89Q.mjs} +1 -1
  156. package/dist/{rulesets-3i_1Vwt-.mjs → rulesets-DP12Aqik.mjs} +1 -1
  157. package/dist/{rum-CjmIckiR.mjs → rum-DxvpzJYc.mjs} +1 -1
  158. package/dist/{schema-1mwmslUV.mjs → schema-DlLbiOJj.mjs} +1 -1
  159. package/dist/{schema-flags-llLJuFFw.mjs → schema-flags-CTfQVGCs.mjs} +1 -1
  160. package/dist/schemas-BFCBlp_W.mjs +65 -0
  161. package/dist/{scim-pApmzA5B.mjs → scim-DJ4AVU20.mjs} +1 -1
  162. package/dist/{secrets-store-DBC9WJau.mjs → secrets-store-D6KDNo_s.mjs} +1 -1
  163. package/dist/{security-center-Djm06dq-.mjs → security-center-008FMs_z.mjs} +1 -1
  164. package/dist/{security-txt-Ci7bP4zH.mjs → security-txt-CqcfrhlN.mjs} +1 -1
  165. package/dist/{share-Dj-MNXrw.mjs → share-D5fzsVAJ.mjs} +1 -1
  166. package/dist/{shared-BJvq4DkR.mjs → shared-DlKGNPiT.mjs} +92 -142
  167. package/dist/{smart-shield--8EpJjrF.mjs → smart-shield-DpFscIk8.mjs} +1 -1
  168. package/dist/{snippets-Dyz0PH60.mjs → snippets-CCKgI2ZX.mjs} +1 -1
  169. package/dist/spawn-C3_tJ3RB.mjs +526 -0
  170. package/dist/{spectrum-rAHWz8rH.mjs → spectrum-LmdqY3ki.mjs} +1 -1
  171. package/dist/{speed-BKepWBXj.mjs → speed-CEK36h3A.mjs} +1 -1
  172. package/dist/src-CEb2fgtT.mjs +108 -0
  173. package/dist/{ssl-KdFiY3ev.mjs → ssl-ChHUyaQm.mjs} +1 -1
  174. package/dist/{startup-profile-GLNPHQ9U.mjs → startup-profile-Dpxg-MjV.mjs} +3 -3
  175. package/dist/{state-Cu3cItUg.mjs → state-DeX23Kmg.mjs} +1 -1
  176. package/dist/{stream-CKJ6Tb0M.mjs → stream-DfUSELMX.mjs} +1 -1
  177. package/dist/{submit-BxbKKhBn.mjs → submit-DF2G5CIz.mjs} +1 -1
  178. package/dist/{tags-DA8dq9fx.mjs → tags-nFJJHlLJ.mjs} +1 -1
  179. package/dist/{tenant-DLXw48hS.mjs → tenant-CRLw1oRU.mjs} +1 -1
  180. package/dist/{tenant-custom-nameservers-9G93XuvU.mjs → tenant-custom-nameservers-BvBQRDcs.mjs} +1 -1
  181. package/dist/{tools-x8bj9E6b.mjs → tools-j8UGEtP1.mjs} +1 -1
  182. package/dist/{tunnel-CNQA5Flp.mjs → tunnel-CMQeBgmb.mjs} +1 -1
  183. package/dist/{tunnels-CC10EOsU.mjs → tunnels-iVA3MrdS.mjs} +1 -1
  184. package/dist/{turnstile-CH58hnf4.mjs → turnstile-DQHP6-_b.mjs} +1 -1
  185. package/dist/{ui-CmnnBm_O.mjs → ui-DJFcf61J.mjs} +1 -1
  186. package/dist/{url-info-BpCgdUtL.mjs → url-info-BVgdb_pf.mjs} +1 -1
  187. package/dist/{url-normalization-BzuynEy1.mjs → url-normalization-BTcxLxIQ.mjs} +1 -1
  188. package/dist/{url-scanner-APIZbhB7.mjs → url-scanner-DwuDZLPk.mjs} +1 -1
  189. package/dist/{user-2-NGebfI.mjs → user-I_MbB_KX.mjs} +1 -1
  190. package/dist/{values-S_bNv819.mjs → values-S-Q7-5o8.mjs} +1 -1
  191. package/dist/{vectorize-Bv7feLBC.mjs → vectorize-CNZdF_0A.mjs} +1 -1
  192. package/dist/{waiting-rooms-Dk4LIpvm.mjs → waiting-rooms-Bo-OSsxu.mjs} +1 -1
  193. package/dist/{web-assets-C1UmOyzD.mjs → web-assets-tlFzKdNL.mjs} +1 -1
  194. package/dist/{web3-GnUocVYH.mjs → web3-CdbfoZ2x.mjs} +1 -1
  195. package/dist/{workers-J1-PLwdl.mjs → workers-DQ9Q7czn.mjs} +2 -2
  196. package/dist/{workers-builds-DCHmWOMS.mjs → workers-builds-CGRhYx-x.mjs} +1 -1
  197. package/dist/{workflows-CArfEI2c.mjs → workflows-BhEy-crm.mjs} +1 -1
  198. package/dist/{zaraz-mg2YlR3_.mjs → zaraz-DbKvA_8C.mjs} +1 -1
  199. package/dist/{zero-trust-DVdUPtj1.mjs → zero-trust-DrHCPVOc.mjs} +1 -1
  200. package/dist/{zone-DMAfrDJX.mjs → zone-D2zrbJI2.mjs} +1 -1
  201. package/dist/{zones-CNwxUi7I.mjs → zones-DrpxQ_-A.mjs} +1 -1
  202. package/package.json +9 -8
  203. package/dist/args-DlUhyGU0.mjs +0 -2
  204. package/dist/build-D0FhOj40.mjs +0 -8
  205. package/dist/command-C9VP3xaA.mjs +0 -2
  206. package/dist/containers-BrQtGiNp.mjs +0 -58
  207. package/dist/deploy-BL59O1O1.mjs +0 -2
  208. package/dist/deploy-input-Dz6q-__n.mjs +0 -2
  209. package/dist/dev-BDaavgH1.mjs +0 -4
  210. package/dist/dist-BHi7UhXO.mjs +0 -72
  211. package/dist/dist-BWpErtDM.mjs +0 -384
  212. package/dist/dry-run-DL2V6yFm.mjs +0 -2
  213. package/dist/local-runtime-Ce7k598H.mjs +0 -2
  214. package/dist/spawn-C5Z7oWdp.mjs +0 -519
  215. package/dist/src-gJma71Ec.mjs +0 -108
  216. /package/dist/{alerts-15-IW4jE.mjs → alerts-9PR5sQ_z.mjs} +0 -0
  217. /package/dist/{autorag-CFwRkEKw.mjs → autorag-Bevo1kIH.mjs} +0 -0
  218. /package/dist/{body-parser-BshbixEq.mjs → body-parser-BGVbwPeM.mjs} +0 -0
  219. /package/dist/{brands-BgT1vu9B.mjs → brands-C4M04Man.mjs} +0 -0
  220. /package/dist/{clear-BlCK85Me.mjs → clear-DS0eRXOc.mjs} +0 -0
  221. /package/dist/{cli-types-DAYeL_Mj.mjs → cli-types-C3nVfpSG.mjs} +0 -0
  222. /package/dist/{connector-telemetry-events-latest-BbpcII3_.mjs → connector-telemetry-events-latest-CKKG6_pD.mjs} +0 -0
  223. /package/dist/{connector-telemetry-snapshots-latest-DuCiimXl.mjs → connector-telemetry-snapshots-latest-Bv5OddJr.mjs} +0 -0
  224. /package/dist/{domain-info-C7LBxPBt.mjs → domain-info-BUiaGCEq.mjs} +0 -0
  225. /package/dist/{health-DZFfafkX.mjs → health-vX6Ml2Na.mjs} +0 -0
  226. /package/dist/{input-validation-QDIYu7Vb.mjs → input-validation-1esLElok.mjs} +0 -0
  227. /package/dist/{internal-BKHC2D1Y.mjs → internal-ROz7anul.mjs} +0 -0
  228. /package/dist/{live-DwCvDmaH.mjs → live-CSxvigCS.mjs} +0 -0
  229. /package/dist/{metadata-B5yfL0ln.mjs → metadata-DEqBUaSv.mjs} +0 -0
  230. /package/dist/{open-PBXRGS4R-CX8K4WYl.mjs → open-PBXRGS4R-DIiYQyU9.mjs} +0 -0
  231. /package/dist/{output-Ccqw2WOb.mjs → output-BqDR9h74.mjs} +0 -0
  232. /package/dist/{rate-limit-analytics-B8Vuu1sU.mjs → rate-limit-analytics-CgHgKjmV.mjs} +0 -0
  233. /package/dist/{ready-D9H2zHHI.mjs → ready-6G9zVGPJ.mjs} +0 -0
  234. /package/dist/{recent-submissions-BPo0J80d.mjs → recent-submissions-B3Smh-QM.mjs} +0 -0
  235. /package/dist/{refute-2W8NLCN4.mjs → refute-DjkmLSNe.mjs} +0 -0
  236. /package/dist/{resolve-B8CyM1mi.mjs → resolve-DEvdeprv.mjs} +0 -0
  237. /package/dist/{scan-logo-D5x6F1Y0.mjs → scan-logo-545qLcGs.mjs} +0 -0
  238. /package/dist/{scan-page-CWhta3x7.mjs → scan-page-DRQiVufl.mjs} +0 -0
  239. /package/dist/{search-DZmBQJL9.mjs → search-CXbqFoqe.mjs} +0 -0
  240. /package/dist/{signed-url-CQrmWgz5.mjs → signed-url-rU_nvgFA.mjs} +0 -0
  241. /package/dist/{submission-info-C98A0bqq.mjs → submission-info-D6PgXNQP.mjs} +0 -0
  242. /package/dist/{total-queries-BZoaFoDE.mjs → total-queries-XkFyu8H5.mjs} +0 -0
  243. /package/dist/{tracked-domains-CNHogPHx.mjs → tracked-domains-CmcRXHj_.mjs} +0 -0
  244. /package/dist/{verify-4e4L9IRk.mjs → verify-CM1NakP0.mjs} +0 -0
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-Be3lg_9E.mjs";import{f as t,g as n}from"./oauth-DuEONNgC.mjs";import{r}from"./auth-D3X9HYhD.mjs";import{t as i}from"./output-Ccqw2WOb.mjs";import{t as a}from"./dry-run-DL2V6yFm.mjs";import{t as o}from"./progress-BqQcF5QH.mjs";import{n as s,t as c}from"./body-parser-BshbixEq.mjs";import{n as l}from"./input-validation-QDIYu7Vb.mjs";import{a as u,n as d}from"./prompt-B0sWIs9c.mjs";import{t as f}from"./cli-types-DAYeL_Mj.mjs";function p(e){return e.option(`target-ids`,{type:`string`,array:!0,description:`List of target IDs to bulk delete`}).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 m={command:`delete`,describe:`Removes one or more targets.`,builder:p,handler:async l=>{if(l.dryRun){a({command:`cf access targets bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/batch_delete`,pathParams:{},bodyKind:`json`,body:l.body===void 0?c({target_ids:l[`target-ids`]}):s(l.body)});return}let u=await r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=s(l.body);i(await o(`Creating`,async()=>u.access.targets.bulk.delete({...e,account_id:d})),{successLabel:`Created`});return}if(l[`target-ids`]===void 0)throw Error(`--target-ids is required (or pass --body with this field set).`);let f=c({target_ids:l[`target-ids`]});i(await o(`Creating`,async()=>u.access.targets.bulk.delete({...f,account_id:d})),{successLabel:`Created`})}};function h(e){return e.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`,describe:`Adds one or more targets.`,builder:h,handler:async c=>{if(c.dryRun){a({command:`cf access targets bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/batch`,pathParams:{},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let l=await r(c),u=c.local?e:await t();if(c.accountId=u,c.body){let e=s(c.body);i(await o(`Updating`,async()=>l.access.targets.bulk.update({body:e,account_id:u})),{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.`)}},_={command:`bulk`,describe:`Operations for targets.bulk`,builder:e=>e.command(m).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.option(`hostname`,{type:`string`,description:`A non-unique field that refers to a target. Case insensitive, maximum
2
+ import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n}from"./oauth-DAa7SwkM.mjs";import{r}from"./auth-DY_Y2bXC.mjs";import{t as i}from"./output-BqDR9h74.mjs";import{t as a}from"./dry-run-ILZRVpnp.mjs";import{t as o}from"./progress-jYW64HY7.mjs";import{n as s,t as c}from"./body-parser-BGVbwPeM.mjs";import{n as l}from"./input-validation-1esLElok.mjs";import{a as u,n as d}from"./prompt-CyATfGUu.mjs";import{t as f}from"./cli-types-C3nVfpSG.mjs";function p(e){return e.option(`target-ids`,{type:`string`,array:!0,description:`List of target IDs to bulk delete`}).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 m={command:`delete`,describe:`Removes one or more targets.`,builder:p,handler:async l=>{if(l.dryRun){a({command:`cf access targets bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/batch_delete`,pathParams:{},bodyKind:`json`,body:l.body===void 0?c({target_ids:l[`target-ids`]}):s(l.body)});return}let u=await r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=s(l.body);i(await o(`Creating`,async()=>u.access.targets.bulk.delete({...e,account_id:d})),{successLabel:`Created`});return}if(l[`target-ids`]===void 0)throw Error(`--target-ids is required (or pass --body with this field set).`);let f=c({target_ids:l[`target-ids`]});i(await o(`Creating`,async()=>u.access.targets.bulk.delete({...f,account_id:d})),{successLabel:`Created`})}};function h(e){return e.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`,describe:`Adds one or more targets.`,builder:h,handler:async c=>{if(c.dryRun){a({command:`cf access targets bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/batch`,pathParams:{},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let l=await r(c),u=c.local?e:await t();if(c.accountId=u,c.body){let e=s(c.body);i(await o(`Updating`,async()=>l.access.targets.bulk.update({body:e,account_id:u})),{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.`)}},_={command:`bulk`,describe:`Operations for targets.bulk`,builder:e=>e.command(m).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.option(`hostname`,{type:`string`,description:`A non-unique field that refers to a target. Case insensitive, maximum
3
3
  length of 255 characters, supports the use of special characters dash
4
4
  and period, does not support spaces, and must start and end with an
5
5
  alphanumeric character.`}).option(`ip-ipv4-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv4-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.`}).option(`ip-ipv6-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv6-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`create`,describe:`Creates a new infrastructure access target in the account.`,builder:v,handler:async d=>{if(d.dryRun){a({command:`cf access targets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({hostname:l(d.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:l(d[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:l(d[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:l(d[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:l(d[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}}}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.access.targets.create({...e,account_id:p})),{successLabel:`Created`});return}d.hostname===void 0&&(d.hostname=await u(`hostname`,`A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.`));let m=c({hostname:l(d.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:l(d[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:l(d[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:l(d[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:l(d[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}}});i(await o(`Creating`,async()=>f.access.targets.create({...m,account_id:p})),{successLabel:`Created`})}};function b(e){return e.positional(`target-id`,{type:`string`,description:`Target 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 x={command:`delete <target-id>`,describe:`Removes a single infrastructure access target by its ID.`,builder:b,handler:async s=>{if(s.dryRun){a({command:`cf access targets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/${s[`target-id`]==null?`<target-id>`:encodeURIComponent(String(s[`target-id`]))}`,pathParams:{"target-id":String(s[`target-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await d({force:!!s.force})){process.stderr.write(`Aborted.
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-Be3lg_9E.mjs";import{f as t,g as n}from"./oauth-DuEONNgC.mjs";import{r}from"./auth-D3X9HYhD.mjs";import{t as i}from"./output-Ccqw2WOb.mjs";import{t as a}from"./dry-run-DL2V6yFm.mjs";import{t as o}from"./progress-BqQcF5QH.mjs";import{n as s,t as c}from"./body-parser-BshbixEq.mjs";import{n as l}from"./input-validation-QDIYu7Vb.mjs";import{a as u}from"./prompt-B0sWIs9c.mjs";function d(e){return e.option(`account-ids`,{type:`string`,array:!0,description:`Move these accounts to the destination organization.`}).option(`destination-organization-id`,{type:`string`,description:`Move accounts to this organization 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)`})}const f={command:`move`,describe:`Batch move a collection of accounts to a specific organization. ⚠️ Not implemented.`,builder:d,handler:async e=>{if(e.dryRun){a({command:`cf account batch move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/move`,pathParams:{},bodyKind:`json`,body:e.body===void 0?c({account_ids:e[`account-ids`],destination_organization_id:l(e[`destination-organization-id`],`destination-organization-id`,`text`)}):s(e.body)});return}let t=await r(e);if(e.body){let n=s(e.body);i(await o(`Creating`,async()=>t.account.batch.move({...n})),{successLabel:`Created`});return}if(e[`account-ids`]===void 0)throw Error(`--account-ids is required (or pass --body with this field set).`);e[`destination-organization-id`]===void 0&&(e[`destination-organization-id`]=await u(`destination-organization-id`,`Move accounts to this organization ID.`));let n=c({account_ids:e[`account-ids`],destination_organization_id:l(e[`destination-organization-id`],`destination-organization-id`,`text`)});i(await o(`Creating`,async()=>t.account.batch.move({...n})),{successLabel:`Created`})}},p={command:`batch`,describe:`Operations for batch`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function m(e){return e.option(`destination-organization-id`,{type:`string`,description:`The destination_organization_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The destination organization ID is where the account is to be moved.`})}const h={command:`move`,describe:`Move an account within an organization hierarchy or an account outside an organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:m,handler:async d=>{if(d.dryRun){a({command:`cf account move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/move`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({destination_organization_id:l(d[`destination-organization-id`],`destination-organization-id`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.account.move({...e,account_id:p})),{successLabel:`Created`});return}d[`destination-organization-id`]===void 0&&(d[`destination-organization-id`]=await u(`destination-organization-id`,`The destination_organization_id field`));let m=c({destination_organization_id:l(d[`destination-organization-id`],`destination-organization-id`,`text`)});i(await o(`Creating`,async()=>f.account.move({...m,account_id:p})),{successLabel:`Created`})}};function g(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`Retrieve a list of the organizations that "contain" this account or are managing it. The returned list will be in order from "root" to "leaf", where the "leaf" will be the organization that _immediately_ contains the specified account.`,builder:g,handler:async s=>{if(s.dryRun){a({command:`cf account organization list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/organizations`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.account.organization.list({account_id:l})),{successLabel:`Loaded`})}},v={command:`organization`,describe:`Operations for organization`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get`,describe:`Retrieves the profile information for a specific Cloudflare account, including organization details, settings, and metadata. This endpoint is commonly used to verify account access and retrieve account-level configuration.`,builder:y,handler:async s=>{if(s.dryRun){a({command:`cf account profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/profile`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.account.profile.get({account_id:l})),{successLabel:`Loaded`})}};function x(e){return e.option(`business-address`,{type:`string`,description:`The business_address field`}).option(`business-email`,{type:`string`,description:`The business_email field`}).option(`business-name`,{type:`string`,description:`The business_name field`}).option(`business-phone`,{type:`string`,description:`The business_phone field`}).option(`external-metadata`,{type:`string`,description:`The external_metadata 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 S={command:`update`,describe:`Updates the profile information for a Cloudflare account. Allows modification of account-level settings and organizational details. Requires Account Settings Write permission.`,builder:x,handler:async d=>{if(d.dryRun){a({command:`cf account profile update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/profile`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({business_address:l(d[`business-address`],`business-address`,`text`),business_email:l(d[`business-email`],`business-email`,`text`),business_name:l(d[`business-name`],`business-name`,`text`),business_phone:l(d[`business-phone`],`business-phone`,`text`),external_metadata:l(d[`external-metadata`],`external-metadata`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Updating`,async()=>f.account.profile.update({body:e,account_id:p})),{successLabel:`Updated`});return}d[`business-address`]===void 0&&(d[`business-address`]=await u(`business-address`,`The business_address field`)),d[`business-email`]===void 0&&(d[`business-email`]=await u(`business-email`,`The business_email field`)),d[`business-name`]===void 0&&(d[`business-name`]=await u(`business-name`,`The business_name field`)),d[`business-phone`]===void 0&&(d[`business-phone`]=await u(`business-phone`,`The business_phone field`)),d[`external-metadata`]===void 0&&(d[`external-metadata`]=await u(`external-metadata`,`The external_metadata field`));let m=c({business_address:l(d[`business-address`],`business-address`,`text`),business_email:l(d[`business-email`],`business-email`,`text`),business_name:l(d[`business-name`],`business-name`,`text`),business_phone:l(d[`business-phone`],`business-phone`,`text`),external_metadata:l(d[`external-metadata`],`external-metadata`,`text`)});i(await o(`Updating`,async()=>f.account.profile.update({body:m,account_id:p})),{successLabel:`Updated`})}},C={command:`profile`,describe:`Operations for profile`,builder:e=>e.command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},w={command:`account`,describe:`account`,builder:e=>e.command(h).command(p).command(v).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
2
+ import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n}from"./oauth-DAa7SwkM.mjs";import{r}from"./auth-DY_Y2bXC.mjs";import{t as i}from"./output-BqDR9h74.mjs";import{t as a}from"./dry-run-ILZRVpnp.mjs";import{t as o}from"./progress-jYW64HY7.mjs";import{n as s,t as c}from"./body-parser-BGVbwPeM.mjs";import{n as l}from"./input-validation-1esLElok.mjs";import{a as u}from"./prompt-CyATfGUu.mjs";function d(e){return e.option(`account-ids`,{type:`string`,array:!0,description:`Move these accounts to the destination organization.`}).option(`destination-organization-id`,{type:`string`,description:`Move accounts to this organization 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)`})}const f={command:`move`,describe:`Batch move a collection of accounts to a specific organization. ⚠️ Not implemented.`,builder:d,handler:async e=>{if(e.dryRun){a({command:`cf account batch move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/move`,pathParams:{},bodyKind:`json`,body:e.body===void 0?c({account_ids:e[`account-ids`],destination_organization_id:l(e[`destination-organization-id`],`destination-organization-id`,`text`)}):s(e.body)});return}let t=await r(e);if(e.body){let n=s(e.body);i(await o(`Creating`,async()=>t.account.batch.move({...n})),{successLabel:`Created`});return}if(e[`account-ids`]===void 0)throw Error(`--account-ids is required (or pass --body with this field set).`);e[`destination-organization-id`]===void 0&&(e[`destination-organization-id`]=await u(`destination-organization-id`,`Move accounts to this organization ID.`));let n=c({account_ids:e[`account-ids`],destination_organization_id:l(e[`destination-organization-id`],`destination-organization-id`,`text`)});i(await o(`Creating`,async()=>t.account.batch.move({...n})),{successLabel:`Created`})}},p={command:`batch`,describe:`Operations for batch`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function m(e){return e.option(`destination-organization-id`,{type:`string`,description:`The destination_organization_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The destination organization ID is where the account is to be moved.`})}const h={command:`move`,describe:`Move an account within an organization hierarchy or an account outside an organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:m,handler:async d=>{if(d.dryRun){a({command:`cf account move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/move`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({destination_organization_id:l(d[`destination-organization-id`],`destination-organization-id`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.account.move({...e,account_id:p})),{successLabel:`Created`});return}d[`destination-organization-id`]===void 0&&(d[`destination-organization-id`]=await u(`destination-organization-id`,`The destination_organization_id field`));let m=c({destination_organization_id:l(d[`destination-organization-id`],`destination-organization-id`,`text`)});i(await o(`Creating`,async()=>f.account.move({...m,account_id:p})),{successLabel:`Created`})}};function g(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`Retrieve a list of the organizations that "contain" this account or are managing it. The returned list will be in order from "root" to "leaf", where the "leaf" will be the organization that _immediately_ contains the specified account.`,builder:g,handler:async s=>{if(s.dryRun){a({command:`cf account organization list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/organizations`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.account.organization.list({account_id:l})),{successLabel:`Loaded`})}},v={command:`organization`,describe:`Operations for organization`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get`,describe:`Retrieves the profile information for a specific Cloudflare account, including organization details, settings, and metadata. This endpoint is commonly used to verify account access and retrieve account-level configuration.`,builder:y,handler:async s=>{if(s.dryRun){a({command:`cf account profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/profile`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.account.profile.get({account_id:l})),{successLabel:`Loaded`})}};function x(e){return e.option(`business-address`,{type:`string`,description:`The business_address field`}).option(`business-email`,{type:`string`,description:`The business_email field`}).option(`business-name`,{type:`string`,description:`The business_name field`}).option(`business-phone`,{type:`string`,description:`The business_phone field`}).option(`external-metadata`,{type:`string`,description:`The external_metadata 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 S={command:`update`,describe:`Updates the profile information for a Cloudflare account. Allows modification of account-level settings and organizational details. Requires Account Settings Write permission.`,builder:x,handler:async d=>{if(d.dryRun){a({command:`cf account profile update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/profile`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({business_address:l(d[`business-address`],`business-address`,`text`),business_email:l(d[`business-email`],`business-email`,`text`),business_name:l(d[`business-name`],`business-name`,`text`),business_phone:l(d[`business-phone`],`business-phone`,`text`),external_metadata:l(d[`external-metadata`],`external-metadata`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Updating`,async()=>f.account.profile.update({body:e,account_id:p})),{successLabel:`Updated`});return}d[`business-address`]===void 0&&(d[`business-address`]=await u(`business-address`,`The business_address field`)),d[`business-email`]===void 0&&(d[`business-email`]=await u(`business-email`,`The business_email field`)),d[`business-name`]===void 0&&(d[`business-name`]=await u(`business-name`,`The business_name field`)),d[`business-phone`]===void 0&&(d[`business-phone`]=await u(`business-phone`,`The business_phone field`)),d[`external-metadata`]===void 0&&(d[`external-metadata`]=await u(`external-metadata`,`The external_metadata field`));let m=c({business_address:l(d[`business-address`],`business-address`,`text`),business_email:l(d[`business-email`],`business-email`,`text`),business_name:l(d[`business-name`],`business-name`,`text`),business_phone:l(d[`business-phone`],`business-phone`,`text`),external_metadata:l(d[`external-metadata`],`external-metadata`,`text`)});i(await o(`Updating`,async()=>f.account.profile.update({body:m,account_id:p})),{successLabel:`Updated`})}},C={command:`profile`,describe:`Operations for profile`,builder:e=>e.command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},w={command:`account`,describe:`account`,builder:e=>e.command(h).command(p).command(v).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-Be3lg_9E.mjs";import{f as t,g as n,h as r}from"./oauth-DuEONNgC.mjs";import{a as i,r as a}from"./auth-D3X9HYhD.mjs";import{t as o}from"./output-Ccqw2WOb.mjs";import{t as s}from"./dry-run-DL2V6yFm.mjs";import{t as c}from"./progress-BqQcF5QH.mjs";import{i as l,n as u,t as d}from"./body-parser-BshbixEq.mjs";import{n as f}from"./input-validation-QDIYu7Vb.mjs";import{a as p,i as m,n as h}from"./prompt-B0sWIs9c.mjs";import{t as g}from"./cli-types-DAYeL_Mj.mjs";function _(e){return e.option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
2
+ import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n,h as r}from"./oauth-DAa7SwkM.mjs";import{a as i,r as a}from"./auth-DY_Y2bXC.mjs";import{t as o}from"./output-BqDR9h74.mjs";import{t as s}from"./dry-run-ILZRVpnp.mjs";import{t as c}from"./progress-jYW64HY7.mjs";import{i as l,n as u,t as d}from"./body-parser-BGVbwPeM.mjs";import{n as f}from"./input-validation-1esLElok.mjs";import{a as p,i as m,n as h}from"./prompt-CyATfGUu.mjs";import{t as g}from"./cli-types-C3nVfpSG.mjs";function _(e){return e.option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
3
3
  verify the current resource ETag matches before applying the write. Returns
4
4
  412 Precondition Failed if the resource has been modified since the ETag was
5
5
  obtained. Omit this header for unconditional writes.`}).option(`resource-id`,{type:`string`,description:`Identifies the unique resource.`}).option(`resource-type`,{type:`string`,description:`Enum for worker_version resource type.`,choices:`worker_version.access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.d1_database.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`)}).option(`worker-id`,{type:`string`,description:`Worker ID is required only for worker_version resources`}).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:`Request body schema for deleting tags from account-level resources. Use /zones/{zone_id}/tags for zone-level resources.`})}const v={command:`delete`,describe:`Removes all tags from a specific account or zone-level resource.`,builder:_,handler:async g=>{let _={};if(g[`if-match`]!==void 0&&(_[`If-Match`]=String(g[`if-match`])),g.dryRun){let e=g.zone===void 0?await n():void 0,t=g.zone===void 0?`accounts`:`zones`,r=g.zone??e??`<account-id>`;s({command:`cf account-tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/tags`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:g.body===void 0?d({resource_id:f(g[`resource-id`],`resource-id`,`text`),resource_type:f(g[`resource-type`],`resource-type`,`text`),worker_id:f(g[`worker-id`],`worker-id`,`text`)}):u(g.body)});return}let v=await a(g),y=g.zone===void 0?`accounts`:`zones`,b=y===`zones`?await r({zone:g.zone},v,{quiet:g.quiet}):g.local?e:await t();if(y===`zones`?g.zoneId=b:g.accountId=b,!await h({force:!!g.force})){process.stderr.write(`Aborted.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-Be3lg_9E.mjs";import{f as t,g as n,h as r}from"./oauth-DuEONNgC.mjs";import{r as i}from"./auth-D3X9HYhD.mjs";import{t as a}from"./output-Ccqw2WOb.mjs";import{t as o}from"./dry-run-DL2V6yFm.mjs";import{t as s}from"./progress-BqQcF5QH.mjs";import{n as c,r as l,t as u}from"./body-parser-BshbixEq.mjs";import{n as d}from"./input-validation-QDIYu7Vb.mjs";import{a as f,n as p}from"./prompt-B0sWIs9c.mjs";import{t as m}from"./cli-types-DAYeL_Mj.mjs";import{n as h,t as g}from"./raw-fetch-Cc-MjHeL.mjs";function ee(e){return e.option(`category-id`,{type:`number`,description:`Returns the category ID.`}).option(`hostnames`,{type:`string`,array:!0,description:`Hostnames matched by the application.`}).option(`human-id`,{type:`string`,description:`Returns the human readable ID.`}).option(`ip-subnets`,{type:`string`,array:!0,description:`IP subnets matched by the application.`}).option(`name`,{type:`string`,description:`Returns the application name.`}).option(`port-protocols`,{type:`string`,array:!0,description:`Port and protocol pairs matched by the application.`}).option(`support-domains`,{type:`string`,array:!0,description:`Support domains matched by the application.`}).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 te={command:`create`,describe:`Create a custom application for an account.`,builder:ee,handler:async r=>{if(r.dryRun){o({command:`cf accounts applications create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/resource-library/applications`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({category_id:r[`category-id`],hostnames:r.hostnames,human_id:d(r[`human-id`],`human-id`,`text`),ip_subnets:r[`ip-subnets`],name:d(r.name,`name`,`text`),port_protocols:r[`port-protocols`],support_domains:r[`support-domains`]}):c(r.body)});return}let l=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()=>l.accounts.applications.create({...e,account_id:p})),{successLabel:`Created`});return}if(r[`category-id`]===void 0)throw Error(`--category-id is required (or pass --body with this field set).`);r[`human-id`]===void 0&&(r[`human-id`]=await f(`human-id`,`Returns the human readable ID.`)),r.name===void 0&&(r.name=await f(`name`,`Returns the application name.`));let m=u({category_id:r[`category-id`],hostnames:r.hostnames,human_id:d(r[`human-id`],`human-id`,`text`),ip_subnets:r[`ip-subnets`],name:d(r.name,`name`,`text`),port_protocols:r[`port-protocols`],support_domains:r[`support-domains`]});a(await s(`Creating`,async()=>l.accounts.applications.create({...m,account_id:p})),{successLabel:`Created`})}};function _(e){return e.positional(`id`,{type:`string`,description:`Application ID.`,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 v={command:`delete <id>`,describe:`Delete a custom application and all of its versions. Deletion is rejected when other resources reference the application.`,builder:_,handler:async r=>{if(r.dryRun){o({command:`cf accounts applications delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/resource-library/applications/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{id:String(r.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.
2
+ import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n,h as r}from"./oauth-DAa7SwkM.mjs";import{r as i}from"./auth-DY_Y2bXC.mjs";import{t as a}from"./output-BqDR9h74.mjs";import{t as o}from"./dry-run-ILZRVpnp.mjs";import{t as s}from"./progress-jYW64HY7.mjs";import{n as c,r as l,t as u}from"./body-parser-BGVbwPeM.mjs";import{n as d}from"./input-validation-1esLElok.mjs";import{a as f,n as p}from"./prompt-CyATfGUu.mjs";import{t as m}from"./cli-types-C3nVfpSG.mjs";import{n as h,t as g}from"./raw-fetch-CNKIypJ7.mjs";function ee(e){return e.option(`category-id`,{type:`number`,description:`Returns the category ID.`}).option(`hostnames`,{type:`string`,array:!0,description:`Hostnames matched by the application.`}).option(`human-id`,{type:`string`,description:`Returns the human readable ID.`}).option(`ip-subnets`,{type:`string`,array:!0,description:`IP subnets matched by the application.`}).option(`name`,{type:`string`,description:`Returns the application name.`}).option(`port-protocols`,{type:`string`,array:!0,description:`Port and protocol pairs matched by the application.`}).option(`support-domains`,{type:`string`,array:!0,description:`Support domains matched by the application.`}).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 te={command:`create`,describe:`Create a custom application for an account.`,builder:ee,handler:async r=>{if(r.dryRun){o({command:`cf accounts applications create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/resource-library/applications`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({category_id:r[`category-id`],hostnames:r.hostnames,human_id:d(r[`human-id`],`human-id`,`text`),ip_subnets:r[`ip-subnets`],name:d(r.name,`name`,`text`),port_protocols:r[`port-protocols`],support_domains:r[`support-domains`]}):c(r.body)});return}let l=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()=>l.accounts.applications.create({...e,account_id:p})),{successLabel:`Created`});return}if(r[`category-id`]===void 0)throw Error(`--category-id is required (or pass --body with this field set).`);r[`human-id`]===void 0&&(r[`human-id`]=await f(`human-id`,`Returns the human readable ID.`)),r.name===void 0&&(r.name=await f(`name`,`Returns the application name.`));let m=u({category_id:r[`category-id`],hostnames:r.hostnames,human_id:d(r[`human-id`],`human-id`,`text`),ip_subnets:r[`ip-subnets`],name:d(r.name,`name`,`text`),port_protocols:r[`port-protocols`],support_domains:r[`support-domains`]});a(await s(`Creating`,async()=>l.accounts.applications.create({...m,account_id:p})),{successLabel:`Created`})}};function _(e){return e.positional(`id`,{type:`string`,description:`Application ID.`,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 v={command:`delete <id>`,describe:`Delete a custom application and all of its versions. Deletion is rejected when other resources reference the application.`,builder:_,handler:async r=>{if(r.dryRun){o({command:`cf accounts applications delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/resource-library/applications/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{id:String(r.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.
3
3
  `);return}a(await s(`Deleting`,async()=>c.accounts.applications.delete({account_id:l,id:r.id})),{successLabel:`Deleted`})}};function y(e){return e.option(`filter`,{type:`string`,description:`Filter applications using key:value format. Supported filter keys:
4
4
  - name: Filter by application name (e.g., name:HR)
5
5
  - id: Filter by application ID (e.g., id:498)
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{h as e}from"./oauth-DuEONNgC.mjs";import{r as t}from"./auth-D3X9HYhD.mjs";import{t as n}from"./output-Ccqw2WOb.mjs";import{t as r}from"./dry-run-DL2V6yFm.mjs";import{t as i}from"./progress-BqQcF5QH.mjs";import{n as a,t as o}from"./body-parser-BshbixEq.mjs";import{n as s}from"./input-validation-QDIYu7Vb.mjs";import{a as c,n as l}from"./prompt-B0sWIs9c.mjs";function u(e){return e.option(`certificate`,{type:`string`,description:`The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported.`}).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 d={command:`create`,describe:`Upload a root CA certificate to the Custom Origin Trust Store for a Zone. Only root CA certificates are accepted.`,builder:u,handler:async l=>{if(l.dryRun){r({command:`cf acm custom-trust-store create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/acm/custom_trust_store`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({certificate:s(l.certificate,`certificate`,`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.acm.customTrustStore.create({...e,zone_id:d})),{successLabel:`Created`});return}l.certificate===void 0&&(l.certificate=await c(`certificate`,`The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported.`));let f=o({certificate:s(l.certificate,`certificate`,`text`)});n(await i(`Creating`,async()=>u.acm.customTrustStore.create({...f,zone_id:d})),{successLabel:`Created`})}};function f(e){return e.positional(`custom-origin-trust-store-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 <custom-origin-trust-store-id>`,describe:`Removes a root CA certificate from the custom origin trust store. Origins using certificates signed by this CA will no longer be trusted.`,builder:f,handler:async a=>{if(a.dryRun){r({command:`cf acm custom-trust-store delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/acm/custom_trust_store/${a[`custom-origin-trust-store-id`]==null?`<custom-origin-trust-store-id>`:encodeURIComponent(String(a[`custom-origin-trust-store-id`]))}`,pathParams:{"custom-origin-trust-store-id":String(a[`custom-origin-trust-store-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-DAa7SwkM.mjs";import{r as t}from"./auth-DY_Y2bXC.mjs";import{t as n}from"./output-BqDR9h74.mjs";import{t as r}from"./dry-run-ILZRVpnp.mjs";import{t as i}from"./progress-jYW64HY7.mjs";import{n as a,t as o}from"./body-parser-BGVbwPeM.mjs";import{n as s}from"./input-validation-1esLElok.mjs";import{a as c,n as l}from"./prompt-CyATfGUu.mjs";function u(e){return e.option(`certificate`,{type:`string`,description:`The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported.`}).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 d={command:`create`,describe:`Upload a root CA certificate to the Custom Origin Trust Store for a Zone. Only root CA certificates are accepted.`,builder:u,handler:async l=>{if(l.dryRun){r({command:`cf acm custom-trust-store create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/acm/custom_trust_store`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({certificate:s(l.certificate,`certificate`,`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.acm.customTrustStore.create({...e,zone_id:d})),{successLabel:`Created`});return}l.certificate===void 0&&(l.certificate=await c(`certificate`,`The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported.`));let f=o({certificate:s(l.certificate,`certificate`,`text`)});n(await i(`Creating`,async()=>u.acm.customTrustStore.create({...f,zone_id:d})),{successLabel:`Created`})}};function f(e){return e.positional(`custom-origin-trust-store-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 <custom-origin-trust-store-id>`,describe:`Removes a root CA certificate from the custom origin trust store. Origins using certificates signed by this CA will no longer be trusted.`,builder:f,handler:async a=>{if(a.dryRun){r({command:`cf acm custom-trust-store delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/acm/custom_trust_store/${a[`custom-origin-trust-store-id`]==null?`<custom-origin-trust-store-id>`:encodeURIComponent(String(a[`custom-origin-trust-store-id`]))}`,pathParams:{"custom-origin-trust-store-id":String(a[`custom-origin-trust-store-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.acm.customTrustStore.delete({zone_id:s,custom_origin_trust_store_id:a[`custom-origin-trust-store-id`]})),{successLabel:`Deleted`})}};function m(e){return e.positional(`custom-origin-trust-store-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <custom-origin-trust-store-id>`,describe:`Retrieves details about a specific root CA certificate in the custom origin trust store, including expiration and subject information.`,builder:m,handler:async a=>{if(a.dryRun){r({command:`cf acm custom-trust-store get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/acm/custom_trust_store/${a[`custom-origin-trust-store-id`]==null?`<custom-origin-trust-store-id>`:encodeURIComponent(String(a[`custom-origin-trust-store-id`]))}`,pathParams:{"custom-origin-trust-store-id":String(a[`custom-origin-trust-store-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.acm.customTrustStore.get({zone_id:s,custom_origin_trust_store_id:a[`custom-origin-trust-store-id`]})),{successLabel:`Loaded`})}};function g(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of records per page.`}).option(`limit`,{type:`number`,description:`Limit to the number of records returned.`}).option(`offset`,{type:`number`,description:`Offset the results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`Get Custom Origin Trust Store for a Zone.`,builder:g,handler:async a=>{let o={page:a.page,per_page:a[`per-page`],limit:a.limit,offset:a.offset};if(a.dryRun){r({command:`cf acm custom-trust-store list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/acm/custom_trust_store`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(a),c=await e({zone:a.zone},s,{quiet:a.quiet});a.zoneId=c,n(await i(`Loading`,async()=>s.acm.customTrustStore.list({zone_id:c,...o})),{successLabel:`Loaded`})}},v={command:`custom-trust-store`,describe:`Operations for custom-trust-store`,builder:e=>e.command(d).command(p).command(h).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.option(`certificate-authority`,{type:`string`,description:`The Certificate Authority that Total TLS certificates will be issued through.`,choices:[`google`,`lets_encrypt`,`ssl_com`]}).option(`enabled`,{type:`boolean`,description:`If enabled, Total TLS will order a hostname specific TLS certificate for any proxied A, AAAA, or CNAME record in your zone.`}).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:`edit`,describe:`Set Total TLS Settings or disable the feature for a Zone.`,builder:y,handler:async c=>{if(c.dryRun){r({command:`cf acm total-tls edit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/acm/total_tls`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({certificate_authority:s(c[`certificate-authority`],`certificate-authority`,`text`),enabled:c.enabled}):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.acm.totalTls.edit({...e,zone_id:u})),{successLabel:`Created`});return}if(c.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let d=o({certificate_authority:s(c[`certificate-authority`],`certificate-authority`,`text`),enabled:c.enabled});n(await i(`Creating`,async()=>l.acm.totalTls.edit({...d,zone_id:u})),{successLabel:`Created`})}};function x(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get`,describe:`Get Total TLS Settings for a Zone.`,builder:x,handler:async a=>{if(a.dryRun){r({command:`cf acm total-tls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/acm/total_tls`,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.acm.totalTls.get({zone_id:s})),{successLabel:`Loaded`})}},C={command:`total-tls`,describe:`Operations for total-tls`,builder:e=>e.command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},w={command:`acm`,describe:`acm`,builder:e=>e.command(v).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-Be3lg_9E.mjs";import{f as t,g as n,h as r}from"./oauth-DuEONNgC.mjs";import{a as i,r as a}from"./auth-D3X9HYhD.mjs";import{t as o}from"./output-Ccqw2WOb.mjs";import{t as s}from"./dry-run-DL2V6yFm.mjs";import{t as c}from"./progress-BqQcF5QH.mjs";import{n as l,r as u,t as d}from"./body-parser-BshbixEq.mjs";import{n as f,t as p}from"./input-validation-QDIYu7Vb.mjs";import{a as m,n as h}from"./prompt-B0sWIs9c.mjs";import{n as ee,t as te}from"./raw-fetch-Cc-MjHeL.mjs";function g(e){return e.positional(`account-id-2`,{type:`string`,description:`Identifier of a Cloudflare account.`,demandOption:!0}).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,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 _={command:`delete <account-id-2>`,describe:`Remove an account as a member of a particular address map.`,builder:g,handler:async r=>{if(r.dryRun){s({command:`cf addressing address-maps accounts delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/addressing/address_maps/${r[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(r[`address-map-id`]))}/accounts/${r[`account-id-2`]==null?`<account-id-2>`:encodeURIComponent(String(r[`account-id-2`]))}`,pathParams:{"address-map-id":String(r[`address-map-id`]??``),"account-id-2":String(r[`account-id-2`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,!await h({force:!!r.force})){process.stderr.write(`Aborted.
2
+ import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n,h as r}from"./oauth-DAa7SwkM.mjs";import{a as i,r as a}from"./auth-DY_Y2bXC.mjs";import{t as o}from"./output-BqDR9h74.mjs";import{t as s}from"./dry-run-ILZRVpnp.mjs";import{t as c}from"./progress-jYW64HY7.mjs";import{n as l,r as u,t as d}from"./body-parser-BGVbwPeM.mjs";import{n as f,t as p}from"./input-validation-1esLElok.mjs";import{a as m,n as h}from"./prompt-CyATfGUu.mjs";import{n as ee,t as te}from"./raw-fetch-CNKIypJ7.mjs";function g(e){return e.positional(`account-id-2`,{type:`string`,description:`Identifier of a Cloudflare account.`,demandOption:!0}).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,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 _={command:`delete <account-id-2>`,describe:`Remove an account as a member of a particular address map.`,builder:g,handler:async r=>{if(r.dryRun){s({command:`cf addressing address-maps accounts delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/addressing/address_maps/${r[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(r[`address-map-id`]))}/accounts/${r[`account-id-2`]==null?`<account-id-2>`:encodeURIComponent(String(r[`account-id-2`]))}`,pathParams:{"address-map-id":String(r[`address-map-id`]??``),"account-id-2":String(r[`account-id-2`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,!await h({force:!!r.force})){process.stderr.write(`Aborted.
3
3
  `);return}o(await c(`Deleting`,async()=>i.addressing.addressMaps.accounts.delete({account_id:l,address_map_id:r[`address-map-id`],account_id_2:r[`account-id-2`]})),{successLabel:`Deleted`})}};function v(e){return e.positional(`account-id-2`,{type:`string`,description:`Identifier of a Cloudflare account.`,demandOption:!0}).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`update <account-id-2>`,describe:`Add an account as a member of a particular address map.`,builder:v,handler:async r=>{if(r.dryRun){s({command:`cf addressing address-maps accounts update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/addressing/address_maps/${r[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(r[`address-map-id`]))}/accounts/${r[`account-id-2`]==null?`<account-id-2>`:encodeURIComponent(String(r[`account-id-2`]))}`,pathParams:{"address-map-id":String(r[`address-map-id`]??``),"account-id-2":String(r[`account-id-2`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Updating`,async()=>i.addressing.addressMaps.accounts.update({account_id:l,address_map_id:r[`address-map-id`],account_id_2:r[`account-id-2`]})),{successLabel:`Updated`})}},b={command:`accounts`,describe:`Operations for address-maps.accounts`,builder:e=>e.command(_).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.option(`description`,{type:`string`,description:`An optional description field which may be used to describe the types of IPs or zones on the map.`}).option(`enabled`,{type:`boolean`,description:`Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.`,default:!1}).option(`ips`,{type:`string`,array:!0,description:`The ips field`}).option(`memberships`,{type:`string`,description:`Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership. Provide as a JSON array of objects or @path/to/file.json.`}).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:`create`,describe:`Create a new address map under the account.`,builder:x,handler:async r=>{if(r.dryRun){s({command:`cf addressing address-maps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/addressing/address_maps`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({description:f(r.description,`description`,`text`),enabled:r.enabled,ips:r.ips,memberships:u(r.memberships,`memberships`)}):l(r.body)});return}let i=await a(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=l(r.body);o(await c(`Creating`,async()=>i.addressing.addressMaps.create({...e,account_id:p})),{successLabel:`Created`});return}let m=d({description:f(r.description,`description`,`text`),enabled:r.enabled,ips:r.ips,memberships:u(r.memberships,`memberships`)});o(await c(`Creating`,async()=>i.addressing.addressMaps.create({...m,account_id:p})),{successLabel:`Created`})}};function C(e){return e.positional(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,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 w={command:`delete <address-map-id>`,describe:`Delete a particular address map owned by the account. An Address Map must be disabled before it can be deleted.`,builder:C,handler:async r=>{if(r.dryRun){s({command:`cf addressing address-maps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/addressing/address_maps/${r[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(r[`address-map-id`]))}`,pathParams:{"address-map-id":String(r[`address-map-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,!await h({force:!!r.force})){process.stderr.write(`Aborted.
4
4
  `);return}o(await c(`Deleting`,async()=>i.addressing.addressMaps.delete({account_id:l,address_map_id:r[`address-map-id`]})),{successLabel:`Deleted`})}};function T(e){return e.positional(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`default-sni`,{type:`string`,description:`If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.`}).option(`description`,{type:`string`,description:`An optional description field which may be used to describe the types of IPs or zones on the map.`}).option(`enabled`,{type:`boolean`,description:`Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const E={command:`edit <address-map-id>`,describe:`Modify properties of an address map owned by the account.`,builder:T,handler:async r=>{if(r.dryRun){s({command:`cf addressing address-maps edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/addressing/address_maps/${r[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(r[`address-map-id`]))}`,pathParams:{"address-map-id":String(r[`address-map-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({default_sni:f(r[`default-sni`],`default-sni`,`text`),description:f(r.description,`description`,`text`),enabled:r.enabled}):l(r.body)});return}let i=await a(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);o(await c(`Updating`,async()=>i.addressing.addressMaps.edit({...e,account_id:u,address_map_id:r[`address-map-id`]})),{successLabel:`Updated`});return}let p=d({default_sni:f(r[`default-sni`],`default-sni`,`text`),description:f(r.description,`description`,`text`),enabled:r.enabled});o(await c(`Updating`,async()=>i.addressing.addressMaps.edit({...p,account_id:u,address_map_id:r[`address-map-id`]})),{successLabel:`Updated`})}};function D(e){return e.positional(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get <address-map-id>`,describe:`Show a particular address map owned by the account.`,builder:D,handler:async r=>{if(r.dryRun){s({command:`cf addressing address-maps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/addressing/address_maps/${r[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(r[`address-map-id`]))}`,pathParams:{"address-map-id":String(r[`address-map-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.addressing.addressMaps.get({account_id:l,address_map_id:r[`address-map-id`]})),{successLabel:`Loaded`})}};function k(e){return e.positional(`ip-address`,{type:`string`,description:`An IPv4 or IPv6 address.`,demandOption:!0}).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,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 A={command:`delete <ip-address>`,describe:`Remove an IP from a particular address map.`,builder:k,handler:async r=>{if(r.dryRun){s({command:`cf addressing address-maps ips delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/addressing/address_maps/${r[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(r[`address-map-id`]))}/ips/${r[`ip-address`]==null?`<ip-address>`:encodeURIComponent(String(r[`ip-address`]))}`,pathParams:{"ip-address":String(r[`ip-address`]??``),"address-map-id":String(r[`address-map-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,!await h({force:!!r.force})){process.stderr.write(`Aborted.
5
5
  `);return}o(await c(`Deleting`,async()=>i.addressing.addressMaps.ips.delete({account_id:l,address_map_id:r[`address-map-id`],ip_address:r[`ip-address`]})),{successLabel:`Deleted`})}};function j(e){return e.positional(`ip-address`,{type:`string`,description:`An IPv4 or IPv6 address.`,demandOption:!0}).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`update <ip-address>`,describe:`Add an IP from a prefix owned by the account to a particular address map.`,builder:j,handler:async r=>{if(r.dryRun){s({command:`cf addressing address-maps ips update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/addressing/address_maps/${r[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(r[`address-map-id`]))}/ips/${r[`ip-address`]==null?`<ip-address>`:encodeURIComponent(String(r[`ip-address`]))}`,pathParams:{"ip-address":String(r[`ip-address`]??``),"address-map-id":String(r[`address-map-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Updating`,async()=>i.addressing.addressMaps.ips.update({account_id:l,address_map_id:r[`address-map-id`],ip_address:r[`ip-address`]})),{successLabel:`Updated`})}},N={command:`ips`,describe:`Operations for address-maps.ips`,builder:e=>e.command(A).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`list`,describe:`List all address maps owned by the account.`,builder:P,handler:async r=>{if(r.dryRun){s({command:`cf addressing address-maps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/addressing/address_maps`,pathParams:{},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.addressing.addressMaps.list({account_id:l})),{successLabel:`Loaded`})}};function I(e){return e.option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,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 L={command:`delete`,describe:`Remove a zone as a member of a particular address map.`,builder:I,handler:async i=>{if(i.dryRun){s({command:`cf addressing address-maps zones delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/addressing/address_maps/${i[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(i[`address-map-id`]))}/zones/${i.zone??i.zoneId??`<zone>`}`,pathParams:{"zone-id":String(i.zone??i[`zone-id`]??``),"address-map-id":String(i[`address-map-id`]??``)},bodyKind:`none`});return}let l=await a(i),u=i.local?e:await t();i.accountId=u;let d=await r({zone:i.zone},l,{quiet:i.quiet});if(i.zoneId=d,!await h({force:!!i.force})){process.stderr.write(`Aborted.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./output-Ccqw2WOb.mjs";import{n as t}from"./metadata-B5yfL0ln.mjs";function n(e){return typeof e==`object`&&!!e&&`version`in e&&`products`in e&&`universal`in e&&typeof e.version==`string`&&typeof e.universal==`string`&&typeof e.products==`object`}const r={command:`agent-context [product]`,describe:`Output agent context and skill files`,builder:e=>e.positional(`product`,{describe:`Product name (e.g., d1, dns, zones)`,type:`string`}).option(`list`,{type:`boolean`,describe:`List available products`,default:!1}),handler:async r=>{let i=t(import.meta.url,`agent-context.json`,n);if(i||(console.error("Error: Could not load agent context. Run `pnpm generate` first."),process.exit(1)),r.list){e(Object.keys(i.products));return}if(r.product){let e=i.products[r.product];if(!e){let e=Object.keys(i.products).join(`, `);console.error(`Product "${r.product}" not found. Available: ${e}`),process.exit(1)}console.log(i.universal+`
2
+ import{t as e}from"./output-BqDR9h74.mjs";import{n as t}from"./metadata-DEqBUaSv.mjs";function n(e){return typeof e==`object`&&!!e&&`version`in e&&`products`in e&&`universal`in e&&typeof e.version==`string`&&typeof e.universal==`string`&&typeof e.products==`object`}const r={command:`agent-context [product]`,describe:`Output agent context and skill files`,builder:e=>e.positional(`product`,{describe:`Product name (e.g., d1, dns, zones)`,type:`string`}).option(`list`,{type:`boolean`,describe:`List available products`,default:!1}),handler:async r=>{let i=t(import.meta.url,`agent-context.json`,n);if(i||(console.error("Error: Could not load agent context. Run `pnpm generate` first."),process.exit(1)),r.list){e(Object.keys(i.products));return}if(r.product){let e=i.products[r.product];if(!e){let e=Object.keys(i.products).join(`, `);console.error(`Product "${r.product}" not found. Available: ${e}`),process.exit(1)}console.log(i.universal+`
3
3
 
4
4
  `+e);return}console.log(i.universal+`
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-Be3lg_9E.mjs";import{f as t,g as n}from"./oauth-DuEONNgC.mjs";import{r}from"./auth-D3X9HYhD.mjs";import{t as i}from"./output-Ccqw2WOb.mjs";import{t as a}from"./dry-run-DL2V6yFm.mjs";import{t as o}from"./progress-BqQcF5QH.mjs";import{n as s,r as c,t as l}from"./body-parser-BshbixEq.mjs";import{n as u}from"./input-validation-QDIYu7Vb.mjs";import{a as d,n as f}from"./prompt-B0sWIs9c.mjs";import{t as p}from"./cli-types-DAYeL_Mj.mjs";function m(e){return e.option(`name`,{type:`string`,description:`Namespace name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create-namespace`,describe:`Creates a new memory namespace owned by the account.`,builder:m,handler:async c=>{if(c.dryRun){a({command:`cf agent-memory create-namespace`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/agent-memory/namespaces`,pathParams:{},bodyKind:`json`,body:c.body===void 0?l({name:u(c.name,`name`,`text`)}):s(c.body)});return}let f=await r(c),p=c.local?e:await t();if(c.accountId=p,c.body){let e=s(c.body);i(await o(`Creating`,async()=>f.agentMemory.createNamespace({...e,account_id:p})),{successLabel:`Created`});return}c.name===void 0&&(c.name=await d(`name`,`Namespace name.`));let m=l({name:u(c.name,`name`,`text`)});i(await o(`Creating`,async()=>f.agentMemory.createNamespace({...m,account_id:p})),{successLabel:`Created`})}};function g(e){return e.positional(`memory-id`,{type:`string`,description:`Memory Identifier.`,demandOption:!0}).option(`namespace-name`,{type:`string`,description:`Namespace name.`,demandOption:!0}).option(`profile-name`,{type:`string`,description:`Profile name.`,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 _={command:`delete-memory <memory-id>`,describe:`Deletes a memory by ID. Removes the memory and any source messages linked to it. Returns the deleted memory.`,builder:g,handler:async s=>{if(s.dryRun){a({command:`cf agent-memory delete-memory`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/agent-memory/namespaces/${s[`namespace-name`]==null?`<namespace-name>`:encodeURIComponent(String(s[`namespace-name`]))}/profiles/${s[`profile-name`]==null?`<profile-name>`:encodeURIComponent(String(s[`profile-name`]))}/memories/${s[`memory-id`]==null?`<memory-id>`:encodeURIComponent(String(s[`memory-id`]))}`,pathParams:{"namespace-name":String(s[`namespace-name`]??``),"profile-name":String(s[`profile-name`]??``),"memory-id":String(s[`memory-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`This operation deletes the memory and any source messages linked to it.`})){process.stderr.write(`Aborted.
2
+ import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n}from"./oauth-DAa7SwkM.mjs";import{r}from"./auth-DY_Y2bXC.mjs";import{t as i}from"./output-BqDR9h74.mjs";import{t as a}from"./dry-run-ILZRVpnp.mjs";import{t as o}from"./progress-jYW64HY7.mjs";import{n as s,r as c,t as l}from"./body-parser-BGVbwPeM.mjs";import{n as u}from"./input-validation-1esLElok.mjs";import{a as d,n as f}from"./prompt-CyATfGUu.mjs";import{t as p}from"./cli-types-C3nVfpSG.mjs";function m(e){return e.option(`name`,{type:`string`,description:`Namespace name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create-namespace`,describe:`Creates a new memory namespace owned by the account.`,builder:m,handler:async c=>{if(c.dryRun){a({command:`cf agent-memory create-namespace`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/agent-memory/namespaces`,pathParams:{},bodyKind:`json`,body:c.body===void 0?l({name:u(c.name,`name`,`text`)}):s(c.body)});return}let f=await r(c),p=c.local?e:await t();if(c.accountId=p,c.body){let e=s(c.body);i(await o(`Creating`,async()=>f.agentMemory.createNamespace({...e,account_id:p})),{successLabel:`Created`});return}c.name===void 0&&(c.name=await d(`name`,`Namespace name.`));let m=l({name:u(c.name,`name`,`text`)});i(await o(`Creating`,async()=>f.agentMemory.createNamespace({...m,account_id:p})),{successLabel:`Created`})}};function g(e){return e.positional(`memory-id`,{type:`string`,description:`Memory Identifier.`,demandOption:!0}).option(`namespace-name`,{type:`string`,description:`Namespace name.`,demandOption:!0}).option(`profile-name`,{type:`string`,description:`Profile name.`,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 _={command:`delete-memory <memory-id>`,describe:`Deletes a memory by ID. Removes the memory and any source messages linked to it. Returns the deleted memory.`,builder:g,handler:async s=>{if(s.dryRun){a({command:`cf agent-memory delete-memory`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/agent-memory/namespaces/${s[`namespace-name`]==null?`<namespace-name>`:encodeURIComponent(String(s[`namespace-name`]))}/profiles/${s[`profile-name`]==null?`<profile-name>`:encodeURIComponent(String(s[`profile-name`]))}/memories/${s[`memory-id`]==null?`<memory-id>`:encodeURIComponent(String(s[`memory-id`]))}`,pathParams:{"namespace-name":String(s[`namespace-name`]??``),"profile-name":String(s[`profile-name`]??``),"memory-id":String(s[`memory-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`This operation deletes the memory and any source messages linked to it.`})){process.stderr.write(`Aborted.
3
3
  `);return}i(await o(`Deleting`,async()=>c.agentMemory.deleteMemory({account_id:l,namespace_name:s[`namespace-name`],profile_name:s[`profile-name`],memory_id:s[`memory-id`]})),{successLabel:`Deleted`})}};function v(e){return e.positional(`namespace-name`,{type:`string`,description:`Namespace name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete-namespace <namespace-name>`,describe:`Deletes a namespace.`,builder:v,handler:async s=>{if(s.dryRun){a({command:`cf agent-memory delete-namespace`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/agent-memory/namespaces/${s[`namespace-name`]==null?`<namespace-name>`:encodeURIComponent(String(s[`namespace-name`]))}`,pathParams:{"namespace-name":String(s[`namespace-name`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`This operation deletes the namespace along with all memory profiles, memories, and sessions it contains.`})){process.stderr.write(`Aborted.
4
4
  `);return}i(await o(`Deleting`,async()=>c.agentMemory.deleteNamespace({account_id:l,namespace_name:s[`namespace-name`]})),{successLabel:`Deleted`})}};function b(e){return e.positional(`profile-name`,{type:`string`,description:`Profile name.`,demandOption:!0}).option(`namespace-name`,{type:`string`,description:`Namespace name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const x={command:`delete-profile <profile-name>`,describe:`Marks a profile for deletion.`,builder:b,handler:async s=>{if(s.dryRun){a({command:`cf agent-memory delete-profile`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/agent-memory/namespaces/${s[`namespace-name`]==null?`<namespace-name>`:encodeURIComponent(String(s[`namespace-name`]))}/profiles/${s[`profile-name`]==null?`<profile-name>`:encodeURIComponent(String(s[`profile-name`]))}`,pathParams:{"namespace-name":String(s[`namespace-name`]??``),"profile-name":String(s[`profile-name`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`This operation deletes the profile along with all of its memories and messages.`})){process.stderr.write(`Aborted.
5
5
  `);return}i(await o(`Deleting`,async()=>c.agentMemory.deleteProfile({account_id:l,namespace_name:s[`namespace-name`],profile_name:s[`profile-name`]})),{successLabel:`Deleted`})}};function S(e){return e.positional(`session-id`,{type:`string`,description:`Session identifier.`,demandOption:!0}).option(`namespace-name`,{type:`string`,description:`Namespace name.`,demandOption:!0}).option(`profile-name`,{type:`string`,description:`Profile name.`,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 C={command:`delete-session <session-id>`,describe:`Marks all memories and messages in a profile that are tagged with the given session ID for deletion.`,builder:S,handler:async s=>{if(s.dryRun){a({command:`cf agent-memory delete-session`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/agent-memory/namespaces/${s[`namespace-name`]==null?`<namespace-name>`:encodeURIComponent(String(s[`namespace-name`]))}/profiles/${s[`profile-name`]==null?`<profile-name>`:encodeURIComponent(String(s[`profile-name`]))}/sessions/${s[`session-id`]==null?`<session-id>`:encodeURIComponent(String(s[`session-id`]))}`,pathParams:{"namespace-name":String(s[`namespace-name`]??``),"profile-name":String(s[`profile-name`]??``),"session-id":String(s[`session-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`This operation deletes all memories and messages tagged with this session ID.`})){process.stderr.write(`Aborted.
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{h as e}from"./oauth-DuEONNgC.mjs";import{a as t,r as n}from"./auth-D3X9HYhD.mjs";import{t as r}from"./output-Ccqw2WOb.mjs";import{t as i}from"./dry-run-DL2V6yFm.mjs";import{t as a}from"./progress-BqQcF5QH.mjs";import{n as o}from"./body-parser-BshbixEq.mjs";function s(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Array of domain hostnames to fetch robots.txt for. Each domain must end with the zone name. Maximum 25 domains per request.`})}const c={command:`bulk-get`,describe:`Fetches and parses robots.txt files for multiple domains within a zone in a single request. Each domain must belong to the specified zone. Results are keyed by hostname.`,builder:s,handler:async s=>{if(s.dryRun){i({command:`cf ai-audit robots bulk-get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/ai-audit/robots/bulk`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?void 0:o(s.body)});return}let c=await n(s);if(s.zoneId=await e({zone:s.zone},c,{quiet:s.quiet}),s.body){let e=o(s.body);if(Array.isArray(e)&&e.length>25){let n=Math.ceil(e.length/25),i=null;for(let r=0;r<e.length;r+=25){let o=e.slice(r,r+25);i=await a(`Loading: batch ${Math.floor(r/25)+1}/${n}`,async()=>t(c,`POST`,`/zones/${s.zoneId}/ai-audit/robots/bulk`,{body:o}))}r(i,{successLabel:`Loaded`});return}r(await a(`Loading`,async()=>t(c,`POST`,`/zones/${s.zoneId}/ai-audit/robots/bulk`,{body:e})),{successLabel:`Loaded`});return}if(s.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function l(e){return e.option(`subdomain`,{type:`string`,description:`Optional subdomain to fetch robots.txt for. If omitted, fetches robots.txt for the zone apex domain.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`Fetches and parses the robots.txt file for a zone or a specific subdomain within the zone. Returns parsed user-agent rules, content signals, and sitemaps.`,builder:l,handler:async t=>{let o={subdomain:t.subdomain};if(t.dryRun){i({command:`cf ai-audit robots get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/ai-audit/robots`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await n(t),c=await e({zone:t.zone},s,{quiet:t.quiet});t.zoneId=c,r(await a(`Loading`,async()=>s.aiAudit.robots.get({zone_id:c,...o})),{successLabel:`Loaded`})}},d={command:`robots`,describe:`Operations for robots`,builder:e=>e.command(c).command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},f={command:`ai-audit`,describe:`ai-audit`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f as default};
2
+ import{h as e}from"./oauth-DAa7SwkM.mjs";import{a as t,r as n}from"./auth-DY_Y2bXC.mjs";import{t as r}from"./output-BqDR9h74.mjs";import{t as i}from"./dry-run-ILZRVpnp.mjs";import{t as a}from"./progress-jYW64HY7.mjs";import{n as o}from"./body-parser-BGVbwPeM.mjs";function s(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Array of domain hostnames to fetch robots.txt for. Each domain must end with the zone name. Maximum 25 domains per request.`})}const c={command:`bulk-get`,describe:`Fetches and parses robots.txt files for multiple domains within a zone in a single request. Each domain must belong to the specified zone. Results are keyed by hostname.`,builder:s,handler:async s=>{if(s.dryRun){i({command:`cf ai-audit robots bulk-get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/ai-audit/robots/bulk`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?void 0:o(s.body)});return}let c=await n(s);if(s.zoneId=await e({zone:s.zone},c,{quiet:s.quiet}),s.body){let e=o(s.body);if(Array.isArray(e)&&e.length>25){let n=Math.ceil(e.length/25),i=null;for(let r=0;r<e.length;r+=25){let o=e.slice(r,r+25);i=await a(`Loading: batch ${Math.floor(r/25)+1}/${n}`,async()=>t(c,`POST`,`/zones/${s.zoneId}/ai-audit/robots/bulk`,{body:o}))}r(i,{successLabel:`Loaded`});return}r(await a(`Loading`,async()=>t(c,`POST`,`/zones/${s.zoneId}/ai-audit/robots/bulk`,{body:e})),{successLabel:`Loaded`});return}if(s.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function l(e){return e.option(`subdomain`,{type:`string`,description:`Optional subdomain to fetch robots.txt for. If omitted, fetches robots.txt for the zone apex domain.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`Fetches and parses the robots.txt file for a zone or a specific subdomain within the zone. Returns parsed user-agent rules, content signals, and sitemaps.`,builder:l,handler:async t=>{let o={subdomain:t.subdomain};if(t.dryRun){i({command:`cf ai-audit robots get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/ai-audit/robots`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await n(t),c=await e({zone:t.zone},s,{quiet:t.quiet});t.zoneId=c,r(await a(`Loading`,async()=>s.aiAudit.robots.get({zone_id:c,...o})),{successLabel:`Loaded`})}},d={command:`robots`,describe:`Operations for robots`,builder:e=>e.command(c).command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},f={command:`ai-audit`,describe:`ai-audit`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-Be3lg_9E.mjs";import{f as t,g as n}from"./oauth-DuEONNgC.mjs";import{r}from"./auth-D3X9HYhD.mjs";import{t as i}from"./output-Ccqw2WOb.mjs";import{t as a}from"./dry-run-DL2V6yFm.mjs";import{t as o}from"./progress-BqQcF5QH.mjs";import{n as s,r as c,t as l}from"./body-parser-BshbixEq.mjs";import{n as u}from"./input-validation-QDIYu7Vb.mjs";import{a as d,i as f,n as p}from"./prompt-B0sWIs9c.mjs";import{t as m}from"./cli-types-DAYeL_Mj.mjs";function h(e){return e.option(`account-provider-id`,{type:`string`,description:`The account_provider_id field`}).option(`cost-in`,{type:`number`,description:`The cost_in field`}).option(`cost-out`,{type:`number`,description:`The cost_out field`}).option(`cost-type`,{type:`string`,description:`The cost_type field`,default:`tokens`}).option(`enable`,{type:`boolean`,description:`The enable field`}).option(`model`,{type:`string`,description:`The model field`}).option(`model-rule`,{type:`string`,description:`The model_rule field`,choices:[`equals`,`starts-with`,`contains`],default:`equals`}).option(`token-pricing-input-audio-tokens`,{type:`number`,description:`The token_pricing.input_audio_tokens field`}).option(`token-pricing-input-cache-creation-tokens`,{type:`number`,description:`The token_pricing.input_cache_creation_tokens field`}).option(`token-pricing-input-cached-tokens`,{type:`number`,description:`The token_pricing.input_cached_tokens field`}).option(`token-pricing-input-image-count`,{type:`number`,description:`The token_pricing.input_image_count field`}).option(`token-pricing-input-image-tokens`,{type:`number`,description:`The token_pricing.input_image_tokens field`}).option(`token-pricing-input-text-tokens`,{type:`number`,description:`The token_pricing.input_text_tokens field`}).option(`token-pricing-input-tokens`,{type:`number`,description:`The token_pricing.input_tokens field`}).option(`token-pricing-input-video-tokens`,{type:`number`,description:`The token_pricing.input_video_tokens field`}).option(`token-pricing-output-image-count`,{type:`number`,description:`The token_pricing.output_image_count field`}).option(`token-pricing-output-reasoning-tokens`,{type:`number`,description:`The token_pricing.output_reasoning_tokens field`}).option(`token-pricing-output-tokens`,{type:`number`,description:`The token_pricing.output_tokens field`}).option(`token-pricing-total-tokens`,{type:`number`,description:`The token_pricing.total_tokens 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 ee={command:`create`,describe:`Creates a new AI Gateway.`,builder:h,handler:async c=>{if(c.dryRun){a({command:`cf ai-gateway account-providers costs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/custom-providers/costs`,pathParams:{},bodyKind:`json`,body:c.body===void 0?l({account_provider_id:u(c[`account-provider-id`],`account-provider-id`,`text`),cost_in:c[`cost-in`],cost_out:c[`cost-out`],cost_type:u(c[`cost-type`],`cost-type`,`text`),enable:c.enable,model:u(c.model,`model`,`text`),model_rule:u(c[`model-rule`],`model-rule`,`text`),token_pricing:{input_audio_tokens:c[`token-pricing-input-audio-tokens`],input_cache_creation_tokens:c[`token-pricing-input-cache-creation-tokens`],input_cached_tokens:c[`token-pricing-input-cached-tokens`],input_image_count:c[`token-pricing-input-image-count`],input_image_tokens:c[`token-pricing-input-image-tokens`],input_text_tokens:c[`token-pricing-input-text-tokens`],input_tokens:c[`token-pricing-input-tokens`],input_video_tokens:c[`token-pricing-input-video-tokens`],output_image_count:c[`token-pricing-output-image-count`],output_reasoning_tokens:c[`token-pricing-output-reasoning-tokens`],output_tokens:c[`token-pricing-output-tokens`],total_tokens:c[`token-pricing-total-tokens`]}}):s(c.body)});return}let f=await r(c),p=c.local?e:await t();if(c.accountId=p,c.body){let e=s(c.body);i(await o(`Creating`,async()=>f.aiGateway.accountProviders.costs.create({...e,account_id:p})),{successLabel:`Created`});return}c[`account-provider-id`]===void 0&&(c[`account-provider-id`]=await d(`account-provider-id`,`The account_provider_id field`)),c.model===void 0&&(c.model=await d(`model`,`The model field`));let m=l({account_provider_id:u(c[`account-provider-id`],`account-provider-id`,`text`),cost_in:c[`cost-in`],cost_out:c[`cost-out`],cost_type:u(c[`cost-type`],`cost-type`,`text`),enable:c.enable,model:u(c.model,`model`,`text`),model_rule:u(c[`model-rule`],`model-rule`,`text`),token_pricing:{input_audio_tokens:c[`token-pricing-input-audio-tokens`],input_cache_creation_tokens:c[`token-pricing-input-cache-creation-tokens`],input_cached_tokens:c[`token-pricing-input-cached-tokens`],input_image_count:c[`token-pricing-input-image-count`],input_image_tokens:c[`token-pricing-input-image-tokens`],input_text_tokens:c[`token-pricing-input-text-tokens`],input_tokens:c[`token-pricing-input-tokens`],input_video_tokens:c[`token-pricing-input-video-tokens`],output_image_count:c[`token-pricing-output-image-count`],output_reasoning_tokens:c[`token-pricing-output-reasoning-tokens`],output_tokens:c[`token-pricing-output-tokens`],total_tokens:c[`token-pricing-total-tokens`]}});i(await o(`Creating`,async()=>f.aiGateway.accountProviders.costs.create({...m,account_id:p})),{successLabel:`Created`})}};function te(e){return e.positional(`id`,{type:`string`,description:`ID`,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 g={command:`delete <id>`,describe:`Deletes an AI Gateway dataset.`,builder:te,handler:async s=>{if(s.dryRun){a({command:`cf ai-gateway account-providers costs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/custom-providers/costs/${s.id==null?`<id>`:encodeURIComponent(String(s.id))}`,pathParams:{id:String(s.id??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await p({force:!!s.force})){process.stderr.write(`Aborted.
2
+ import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n}from"./oauth-DAa7SwkM.mjs";import{r}from"./auth-DY_Y2bXC.mjs";import{t as i}from"./output-BqDR9h74.mjs";import{t as a}from"./dry-run-ILZRVpnp.mjs";import{t as o}from"./progress-jYW64HY7.mjs";import{n as s,r as c,t as l}from"./body-parser-BGVbwPeM.mjs";import{n as u}from"./input-validation-1esLElok.mjs";import{a as d,i as f,n as p}from"./prompt-CyATfGUu.mjs";import{t as m}from"./cli-types-C3nVfpSG.mjs";function h(e){return e.option(`account-provider-id`,{type:`string`,description:`The account_provider_id field`}).option(`cost-in`,{type:`number`,description:`The cost_in field`}).option(`cost-out`,{type:`number`,description:`The cost_out field`}).option(`cost-type`,{type:`string`,description:`The cost_type field`,default:`tokens`}).option(`enable`,{type:`boolean`,description:`The enable field`}).option(`model`,{type:`string`,description:`The model field`}).option(`model-rule`,{type:`string`,description:`The model_rule field`,choices:[`equals`,`starts-with`,`contains`],default:`equals`}).option(`token-pricing-input-audio-tokens`,{type:`number`,description:`The token_pricing.input_audio_tokens field`}).option(`token-pricing-input-cache-creation-tokens`,{type:`number`,description:`The token_pricing.input_cache_creation_tokens field`}).option(`token-pricing-input-cached-tokens`,{type:`number`,description:`The token_pricing.input_cached_tokens field`}).option(`token-pricing-input-image-count`,{type:`number`,description:`The token_pricing.input_image_count field`}).option(`token-pricing-input-image-tokens`,{type:`number`,description:`The token_pricing.input_image_tokens field`}).option(`token-pricing-input-text-tokens`,{type:`number`,description:`The token_pricing.input_text_tokens field`}).option(`token-pricing-input-tokens`,{type:`number`,description:`The token_pricing.input_tokens field`}).option(`token-pricing-input-video-tokens`,{type:`number`,description:`The token_pricing.input_video_tokens field`}).option(`token-pricing-output-image-count`,{type:`number`,description:`The token_pricing.output_image_count field`}).option(`token-pricing-output-reasoning-tokens`,{type:`number`,description:`The token_pricing.output_reasoning_tokens field`}).option(`token-pricing-output-tokens`,{type:`number`,description:`The token_pricing.output_tokens field`}).option(`token-pricing-total-tokens`,{type:`number`,description:`The token_pricing.total_tokens 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 ee={command:`create`,describe:`Creates a new AI Gateway.`,builder:h,handler:async c=>{if(c.dryRun){a({command:`cf ai-gateway account-providers costs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/custom-providers/costs`,pathParams:{},bodyKind:`json`,body:c.body===void 0?l({account_provider_id:u(c[`account-provider-id`],`account-provider-id`,`text`),cost_in:c[`cost-in`],cost_out:c[`cost-out`],cost_type:u(c[`cost-type`],`cost-type`,`text`),enable:c.enable,model:u(c.model,`model`,`text`),model_rule:u(c[`model-rule`],`model-rule`,`text`),token_pricing:{input_audio_tokens:c[`token-pricing-input-audio-tokens`],input_cache_creation_tokens:c[`token-pricing-input-cache-creation-tokens`],input_cached_tokens:c[`token-pricing-input-cached-tokens`],input_image_count:c[`token-pricing-input-image-count`],input_image_tokens:c[`token-pricing-input-image-tokens`],input_text_tokens:c[`token-pricing-input-text-tokens`],input_tokens:c[`token-pricing-input-tokens`],input_video_tokens:c[`token-pricing-input-video-tokens`],output_image_count:c[`token-pricing-output-image-count`],output_reasoning_tokens:c[`token-pricing-output-reasoning-tokens`],output_tokens:c[`token-pricing-output-tokens`],total_tokens:c[`token-pricing-total-tokens`]}}):s(c.body)});return}let f=await r(c),p=c.local?e:await t();if(c.accountId=p,c.body){let e=s(c.body);i(await o(`Creating`,async()=>f.aiGateway.accountProviders.costs.create({...e,account_id:p})),{successLabel:`Created`});return}c[`account-provider-id`]===void 0&&(c[`account-provider-id`]=await d(`account-provider-id`,`The account_provider_id field`)),c.model===void 0&&(c.model=await d(`model`,`The model field`));let m=l({account_provider_id:u(c[`account-provider-id`],`account-provider-id`,`text`),cost_in:c[`cost-in`],cost_out:c[`cost-out`],cost_type:u(c[`cost-type`],`cost-type`,`text`),enable:c.enable,model:u(c.model,`model`,`text`),model_rule:u(c[`model-rule`],`model-rule`,`text`),token_pricing:{input_audio_tokens:c[`token-pricing-input-audio-tokens`],input_cache_creation_tokens:c[`token-pricing-input-cache-creation-tokens`],input_cached_tokens:c[`token-pricing-input-cached-tokens`],input_image_count:c[`token-pricing-input-image-count`],input_image_tokens:c[`token-pricing-input-image-tokens`],input_text_tokens:c[`token-pricing-input-text-tokens`],input_tokens:c[`token-pricing-input-tokens`],input_video_tokens:c[`token-pricing-input-video-tokens`],output_image_count:c[`token-pricing-output-image-count`],output_reasoning_tokens:c[`token-pricing-output-reasoning-tokens`],output_tokens:c[`token-pricing-output-tokens`],total_tokens:c[`token-pricing-total-tokens`]}});i(await o(`Creating`,async()=>f.aiGateway.accountProviders.costs.create({...m,account_id:p})),{successLabel:`Created`})}};function te(e){return e.positional(`id`,{type:`string`,description:`ID`,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 g={command:`delete <id>`,describe:`Deletes an AI Gateway dataset.`,builder:te,handler:async s=>{if(s.dryRun){a({command:`cf ai-gateway account-providers costs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/custom-providers/costs/${s.id==null?`<id>`:encodeURIComponent(String(s.id))}`,pathParams:{id:String(s.id??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await p({force:!!s.force})){process.stderr.write(`Aborted.
3
3
  `);return}i(await o(`Deleting`,async()=>c.aiGateway.accountProviders.costs.delete({account_id:l,id:s.id})),{successLabel:`Deleted`})}};function _(e){return e.positional(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <id>`,describe:`Retrieves details for a specific AI Gateway dataset.`,builder:_,handler:async s=>{if(s.dryRun){a({command:`cf ai-gateway account-providers costs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/custom-providers/costs/${s.id==null?`<id>`:encodeURIComponent(String(s.id))}`,pathParams:{id:String(s.id??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.aiGateway.accountProviders.costs.get({account_id:l,id:s.id})),{successLabel:`Loaded`})}};function y(e){return e.option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`enable`,{type:`boolean`,description:`Enable`}).option(`account-provider-id`,{type:`string`,description:`Account provider ID`}).option(`model-rule`,{type:`string`,description:`Model rule`,choices:[`equals`,`starts-with`,`contains`]}).option(`cost-type`,{type:`string`,description:`Cost type`}).option(`search`,{type:`string`,description:`Search by model, changed_by`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`Lists all AI Gateway evaluator types configured for the account.`,builder:m(y),handler:async s=>{let c={page:s.page,per_page:s[`per-page`],enable:s.enable,account_provider_id:s[`account-provider-id`],model_rule:s[`model-rule`],cost_type:s[`cost-type`],search:s.search};if(s.dryRun){a({command:`cf ai-gateway account-providers costs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/custom-providers/costs`,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.aiGateway.accountProviders.costs.list({account_id:u,...c})),{successLabel:`Loaded`})}};function x(e){return e.positional(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`cost-in`,{type:`number`,description:`The cost_in field`}).option(`cost-out`,{type:`number`,description:`The cost_out field`}).option(`cost-type`,{type:`string`,description:`The cost_type field`}).option(`enable`,{type:`boolean`,description:`The enable field`}).option(`model`,{type:`string`,description:`The model field`}).option(`model-rule`,{type:`string`,description:`The model_rule field`,choices:[`equals`,`starts-with`,`contains`]}).option(`token-pricing-input-audio-tokens`,{type:`number`,description:`The token_pricing.input_audio_tokens field`}).option(`token-pricing-input-cache-creation-tokens`,{type:`number`,description:`The token_pricing.input_cache_creation_tokens field`}).option(`token-pricing-input-cached-tokens`,{type:`number`,description:`The token_pricing.input_cached_tokens field`}).option(`token-pricing-input-image-count`,{type:`number`,description:`The token_pricing.input_image_count field`}).option(`token-pricing-input-image-tokens`,{type:`number`,description:`The token_pricing.input_image_tokens field`}).option(`token-pricing-input-text-tokens`,{type:`number`,description:`The token_pricing.input_text_tokens field`}).option(`token-pricing-input-tokens`,{type:`number`,description:`The token_pricing.input_tokens field`}).option(`token-pricing-input-video-tokens`,{type:`number`,description:`The token_pricing.input_video_tokens field`}).option(`token-pricing-output-image-count`,{type:`number`,description:`The token_pricing.output_image_count field`}).option(`token-pricing-output-reasoning-tokens`,{type:`number`,description:`The token_pricing.output_reasoning_tokens field`}).option(`token-pricing-output-tokens`,{type:`number`,description:`The token_pricing.output_tokens field`}).option(`token-pricing-total-tokens`,{type:`number`,description:`The token_pricing.total_tokens 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 S={command:`update <id>`,describe:`Updates an existing AI Gateway dataset.`,builder:x,handler:async c=>{if(c.dryRun){a({command:`cf ai-gateway account-providers costs update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/custom-providers/costs/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{id:String(c.id??``)},bodyKind:`json`,body:c.body===void 0?l({cost_in:c[`cost-in`],cost_out:c[`cost-out`],cost_type:u(c[`cost-type`],`cost-type`,`text`),enable:c.enable,model:u(c.model,`model`,`text`),model_rule:u(c[`model-rule`],`model-rule`,`text`),token_pricing:{input_audio_tokens:c[`token-pricing-input-audio-tokens`],input_cache_creation_tokens:c[`token-pricing-input-cache-creation-tokens`],input_cached_tokens:c[`token-pricing-input-cached-tokens`],input_image_count:c[`token-pricing-input-image-count`],input_image_tokens:c[`token-pricing-input-image-tokens`],input_text_tokens:c[`token-pricing-input-text-tokens`],input_tokens:c[`token-pricing-input-tokens`],input_video_tokens:c[`token-pricing-input-video-tokens`],output_image_count:c[`token-pricing-output-image-count`],output_reasoning_tokens:c[`token-pricing-output-reasoning-tokens`],output_tokens:c[`token-pricing-output-tokens`],total_tokens:c[`token-pricing-total-tokens`]}}):s(c.body)});return}let d=await r(c),f=c.local?e:await t();if(c.accountId=f,c.body){let e=s(c.body);i(await o(`Updating`,async()=>d.aiGateway.accountProviders.costs.update({...e,account_id:f,id:c.id})),{successLabel:`Updated`});return}let p=l({cost_in:c[`cost-in`],cost_out:c[`cost-out`],cost_type:u(c[`cost-type`],`cost-type`,`text`),enable:c.enable,model:u(c.model,`model`,`text`),model_rule:u(c[`model-rule`],`model-rule`,`text`),token_pricing:{input_audio_tokens:c[`token-pricing-input-audio-tokens`],input_cache_creation_tokens:c[`token-pricing-input-cache-creation-tokens`],input_cached_tokens:c[`token-pricing-input-cached-tokens`],input_image_count:c[`token-pricing-input-image-count`],input_image_tokens:c[`token-pricing-input-image-tokens`],input_text_tokens:c[`token-pricing-input-text-tokens`],input_tokens:c[`token-pricing-input-tokens`],input_video_tokens:c[`token-pricing-input-video-tokens`],output_image_count:c[`token-pricing-output-image-count`],output_reasoning_tokens:c[`token-pricing-output-reasoning-tokens`],output_tokens:c[`token-pricing-output-tokens`],total_tokens:c[`token-pricing-total-tokens`]}});i(await o(`Updating`,async()=>d.aiGateway.accountProviders.costs.update({...p,account_id:f,id:c.id})),{successLabel:`Updated`})}},C={command:`costs`,describe:`Operations for account-providers.costs`,builder:e=>e.command(ee).command(g).command(v).command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.option(`base-url`,{type:`string`,description:`The base_url field`}).option(`beta`,{type:`boolean`,description:`The beta field`}).option(`curl-example`,{type:`string`,description:`The curl_example field`}).option(`description`,{type:`string`,description:`The description field`}).option(`enable`,{type:`boolean`,description:`The enable field`}).option(`headers`,{type:`string`,description:`The headers field`}).option(`js-example`,{type:`string`,description:`The js_example field`}).option(`link`,{type:`string`,description:`The link field`}).option(`name`,{type:`string`,description:`The name field`}).option(`position`,{type:`number`,description:`The position field`}).option(`slug`,{type:`string`,description:`The slug 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 T={command:`create`,describe:`Creates a new AI Gateway.`,builder:w,handler:async c=>{if(c.dryRun){a({command:`cf ai-gateway account-providers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/custom-providers`,pathParams:{},bodyKind:`json`,body:c.body===void 0?l({base_url:u(c[`base-url`],`base-url`,`text`),beta:c.beta,curl_example:u(c[`curl-example`],`curl-example`,`text`),description:u(c.description,`description`,`text`),enable:c.enable,headers:u(c.headers,`headers`,`text`),js_example:u(c[`js-example`],`js-example`,`text`),link:u(c.link,`link`,`text`),name:u(c.name,`name`,`text`),position:c.position,slug:u(c.slug,`slug`,`text`)}):s(c.body)});return}let f=await r(c),p=c.local?e:await t();if(c.accountId=p,c.body){let e=s(c.body);i(await o(`Creating`,async()=>f.aiGateway.accountProviders.create({...e,account_id:p})),{successLabel:`Created`});return}c[`base-url`]===void 0&&(c[`base-url`]=await d(`base-url`,`The base_url field`)),c.name===void 0&&(c.name=await d(`name`,`The name field`)),c.slug===void 0&&(c.slug=await d(`slug`,`The slug field`));let m=l({base_url:u(c[`base-url`],`base-url`,`text`),beta:c.beta,curl_example:u(c[`curl-example`],`curl-example`,`text`),description:u(c.description,`description`,`text`),enable:c.enable,headers:u(c.headers,`headers`,`text`),js_example:u(c[`js-example`],`js-example`,`text`),link:u(c.link,`link`,`text`),name:u(c.name,`name`,`text`),position:c.position,slug:u(c.slug,`slug`,`text`)});i(await o(`Creating`,async()=>f.aiGateway.accountProviders.create({...m,account_id:p})),{successLabel:`Created`})}};function E(e){return e.positional(`id`,{type:`string`,description:`ID`,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 D={command:`delete <id>`,describe:`Deletes an AI Gateway dataset.`,builder:E,handler:async s=>{if(s.dryRun){a({command:`cf ai-gateway account-providers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/custom-providers/${s.id==null?`<id>`:encodeURIComponent(String(s.id))}`,pathParams:{id:String(s.id??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await p({force:!!s.force})){process.stderr.write(`Aborted.
4
4
  `);return}i(await o(`Deleting`,async()=>c.aiGateway.accountProviders.delete({account_id:l,id:s.id})),{successLabel:`Deleted`})}};function O(e){return e.positional(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <id>`,describe:`Retrieves details for a specific AI Gateway dataset.`,builder:O,handler:async s=>{if(s.dryRun){a({command:`cf ai-gateway account-providers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/custom-providers/${s.id==null?`<id>`:encodeURIComponent(String(s.id))}`,pathParams:{id:String(s.id??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.aiGateway.accountProviders.get({account_id:l,id:s.id})),{successLabel:`Loaded`})}};function A(e){return e.option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`beta`,{type:`boolean`,description:`Beta`}).option(`enable`,{type:`boolean`,description:`Enable`}).option(`search`,{type:`string`,description:`Search by id, name, slug`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`list`,describe:`Lists all AI Gateway evaluator types configured for the account.`,builder:A,handler:async s=>{let c={page:s.page,per_page:s[`per-page`],beta:s.beta,enable:s.enable,search:s.search};if(s.dryRun){a({command:`cf ai-gateway account-providers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/custom-providers`,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.aiGateway.accountProviders.list({account_id:u,...c})),{successLabel:`Loaded`})}};function M(e){return e.positional(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`base-url`,{type:`string`,description:`The base_url field`}).option(`beta`,{type:`boolean`,description:`The beta field`}).option(`curl-example`,{type:`string`,description:`The curl_example field`}).option(`description`,{type:`string`,description:`The description field`}).option(`enable`,{type:`boolean`,description:`The enable field`}).option(`headers`,{type:`string`,description:`The headers field`}).option(`js-example`,{type:`string`,description:`The js_example field`}).option(`link`,{type:`string`,description:`The link field`}).option(`logo`,{type:`string`,description:`The logo field`}).option(`name`,{type:`string`,description:`The name field`}).option(`position`,{type:`number`,description:`The position field`}).option(`slug`,{type:`string`,description:`The slug 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 N={command:`update <id>`,describe:`Updates an existing AI Gateway dataset.`,builder:M,handler:async c=>{if(c.dryRun){a({command:`cf ai-gateway account-providers update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/custom-providers/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{id:String(c.id??``)},bodyKind:`json`,body:c.body===void 0?l({base_url:u(c[`base-url`],`base-url`,`text`),beta:c.beta,curl_example:u(c[`curl-example`],`curl-example`,`text`),description:u(c.description,`description`,`text`),enable:c.enable,headers:u(c.headers,`headers`,`text`),js_example:u(c[`js-example`],`js-example`,`text`),link:u(c.link,`link`,`text`),logo:u(c.logo,`logo`,`text`),name:u(c.name,`name`,`text`),position:c.position,slug:u(c.slug,`slug`,`text`)}):s(c.body)});return}let d=await r(c),f=c.local?e:await t();if(c.accountId=f,c.body){let e=s(c.body);i(await o(`Updating`,async()=>d.aiGateway.accountProviders.update({...e,account_id:f,id:c.id})),{successLabel:`Updated`});return}let p=l({base_url:u(c[`base-url`],`base-url`,`text`),beta:c.beta,curl_example:u(c[`curl-example`],`curl-example`,`text`),description:u(c.description,`description`,`text`),enable:c.enable,headers:u(c.headers,`headers`,`text`),js_example:u(c[`js-example`],`js-example`,`text`),link:u(c.link,`link`,`text`),logo:u(c.logo,`logo`,`text`),name:u(c.name,`name`,`text`),position:c.position,slug:u(c.slug,`slug`,`text`)});i(await o(`Updating`,async()=>d.aiGateway.accountProviders.update({...p,account_id:f,id:c.id})),{successLabel:`Updated`})}},P={command:`account-providers`,describe:`Operations for account-providers`,builder:e=>e.command(T).command(D).command(k).command(j).command(N).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`credit-balance`,describe:`Retrieve the current credit balance, payment method info, and top-up configuration.`,builder:F,handler:async s=>{if(s.dryRun){a({command:`cf ai-gateway billing credit-balance`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/billing/credit-balance`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.aiGateway.billing.creditBalance({account_id:l})),{successLabel:`Loaded`})}};function L(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`get-topup-limits`,describe:`Retrieve the minimum and maximum allowed top-up amounts (in cents) for this account.`,builder:L,handler:async s=>{if(s.dryRun){a({command:`cf ai-gateway billing get-topup-limits`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/billing/topup/limits`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.aiGateway.billing.getTopupLimits({account_id:l})),{successLabel:`Loaded`})}};function z(e){return e.option(`type`,{type:`string`,description:`Filter invoice type: auto, manual, or all.`,choices:[`auto`,`all`,`manual`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`invoice-history`,describe:`Retrieve a list of past invoices with pagination, optionally filtered by type.`,builder:m(z),handler:async s=>{let c={type:s.type};if(s.dryRun){a({command:`cf ai-gateway billing invoice-history`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/billing/invoice-history`,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.aiGateway.billing.invoiceHistory({account_id:u,...c})),{successLabel:`Loaded`})}};function V(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`invoice-preview`,describe:`Retrieve a preview of the upcoming invoice including line items and tax.`,builder:V,handler:async s=>{if(s.dryRun){a({command:`cf ai-gateway billing invoice-preview`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/billing/invoice-preview`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.aiGateway.billing.invoicePreview({account_id:l})),{successLabel:`Loaded`})}};function U(e){return e.option(`amount`,{type:`number`,description:`Spending limit amount in cents (min 100).`}).option(`duration`,{type:`string`,description:`Spending limit duration.`,choices:[`daily`,`weekly`,`monthly`]}).option(`strategy`,{type:`string`,description:`Spending limit strategy.`,choices:[`fixed`,`sliding`]}).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 W={command:`create`,describe:`Deprecated: spending limits can no longer be created, enabled, or modified and this endpoint always responds 403. Use the new AI Gateway spend limits instead: https://developers.cloudflare.com/ai-gateway/features/spend-limits/. Existing limits can be removed via DELETE /spending-limit.`,builder:U,handler:async c=>{if(c.dryRun){a({command:`cf ai-gateway billing spending-limit create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/billing/spending-limit`,pathParams:{},bodyKind:`json`,body:c.body===void 0?l({amount:c.amount,duration:u(c.duration,`duration`,`text`),strategy:u(c.strategy,`strategy`,`text`)}):s(c.body)});return}let d=await r(c),p=c.local?e:await t();if(c.accountId=p,c.body){let e=s(c.body);i(await o(`Creating`,async()=>d.aiGateway.billing.spendingLimit.create({...e,account_id:p})),{successLabel:`Created`});return}if(c.amount===void 0)throw Error(`--amount is required (or pass --body with this field set).`);c.duration===void 0&&(c.duration=await f(`duration`,`Spending limit duration.`,[`daily`,`weekly`,`monthly`])),c.strategy===void 0&&(c.strategy=await f(`strategy`,`Spending limit strategy.`,[`fixed`,`sliding`]));let m=l({amount:c.amount,duration:u(c.duration,`duration`,`text`),strategy:u(c.strategy,`strategy`,`text`)});i(await o(`Creating`,async()=>d.aiGateway.billing.spendingLimit.create({...m,account_id:p})),{successLabel:`Created`})}};function G(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const K={command:`delete`,describe:`Remove the spending limit for the account.`,builder:G,handler:async s=>{if(s.dryRun){a({command:`cf ai-gateway billing spending-limit delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/billing/spending-limit`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await p({force:!!s.force})){process.stderr.write(`Aborted.
5
5
  `);return}i(await o(`Deleting`,async()=>c.aiGateway.billing.spendingLimit.delete({account_id:l})),{successLabel:`Deleted`})}};function q(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get`,describe:`Retrieve the current spending limit configuration for the account.`,builder:q,handler:async s=>{if(s.dryRun){a({command:`cf ai-gateway billing spending-limit get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/billing/spending-limit`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.aiGateway.billing.spendingLimit.get({account_id:l})),{successLabel:`Loaded`})}},Y={command:`spending-limit`,describe:`Operations for billing.spending-limit`,builder:e=>e.command(W).command(K).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function X(e){return e.option(`amount`,{type:`number`,description:`Auto top-up amount in cents (min 1000).`}).option(`threshold`,{type:`number`,description:`Balance threshold in cents that triggers auto top-up (min 500).`}).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 Z={command:`create`,describe:`Configure auto top-up with a balance threshold and top-up amount.`,builder:X,handler:async c=>{if(c.dryRun){a({command:`cf ai-gateway billing topup config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/billing/topup/config`,pathParams:{},bodyKind:`json`,body:c.body===void 0?l({amount:c.amount,threshold:c.threshold}):s(c.body)});return}let u=await r(c),d=c.local?e:await t();if(c.accountId=d,c.body){let e=s(c.body);i(await o(`Creating`,async()=>u.aiGateway.billing.topup.config.create({...e,account_id:d})),{successLabel:`Created`});return}if(c.amount===void 0)throw Error(`--amount is required (or pass --body with this field set).`);if(c.threshold===void 0)throw Error(`--threshold is required (or pass --body with this field set).`);let f=l({amount:c.amount,threshold:c.threshold});i(await o(`Creating`,async()=>u.aiGateway.billing.topup.config.create({...f,account_id:d})),{successLabel:`Created`})}};function Q(e){return e.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 ne={command:`delete`,describe:`Remove the auto top-up configuration for the account.`,builder:Q,handler:async s=>{if(s.dryRun){a({command:`cf ai-gateway billing topup config delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/billing/topup/config`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await p({force:!!s.force})){process.stderr.write(`Aborted.