cf 1.0.0-beta.2 → 1.0.0-beta.4

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 (311) hide show
  1. package/README.md +1 -0
  2. package/dist/_meta/commands.json +28143 -30372
  3. package/dist/_meta/hand-written-commands.json +72 -49
  4. package/dist/_meta/schemas.json +18731 -20305
  5. package/dist/{abuse-reports-JcwSaW-c.mjs → abuse-reports-L4L7sC0F.mjs} +1 -1
  6. package/dist/access-DUQisFsH.mjs +2 -0
  7. package/dist/{account-CLsfIk5j.mjs → account-J7N4Ukse.mjs} +1 -1
  8. package/dist/{account-tags-BJdDiyDi.mjs → account-tags-DMmTopgx.mjs} +1 -1
  9. package/dist/{accounts-6eXqIqSW.mjs → accounts-DbZdpH5e.mjs} +1 -1
  10. package/dist/{acm-ChNLnPqM.mjs → acm-BtXPdUqH.mjs} +1 -1
  11. package/dist/{addressing-z8ei_TCh.mjs → addressing-Bc_ZSmrK.mjs} +5 -5
  12. package/dist/{agent-memory-Un0usAVF.mjs → agent-memory-CEUI1wKI.mjs} +1 -1
  13. package/dist/{ai-Bj8kgDf7.mjs → ai-CFHaVQcc.mjs} +1 -1
  14. package/dist/{ai-audit-FR6QuDK_.mjs → ai-audit-guygqmOl.mjs} +1 -1
  15. package/dist/ai-gateway-BcKOL4WQ.mjs +80 -0
  16. package/dist/{ai-search-BvMeOKK6.mjs → ai-search-DJvNkX2o.mjs} +1 -1
  17. package/dist/{ai-security-BHvDKoM1.mjs → ai-security-CVaHbGzn.mjs} +1 -1
  18. package/dist/{alerting-DmRZCAjg.mjs → alerting-wy4IuGs7.mjs} +1 -1
  19. package/dist/{analytics-DqidJ4qc.mjs → analytics-Do4VMrPX.mjs} +2 -2
  20. package/dist/{analytics_engine-I7N0I6yP.mjs → analytics_engine-Cv7IF8ex.mjs} +1 -1
  21. package/dist/{api-security-BMNhdDyR.mjs → api-security-fuzV322d.mjs} +1 -1
  22. package/dist/{argo-U5TIBcub.mjs → argo-BBf-Jw0O.mjs} +1 -1
  23. package/dist/{artifacts-Byw1W73U.mjs → artifacts-B7_OhBxW.mjs} +1 -1
  24. package/dist/{audit-logs-C6zyFeKM.mjs → audit-logs-DyARgcxN.mjs} +1 -1
  25. package/dist/{auth-B5p3SIhO.mjs → auth-BYFcxn1F.mjs} +2 -2
  26. package/dist/{auth-CosaKfuk.mjs → auth-CiOv7s9F.mjs} +1 -1
  27. package/dist/{autoconfig-DED3bWob.mjs → autoconfig-DbL_FL5k.mjs} +74 -74
  28. package/dist/{banner-Xk4xBN8U.mjs → banner-ClclgnBn.mjs} +1 -1
  29. package/dist/{billing-BS1raRJt.mjs → billing-07_VIO4X.mjs} +1 -1
  30. package/dist/{bot-management-Cn6xfGzJ.mjs → bot-management-CmkPUu2I.mjs} +1 -1
  31. package/dist/{botnet-feed-DtWOPNfw.mjs → botnet-feed-Bn5pE_rx.mjs} +1 -1
  32. package/dist/{brand-protection-BcEQ66bT.mjs → brand-protection-CWDqPOXe.mjs} +1 -1
  33. package/dist/{browser-run-RZ7ZPRop.mjs → browser-run-CfEIfpnQ.mjs} +1 -1
  34. package/dist/build-BmLpTw4w.mjs +2 -0
  35. package/dist/build-DEbkHHVh.mjs +2 -0
  36. package/dist/{builds-AOCMH4CE.mjs → builds-mgouQLUs.mjs} +1 -1
  37. package/dist/{cache-D_EBxDff.mjs → cache-DXLofz5T.mjs} +1 -1
  38. package/dist/{certificate-authorities-B6rtjuaT.mjs → certificate-authorities-BfW-rEpf.mjs} +1 -1
  39. package/dist/{cf--3tGe71B.mjs → cf-O3gEaXYZ.mjs} +11 -11
  40. package/dist/{chunk-M77HNR46-BqG3fjQz.mjs → chunk-M77HNR46-DPbhuhiy.mjs} +1 -1
  41. package/dist/{chunk-RV27PEH3-C8_6bMgi.mjs → chunk-RV27PEH3-Cws_30ln.mjs} +30 -30
  42. package/dist/cli-Dgk9bd8j.mjs +6 -0
  43. package/dist/{client-certificates-uBOjGcgo.mjs → client-certificates-By2A46a2.mjs} +1 -1
  44. package/dist/{client-side-security-Bm7JwGaG.mjs → client-side-security-Bo6ZwJOS.mjs} +1 -1
  45. package/dist/{cloud-connector-69M2Dx8h.mjs → cloud-connector-DYb_3u-M.mjs} +1 -1
  46. package/dist/{cloudflared-Ba5LySkU.mjs → cloudflared-91JvyShh.mjs} +1 -1
  47. package/dist/{cloudforce-one-Xn2mlAPv.mjs → cloudforce-one-D8l0I5PL.mjs} +1 -1
  48. package/dist/command-BPfW-yE4.mjs +2 -0
  49. package/dist/{command-Cb0pS8T5.mjs → command-BgBsFEYv.mjs} +1 -1
  50. package/dist/{command-DEC5PwJo.mjs → command-C3Qhz4kU.mjs} +1 -1
  51. package/dist/command-C72KLHMc.mjs +2 -0
  52. package/dist/command-C7cOrHdI.mjs +2 -0
  53. package/dist/command-CGD1oByJ.mjs +2 -0
  54. package/dist/command-CJR1CUK_.mjs +2 -0
  55. package/dist/command-C_lQtSPg.mjs +2 -0
  56. package/dist/{command-DCpX9Cem.mjs → command-DH67hNLj.mjs} +1 -1
  57. package/dist/command-DJJN9xaA.mjs +2 -0
  58. package/dist/command-DRlUj6lW.mjs +2 -0
  59. package/dist/command-DYeBZ5mA.mjs +2 -0
  60. package/dist/command-DaAGN9uP.mjs +2 -0
  61. package/dist/{command-Cz_bKDWf.mjs → command-DjNcY4cf.mjs} +1 -1
  62. package/dist/command-gSmdvn_d.mjs +2 -0
  63. package/dist/{completions-DZDltM9V.mjs → completions-DUDx3DwX.mjs} +26 -26
  64. package/dist/{connector-interrupts-DTy6laab.mjs → connector-interrupts-DIMvaZhN.mjs} +1 -1
  65. package/dist/{connector-telemetry-events-CJqGGvFJ.mjs → connector-telemetry-events-TWQvm-cj.mjs} +1 -1
  66. package/dist/{connector-telemetry-snapshots-BPxhPhr6.mjs → connector-telemetry-snapshots-Dyoe-_R3.mjs} +1 -1
  67. package/dist/{connectors-CdfCcZuA.mjs → connectors-D7ZFg3hB.mjs} +1 -1
  68. package/dist/{containers-VMqcxH5a.mjs → containers-Bu3tLjU1.mjs} +1 -1
  69. package/dist/{containers-C7z53QcY.mjs → containers-CduXjFBJ.mjs} +88 -90
  70. package/dist/{content-scan-BirgZrmr.mjs → content-scan-CVBD6mUI.mjs} +1 -1
  71. package/dist/{context-Dzzbc9RK.mjs → context-BsGrhAqB.mjs} +2 -2
  72. package/dist/{cps-DzFm3zKp.mjs → cps-CgiRKmTe.mjs} +1 -1
  73. package/dist/{csamScanner-D2_OO5-1.mjs → csamScanner-BlXIOFFe.mjs} +1 -1
  74. package/dist/{ct-alerting-B7wQkFVl.mjs → ct-alerting-CJZK0uSQ.mjs} +1 -1
  75. package/dist/{custom-certificates-BKcCfbH8.mjs → custom-certificates-DFaj_czg.mjs} +1 -1
  76. package/dist/{custom-csrs-CXoOxir4.mjs → custom-csrs-BnFQpjOo.mjs} +1 -1
  77. package/dist/{custom-hostnames-CNYfnCOd.mjs → custom-hostnames-DSnE6xOT.mjs} +1 -1
  78. package/dist/{custom-nameservers-BlLM7a4L.mjs → custom-nameservers-CdQOt_qU.mjs} +1 -1
  79. package/dist/{custom-pages-BcWoypet.mjs → custom-pages-TWGlS6Ms.mjs} +1 -1
  80. package/dist/{d1-CvrHsqYY.mjs → d1-Cbqx2kAz.mjs} +1 -1
  81. package/dist/{dcv-delegation-9_Hl-5v-.mjs → dcv-delegation-DM3oGGio.mjs} +1 -1
  82. package/dist/delegate.mjs +1 -1
  83. package/dist/{deploy-BlXYtvTd.mjs → deploy-BZUWZ888.mjs} +1 -1
  84. package/dist/{deploy-input-DTXVZ2QJ.mjs → deploy-input-ChEbf2Kp.mjs} +1 -1
  85. package/dist/dev-OsbQIdD8.mjs +4 -0
  86. package/dist/{diagnostics-BxHs1EJB.mjs → diagnostics-8bbleTmW.mjs} +1 -1
  87. package/dist/{dialog-ClHoC_cG.mjs → dialog-BlUXJKbA.mjs} +1 -1
  88. package/dist/discover-DgHRf-qo.mjs +2 -0
  89. package/dist/discover-VRFBjse7.mjs +2 -0
  90. package/dist/{dist-CmyJy57B.mjs → dist-DTN-pqSs.mjs} +14 -14
  91. package/dist/{dist-Cpb7_h4N.mjs → dist-DW47TUGh.mjs} +1 -1
  92. package/dist/{dist-cGGV-p_F.mjs → dist-DfMipWKR.mjs} +3 -3
  93. package/dist/{dls-D7GXW-N3.mjs → dls-TzQpry2j.mjs} +1 -1
  94. package/dist/{dns-B0mdWJO5.mjs → dns-Bzv4YLeg.mjs} +1 -1
  95. package/dist/{dns-firewall-BG0bzuL3.mjs → dns-firewall-BjWwOmDR.mjs} +1 -1
  96. package/dist/{dot-prop-IITUZ2XW-BO5KJUwL.mjs → dot-prop-IITUZ2XW-BilKo4kO.mjs} +1 -1
  97. package/dist/dotenv-CcQjGlV0.mjs +4 -0
  98. package/dist/dry-run-Bq0JAsbX.mjs +2 -0
  99. package/dist/{durable-objects-DW0CsJzR.mjs → durable-objects-CRhSGkpc.mjs} +1 -1
  100. package/dist/{email-auth-Ls-7Yijm.mjs → email-auth-Bth4_FHy.mjs} +1 -1
  101. package/dist/{email-routing-DVaFhg-3.mjs → email-routing-CkTh4F5j.mjs} +1 -1
  102. package/dist/{email-security-vnwkqlgp.mjs → email-security-C-2jADxE.mjs} +1 -1
  103. package/dist/{email-sending-CbMUicJz.mjs → email-sending-B_sd4ouE.mjs} +1 -1
  104. package/dist/error-sanitization-Cu-8OKRA.mjs +2 -0
  105. package/dist/{error-sanitization-TV6O0aCD.mjs → error-sanitization-Dc4bLj8k.mjs} +1 -1
  106. package/dist/{fieldExtractors-2EkDoJg8.mjs → fieldExtractors-z92V55-Y.mjs} +1 -1
  107. package/dist/{firewall-BK4QYqRe.mjs → firewall-0yKpxdjj.mjs} +1 -1
  108. package/dist/{flagship--lHQ0H3n.mjs → flagship-IRVq23te.mjs} +1 -1
  109. package/dist/{fraud-CaoRrQ8W.mjs → fraud-BpJ_aoIE.mjs} +1 -1
  110. package/dist/{generate-CrKNH6ms.mjs → generate-iV6OVNin.mjs} +1 -1
  111. package/dist/generate-qMU-2MgC.mjs +2 -0
  112. package/dist/{google-tag-gateway-DDzLPmk5.mjs → google-tag-gateway-DA_7SCC3.mjs} +1 -1
  113. package/dist/gt-DmcMNPX6.mjs +2 -0
  114. package/dist/{healthchecks-Q2uXvt4m.mjs → healthchecks-C-GthoQz.mjs} +1 -1
  115. package/dist/{hostnames-CsaYnis6.mjs → hostnames-CH6utzVv.mjs} +1 -1
  116. package/dist/{hyperdrive-DDr6sAkw.mjs → hyperdrive-_rIC33bB.mjs} +1 -1
  117. package/dist/{iam-CmzocepZ.mjs → iam-sseKl99z.mjs} +1 -1
  118. package/dist/{images-Ux0Phsbi.mjs → images-CvIOwtg0.mjs} +1 -1
  119. package/dist/index.mjs +1 -1
  120. package/dist/{init-Nx4RRgfT.mjs → init-DEIhItNF.mjs} +2 -2
  121. package/dist/{intel-bgS4g7nx.mjs → intel-Da84oZMO.mjs} +1 -1
  122. package/dist/interactive-SgAjen2z.mjs +2 -0
  123. package/dist/{ips-BDiolgWF.mjs → ips-zTTd_3jg.mjs} +1 -1
  124. package/dist/{keyless-certificates-C_TwTMql.mjs → keyless-certificates-BGOUKdJc.mjs} +1 -1
  125. package/dist/{keys-Cr8AqQDY.mjs → keys-CDnrfmiS.mjs} +1 -1
  126. package/dist/kv-C5jR7vjM.mjs +15 -0
  127. package/dist/lazy-command-DZtpMsVB.mjs +2 -0
  128. package/dist/{leaked-credential-checks-De7ph4VA.mjs → leaked-credential-checks-B7WSzVG3.mjs} +1 -1
  129. package/dist/{load-balancers-DXt4ndF4.mjs → load-balancers-DG9wMQUM.mjs} +1 -1
  130. package/dist/{local-OKXweFsd.mjs → local-B3OyWKkW.mjs} +1 -1
  131. package/dist/local-qOpZjDed.mjs +2 -0
  132. package/dist/{local-runtime-tTYpniPS.mjs → local-runtime-Co5vVDlI.mjs} +1 -1
  133. package/dist/{login-BurQ63Ws.mjs → login-k3QLVysD.mjs} +1 -1
  134. package/dist/{login-CmlHvH5k.mjs → login-rJanUgdL.mjs} +1 -1
  135. package/dist/{logo-matches-CQ60P96J.mjs → logo-matches-5nijgkg7.mjs} +1 -1
  136. package/dist/{logos-u7UwT8MH.mjs → logos-BRRqg8_2.mjs} +1 -1
  137. package/dist/{logpush-IoIe8e80.mjs → logpush-Br7H8sRD.mjs} +1 -1
  138. package/dist/{logs-ih5tyXEE.mjs → logs-CBU44LT8.mjs} +1 -1
  139. package/dist/{magic-cloud-networking-CWNFnjcY.mjs → magic-cloud-networking-Bu7O7wKz.mjs} +1 -1
  140. package/dist/{magic-network-monitoring-ClfZleF8.mjs → magic-network-monitoring-Bnc--4Jr.mjs} +1 -1
  141. package/dist/{magic-transit-D69pkEVW.mjs → magic-transit-Dxr86HKN.mjs} +1 -1
  142. package/dist/{managed-defense-BHdmL0vx.mjs → managed-defense-Bm_jKFTN.mjs} +1 -1
  143. package/dist/{managed-transforms-DbCR4LUg.mjs → managed-transforms-D5mvHv_N.mjs} +1 -1
  144. package/dist/{matches-Cou6RVkh.mjs → matches-Dhc1eSWw.mjs} +1 -1
  145. package/dist/{mcp-CQYfM19s.mjs → mcp-B-PBoBl5.mjs} +1 -1
  146. package/dist/{mesh-CXqaAFS4.mjs → mesh-CW8B4naI.mjs} +1 -1
  147. package/dist/migrate-B4kBnkpV.mjs +2 -0
  148. package/dist/{mtls-certificates-DNeId8xS.mjs → mtls-certificates-swvfPqA2.mjs} +1 -1
  149. package/dist/{network-interconnects-BNon8iUs.mjs → network-interconnects-CjXYZC4g.mjs} +1 -1
  150. package/dist/{network-B7V3JbU7.mjs → network-iwRBn0i7.mjs} +1 -1
  151. package/dist/{oauth-DM8q-TYg.mjs → oauth-CrTr-mRe.mjs} +1 -1
  152. package/dist/oauth-DJW_HyaL.mjs +9 -0
  153. package/dist/{oauth-clients-gGmWIWHl.mjs → oauth-clients-DGUJzFFu.mjs} +1 -1
  154. package/dist/{oauth-scopes-DSEu331u.mjs → oauth-scopes-Bl0YUOHt.mjs} +1 -1
  155. package/dist/{observability-_VJhfwM1.mjs → observability-DRHiMrLy.mjs} +1 -1
  156. package/dist/{open-PCXX3ZDZ-DobJT1Mj.mjs → open-PCXX3ZDZ-BKRik1gi.mjs} +3 -3
  157. package/dist/{organization-DW4EpwGl.mjs → organization-BoMJzks7.mjs} +1 -1
  158. package/dist/{organizations-DE1g2wVq.mjs → organizations-UGtCHzSq.mjs} +1 -1
  159. package/dist/{origin-ca-certificates-D3ULDV__.mjs → origin-ca-certificates-CdByaOCe.mjs} +1 -1
  160. package/dist/{origin-post-quantum-encryption-BLropaz7.mjs → origin-post-quantum-encryption-GjmifGkF.mjs} +1 -1
  161. package/dist/{origin-tls-client-auth-C87TG2i_.mjs → origin-tls-client-auth-CCIqSj_C.mjs} +1 -1
  162. package/dist/{output-CZt-berV.mjs → output-CvQFJkvi.mjs} +1 -1
  163. package/dist/{page-rules-tlb9P-7V.mjs → page-rules-Btn-r3QF.mjs} +1 -1
  164. package/dist/pages-iil93G96.mjs +60 -0
  165. package/dist/{pay-per-crawl-C50wI-Iz.mjs → pay-per-crawl-DcAZuk9T.mjs} +1 -1
  166. package/dist/{pay-per-use-DHHIvynU.mjs → pay-per-use-z0Iwy9rN.mjs} +1 -1
  167. package/dist/{pipelines-Y2icOwuf.mjs → pipelines-YRPwntqo.mjs} +1 -1
  168. package/dist/{precursor-DeyurJSC.mjs → precursor-Bcww14RH.mjs} +1 -1
  169. package/dist/previews-BBn-IiQu.mjs +4 -0
  170. package/dist/{progress-C9dWgc3J.mjs → progress-5nsUpQL6.mjs} +1 -1
  171. package/dist/{prompt-Mh69ni1N.mjs → prompt-Ba_bys2F.mjs} +1 -1
  172. package/dist/{queries-DyUJefwL.mjs → queries-lxdncISw.mjs} +1 -1
  173. package/dist/{queues-CdNe4tGY.mjs → queues-Egb0KXYK.mjs} +1 -1
  174. package/dist/r2-BD4NOkR7.mjs +132 -0
  175. package/dist/{r2-data-catalog-D_zDlmVD.mjs → r2-data-catalog-CI-oHtKe.mjs} +1 -1
  176. package/dist/{radar-CSguicKC.mjs → radar-B4dtfeBP.mjs} +1 -1
  177. package/dist/{raw-fetch-1ygCOcT_.mjs → raw-fetch-AX_Gz3c3.mjs} +1 -1
  178. package/dist/{realtime-CvWs5pi3.mjs → realtime-CtLXkW8l.mjs} +1 -1
  179. package/dist/{registrar-DQUxn0FK.mjs → registrar-I9XClUOe.mjs} +1 -1
  180. package/dist/{registrar-sandbox-Q7ZEmg2x.mjs → registrar-sandbox-DAqK58QS.mjs} +1 -1
  181. package/dist/{registry-4Sw95M5_.mjs → registry-DBMUTYqf.mjs} +1 -1
  182. package/dist/{reporting-DJShxeDv.mjs → reporting-BYsEUCIE.mjs} +1 -1
  183. package/dist/{request-headers-DFBBErJg.mjs → request-headers-sc4CaZX0.mjs} +1 -1
  184. package/dist/{request-tracers-DD8HlG61.mjs → request-tracers-DXr9Dr2z.mjs} +1 -1
  185. package/dist/resolve-PZuJ878-.mjs +2 -0
  186. package/dist/{resource-sharing-J46JMWQP.mjs → resource-sharing-DgbnNgCQ.mjs} +1 -1
  187. package/dist/{resource-tagging-DLZJLIqy.mjs → resource-tagging-CjPU8PpX.mjs} +1 -1
  188. package/dist/{rules-D068LfBR.mjs → rules-BrshTdy1.mjs} +1 -1
  189. package/dist/{rulesets-Cz6P7Oje.mjs → rulesets-BZulblVp.mjs} +1 -1
  190. package/dist/{rum-C6GQC2vI.mjs → rum-B4IRlWgy.mjs} +1 -1
  191. package/dist/run-BQGVl3vg.mjs +2 -0
  192. package/dist/run-UHTbUldP.mjs +2 -0
  193. package/dist/{schema-VZPw_2CY.mjs → schema-CueLBLXC.mjs} +1 -1
  194. package/dist/{schema-flags-BmY0Nzp0.mjs → schema-flags-C4KmiKur.mjs} +1 -1
  195. package/dist/{scim-DMTp_Zhc.mjs → scim-BL2TVEZM.mjs} +1 -1
  196. package/dist/{sdk-BuF3fTHr.mjs → sdk-Bx29ZKK3.mjs} +2 -2
  197. package/dist/{secrets-store-C2epk0sQ.mjs → secrets-store-BcyhU7Kj.mjs} +1 -1
  198. package/dist/{security-center-DwMdQ02Y.mjs → security-center-D1LSkhL_.mjs} +1 -1
  199. package/dist/{security-txt-CORQfMul.mjs → security-txt-BGIj4nU3.mjs} +1 -1
  200. package/dist/{session-BEXskZi2.mjs → session-CjQFm10R.mjs} +1 -1
  201. package/dist/shared-jqlTaG5K.mjs +2 -0
  202. package/dist/{smart-shield-BZ0xjy_6.mjs → smart-shield-C8mGSzyE.mjs} +1 -1
  203. package/dist/{snippets-LSkJGDOc.mjs → snippets-BmHMaKEZ.mjs} +1 -1
  204. package/dist/spawn-IM_tQldH.mjs +10 -0
  205. package/dist/{spectrum-zU8_GFTV.mjs → spectrum-CrGKTMx-.mjs} +1 -1
  206. package/dist/{speed-4XbFmeYM.mjs → speed-yyPLwj5X.mjs} +1 -1
  207. package/dist/src-DFnlH5Tg.mjs +109 -0
  208. package/dist/{ssl-DiCsMY_a.mjs → ssl-DZ6G7pP_.mjs} +1 -1
  209. package/dist/startup-profile-B0UCc9_J.mjs +2 -0
  210. package/dist/{startup-profile-6fCkD04r.mjs → startup-profile-DrV846S5.mjs} +3 -3
  211. package/dist/{state-DiHwKWTy.mjs → state-DhHOAdTo.mjs} +1 -1
  212. package/dist/state-Dyo8DcW7.mjs +2 -0
  213. package/dist/{stream-BG3NUAVE.mjs → stream-hoBmKs9X.mjs} +1 -1
  214. package/dist/{submit-CKSaSFS1.mjs → submit-Lfebq3yj.mjs} +1 -1
  215. package/dist/{tags-uT9Mi-bX.mjs → tags-CnHv__u_.mjs} +1 -1
  216. package/dist/telemetry-C3hmM9Q9.mjs +2 -0
  217. package/dist/telemetry-DbAo3nvk.mjs +2 -0
  218. package/dist/{tenant--UrYFHM0.mjs → tenant-7CL844dh.mjs} +1 -1
  219. package/dist/{tenant-custom-nameservers-8Z4TVJtr.mjs → tenant-custom-nameservers-CZL9_D8w.mjs} +1 -1
  220. package/dist/{tools-DNGD0l7I.mjs → tools-BJbI_f35.mjs} +1 -1
  221. package/dist/{tunnels-5lGSXYpl.mjs → tunnels-DuO8F5_h.mjs} +1 -1
  222. package/dist/{turnstile-CT3AkMPV.mjs → turnstile-B-6k-bKa.mjs} +1 -1
  223. package/dist/{ui-D1hhIDIs.mjs → ui-BQxRjahW.mjs} +1 -1
  224. package/dist/update-check-BDMPumcv.mjs +2 -0
  225. package/dist/update-check-g9Jcn6YJ.mjs +2 -0
  226. package/dist/update-check-worker.mjs +1 -1
  227. package/dist/{url-info-DvpNcNl8.mjs → url-info-C6-jj9nl.mjs} +1 -1
  228. package/dist/{url-normalization-C9URZnpq.mjs → url-normalization-BRSTQe20.mjs} +1 -1
  229. package/dist/{url-scanner-CIwK3wB5.mjs → url-scanner-DER5YAdW.mjs} +1 -1
  230. package/dist/{user-DGA7cqdf.mjs → user-foSeF-0m.mjs} +1 -1
  231. package/dist/{values-BzS0b25w.mjs → values-DgBNckq9.mjs} +1 -1
  232. package/dist/{vectorize-DtDjl2fJ.mjs → vectorize-9AZMN3fN.mjs} +1 -1
  233. package/dist/version-DLvRzH-I.mjs +2 -0
  234. package/dist/{waiting-rooms-CjTh4F3B.mjs → waiting-rooms-CUc0Xqp0.mjs} +1 -1
  235. package/dist/{web-assets-4l1B5V9b.mjs → web-assets-D5LUB5UO.mjs} +1 -1
  236. package/dist/{web3-C0Z4AJjC.mjs → web3-BvOpojFR.mjs} +1 -1
  237. package/dist/workers-Cko7OnFE.mjs +40 -0
  238. package/dist/{workers-builds-DYGeoxmX.mjs → workers-builds-BFqiT0GR.mjs} +1 -1
  239. package/dist/{workers-for-platforms-CSw0K8Nl.mjs → workers-for-platforms-EVE01qsM.mjs} +1 -1
  240. package/dist/{workers-vpc-DJ7Couct.mjs → workers-vpc-9xBzFjiF.mjs} +1 -1
  241. package/dist/{workflows-Dm03QT8U.mjs → workflows-BS0EGixd.mjs} +1 -1
  242. package/dist/wrangler-migration-BDkh1_IV.mjs +2 -0
  243. package/dist/{zaraz-DJbWUUe3.mjs → zaraz-DBccJ-ZM.mjs} +1 -1
  244. package/dist/{zero-trust-DiMY-pN5.mjs → zero-trust-DGagti-V.mjs} +431 -281
  245. package/dist/{zone-BWjBv1yy.mjs → zone-B4OniptR.mjs} +1 -1
  246. package/dist/{zones-zGqcQvcY.mjs → zones-DYuGVoTH.mjs} +1 -1
  247. package/package.json +1 -1
  248. package/dist/access-B3TvAe5h.mjs +0 -27
  249. package/dist/ai-gateway-DrQhTvKf.mjs +0 -147
  250. package/dist/build-DG8NfVjJ.mjs +0 -2
  251. package/dist/build-kgS7iKwi.mjs +0 -2
  252. package/dist/cli-Ct980dyx.mjs +0 -3
  253. package/dist/command-B7SzqjQM.mjs +0 -2
  254. package/dist/command-BLHcNQ8m.mjs +0 -2
  255. package/dist/command-BxQbIQWT.mjs +0 -2
  256. package/dist/command-C0SMCHZp.mjs +0 -2
  257. package/dist/command-CE8k5TuK.mjs +0 -2
  258. package/dist/command-CPiCDUth.mjs +0 -2
  259. package/dist/command-DHjsstFb.mjs +0 -2
  260. package/dist/command-MTUsmZU5.mjs +0 -2
  261. package/dist/command-Sb9lOxWT.mjs +0 -2
  262. package/dist/command-sQ8yswii.mjs +0 -2
  263. package/dist/config-DcppJ5D2.mjs +0 -2
  264. package/dist/data-security-BxzLSdGk.mjs +0 -71
  265. package/dist/dev-reqdKM28.mjs +0 -4
  266. package/dist/dry-run-BmzTxDtZ.mjs +0 -2
  267. package/dist/error-sanitization-cyGBhW1Z.mjs +0 -2
  268. package/dist/generate-Djb5Af37.mjs +0 -2
  269. package/dist/interactive-B_dcVghB.mjs +0 -2
  270. package/dist/kv-DmAQCqXl.mjs +0 -21
  271. package/dist/lazy-command-B_bwSa2F.mjs +0 -2
  272. package/dist/local-CFd107fr.mjs +0 -2
  273. package/dist/migrate-CXMbQPyC.mjs +0 -2
  274. package/dist/oauth-CeXh-ACI.mjs +0 -9
  275. package/dist/pages-CjPErYik.mjs +0 -60
  276. package/dist/previews-Dj_LcGRd.mjs +0 -4
  277. package/dist/r2-C0W2J4sT.mjs +0 -127
  278. package/dist/resolve-BVxXAYG7.mjs +0 -2
  279. package/dist/run-C_qUgBTs.mjs +0 -2
  280. package/dist/run-DK1d9BJz.mjs +0 -2
  281. package/dist/shared--lvrXmXY.mjs +0 -2
  282. package/dist/spawn-Da3HnlmB.mjs +0 -10
  283. package/dist/src-BLLpnbzC.mjs +0 -109
  284. package/dist/startup-profile-Cw-_akjQ.mjs +0 -2
  285. package/dist/state-CcktNox9.mjs +0 -2
  286. package/dist/telemetry-C0k8vfbq.mjs +0 -2
  287. package/dist/telemetry-Dh-8kdfY.mjs +0 -5
  288. package/dist/telemetry-IrDBqbQW.mjs +0 -2
  289. package/dist/update-check-BYJnL8J8.mjs +0 -2
  290. package/dist/update-check-DFoSm5GT.mjs +0 -2
  291. package/dist/version-B47pK_PZ.mjs +0 -2
  292. package/dist/workers-CNBv6GxE.mjs +0 -36
  293. package/dist/zt-Bt4Q6iM1.mjs +0 -110
  294. /package/dist/{Page-BchtVjAO.mjs → Page-CjJht2qT.mjs} +0 -0
  295. /package/dist/{alerts-DY_7Nknx.mjs → alerts-DqZgVSCT.mjs} +0 -0
  296. /package/dist/{autorag-K396-M2S.mjs → autorag-Cq9k9Ye6.mjs} +0 -0
  297. /package/dist/{body-parser-BpPZBRMr.mjs → body-parser-hh2avzkz.mjs} +0 -0
  298. /package/dist/{brands-Uy0Cmv1w.mjs → brands-DeLbFxSt.mjs} +0 -0
  299. /package/dist/{browser-extension-D_siSsD9.mjs → browser-extension-C1zmKFDG.mjs} +0 -0
  300. /package/dist/{chunk-U6NEESU5-CAnOLcsu.mjs → chunk-U6NEESU5-BhF4rnpx.mjs} +0 -0
  301. /package/dist/{chunk-WMOON6TZ-D3H84qpM.mjs → chunk-WMOON6TZ-D_ToS88f.mjs} +0 -0
  302. /package/dist/{clear-CpcO2ExU.mjs → clear-CRfI7WS7.mjs} +0 -0
  303. /package/dist/{cli-types-B6tm-8uL.mjs → cli-types-DoVT5q_M.mjs} +0 -0
  304. /package/dist/{connector-telemetry-events-latest-oguk5Zyj.mjs → connector-telemetry-events-latest-D8p_dR8s.mjs} +0 -0
  305. /package/dist/{connector-telemetry-snapshots-latest-B6zuxkr0.mjs → connector-telemetry-snapshots-latest-COFmzmlk.mjs} +0 -0
  306. /package/dist/{delegate-CCGgla7X.mjs → delegate-B6LetRpZ.mjs} +0 -0
  307. /package/dist/{input-validation-D3e278L_.mjs → input-validation-Dk52b0me.mjs} +0 -0
  308. /package/dist/{interactive-D80kbTap.mjs → interactive-C-o16XQs.mjs} +0 -0
  309. /package/dist/{lifecycle-Cyc3fmyN.mjs → lifecycle-C7tAC1Mn.mjs} +0 -0
  310. /package/dist/{project-settings-Bf6rReo1.mjs → project-settings-DO6njFg_.mjs} +0 -0
  311. /package/dist/{resolve-qPFfBMrn.mjs → resolve-BCTrtcx7.mjs} +0 -0
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{r}from"./auth-B5p3SIhO.mjs";import{t as i}from"./output-CZt-berV.mjs";import{t as a}from"./dry-run-BmzTxDtZ.mjs";import{t as o}from"./progress-C9dWgc3J.mjs";import{t as s}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as c,t as l}from"./body-parser-BpPZBRMr.mjs";import{n as u}from"./input-validation-D3e278L_.mjs";import{a as d,i as f,n as p}from"./prompt-Mh69ni1N.mjs";import{t as m}from"./cli-types-B6tm-8uL.mjs";function h(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
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,i as f,n as p}from"./prompt-Ba_bys2F.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
3
3
 
4
4
  Gets the high-availability configuration for a WARP Connector tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <tunnel-id>`,describe:`Get WARP Connector HA configuration`,builder:h,handler:async c=>s({command:`mesh nodes configurations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.configurations.get({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Loaded`})})};function _(e){return e.usage(`$0 mesh nodes configurations update <tunnel-id>
5
5
 
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./theme-BIWQFmZ0.mjs";import"./ui-BQxRjahW.mjs";import{i as t,r as n,t as r}from"./wrangler-migration-BDkh1_IV.mjs";function i(e){return e.positional(`path`,{type:`string`,description:`Path to a Wrangler configuration file`}).option(`bundler`,{choices:[`vite`,`wrangler`],description:`Bundler to use in the migrated project (defaults to vite when @cloudflare/vite-plugin is declared, otherwise wrangler)`}).option(`dry-run`,{type:`boolean`,default:!1,description:`Show the files that would change without writing them`}).option(`force`,{type:`boolean`,default:!1,description:`Run even if the Git worktree is not clean`}).option(`install`,{type:`boolean`,default:!0,description:`Install cf as a project dependency (use --no-install to skip)`})}function a(t){console.log(e.muted(t===`vite`?`Using the Vite bundler because @cloudflare/vite-plugin is declared. Pass --bundler wrangler to override.`:`Using the Wrangler bundler because @cloudflare/vite-plugin is not declared. Pass --bundler vite to override.`))}const o={command:`migrate [path]`,describe:`Migrate a Wrangler project to cf`,builder:i,handler:async e=>{let i=await n(e.path),o=e.bundler??await r(i);e.bundler===void 0&&a(o),await t(i,{bundler:o,dryRun:e[`dry-run`],force:e.force,installDependencies:e.install})}};export{o as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{r}from"./auth-B5p3SIhO.mjs";import{t as i}from"./output-CZt-berV.mjs";import{t as a}from"./dry-run-BmzTxDtZ.mjs";import{t as o}from"./progress-C9dWgc3J.mjs";import{t as s}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as c,t as l}from"./body-parser-BpPZBRMr.mjs";import{n as u}from"./input-validation-D3e278L_.mjs";import{a as d,n as f}from"./prompt-Mh69ni1N.mjs";import{t as p}from"./cli-types-B6tm-8uL.mjs";function m(e){return e.usage(`$0 mtls-certificates associations get <mtls-certificate-id>
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 mtls-certificates associations get <mtls-certificate-id>
3
3
 
4
4
  Lists all active associations between the certificate and Cloudflare services.`).positional(`mtls-certificate-id`,{type:`string`,description:`Certificate identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <mtls-certificate-id>`,describe:`List mTLS certificate associations`,builder:m,handler:async c=>s({command:`mtls-certificates associations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mtls-certificates associations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/mtls_certificates/${c[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(c[`mtls-certificate-id`]))}/associations`,pathParams:{"mtls-certificate-id":String(c[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.mtlsCertificates.associations.get({account_id:l,mtls_certificate_id:c[`mtls-certificate-id`]})),{successLabel:`Loaded`})})},g={command:`associations`,describe:`Operations for associations`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 mtls-certificates create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{r}from"./auth-B5p3SIhO.mjs";import{t as i}from"./output-CZt-berV.mjs";import{t as a}from"./dry-run-BmzTxDtZ.mjs";import{t as o}from"./progress-C9dWgc3J.mjs";import{t as s}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as c,t as l}from"./body-parser-BpPZBRMr.mjs";import{n as u}from"./input-validation-D3e278L_.mjs";import{a as d,n as f}from"./prompt-Mh69ni1N.mjs";function p(e){return e.usage(`$0 network-interconnects cnis create
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";function p(e){return e.usage(`$0 network-interconnects cnis create
3
3
 
4
4
  Creates a new Cloud Network Interconnect (CNI) for private network connectivity between Cloudflare and your infrastructure. CNIs enable dedicated, high-performance network links.`).option(`account`,{type:`string`,description:`Customer account tag`}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Extra set of static prefixes to advertise to the customer's end of the session`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{r}from"./auth-B5p3SIhO.mjs";import{t as i}from"./output-CZt-berV.mjs";import{t as a}from"./dry-run-BmzTxDtZ.mjs";import{t as o}from"./progress-C9dWgc3J.mjs";import{t as s}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as c,t as l}from"./body-parser-BpPZBRMr.mjs";import{n as u}from"./input-validation-D3e278L_.mjs";import{a as d,n as f}from"./prompt-Mh69ni1N.mjs";import{t as p}from"./cli-types-B6tm-8uL.mjs";function m(e){return e.usage(`$0 network routes cidr create
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 network routes cidr create
3
3
 
4
4
  Routes a private network through a Cloudflare Tunnel.`).option(`comment`,{type:`string`,description:`Optional remark describing the route.`,default:``}).option(`network`,{type:`string`,description:`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`}).option(`virtual-network-id`,{type:`string`,description:`UUID of the virtual network.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ee={command:`create`,describe:`Create a tunnel route`,builder:m,handler:async f=>s({command:`network routes cidr create`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf network routes cidr create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/teamnet/routes`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({comment:u(f.comment,`comment`,`text`),network:u(f.network,`network`,`text`),virtual_network_id:u(f[`virtual-network-id`],`virtual-network-id`,`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.network.routes.cidr.create({...e,account_id:p})),{successLabel:`Created`});return}f.network===void 0&&(f.network=await d(`network`,`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`));let m=l({comment:u(f.comment,`comment`,`text`),network:u(f.network,`network`,`text`),virtual_network_id:u(f[`virtual-network-id`],`virtual-network-id`,`text`)});i(await o(`Creating`,async()=>s.network.routes.cidr.create({...m,account_id:p})),{successLabel:`Created`})})};function h(e){return e.usage(`$0 network routes cidr delete <route-id>
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a as e,f as t,n}from"./oauth-CeXh-ACI.mjs";export{n as getActiveAccountId,e as getOrSelectAccountId,t as resolveProfile};
2
+ import{a as e,f as t,n}from"./oauth-DJW_HyaL.mjs";export{n as getActiveAccountId,e as getOrSelectAccountId,t as resolveProfile};
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./cli-exit-Dqoo6Jgb.mjs";import{n as t,t as n}from"./version-DLvRzH-I.mjs";import{t as r}from"./session-CjQFm10R.mjs";import{a as i,n as a,t as o}from"./cf-O3gEaXYZ.mjs";import{n as s}from"./context-BsGrhAqB.mjs";import{M as c,n as l}from"./interactive-C-o16XQs.mjs";import{i as u,o as d}from"./dist-DW47TUGh.mjs";const f={debug:(...e)=>{process.env.DEBUG&&console.error(...e)},info:(...e)=>console.error(...e),log:(...e)=>console.error(...e),warn:(...e)=>console.error(...e),error:(...e)=>console.error(...e)};var p=class extends Error{};async function m(n){if(l())throw new p;r(t);let i=await d({message:n});if(c(i)||typeof i!=`string`)throw new e(130,{cancelled:!0});return i}async function h(n,i){if(l())throw new p;r(t);let a=await u({message:n,options:i.choices.map(({title:e,value:t})=>({label:e,value:t}))});if(c(a)||typeof a!=`string`)throw new e(130,{cancelled:!0});return f.log(`To have cf automatically use this account for future commands in this project, you can update your \`cloudflare.config.ts\`:
3
+
4
+ import { defineConfig } from "cf/config";
5
+
6
+ export default defineConfig({
7
+ accountId: "${a}",
8
+ });
9
+ `),a}const g=o({logger:f,userAgent:n,prompt:m,select:h,isNoDefaultValueProvidedError:e=>e instanceof p});async function _(e,t){return g.getOrSelectAccountId({account_id:e,compliance_region:t?.complianceRegion??await s(t)})}function v(){return g.getActiveAccountId({})}async function y(){return g.fetchAllAccounts({compliance_region:await s()},{throwOnEmpty:!1})}async function b(e){if(e?.scopes&&!i(e.scopes))throw Error(`One or more of the requested scopes are not valid cf OAuth scopes.`);return g.login({compliance_region:await s()},{browser:e?.browser??!0,device:e?.device??!0,...e?.scopes&&{scopes:e.scopes},...e?.profile&&{profile:e.profile}})}function x(e){return g.logout(e)}function S(e){g.setProfile(e)}function C(){return g.getActiveProfile()}function w(){return a({logger:f})}function T(e,t=process.cwd()){let n=w().resolve({profile:e,cwd:t});return S(n),n}function E(){return g.getOAuthTokenFromLocalState()}function D(){return g.readAuthCredentials()?.oauth_token!==void 0}function O(){return g.readAuthCredentials()}function k(){return g.getCredentialStore().path()}export{_ as a,D as c,O as d,T as f,k as i,b as l,v as n,w as o,S as p,C as r,E as s,y as t,x as u};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{r}from"./auth-B5p3SIhO.mjs";import{t as i}from"./output-CZt-berV.mjs";import{t as a}from"./dry-run-BmzTxDtZ.mjs";import{t as o}from"./progress-C9dWgc3J.mjs";import{t as s}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as c,t as l}from"./body-parser-BpPZBRMr.mjs";import{n as u}from"./input-validation-D3e278L_.mjs";import{a as d,i as f,n as p}from"./prompt-Mh69ni1N.mjs";function m(e){return e.usage(`$0 oauth-clients create
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,i as f,n as p}from"./prompt-Ba_bys2F.mjs";function m(e){return e.usage(`$0 oauth-clients create
3
3
 
4
4
  Create a new OAuth client for an account.`).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Create OAuth Client`,builder:m,handler:async p=>s({command:`oauth-clients create`,classification:{safeFlags:[`token-endpoint-auth-method`,`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf oauth-clients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/oauth_clients`,pathParams:{},bodyKind:`json`,body:p.body===void 0?l({allowed_cors_origins:p[`allowed-cors-origins`],client_name:u(p[`client-name`],`client-name`,`text`),client_uri:u(p[`client-uri`],`client-uri`,`text`),grant_types:p[`grant-types`],logo_uri:u(p[`logo-uri`],`logo-uri`,`text`),optional_scopes:p[`optional-scopes`],policy_uri:u(p[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:p[`post-logout-redirect-uris`],redirect_uris:p[`redirect-uris`],response_types:p[`response-types`],scopes:p.scopes,token_endpoint_auth_method:u(p[`token-endpoint-auth-method`],`token-endpoint-auth-method`,`text`),tos_uri:u(p[`tos-uri`],`tos-uri`,`text`)}):c(p.body)});return}let s=await r(p),m=p.local?e:await n();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Creating`,async()=>s.oauthClients.create({...e,account_id:m})),{successLabel:`Created`});return}if(p[`client-name`]===void 0&&(p[`client-name`]=await d(`client-name`,`Human-readable name of the OAuth client.`)),p[`grant-types`]===void 0)throw Error(`--grant-types is required (or pass --body with this field set).`);if(p[`redirect-uris`]===void 0)throw Error(`--redirect-uris is required (or pass --body with this field set).`);if(p[`response-types`]===void 0)throw Error(`--response-types is required (or pass --body with this field set).`);if(p.scopes===void 0)throw Error(`--scopes is required (or pass --body with this field set).`);p[`token-endpoint-auth-method`]===void 0&&(p[`token-endpoint-auth-method`]=await f(`token-endpoint-auth-method`,`The authentication method the client uses at the token endpoint.`,[`none`,`client_secret_basic`,`client_secret_post`]));let h=l({allowed_cors_origins:p[`allowed-cors-origins`],client_name:u(p[`client-name`],`client-name`,`text`),client_uri:u(p[`client-uri`],`client-uri`,`text`),grant_types:p[`grant-types`],logo_uri:u(p[`logo-uri`],`logo-uri`,`text`),optional_scopes:p[`optional-scopes`],policy_uri:u(p[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:p[`post-logout-redirect-uris`],redirect_uris:p[`redirect-uris`],response_types:p[`response-types`],scopes:p.scopes,token_endpoint_auth_method:u(p[`token-endpoint-auth-method`],`token-endpoint-auth-method`,`text`),tos_uri:u(p[`tos-uri`],`tos-uri`,`text`)});i(await o(`Creating`,async()=>s.oauthClients.create({...h,account_id:m})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 oauth-clients delete-rotated-secret <oauth-client-id>
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./auth-B5p3SIhO.mjs";import{t}from"./output-CZt-berV.mjs";import{t as n}from"./dry-run-BmzTxDtZ.mjs";import{t as r}from"./progress-C9dWgc3J.mjs";import{t as i}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";function a(e){return e.usage(`$0 oauth-scopes list
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 oauth-scopes list
3
3
 
4
4
  List all available OAuth scopes. This endpoint requires authentication but has no authorization role requirements.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const o={command:`list`,describe:`List OAuth Scopes`,builder:a,handler:async a=>i({command:`oauth-scopes list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf oauth-scopes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/oauth/scopes`,pathParams:{},bodyKind:`none`});return}let i=await e(a);t(await r(`Loading`,async()=>i.oauthScopes.list()),{successLabel:`Loaded`})})},s={command:`oauth-scopes`,describe:`oauth-scopes`,builder:e=>e.command(o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{s as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,i as n,t as r}from"./context-Dzzbc9RK.mjs";import{r as i}from"./auth-B5p3SIhO.mjs";import{t as a}from"./output-CZt-berV.mjs";import{t as o}from"./dry-run-BmzTxDtZ.mjs";import{t as s}from"./progress-C9dWgc3J.mjs";import{t as c}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as l,r as u,t as d}from"./body-parser-BpPZBRMr.mjs";import{n as f}from"./input-validation-D3e278L_.mjs";import{a as p,i as m,n as h}from"./prompt-Mh69ni1N.mjs";import{t as g}from"./cli-types-B6tm-8uL.mjs";function ee(e){return e.usage(`$0 observability destinations create
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,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,i as m,n as h}from"./prompt-Ba_bys2F.mjs";import{t as g}from"./cli-types-DoVT5q_M.mjs";function ee(e){return e.usage(`$0 observability destinations create
3
3
 
4
4
  Create a new Workers Observability Telemetry Destination.`).option(`configuration-type`,{type:`string`,description:`The configuration.type field`,choices:[`logpush`]}).option(`configuration-url`,{type:`string`,description:`The configuration.url field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`skip-preflight-check`,{type:`boolean`,description:`The skipPreflightCheck field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`create`,describe:`Create Destination`,builder:ee,handler:async n=>c({command:`observability destinations create`,classification:{safeFlags:[`configuration-type`,`enabled`,`skip-preflight-check`,`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf observability destinations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/workers/observability/destinations`,pathParams:{},bodyKind:`json`,body:n.body===void 0?d({configuration:{type:f(n[`configuration-type`],`configuration-type`,`text`),url:f(n[`configuration-url`],`configuration-url`,`text`)},enabled:n.enabled,name:f(n.name,`name`,`text`),skipPreflightCheck:n[`skip-preflight-check`]}):l(n.body)});return}let c=await i(n),u=n.local?e:await r();if(n.accountId=u,n.body){let e=l(n.body);a(await s(`Creating`,async()=>c.observability.destinations.create({...e,account_id:u})),{successLabel:`Created`});return}if(n[`configuration-type`]===void 0&&(n[`configuration-type`]=await m(`configuration-type`,`The configuration.type field`,[`logpush`])),n[`configuration-url`]===void 0&&(n[`configuration-url`]=await p(`configuration-url`,`The configuration.url field`)),n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n.name===void 0&&(n.name=await p(`name`,`The name field`));let h=d({configuration:{type:f(n[`configuration-type`],`configuration-type`,`text`),url:f(n[`configuration-url`],`configuration-url`,`text`)},enabled:n.enabled,name:f(n.name,`name`,`text`),skipPreflightCheck:n[`skip-preflight-check`]});a(await s(`Creating`,async()=>c.observability.destinations.create({...h,account_id:u})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 observability destinations delete <slug>
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./chunk-U6NEESU5-CAnOLcsu.mjs";import{createRequire as t}from"node:module";import n from"node:fs";import r from"node:path";import{fileURLToPath as i}from"node:url";import a from"node:process";import o from"node:os";import{promisify as s}from"node:util";import{Buffer as c}from"node:buffer";import l,{constants as u}from"node:fs/promises";import d,{execFile as f}from"node:child_process";t(import.meta.url||(typeof __filename==`string`?__filename:`/`));var p;function m(){try{return n.statSync(`/.dockerenv`),!0}catch{return!1}}e(m,`hasDockerEnv`);function h(){try{return n.readFileSync(`/proc/self/cgroup`,`utf8`).includes(`docker`)}catch{return!1}}e(h,`hasDockerCGroup`);function g(){return p===void 0&&(p=m()||h()),p}e(g,`isDocker`);var _,ee=e(()=>{try{return n.statSync(`/run/.containerenv`),!0}catch{return!1}},`hasContainerEnv`);function v(){return _===void 0&&(_=ee()||g()),_}e(v,`isInsideContainer`);var y=e(()=>{if(a.platform!==`linux`)return!1;if(o.release().toLowerCase().includes(`microsoft`))return!v();try{return n.readFileSync(`/proc/version`,`utf8`).toLowerCase().includes(`microsoft`)?!v():!1}catch{return!1}},`isWsl`),b=a.env.__IS_WSL_TEST__?y:y(),x=s(d.execFile),S=e(()=>`${a.env.SYSTEMROOT||a.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`,`powerShellPath`),C=e(async(e,t={})=>{let{powerShellPath:n,...r}=t,i=C.encodeCommand(e);return x(n??S(),[...C.argumentsPrefix,i],{encoding:`utf8`,...r})},`executePowerShell`);C.argumentsPrefix=[`-NoProfile`,`-NonInteractive`,`-ExecutionPolicy`,`Bypass`,`-EncodedCommand`],C.encodeCommand=e=>c.from(e,`utf16le`).toString(`base64`),C.escapeArgument=e=>`'${String(e).replaceAll(`'`,`''`)}'`;function w(e){for(let t of e.split(`
3
- `)){if(/^\s*#/.test(t))continue;let e=/^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(t);if(e)return e.groups.mountPoint.trim().replaceAll(/^["']|["']$/g,``)}}e(w,`parseMountPointFromConfig`);var te=s(d.execFile),ne=(()=>{let e=`/mnt/`,t;return async function(){if(t)return t;let n=`/etc/wsl.conf`,r=!1;try{await l.access(n,u.F_OK),r=!0}catch{}if(!r)return e;let i=w(await l.readFile(n,{encoding:`utf8`}));return i===void 0?e:(t=i,t=t.endsWith(`/`)?t:`${t}/`,t)}})(),T=b?e(async()=>`${await ne()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`,`powerShellPathFromWsl`):S,E,D=e(async()=>(E??=(async()=>{try{let e=await T();return await l.access(e,u.X_OK),!0}catch{return!1}})(),E),`canAccessPowerShell`),O=e(async()=>{let e=await T(),{stdout:t}=await C(String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,{powerShellPath:e});return t.trim()},`wslDefaultBrowser`),k=e(async e=>{if(/^[a-z]+:\/\//i.test(e))return e;try{let{stdout:t}=await te(`wslpath`,[`-aw`,e],{encoding:`utf8`});return t.trim()}catch{return e}},`convertWslPathToWindows`);function A(t,n,r){let i=e(e=>Object.defineProperty(t,n,{value:e,enumerable:!0,writable:!0}),`define`);return Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){let e=r();return i(e),e},set(e){i(e)}}),t}e(A,`defineLazyProperty`);var j=s(f);async function M(){if(a.platform!==`darwin`)throw Error(`macOS only`);let{stdout:e}=await j(`defaults`,[`read`,`com.apple.LaunchServices/com.apple.launchservices.secure`,`LSHandlers`]),t=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(e)?.groups.id??`com.apple.Safari`;return t===`com.apple.safari`?`com.apple.Safari`:t}e(M,`defaultBrowserId`);var N=s(f);async function P(e,{humanReadableOutput:t=!0,signal:n}={}){if(a.platform!==`darwin`)throw Error(`macOS only`);let r=t?[]:[`-ss`],i={};n&&(i.signal=n);let{stdout:o}=await N(`osascript`,[`-e`,e,r],i);return o.trim()}e(P,`runAppleScript`);async function F(e){return P(`tell application "Finder" to set app_path to application file id "${e}" as string
4
- tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}e(F,`bundleName`);var I=s(f),L={MSEdgeHTM:{name:`Edge`,id:`com.microsoft.edge`},MSEdgeBHTML:{name:`Edge Beta`,id:`com.microsoft.edge.beta`},MSEdgeDHTML:{name:`Edge Dev`,id:`com.microsoft.edge.dev`},AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:`Edge`,id:`com.microsoft.edge.old`},ChromeHTML:{name:`Chrome`,id:`com.google.chrome`},ChromeBHTML:{name:`Chrome Beta`,id:`com.google.chrome.beta`},ChromeDHTML:{name:`Chrome Dev`,id:`com.google.chrome.dev`},ChromiumHTM:{name:`Chromium`,id:`org.chromium.Chromium`},BraveHTML:{name:`Brave`,id:`com.brave.Browser`},BraveBHTML:{name:`Brave Beta`,id:`com.brave.Browser.beta`},BraveDHTML:{name:`Brave Dev`,id:`com.brave.Browser.dev`},BraveSSHTM:{name:`Brave Nightly`,id:`com.brave.Browser.nightly`},FirefoxURL:{name:`Firefox`,id:`org.mozilla.firefox`},OperaStable:{name:`Opera`,id:`com.operasoftware.Opera`},VivaldiHTM:{name:`Vivaldi`,id:`com.vivaldi.Vivaldi`},"IE.HTTP":{name:`Internet Explorer`,id:`com.microsoft.ie`}},R=new Map(Object.entries(L)),z=class extends Error{static{e(this,`UnknownBrowserError`)}};async function B(e=I){let{stdout:t}=await e(`reg`,[`QUERY`,` HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice`,`/v`,`ProgId`]),n=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(t);if(!n)throw new z(`Cannot find Windows browser in stdout: ${JSON.stringify(t)}`);let{id:r}=n.groups,i=L[r];if(!i)throw new z(`Unknown browser ID: ${r}`);return i}e(B,`defaultBrowser`);var V=s(f),H=e(e=>e.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,e=>e.toUpperCase()),`titleize`);async function U(){if(a.platform===`darwin`){let e=await M();return{name:await F(e),id:e}}if(a.platform===`linux`){let{stdout:e}=await V(`xdg-mime`,[`query`,`default`,`x-scheme-handler/http`]),t=e.trim();return{name:H(t.replace(/.desktop$/,``).replace(`-`,` `)),id:t}}if(a.platform===`win32`)return B();throw Error(`Only macOS, Linux, and Windows are supported`)}e(U,`defaultBrowser`);var re=!!(a.env.SSH_CONNECTION||a.env.SSH_CLIENT||a.env.SSH_TTY),W=Symbol(`fallbackAttempt`),G=import.meta.url?r.dirname(i(import.meta.url)):``,K=r.join(G,`xdg-open`),{platform:q,arch:J}=a,Y=e(async(e,t)=>{if(e.length===0)return;let n=[];for(let r of e)try{return await t(r)}catch(e){n.push(e)}throw AggregateError(n,`Failed to open in all supported apps`)},`tryEachApp`),X=e(async e=>{e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e};let t=e[W]===!0;if(delete e[W],Array.isArray(e.app))return Y(e.app,t=>X({...e,app:t,[W]:!0}));let{name:n,arguments:r=[]}=e.app??{};if(r=[...r],Array.isArray(n))return Y(n,t=>X({...e,app:{name:t,arguments:r},[W]:!0}));if(n===`browser`||n===`browserPrivate`){let t={"com.google.chrome":`chrome`,"google-chrome.desktop":`chrome`,"com.brave.browser":`brave`,"org.mozilla.firefox":`firefox`,"firefox.desktop":`firefox`,"com.microsoft.msedge":`edge`,"com.microsoft.edge":`edge`,"com.microsoft.edgemac":`edge`,"microsoft-edge.desktop":`edge`,"com.apple.safari":`safari`},i={chrome:`--incognito`,brave:`--incognito`,firefox:`--private-window`,edge:`--inPrivate`},a;if(b){let e=await O();a=R.get(e)??{}}else a=await U();if(a.id in t){let o=t[a.id.toLowerCase()];if(n===`browserPrivate`){if(o===`safari`)throw Error(`Safari doesn't support opening in private mode via command line`);r.push(i[o])}return X({...e,app:{name:$[o],arguments:r}})}throw Error(`${a.name} is not supported as a default browser`)}let i,o=[],s={},c=!1;if(b&&!v()&&!re&&!n&&(c=await D()),q===`darwin`)i=`open`,e.wait&&o.push(`--wait-apps`),e.background&&o.push(`--background`),e.newInstance&&o.push(`--new`),n&&o.push(`-a`,n);else if(q===`win32`||c){i=await T(),o.push(...C.argumentsPrefix),b||(s.windowsVerbatimArguments=!0),b&&e.target&&(e.target=await k(e.target));let t=[`$ProgressPreference = 'SilentlyContinue';`,`Start`];e.wait&&t.push(`-Wait`),n?(t.push(C.escapeArgument(n)),e.target&&r.push(e.target)):e.target&&t.push(C.escapeArgument(e.target)),r.length>0&&(r=r.map(e=>C.escapeArgument(e)),t.push(`-ArgumentList`,r.join(`,`))),e.target=C.encodeCommand(t.join(` `)),e.wait||(s.stdio=`ignore`)}else{if(n)i=n;else{let e=!G||G===`/`,t=!1;try{await l.access(K,u.X_OK),t=!0}catch{}i=a.versions.electron??(q===`android`||e||!t)?`xdg-open`:K}r.length>0&&o.push(...r),e.wait||(s.stdio=`ignore`,s.detached=!0)}q===`darwin`&&r.length>0&&o.push(`--args`,...r),e.target&&o.push(e.target);let f=d.spawn(i,o,s);return e.wait?new Promise((t,n)=>{f.once(`error`,n),f.once(`close`,r=>{if(!e.allowNonzeroExitCode&&r!==0){n(Error(`Exited with code ${r}`));return}t(f)})}):t?new Promise((e,t)=>{f.once(`error`,t),f.once(`spawn`,()=>{f.once(`close`,n=>{if(f.off(`error`,t),n!==0){t(Error(`Exited with code ${n}`));return}f.unref(),e(f)})})}):(f.unref(),new Promise((e,t)=>{f.once(`error`,t),f.once(`spawn`,()=>{f.off(`error`,t),e(f)})}))},`baseOpen`),ie=e((e,t)=>{if(typeof e!=`string`)throw TypeError("Expected a `target`");return X({...t,target:e})},`open`);function Z(e){if(typeof e==`string`||Array.isArray(e))return e;let{[J]:t}=e;if(!t)throw Error(`${J} is not supported`);return t}e(Z,`detectArchBinary`);function Q({[q]:e},{wsl:t}={}){if(t&&b)return Z(t);if(!e)throw Error(`${q} is not supported`);return Z(e)}e(Q,`detectPlatformBinary`);var $={browser:`browser`,browserPrivate:`browserPrivate`};A($,`chrome`,()=>Q({darwin:`google chrome`,win32:`chrome`,linux:[`google-chrome`,`google-chrome-stable`,`chromium`,`chromium-browser`]},{wsl:{ia32:`/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe`,x64:[`/mnt/c/Program Files/Google/Chrome/Application/chrome.exe`,`/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe`]}})),A($,`brave`,()=>Q({darwin:`brave browser`,win32:`brave`,linux:[`brave-browser`,`brave`]},{wsl:{ia32:`/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe`,x64:[`/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe`,`/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe`]}})),A($,`firefox`,()=>Q({darwin:`firefox`,win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:`firefox`},{wsl:`/mnt/c/Program Files/Mozilla Firefox/firefox.exe`})),A($,`edge`,()=>Q({darwin:`microsoft edge`,win32:`msedge`,linux:[`microsoft-edge`,`microsoft-edge-dev`]},{wsl:`/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe`})),A($,`safari`,()=>Q({darwin:`Safari`}));var ae=ie;export{ae as default};
2
+ import{r as e}from"./chunk-U6NEESU5-BhF4rnpx.mjs";import{createRequire as t}from"node:module";import n from"node:fs";import r from"node:path";import{fileURLToPath as i}from"node:url";import a from"node:process";import o from"node:os";import s,{constants as c}from"node:fs/promises";import{promisify as l}from"node:util";import{Buffer as u}from"node:buffer";import d,{execFile as f}from"node:child_process";t(import.meta.url||(typeof __filename==`string`?__filename:`/`));var p;function m(){try{return n.statSync(`/.dockerenv`),!0}catch{return!1}}e(m,`hasDockerEnv`);function h(){try{return n.readFileSync(`/proc/self/cgroup`,`utf8`).includes(`docker`)}catch{return!1}}e(h,`hasDockerCGroup`);function g(){return p===void 0&&(p=m()||h()),p}e(g,`isDocker`);var _,ee=e(()=>{try{return n.statSync(`/run/.containerenv`),!0}catch{return!1}},`hasContainerEnv`);function v(){return _===void 0&&(_=ee()||g()),_}e(v,`isInsideContainer`);var y=e(()=>{if(a.platform!==`linux`)return!1;if(o.release().toLowerCase().includes(`microsoft`))return!v();try{return n.readFileSync(`/proc/version`,`utf8`).toLowerCase().includes(`microsoft`)?!v():!1}catch{return!1}},`isWsl`),b=a.env.__IS_WSL_TEST__?y:y(),x=l(d.execFile),S=e(()=>`${a.env.SYSTEMROOT||a.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`,`powerShellPath`),C=e(async(e,t={})=>{let{powerShellPath:n,...r}=t,i=C.encodeCommand(e);return x(n??S(),[...C.argumentsPrefix,i],{encoding:`utf8`,...r})},`executePowerShell`);C.argumentsPrefix=[`-NoProfile`,`-NonInteractive`,`-ExecutionPolicy`,`Bypass`,`-EncodedCommand`],C.encodeCommand=e=>u.from(e,`utf16le`).toString(`base64`),C.escapeArgument=e=>`'${String(e).replaceAll(`'`,`''`)}'`;function w(e){for(let t of e.split(`
3
+ `)){if(/^\s*#/.test(t))continue;let e=/^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(t);if(e)return e.groups.mountPoint.trim().replaceAll(/^["']|["']$/g,``)}}e(w,`parseMountPointFromConfig`);var te=l(d.execFile),ne=(()=>{let e=`/mnt/`,t;return async function(){if(t)return t;let n=`/etc/wsl.conf`,r=!1;try{await s.access(n,c.F_OK),r=!0}catch{}if(!r)return e;let i=w(await s.readFile(n,{encoding:`utf8`}));return i===void 0?e:(t=i,t=t.endsWith(`/`)?t:`${t}/`,t)}})(),T=b?e(async()=>`${await ne()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`,`powerShellPathFromWsl`):S,E,D=e(async()=>(E??=(async()=>{try{let e=await T();return await s.access(e,c.X_OK),!0}catch{return!1}})(),E),`canAccessPowerShell`),O=e(async()=>{let e=await T(),{stdout:t}=await C(String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,{powerShellPath:e});return t.trim()},`wslDefaultBrowser`),k=e(async e=>{if(/^[a-z]+:\/\//i.test(e))return e;try{let{stdout:t}=await te(`wslpath`,[`-aw`,e],{encoding:`utf8`});return t.trim()}catch{return e}},`convertWslPathToWindows`);function A(t,n,r){let i=e(e=>Object.defineProperty(t,n,{value:e,enumerable:!0,writable:!0}),`define`);return Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){let e=r();return i(e),e},set(e){i(e)}}),t}e(A,`defineLazyProperty`);var j=l(f);async function M(){if(a.platform!==`darwin`)throw Error(`macOS only`);let{stdout:e}=await j(`defaults`,[`read`,`com.apple.LaunchServices/com.apple.launchservices.secure`,`LSHandlers`]),t=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(e)?.groups.id??`com.apple.Safari`;return t===`com.apple.safari`?`com.apple.Safari`:t}e(M,`defaultBrowserId`);var N=l(f);async function P(e,{humanReadableOutput:t=!0,signal:n}={}){if(a.platform!==`darwin`)throw Error(`macOS only`);let r=t?[]:[`-ss`],i={};n&&(i.signal=n);let{stdout:o}=await N(`osascript`,[`-e`,e,r],i);return o.trim()}e(P,`runAppleScript`);async function F(e){return P(`tell application "Finder" to set app_path to application file id "${e}" as string
4
+ tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}e(F,`bundleName`);var I=l(f),L={MSEdgeHTM:{name:`Edge`,id:`com.microsoft.edge`},MSEdgeBHTML:{name:`Edge Beta`,id:`com.microsoft.edge.beta`},MSEdgeDHTML:{name:`Edge Dev`,id:`com.microsoft.edge.dev`},AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:`Edge`,id:`com.microsoft.edge.old`},ChromeHTML:{name:`Chrome`,id:`com.google.chrome`},ChromeBHTML:{name:`Chrome Beta`,id:`com.google.chrome.beta`},ChromeDHTML:{name:`Chrome Dev`,id:`com.google.chrome.dev`},ChromiumHTM:{name:`Chromium`,id:`org.chromium.Chromium`},BraveHTML:{name:`Brave`,id:`com.brave.Browser`},BraveBHTML:{name:`Brave Beta`,id:`com.brave.Browser.beta`},BraveDHTML:{name:`Brave Dev`,id:`com.brave.Browser.dev`},BraveSSHTM:{name:`Brave Nightly`,id:`com.brave.Browser.nightly`},FirefoxURL:{name:`Firefox`,id:`org.mozilla.firefox`},OperaStable:{name:`Opera`,id:`com.operasoftware.Opera`},VivaldiHTM:{name:`Vivaldi`,id:`com.vivaldi.Vivaldi`},"IE.HTTP":{name:`Internet Explorer`,id:`com.microsoft.ie`}},R=new Map(Object.entries(L)),z=class extends Error{static{e(this,`UnknownBrowserError`)}};async function B(e=I){let{stdout:t}=await e(`reg`,[`QUERY`,` HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice`,`/v`,`ProgId`]),n=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(t);if(!n)throw new z(`Cannot find Windows browser in stdout: ${JSON.stringify(t)}`);let{id:r}=n.groups,i=L[r];if(!i)throw new z(`Unknown browser ID: ${r}`);return i}e(B,`defaultBrowser`);var V=l(f),H=e(e=>e.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,e=>e.toUpperCase()),`titleize`);async function U(){if(a.platform===`darwin`){let e=await M();return{name:await F(e),id:e}}if(a.platform===`linux`){let{stdout:e}=await V(`xdg-mime`,[`query`,`default`,`x-scheme-handler/http`]),t=e.trim();return{name:H(t.replace(/.desktop$/,``).replace(`-`,` `)),id:t}}if(a.platform===`win32`)return B();throw Error(`Only macOS, Linux, and Windows are supported`)}e(U,`defaultBrowser`);var re=!!(a.env.SSH_CONNECTION||a.env.SSH_CLIENT||a.env.SSH_TTY),W=Symbol(`fallbackAttempt`),G=import.meta.url?r.dirname(i(import.meta.url)):``,K=r.join(G,`xdg-open`),{platform:q,arch:J}=a,Y=e(async(e,t)=>{if(e.length===0)return;let n=[];for(let r of e)try{return await t(r)}catch(e){n.push(e)}throw AggregateError(n,`Failed to open in all supported apps`)},`tryEachApp`),X=e(async e=>{e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e};let t=e[W]===!0;if(delete e[W],Array.isArray(e.app))return Y(e.app,t=>X({...e,app:t,[W]:!0}));let{name:n,arguments:r=[]}=e.app??{};if(r=[...r],Array.isArray(n))return Y(n,t=>X({...e,app:{name:t,arguments:r},[W]:!0}));if(n===`browser`||n===`browserPrivate`){let t={"com.google.chrome":`chrome`,"google-chrome.desktop":`chrome`,"com.brave.browser":`brave`,"org.mozilla.firefox":`firefox`,"firefox.desktop":`firefox`,"com.microsoft.msedge":`edge`,"com.microsoft.edge":`edge`,"com.microsoft.edgemac":`edge`,"microsoft-edge.desktop":`edge`,"com.apple.safari":`safari`},i={chrome:`--incognito`,brave:`--incognito`,firefox:`--private-window`,edge:`--inPrivate`},a;if(b){let e=await O();a=R.get(e)??{}}else a=await U();if(a.id in t){let o=t[a.id.toLowerCase()];if(n===`browserPrivate`){if(o===`safari`)throw Error(`Safari doesn't support opening in private mode via command line`);r.push(i[o])}return X({...e,app:{name:$[o],arguments:r}})}throw Error(`${a.name} is not supported as a default browser`)}let i,o=[],l={},u=!1;if(b&&!v()&&!re&&!n&&(u=await D()),q===`darwin`)i=`open`,e.wait&&o.push(`--wait-apps`),e.background&&o.push(`--background`),e.newInstance&&o.push(`--new`),n&&o.push(`-a`,n);else if(q===`win32`||u){i=await T(),o.push(...C.argumentsPrefix),b||(l.windowsVerbatimArguments=!0),b&&e.target&&(e.target=await k(e.target));let t=[`$ProgressPreference = 'SilentlyContinue';`,`Start`];e.wait&&t.push(`-Wait`),n?(t.push(C.escapeArgument(n)),e.target&&r.push(e.target)):e.target&&t.push(C.escapeArgument(e.target)),r.length>0&&(r=r.map(e=>C.escapeArgument(e)),t.push(`-ArgumentList`,r.join(`,`))),e.target=C.encodeCommand(t.join(` `)),e.wait||(l.stdio=`ignore`)}else{if(n)i=n;else{let e=!G||G===`/`,t=!1;try{await s.access(K,c.X_OK),t=!0}catch{}i=a.versions.electron??(q===`android`||e||!t)?`xdg-open`:K}r.length>0&&o.push(...r),e.wait||(l.stdio=`ignore`,l.detached=!0)}q===`darwin`&&r.length>0&&o.push(`--args`,...r),e.target&&o.push(e.target);let f=d.spawn(i,o,l);return e.wait?new Promise((t,n)=>{f.once(`error`,n),f.once(`close`,r=>{if(!e.allowNonzeroExitCode&&r!==0){n(Error(`Exited with code ${r}`));return}t(f)})}):t?new Promise((e,t)=>{f.once(`error`,t),f.once(`spawn`,()=>{f.once(`close`,n=>{if(f.off(`error`,t),n!==0){t(Error(`Exited with code ${n}`));return}f.unref(),e(f)})})}):(f.unref(),new Promise((e,t)=>{f.once(`error`,t),f.once(`spawn`,()=>{f.off(`error`,t),e(f)})}))},`baseOpen`),ie=e((e,t)=>{if(typeof e!=`string`)throw TypeError("Expected a `target`");return X({...t,target:e})},`open`);function Z(e){if(typeof e==`string`||Array.isArray(e))return e;let{[J]:t}=e;if(!t)throw Error(`${J} is not supported`);return t}e(Z,`detectArchBinary`);function Q({[q]:e},{wsl:t}={}){if(t&&b)return Z(t);if(!e)throw Error(`${q} is not supported`);return Z(e)}e(Q,`detectPlatformBinary`);var $={browser:`browser`,browserPrivate:`browserPrivate`};A($,`chrome`,()=>Q({darwin:`google chrome`,win32:`chrome`,linux:[`google-chrome`,`google-chrome-stable`,`chromium`,`chromium-browser`]},{wsl:{ia32:`/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe`,x64:[`/mnt/c/Program Files/Google/Chrome/Application/chrome.exe`,`/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe`]}})),A($,`brave`,()=>Q({darwin:`brave browser`,win32:`brave`,linux:[`brave-browser`,`brave`]},{wsl:{ia32:`/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe`,x64:[`/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe`,`/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe`]}})),A($,`firefox`,()=>Q({darwin:`firefox`,win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:`firefox`},{wsl:`/mnt/c/Program Files/Mozilla Firefox/firefox.exe`})),A($,`edge`,()=>Q({darwin:`microsoft edge`,win32:`msedge`,linux:[`microsoft-edge`,`microsoft-edge-dev`]},{wsl:`/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe`})),A($,`safari`,()=>Q({darwin:`Safari`}));var ae=ie;export{ae as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./auth-B5p3SIhO.mjs";import{t}from"./output-CZt-berV.mjs";import{t as n}from"./dry-run-BmzTxDtZ.mjs";import{t as r}from"./progress-C9dWgc3J.mjs";import{t as i}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as a,r as o,t as s}from"./body-parser-BpPZBRMr.mjs";import{n as c}from"./input-validation-D3e278L_.mjs";import{a as l,i as u,n as d}from"./prompt-Mh69ni1N.mjs";import{t as f}from"./cli-types-B6tm-8uL.mjs";function p(e){return e.usage(`$0 organization account list
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";import{n as a,r as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{a as l,i as u,n as d}from"./prompt-Ba_bys2F.mjs";import{t as f}from"./cli-types-DoVT5q_M.mjs";function p(e){return e.usage(`$0 organization account list
3
3
 
4
4
  Retrieve a list of accounts that belong to a specific organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`).option(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve a list of accounts for.`,demandOption:!0}).option(`account-pubname`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname is equal to
5
5
  a particular string.`}).option(`account-pubname-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname starts with
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./auth-B5p3SIhO.mjs";import{t}from"./output-CZt-berV.mjs";import{t as n}from"./dry-run-BmzTxDtZ.mjs";import{t as r}from"./progress-C9dWgc3J.mjs";import{t as i}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{t as a}from"./cli-types-B6tm-8uL.mjs";function o(e){return e.usage("$0 organizations billing usage get <organization-id>\n\nReturns cost and usage data for all accounts within an organization, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. The response includes usage for every account belonging to the specified organization. **Note:** Cost and pricing fields are not yet populated and will be absent from responses until billing integration is complete. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days. An organization with no accounts, or an organization ID that does not exist, returns a successful response with an empty result set rather than an error.").positional(`organization-id`,{type:`string`,description:`Identifies the Cloudflare organization.`,demandOption:!0}).option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get <organization-id>`,describe:`Get Organization Usage (Version 2, Alpha, Restricted)`,builder:o,handler:async a=>i({command:`organizations billing usage get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={from:a.from,to:a.to};if(a.dryRun){n({command:`cf organizations billing usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/billable/usage`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organizations.billing.usage.get({organization_id:a[`organization-id`],...i})),{successLabel:`Loaded`})})},c={command:`usage`,describe:`Operations for billing.usage`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},l={command:`billing`,describe:`Operations for billing`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function u(e){return e.usage(`$0 organizations logs audit get <organization-id>
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";import{t as a}from"./cli-types-DoVT5q_M.mjs";function o(e){return e.usage("$0 organizations billing usage get <organization-id>\n\nReturns cost and usage data for all accounts within an organization, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. The response includes usage for every account belonging to the specified organization. **Note:** Cost and pricing fields are not yet populated and will be absent from responses until billing integration is complete. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days. An organization with no accounts, or an organization ID that does not exist, returns a successful response with an empty result set rather than an error.").positional(`organization-id`,{type:`string`,description:`Identifies the Cloudflare organization.`,demandOption:!0}).option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get <organization-id>`,describe:`Get Organization Usage (Version 2, Alpha, Restricted)`,builder:o,handler:async a=>i({command:`organizations billing usage get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={from:a.from,to:a.to};if(a.dryRun){n({command:`cf organizations billing usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/billable/usage`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organizations.billing.usage.get({organization_id:a[`organization-id`],...i})),{successLabel:`Loaded`})})},c={command:`usage`,describe:`Operations for billing.usage`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},l={command:`billing`,describe:`Operations for billing`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function u(e){return e.usage(`$0 organizations logs audit get <organization-id>
3
3
 
4
4
  Gets a list of audit logs for an organization.`).positional(`organization-id`,{type:`string`,description:`The unique id that identifies the organization.`,demandOption:!0}).option(`action-result`,{type:`string`,description:`Filters by whether the action was successful or not.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-context`,{type:`string`,description:"Filters by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email`,{type:`string`,description:`Filters by the actor's email address.`}).option(`actor-id`,{type:`string`,description:`Filters by the actor's user ID.`}).option(`actor-ip-address`,{type:`string`,description:`The IP address where the action was initiated.`}).option(`actor-token-id`,{type:`string`,description:`Filters by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name`,{type:`string`,description:`Filters by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type`,{type:`string`,description:`Filters by the actor type.`}).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`raw-cf-ray-id`,{type:`string`,description:`Filters by the response CF Ray ID.`}).option(`raw-method`,{type:`string`,description:`The HTTP method for the API call.`}).option(`raw-status-code`,{type:`string`,description:`The response status code that was returned.`}).option(`raw-uri`,{type:`string`,description:`Filters by the request URI.`}).option(`resource-id`,{type:`string`,description:`Filters by the resource ID.`}).option(`resource-product`,{type:`string`,description:`Filters audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type`,{type:`string`,description:`Filters audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope`,{type:`string`,description:`Filters by the resource scope, specifying whether the resource is associated with an organization.`}).option(`action-result-not`,{type:`string`,description:`Filters out audit logs by whether the action was successful or not.`}).option(`action-type-not`,{type:`string`,description:`Filters out audit logs by the action type.`}).option(`actor-context-not`,{type:`string`,description:"Filters out audit logs by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email-not`,{type:`string`,description:`Filters out audit logs by the actor's email address.`}).option(`actor-id-not`,{type:`string`,description:`Filters out audit logs by the actor's user ID.`}).option(`actor-ip-address-not`,{type:`string`,description:`Filters out audit logs IP address where the action was initiated.`}).option(`actor-token-id-not`,{type:`string`,description:`Filters out audit logs by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name-not`,{type:`string`,description:`Filters out audit logs by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type-not`,{type:`string`,description:`Filters out audit logs by the actor type.`}).option(`id-not`,{type:`string`,description:`Filters out audit logs by their IDs.`}).option(`raw-cf-ray-id-not`,{type:`string`,description:`Filters out audit logs by the response CF Ray ID.`}).option(`raw-method-not`,{type:`string`,description:`Filters out audit logs by the HTTP method for the API call.`}).option(`raw-status-code-not`,{type:`string`,description:`Filters out audit logs by the response status code that was returned.`}).option(`raw-uri-not`,{type:`string`,description:`Filters out audit logs by the request URI.`}).option(`resource-id-not`,{type:`string`,description:`Filters out audit logs by the resource ID.`}).option(`resource-product-not`,{type:`string`,description:`Filters out audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type-not`,{type:`string`,description:`Filters out audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope-not`,{type:`string`,description:`Filters out audit logs by the resource scope, specifying whether the resource is associated with an organization.`}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get <organization-id>`,describe:`Get organization audit logs (Version 2)`,builder:a(u),handler:async a=>i({command:`organizations logs audit get`,classification:{safeFlags:[`direction`,`dry-run`]}},a,async()=>{let i={action_result:a[`action-result`],action_type:a[`action-type`],actor_context:a[`actor-context`],actor_email:a[`actor-email`],actor_id:a[`actor-id`],actor_ip_address:a[`actor-ip-address`],actor_token_id:a[`actor-token-id`],actor_token_name:a[`actor-token-name`],actor_type:a[`actor-type`],id:a.id,raw_cf_ray_id:a[`raw-cf-ray-id`],raw_method:a[`raw-method`],raw_status_code:a[`raw-status-code`],raw_uri:a[`raw-uri`],resource_id:a[`resource-id`],resource_product:a[`resource-product`],resource_type:a[`resource-type`],resource_scope:a[`resource-scope`],"action_result.not":a[`action-result-not`],"action_type.not":a[`action-type-not`],"actor_context.not":a[`actor-context-not`],"actor_email.not":a[`actor-email-not`],"actor_id.not":a[`actor-id-not`],"actor_ip_address.not":a[`actor-ip-address-not`],"actor_token_id.not":a[`actor-token-id-not`],"actor_token_name.not":a[`actor-token-name-not`],"actor_type.not":a[`actor-type-not`],"id.not":a[`id-not`],"raw_cf_ray_id.not":a[`raw-cf-ray-id-not`],"raw_method.not":a[`raw-method-not`],"raw_status_code.not":a[`raw-status-code-not`],"raw_uri.not":a[`raw-uri-not`],"resource_id.not":a[`resource-id-not`],"resource_product.not":a[`resource-product-not`],"resource_type.not":a[`resource-type-not`],"resource_scope.not":a[`resource-scope-not`],since:a.since,before:a.before,direction:a.direction,limit:a.limit,cursor:a.cursor};if(a.dryRun){n({command:`cf organizations logs audit get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/logs/audit`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organizations.logs.audit.get({organization_id:a[`organization-id`],...i})),{successLabel:`Loaded`})})};function f(e){return e.usage("$0 organizations logs audit history <id>\n\nReturns the chronological change history for the resource identified by the given organization-scoped audit log entry. The endpoint first locates the source audit log entry by `id` (using `action_time` to narrow the lookup window), derives identifying filters from that entry, and then returns matching audit logs within the `since`/`before` window. The `result_info.history_status` field indicates the quality of the resource identification used: - `exact`: Resource was identified by the resource URI. - `approximate`: Resource was identified without the resource URI. - `unavailable`: The source audit log entry did not contain enough information to identify the resource; an empty result is returned.").positional(`id`,{type:`string`,description:`The ID of the audit log to fetch resource history for.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`The unique ID that identifies the organization.`,demandOption:!0}).option(`action-time`,{type:`string`,description:"RFC3339 timestamp of the source audit log entry's action time. Used to narrow the source-entry lookup window. Provide the `action.time` value from the audit log identified by `id`.",demandOption:!0}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`history <id>`,describe:`Get resource change history from an organization audit log entry (Version 2)`,builder:a(f),handler:async a=>i({command:`organizations logs audit history`,classification:{safeFlags:[`direction`,`dry-run`]}},a,async()=>{let i={action_time:a[`action-time`],since:a.since,before:a.before,direction:a.direction,limit:a.limit,cursor:a.cursor};if(a.dryRun){n({command:`cf organizations logs audit history`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/logs/audit/${a.id==null?`<id>`:encodeURIComponent(String(a.id))}/history`,pathParams:{"organization-id":String(a[`organization-id`]??``),id:String(a.id??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organizations.logs.audit.history({organization_id:a[`organization-id`],id:a.id,...i})),{successLabel:`Loaded`})})},m={command:`audit`,describe:`Operations for logs.audit`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},h={command:`logs`,describe:`Operations for logs`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},g={command:`organizations`,describe:`Multi-user organizations that group accounts, members, and shared settings under a single entity`,builder:e=>e.command(l).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./auth-B5p3SIhO.mjs";import{t}from"./output-CZt-berV.mjs";import{t as n}from"./dry-run-BmzTxDtZ.mjs";import{t as r}from"./progress-C9dWgc3J.mjs";import{t as i}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as a,t as o}from"./body-parser-BpPZBRMr.mjs";import{n as s}from"./input-validation-D3e278L_.mjs";import{a as c,i as l,n as u}from"./prompt-Mh69ni1N.mjs";import{t as d}from"./cli-types-B6tm-8uL.mjs";function f(e){return e.usage(`$0 origin-ca-certificates create
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";import{n as a,t as o}from"./body-parser-hh2avzkz.mjs";import{n as s}from"./input-validation-Dk52b0me.mjs";import{a as c,i as l,n as u}from"./prompt-Ba_bys2F.mjs";import{t as d}from"./cli-types-DoVT5q_M.mjs";function f(e){return e.usage(`$0 origin-ca-certificates create
3
3
 
4
4
  Create an Origin CA certificate. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`).option(`csr`,{type:`string`,description:`The Certificate Signing Request (CSR). Must be newline-encoded.`}).option(`hostnames`,{type:`string`,array:!0,description:"Array of hostnames or wildcard names bound to the certificate.\nHostnames must be fully qualified domain names (FQDNs) belonging to zones on your account (e.g., `example.com` or `sub.example.com`). Wildcards are supported only as a `*.` prefix for a single level (e.g., `*.example.com`). Double wildcards (`*.*.example.com`) and interior wildcards (`foo.*.example.com`) are not allowed. The wildcard suffix must be a multi-label domain (`*.example.com` is valid, but `*.com` is not). Unicode/IDN hostnames are accepted and automatically converted to punycode."}).option(`request-type`,{type:`string`,description:`Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).`,choices:[`origin-rsa`,`origin-ecc`,`keyless-certificate`]}).option(`requested-validity`,{type:`number`,description:`The number of days for which the certificate should be valid.`,default:5475}).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:`create`,describe:`Create Certificate`,builder:f,handler:async u=>i({command:`origin-ca-certificates create`,classification:{safeFlags:[`request-type`,`dry-run`]}},u,async()=>{if(u.dryRun){n({command:`cf origin-ca-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/certificates`,pathParams:{},bodyKind:`json`,body:u.body===void 0?o({csr:s(u.csr,`csr`,`text`),hostnames:u.hostnames,request_type:s(u[`request-type`],`request-type`,`text`),requested_validity:u[`requested-validity`]}):a(u.body)});return}let i=await e(u);if(u.body){let e=a(u.body);t(await r(`Creating`,async()=>i.originCaCertificates.create({...e})),{successLabel:`Created`});return}if(u.csr===void 0&&(u.csr=await c(`csr`,`The Certificate Signing Request (CSR). Must be newline-encoded.`)),u.hostnames===void 0)throw Error(`--hostnames is required (or pass --body with this field set).`);u[`request-type`]===void 0&&(u[`request-type`]=await l(`request-type`,`Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).`,[`origin-rsa`,`origin-ecc`,`keyless-certificate`]));let d=o({csr:s(u.csr,`csr`,`text`),hostnames:u.hostnames,request_type:s(u[`request-type`],`request-type`,`text`),requested_validity:u[`requested-validity`]});t(await r(`Creating`,async()=>i.originCaCertificates.create({...d})),{successLabel:`Created`})})};function m(e){return e.usage(`$0 origin-ca-certificates delete <certificate-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-Dzzbc9RK.mjs";import{r as t}from"./auth-B5p3SIhO.mjs";import{t as n}from"./output-CZt-berV.mjs";import{t as r}from"./dry-run-BmzTxDtZ.mjs";import{t as i}from"./progress-C9dWgc3J.mjs";import{t as a}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as o,t as s}from"./body-parser-BpPZBRMr.mjs";import{n as c}from"./input-validation-D3e278L_.mjs";import{i as l}from"./prompt-Mh69ni1N.mjs";function u(e){return e.usage(`$0 origin-post-quantum-encryption get
2
+ import{i as e}from"./context-BsGrhAqB.mjs";import{r as t}from"./auth-BYFcxn1F.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-5nsUpQL6.mjs";import{t as a}from"./run-UHTbUldP.mjs";import"./telemetry-C3hmM9Q9.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{i as l}from"./prompt-Ba_bys2F.mjs";function u(e){return e.usage(`$0 origin-post-quantum-encryption get
3
3
 
4
4
  Instructs Cloudflare to use Post-Quantum (PQ) key agreement algorithms when connecting to your origin. Preferred instructs Cloudflare to opportunistically send a Post-Quantum keyshare in the first message to the origin (for fastest connections when the origin supports and prefers PQ), supported means that PQ algorithms are advertised but only used when requested by the origin, and off means that PQ algorithms are not advertised.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get Origin Post-Quantum Encryption setting`,builder:u,handler:async o=>a({command:`origin-post-quantum-encryption get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-post-quantum-encryption get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/cache/origin_post_quantum_encryption`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.originPostQuantumEncryption.get({zone_id:s})),{successLabel:`Loaded`})})};function f(e){return e.usage(`$0 origin-post-quantum-encryption update
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-Dzzbc9RK.mjs";import{r as t}from"./auth-B5p3SIhO.mjs";import{t as n}from"./output-CZt-berV.mjs";import{t as r}from"./dry-run-BmzTxDtZ.mjs";import{t as i}from"./progress-C9dWgc3J.mjs";import{t as a}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as o,r as s,t as c}from"./body-parser-BpPZBRMr.mjs";import{n as l}from"./input-validation-D3e278L_.mjs";import{a as u,n as d}from"./prompt-Mh69ni1N.mjs";import{t as f}from"./cli-types-B6tm-8uL.mjs";function p(e){return e.usage(`$0 origin-tls-client-auth hostname-associations list
2
+ import{i as e}from"./context-BsGrhAqB.mjs";import{r as t}from"./auth-BYFcxn1F.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-5nsUpQL6.mjs";import{t as a}from"./run-UHTbUldP.mjs";import"./telemetry-C3hmM9Q9.mjs";import{n as o,r as s,t as c}from"./body-parser-hh2avzkz.mjs";import{n as l}from"./input-validation-Dk52b0me.mjs";import{a as u,n as d}from"./prompt-Ba_bys2F.mjs";import{t as f}from"./cli-types-DoVT5q_M.mjs";function p(e){return e.usage(`$0 origin-tls-client-auth hostname-associations list
3
3
 
4
4
  List certificate ID - hostname associations for the given zone. Shows which hostnames are associated to which certificates for authenticated origin pulls.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of associations per page.`}).option(`status`,{type:`string`,description:`Filter associations by status. Use comma-separated values to filter by multiple statuses, or "all" to include every status. Defaults to "active" if not provided.`,choices:[`active`,`pending_deployment`,`pending_deletion`,`deleted`,`deployment_timed_out`,`deletion_timed_out`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`list`,describe:`List Hostname Associations`,builder:f(p),handler:async o=>a({command:`origin-tls-client-auth hostname-associations list`,classification:{safeFlags:[`status`,`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`],status:o.status};if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-associations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.originTlsClientAuth.hostnameAssociations.list({zone_id:c,...a})),{successLabel:`Loaded`})})},h={command:`hostname-associations`,describe:`Operations for hostname-associations`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates create
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e,t}from"./theme-BIWQFmZ0.mjs";import{t as n}from"./Page-BchtVjAO.mjs";function r(e){return e instanceof n?e.data:typeof e==`object`&&e&&`result`in e&&Array.isArray(e.result)&&`result_info`in e?e.result:e}function i(t,n={}){if(!n.quiet){if(t=r(t),t==null){n.successLabel&&process.stderr.isTTY&&process.stderr.write(`${e.success(`✓`)} ${n.successLabel}\n`);return}console.log(a(t))}}function a(n){let r=JSON.stringify(n,null,2);return!t()||r.length>5e4?r:r.replace(/"([^"]+)":/g,(t,n)=>`${e.jsonKey(`"${n}"`)}:`).replace(/: "([^"]*)"/g,(t,n)=>`: ${e.jsonString(`"${n}"`)}`).replace(/: (-?\d+\.?\d*)/g,(t,n)=>`: ${e.jsonNumber(n)}`).replace(/: (true|false)/g,(t,n)=>`: ${e.jsonBoolean(n)}`).replace(/: (null)/g,(t,n)=>`: ${e.muted(n)}`)}export{i as t};
2
+ import{r as e,t}from"./theme-BIWQFmZ0.mjs";import{t as n}from"./Page-CjJht2qT.mjs";function r(e){return e instanceof n?e.data:typeof e==`object`&&e&&`result`in e&&Array.isArray(e.result)&&`result_info`in e?e.result:e}function i(t,n={}){if(!n.quiet){if(t=r(t),t==null){n.successLabel&&process.stderr.isTTY&&process.stderr.write(`${e.success(`✓`)} ${n.successLabel}\n`);return}console.log(a(t))}}function a(n){let r=JSON.stringify(n,null,2);return!t()||r.length>5e4?r:r.replace(/"([^"]+)":/g,(t,n)=>`${e.jsonKey(`"${n}"`)}:`).replace(/: "([^"]*)"/g,(t,n)=>`: ${e.jsonString(`"${n}"`)}`).replace(/: (-?\d+\.?\d*)/g,(t,n)=>`: ${e.jsonNumber(n)}`).replace(/: (true|false)/g,(t,n)=>`: ${e.jsonBoolean(n)}`).replace(/: (null)/g,(t,n)=>`: ${e.muted(n)}`)}export{i as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-Dzzbc9RK.mjs";import{r as t}from"./auth-B5p3SIhO.mjs";import{t as n}from"./output-CZt-berV.mjs";import{t as r}from"./dry-run-BmzTxDtZ.mjs";import{t as i}from"./progress-C9dWgc3J.mjs";import{t as a}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as o,r as s,t as c}from"./body-parser-BpPZBRMr.mjs";import{n as l}from"./input-validation-D3e278L_.mjs";import{n as u}from"./prompt-Mh69ni1N.mjs";import{t as d}from"./cli-types-B6tm-8uL.mjs";function f(e){return e.usage(`$0 page-rules create
2
+ import{i as e}from"./context-BsGrhAqB.mjs";import{r as t}from"./auth-BYFcxn1F.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-5nsUpQL6.mjs";import{t as a}from"./run-UHTbUldP.mjs";import"./telemetry-C3hmM9Q9.mjs";import{n as o,r as s,t as c}from"./body-parser-hh2avzkz.mjs";import{n as l}from"./input-validation-Dk52b0me.mjs";import{n as u}from"./prompt-Ba_bys2F.mjs";import{t as d}from"./cli-types-DoVT5q_M.mjs";function f(e){return e.usage(`$0 page-rules create
3
3
 
4
4
  Creates a new Page Rule.`).option(`actions`,{type:`string`,description:`The set of actions to perform if the targets of this rule match the
5
5
  request. Actions can redirect to another URL or override settings, but
@@ -0,0 +1,60 @@
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,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,i as n,t as r}from"./context-Dzzbc9RK.mjs";import{r as i}from"./auth-B5p3SIhO.mjs";import{t as a}from"./output-CZt-berV.mjs";import{t as o}from"./dry-run-BmzTxDtZ.mjs";import{t as s}from"./progress-C9dWgc3J.mjs";import{t as c}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as l,r as u,t as d}from"./body-parser-BpPZBRMr.mjs";import{n as f}from"./input-validation-D3e278L_.mjs";import{a as p,i as m,n as h}from"./prompt-Mh69ni1N.mjs";import{t as ee}from"./cli-types-B6tm-8uL.mjs";function te(e){return e.usage(`$0 pay-per-crawl config create
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,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,i as m,n as h}from"./prompt-Ba_bys2F.mjs";import{t as ee}from"./cli-types-DoVT5q_M.mjs";function te(e){return e.usage(`$0 pay-per-crawl config create
3
3
 
4
4
  Creates the pay-per-crawl config for a zone.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents 1 USD = 100,000,000 microcents. Must be 0 or a multiple of 100,000 $0.001. Range: $0.001–$9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for fully replacing a pay-per-crawl zone configuration`})}const g={command:`create`,describe:`Creates pay-per-crawl config for a zone`,builder:te,handler:async e=>c({command:`pay-per-crawl config create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}):l(e.body)});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=l(e.body);a(await s(`Creating`,async()=>t.payPerCrawl.config.create({...n,zone_id:r})),{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let c=d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]});a(await s(`Creating`,async()=>t.payPerCrawl.config.create({...c,zone_id:r})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 pay-per-crawl config edit
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{a as r,r as i}from"./auth-B5p3SIhO.mjs";import{t as a}from"./output-CZt-berV.mjs";import{t as o}from"./dry-run-BmzTxDtZ.mjs";import{t as s}from"./progress-C9dWgc3J.mjs";import{t as c}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as l,t as u}from"./input-validation-D3e278L_.mjs";function d(e){return e.usage(`$0 pay-per-use enabled-domains list
2
+ import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-BsGrhAqB.mjs";import{a as r,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"./input-validation-Dk52b0me.mjs";function d(e){return e.usage(`$0 pay-per-use enabled-domains list
3
3
 
4
4
  Returns publisher domains associated with the requesting Pay Per Use operator through an accepted price agreement. License expiration is the earlier non-null boundary from the price agreement and publisher zone lifecycles. A future expiration remains active and is exposed to the operator. After expiration, the license remains listed as expired for one calendar month before it is omitted; an active agreement for the same domain takes precedence. The requesting account must be an active Pay Per Use operator.`).option(`cursor`,{type:`string`,description:`Opaque, account-bound cursor returned by the previous page. Cursors expire after one hour; restart pagination without a cursor after receiving a 400 response for an expired cursor.`}).option(`per-page`,{type:`number`,description:`Maximum number of domains to return`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`list`,describe:`List enabled Pay Per Use domains`,builder:d,handler:async r=>c({command:`pay-per-use enabled-domains list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={cursor:r.cursor,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf pay-per-use enabled-domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pay-per-use/enabled-domains`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.payPerUse.enabledDomains.list({account_id:u,...c})),{successLabel:`Loaded`})})},p={command:`enabled-domains`,describe:`Operations for enabled-domains`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function m(e){return e.usage(`$0 pay-per-use usage-reports submit
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{r}from"./auth-B5p3SIhO.mjs";import{t as i}from"./output-CZt-berV.mjs";import{t as a}from"./dry-run-BmzTxDtZ.mjs";import{t as o}from"./progress-C9dWgc3J.mjs";import{t as s}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as c,r as l,t as u}from"./body-parser-BpPZBRMr.mjs";import{n as d}from"./input-validation-D3e278L_.mjs";import{a as f,i as p,n as m}from"./prompt-Mh69ni1N.mjs";function h(e){return e.usage(`$0 pipelines create
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,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p,n as m}from"./prompt-Ba_bys2F.mjs";function h(e){return e.usage(`$0 pipelines create
3
3
 
4
4
  Create a new Pipeline.`).option(`name`,{type:`string`,description:`Specifies the name of the Pipeline.`}).option(`sql`,{type:`string`,description:`Specifies SQL for the Pipeline processing flow.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create Pipeline`,builder:h,handler:async l=>s({command:`pipelines create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf pipelines create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`),sql:d(l.sql,`sql`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await n();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.pipelines.create({...e,account_id:p})),{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`Specifies the name of the Pipeline.`)),l.sql===void 0&&(l.sql=await f(`sql`,`Specifies SQL for the Pipeline processing flow.`));let m=u({name:d(l.name,`name`,`text`),sql:d(l.sql,`sql`,`text`)});i(await o(`Creating`,async()=>s.pipelines.create({...m,account_id:p})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 pipelines delete <pipeline-id>
5
5