cf 1.0.0-beta.4 → 1.0.0-beta.6

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 (261) hide show
  1. package/dist/_meta/commands.json +5047 -5068
  2. package/dist/_meta/hand-written-commands.json +1 -1
  3. package/dist/_meta/schemas.json +3026 -3123
  4. package/dist/abuse-reports-BtI6fvRl.mjs +24 -0
  5. package/dist/{access-DUQisFsH.mjs → access-CqOyTHw4.mjs} +1 -1
  6. package/dist/{account-tags-DMmTopgx.mjs → account-tags-7I77Dwsd.mjs} +1 -1
  7. package/dist/{accounts-DbZdpH5e.mjs → accounts-Cq-eOPzL.mjs} +32 -26
  8. package/dist/{acm-BtXPdUqH.mjs → acm-CSXnlN6o.mjs} +1 -1
  9. package/dist/{addressing-Bc_ZSmrK.mjs → addressing-C5XvjNhk.mjs} +1 -1
  10. package/dist/{agent-memory-CEUI1wKI.mjs → agent-memory-CSzr9gty.mjs} +1 -1
  11. package/dist/{ai-CFHaVQcc.mjs → ai-C0xWIvsG.mjs} +7 -9
  12. package/dist/{ai-audit-guygqmOl.mjs → ai-audit-B43vm1KJ.mjs} +1 -1
  13. package/dist/{ai-gateway-BcKOL4WQ.mjs → ai-gateway-BK3MbIzT.mjs} +1 -1
  14. package/dist/{ai-search-DJvNkX2o.mjs → ai-search-TrFTxBbn.mjs} +1 -1
  15. package/dist/{ai-security-CVaHbGzn.mjs → ai-security-JrYa27qd.mjs} +1 -1
  16. package/dist/{alerting-wy4IuGs7.mjs → alerting-B1-ZwfVT.mjs} +1 -1
  17. package/dist/{analytics-Do4VMrPX.mjs → analytics-B-wlVtDV.mjs} +1 -1
  18. package/dist/{analytics_engine-Cv7IF8ex.mjs → analytics_engine-DWzzQzOs.mjs} +1 -1
  19. package/dist/{api-security-fuzV322d.mjs → api-security-BWFWWmXl.mjs} +1 -1
  20. package/dist/{argo-BBf-Jw0O.mjs → argo-DHPGTvCT.mjs} +1 -1
  21. package/dist/{artifacts-B7_OhBxW.mjs → artifacts-mmBDk3wO.mjs} +1 -1
  22. package/dist/{audit-logs-DyARgcxN.mjs → audit-logs-CCF5e500.mjs} +1 -1
  23. package/dist/{auth-CiOv7s9F.mjs → auth-Dnp10uLy.mjs} +1 -1
  24. package/dist/{auth-BYFcxn1F.mjs → auth-gOCL6Pm0.mjs} +2 -2
  25. package/dist/{autoconfig-DbL_FL5k.mjs → autoconfig-DqEPKpj0.mjs} +2 -2
  26. package/dist/basin-catalog-hRY01t_Z.mjs +44 -0
  27. package/dist/{billing-07_VIO4X.mjs → billing-C_ev-9nh.mjs} +1 -1
  28. package/dist/{bot-management-CmkPUu2I.mjs → bot-management-CyYsXkZt.mjs} +1 -1
  29. package/dist/{botnet-feed-Bn5pE_rx.mjs → botnet-feed-Dj5R5v2o.mjs} +1 -1
  30. package/dist/{brand-protection-CWDqPOXe.mjs → brand-protection-CmQ6Iu0I.mjs} +1 -1
  31. package/dist/{browser-run-CfEIfpnQ.mjs → browser-run-sWHTsCSB.mjs} +1 -1
  32. package/dist/build-Dyt1M_Ib.mjs +2 -0
  33. package/dist/{build-DEbkHHVh.mjs → build-_qqitpn0.mjs} +1 -1
  34. package/dist/{builds-mgouQLUs.mjs → builds-c21rTfcg.mjs} +1 -1
  35. package/dist/{cache-DXLofz5T.mjs → cache-CuNjJl6m.mjs} +27 -27
  36. package/dist/{certificate-authorities-BfW-rEpf.mjs → certificate-authorities-DRUUzvI3.mjs} +1 -1
  37. package/dist/{cli-Dgk9bd8j.mjs → cli-Caa776EB.mjs} +1 -1
  38. package/dist/{client-certificates-By2A46a2.mjs → client-certificates-BSi1CEGk.mjs} +1 -1
  39. package/dist/{client-side-security-Bo6ZwJOS.mjs → client-side-security-BdxUX3Y8.mjs} +1 -1
  40. package/dist/{cloud-connector-DYb_3u-M.mjs → cloud-connector-B46ajuAj.mjs} +1 -1
  41. package/dist/{cloudforce-one-D8l0I5PL.mjs → cloudforce-one-adbVR2Ah.mjs} +47 -56
  42. package/dist/{command-DaAGN9uP.mjs → command-B47VlNBp.mjs} +1 -1
  43. package/dist/{command-BPfW-yE4.mjs → command-B5Itp2BM.mjs} +1 -1
  44. package/dist/{command-DjNcY4cf.mjs → command-BDCTd8Ra.mjs} +1 -1
  45. package/dist/{command-CJR1CUK_.mjs → command-BmXnByw9.mjs} +1 -1
  46. package/dist/{command-C3Qhz4kU.mjs → command-Bw-M_qxb.mjs} +1 -1
  47. package/dist/{command-BgBsFEYv.mjs → command-C2bU5Etc.mjs} +1 -1
  48. package/dist/{command-DJJN9xaA.mjs → command-CHcCSvVz.mjs} +1 -1
  49. package/dist/{command-C7cOrHdI.mjs → command-CRgQ0dM3.mjs} +1 -1
  50. package/dist/{command-DH67hNLj.mjs → command-CVg0qT13.mjs} +1 -1
  51. package/dist/{command-DRlUj6lW.mjs → command-CkJvjkfK.mjs} +1 -1
  52. package/dist/{command-C_lQtSPg.mjs → command-DV196MKR.mjs} +1 -1
  53. package/dist/{command-gSmdvn_d.mjs → command-Du3MiYA7.mjs} +1 -1
  54. package/dist/{command-CGD1oByJ.mjs → command-eBmGBTA7.mjs} +1 -1
  55. package/dist/{command-DYeBZ5mA.mjs → command-eqgT8zz4.mjs} +1 -1
  56. package/dist/{completions-DUDx3DwX.mjs → completions-DbT6O2ol.mjs} +1 -1
  57. package/dist/{connector-interrupts-DIMvaZhN.mjs → connector-interrupts-BhfMiPcq.mjs} +1 -1
  58. package/dist/{connector-telemetry-events-TWQvm-cj.mjs → connector-telemetry-events-CxKECRgO.mjs} +1 -1
  59. package/dist/{connector-telemetry-snapshots-Dyoe-_R3.mjs → connector-telemetry-snapshots-BHi-jHE5.mjs} +1 -1
  60. package/dist/{connectors-D7ZFg3hB.mjs → connectors-gkP2aNSN.mjs} +1 -1
  61. package/dist/{containers-CduXjFBJ.mjs → containers-BY8pinEV.mjs} +1 -1
  62. package/dist/{containers-Bu3tLjU1.mjs → containers-DUvBpnRo.mjs} +1 -1
  63. package/dist/{content-scan-CVBD6mUI.mjs → content-scan-BCPhAjMZ.mjs} +1 -1
  64. package/dist/{context-BsGrhAqB.mjs → context-CE7QFX-z.mjs} +1 -1
  65. package/dist/{cps-CgiRKmTe.mjs → cps-B35EPUAk.mjs} +1 -1
  66. package/dist/{csamScanner-BlXIOFFe.mjs → csamScanner-DcTA9oLR.mjs} +1 -1
  67. package/dist/{ct-alerting-CJZK0uSQ.mjs → ct-alerting-B3CS-CPk.mjs} +1 -1
  68. package/dist/{custom-certificates-DFaj_czg.mjs → custom-certificates-IjJJhl7_.mjs} +1 -1
  69. package/dist/{custom-csrs-BnFQpjOo.mjs → custom-csrs-ChYOaEQg.mjs} +1 -1
  70. package/dist/{custom-hostnames-DSnE6xOT.mjs → custom-hostnames-Bai3cqAD.mjs} +1 -1
  71. package/dist/{custom-nameservers-CdQOt_qU.mjs → custom-nameservers-DsukmLNZ.mjs} +1 -1
  72. package/dist/{custom-pages-TWGlS6Ms.mjs → custom-pages-CiboX-9D.mjs} +1 -1
  73. package/dist/d1-s293SFAJ.mjs +41 -0
  74. package/dist/{dcv-delegation-DM3oGGio.mjs → dcv-delegation-BfgvmpQT.mjs} +1 -1
  75. package/dist/{deploy-BZUWZ888.mjs → deploy-CvxNMDbS.mjs} +1 -1
  76. package/dist/{deploy-input-ChEbf2Kp.mjs → deploy-input-CNrImP7B.mjs} +1 -1
  77. package/dist/{dev-OsbQIdD8.mjs → dev-Z6vYszaT.mjs} +1 -1
  78. package/dist/{diagnostics-8bbleTmW.mjs → diagnostics-Ops0RjxG.mjs} +1 -1
  79. package/dist/discover-CcGReXr0.mjs +2 -0
  80. package/dist/{dist-DTN-pqSs.mjs → dist-Dgnf_i4w.mjs} +1 -1
  81. package/dist/{dls-TzQpry2j.mjs → dls-uo7NYEqE.mjs} +1 -1
  82. package/dist/{dns-Bzv4YLeg.mjs → dns-B-NwBOpQ.mjs} +52 -43
  83. package/dist/{dns-firewall-BjWwOmDR.mjs → dns-firewall-LTIP13nb.mjs} +1 -1
  84. package/dist/durable-objects-o7uB3YYg.mjs +6 -0
  85. package/dist/{email-auth-Bth4_FHy.mjs → email-auth-BUdBDCaE.mjs} +1 -1
  86. package/dist/{email-routing-CkTh4F5j.mjs → email-routing-BPRliM3z.mjs} +1 -1
  87. package/dist/{email-security-C-2jADxE.mjs → email-security-dbLE3I5c.mjs} +50 -50
  88. package/dist/{email-sending-B_sd4ouE.mjs → email-sending-BLlGy5Mn.mjs} +1 -1
  89. package/dist/error-sanitization-CEf4JTNN.mjs +2 -0
  90. package/dist/{error-sanitization-Dc4bLj8k.mjs → error-sanitization-CcNUzN1f.mjs} +1 -1
  91. package/dist/{fieldExtractors-z92V55-Y.mjs → fieldExtractors-M-KfLOGw.mjs} +1 -1
  92. package/dist/{firewall-0yKpxdjj.mjs → firewall-DzbLwqo3.mjs} +1 -1
  93. package/dist/flagship-DcXWEywy.mjs +28 -0
  94. package/dist/{fraud-BpJ_aoIE.mjs → fraud-CGXRWANi.mjs} +1 -1
  95. package/dist/generate-t4dFfFRV.mjs +2 -0
  96. package/dist/{google-tag-gateway-DA_7SCC3.mjs → google-tag-gateway-B3Z3Puwl.mjs} +1 -1
  97. package/dist/{healthchecks-C-GthoQz.mjs → healthchecks-BIiV29q7.mjs} +1 -1
  98. package/dist/{hostnames-CH6utzVv.mjs → hostnames-ueWsZFwv.mjs} +1 -1
  99. package/dist/{hyperdrive-_rIC33bB.mjs → hyperdrive-Bxk9LZf5.mjs} +1 -1
  100. package/dist/{iam-sseKl99z.mjs → iam-kA9gcv79.mjs} +1 -1
  101. package/dist/{images-CvIOwtg0.mjs → images-CK4J5as7.mjs} +1 -1
  102. package/dist/index.mjs +1 -1
  103. package/dist/{init-DEIhItNF.mjs → init-COcG8sp5.mjs} +2 -2
  104. package/dist/{intel-Da84oZMO.mjs → intel-z7DkM9Xc.mjs} +1 -1
  105. package/dist/{ips-zTTd_3jg.mjs → ips-BXdBK4Co.mjs} +1 -1
  106. package/dist/{keyless-certificates-BGOUKdJc.mjs → keyless-certificates-Dp9xTYtD.mjs} +1 -1
  107. package/dist/{keys-CDnrfmiS.mjs → keys-DrVlj4VI.mjs} +1 -1
  108. package/dist/{kv-C5jR7vjM.mjs → kv-WX-dlUT1.mjs} +1 -1
  109. package/dist/{lazy-command-DZtpMsVB.mjs → lazy-command-g04RHlS2.mjs} +1 -1
  110. package/dist/{leaked-credential-checks-B7WSzVG3.mjs → leaked-credential-checks-BMQ0VhCd.mjs} +1 -1
  111. package/dist/{load-balancers-DG9wMQUM.mjs → load-balancers-BbkSL89c.mjs} +1 -1
  112. package/dist/local-BWhuu9TH.mjs +2 -0
  113. package/dist/{local-B3OyWKkW.mjs → local-Cyk8fPvL.mjs} +1 -1
  114. package/dist/{local-runtime-Co5vVDlI.mjs → local-runtime-CWWJJB2E.mjs} +1 -1
  115. package/dist/{login-k3QLVysD.mjs → login-CyU_ZTNI.mjs} +1 -1
  116. package/dist/{login-rJanUgdL.mjs → login-DYQ8UgJQ.mjs} +1 -1
  117. package/dist/{logo-matches-5nijgkg7.mjs → logo-matches-HFmD2hK6.mjs} +1 -1
  118. package/dist/{logos-BRRqg8_2.mjs → logos-Di2PABE_.mjs} +1 -1
  119. package/dist/{logpush-Br7H8sRD.mjs → logpush-DEqdt0I0.mjs} +1 -1
  120. package/dist/logs-Ckfw-3Q_.mjs +37 -0
  121. package/dist/{magic-cloud-networking-Bu7O7wKz.mjs → magic-cloud-networking-C0yBJKMb.mjs} +1 -1
  122. package/dist/{magic-network-monitoring-Bnc--4Jr.mjs → magic-network-monitoring-CLvaiI7s.mjs} +1 -1
  123. package/dist/{magic-transit-Dxr86HKN.mjs → magic-transit-Bhb1kxYj.mjs} +108 -112
  124. package/dist/{managed-defense-Bm_jKFTN.mjs → managed-defense-COL3aqXw.mjs} +1 -1
  125. package/dist/{managed-transforms-D5mvHv_N.mjs → managed-transforms-cK0strTK.mjs} +1 -1
  126. package/dist/{matches-Dhc1eSWw.mjs → matches-Df4WEz0x.mjs} +1 -1
  127. package/dist/{mcp-B-PBoBl5.mjs → mcp-DK_5OUVl.mjs} +1 -1
  128. package/dist/{mesh-CW8B4naI.mjs → mesh-CVXpTYED.mjs} +1 -1
  129. package/dist/{migrate-B4kBnkpV.mjs → migrate-CipwWhJE.mjs} +1 -1
  130. package/dist/monetization-BHk0S5BF.mjs +20 -0
  131. package/dist/{mtls-certificates-swvfPqA2.mjs → mtls-certificates-8pzdxzOX.mjs} +1 -1
  132. package/dist/{network-iwRBn0i7.mjs → network-ClNeXTvG.mjs} +1 -1
  133. package/dist/{network-interconnects-CjXYZC4g.mjs → network-interconnects-t3jSoV7o.mjs} +1 -1
  134. package/dist/{oauth-CrTr-mRe.mjs → oauth-CJamdfrC.mjs} +1 -1
  135. package/dist/{oauth-DJW_HyaL.mjs → oauth-CNSirGUu.mjs} +1 -1
  136. package/dist/{oauth-clients-DGUJzFFu.mjs → oauth-clients-DBxdvlJC.mjs} +1 -1
  137. package/dist/{oauth-scopes-Bl0YUOHt.mjs → oauth-scopes-D39GYkt6.mjs} +1 -1
  138. package/dist/{observability-DRHiMrLy.mjs → observability-ZV1yPflB.mjs} +1 -1
  139. package/dist/{organization-BoMJzks7.mjs → organization-Bk-TkQlB.mjs} +7 -7
  140. package/dist/{organizations-UGtCHzSq.mjs → organizations-hXITNpPl.mjs} +1 -1
  141. package/dist/{origin-ca-certificates-CdByaOCe.mjs → origin-ca-certificates-DsLR_Z2e.mjs} +1 -1
  142. package/dist/{origin-post-quantum-encryption-GjmifGkF.mjs → origin-post-quantum-encryption-C_egsVQu.mjs} +1 -1
  143. package/dist/{origin-tls-client-auth-CCIqSj_C.mjs → origin-tls-client-auth-DPG6A6kz.mjs} +1 -1
  144. package/dist/{page-rules-Btn-r3QF.mjs → page-rules-B8lrkiiF.mjs} +1 -1
  145. package/dist/pages-Cx4doLvQ.mjs +54 -0
  146. package/dist/{pay-per-crawl-DcAZuk9T.mjs → pay-per-crawl-BUVHqPPA.mjs} +1 -1
  147. package/dist/{pay-per-use-z0Iwy9rN.mjs → pay-per-use-CzYgryid.mjs} +1 -1
  148. package/dist/{pipelines-YRPwntqo.mjs → pipelines-CGHmwc4a.mjs} +1 -1
  149. package/dist/{precursor-Bcww14RH.mjs → precursor--Jim5u4y.mjs} +1 -1
  150. package/dist/{previews-BBn-IiQu.mjs → previews-BKO1pZyG.mjs} +1 -1
  151. package/dist/{progress-5nsUpQL6.mjs → progress-CRjK46r1.mjs} +1 -1
  152. package/dist/{prompt-Ba_bys2F.mjs → prompt-C_90YsVE.mjs} +1 -1
  153. package/dist/{queries-lxdncISw.mjs → queries-z2pjzXlA.mjs} +1 -1
  154. package/dist/{queues-Egb0KXYK.mjs → queues-D0IXxSa7.mjs} +1 -1
  155. package/dist/{r2-BD4NOkR7.mjs → r2-DQ7w9dCM.mjs} +1 -1
  156. package/dist/r2-data-catalog-DpktRU5y.mjs +2 -0
  157. package/dist/{radar-B4dtfeBP.mjs → radar-DyLO7Zg1.mjs} +1 -1
  158. package/dist/{raw-fetch-AX_Gz3c3.mjs → raw-fetch-C8SdmQBp.mjs} +1 -1
  159. package/dist/{realtime-CtLXkW8l.mjs → realtime-mQzLbDxe.mjs} +1 -1
  160. package/dist/{registrar-I9XClUOe.mjs → registrar-ClbtM5Dy.mjs} +2 -2
  161. package/dist/{registrar-sandbox-DAqK58QS.mjs → registrar-sandbox-BIEHm_Jp.mjs} +2 -2
  162. package/dist/{reporting-BYsEUCIE.mjs → reporting-CjkMzSsZ.mjs} +1 -1
  163. package/dist/{request-headers-sc4CaZX0.mjs → request-headers-jr2VznA9.mjs} +1 -1
  164. package/dist/{request-tracers-DXr9Dr2z.mjs → request-tracers-BoSXOTox.mjs} +1 -1
  165. package/dist/{resource-sharing-DgbnNgCQ.mjs → resource-sharing-CFS39nJq.mjs} +1 -1
  166. package/dist/{resource-tagging-CjPU8PpX.mjs → resource-tagging-CZ5mvMhE.mjs} +1 -1
  167. package/dist/{rules-BrshTdy1.mjs → rules-CfqumI45.mjs} +4 -4
  168. package/dist/{rulesets-BZulblVp.mjs → rulesets-o3jsPv4U.mjs} +20 -20
  169. package/dist/{rum-B4IRlWgy.mjs → rum-BZ0rYlun.mjs} +1 -1
  170. package/dist/run-D0_7wBp2.mjs +2 -0
  171. package/dist/{run-UHTbUldP.mjs → run-huwFFwXd.mjs} +1 -1
  172. package/dist/{schema-flags-C4KmiKur.mjs → schema-flags-nL7pHvaE.mjs} +1 -1
  173. package/dist/{scim-BL2TVEZM.mjs → scim-0-eR9pvC.mjs} +1 -1
  174. package/dist/{sdk-Bx29ZKK3.mjs → sdk-Bmz7t_CD.mjs} +1 -1
  175. package/dist/{secrets-store-BcyhU7Kj.mjs → secrets-store-Duc29Zs-.mjs} +1 -1
  176. package/dist/security-insights-5CuLC-Yo.mjs +40 -0
  177. package/dist/{security-txt-BGIj4nU3.mjs → security-txt-qm2PqCPz.mjs} +1 -1
  178. package/dist/{shared-jqlTaG5K.mjs → shared-BDIrEKWt.mjs} +1 -1
  179. package/dist/{smart-shield-C8mGSzyE.mjs → smart-shield-BXLH9OM0.mjs} +1 -1
  180. package/dist/{snippets-BmHMaKEZ.mjs → snippets-DZG6UWeH.mjs} +1 -1
  181. package/dist/{spawn-IM_tQldH.mjs → spawn-KZqyx6KK.mjs} +1 -1
  182. package/dist/{spectrum-CrGKTMx-.mjs → spectrum-Be4ImAIY.mjs} +1 -1
  183. package/dist/{speed-yyPLwj5X.mjs → speed-CNWujfIC.mjs} +1 -1
  184. package/dist/{src-DFnlH5Tg.mjs → src-CW6py11z.mjs} +5 -5
  185. package/dist/{ssl-DZ6G7pP_.mjs → ssl-BIlS4Qs8.mjs} +1 -1
  186. package/dist/{stream-hoBmKs9X.mjs → stream-C5RvTAKF.mjs} +1 -1
  187. package/dist/{submit-Lfebq3yj.mjs → submit-Bpru4P79.mjs} +1 -1
  188. package/dist/{tags-CnHv__u_.mjs → tags-Rv7X1rU9.mjs} +1 -1
  189. package/dist/{telemetry-DbAo3nvk.mjs → telemetry-0npQCuKc.mjs} +1 -1
  190. package/dist/telemetry-B4_YhD82.mjs +2 -0
  191. package/dist/tenant-CjYf6OPN.mjs +10 -0
  192. package/dist/{tenant-custom-nameservers-CZL9_D8w.mjs → tenant-custom-nameservers-BbHaaEhv.mjs} +1 -1
  193. package/dist/{tunnels-DuO8F5_h.mjs → tunnels-CLWPaIIF.mjs} +1 -1
  194. package/dist/{turnstile-B-6k-bKa.mjs → turnstile-C5ezKSoz.mjs} +1 -1
  195. package/dist/update-check-CebyUyqG.mjs +2 -0
  196. package/dist/{update-check-g9Jcn6YJ.mjs → update-check-aOpHVlzB.mjs} +1 -1
  197. package/dist/update-check-worker.mjs +1 -1
  198. package/dist/{url-info-C6-jj9nl.mjs → url-info-Gcf8-MyB.mjs} +1 -1
  199. package/dist/{url-normalization-BRSTQe20.mjs → url-normalization-Dvg8mZRk.mjs} +1 -1
  200. package/dist/{url-scanner-DER5YAdW.mjs → url-scanner-BZCsgh0O.mjs} +1 -1
  201. package/dist/{user-foSeF-0m.mjs → user-BnkvXmjc.mjs} +1 -1
  202. package/dist/{values-DgBNckq9.mjs → values-yUGls__L.mjs} +1 -1
  203. package/dist/{vectorize-9AZMN3fN.mjs → vectorize-BiXngTuI.mjs} +3 -3
  204. package/dist/version-C3q1GMTe.mjs +2 -0
  205. package/dist/{waiting-rooms-CUc0Xqp0.mjs → waiting-rooms-BoLWF74U.mjs} +1 -1
  206. package/dist/{web-assets-D5LUB5UO.mjs → web-assets-CEJ9Zne1.mjs} +1 -1
  207. package/dist/{web3-BvOpojFR.mjs → web3-CIjm7EuJ.mjs} +1 -1
  208. package/dist/workers-DdtWb7Ws.mjs +38 -0
  209. package/dist/{workers-builds-BFqiT0GR.mjs → workers-builds-DT4tA-KT.mjs} +1 -1
  210. package/dist/workers-for-platforms-CaCr8ApU.mjs +42 -0
  211. package/dist/{workers-vpc-9xBzFjiF.mjs → workers-vpc-DRtjG39D.mjs} +1 -1
  212. package/dist/{workflows-BS0EGixd.mjs → workflows-DRme6yrC.mjs} +2 -2
  213. package/dist/{wrangler-migration-BDkh1_IV.mjs → wrangler-migration-BDnS1puc.mjs} +1 -1
  214. package/dist/{zaraz-DBccJ-ZM.mjs → zaraz-DmjDEnUJ.mjs} +1 -1
  215. package/dist/{zero-trust-DGagti-V.mjs → zero-trust-BRAHExxa.mjs} +427 -441
  216. package/dist/{zone-B4OniptR.mjs → zone-CclLvb-g.mjs} +1 -1
  217. package/dist/{zones-DYuGVoTH.mjs → zones-C6tc2OOV.mjs} +1 -1
  218. package/package.json +5 -4
  219. package/dist/abuse-reports-L4L7sC0F.mjs +0 -26
  220. package/dist/account-J7N4Ukse.mjs +0 -12
  221. package/dist/build-BmLpTw4w.mjs +0 -2
  222. package/dist/d1-Cbqx2kAz.mjs +0 -45
  223. package/dist/discover-DgHRf-qo.mjs +0 -2
  224. package/dist/durable-objects-CRhSGkpc.mjs +0 -8
  225. package/dist/error-sanitization-Cu-8OKRA.mjs +0 -2
  226. package/dist/flagship-IRVq23te.mjs +0 -28
  227. package/dist/generate-qMU-2MgC.mjs +0 -2
  228. package/dist/local-qOpZjDed.mjs +0 -2
  229. package/dist/logs-CBU44LT8.mjs +0 -48
  230. package/dist/pages-iil93G96.mjs +0 -60
  231. package/dist/r2-data-catalog-CI-oHtKe.mjs +0 -44
  232. package/dist/run-BQGVl3vg.mjs +0 -2
  233. package/dist/security-center-D1LSkhL_.mjs +0 -30
  234. package/dist/telemetry-C3hmM9Q9.mjs +0 -2
  235. package/dist/tenant-7CL844dh.mjs +0 -12
  236. package/dist/update-check-BDMPumcv.mjs +0 -2
  237. package/dist/version-DLvRzH-I.mjs +0 -2
  238. package/dist/workers-Cko7OnFE.mjs +0 -40
  239. package/dist/workers-for-platforms-EVE01qsM.mjs +0 -25
  240. /package/dist/{alerts-DqZgVSCT.mjs → alerts-DY_7Nknx.mjs} +0 -0
  241. /package/dist/{autorag-Cq9k9Ye6.mjs → autorag-K396-M2S.mjs} +0 -0
  242. /package/dist/{cloudflared-91JvyShh.mjs → cloudflared-Ciq4L97v.mjs} +0 -0
  243. /package/dist/{command-C72KLHMc.mjs → command-D1Z5uf_S.mjs} +0 -0
  244. /package/dist/{discover-VRFBjse7.mjs → discover-B_3A4a_t.mjs} +0 -0
  245. /package/dist/{generate-iV6OVNin.mjs → generate-QUDsysBJ.mjs} +0 -0
  246. /package/dist/{rate-limit-analytics-Bw9qmxMx.mjs → rate-limit-analytics-YsGha5pH.mjs} +0 -0
  247. /package/dist/{rate-limits-CDm_xzKt.mjs → rate-limits-kH13NRdf.mjs} +0 -0
  248. /package/dist/{ready-BXGqY1Wi.mjs → ready-DYun4Fpn.mjs} +0 -0
  249. /package/dist/{recent-submissions-AhGZD3a3.mjs → recent-submissions-18NaOGOo.mjs} +0 -0
  250. /package/dist/{refute-D_w5Gw20.mjs → refute-BhMiJcE1.mjs} +0 -0
  251. /package/dist/{registry-DBMUTYqf.mjs → registry-CSv7HR1J.mjs} +0 -0
  252. /package/dist/{scan-logo-BZzFam-Q.mjs → scan-logo-7y0pqFMk.mjs} +0 -0
  253. /package/dist/{scan-page-BPA8nSPM.mjs → scan-page-B6jnK3QI.mjs} +0 -0
  254. /package/dist/{schema-CueLBLXC.mjs → schema-JVvksQ1J.mjs} +0 -0
  255. /package/dist/{search-De0UlXYN.mjs → search-Rn3Eefv8.mjs} +0 -0
  256. /package/dist/{signed-url-ziDz9frX.mjs → signed-url-Dzwy9Xiw.mjs} +0 -0
  257. /package/dist/{submission-info-83D2DCCG.mjs → submission-info-SNhkDRRZ.mjs} +0 -0
  258. /package/dist/{tools-BJbI_f35.mjs → tools-CFEubTr4.mjs} +0 -0
  259. /package/dist/{total-queries-Dhol31Kn.mjs → total-queries-B20xslrH.mjs} +0 -0
  260. /package/dist/{tracked-domains-DoOPs6Vd.mjs → tracked-domains-BCvIOZOK.mjs} +0 -0
  261. /package/dist/{verify-CxpGEnJb.mjs → verify-DOeBG4PL.mjs} +0 -0
@@ -1,48 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-BsGrhAqB.mjs";import{a as i,r as a}from"./auth-BYFcxn1F.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-5nsUpQL6.mjs";import{t as l}from"./run-UHTbUldP.mjs";import"./telemetry-C3hmM9Q9.mjs";import{n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p,t as m}from"./input-validation-Dk52b0me.mjs";import{a as h,n as g}from"./prompt-Ba_bys2F.mjs";import{t as _}from"./cli-types-DoVT5q_M.mjs";function v(e){return e.usage(`$0 logs control cmb config create
3
-
4
- Updates CMB config.`).option(`allow-out-of-region-access`,{type:`boolean`,description:`Allow out of region access`}).option(`regions`,{type:`string`,description:`Name of the region.`}).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:`Update CMB config`,builder:v,handler:async n=>l({command:`logs control cmb config create`,classification:{safeFlags:[`allow-out-of-region-access`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf logs control cmb config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/logs/control/cmb/config`,pathParams:{},bodyKind:`json`,body:n.body===void 0?f({allow_out_of_region_access:n[`allow-out-of-region-access`],regions:p(n.regions,`regions`,`text`)}):u(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=u(n.body);o(await c(`Creating`,async()=>i.logs.control.cmb.config.create({body:e,account_id:l})),{successLabel:`Created`});return}let d=f({allow_out_of_region_access:n[`allow-out-of-region-access`],regions:p(n.regions,`regions`,`text`)});o(await c(`Creating`,async()=>i.logs.control.cmb.config.create({body:d,account_id:l})),{successLabel:`Created`})})};function b(e){return e.usage(`$0 logs control cmb config delete
5
-
6
- Deletes CMB config.`).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`,describe:`Delete CMB config`,builder:b,handler:async n=>l({command:`logs control cmb config delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf logs control cmb config delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/logs/control/cmb/config`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await g({force:!!n.force,message:`This operation deletes the CMB config.`})){process.stderr.write(`Aborted.
7
- `);return}o(await c(`Deleting`,async()=>i.logs.control.cmb.config.delete({account_id:l})),{successLabel:`Deleted`})})};function S(e){return e.usage(`$0 logs control cmb config get
8
-
9
- Gets CMB config.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get`,describe:`Get CMB config`,builder:S,handler:async n=>l({command:`logs control cmb config get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf logs control cmb config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/logs/control/cmb/config`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.logs.control.cmb.config.get({account_id:l})),{successLabel:`Loaded`})})},w={command:`config`,describe:`Operations for control.cmb.config`,builder:e=>e.command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},T={command:`cmb`,describe:`Operations for control.cmb`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 logs control retention create
10
-
11
- Updates log retention flag for Logpull API.`).option(`flag`,{type:`boolean`,description:`The log retention flag for Logpull API.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const D={command:`create`,describe:`Update log retention flag`,builder:E,handler:async e=>l({command:`logs control retention create`,classification:{safeFlags:[`flag`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf logs control retention create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/control/retention/flag`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({flag:e.flag}):u(e.body)});return}let t=await a(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body);o(await c(`Creating`,async()=>t.logs.control.retention.create({body:n,zone_id:r})),{successLabel:`Created`});return}let i=f({flag:e.flag});o(await c(`Creating`,async()=>t.logs.control.retention.create({body:i,zone_id:r})),{successLabel:`Created`})})};function O(e){return e.usage(`$0 logs control retention get
12
-
13
- Gets log retention flag for Logpull API.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get`,describe:`Get log retention flag`,builder:O,handler:async e=>l({command:`logs control retention get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf logs control retention get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/control/retention/flag`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,o(await c(`Loading`,async()=>t.logs.control.retention.get({zone_id:r})),{successLabel:`Loaded`})})},A={command:`retention`,describe:`Operations for control.retention`,builder:e=>e.command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`control`,describe:`Log control operations`,builder:e=>e.command(T).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 logs datasets available
14
-
15
- Returns all dataset types that this account or zone can create. Each entry includes the dataset schema and timestamp field. The schema shows all possible fields for a dataset. However, not all fields may be available for your account or zone. When creating or updating a dataset, only fields available to your account or zone can be enabled. If you request a field that is not available, you will receive an error.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`available`,describe:`List available account or zone datasets`,builder:M,handler:async i=>l({command:`logs datasets available`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logs datasets available`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/available`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.logs.datasets.available({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})})};function P(e){return e.usage(`$0 logs datasets create
16
-
17
- Create a new Log Explorer dataset for the account or zone. List available account or zone datasets to see the dataset types and fields you can use. The \`fields\` property is optional. If not specified, all available fields will be enabled. For dataset field definitions, see: https://developers.cloudflare.com/logs/logpush/logpush-job/datasets/`).option(`dataset`,{type:`string`,description:"Dataset type name to create (e.g. `http_requests`)."}).option(`fields`,{type:`string`,description:`Controls which fields the API ingests. Defaults to all available
18
- fields when absent.
19
- . Provide as a JSON array of objects or @path/to/file.json.`}).option(`filter`,{type:`string`,description:`Optional Logpush filter predicate to restrict which events are ingested.
20
- If provided, replaces the dataset's default filter entirely.
21
- See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)
22
- for syntax and examples.
23
- `}).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:`create`,describe:`Create an account or zone dataset`,builder:P,handler:async i=>l({command:`logs datasets create`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logs datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:i.body===void 0?f({dataset:p(i.dataset,`dataset`,`text`),fields:d(i.fields,`fields`),filter:p(i.filter,`filter`,`text`)}):u(i.body)});return}let l=await a(i),m=i.zone===void 0?`accounts`:`zones`,g=m===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(m===`zones`?i.zoneId=g:i.accountId=g,i.body){let e=u(i.body);o(await c(`Creating`,async()=>l.logs.datasets.create({...e,account_or_zone:m,account_or_zone_id:g})),{successLabel:`Created`});return}i.dataset===void 0&&(i.dataset=await h(`dataset`,"Dataset type name to create (e.g. `http_requests`)."));let _=f({dataset:p(i.dataset,`dataset`,`text`),fields:d(i.fields,`fields`),filter:p(i.filter,`filter`,`text`)});o(await c(`Creating`,async()=>l.logs.datasets.create({..._,account_or_zone:m,account_or_zone_id:g})),{successLabel:`Created`})})};function I(e){return e.usage(`$0 logs datasets delete <dataset-id>
24
-
25
- Deletes a Log Explorer dataset for the account or zone. Dataset deletion must not be protected.`).positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset 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 L={command:`delete <dataset-id>`,describe:`Delete an account or zone dataset`,builder:I,handler:async i=>l({command:`logs datasets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logs datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/${i[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(i[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"dataset-id":String(i[`dataset-id`]??``)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(u===`zones`?i.zoneId=d:i.accountId=d,!await g({force:!!i.force,message:`This operation deletes a Log Explorer dataset for the account.`})){process.stderr.write(`Aborted.
26
- `);return}o(await c(`Deleting`,async()=>l.logs.datasets.delete({account_or_zone:u,account_or_zone_id:d,dataset_id:i[`dataset-id`]})),{successLabel:`Deleted`})})};function R(e){return e.usage(`$0 logs datasets get <dataset-id>
27
-
28
- Retrieve a single Log Explorer dataset by ID for the account or zone.`).positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <dataset-id>`,describe:`Get an account or zone dataset`,builder:R,handler:async i=>l({command:`logs datasets get`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logs datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/${i[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(i[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"dataset-id":String(i[`dataset-id`]??``)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.logs.datasets.get({account_or_zone:u,account_or_zone_id:d,dataset_id:i[`dataset-id`]})),{successLabel:`Loaded`})})};function z(e){return e.usage("$0 logs datasets list\n\nReturns all Log Explorer datasets configured for the account or zone. Pass `include_zones=true` to also include zone-level datasets that belong to this account or zone. List responses omit the `fields` property; use the single-dataset endpoint to retrieve field configuration.").option(`include-zones`,{type:`boolean`,description:`Set to true to include zone-scoped datasets belonging to this account.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`list`,describe:`List account or zone datasets`,builder:z,handler:async i=>l({command:`logs datasets list`,classification:{safeFlags:[`include-zones`,`dry-run`]}},i,async()=>{let l={include_zones:i[`include-zones`]};if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logs datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},query:l,bodyKind:`none`});return}let u=await a(i),d=i.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:i.zone},u,{quiet:i.quiet}):i.local?e:await r();d===`zones`?i.zoneId=f:i.accountId=f,o(await c(`Loading`,async()=>u.logs.datasets.list({account_or_zone:d,account_or_zone_id:f,...l})),{successLabel:`Loaded`})})};function V(e){return e.usage(`$0 logs datasets update <dataset-id>
29
-
30
- Updates the enabled state and/or field configuration of an account or zone dataset.`).positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,demandOption:!0}).option(`deletion-protection`,{type:`boolean`,description:"Set to `false` to allow deletion of this dataset."}).option(`enabled`,{type:`boolean`,description:`Whether to enable or disable log ingest for this dataset.`}).option(`fields`,{type:`string`,description:`Controls which fields the API ingests after the update. Defaults
31
- to all available fields when absent.
32
- . Provide as a JSON array of objects or @path/to/file.json.`}).option(`filter`,{type:`string`,description:`Optional Logpush filter predicate to restrict which events are
33
- ingested. If omitted, the existing filter is left unchanged. Set
34
- to an empty string (\`""\`) to clear the filter. Otherwise,
35
- replaces the dataset's filter entirely.
36
- See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)
37
- for syntax and examples.
38
- `}).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:`update <dataset-id>`,describe:`Update an account or zone dataset`,builder:V,handler:async i=>l({command:`logs datasets update`,classification:{safeFlags:[`deletion-protection`,`enabled`,`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logs datasets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/${i[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(i[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"dataset-id":String(i[`dataset-id`]??``)},bodyKind:`json`,body:i.body===void 0?f({deletion_protection:i[`deletion-protection`],enabled:i.enabled,fields:d(i.fields,`fields`),filter:p(i.filter,`filter`,`text`)}):u(i.body)});return}let l=await a(i),m=i.zone===void 0?`accounts`:`zones`,h=m===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(m===`zones`?i.zoneId=h:i.accountId=h,i.body){let e=u(i.body);o(await c(`Updating`,async()=>l.logs.datasets.update({...e,account_or_zone:m,account_or_zone_id:h,dataset_id:i[`dataset-id`]})),{successLabel:`Updated`});return}if(i.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let g=f({deletion_protection:i[`deletion-protection`],enabled:i.enabled,fields:d(i.fields,`fields`),filter:p(i.filter,`filter`,`text`)});o(await c(`Updating`,async()=>l.logs.datasets.update({...g,account_or_zone:m,account_or_zone_id:h,dataset_id:i[`dataset-id`]})),{successLabel:`Updated`})})},U={command:`datasets`,describe:`Operations for datasets`,builder:e=>e.command(N).command(F).command(L).command(ee).command(B).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 logs list get
39
-
40
- Lists R2 objects containing logs matching the provided query parameters.`).option(`start`,{type:`string`,description:`Start time in RFC3339 format.`,demandOption:!0}).option(`end`,{type:`string`,description:`End time in RFC3339 format.`,demandOption:!0}).option(`bucket`,{type:`string`,description:`R2 bucket name.`,demandOption:!0}).option(`prefix`,{type:`string`,description:`R2 bucket prefix logs are stored under.`}).option(`limit`,{type:`number`,description:`Maximum number of results to return.`}).option(`r2-access-key-id`,{type:`string`,description:`The R2-Access-Key-Id header`,demandOption:!0}).option(`r2-secret-access-key`,{type:`string`,description:`The R2-Secret-Access-Key header`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`get`,describe:`List log files`,builder:W,handler:async n=>l({command:`logs list get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let l={start:n.start,end:n.end,bucket:n.bucket,prefix:n.prefix,limit:n.limit},u={};if(n[`r2-access-key-id`]!==void 0&&(u[`R2-Access-Key-Id`]=String(n[`r2-access-key-id`])),n[`r2-secret-access-key`]!==void 0&&(u[`R2-Secret-Access-Key`]=String(n[`r2-secret-access-key`])),n.dryRun){s({command:`cf logs list get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/logs/list`,pathParams:{},query:l,bodyKind:`none`});return}let d=await a(n),f=n.local?e:await r();n.accountId=f,o(await c(`Loading`,async()=>i(d,`GET`,`/accounts/${f}/logs/list`,{query:l,headers:Object.keys(u).length>0?u:void 0})),{successLabel:`Loaded`})})},K={command:`list`,describe:`Operations for list`,builder:e=>e.command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function q(e){return e.usage(`$0 logs query
41
-
42
- Run a SQL query against account or zone-level datasets. Timestamp fields are RFC3339 strings. Filter with: WHERE {timestamp_field} >= now() - INTERVAL '30' DAY WHERE {timestamp_field} >= '2026-04-01T00:00:00Z' WHERE {timestamp_field} BETWEEN '2026-04-01T00:00:00Z' AND '2026-04-30T23:59:59Z' List configured account or zone datasets to see enabled account or zone-level datasets. Zone-level datasets will not appear here. List available account or zone datasets to inspect their schemas and timestamp fields. For more information about the datasets, and the meaning of each field, check out https://developers.cloudflare.com/logs/logpush/logpush-job/datasets/`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const J={command:`query`,describe:`Run a log query`,builder:q,handler:async u=>l({command:`logs query`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){let e=u.zone===void 0?await t():void 0,n=u.zone===void 0?`accounts`:`zones`,r=u.zone??e??`<account-id>`;s({command:`cf logs query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/query/sql`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`octet-stream`,body:u.body});return}let l=await a(u),d=u.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:u.zone},l,{quiet:u.quiet}):u.local?e:await r();if(d===`zones`?u.zoneId=f:u.accountId=f,u.file){let e=m(u.file);o(await c(`Loading`,async()=>i(l,`POST`,`/${d}/${f}/logs/explorer/query/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}if(u.body){let e=p(u.body,`body`,`binary`);o(await c(`Loading`,async()=>i(l,`POST`,`/${d}/${f}/logs/explorer/query/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}o(await c(`Loading`,async()=>l.logs.query({account_or_zone:d,account_or_zone_id:f})),{successLabel:`Loaded`})})};function Y(e){return e.usage(`$0 logs rayid get <ray-id>
43
-
44
- The \`/rayids\` api route allows lookups by specific rayid. The rayids route will return zero, one, or more records (ray ids are not unique).`).positional(`ray-id`,{type:`string`,description:`Ray identifier.`,demandOption:!0}).option(`fields`,{type:`string`,description:"The `/received` route by default returns a limited set of fields, and allows customers to override the default field set by specifying individual fields. The reasons for this are: 1. Most customers require only a small subset of fields, but that subset varies from customer to customer; 2. Flat schema is much easier to work with downstream (importing into BigTable etc); 3. Performance (time to process, file size). If `?fields=` is not specified, default field set is returned. This default field set may change at any time. When `?fields=` is provided, each record is returned with the specified fields. `fields` must be specified as a comma separated list without any whitespaces, and all fields must exist. The order in which fields are specified does not matter, and the order of fields in the response is not specified."}).option(`timestamps`,{type:`string`,description:"By default, timestamps in responses are returned as Unix nanosecond integers. The `?timestamps=` argument can be set to change the format in which response timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`. Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns timestamps as strings.",choices:[`unix`,`unixnano`,`rfc3339`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`get <ray-id>`,describe:`Get logs RayIDs`,builder:_(Y),handler:async e=>l({command:`logs rayid get`,classification:{safeFlags:[`timestamps`,`dry-run`]}},e,async()=>{let t={fields:e.fields,timestamps:e.timestamps};if(e.dryRun){s({command:`cf logs rayid get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/rayids/${e[`ray-id`]==null?`<ray-id>`:encodeURIComponent(String(e[`ray-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"ray-id":String(e[`ray-id`]??``)},query:t,bodyKind:`none`});return}let r=await a(e),i=await n({zone:e.zone},r,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>r.logs.rayid.get({zone_id:i,ray_id:e[`ray-id`],...t})),{successLabel:`Loaded`})})},Z={command:`rayid`,describe:`Operations for rayid`,builder:e=>e.command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Q(e){return e.usage(`$0 logs received fields get
45
-
46
- Lists all fields available. The response is json object with key-value pairs, where keys are field names, and values are descriptions.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $={command:`get`,describe:`List fields`,builder:Q,handler:async e=>l({command:`logs received fields get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf logs received fields get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/received/fields`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,o(await c(`Loading`,async()=>t.logs.received.fields.get({zone_id:r})),{successLabel:`Loaded`})})},te={command:`fields`,describe:`Operations for received.fields`,builder:e=>e.command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(e){return e.usage('$0 logs received get\n\nThe `/received` api route allows customers to retrieve their edge HTTP logs. The basic access pattern is "give me all the logs for zone Z for minute M", where the minute M refers to the time records were received at Cloudflare\'s central data center. `start` is inclusive, and `end` is exclusive. Because of that, to get all data, at minutely cadence, starting at 10AM, the proper values are: `start=2018-05-20T10:00:00Z&end=2018-05-20T10:01:00Z`, then `start=2018-05-20T10:01:00Z&end=2018-05-20T10:02:00Z` and so on; the overlap will be handled properly.').option(`start`,{type:`string`,description:`Sets the (inclusive) beginning of the requested time frame. This can be a unix timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to RFC 3339. At this point in time, it cannot exceed a time in the past greater than seven days.`}).option(`end`,{type:`string`,description:"Sets the (exclusive) end of the requested time frame. This can be a unix timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to RFC 3339. `end` must be at least five minutes earlier than now and must be later than `start`. Difference between `start` and `end` must be not greater than one hour.",demandOption:!0}).option(`fields`,{type:`string`,description:"The `/received` route by default returns a limited set of fields, and allows customers to override the default field set by specifying individual fields. The reasons for this are: 1. Most customers require only a small subset of fields, but that subset varies from customer to customer; 2. Flat schema is much easier to work with downstream (importing into BigTable etc); 3. Performance (time to process, file size). If `?fields=` is not specified, default field set is returned. This default field set may change at any time. When `?fields=` is provided, each record is returned with the specified fields. `fields` must be specified as a comma separated list without any whitespaces, and all fields must exist. The order in which fields are specified does not matter, and the order of fields in the response is not specified."}).option(`sample`,{type:`number`,description:"When `?sample=` is provided, a sample of matching records is returned. If `sample=0.1` then 10% of records will be returned. Sampling is random: repeated calls will not only return different records, but likely will also vary slightly in number of returned records. When `?count=` is also specified, `count` is applied to the number of returned records, not the sampled records. So, with `sample=0.05` and `count=7`, when there is a total of 100 records available, approximately five will be returned. When there are 1000 records, seven will be returned. When there are 10,000 records, seven will be returned."}).option(`count`,{type:`number`,description:"When `?count=` is provided, the response will contain up to `count` results. Since results are not sorted, you are likely to get different data for repeated requests. `count` must be an integer > 0."}).option(`timestamps`,{type:`string`,description:"By default, timestamps in responses are returned as Unix nanosecond integers. The `?timestamps=` argument can be set to change the format in which response timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`. Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns timestamps as strings.",choices:[`unix`,`unixnano`,`rfc3339`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get`,describe:`Get logs received`,builder:_(ne),handler:async e=>l({command:`logs received get`,classification:{safeFlags:[`timestamps`,`dry-run`]}},e,async()=>{let t={start:e.start,end:e.end,fields:e.fields,sample:e.sample,count:e.count,timestamps:e.timestamps};if(e.dryRun){s({command:`cf logs received get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/received`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let r=await a(e),i=await n({zone:e.zone},r,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>r.logs.received.get({zone_id:i,...t})),{successLabel:`Loaded`})})},ie={command:`received`,describe:`Received log operations`,builder:e=>e.command(re).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ae(e){return e.usage(`$0 logs retrieve get
47
-
48
- Returns logs stored in R2 that match the provided query parameters.`).option(`start`,{type:`string`,description:`Start time in RFC3339 format.`,demandOption:!0}).option(`end`,{type:`string`,description:`End time in RFC3339 format.`,demandOption:!0}).option(`bucket`,{type:`string`,description:`R2 bucket name.`,demandOption:!0}).option(`prefix`,{type:`string`,description:`R2 bucket prefix logs are stored under.`}).option(`r2-access-key-id`,{type:`string`,description:`The R2-Access-Key-Id header`,demandOption:!0}).option(`r2-secret-access-key`,{type:`string`,description:`The R2-Secret-Access-Key header`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get`,describe:`Retrieve logs`,builder:ae,handler:async n=>l({command:`logs retrieve get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let l={start:n.start,end:n.end,bucket:n.bucket,prefix:n.prefix},u={};if(n[`r2-access-key-id`]!==void 0&&(u[`R2-Access-Key-Id`]=String(n[`r2-access-key-id`])),n[`r2-secret-access-key`]!==void 0&&(u[`R2-Secret-Access-Key`]=String(n[`r2-secret-access-key`])),n.dryRun){s({command:`cf logs retrieve get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/logs/retrieve`,pathParams:{},query:l,bodyKind:`none`});return}let d=await a(n),f=n.local?e:await r();n.accountId=f,o(await c(`Loading`,async()=>i(d,`GET`,`/accounts/${f}/logs/retrieve`,{query:l,headers:Object.keys(u).length>0?u:void 0})),{successLabel:`Loaded`})})},se={command:`retrieve`,describe:`Operations for retrieve`,builder:e=>e.command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ce={command:`logs`,describe:`Log control, retention, and raw log access — CMB config, ray ID lookups, and received fields`,builder:e=>e.command(J).command(j).command(U).command(K).command(Z).command(ie).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ce as default};
@@ -1,60 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./lazy-command-DZtpMsVB.mjs";import{t}from"./local-B3OyWKkW.mjs";import{a as n,t as r}from"./context-BsGrhAqB.mjs";import{a as i,r as a}from"./auth-BYFcxn1F.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-5nsUpQL6.mjs";import{t as l}from"./run-UHTbUldP.mjs";import"./telemetry-C3hmM9Q9.mjs";import{n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p,t as ee}from"./input-validation-Dk52b0me.mjs";import{a as m,i as h,n as g}from"./prompt-Ba_bys2F.mjs";import{t as _}from"./cli-types-DoVT5q_M.mjs";var v=e(`deploy [directory]`,`Deploy a directory of static assets as a Pages deployment`,()=>import(`./command-C72KLHMc.mjs`),{command:`pages deploy`,recordArgs:!1});function y(e){return e.usage(`$0 pages projects connect-source <project-name>
3
-
4
- Connect a Git repository source to an existing Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
5
- When disabled, no deployments (production or preview) will be triggered automatically.
6
- `}).option(`config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).option(`config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Configs for the project source control.`})}const b={command:`connect-source <project-name>`,describe:`Connect project source`,builder:y,handler:async e=>l({command:`pages projects connect-source`,classification:{safeFlags:[`config-deployments-enabled`,`config-pr-comments-enabled`,`config-preview-deployment-setting`,`config-production-deployments-enabled`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages projects connect-source`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/source`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?f({config:{deployments_enabled:e[`config-deployments-enabled`],owner:p(e[`config-owner`],`config-owner`,`text`),owner_id:p(e[`config-owner-id`],`config-owner-id`,`text`),path_excludes:e[`config-path-excludes`],path_includes:e[`config-path-includes`],pr_comments_enabled:e[`config-pr-comments-enabled`],preview_branch_excludes:e[`config-preview-branch-excludes`],preview_branch_includes:e[`config-preview-branch-includes`],preview_deployment_setting:p(e[`config-preview-deployment-setting`],`config-preview-deployment-setting`,`text`),production_branch:p(e[`config-production-branch`],`config-production-branch`,`text`),production_deployments_enabled:e[`config-production-deployments-enabled`],repo_id:p(e[`config-repo-id`],`config-repo-id`,`text`),repo_name:p(e[`config-repo-name`],`config-repo-name`,`text`)},type:p(e.type,`type`,`text`)}):u(e.body)});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,e.body){let t=u(e.body);o(await c(`Creating`,async()=>i.pages.projects.connectSource({body:t,account_id:l,project_name:e[`project-name`]})),{successLabel:`Created`});return}if(e[`config-deployments-enabled`]===void 0)throw Error(`--config-deployments-enabled is required (or pass --body with this field set).`);if(e[`config-owner`]===void 0&&(e[`config-owner`]=await m(`config-owner`,`The owner of the repository.`)),e[`config-owner-id`]===void 0&&(e[`config-owner-id`]=await m(`config-owner-id`,`The owner ID of the repository.`)),e[`config-path-excludes`]===void 0)throw Error(`--config-path-excludes is required (or pass --body with this field set).`);if(e[`config-path-includes`]===void 0)throw Error(`--config-path-includes is required (or pass --body with this field set).`);if(e[`config-pr-comments-enabled`]===void 0)throw Error(`--config-pr-comments-enabled is required (or pass --body with this field set).`);if(e[`config-preview-branch-excludes`]===void 0)throw Error(`--config-preview-branch-excludes is required (or pass --body with this field set).`);if(e[`config-preview-branch-includes`]===void 0)throw Error(`--config-preview-branch-includes is required (or pass --body with this field set).`);if(e[`config-preview-deployment-setting`]===void 0&&(e[`config-preview-deployment-setting`]=await h(`config-preview-deployment-setting`,`Controls whether commits to preview branches trigger a preview deployment.`,[`all`,`none`,`custom`])),e[`config-production-branch`]===void 0&&(e[`config-production-branch`]=await m(`config-production-branch`,`The production branch of the repository.`)),e[`config-production-deployments-enabled`]===void 0)throw Error(`--config-production-deployments-enabled is required (or pass --body with this field set).`);e[`config-repo-id`]===void 0&&(e[`config-repo-id`]=await m(`config-repo-id`,`The ID of the repository.`)),e[`config-repo-name`]===void 0&&(e[`config-repo-name`]=await m(`config-repo-name`,`The name of the repository.`)),e.type===void 0&&(e.type=await h(`type`,`The source control management provider.`,[`github`,`gitlab`]));let d=f({config:{deployments_enabled:e[`config-deployments-enabled`],owner:p(e[`config-owner`],`config-owner`,`text`),owner_id:p(e[`config-owner-id`],`config-owner-id`,`text`),path_excludes:e[`config-path-excludes`],path_includes:e[`config-path-includes`],pr_comments_enabled:e[`config-pr-comments-enabled`],preview_branch_excludes:e[`config-preview-branch-excludes`],preview_branch_includes:e[`config-preview-branch-includes`],preview_deployment_setting:p(e[`config-preview-deployment-setting`],`config-preview-deployment-setting`,`text`),production_branch:p(e[`config-production-branch`],`config-production-branch`,`text`),production_deployments_enabled:e[`config-production-deployments-enabled`],repo_id:p(e[`config-repo-id`],`config-repo-id`,`text`),repo_name:p(e[`config-repo-name`],`config-repo-name`,`text`)},type:p(e.type,`type`,`text`)});o(await c(`Creating`,async()=>i.pages.projects.connectSource({body:d,account_id:l,project_name:e[`project-name`]})),{successLabel:`Created`})})};function x(e){return e.usage(`$0 pages projects create
7
-
8
- Create a new project.`).option(`build-config-build-caching`,{type:`boolean`,description:`Enable build caching for the project.`}).option(`build-config-build-command`,{type:`string`,description:`Command used to build project.`}).option(`build-config-destination-dir`,{type:`string`,description:`Output directory of the build.`}).option(`build-config-root-dir`,{type:`string`,description:`Directory to run the command.`}).option(`build-config-web-analytics-tag`,{type:`string`,description:`The classifying tag for analytics.`}).option(`build-config-web-analytics-token`,{type:`string`,description:`The auth token for analytics.`}).option(`deployment-configs-preview-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-preview-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-preview-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-preview-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-preview-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-preview-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-preview-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-preview-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-preview-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`deployment-configs-production-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-production-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-production-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-production-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-production-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-production-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-production-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-production-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-production-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`name`,{type:`string`,description:`Name of the project.`}).option(`production-branch`,{type:`string`,description:`Production branch of the project. Used to identify production deployments.`}).option(`source-config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
9
- When disabled, no deployments (production or preview) will be triggered automatically.
10
- `}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-build-image-major-version`,`deployment-configs-preview-compatibility-date`,`deployment-configs-preview-compatibility-flags`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-preview-usage-model`,`deployment-configs-preview-wrangler-config-hash`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-build-image-major-version`,`deployment-configs-production-compatibility-date`,`deployment-configs-production-compatibility-flags`,`deployment-configs-production-fail-open`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`,`deployment-configs-production-usage-model`,`deployment-configs-production-wrangler-config-hash`].some(t=>e[t]!==void 0)){let t=[`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --deployment_configs-* flag is set`)}return!0}).check(e=>{if([`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0)){let t=[`source-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0})}const S={command:`create`,describe:`Create project`,builder:x,handler:async e=>l({command:`pages projects create`,classification:{safeFlags:[`build-config-build-caching`,`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-usage-model`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-fail-open`,`deployment-configs-production-usage-model`,`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`source-type`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages projects create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({build_config:{build_caching:e[`build-config-build-caching`],build_command:p(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:p(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:p(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:p(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:p(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:p(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],fail_open:e[`deployment-configs-preview-fail-open`],limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:p(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:p(e[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:p(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:p(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],fail_open:e[`deployment-configs-production-fail-open`],limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:p(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:p(e[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:p(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:p(e.name,`name`,`text`),production_branch:p(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:p(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:p(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:p(e[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:p(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:p(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:p(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:p(e[`source-type`],`source-type`,`text`)}}):u(e.body)});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,e.body){let t=u(e.body);o(await c(`Creating`,async()=>i.pages.projects.create({...t,account_id:l})),{successLabel:`Created`});return}e.name===void 0&&(e.name=await m(`name`,`Name of the project.`)),e[`production-branch`]===void 0&&(e[`production-branch`]=await m(`production-branch`,`Production branch of the project. Used to identify production deployments.`));let d=f({build_config:{build_caching:e[`build-config-build-caching`],build_command:p(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:p(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:p(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:p(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:p(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:p(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],fail_open:e[`deployment-configs-preview-fail-open`],limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:p(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:p(e[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:p(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:p(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],fail_open:e[`deployment-configs-production-fail-open`],limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:p(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:p(e[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:p(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:p(e.name,`name`,`text`),production_branch:p(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:p(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:p(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:p(e[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:p(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:p(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:p(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:p(e[`source-type`],`source-type`,`text`)}});o(await c(`Creating`,async()=>i.pages.projects.create({...d,account_id:l})),{successLabel:`Created`})})};function C(e){return e.usage(`$0 pages projects delete <project-name>
11
-
12
- Delete a project by name.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,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 <project-name>`,describe:`Delete project`,builder:C,handler:async e=>l({command:`pages projects delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf pages projects delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,!await g({force:!!e.force})){process.stderr.write(`Aborted.
13
- `);return}o(await c(`Deleting`,async()=>i.pages.projects.delete({account_id:l,project_name:e[`project-name`]})),{successLabel:`Deleted`})})};function T(e){return e.usage(`$0 pages projects deployments create <project-name>
14
-
15
- Start a new deployment from production. The repository and account must have already been authorized on the Cloudflare Pages dashboard.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`branch`,{type:`string`,description:"The branch to build the new deployment from. The `HEAD` of the branch will be used. If omitted, the production branch will be used by default."}).option(`commit-dirty`,{type:`string`,description:`Boolean string indicating if the working directory has uncommitted changes.`}).option(`commit-hash`,{type:`string`,description:`Git commit SHA associated with this deployment.`}).option(`commit-message`,{type:`string`,description:`Git commit message associated with this deployment.`}).option(`manifest`,{type:`string`,description:`JSON string containing a manifest of files to deploy. Maps file paths to their content hashes. Required for direct upload deployments. Maximum 20,000 entries. `}).option(`pages-build-output-dir`,{type:`string`,description:`The build output directory path.`}).option(`wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration file used for this deployment.`})}const E={command:`create <project-name>`,describe:`Create deployment`,builder:T,handler:async e=>l({command:`pages projects deployments create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages projects deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,branch:e.branch,"commit-dirty":e[`commit-dirty`],"commit-hash":e[`commit-hash`],"commit-message":e[`commit-message`],manifest:e.manifest,"pages-build-output-dir":e[`pages-build-output-dir`],"wrangler-config-hash":e[`wrangler-config-hash`]}});return}let l=await a(e),u=e.local?t:await r();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.branch!==void 0||e[`commit-dirty`]!==void 0||e[`commit-hash`]!==void 0||e[`commit-message`]!==void 0||e.manifest!==void 0||e[`pages-build-output-dir`]!==void 0||e[`wrangler-config-hash`]!==void 0){let t=new FormData;if(e.file){let n=ee(e.file);t.append(`_headers`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`_headers`,e.body);e.branch!==void 0&&t.append(`branch`,String(p(e.branch,`branch`,`text`)??``)),e[`commit-dirty`]!==void 0&&t.append(`commit_dirty`,String(p(e[`commit-dirty`],`commit-dirty`,`text`)??``)),e[`commit-hash`]!==void 0&&t.append(`commit_hash`,String(p(e[`commit-hash`],`commit-hash`,`text`)??``)),e[`commit-message`]!==void 0&&t.append(`commit_message`,String(p(e[`commit-message`],`commit-message`,`text`)??``)),e.manifest!==void 0&&t.append(`manifest`,String(p(e.manifest,`manifest`,`text`)??``)),e[`pages-build-output-dir`]!==void 0&&t.append(`pages_build_output_dir`,String(p(e[`pages-build-output-dir`],`pages-build-output-dir`,`text`)??``)),e[`wrangler-config-hash`]!==void 0&&t.append(`wrangler_config_hash`,String(p(e[`wrangler-config-hash`],`wrangler-config-hash`,`text`)??``)),o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/pages/projects/${encodeURIComponent(String(e[`project-name`]))}/deployments`,{body:t})),{successLabel:`Created`});return}if(e.body){let t=p(e.body,`body`,`binary`);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/pages/projects/${encodeURIComponent(String(e[`project-name`]))}/deployments`,{body:t,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}o(await c(`Creating`,async()=>l.pages.projects.deployments.create({account_id:u,project_name:e[`project-name`]})),{successLabel:`Created`})})};function D(e){return e.usage(`$0 pages projects deployments delete <deployment-id>
16
-
17
- Delete a deployment.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`force`,{type:`boolean`,description:`Allow deletion of aliased non-production deployments when a normal delete would be rejected.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`delete <deployment-id>`,describe:`Delete deployment`,builder:D,handler:async e=>l({command:`pages projects deployments delete`,classification:{safeFlags:[`force`,`dry-run`]}},e,async()=>{let i={force:e.force};if(e.dryRun){s({command:`cf pages projects deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},query:i,bodyKind:`none`});return}let l=await a(e),u=e.local?t:await r();if(e.accountId=u,!await g({force:!!e.force})){process.stderr.write(`Aborted.
18
- `);return}o(await c(`Deleting`,async()=>l.pages.projects.deployments.delete({account_id:u,project_name:e[`project-name`],deployment_id:e[`deployment-id`],...i})),{successLabel:`Deleted`})})};function k(e){return e.usage(`$0 pages projects deployments get <deployment-id>
19
-
20
- Fetch information about a deployment.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`get <deployment-id>`,describe:`Get deployment info`,builder:k,handler:async e=>l({command:`pages projects deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages projects deployments get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();e.accountId=l,o(await c(`Loading`,async()=>i.pages.projects.deployments.get({account_id:l,project_name:e[`project-name`],deployment_id:e[`deployment-id`]})),{successLabel:`Loaded`})})};function j(e){return e.usage(`$0 pages projects deployments history logs get <deployment-id>
21
-
22
- Fetch deployment logs for a project.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get <deployment-id>`,describe:`Get deployment logs`,builder:j,handler:async e=>l({command:`pages projects deployments history logs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages projects deployments history logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}/history/logs`,pathParams:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();e.accountId=l,o(await c(`Loading`,async()=>i.pages.projects.deployments.history.logs.get({account_id:l,project_name:e[`project-name`],deployment_id:e[`deployment-id`]})),{successLabel:`Loaded`})})},N={command:`logs`,describe:`Operations for projects.deployments.history.logs`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`history`,describe:`Operations for projects.deployments.history`,builder:e=>e.command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.usage(`$0 pages projects deployments list
23
-
24
- Fetch a list of project deployments.`).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`env`,{type:`string`,description:`What type of deployments to fetch.`,choices:[`production`,`preview`]}).option(`page`,{type:`number`,description:`Which page of deployments to fetch.`}).option(`per-page`,{type:`number`,description:`How many deployments to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`list`,describe:`Get deployments`,builder:_(F),handler:async e=>l({command:`pages projects deployments list`,classification:{safeFlags:[`env`,`dry-run`]}},e,async()=>{let i={env:e.env,page:e.page,per_page:e[`per-page`]};if(e.dryRun){s({command:`cf pages projects deployments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments`,pathParams:{"project-name":String(e[`project-name`]??``)},query:i,bodyKind:`none`});return}let l=await a(e),u=e.local?t:await r();e.accountId=u,o(await c(`Loading`,async()=>l.pages.projects.deployments.list({account_id:u,project_name:e[`project-name`],...i})),{successLabel:`Loaded`})})};function L(e){return e.usage(`$0 pages projects deployments retry <deployment-id>
25
-
26
- Retry a previous deployment.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`retry <deployment-id>`,describe:`Retry deployment`,builder:L,handler:async e=>l({command:`pages projects deployments retry`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages projects deployments retry`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}/retry`,pathParams:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();e.accountId=l,o(await c(`Creating`,async()=>i.pages.projects.deployments.retry({account_id:l,project_name:e[`project-name`],deployment_id:e[`deployment-id`]})),{successLabel:`Created`})})};function z(e){return e.usage(`$0 pages projects deployments rollback <deployment-id>
27
-
28
- Rollback the production deployment to a previous deployment. You can only rollback to succesful builds on production.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`rollback <deployment-id>`,describe:`Rollback deployment`,builder:z,handler:async e=>l({command:`pages projects deployments rollback`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages projects deployments rollback`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}/rollback`,pathParams:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();e.accountId=l,o(await c(`Creating`,async()=>i.pages.projects.deployments.rollback({account_id:l,project_name:e[`project-name`],deployment_id:e[`deployment-id`]})),{successLabel:`Created`})})};function te(e){return e.usage(`$0 pages projects deployments tails create <deployment-id>
29
-
30
- Start a tail that receives logs and exception data.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`filters`,{type:`string`,description:`Filters to apply to the tail session. 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 V={command:`create <deployment-id>`,describe:`Create deployment tail`,builder:te,handler:async e=>l({command:`pages projects deployments tails create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages projects deployments tails create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}/tails`,pathParams:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?f({filters:d(e.filters,`filters`)}):u(e.body)});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,e.body){let t=u(e.body);o(await c(`Creating`,async()=>i.pages.projects.deployments.tails.create({...t,account_id:l,project_name:e[`project-name`],deployment_id:e[`deployment-id`]})),{successLabel:`Created`});return}let p=f({filters:d(e.filters,`filters`)});o(await c(`Creating`,async()=>i.pages.projects.deployments.tails.create({...p,account_id:l,project_name:e[`project-name`],deployment_id:e[`deployment-id`]})),{successLabel:`Created`})})};function H(e){return e.usage(`$0 pages projects deployments tails delete <tail-id>
31
-
32
- Deletes a tail from a Pages deployment.`).positional(`tail-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`deployment-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 U={command:`delete <tail-id>`,describe:`Delete deployment tail`,builder:H,handler:async e=>l({command:`pages projects deployments tails delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf pages projects deployments tails delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}/tails/${e[`tail-id`]==null?`<tail-id>`:encodeURIComponent(String(e[`tail-id`]))}`,pathParams:{"tail-id":String(e[`tail-id`]??``),"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,!await g({force:!!e.force})){process.stderr.write(`Aborted.
33
- `);return}o(await c(`Deleting`,async()=>i.pages.projects.deployments.tails.delete({account_id:l,project_name:e[`project-name`],deployment_id:e[`deployment-id`],tail_id:e[`tail-id`]})),{successLabel:`Deleted`})})},W={command:`tails`,describe:`Operations for projects.deployments.tails`,builder:e=>e.command(V).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},G={command:`deployments`,describe:`Operations for projects.deployments`,builder:e=>e.command(E).command(O).command(A).command(I).command(R).command(B).command(P).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function K(e){return e.usage(`$0 pages projects disconnect-source <project-name>
34
-
35
- Disconnect the Git repository source from an existing Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,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 q={command:`disconnect-source <project-name>`,describe:`Disconnect project source`,builder:K,handler:async e=>l({command:`pages projects disconnect-source`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf pages projects disconnect-source`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/source`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,!await g({force:!!e.force})){process.stderr.write(`Aborted.
36
- `);return}o(await c(`Deleting`,async()=>i.pages.projects.disconnectSource({account_id:l,project_name:e[`project-name`]})),{successLabel:`Deleted`})})};function J(e){return e.usage(`$0 pages projects domains create <project-name>
37
-
38
- Add a new domain for the Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`name`,{type:`string`,description:`The domain 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 Y={command:`create <project-name>`,describe:`Add domain`,builder:J,handler:async e=>l({command:`pages projects domains create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages projects domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`)}):u(e.body)});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,e.body){let t=u(e.body);o(await c(`Creating`,async()=>i.pages.projects.domains.create({...t,account_id:l,project_name:e[`project-name`]})),{successLabel:`Created`});return}e.name===void 0&&(e.name=await m(`name`,`The domain name.`));let d=f({name:p(e.name,`name`,`text`)});o(await c(`Creating`,async()=>i.pages.projects.domains.create({...d,account_id:l,project_name:e[`project-name`]})),{successLabel:`Created`})})};function X(e){return e.usage(`$0 pages projects domains delete <domain-name>
39
-
40
- Delete a Pages project's domain.`).positional(`domain-name`,{type:`string`,description:`The domain name.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Z={command:`delete <domain-name>`,describe:`Delete domain`,builder:X,handler:async e=>l({command:`pages projects domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf pages projects domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,!await g({force:!!e.force})){process.stderr.write(`Aborted.
41
- `);return}o(await c(`Deleting`,async()=>i.pages.projects.domains.delete({account_id:l,project_name:e[`project-name`],domain_name:e[`domain-name`]})),{successLabel:`Deleted`})})};function Q(e){return e.usage(`$0 pages projects domains edit <domain-name>
42
-
43
- Retry the validation status of a single domain.`).positional(`domain-name`,{type:`string`,description:`The domain name.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`edit <domain-name>`,describe:`Patch domain`,builder:Q,handler:async e=>l({command:`pages projects domains edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages projects domains edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();e.accountId=l,o(await c(`Updating`,async()=>i.pages.projects.domains.edit({account_id:l,project_name:e[`project-name`],domain_name:e[`domain-name`]})),{successLabel:`Updated`})})};function re(e){return e.usage(`$0 pages projects domains get <domain-name>
44
-
45
- Fetch a single domain.`).positional(`domain-name`,{type:`string`,description:`The domain name.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get <domain-name>`,describe:`Get domain`,builder:re,handler:async e=>l({command:`pages projects domains get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages projects domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();e.accountId=l,o(await c(`Loading`,async()=>i.pages.projects.domains.get({account_id:l,project_name:e[`project-name`],domain_name:e[`domain-name`]})),{successLabel:`Loaded`})})};function ae(e){return e.usage(`$0 pages projects domains list
46
-
47
- Fetch a list of all domains associated with a Pages project.`).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`list`,describe:`Get domains`,builder:ae,handler:async e=>l({command:`pages projects domains list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages projects domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();e.accountId=l,o(await c(`Loading`,async()=>i.pages.projects.domains.list({account_id:l,project_name:e[`project-name`]})),{successLabel:`Loaded`})})},se={command:`domains`,describe:`Operations for projects.domains`,builder:e=>e.command(Y).command(Z).command(ne).command(ie).command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ce(e){return e.usage(`$0 pages projects edit <project-name>
48
-
49
- Set new attributes for an existing project. Modify environment variables. To delete an environment variable, set the key to null.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`build-config-build-caching`,{type:`boolean`,description:`Enable build caching for the project.`}).option(`build-config-build-command`,{type:`string`,description:`Command used to build project.`}).option(`build-config-destination-dir`,{type:`string`,description:`Output directory of the build.`}).option(`build-config-root-dir`,{type:`string`,description:`Directory to run the command.`}).option(`build-config-web-analytics-tag`,{type:`string`,description:`The classifying tag for analytics.`}).option(`build-config-web-analytics-token`,{type:`string`,description:`The auth token for analytics.`}).option(`deployment-configs-preview-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-preview-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-preview-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-preview-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-preview-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-preview-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-preview-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-preview-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-preview-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`deployment-configs-production-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-production-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-production-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-production-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-production-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-production-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-production-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-production-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-production-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`name`,{type:`string`,description:`Name of the project.`}).option(`production-branch`,{type:`string`,description:`Production branch of the project. Used to identify production deployments.`}).option(`source-config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
50
- When disabled, no deployments (production or preview) will be triggered automatically.
51
- `}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-build-image-major-version`,`deployment-configs-preview-compatibility-date`,`deployment-configs-preview-compatibility-flags`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-preview-usage-model`,`deployment-configs-preview-wrangler-config-hash`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-build-image-major-version`,`deployment-configs-production-compatibility-date`,`deployment-configs-production-compatibility-flags`,`deployment-configs-production-fail-open`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`,`deployment-configs-production-usage-model`,`deployment-configs-production-wrangler-config-hash`].some(t=>e[t]!==void 0)){let t=[`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --deployment_configs-* flag is set`)}return!0}).check(e=>{if([`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0)){let t=[`source-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0})}const le={command:`edit <project-name>`,describe:`Update project`,builder:ce,handler:async e=>l({command:`pages projects edit`,classification:{safeFlags:[`build-config-build-caching`,`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-usage-model`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-fail-open`,`deployment-configs-production-usage-model`,`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`source-type`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages projects edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?f({build_config:{build_caching:e[`build-config-build-caching`],build_command:p(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:p(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:p(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:p(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:p(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:p(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],fail_open:e[`deployment-configs-preview-fail-open`],limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:p(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:p(e[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:p(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:p(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],fail_open:e[`deployment-configs-production-fail-open`],limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:p(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:p(e[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:p(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:p(e.name,`name`,`text`),production_branch:p(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:p(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:p(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:p(e[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:p(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:p(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:p(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:p(e[`source-type`],`source-type`,`text`)}}):u(e.body)});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,e.body){let t=u(e.body);o(await c(`Updating`,async()=>i.pages.projects.edit({...t,account_id:l,project_name:e[`project-name`]})),{successLabel:`Updated`});return}let d=f({build_config:{build_caching:e[`build-config-build-caching`],build_command:p(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:p(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:p(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:p(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:p(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:p(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],fail_open:e[`deployment-configs-preview-fail-open`],limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:p(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:p(e[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:p(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:p(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],fail_open:e[`deployment-configs-production-fail-open`],limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:p(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:p(e[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:p(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:p(e.name,`name`,`text`),production_branch:p(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:p(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:p(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:p(e[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:p(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:p(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:p(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:p(e[`source-type`],`source-type`,`text`)}});o(await c(`Updating`,async()=>i.pages.projects.edit({...d,account_id:l,project_name:e[`project-name`]})),{successLabel:`Updated`})})};function ue(e){return e.usage(`$0 pages projects get-upload-token <project-name>
52
-
53
- Get a short-lived JWT for Pages Direct Upload asset operations.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`get-upload-token <project-name>`,describe:`Get upload token`,builder:ue,handler:async e=>l({command:`pages projects get-upload-token`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages projects get-upload-token`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/upload-token`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();e.accountId=l,o(await c(`Loading`,async()=>i.pages.projects.getUploadToken({account_id:l,project_name:e[`project-name`]})),{successLabel:`Loaded`})})};function fe(e){return e.usage(`$0 pages projects get <project-name>
54
-
55
- Fetch a project by name.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`get <project-name>`,describe:`Get project`,builder:fe,handler:async e=>l({command:`pages projects get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages projects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();e.accountId=l,o(await c(`Loading`,async()=>i.pages.projects.get({account_id:l,project_name:e[`project-name`]})),{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 pages projects list
56
-
57
- Fetch a list of all user projects.`).option(`page`,{type:`number`,description:`Which page of projects to fetch.`}).option(`per-page`,{type:`number`,description:`How many projects to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`list`,describe:`Get projects`,builder:$,handler:async e=>l({command:`pages projects list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={page:e.page,per_page:e[`per-page`]};if(e.dryRun){s({command:`cf pages projects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(e),u=e.local?t:await r();e.accountId=u,o(await c(`Loading`,async()=>l.pages.projects.list({account_id:u,...i})),{successLabel:`Loaded`})})};function he(e){return e.usage(`$0 pages projects purge-build-cache <project-name>
58
-
59
- Purge all cached build artifacts for a Pages project`).positional(`project-name`,{type:`string`,description:`Name of the project.`,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 ge={command:`purge-build-cache <project-name>`,describe:`Purge build cache`,builder:he,handler:async e=>l({command:`pages projects purge-build-cache`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf pages projects purge-build-cache`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/purge_build_cache`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,!await g({force:!!e.force,message:`This operation purges the build cache for a Pages project.`})){process.stderr.write(`Aborted.
60
- `);return}o(await c(`Deleting`,async()=>i.pages.projects.purgeBuildCache({account_id:l,project_name:e[`project-name`]})),{successLabel:`Deleted`})})},_e={command:`projects`,describe:`Pages projects, deployments, build logs, and custom domain bindings`,builder:e=>e.command(b).command(S).command(w).command(q).command(le).command(pe).command(de).command(me).command(ge).command(G).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ve={command:`pages`,describe:`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,builder:e=>e.command(v).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ve as default};
@@ -1,44 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-BsGrhAqB.mjs";import{r}from"./auth-BYFcxn1F.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-5nsUpQL6.mjs";import{t as s}from"./run-UHTbUldP.mjs";import"./telemetry-C3hmM9Q9.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,n as f}from"./prompt-Ba_bys2F.mjs";import{t as p}from"./cli-types-DoVT5q_M.mjs";function m(e){return e.usage(`$0 r2-data-catalog credentials create <bucket-name>
3
-
4
- Store authentication credentials for a catalog. These credentials are used to authenticate with R2 storage when performing catalog operations.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`token`,{type:`string`,description:`Provides the Cloudflare API token for accessing R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to store catalog credentials.`})}const h={command:`create <bucket-name>`,describe:`Store catalog credentials`,builder:m,handler:async f=>s({command:`r2-data-catalog credentials create`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf r2-data-catalog credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2-catalog/${f[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(f[`bucket-name`]))}/credential`,pathParams:{"bucket-name":String(f[`bucket-name`]??``)},bodyKind:`json`,body:f.body===void 0?l({token:u(f.token,`token`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await n();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.r2DataCatalog.credentials.create({...e,account_id:p,bucket_name:f[`bucket-name`]})),{successLabel:`Created`});return}f.token===void 0&&(f.token=await d(`token`,`Provides the Cloudflare API token for accessing R2.`));let m=l({token:u(f.token,`token`,`text`)});i(await o(`Creating`,async()=>s.r2DataCatalog.credentials.create({...m,account_id:p,bucket_name:f[`bucket-name`]})),{successLabel:`Created`})})},g={command:`credentials`,describe:`Catalog access credentials for external query engines (Spark, Trino, etc.)`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 r2-data-catalog delete <bucket-name>
5
-
6
- Removes the catalog from the control plane without deleting R2 bucket objects. Set force=true to remove catalog namespaces, tables, views, and maintenance metadata. Force deletion is limited to a configured catalog object count.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`cascade`,{type:`boolean`,description:`Remove child metadata before deleting the catalog.`}).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 <bucket-name>`,describe:`Delete R2 catalog metadata`,builder:_,handler:async c=>s({command:`r2-data-catalog delete`,classification:{safeFlags:[`cascade`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{let s={force:c.cascade};if(c.dryRun){a({command:`cf r2-data-catalog delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/delete`,pathParams:{"bucket-name":String(c[`bucket-name`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();if(c.accountId=u,!await f({force:!!c.force,message:`This removes catalog metadata. R2 bucket objects are retained.`})){process.stderr.write(`Aborted.
7
- `);return}i(await o(`Deleting`,async()=>l.r2DataCatalog.delete({account_id:u,bucket_name:c[`bucket-name`],...s})),{successLabel:`Deleted`})})};function y(e){return e.usage(`$0 r2-data-catalog disable <bucket-name>
8
-
9
- Disable an R2 bucket as a catalog. This operation deactivates the catalog but preserves existing metadata and data files. The catalog can be re-enabled later.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to disable as catalog.`,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 b={command:`disable <bucket-name>`,describe:`Disable R2 catalog`,builder:y,handler:async c=>s({command:`r2-data-catalog disable`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf r2-data-catalog disable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/disable`,pathParams:{"bucket-name":String(c[`bucket-name`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await f({force:!!c.force,message:`This operation turns off the data catalog for the bucket. Existing namespace or table state remains, but writes stop.`})){process.stderr.write(`Aborted.
10
- `);return}i(await o(`Deleting`,async()=>s.r2DataCatalog.disable({account_id:l,bucket_name:c[`bucket-name`]})),{successLabel:`Deleted`})})};function x(e){return e.usage(`$0 r2-data-catalog enable <bucket-name>
11
-
12
- Enable an R2 bucket as an Apache Iceberg catalog. This operation creates the necessary catalog infrastructure and activates the bucket for storing Iceberg metadata and data files.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to enable as catalog.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`enable <bucket-name>`,describe:`Enable R2 bucket as a catalog`,builder:x,handler:async c=>s({command:`r2-data-catalog enable`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf r2-data-catalog enable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/enable`,pathParams:{"bucket-name":String(c[`bucket-name`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Creating`,async()=>s.r2DataCatalog.enable({account_id:l,bucket_name:c[`bucket-name`]})),{successLabel:`Created`})})};function C(e){return e.usage(`$0 r2-data-catalog get <bucket-name>
13
-
14
- Retrieve detailed information about a specific R2 catalog by bucket name. Returns catalog status, maintenance configuration, and credential status.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <bucket-name>`,describe:`Get R2 catalog details`,builder:C,handler:async c=>s({command:`r2-data-catalog get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf r2-data-catalog get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}`,pathParams:{"bucket-name":String(c[`bucket-name`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.r2DataCatalog.get({account_id:l,bucket_name:c[`bucket-name`]})),{successLabel:`Loaded`})})};function T(e){return e.usage(`$0 r2-data-catalog list
15
-
16
- Returns a list of R2 buckets that have been enabled as Apache Iceberg catalogs for the specified account. Each catalog represents an R2 bucket configured to store Iceberg metadata and data files.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List R2 catalogs`,builder:T,handler:async c=>s({command:`r2-data-catalog list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf r2-data-catalog list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2-catalog`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.r2DataCatalog.list({account_id:l})),{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 r2-data-catalog maintenance-configs get <bucket-name>
17
-
18
- Retrieve the maintenance configuration for a specific catalog, including compaction settings and credential status.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get <bucket-name>`,describe:`Get catalog maintenance configuration`,builder:D,handler:async c=>s({command:`r2-data-catalog maintenance-configs get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf r2-data-catalog maintenance-configs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(c[`bucket-name`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.r2DataCatalog.maintenanceConfigs.get({account_id:l,bucket_name:c[`bucket-name`]})),{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 r2-data-catalog maintenance-configs update <bucket-name>
19
-
20
- Update the maintenance configuration for a catalog. This allows you to enable or disable compaction and adjust target file sizes for optimization.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`snapshot-expiration-max-snapshot-age`,{type:`string`,description:`Updates the maximum age for snapshots optionally.`}).option(`snapshot-expiration-min-snapshots-to-keep`,{type:`number`,description:`Updates the minimum number of snapshots to retain optionally.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to update catalog maintenance configuration.`})}const A={command:`update <bucket-name>`,describe:`Update catalog maintenance configuration`,builder:k,handler:async d=>s({command:`r2-data-catalog maintenance-configs update`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf r2-data-catalog maintenance-configs update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2-catalog/${d[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(d[`bucket-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(d[`bucket-name`]??``)},bodyKind:`json`,body:d.body===void 0?l({snapshot_expiration:{max_snapshot_age:u(d[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:d[`snapshot-expiration-min-snapshots-to-keep`]}}):c(d.body)});return}let s=await r(d),f=d.local?e:await n();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.r2DataCatalog.maintenanceConfigs.update({...e,account_id:f,bucket_name:d[`bucket-name`]})),{successLabel:`Created`});return}let p=l({snapshot_expiration:{max_snapshot_age:u(d[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:d[`snapshot-expiration-min-snapshots-to-keep`]}});i(await o(`Creating`,async()=>s.r2DataCatalog.maintenanceConfigs.update({...p,account_id:f,bucket_name:d[`bucket-name`]})),{successLabel:`Created`})})},j={command:`maintenance-configs`,describe:`Table maintenance settings — compaction schedules and snapshot expiration policies`,builder:e=>e.command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 r2-data-catalog namespaces list
21
-
22
- Returns a list of namespaces in the specified R2 catalog. Supports hierarchical filtering and pagination for efficient traversal of large namespace hierarchies.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`page-token`,{type:`string`,description:`Opaque pagination token from a previous response.
23
- Use this to fetch the next page of results.`}).option(`page-size`,{type:`number`,description:`Maximum number of namespaces to return per page.
24
- Defaults to 100, maximum 1000.`}).option(`parent`,{type:`string`,description:`Parent namespace to filter by. Only returns direct children of this namespace.
25
- For nested namespaces, use %1F as separator (e.g., "bronze%1Fanalytics").
26
- Omit this parameter to list top-level namespaces.`}).option(`return-uuids`,{type:`boolean`,description:`Whether to include namespace UUIDs in the response.
27
- Set to true to receive the namespace_uuids array.`}).option(`return-details`,{type:`boolean`,description:`Whether to include additional metadata (timestamps).
28
- When true, response includes created_at and updated_at arrays.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:`List namespaces in catalog`,builder:M,handler:async c=>s({command:`r2-data-catalog namespaces list`,classification:{safeFlags:[`return-uuids`,`return-details`,`dry-run`]}},c,async()=>{let s={page_token:c[`page-token`],page_size:c[`page-size`],parent:c.parent,return_uuids:c[`return-uuids`],return_details:c[`return-details`]};if(c.dryRun){a({command:`cf r2-data-catalog namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/namespaces`,pathParams:{"bucket-name":String(c[`bucket-name`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.r2DataCatalog.namespaces.list({account_id:u,bucket_name:c[`bucket-name`],...s})),{successLabel:`Loaded`})})};function P(e){return e.usage("$0 r2-data-catalog namespaces tables get <table-name>\n\nReturns full Apache Iceberg metadata for a single table: schema, partition specs, sort orders, properties, and recent snapshot history. Designed for catalog introspection UIs that need per-table details without holding R2 credentials. The `metadata.snapshots`, `metadata.snapshot-log`, and `metadata.metadata-log` arrays are pruned to the most recent 10 entries by `timestamp-ms`. Use `total_snapshots` and `returned_snapshots` to surface the truncation to end users.").positional(`table-name`,{type:`string`,description:`The table name within the given namespace.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier.
29
- For nested namespaces, use %1F as separator (e.g., "bronze%1Fanalytics").`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <table-name>`,describe:`Get table details`,builder:P,handler:async c=>s({command:`r2-data-catalog namespaces tables get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf r2-data-catalog namespaces tables get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}/tables/${c[`table-name`]==null?`<table-name>`:encodeURIComponent(String(c[`table-name`]))}`,pathParams:{"bucket-name":String(c[`bucket-name`]??``),namespace:String(c.namespace??``),"table-name":String(c[`table-name`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.r2DataCatalog.namespaces.tables.get({account_id:l,bucket_name:c[`bucket-name`],namespace:c.namespace,table_name:c[`table-name`]})),{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 r2-data-catalog namespaces tables list
30
-
31
- Returns a list of tables in the specified namespace within an R2 catalog. Supports pagination for efficient traversal of large table collections.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier.
32
- For nested namespaces, use %1F as separator (e.g., "bronze%1Fanalytics").`,demandOption:!0}).option(`page-token`,{type:`string`,description:`Opaque pagination token from a previous response.
33
- Use this to fetch the next page of results.`}).option(`page-size`,{type:`number`,description:`Maximum number of tables to return per page.
34
- Defaults to 100, maximum 1000.`}).option(`return-uuids`,{type:`boolean`,description:`Whether to include table UUIDs in the response.
35
- Set to true to receive the table_uuids array.`}).option(`return-details`,{type:`boolean`,description:`Whether to include additional metadata (timestamps, locations).
36
- When true, response includes created_at, updated_at, metadata_locations, and locations arrays.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List tables in namespace`,builder:I,handler:async c=>s({command:`r2-data-catalog namespaces tables list`,classification:{safeFlags:[`return-uuids`,`return-details`,`dry-run`]}},c,async()=>{let s={page_token:c[`page-token`],page_size:c[`page-size`],return_uuids:c[`return-uuids`],return_details:c[`return-details`]};if(c.dryRun){a({command:`cf r2-data-catalog namespaces tables list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}/tables`,pathParams:{"bucket-name":String(c[`bucket-name`]??``),namespace:String(c.namespace??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.r2DataCatalog.namespaces.tables.list({account_id:u,bucket_name:c[`bucket-name`],namespace:c.namespace,...s})),{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 r2-data-catalog namespaces tables maintenance-configs get <table-name>
37
-
38
- Retrieve the maintenance configuration for a specific table, including compaction settings.`).positional(`table-name`,{type:`string`,description:`The table name.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier (use %1F as separator for nested namespaces).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get <table-name>`,describe:`Get table maintenance configuration`,builder:R,handler:async c=>s({command:`r2-data-catalog namespaces tables maintenance-configs get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf r2-data-catalog namespaces tables maintenance-configs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}/tables/${c[`table-name`]==null?`<table-name>`:encodeURIComponent(String(c[`table-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(c[`bucket-name`]??``),namespace:String(c.namespace??``),"table-name":String(c[`table-name`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.r2DataCatalog.namespaces.tables.maintenanceConfigs.get({account_id:l,bucket_name:c[`bucket-name`],namespace:c.namespace,table_name:c[`table-name`]})),{successLabel:`Loaded`})})};function B(e){return e.usage(`$0 r2-data-catalog namespaces tables maintenance-configs queue <configuration-type>
39
-
40
- Queue maintenance for normal polling. This request does not start a run.`).positional(`configuration-type`,{type:`string`,description:`Configuration type`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Namespace`,demandOption:!0}).option(`table-name`,{type:`string`,description:`Table name`,demandOption:!0}).option(`request-id`,{type:`string`,description:`The request_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const V={command:`queue <configuration-type>`,describe:`Queue table maintenance`,builder:p(B),handler:async d=>s({command:`r2-data-catalog namespaces tables maintenance-configs queue`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf r2-data-catalog namespaces tables maintenance-configs queue`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2-catalog/${d[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(d[`bucket-name`]))}/namespaces/${d.namespace==null?`<namespace>`:encodeURIComponent(String(d.namespace))}/tables/${d[`table-name`]==null?`<table-name>`:encodeURIComponent(String(d[`table-name`]))}/maintenance-configs/${d[`configuration-type`]==null?`<configuration-type>`:encodeURIComponent(String(d[`configuration-type`]))}/queue`,pathParams:{"bucket-name":String(d[`bucket-name`]??``),namespace:String(d.namespace??``),"table-name":String(d[`table-name`]??``),"configuration-type":String(d[`configuration-type`]??``)},bodyKind:`json`,body:d.body===void 0?l({request_id:u(d[`request-id`],`request-id`,`text`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await n();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.r2DataCatalog.namespaces.tables.maintenanceConfigs.queue({...e,account_id:f,bucket_name:d[`bucket-name`],namespace:d.namespace,table_name:d[`table-name`],configuration_type:d[`configuration-type`]})),{successLabel:`Created`});return}let p=l({request_id:u(d[`request-id`],`request-id`,`text`)});i(await o(`Creating`,async()=>s.r2DataCatalog.namespaces.tables.maintenanceConfigs.queue({...p,account_id:f,bucket_name:d[`bucket-name`],namespace:d.namespace,table_name:d[`table-name`],configuration_type:d[`configuration-type`]})),{successLabel:`Created`})})};function H(e){return e.usage(`$0 r2-data-catalog namespaces tables maintenance-configs update <table-name>
41
-
42
- Update the maintenance configuration for a specific table. This allows you to enable or disable compaction and adjust target file sizes for optimization.`).positional(`table-name`,{type:`string`,description:`The table name.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier (use %1F as separator for nested namespaces).`,demandOption:!0}).option(`compaction-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).option(`compaction-target-size-mb`,{type:`string`,description:`Sets the target file size for compaction in megabytes. Defaults to "128".`,choices:[`64`,`128`,`256`,`512`]}).option(`snapshot-expiration-max-snapshot-age`,{type:`string`,description:`Updates the maximum age for snapshots optionally.`}).option(`snapshot-expiration-min-snapshots-to-keep`,{type:`number`,description:`Updates the minimum number of snapshots to retain optionally.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to update table maintenance configuration.`})}const U={command:`update <table-name>`,describe:`Update table maintenance configuration`,builder:H,handler:async d=>s({command:`r2-data-catalog namespaces tables maintenance-configs update`,classification:{safeFlags:[`compaction-state`,`compaction-target-size-mb`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf r2-data-catalog namespaces tables maintenance-configs update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2-catalog/${d[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(d[`bucket-name`]))}/namespaces/${d.namespace==null?`<namespace>`:encodeURIComponent(String(d.namespace))}/tables/${d[`table-name`]==null?`<table-name>`:encodeURIComponent(String(d[`table-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(d[`bucket-name`]??``),namespace:String(d.namespace??``),"table-name":String(d[`table-name`]??``)},bodyKind:`json`,body:d.body===void 0?l({compaction:{state:u(d[`compaction-state`],`compaction-state`,`text`),target_size_mb:u(d[`compaction-target-size-mb`],`compaction-target-size-mb`,`text`)},snapshot_expiration:{max_snapshot_age:u(d[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:d[`snapshot-expiration-min-snapshots-to-keep`]}}):c(d.body)});return}let s=await r(d),f=d.local?e:await n();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.r2DataCatalog.namespaces.tables.maintenanceConfigs.update({...e,account_id:f,bucket_name:d[`bucket-name`],namespace:d.namespace,table_name:d[`table-name`]})),{successLabel:`Created`});return}let p=l({compaction:{state:u(d[`compaction-state`],`compaction-state`,`text`),target_size_mb:u(d[`compaction-target-size-mb`],`compaction-target-size-mb`,`text`)},snapshot_expiration:{max_snapshot_age:u(d[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:d[`snapshot-expiration-min-snapshots-to-keep`]}});i(await o(`Creating`,async()=>s.r2DataCatalog.namespaces.tables.maintenanceConfigs.update({...p,account_id:f,bucket_name:d[`bucket-name`],namespace:d.namespace,table_name:d[`table-name`]})),{successLabel:`Created`})})},W={command:`maintenance-configs`,describe:`Operations for namespaces.tables.maintenance-configs`,builder:e=>e.command(z).command(V).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 r2-data-catalog namespaces tables maintenance-runs list
43
-
44
- Retrieves recent table maintenance runs for the current table.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Namespace`,demandOption:!0}).option(`table-name`,{type:`string`,description:`Table name`,demandOption:!0}).option(`page-size`,{type:`number`,description:`Page size`}).option(`page-token`,{type:`string`,description:`Page token`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`list`,describe:`List table maintenance runs`,builder:G,handler:async c=>s({command:`r2-data-catalog namespaces tables maintenance-runs list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page_size:c[`page-size`],page_token:c[`page-token`]};if(c.dryRun){a({command:`cf r2-data-catalog namespaces tables maintenance-runs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}/tables/${c[`table-name`]==null?`<table-name>`:encodeURIComponent(String(c[`table-name`]))}/maintenance-runs`,pathParams:{"bucket-name":String(c[`bucket-name`]??``),namespace:String(c.namespace??``),"table-name":String(c[`table-name`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.r2DataCatalog.namespaces.tables.maintenanceRuns.list({account_id:u,bucket_name:c[`bucket-name`],namespace:c.namespace,table_name:c[`table-name`],...s})),{successLabel:`Loaded`})})},q={command:`maintenance-runs`,describe:`Operations for namespaces.tables.maintenance-runs`,builder:e=>e.command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`tables`,describe:`Operations for namespaces.tables`,builder:e=>e.command(F).command(L).command(W).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Y={command:`namespaces`,describe:`Logical namespaces that group related tables within the data catalog`,builder:e=>e.command(N).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},X={command:`r2-data-catalog`,describe:`Iceberg-compatible data catalog for R2 — organize objects into tables and namespaces for SQL query engines`,builder:e=>e.command(v).command(b).command(S).command(w).command(E).command(g).command(j).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{X as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./run-UHTbUldP.mjs";export{e as runWithTelemetry};
@@ -1,30 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-BsGrhAqB.mjs";import{r as i}from"./auth-BYFcxn1F.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-5nsUpQL6.mjs";import{t as c}from"./run-UHTbUldP.mjs";import"./telemetry-C3hmM9Q9.mjs";import{n as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{t as f}from"./cli-types-DoVT5q_M.mjs";function p(e){return e.usage(`$0 security-center audit-logs get <issue-id>
3
-
4
- Lists audit log entries for a specific Security Center insight, showing changes to its status and classification over time.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`cursor`,{type:`string`,description:`Opaque cursor for pagination. Use the cursor value from result_info of the previous response.`}).option(`field-changed`,{type:`string`,description:`Filter by the field that was changed.`,choices:[`status`,`user_classification`]}).option(`changed-by`,{type:`string`,description:`Filter by the actor that made the change.`}).option(`since`,{type:`string`,description:`Filter entries changed at or after this timestamp (RFC 3339).`}).option(`before`,{type:`string`,description:`Filter entries changed before this timestamp (RFC 3339).`}).option(`order`,{type:`string`,description:`Sort order for results. Use 'asc' for oldest first or 'desc' for newest first.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`get <issue-id>`,describe:`Retrieves Issue Audit Log`,builder:f(p),handler:async l=>c({command:`security-center audit-logs get`,classification:{safeFlags:[`field-changed`,`order`,`dry-run`]}},l,async()=>{let c={per_page:l[`per-page`],cursor:l.cursor,field_changed:l[`field-changed`],changed_by:l[`changed-by`],since:l.since,before:l.before,order:l.order};if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-center audit-logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/security-center/insights/${l[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(l[`issue-id`]))}/audit-log`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"issue-id":String(l[`issue-id`]??``)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await r();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.securityCenter.auditLogs.get({account_or_zone:d,account_or_zone_id:f,issue_id:l[`issue-id`],...c})),{successLabel:`Loaded`})})};function h(e){return e.usage(`$0 security-center audit-logs list
5
-
6
- Lists audit log entries for all Security Center insights in the account or zone, showing changes to insight status and classification.`).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`cursor`,{type:`string`,description:`Opaque cursor for pagination. Use the cursor value from result_info of the previous response.`}).option(`field-changed`,{type:`string`,description:`Filter by the field that was changed.`,choices:[`status`,`user_classification`]}).option(`changed-by`,{type:`string`,description:`Filter by the actor that made the change.`}).option(`since`,{type:`string`,description:`Filter entries changed at or after this timestamp (RFC 3339).`}).option(`before`,{type:`string`,description:`Filter entries changed before this timestamp (RFC 3339).`}).option(`order`,{type:`string`,description:`Sort order for results. Use 'asc' for oldest first or 'desc' for newest first.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`Retrieves account or zone Audit Log`,builder:f(h),handler:async l=>c({command:`security-center audit-logs list`,classification:{safeFlags:[`field-changed`,`order`,`dry-run`]}},l,async()=>{let c={per_page:l[`per-page`],cursor:l.cursor,field_changed:l[`field-changed`],changed_by:l[`changed-by`],since:l.since,before:l.before,order:l.order};if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-center audit-logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/security-center/insights/audit-log`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await r();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.securityCenter.auditLogs.list({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})},_={command:`audit-logs`,describe:`Operations for audit-logs`,builder:e=>e.command(m).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.usage(`$0 security-center insights class get
7
-
8
- Retrieves Security Center insight counts aggregated by classification class.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get`,describe:`Retrieves Security Center Insight Counts by Class`,builder:f(v),handler:async l=>c({command:`security-center insights class get`,classification:{safeFlags:[`dismissed`,`dry-run`]}},l,async()=>{let c={dismissed:l.dismissed,issue_class:l[`issue-class`],issue_type:l[`issue-type`],product:l.product,source:l.source,severity:l.severity,subject:l.subject};if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-center insights class get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/security-center/insights/class`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await r();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.securityCenter.insights.class.get({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})},b={command:`class`,describe:`Operations for insights.class`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.usage(`$0 security-center insights dismiss <issue-id>
9
-
10
- Archives a Security Center insight for an account or zone, removing it from the active insights list while preserving historical data.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`dismiss`,{type:`boolean`,description:`The dismiss field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`dismiss <issue-id>`,describe:`Archives Security Center Insight`,builder:x,handler:async d=>c({command:`security-center insights dismiss`,classification:{safeFlags:[`dismiss`,`dry-run`]}},d,async()=>{if(d.dryRun){let e=d.zone===void 0?await t():void 0,n=d.zone===void 0?`accounts`:`zones`,r=d.zone??e??`<account-id>`;o({command:`cf security-center insights dismiss`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/security-center/insights/${d[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(d[`issue-id`]))}/dismiss`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"issue-id":String(d[`issue-id`]??``)},bodyKind:`json`,body:d.body===void 0?u({dismiss:d.dismiss}):l(d.body)});return}let c=await i(d),f=d.zone===void 0?`accounts`:`zones`,p=f===`zones`?await n({zone:d.zone},c,{quiet:d.quiet}):d.local?e:await r();if(f===`zones`?d.zoneId=p:d.accountId=p,d.body){let e=l(d.body);a(await s(`Updating`,async()=>c.securityCenter.insights.dismiss({...e,account_or_zone:f,account_or_zone_id:p,issue_id:d[`issue-id`]})),{successLabel:`Updated`});return}let m=u({dismiss:d.dismiss});a(await s(`Updating`,async()=>c.securityCenter.insights.dismiss({...m,account_or_zone:f,account_or_zone_id:p,issue_id:d[`issue-id`]})),{successLabel:`Updated`})})};function C(e){return e.usage(`$0 security-center insights get-partner-count
11
-
12
- Retrieves the uncapped count of active, non-dismissed, unclassified RiskRecon insights for the account or zone.`).option(`source`,{type:`string`,description:`Source`,choices:[`riskrecon`],demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get-partner-count`,describe:`Retrieves a Partner Security Center Insight Count`,builder:f(C),handler:async l=>c({command:`security-center insights get-partner-count`,classification:{safeFlags:[`source`,`dry-run`]}},l,async()=>{let c={source:l.source};if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-center insights get-partner-count`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/security-center/insights/partner-count`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await r();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.securityCenter.insights.getPartnerCount({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})};function T(e){return e.usage(`$0 security-center insights list
13
-
14
- Lists all Security Center insights for the account or zone, showing security findings and recommendations.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`page`,{type:`number`,description:`Specifies the current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Sets the number of results per page of results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`Retrieves Security Center Insights`,builder:f(T),handler:async l=>c({command:`security-center insights list`,classification:{safeFlags:[`dismissed`,`dry-run`]}},l,async()=>{let c={dismissed:l.dismissed,issue_class:l[`issue-class`],issue_type:l[`issue-type`],product:l.product,source:l.source,severity:l.severity,subject:l.subject,page:l.page,per_page:l[`per-page`]};if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-center insights list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/security-center/insights`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await r();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.securityCenter.insights.list({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 security-center insights severity get
15
-
16
- Retrieves Security Center insight counts aggregated by severity level (critical, high, medium, low).`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get`,describe:`Retrieves Security Center Insight Counts by Severity`,builder:f(D),handler:async l=>c({command:`security-center insights severity get`,classification:{safeFlags:[`dismissed`,`dry-run`]}},l,async()=>{let c={dismissed:l.dismissed,issue_class:l[`issue-class`],issue_type:l[`issue-type`],product:l.product,source:l.source,severity:l.severity,subject:l.subject};if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-center insights severity get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/security-center/insights/severity`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await r();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.securityCenter.insights.severity.get({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})},k={command:`severity`,describe:`Operations for insights.severity`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.usage(`$0 security-center insights type get
17
-
18
- Retrieves Security Center insight counts aggregated by insight type.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get`,describe:`Retrieves Security Center Insight Counts by Type`,builder:f(A),handler:async l=>c({command:`security-center insights type get`,classification:{safeFlags:[`dismissed`,`dry-run`]}},l,async()=>{let c={dismissed:l.dismissed,issue_class:l[`issue-class`],issue_type:l[`issue-type`],product:l.product,source:l.source,severity:l.severity,subject:l.subject};if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-center insights type get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/security-center/insights/type`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await r();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.securityCenter.insights.type.get({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})},M={command:`type`,describe:`Operations for insights.type`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.usage(`$0 security-center insights update-classification <issue-id>
19
-
20
- Updates the user classification for a Security Center insight. Valid values are 'false_positive' or 'accept_risk'. To reset, set classification to null. Cannot change directly between classification values - must reset to null first.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`classification`,{type:`string`,description:`User-defined classification for the insight. Can be 'false_positive', 'accept_risk', 'other', or null.`,choices:[`false_positive`,`accept_risk`,`other`]}).option(`rationale`,{type:`string`,description:`Rationale for the classification change. Required when classification is 'accept_risk' or 'other'.`}).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 P={command:`update-classification <issue-id>`,describe:`Updates Security Center Insight Classification`,builder:N,handler:async f=>c({command:`security-center insights update-classification`,classification:{safeFlags:[`classification`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=f.zone===void 0?await t():void 0,n=f.zone===void 0?`accounts`:`zones`,r=f.zone??e??`<account-id>`;o({command:`cf security-center insights update-classification`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/security-center/insights/${f[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(f[`issue-id`]))}/classification`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"issue-id":String(f[`issue-id`]??``)},bodyKind:`json`,body:f.body===void 0?u({classification:d(f.classification,`classification`,`text`),rationale:d(f.rationale,`rationale`,`text`)}):l(f.body)});return}let c=await i(f),p=f.zone===void 0?`accounts`:`zones`,m=p===`zones`?await n({zone:f.zone},c,{quiet:f.quiet}):f.local?e:await r();if(p===`zones`?f.zoneId=m:f.accountId=m,f.body){let e=l(f.body);a(await s(`Updating`,async()=>c.securityCenter.insights.updateClassification({...e,account_or_zone:p,account_or_zone_id:m,issue_id:f[`issue-id`]})),{successLabel:`Updated`});return}let h=u({classification:d(f.classification,`classification`,`text`),rationale:d(f.rationale,`rationale`,`text`)});a(await s(`Updating`,async()=>c.securityCenter.insights.updateClassification({...h,account_or_zone:p,account_or_zone_id:m,issue_id:f[`issue-id`]})),{successLabel:`Updated`})})},F={command:`insights`,describe:`Security findings and recommendations across your account — DNS, SSL, WAF misconfigurations, etc.`,builder:e=>e.command(S).command(w).command(E).command(P).command(b).command(k).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function I(e){return e.usage(`$0 security-center scans list
21
-
22
- Returns the most recent on-demand scans for the account or zone, up to a maximum of 5. Each scan includes its ID, start time, and current status. This includes both account or zone-wide and zone-scoped scans. Also returns quota information showing how many scans have been used and how many remain in the current 24-hour window.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`Get Recent account or zone Scans`,builder:I,handler:async l=>c({command:`security-center scans list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-center scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/security-center/insights/scans`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.securityCenter.scans.list({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 security-center scans start
23
-
24
- Initiates an on-demand security scan for the entire account or zone, scanning all zones associated with the account or zone. Rate limited to 5 scans per account or zone per 24-hour window.`).option(`issue-type`,{type:`string`,description:`The issue_type field`,choices:[`compliance_violation`,`email_security`,`exposed_infrastructure`,`insecure_configuration`,`weak_authentication`,`configuration_suggestion`]}).option(`issue-class`,{type:`string`,description:`The issue_class field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for starting an on-demand scan. Specify issue_type or issue_class to scope the scan, or provide an empty object to scan all issue types.`}).conflicts(`issue-type`,[`issue-class`]).conflicts(`issue-class`,[`issue-type`])}const z={command:`start`,describe:`Start On-Demand account or zone Scan`,builder:R,handler:async f=>c({command:`security-center scans start`,classification:{safeFlags:[`issue-type`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=f.zone===void 0?await t():void 0,n=f.zone===void 0?`accounts`:`zones`,r=f.zone??e??`<account-id>`;o({command:`cf security-center scans start`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/security-center/insights/scans`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:f.body===void 0?u({issue_type:d(f[`issue-type`],`issue-type`,`text`),issue_class:d(f[`issue-class`],`issue-class`,`text`)}):l(f.body)});return}let c=await i(f),p=f.zone===void 0?`accounts`:`zones`,m=p===`zones`?await n({zone:f.zone},c,{quiet:f.quiet}):f.local?e:await r();if(p===`zones`?f.zoneId=m:f.accountId=m,f.body){let e=l(f.body);a(await s(`Creating`,async()=>c.securityCenter.scans.start({body:e,account_or_zone:p,account_or_zone_id:m})),{successLabel:`Created`});return}let h=u({issue_type:d(f[`issue-type`],`issue-type`,`text`),issue_class:d(f[`issue-class`],`issue-class`,`text`)});a(await s(`Creating`,async()=>c.securityCenter.scans.start({body:h,account_or_zone:p,account_or_zone_id:m})),{successLabel:`Created`})})},B={command:`scans`,describe:`Operations for scans`,builder:e=>e.command(L).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.usage(`$0 security-center state get
25
-
26
- Returns account-level Security Center state: whether scans are enabled for the account and whether the account was recently reactivated from a dormant state.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get`,describe:`Retrieves Account State`,builder:V,handler:async n=>c({command:`security-center state get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf security-center state get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/security-center/state`,pathParams:{},bodyKind:`none`});return}let c=await i(n),l=n.local?e:await r();n.accountId=l,a(await s(`Loading`,async()=>c.securityCenter.state.get({account_id:l})),{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 security-center state update
27
-
28
- Updates account-level Security Center state. Currently supports enabling or disabling scans for the account. Returns the account's state after the update.`).option(`scans-enabled`,{type:`boolean`,description:`Enable or disable scans for the account.`}).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:`update`,describe:`Updates Account State`,builder:U,handler:async n=>c({command:`security-center state update`,classification:{safeFlags:[`scans-enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf security-center state update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/security-center/state`,pathParams:{},bodyKind:`json`,body:n.body===void 0?u({scans_enabled:n[`scans-enabled`]}):l(n.body)});return}let c=await i(n),d=n.local?e:await r();if(n.accountId=d,n.body){let e=l(n.body);a(await s(`Updating`,async()=>c.securityCenter.state.update({...e,account_id:d})),{successLabel:`Updated`});return}if(n[`scans-enabled`]===void 0)throw Error(`--scans-enabled is required (or pass --body with this field set).`);let f=u({scans_enabled:n[`scans-enabled`]});a(await s(`Updating`,async()=>c.securityCenter.state.update({...f,account_id:d})),{successLabel:`Updated`})})},G={command:`state`,describe:`Operations for state`,builder:e=>e.command(H).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function K(e){return e.usage(`$0 security-center zone-insights context get <issue-id>
29
-
30
- Returns the full context payload for an insight. This endpoint is used for insights with large payloads that are not included inline in the list response.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`get <issue-id>`,describe:`Retrieves Security Center Insight Context`,builder:K,handler:async n=>c({command:`security-center zone-insights context get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf security-center zone-insights context get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/security-center/insights/${n[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(n[`issue-id`]))}/context`,pathParams:{"issue-id":String(n[`issue-id`]??``)},bodyKind:`none`});return}let c=await i(n),l=n.local?e:await r();n.accountId=l,a(await s(`Loading`,async()=>c.securityCenter.zoneInsights.context.get({account_id:l,issue_id:n[`issue-id`]})),{successLabel:`Loaded`})})},J={command:`context`,describe:`Operations for zone-insights.context`,builder:e=>e.command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Y={command:`zone-insights`,describe:`Zone-scoped security insights — counts by class, severity, type, and dismissal`,builder:e=>e.command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},X={command:`security-center`,describe:`Security posture dashboard — view and manage security insights, misconfigurations, and vulnerabilities`,builder:e=>e.command(_).command(F).command(B).command(G).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{X as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./run-UHTbUldP.mjs";const e=`unknown command`;export{e as t};
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
- import{r as e}from"./auth-BYFcxn1F.mjs";import{t}from"./output-CvQFJkvi.mjs";import{t as n}from"./dry-run-Bq0JAsbX.mjs";import{t as r}from"./progress-5nsUpQL6.mjs";import{t as i}from"./run-UHTbUldP.mjs";import"./telemetry-C3hmM9Q9.mjs";function a(e){return e.usage(`$0 tenant account-type list
3
-
4
- List of account types available for the Tenant to provision accounts.`).option(`tenant-id`,{type:`string`,description:`Tenant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const o={command:`list`,describe:`Get tenant account types`,builder:a,handler:async a=>i({command:`tenant account-type list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf tenant account-type list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${a[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(a[`tenant-id`]))}/account_types`,pathParams:{"tenant-id":String(a[`tenant-id`]??``)},bodyKind:`none`});return}let i=await e(a);t(await r(`Loading`,async()=>i.tenant.accountType.list({tenant_id:a[`tenant-id`]})),{successLabel:`Loaded`})})},s={command:`account-type`,describe:`Operations for account-type`,builder:e=>e.command(o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function c(e){return e.usage(`$0 tenant account list
5
-
6
- List of accounts for the Tenant.`).option(`tenant-id`,{type:`string`,description:`Tenant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`list`,describe:`List tenant accounts`,builder:c,handler:async a=>i({command:`tenant account list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf tenant account list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${a[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(a[`tenant-id`]))}/accounts`,pathParams:{"tenant-id":String(a[`tenant-id`]??``)},bodyKind:`none`});return}let i=await e(a);t(await r(`Loading`,async()=>i.tenant.account.list({tenant_id:a[`tenant-id`]})),{successLabel:`Loaded`})})},u={command:`account`,describe:`Operations for account`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.usage(`$0 tenant entitlement list
7
-
8
- List of innate entitlements available for the Tenant.`).option(`tenant-id`,{type:`string`,description:`Tenant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`list`,describe:`List tenant entitlements`,builder:d,handler:async a=>i({command:`tenant entitlement list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf tenant entitlement list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${a[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(a[`tenant-id`]))}/entitlements`,pathParams:{"tenant-id":String(a[`tenant-id`]??``)},bodyKind:`none`});return}let i=await e(a);t(await r(`Loading`,async()=>i.tenant.entitlement.list({tenant_id:a[`tenant-id`]})),{successLabel:`Loaded`})})},p={command:`entitlement`,describe:`Operations for entitlement`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function m(e){return e.usage(`$0 tenant get <tenant-id>
9
-
10
- Retrieves a Tenant by Tenant ID.`).positional(`tenant-id`,{type:`string`,description:`Tenant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <tenant-id>`,describe:`Get tenant`,builder:m,handler:async a=>i({command:`tenant get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf tenant get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${a[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(a[`tenant-id`]))}`,pathParams:{"tenant-id":String(a[`tenant-id`]??``)},bodyKind:`none`});return}let i=await e(a);t(await r(`Loading`,async()=>i.tenant.get({tenant_id:a[`tenant-id`]})),{successLabel:`Loaded`})})};function g(e){return e.usage(`$0 tenant membership list
11
-
12
- List of active members (Cloudflare users) for the Tenant.`).option(`tenant-id`,{type:`string`,description:`Tenant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`List tenant memberships`,builder:g,handler:async a=>i({command:`tenant membership list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf tenant membership list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${a[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(a[`tenant-id`]))}/memberships`,pathParams:{"tenant-id":String(a[`tenant-id`]??``)},bodyKind:`none`});return}let i=await e(a);t(await r(`Loading`,async()=>i.tenant.membership.list({tenant_id:a[`tenant-id`]})),{successLabel:`Loaded`})})},v={command:`membership`,describe:`Operations for membership`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},y={command:`tenant`,describe:`tenant`,builder:e=>e.command(h).command(u).command(s).command(p).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{y as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{n as e,r as t}from"./update-check-g9Jcn6YJ.mjs";export{e as getUpdateNotice,t as maybeStartBackgroundUpdateCheck};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- const e=process.env.CLI_VERSION??`1.0.0-beta.4`,t=`cf-cli/${e}`;export{e as n,t};