cf 1.0.0-beta.17 → 1.0.0-beta.18

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 (226) hide show
  1. package/dist/_meta/commands.json +6117 -4540
  2. package/dist/_meta/schemas.json +5016 -3257
  3. package/dist/{abuse-reports-C4LxDvUM.mjs → abuse-reports-Ce-g5uZP.mjs} +6 -6
  4. package/dist/{access-DnWW2AAT.mjs → access-BtsMwesh.mjs} +1 -1
  5. package/dist/{accounts-8UcHNm3S.mjs → accounts-X5QVzEUW.mjs} +27 -21
  6. package/dist/{acm-qRM3iy4Z.mjs → acm-C_NepMi6.mjs} +1 -1
  7. package/dist/{addressing-CAb8z2Dq.mjs → addressing-BkQY1hoA.mjs} +18 -18
  8. package/dist/{agent-memory-oIUP4ZV5.mjs → agent-memory-1OPgC3lK.mjs} +6 -6
  9. package/dist/{ai-DnhytGdc.mjs → ai-Bb0_Zknm.mjs} +1 -1
  10. package/dist/{ai-audit-B7_5EOcN.mjs → ai-audit-DuEjVdML.mjs} +1 -1
  11. package/dist/{ai-gateway-b3FFu6UV.mjs → ai-gateway-Cm2vWMSI.mjs} +42 -42
  12. package/dist/ai-search-DDRpxyOM.mjs +79 -0
  13. package/dist/{ai-security-KUs94UW-.mjs → ai-security-A2STvE1b.mjs} +5 -5
  14. package/dist/{alerting-CCmyEPzN.mjs → alerting-CIwSk-Ks.mjs} +1 -1
  15. package/dist/{analytics-BAvBj6qx.mjs → analytics-H--uM3DA.mjs} +7 -7
  16. package/dist/{analytics-engine-DAJp89gM.mjs → analytics-engine-Alu7cllT.mjs} +1 -1
  17. package/dist/{api-security-BItVQymb.mjs → api-security-D-pcnhUL.mjs} +26 -26
  18. package/dist/{argo-DsJCvfml.mjs → argo-Lvmcx3am.mjs} +1 -1
  19. package/dist/{artifacts-DzHXeah6.mjs → artifacts-xT5S-mVa.mjs} +1 -1
  20. package/dist/{audit-logs-D9XxsVZm.mjs → audit-logs-DEoRBLkU.mjs} +1 -1
  21. package/dist/{auth-C530fHKQ.mjs → auth-B73lQS2h.mjs} +1 -1
  22. package/dist/auth-DMzEmOhG.mjs +2 -0
  23. package/dist/{auth-MNz2D-PD.mjs → auth-Db1KT0vm.mjs} +1 -1
  24. package/dist/{auth-token-Cw4c0y89.mjs → auth-token-D9XIPlwf.mjs} +1 -1
  25. package/dist/{basin-catalog-DcMiZV9J.mjs → basin-catalog-DFHt3cWi.mjs} +1 -1
  26. package/dist/{billing-COgAWTYh.mjs → billing-Bm2JNSGa.mjs} +6 -6
  27. package/dist/body-parser-DnBfDdx3.mjs +2 -0
  28. package/dist/{bot-management-Dx3lh9Fi.mjs → bot-management-CSr38g-O.mjs} +4 -4
  29. package/dist/{botnet-feed-C8496Nhl.mjs → botnet-feed-ebeWWSJj.mjs} +1 -1
  30. package/dist/{brand-protection-B0p8Sv6s.mjs → brand-protection-BCn9Mv-d.mjs} +5 -5
  31. package/dist/browser-run-BcWxzhAn.mjs +42 -0
  32. package/dist/{builds-DmEFTQTa.mjs → builds-BMwDzi7G.mjs} +39 -39
  33. package/dist/{cache-BUh85NRr.mjs → cache-_VaTLC5T.mjs} +1 -1
  34. package/dist/{cli-DJhpXf38.mjs → cli-P3q5DG3W.mjs} +1 -1
  35. package/dist/{client-side-security-km3-4L_4.mjs → client-side-security-CjSXrpa9.mjs} +1 -1
  36. package/dist/{cloud-connector-BoKFprDD.mjs → cloud-connector-BPJBeP06.mjs} +1 -1
  37. package/dist/{cloudforce-one-DN5N3C3w.mjs → cloudforce-one-DXX31GMi.mjs} +189 -189
  38. package/dist/{command-B694oLDo.mjs → command-BXiA79DP.mjs} +1 -1
  39. package/dist/{command-rx0Kb5pn.mjs → command-BbsPxJBT.mjs} +1 -1
  40. package/dist/{command-RC9WM5jq.mjs → command-Bkc04OyY.mjs} +1 -1
  41. package/dist/{command-Bmee6uwe.mjs → command-BtTc28ql.mjs} +1 -1
  42. package/dist/{command-CAs3SxlI.mjs → command-CBZhxmKD.mjs} +1 -1
  43. package/dist/{command-CCq-Z2Ua.mjs → command-CL7LLXM7.mjs} +1 -1
  44. package/dist/{command-DerHAjQL.mjs → command-CYyfigfC.mjs} +1 -1
  45. package/dist/{command-D1JR8Fb7.mjs → command-CxWLFv5Y.mjs} +1 -1
  46. package/dist/{command-CiApsRql.mjs → command-DDcBC4px.mjs} +1 -1
  47. package/dist/{command-CbQFbfps.mjs → command-NoxvOARP.mjs} +1 -1
  48. package/dist/{completions-11latun5.mjs → completions-CrDmwKnK.mjs} +1 -1
  49. package/dist/{connector-interrupts-wvQcZsO1.mjs → connector-interrupts-V4HGULCM.mjs} +1 -1
  50. package/dist/{connector-telemetry-events-C0GGCIQk.mjs → connector-telemetry-events-D9mTcfbJ.mjs} +1 -1
  51. package/dist/{connector-telemetry-snapshots-ZXzsFgea.mjs → connector-telemetry-snapshots-COrPVKol.mjs} +1 -1
  52. package/dist/{connectors-DXIUG4Zi.mjs → connectors-DvVlxGDx.mjs} +1 -1
  53. package/dist/{containers-DCH6MFjY.mjs → containers-Bt2zFsFd.mjs} +8 -8
  54. package/dist/{containers-WMWKhLkp.mjs → containers-BtcOgwm5.mjs} +2 -2
  55. package/dist/{content-scan-CRDmR7rD.mjs → content-scan-DldLmTjy.mjs} +1 -1
  56. package/dist/{context-q-6bMSL-.mjs → context-C_a8oSY9.mjs} +1 -1
  57. package/dist/cps-REo1OWP1.mjs +6 -0
  58. package/dist/csam-scanner-CIbbdoJK.mjs +10 -0
  59. package/dist/{custom-csrs-BV017SqE.mjs → custom-csrs-iGNc3rSZ.mjs} +1 -1
  60. package/dist/{custom-hostnames-DI_dFaof.mjs → custom-hostnames-BNxYbTyu.mjs} +15 -15
  61. package/dist/{custom-nameservers-BLoE8VGG.mjs → custom-nameservers-BMJoTSlQ.mjs} +1 -1
  62. package/dist/custom-pages-Qdemt1Fm.mjs +21 -0
  63. package/dist/{d1-Dbs8HItA.mjs → d1-DvCiQibO.mjs} +8 -8
  64. package/dist/{deploy-5utIiOMN.mjs → deploy-K664XPOb.mjs} +1 -1
  65. package/dist/{deploy-context-C0iVbWRG.mjs → deploy-context-ClNVJYlR.mjs} +13 -13
  66. package/dist/{diagnostics-C9B07eJY.mjs → diagnostics-Cw0mtcep.mjs} +2 -2
  67. package/dist/{dls-lbM3i4x-.mjs → dls-DoqfqutH.mjs} +1 -1
  68. package/dist/{dns-QTMPGYMa.mjs → dns-DC6WcO3m.mjs} +21 -21
  69. package/dist/{dns-firewall-Bfv0S44I.mjs → dns-firewall-DpQH9BCE.mjs} +9 -9
  70. package/dist/{docs-bV3hPwQL.mjs → docs-CqNRBHab.mjs} +1 -1
  71. package/dist/{durable-objects-0JvGTV27.mjs → durable-objects-CJDDy3CC.mjs} +1 -1
  72. package/dist/{email-auth-PzRqG0ex.mjs → email-auth--NHg1TjG.mjs} +1 -1
  73. package/dist/{email-routing-BgHL0Rbz.mjs → email-routing-COjENK55.mjs} +13 -13
  74. package/dist/{email-security-CSTKIecn.mjs → email-security-rdjH95T2.mjs} +38 -38
  75. package/dist/{email-sending-BSwuAir8.mjs → email-sending-26VJhR6Q.mjs} +18 -18
  76. package/dist/{field-extractors-B_lFnwaL.mjs → field-extractors-DBOvGOwz.mjs} +2 -2
  77. package/dist/{firewall-BsZxVitA.mjs → firewall-D8K93ffF.mjs} +20 -20
  78. package/dist/{flagship-qBohOZaM.mjs → flagship-CHdmCmvQ.mjs} +11 -11
  79. package/dist/{fraud-vGNdrSm-.mjs → fraud-CY4TV5Vc.mjs} +1 -1
  80. package/dist/{google-tag-gateway-BHdOg4VW.mjs → google-tag-gateway-DzSt4wlz.mjs} +1 -1
  81. package/dist/healthchecks-B52Mf3uL.mjs +22 -0
  82. package/dist/{hostnames-CLlaMqHu.mjs → hostnames-BMITIM8P.mjs} +1 -1
  83. package/dist/{hyperdrive-CXTqaIqk.mjs → hyperdrive-CHsW0r6Z.mjs} +1 -1
  84. package/dist/{iam-Dl_n_Lqq.mjs → iam-o1n9eUXf.mjs} +9 -9
  85. package/dist/{images-vMtXk2Rf.mjs → images-CJHAGxX6.mjs} +37 -37
  86. package/dist/index.mjs +1 -1
  87. package/dist/{init-_7djeBVw.mjs → init-CqQDL6i3.mjs} +1 -1
  88. package/dist/{intel-Bq4GGXv-.mjs → intel-B3S1gxUg.mjs} +1 -1
  89. package/dist/{ips-BcvZS46g.mjs → ips-q_UJMiy8.mjs} +1 -1
  90. package/dist/{k2-DL4hrVTj.mjs → k2-BNqVZnDN.mjs} +2 -2
  91. package/dist/{kv-BLo9wMgb.mjs → kv-B0nXSOcW.mjs} +1 -1
  92. package/dist/{lazy-command-CRcT6Dx-.mjs → lazy-command-4ccdBqrc.mjs} +1 -1
  93. package/dist/{leaked-credential-checks-Dx4RXMyN.mjs → leaked-credential-checks-BXwIjlTs.mjs} +1 -1
  94. package/dist/load-balancers-DJtMztJ0.mjs +76 -0
  95. package/dist/{login-Du_W6b9o.mjs → login-D-1FiBNv.mjs} +1 -1
  96. package/dist/{login-DT6Q1UJw.mjs → login-chQP8825.mjs} +1 -1
  97. package/dist/{logo-matches-C-1J0Oc3.mjs → logo-matches-qVYq8tWL.mjs} +1 -1
  98. package/dist/{logos-BuhvSu_H.mjs → logos-tnIahhcu.mjs} +1 -1
  99. package/dist/{logpush-DgZtF9vG.mjs → logpush-D4s3pJRw.mjs} +24 -24
  100. package/dist/{logs-CaKOk-1v.mjs → logs-cw7UL5V2.mjs} +3 -3
  101. package/dist/{magic-cloud-networking-CKxXYT8r.mjs → magic-cloud-networking-CLEHztNY.mjs} +1 -1
  102. package/dist/{magic-network-monitoring-BykFGQCz.mjs → magic-network-monitoring-DRwygeVq.mjs} +9 -9
  103. package/dist/{magic-transit-DYULsrUP.mjs → magic-transit-BFopRdPs.mjs} +170 -170
  104. package/dist/{managed-defense-DIb_uN25.mjs → managed-defense-D5kpmq0T.mjs} +9 -9
  105. package/dist/{managed-transforms-an3wQ0DW.mjs → managed-transforms-CT4jjnzJ.mjs} +2 -2
  106. package/dist/{matches-DkLSWb5X.mjs → matches-ClJ_24EY.mjs} +1 -1
  107. package/dist/{mcp-BcV1XqE8.mjs → mcp-50os3IRG.mjs} +10 -10
  108. package/dist/{mesh-CSSlZ-0F.mjs → mesh-jxtQP8sS.mjs} +2 -2
  109. package/dist/{monetization-B-nJ0SyI.mjs → monetization-D6cCDi-h.mjs} +4 -4
  110. package/dist/{network-ZzxQ_Dcz.mjs → network-dnWHB2uY.mjs} +27 -25
  111. package/dist/{network-interconnects-CI9NXQpe.mjs → network-interconnects-Cf8qSVdt.mjs} +1 -1
  112. package/dist/{o11y-LG6Y9LUZ.mjs → o11y-oMSg1pG4.mjs} +49 -49
  113. package/dist/{oauth-CP82E1_0.mjs → oauth-BfBdHhPS.mjs} +1 -1
  114. package/dist/{oauth-Bx693Af5.mjs → oauth-DDOiiH7h.mjs} +1 -1
  115. package/dist/{oauth-clients-BA30rTEl.mjs → oauth-clients-XDmoe-b4.mjs} +1 -1
  116. package/dist/{oauth-scopes-hseWES1v.mjs → oauth-scopes-D9VYGuTs.mjs} +1 -1
  117. package/dist/organization-94lHeeOs.mjs +75 -0
  118. package/dist/{organizations-CcgZPmFl.mjs → organizations-BJf3UTFi.mjs} +1 -1
  119. package/dist/{origin-post-quantum-encryption-BhdlaolV.mjs → origin-post-quantum-encryption-DMytVSUZ.mjs} +1 -1
  120. package/dist/{page-rules-DFfqfllI.mjs → page-rules-BUI-50oz.mjs} +4 -4
  121. package/dist/pages-CcdpCzHs.mjs +54 -0
  122. package/dist/pay-per-crawl-B1uHZn9j.mjs +38 -0
  123. package/dist/{pay-per-use-C_HxhpM4.mjs → pay-per-use-t066I5wm.mjs} +7 -7
  124. package/dist/{pipelines-DUMIVwof.mjs → pipelines-Co6S044l.mjs} +8 -8
  125. package/dist/precursor-BftyvS86.mjs +4 -0
  126. package/dist/previews-BLhnhElx.mjs +7 -0
  127. package/dist/{progress-DaQ4MzBI.mjs → progress-Q5w9PNTT.mjs} +1 -1
  128. package/dist/{prompt-KWYZvJWM.mjs → prompt-C0hKSr-R.mjs} +1 -1
  129. package/dist/{queries-DoyhspQf.mjs → queries-4MubO6Sz.mjs} +3 -3
  130. package/dist/{queues-BPxTU2rU.mjs → queues-CteS5M92.mjs} +17 -17
  131. package/dist/{r2-CQt4S7o7.mjs → r2-2QpT_Gso.mjs} +24 -24
  132. package/dist/{radar-CALpR1vq.mjs → radar-ODKaK4FJ.mjs} +1 -1
  133. package/dist/{raw-fetch-Cy09TjHc.mjs → raw-fetch-CEOuoKl9.mjs} +1 -1
  134. package/dist/{realtime-BiHKBoI4.mjs → realtime-DkfU8uEX.mjs} +84 -84
  135. package/dist/registrar-DM6JTVPS.mjs +43 -0
  136. package/dist/{registrar-sandbox-BttFwYqE.mjs → registrar-sandbox-BPNGf65G.mjs} +11 -9
  137. package/dist/{reporting-8aRJD5HX.mjs → reporting-5yFNXbJg.mjs} +1 -1
  138. package/dist/{request-headers-CqfJOkpO.mjs → request-headers-DXvswze2.mjs} +1 -1
  139. package/dist/request-tracers-BarLZY95.mjs +4 -0
  140. package/dist/{resource-sharing-uVVpMW0w.mjs → resource-sharing-BVEwBPs8.mjs} +19 -19
  141. package/dist/{rules-CFOuN3t2.mjs → rules-_C31X4Jz.mjs} +6 -6
  142. package/dist/{rulesets-DkhV2Hny.mjs → rulesets-8RwxoFhG.mjs} +6 -6
  143. package/dist/{rum-BnMW0Tlb.mjs → rum-CAUcpXpM.mjs} +6 -6
  144. package/dist/{run-Clc3P2u7.mjs → run-DtFLvOHB.mjs} +1 -1
  145. package/dist/run-LcOb9rhI.mjs +2 -0
  146. package/dist/{schema-flags-b096XMpt.mjs → schema-flags-DibfxEF6.mjs} +1 -1
  147. package/dist/{scim-tvZm6A-r.mjs → scim-DX5XrQ4w.mjs} +1 -1
  148. package/dist/{secrets-store-DuNxSh1_.mjs → secrets-store-DSqqrr25.mjs} +1 -1
  149. package/dist/{security-insights-C17c9ZYZ.mjs → security-insights-FSktO04S.mjs} +1 -1
  150. package/dist/{security-txt-D4pRk7-w.mjs → security-txt-D2g3lQdg.mjs} +1 -1
  151. package/dist/{shared-zePemxHi.mjs → shared-eefMO8R4.mjs} +1 -1
  152. package/dist/smart-shield-IVb2sR0C.mjs +24 -0
  153. package/dist/{snippets-BIcZ6vSW.mjs → snippets-cWwWficN.mjs} +2 -2
  154. package/dist/{spectrum-DjDX0geK.mjs → spectrum-DYiIBYRB.mjs} +1 -1
  155. package/dist/{speed-DiPoFJMm.mjs → speed-C7uiW2Wf.mjs} +1 -1
  156. package/dist/{sql-DLjCt_R3.mjs → sql-TGV8qQMj.mjs} +1 -1
  157. package/dist/{src-CutrsNl4.mjs → src-BUH-P_zd.mjs} +5 -5
  158. package/dist/ssl-xQP_HbWN.mjs +139 -0
  159. package/dist/{stream-uhn_Zsni.mjs → stream-CfWgj8Cr.mjs} +55 -55
  160. package/dist/{submit-C3suIDBX.mjs → submit-DxGr1T40.mjs} +1 -1
  161. package/dist/tags-LEJ2VYhQ.mjs +23 -0
  162. package/dist/{telemetry-DYjsavEr.mjs → telemetry-BHne10Yy.mjs} +1 -1
  163. package/dist/telemetry-BavSU4ku.mjs +2 -0
  164. package/dist/{tenant-DK88yQM4.mjs → tenant-7d5vwc6K.mjs} +1 -1
  165. package/dist/{tenant-custom-nameservers-BZ1JD1Yf.mjs → tenant-custom-nameservers-BkxlPr5O.mjs} +1 -1
  166. package/dist/{tunnels-DjbomhCa.mjs → tunnels-DlGODvwT.mjs} +4 -4
  167. package/dist/{turnstile-DXrbEy2A.mjs → turnstile-DhLkdhij.mjs} +5 -5
  168. package/dist/update-check-nLfkSfdz.mjs +2 -0
  169. package/dist/update-check-worker.mjs +1 -1
  170. package/dist/{update-check-BhhtSXVZ.mjs → update-check-wvjOsnGK.mjs} +1 -1
  171. package/dist/{url-info-a0mY4UsC.mjs → url-info-CeoV5dBc.mjs} +1 -1
  172. package/dist/{url-normalization-DiwpDIhc.mjs → url-normalization-9NoaoRNh.mjs} +1 -1
  173. package/dist/{url-scanner-D0egjBe5.mjs → url-scanner-w_-Sumz-.mjs} +8 -8
  174. package/dist/{user-DDH9lxf5.mjs → user-D33B3alX.mjs} +59 -59
  175. package/dist/{vectorize-DaT3amFV.mjs → vectorize-Wp9De13y.mjs} +17 -17
  176. package/dist/version-B2RUUqGT.mjs +2 -0
  177. package/dist/{waiting-rooms-BGMpu9gS.mjs → waiting-rooms-BE8FloRd.mjs} +13 -13
  178. package/dist/{web-assets-NqNglLSI.mjs → web-assets-ew0iaP7c.mjs} +35 -35
  179. package/dist/{web3-UnCUuIfB.mjs → web3-BUyXBaqq.mjs} +6 -6
  180. package/dist/{workers-builds-Cy6fdtm5.mjs → workers-builds-DzU9NGno.mjs} +7 -7
  181. package/dist/{workers-for-platforms-JscCHivQ.mjs → workers-for-platforms-B4xzFNxJ.mjs} +25 -22
  182. package/dist/{workers-DfA9ugmb.mjs → workers-pP5tsDbD.mjs} +25 -22
  183. package/dist/{workers-vpc-FDZQBqOu.mjs → workers-vpc-Bre_t9Al.mjs} +1 -1
  184. package/dist/{workflows-Dq-k81hU.mjs → workflows-DXYGKtqq.mjs} +1 -1
  185. package/dist/zaraz-DoH4QD0u.mjs +22 -0
  186. package/dist/{zero-trust-CZ685QhO.mjs → zero-trust-DKt20rzE.mjs} +461 -458
  187. package/dist/{zone-DcZIUTWt.mjs → zone-BXM3p0JR.mjs} +1 -1
  188. package/dist/{zones-BVdvYUCv.mjs → zones-CJdtqEBx.mjs} +21 -21
  189. package/package.json +9 -9
  190. package/dist/account-tags-zvHRQZxb.mjs +0 -15
  191. package/dist/ai-search-CtfW5fzl.mjs +0 -79
  192. package/dist/auth-Ccm5viK_.mjs +0 -2
  193. package/dist/body-parser-DkHKPkJ7.mjs +0 -2
  194. package/dist/browser-run-ChXohmNG.mjs +0 -42
  195. package/dist/certificate-authorities-BTLdA7EQ.mjs +0 -6
  196. package/dist/client-certificates-B3UxH_Au.mjs +0 -13
  197. package/dist/cps-Due0P5IW.mjs +0 -6
  198. package/dist/csam-scanner-DvLrPw45.mjs +0 -10
  199. package/dist/ct-alerting-BtEGkRJi.mjs +0 -5
  200. package/dist/custom-certificates-CMLXTTEc.mjs +0 -17
  201. package/dist/custom-pages-ubava9Qm.mjs +0 -21
  202. package/dist/dcv-delegation-sGGt6UU_.mjs +0 -4
  203. package/dist/healthchecks-DAYYLZ6u.mjs +0 -22
  204. package/dist/keyless-certificates-0pzjkZb6.mjs +0 -13
  205. package/dist/keys-BSV5IXdU.mjs +0 -4
  206. package/dist/load-balancers-CCCWoQXv.mjs +0 -76
  207. package/dist/mtls-certificates-ukwDz6Lc.mjs +0 -13
  208. package/dist/organization-DMr_z6n4.mjs +0 -71
  209. package/dist/origin-ca-certificates-BZxUbB5N.mjs +0 -11
  210. package/dist/origin-tls-client-auth-DzbZvtmi.mjs +0 -30
  211. package/dist/pages-BkcL5rC4.mjs +0 -54
  212. package/dist/pay-per-crawl-Dulm7Xy5.mjs +0 -38
  213. package/dist/precursor-DsGbA_YJ.mjs +0 -4
  214. package/dist/previews-Cma3-M7K.mjs +0 -7
  215. package/dist/registrar-gERQ3b85.mjs +0 -43
  216. package/dist/request-tracers-DcnwQg3K.mjs +0 -4
  217. package/dist/resource-tagging-SlsUtLsq.mjs +0 -4
  218. package/dist/run-CHNyLZLG.mjs +0 -2
  219. package/dist/smart-shield-2egm1Vaw.mjs +0 -24
  220. package/dist/ssl-vNzK0c9S.mjs +0 -45
  221. package/dist/tags-Dy2jG-Dt.mjs +0 -4
  222. package/dist/telemetry-Bdv5LZZs.mjs +0 -2
  223. package/dist/update-check-Dld7rbLd.mjs +0 -2
  224. package/dist/values-Bfr5-bL6.mjs +0 -4
  225. package/dist/version-CAuKDZAG.mjs +0 -2
  226. package/dist/zaraz-Dpr1pLDx.mjs +0 -22
@@ -1,71 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-MNz2D-PD.mjs";import{t as n}from"./output-Co4xdFf6.mjs";import{t as r}from"./dry-run-C2KjGX10.mjs";import{t as i}from"./progress-DaQ4MzBI.mjs";import{t as a}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as o,r as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,i as d,n as f}from"./prompt-KWYZvJWM.mjs";var p={method:`GET`,path:t=>e`/organizations/${t.organization_id}/accounts`,query:[`account_pubname`,`account_pubname.startsWith`,`account_pubname.endsWith`,`account_pubname.contains`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`order_by`,`direction`,`include_tags`,`include_total`,`page_token`,`page_size`],joined:[`account_pubname`,`account_pubname.startsWith`,`account_pubname.endsWith`,`account_pubname.contains`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`order_by`,`direction`,`include_tags`,`include_total`,`page_token`,`page_size`]};function m(e){return e.usage(`$0 organization account list
3
-
4
- Retrieve the accounts immediately attached to a specific organization. Accounts attached to sub-organizations are not included. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.read\` is required. User API Tokens are not currently supported.`).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
- 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
6
- a particular string.`}).option(`account-pubname-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname ends with
7
- a particular string.`}).option(`account-pubname-contains`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname contains
8
- a particular string.`}).option(`name`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name is equal to a
9
- particular string.`}).option(`name-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name starts with a
10
- particular string.`}).option(`name-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name ends with a particular
11
- string.`}).option(`name-contains`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name contains a particular
12
- string.`}).option(`order-by`,{type:`string`,description:"Field to order results by. Currently supported values: `account_name`.\nWhen not specified, results are ordered by internal account ID.",choices:[`account_name`]}).option(`direction`,{type:`string`,description:"Sort direction for the order_by field. Valid values: `asc`, `desc`.\nDefaults to `asc` when order_by is specified.",choices:[`asc`,`desc`]}).option(`include-tags`,{type:`boolean`,description:`Include Account tags from the resource tag mirror. Omit this parameter to preserve the existing Account response shape.`}).option(`include-total`,{type:`boolean`,description:`Whether to calculate and return the exact result_info.total_size for cursor
13
- pagination. Defaults to true. When false, total_size is omitted. page_size and
14
- include_total may change between pages; next_page_token remains the authoritative
15
- continuation signal.
16
- Legacy page/per_page requests always calculate total_count.`}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
17
- provided will retrieve the next page.
18
-
19
- Parameters used to filter the retrieved list must remain in subsequent
20
- requests with a page token.`}).option(`page-size`,{type:`number`,description:`The amount of items to return. Defaults to 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`list`,describe:`List organization accounts`,builder:m,handler:async e=>a({command:`organization account list`,classification:{safeFlags:[`order-by`,`direction`,`include-tags`,`include-total`,`dry-run`]}},e,async()=>{let a={account_pubname:e[`account-pubname`],"account_pubname.startsWith":e[`account-pubname-starts-with`],"account_pubname.endsWith":e[`account-pubname-ends-with`],"account_pubname.contains":e[`account-pubname-contains`],name:e.name,"name.startsWith":e[`name-starts-with`],"name.endsWith":e[`name-ends-with`],"name.contains":e[`name-contains`],order_by:e[`order-by`],direction:e.direction,include_tags:e[`include-tags`],include_total:e[`include-total`],page_token:e[`page-token`],page_size:e[`page-size`]};if(e.dryRun){r({command:`cf organization account list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/accounts`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(p,{organization_id:e[`organization-id`],...a}));n(s,{successLabel:`Loaded`})})},g={command:`account`,describe:`Operations for account`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var _={method:`POST`,path:()=>`/organizations`,body:`json`};function ee(e){return e.usage(`$0 organization create
21
-
22
- Create a new organization for a user. Sub-organization creation availability depends on the organization's capabilities. Authentication: Use a Global API key, or a User API Token with the \`User Details Write\` permission.`).option(`name`,{type:`string`,description:`The name field`}).option(`parent-id`,{type:`string`,description:`Organization ID`}).option(`profile-business-address`,{type:`string`,description:`The profile.business_address field`}).option(`profile-business-email`,{type:`string`,description:`The profile.business_email field`}).option(`profile-business-name`,{type:`string`,description:`The profile.business_name field`}).option(`profile-business-phone`,{type:`string`,description:`The profile.business_phone field`}).option(`profile-external-metadata`,{type:`string`,description:`The profile.external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`References an Organization in the Cloudflare data model.`}).check(e=>{if([`parent-id`].some(t=>e[t]!==void 0)){let t=[`parent-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parent-* flag is set`)}return!0}).check(e=>{if([`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].some(t=>e[t]!==void 0)){let t=[`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].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 --profile-* flag is set`)}return!0})}const te={command:`create`,describe:`Create organization`,builder:ee,handler:async e=>a({command:`organization create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/organizations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?c({name:l(e.name,`name`,`text`),parent:{id:l(e[`parent-id`],`parent-id`,`text`)},profile:{business_address:l(e[`profile-business-address`],`profile-business-address`,`text`),business_email:l(e[`profile-business-email`],`profile-business-email`,`text`),business_name:l(e[`profile-business-name`],`profile-business-name`,`text`),business_phone:l(e[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:l(e[`profile-external-metadata`],`profile-external-metadata`,`text`)}}):o(e.body)});return}let a=await t(e);if(e.body){let t=o(e.body),r=await i(`Creating`,async()=>a.send(_,{body:t}));n(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await u(`name`,`The name field`));let s=c({name:l(e.name,`name`,`text`),parent:{id:l(e[`parent-id`],`parent-id`,`text`)},profile:{business_address:l(e[`profile-business-address`],`profile-business-address`,`text`),business_email:l(e[`profile-business-email`],`profile-business-email`,`text`),business_name:l(e[`profile-business-name`],`profile-business-name`,`text`),business_phone:l(e[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:l(e[`profile-external-metadata`],`profile-external-metadata`,`text`)}}),d=await i(`Creating`,async()=>a.send(_,{body:s}));n(d,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/organizations/${t.organization_id}`};function y(e){return e.usage(`$0 organization delete <organization-id>
23
-
24
- Delete an organization. The organization MUST be empty before deleting. It must not contain any sub-organizations, accounts, members or users. Sub-organization deletion availability depends on the organization's capabilities. **Access Control:** Restricted to enterprise organizations. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.update\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`The ID of the organization to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <organization-id>`,describe:`Delete organization`,builder:y,handler:async e=>a({command:`organization delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf organization delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await f({force:!!e.force,message:`Delete this empty organization? This action cannot be undone.`})){process.stderr.write(`Aborted.
25
- `);return}let o=await i(`Deleting`,async()=>a.send(v,{organization_id:e[`organization-id`]}));n(o,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/organizations/${t.organization_id}`};function S(e){return e.usage("$0 organization get <organization-id>\n\nRetrieve the details of a certain organization. Authentication: A Global API key for a user with `com.cloudflare.api.tenant.unit.read` is required. User API Tokens are not currently supported and return HTTP `403` with error code `10000`.").positional(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <organization-id>`,describe:`Get organization`,builder:S,handler:async e=>a({command:`organization get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`none`});return}let a=await t(e),o=await i(`Loading`,async()=>a.send(x,{organization_id:e[`organization-id`]}));n(o,{successLabel:`Loaded`})})};var w={method:`PUT`,path:t=>e`/organizations/${t.organization_id}/invites/${t.member_code}`,body:`json`};function T(e){return e.usage(`$0 organization invite update <member-code>
26
-
27
- Accept or reject an invitation to a specific organization. Authentication: A Global API key for the invited user is required. User API Tokens are not currently supported. No additional permission is required; the invitation must belong to the authenticated user.`).positional(`member-code`,{type:`string`,description:`The invitation code to accept or reject.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`The ID of the organization associated with the invitation.`,demandOption:!0}).option(`status`,{type:`string`,description:`The status field`,choices:[`accept`,`reject`]}).coerce(`status`,e=>l(e,`status`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"The invitation action. Use `accept` to join the organization or `reject` to decline the invitation."})}const E={command:`update <member-code>`,describe:`Handle organization invite`,builder:T,handler:async e=>a({command:`organization invite update`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization invite update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/invites/${e[`member-code`]==null?`<member-code>`:encodeURIComponent(String(e[`member-code`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``),"member-code":String(e[`member-code`]??``)},bodyKind:`json`,body:e.body===void 0?c({status:e.status}):o(e.body)});return}let a=await t(e);if(e.body){let t=o(e.body),r=await i(`Updating`,async()=>a.send(w,{body:t,organization_id:e[`organization-id`],member_code:e[`member-code`]}));n(r,{successLabel:`Updated`});return}e.status===void 0&&(e.status=await d(`status`,`The status field`,[`accept`,`reject`]));let s=c({status:e.status}),l=await i(`Updating`,async()=>a.send(w,{body:s,organization_id:e[`organization-id`],member_code:e[`member-code`]}));n(l,{successLabel:`Updated`})})},D={command:`invite`,describe:`Operations for invite`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var O={method:`GET`,path:()=>`/organizations`,query:[`id`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`containing.account`,`containing.user`,`containing.organization`,`parent.id`,`page_token`,`page_size`],joined:[`id`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`containing.account`,`containing.user`,`containing.organization`,`parent.id`,`page_token`,`page_size`]};function k(e){return e.usage("$0 organization list\n\nRetrieve a list of organizations a particular user has access to. Authentication: Use a Global API key, or a User API Token with the `User Details Read` or `User Details Write` permission.").option(`id`,{type:`string`,description:`Only return organizations with the specified IDs (ex. id=foo&id=bar). Send multiple elements
28
- by repeating the query value.`}).option(`name`,{type:`string`,description:`(case-sensitive) Filter the list of organizations to where the name is equal to a
29
- particular string.`}).option(`name-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of organizations to where the name starts with a
30
- particular string.`}).option(`name-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of organizations to where the name ends with a particular
31
- string.`}).option(`name-contains`,{type:`string`,description:`(case-insensitive) Filter the list of organizations to where the name contains a particular
32
- string.`}).option(`containing-account`,{type:`string`,description:`Filter the list of organizations to the ones that contain this particular
33
- account.`}).option(`containing-user`,{type:`string`,description:`Filter the list of organizations to the ones that contain this particular
34
- user.
35
-
36
- IMPORTANT: Just because an organization "contains" a user is not a
37
- representation of any authorization or privilege to manage any resources
38
- therein. An organization "containing" a user simply means the user is managed by
39
- that organization.`}).option(`containing-organization`,{type:`string`,description:`Filter the list of organizations to the ones that contain this particular
40
- organization.`}).option(`parent-id`,{type:`string`,description:`Filter the list of organizations to the ones that are a sub-organization
41
- of the specified organization.
42
-
43
- "null" is a valid value to provide for this parameter. It means "where
44
- an organization has no parent (i.e. it is a 'root' organization)."`}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
45
- provided will retrieve the next page.
46
-
47
- Parameters used to filter the retrieved list must remain in subsequent
48
- requests with a page token.`}).option(`page-size`,{type:`number`,description:`The amount of items to return. Defaults to 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List organizations the user has access to`,builder:k,handler:async e=>a({command:`organization list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={id:e.id,name:e.name,"name.startsWith":e[`name-starts-with`],"name.endsWith":e[`name-ends-with`],"name.contains":e[`name-contains`],"containing.account":e[`containing-account`],"containing.user":e[`containing-user`],"containing.organization":e[`containing-organization`],"parent.id":e[`parent-id`],page_token:e[`page-token`],page_size:e[`page-size`]};if(e.dryRun){r({command:`cf organization list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(O,a));n(s,{successLabel:`Loaded`})})};var j={method:`POST`,path:t=>e`/organizations/${t.organization_id}/members:batchCreate`,body:`json`};function M(e){return e.usage(`$0 organization member batch create <organization-id>
49
-
50
- Batch create multiple memberships that grant access to a specific Organization. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.member.create\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`members`,{type:`string`,description:`The members field. 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 N={command:`create <organization-id>`,describe:`Batch create organization members`,builder:M,handler:async e=>a({command:`organization member batch create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization member batch create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members:batchCreate`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({members:s(e.members,`members`)}):o(e.body)});return}let a=await t(e);if(e.body){let t=o(e.body),r=await i(`Creating`,async()=>a.send(j,{body:t,organization_id:e[`organization-id`]}));n(r,{successLabel:`Created`});return}if(e.members===void 0)throw Error(`--members is required (or pass --body with this field set).`);let l=c({members:s(e.members,`members`)}),u=await i(`Creating`,async()=>a.send(j,{body:l,organization_id:e[`organization-id`]}));n(u,{successLabel:`Created`})})},P={command:`batch`,describe:`Operations for member.batch`,builder:e=>e.command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var F={method:`POST`,path:t=>e`/organizations/${t.organization_id}/members`,body:`json`};function I(e){return e.usage(`$0 organization member create <organization-id>
51
-
52
- Create a membership that grants access to a specific Organization. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.member.create\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`member-status`,{type:`string`,description:`The member.status field`,choices:[`active`,`canceled`]}).coerce(`member-status`,e=>l(e,`member-status`,`text`)).option(`member-user-email`,{type:`string`,description:`The member.user.email 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 L={command:`create <organization-id>`,describe:`Create organization member`,builder:I,handler:async e=>a({command:`organization member create`,classification:{safeFlags:[`member-status`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization member create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({member:{status:e[`member-status`],user:{email:l(e[`member-user-email`],`member-user-email`,`text`)}}}):o(e.body)});return}let a=await t(e);if(e.body){let t=o(e.body),r=await i(`Creating`,async()=>a.send(F,{body:t,organization_id:e[`organization-id`]}));n(r,{successLabel:`Created`});return}e[`member-user-email`]===void 0&&(e[`member-user-email`]=await u(`member-user-email`,`The member.user.email field`));let s=c({member:{status:e[`member-status`],user:{email:l(e[`member-user-email`],`member-user-email`,`text`)}}}),d=await i(`Creating`,async()=>a.send(F,{body:s,organization_id:e[`organization-id`]}));n(d,{successLabel:`Created`})})};var ne={method:`DELETE`,path:t=>e`/organizations/${t.organization_id}/members/${t.member_id}`,response:!1};function R(e){return e.usage(`$0 organization member delete <member-id>
53
-
54
- Delete a membership to a particular Organization. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.member.delete\` is required. User API Tokens are not currently supported.`).positional(`member-id`,{type:`string`,description:`Organization Member ID`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const z={command:`delete <member-id>`,describe:`Delete organization member`,builder:R,handler:async e=>a({command:`organization member delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf organization member delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await f({force:!!e.force,message:`Delete this organization membership? The member will lose access to this organization and its sub-organizations.`})){process.stderr.write(`Aborted.
55
- `);return}let o=await i(`Deleting`,async()=>a.send(ne,{organization_id:e[`organization-id`],member_id:e[`member-id`]}));n(o,{successLabel:`Deleted`})})};var B={method:`GET`,path:t=>e`/organizations/${t.organization_id}/members/${t.member_id}`};function V(e){return e.usage(`$0 organization member get <member-id>
56
-
57
- Retrieve a single membership from an Organization. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.member.read\` is required. User API Tokens are not currently supported.`).positional(`member-id`,{type:`string`,description:`Organization Member ID`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <member-id>`,describe:`Get organization member`,builder:V,handler:async e=>a({command:`organization member get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization member get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let a=await t(e),o=await i(`Loading`,async()=>a.send(B,{organization_id:e[`organization-id`],member_id:e[`member-id`]}));n(o,{successLabel:`Loaded`})})};var U={method:`GET`,path:t=>e`/organizations/${t.organization_id}/members`,query:[`status`,`user.email`,`user.email.contains`,`user.email.startsWith`,`user.email.endsWith`,`page_token`,`page_size`],joined:[`user.email`,`user.email.contains`,`user.email.startsWith`,`user.email.endsWith`,`page_token`,`page_size`]};function W(e){return e.usage(`$0 organization member list
58
-
59
- List memberships for an Organization. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.member.list\` is required. User API Tokens are not currently supported.`).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`status`,{type:`string`,description:`Filter the list of memberships by membership status.`}).option(`user-email`,{type:`string`,description:`Filter the list of memberships for a specific email.`}).option(`user-email-contains`,{type:`string`,description:`Filter the list of memberships for a specific email that contains a substring.`}).option(`user-email-starts-with`,{type:`string`,description:`Filter the list of memberships for a specific email that starts with a substring.`}).option(`user-email-ends-with`,{type:`string`,description:`Filter the list of memberships for a specific email that ends with a substring.`}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
60
- provided will retrieve the next page.
61
-
62
- Parameters used to filter the retrieved list must remain in subsequent
63
- requests with a page token.`}).option(`page-size`,{type:`number`,description:`The amount of items to return. Defaults to 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`List organization members`,builder:W,handler:async e=>a({command:`organization member list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={status:e.status,"user.email":e[`user-email`],"user.email.contains":e[`user-email-contains`],"user.email.startsWith":e[`user-email-starts-with`],"user.email.endsWith":e[`user-email-ends-with`],page_token:e[`page-token`],page_size:e[`page-size`]};if(e.dryRun){r({command:`cf organization member list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(U,{organization_id:e[`organization-id`],...a}));n(s,{successLabel:`Loaded`})})},K={command:`member`,describe:`Operations for member`,builder:e=>e.command(L).command(z).command(H).command(G).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`GET`,path:t=>e`/organizations/${t.organization_id}/profile`};function J(e){return e.usage(`$0 organization profile get <organization-id>
64
-
65
- Get an organizations profile if it exists. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.read\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve a profile for.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`get <organization-id>`,describe:`Get organization profile`,builder:J,handler:async e=>a({command:`organization profile get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/profile`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`none`});return}let a=await t(e),o=await i(`Loading`,async()=>a.send(q,{organization_id:e[`organization-id`]}));n(o,{successLabel:`Loaded`})})};var X={method:`PUT`,path:t=>e`/organizations/${t.organization_id}/profile`,body:`json`,response:!1};function Z(e){return e.usage(`$0 organization profile update <organization-id>
66
-
67
- Modify organization profile. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.update\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`business-address`,{type:`string`,description:`The business_address field`}).option(`business-email`,{type:`string`,description:`The business_email field`}).option(`business-name`,{type:`string`,description:`The business_name field`}).option(`business-phone`,{type:`string`,description:`The business_phone field`}).option(`external-metadata`,{type:`string`,description:`The external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const re={command:`update <organization-id>`,describe:`Modify organization profile.`,builder:Z,handler:async e=>a({command:`organization profile update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization profile update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/profile`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({business_address:l(e[`business-address`],`business-address`,`text`),business_email:l(e[`business-email`],`business-email`,`text`),business_name:l(e[`business-name`],`business-name`,`text`),business_phone:l(e[`business-phone`],`business-phone`,`text`),external_metadata:l(e[`external-metadata`],`external-metadata`,`text`)}):o(e.body)});return}let a=await t(e);if(e.body){let t=o(e.body),r=await i(`Updating`,async()=>a.send(X,{body:t,organization_id:e[`organization-id`]}));n(r,{successLabel:`Updated`});return}e[`business-address`]===void 0&&(e[`business-address`]=await u(`business-address`,`The business_address field`)),e[`business-email`]===void 0&&(e[`business-email`]=await u(`business-email`,`The business_email field`)),e[`business-name`]===void 0&&(e[`business-name`]=await u(`business-name`,`The business_name field`)),e[`business-phone`]===void 0&&(e[`business-phone`]=await u(`business-phone`,`The business_phone field`)),e[`external-metadata`]===void 0&&(e[`external-metadata`]=await u(`external-metadata`,`The external_metadata field`));let s=c({business_address:l(e[`business-address`],`business-address`,`text`),business_email:l(e[`business-email`],`business-email`,`text`),business_name:l(e[`business-name`],`business-name`,`text`),business_phone:l(e[`business-phone`],`business-phone`,`text`),external_metadata:l(e[`external-metadata`],`external-metadata`,`text`)}),d=await i(`Updating`,async()=>a.send(X,{body:s,organization_id:e[`organization-id`]}));n(d,{successLabel:`Updated`})})},ie={command:`profile`,describe:`Operations for profile`,builder:e=>e.command(Y).command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ae={method:`GET`,path:t=>e`/organizations/${t.organization_id}/shares`,query:[`status`,`kind`,`target_type`,`resource_types`,`order`,`direction`,`page`,`per_page`]};function oe(e){return e.usage(`$0 organization share list
68
-
69
- Lists all organization shares.`).option(`organization-id`,{type:`string`,description:`Organization identifier.`,demandOption:!0}).option(`status`,{type:`string`,description:`Filter shares by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`kind`,{type:`string`,description:`Filter shares by kind.`,choices:[`sent`,`received`]}).option(`target-type`,{type:`string`,description:`Filter shares by target_type.`,choices:[`account`,`organization`]}).option(`resource-types`,{type:`string`,description:`Filter share resources by resource_types.`}).option(`order`,{type:`string`,description:`Order shares by values in the given field.`,choices:[`name`,`created`]}).option(`direction`,{type:`string`,description:`Direction to sort objects.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`list`,describe:`List organization shares`,builder:oe,handler:async e=>a({command:`organization share list`,classification:{safeFlags:[`status`,`kind`,`target-type`,`order`,`direction`,`dry-run`]}},e,async()=>{let a={status:e.status,kind:e.kind,target_type:e[`target-type`],resource_types:e[`resource-types`],order:e.order,direction:e.direction,page:e.page,per_page:e[`per-page`]};if(e.dryRun){r({command:`cf organization share list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/shares`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(ae,{organization_id:e[`organization-id`],...a}));n(s,{successLabel:`Loaded`})})},Q={command:`share`,describe:`Operations for share`,builder:e=>e.command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`PUT`,path:t=>e`/organizations/${t.organization_id}`,body:`json`};function ce(e){return e.usage(`$0 organization update <organization-id>
70
-
71
- Update an organization's name. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.update\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`The ID of the organization to modify.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`parent-id`,{type:`string`,description:`Organization ID`}).option(`profile-business-address`,{type:`string`,description:`The profile.business_address field`}).option(`profile-business-email`,{type:`string`,description:`The profile.business_email field`}).option(`profile-business-name`,{type:`string`,description:`The profile.business_name field`}).option(`profile-business-phone`,{type:`string`,description:`The profile.business_phone field`}).option(`profile-external-metadata`,{type:`string`,description:`The profile.external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new details of the organization. Only accepts updates to "name" currently.`}).check(e=>{if([`parent-id`].some(t=>e[t]!==void 0)){let t=[`parent-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parent-* flag is set`)}return!0}).check(e=>{if([`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].some(t=>e[t]!==void 0)){let t=[`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].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 --profile-* flag is set`)}return!0})}const le={command:`update <organization-id>`,describe:`Update organization`,builder:ce,handler:async e=>a({command:`organization update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({name:l(e.name,`name`,`text`),parent:{id:l(e[`parent-id`],`parent-id`,`text`)},profile:{business_address:l(e[`profile-business-address`],`profile-business-address`,`text`),business_email:l(e[`profile-business-email`],`profile-business-email`,`text`),business_name:l(e[`profile-business-name`],`profile-business-name`,`text`),business_phone:l(e[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:l(e[`profile-external-metadata`],`profile-external-metadata`,`text`)}}):o(e.body)});return}let a=await t(e);if(e.body){let t=o(e.body),r=await i(`Updating`,async()=>a.send($,{body:t,organization_id:e[`organization-id`]}));n(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await u(`name`,`The name field`));let s=c({name:l(e.name,`name`,`text`),parent:{id:l(e[`parent-id`],`parent-id`,`text`)},profile:{business_address:l(e[`profile-business-address`],`profile-business-address`,`text`),business_email:l(e[`profile-business-email`],`profile-business-email`,`text`),business_name:l(e[`profile-business-name`],`profile-business-name`,`text`),business_phone:l(e[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:l(e[`profile-external-metadata`],`profile-external-metadata`,`text`)}}),d=await i(`Updating`,async()=>a.send($,{body:s,organization_id:e[`organization-id`]}));n(d,{successLabel:`Updated`})})},ue={command:`organization`,describe:`organization`,builder:e=>e.command(te).command(b).command(C).command(A).command(le).command(g).command(D).command(K).command(ie).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ue as default};
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-MNz2D-PD.mjs";import{t as n}from"./output-Co4xdFf6.mjs";import{t as r}from"./dry-run-C2KjGX10.mjs";import{t as i}from"./progress-DaQ4MzBI.mjs";import{t as a}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l,i as u,n as d}from"./prompt-KWYZvJWM.mjs";var f={method:`POST`,path:()=>`/certificates`,body:`json`};function p(e){return e.usage(`$0 origin-ca-certificates create
3
-
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`]}).coerce(`request-type`,e=>c(e,`request-type`,`text`)).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 m={command:`create`,describe:`Create Certificate`,builder:p,handler:async e=>a({command:`origin-ca-certificates create`,classification:{safeFlags:[`request-type`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf origin-ca-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/certificates`,pathParams:{},bodyKind:`json`,body:e.body===void 0?s({csr:c(e.csr,`csr`,`text`),hostnames:e.hostnames,request_type:e[`request-type`],requested_validity:e[`requested-validity`]}):o(e.body)});return}let a=await t(e);if(e.body){let t=o(e.body),r=await i(`Creating`,async()=>a.send(f,{body:t}));n(r,{successLabel:`Created`});return}if(e.csr===void 0&&(e.csr=await l(`csr`,`The Certificate Signing Request (CSR). Must be newline-encoded.`)),e.hostnames===void 0)throw Error(`--hostnames is required (or pass --body with this field set).`);e[`request-type`]===void 0&&(e[`request-type`]=await u(`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=s({csr:c(e.csr,`csr`,`text`),hostnames:e.hostnames,request_type:e[`request-type`],requested_validity:e[`requested-validity`]}),p=await i(`Creating`,async()=>a.send(f,{body:d}));n(p,{successLabel:`Created`})})};var h={method:`DELETE`,path:t=>e`/certificates/${t.certificate_id}`};function g(e){return e.usage(`$0 origin-ca-certificates delete <certificate-id>
5
-
6
- Revoke an existing Origin CA certificate by its serial number. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`).positional(`certificate-id`,{type:`string`,description:`The x509 serial number of the Origin CA certificate.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _={command:`delete <certificate-id>`,describe:`Revoke Certificate`,builder:g,handler:async e=>a({command:`origin-ca-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf origin-ca-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await d({force:!!e.force})){process.stderr.write(`Aborted.
7
- `);return}let o=await i(`Deleting`,async()=>a.send(h,{certificate_id:e[`certificate-id`]}));n(o,{successLabel:`Deleted`})})};var v={method:`GET`,path:t=>e`/certificates/${t.certificate_id}`};function y(e){return e.usage(`$0 origin-ca-certificates get <certificate-id>
8
-
9
- Get an existing Origin CA certificate by its serial number. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`).positional(`certificate-id`,{type:`string`,description:`The x509 serial number of the Origin CA certificate.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <certificate-id>`,describe:`Get Certificate`,builder:y,handler:async e=>a({command:`origin-ca-certificates get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf origin-ca-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`none`});return}let a=await t(e),o=await i(`Loading`,async()=>a.send(v,{certificate_id:e[`certificate-id`]}));n(o,{successLabel:`Loaded`})})};var x={method:`GET`,path:()=>`/certificates`,query:[`zone_id`,`page`,`per_page`,`limit`,`offset`]};function S(e){return e.usage(`$0 origin-ca-certificates list
10
-
11
- List all existing Origin CA certificates for a given zone. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`).option(`zone-id`,{type:`string`,description:`Identifier.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of records per page.`}).option(`limit`,{type:`number`,description:`Limit to the number of records returned.`}).option(`offset`,{type:`number`,description:`Offset the results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List Certificates`,builder:S,handler:async e=>a({command:`origin-ca-certificates list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={zone_id:e[`zone-id`],page:e.page,per_page:e[`per-page`],limit:e.limit,offset:e.offset};if(e.dryRun){r({command:`cf origin-ca-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/certificates`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(x,a));n(s,{successLabel:`Loaded`})})},w={command:`origin-ca-certificates`,describe:`origin-ca-certificates`,builder:e=>e.command(m).command(_).command(b).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
@@ -1,30 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-MNz2D-PD.mjs";import{i as n}from"./context-q-6bMSL-.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-DaQ4MzBI.mjs";import{t as o}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as s,r as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-KWYZvJWM.mjs";var p={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin_tls_client_auth/hostnames`,query:[`page`,`per_page`,`status`]};function m(e){return e.usage(`$0 origin-tls-client-auth hostname-associations list
3
-
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 h={command:`list`,describe:`List Hostname Associations`,builder:m,handler:async e=>o({command:`origin-tls-client-auth hostname-associations list`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`],status:e.status};if(e.dryRun){i({command:`cf origin-tls-client-auth hostname-associations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin_tls_client_auth/hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(p,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},g={command:`hostname-associations`,describe:`Operations for hostname-associations`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var _={method:`POST`,path:t=>e`/zones/${t.zone_id}/origin_tls_client_auth/hostnames/certificates`,body:`json`};function v(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates create
5
-
6
- Upload a certificate to be used for client authentication on a hostname. 10 hostname certificates per zone are allowed.`).option(`certificate`,{type:`string`,description:`The hostname certificate.`}).option(`private-key`,{type:`string`,description:`The hostname certificate's private key.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`create`,describe:`Upload a Hostname Client Certificate`,builder:v,handler:async e=>o({command:`origin-tls-client-auth hostname-certificates create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf origin-tls-client-auth hostname-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({certificate:u(e.certificate,`certificate`,`text`),private_key:u(e[`private-key`],`private-key`,`text`)}):s(e.body),sensitiveBodyPaths:[[`private_key`]]});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(_,{body:t,zone_id:c}));r(n,{successLabel:`Created`});return}e.certificate===void 0&&(e.certificate=await d(`certificate`,`The hostname certificate.`)),e[`private-key`]===void 0&&(e[`private-key`]=await d(`private-key`,`The hostname certificate's private key.`,{kind:`secret`}));let f=l({certificate:u(e.certificate,`certificate`,`text`),private_key:u(e[`private-key`],`private-key`,`text`)}),p=await a(`Creating`,async()=>o.send(_,{body:f,zone_id:c}));r(p,{successLabel:`Created`})})};var b={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/origin_tls_client_auth/hostnames/certificates/${t.certificate_id}`};function x(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates delete <certificate-id>
7
-
8
- Removes a client certificate used for authenticated origin pulls on a specific hostname. Note: Before deleting the certificate, you must first invalidate the hostname for client authentication by sending a PUT request with \`enabled\` set to null. After invalidating the association, the certificate can be safely deleted.`).positional(`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}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const S={command:`delete <certificate-id>`,describe:`Delete Hostname Client Certificate`,builder:x,handler:async e=>o({command:`origin-tls-client-auth hostname-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf origin-tls-client-auth hostname-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force})){process.stderr.write(`Aborted.
9
- `);return}let c=await a(`Deleting`,async()=>o.send(b,{zone_id:s,certificate_id:e[`certificate-id`]}));r(c,{successLabel:`Deleted`})})};var C={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin_tls_client_auth/hostnames/certificates/${t.certificate_id}`};function w(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates get <certificate-id>
10
-
11
- Get the certificate by ID to be used for client authentication on a hostname.`).positional(`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 T={command:`get <certificate-id>`,describe:`Get the Hostname Client Certificate`,builder:w,handler:async e=>o({command:`origin-tls-client-auth hostname-certificates get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf origin-tls-client-auth hostname-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(C,{zone_id:s,certificate_id:e[`certificate-id`]}));r(c,{successLabel:`Loaded`})})};var E={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin_tls_client_auth/hostnames/certificates`};function D(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates list
12
-
13
- Lists all client certificates configured for per-hostname authenticated origin pulls on the zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List Certificates`,builder:D,handler:async e=>o({command:`origin-tls-client-auth hostname-certificates list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf origin-tls-client-auth hostname-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(E,{zone_id:s}));r(c,{successLabel:`Loaded`})})},k={command:`hostname-certificates`,describe:`Operations for hostname-certificates`,builder:e=>e.command(y).command(S).command(T).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var A={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin_tls_client_auth/hostnames/${t.hostname}`};function j(e){return e.usage(`$0 origin-tls-client-auth hostnames get <hostname>
14
-
15
- Retrieves the client certificate authentication status for a specific hostname, showing whether authenticated origin pulls are enabled.`).positional(`hostname`,{type:`string`,description:`The hostname on the origin for which the client certificate uploaded will be used.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get <hostname>`,describe:`Get the Hostname Status for Client Authentication`,builder:j,handler:async e=>o({command:`origin-tls-client-auth hostnames get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf origin-tls-client-auth hostnames get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/${e.hostname==null?`<hostname>`:encodeURIComponent(String(e.hostname))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),hostname:String(e.hostname??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(A,{zone_id:s,hostname:e.hostname}));r(c,{successLabel:`Loaded`})})};var N={method:`PUT`,path:t=>e`/zones/${t.zone_id}/origin_tls_client_auth/hostnames`,body:`json`};function P(e){return e.usage(`$0 origin-tls-client-auth hostnames update
16
-
17
- Associate a hostname to a certificate and enable, disable or invalidate the association. If disabled, client certificate will not be sent to the hostname even if activated at the zone level. 100 maximum associations on a single certificate are allowed. Note: Use a null value for parameter *enabled* to invalidate the association.`).option(`config`,{type:`string`,description:`The config field. 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 ee={command:`update`,describe:`Enable or Disable a Hostname for Client Authentication`,builder:P,handler:async e=>o({command:`origin-tls-client-auth hostnames update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf origin-tls-client-auth hostnames update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin_tls_client_auth/hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({config:c(e.config,`config`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(N,{body:t,zone_id:u}));r(n,{successLabel:`Updated`});return}if(e.config===void 0)throw Error(`--config is required (or pass --body with this field set).`);let d=l({config:c(e.config,`config`)}),f=await a(`Updating`,async()=>o.send(N,{body:d,zone_id:u}));r(f,{successLabel:`Updated`})})},F={command:`hostnames`,describe:`Operations for hostnames`,builder:e=>e.command(M).command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var I={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin_tls_client_auth/settings`};function L(e){return e.usage(`$0 origin-tls-client-auth settings get
18
-
19
- Get whether zone-level authenticated origin pulls is enabled or not. It is false by default.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`get`,describe:`Get Enablement Setting for Zone`,builder:L,handler:async e=>o({command:`origin-tls-client-auth settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf origin-tls-client-auth settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin_tls_client_auth/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(I,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var z={method:`PUT`,path:t=>e`/zones/${t.zone_id}/origin_tls_client_auth/settings`,body:`json`};function B(e){return e.usage(`$0 origin-tls-client-auth settings update
20
-
21
- Enable or disable zone-level authenticated origin pulls. 'enabled' should be set true either before/after the certificate is uploaded to see the certificate in use.`).option(`enabled`,{type:`boolean`,description:`Indicates whether zone-level authenticated origin pulls is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const V={command:`update`,describe:`Set Enablement for Zone`,builder:B,handler:async e=>o({command:`origin-tls-client-auth settings update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf origin-tls-client-auth settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin_tls_client_auth/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({enabled:e.enabled}):s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(z,{body:t,zone_id:c}));r(n,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=l({enabled:e.enabled}),d=await a(`Updating`,async()=>o.send(z,{body:u,zone_id:c}));r(d,{successLabel:`Updated`})})},H={command:`settings`,describe:`Operations for settings`,builder:e=>e.command(R).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U={method:`POST`,path:t=>e`/zones/${t.zone_id}/origin_tls_client_auth`,body:`json`};function W(e){return e.usage(`$0 origin-tls-client-auth zone-certificates create
22
-
23
- Upload your own certificate you want Cloudflare to use for edge-to-origin communication to override the shared certificate. Please note that it is important to keep only one certificate active. Also, make sure to enable zone-level authenticated origin pulls by making a PUT call to settings endpoint to see the uploaded certificate in use.`).option(`certificate`,{type:`string`,description:`The zone's leaf certificate.`}).option(`private-key`,{type:`string`,description:`The zone's private key.`}).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:`Upload Certificate`,builder:W,handler:async e=>o({command:`origin-tls-client-auth zone-certificates create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf origin-tls-client-auth zone-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin_tls_client_auth`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({certificate:u(e.certificate,`certificate`,`text`),private_key:u(e[`private-key`],`private-key`,`text`)}):s(e.body),sensitiveBodyPaths:[[`private_key`]]});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(U,{body:t,zone_id:c}));r(n,{successLabel:`Created`});return}e.certificate===void 0&&(e.certificate=await d(`certificate`,`The zone's leaf certificate.`)),e[`private-key`]===void 0&&(e[`private-key`]=await d(`private-key`,`The zone's private key.`,{kind:`secret`}));let f=l({certificate:u(e.certificate,`certificate`,`text`),private_key:u(e[`private-key`],`private-key`,`text`)}),p=await a(`Creating`,async()=>o.send(U,{body:f,zone_id:c}));r(p,{successLabel:`Created`})})};var K={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/origin_tls_client_auth/${t.certificate_id}`};function q(e){return e.usage(`$0 origin-tls-client-auth zone-certificates delete <certificate-id>
24
-
25
- Removes a client certificate used for zone-level authenticated origin pulls.`).positional(`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}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const J={command:`delete <certificate-id>`,describe:`Delete Certificate`,builder:q,handler:async e=>o({command:`origin-tls-client-auth zone-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf origin-tls-client-auth zone-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin_tls_client_auth/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force})){process.stderr.write(`Aborted.
26
- `);return}let c=await a(`Deleting`,async()=>o.send(K,{zone_id:s,certificate_id:e[`certificate-id`]}));r(c,{successLabel:`Deleted`})})};var Y={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin_tls_client_auth/${t.certificate_id}`};function X(e){return e.usage(`$0 origin-tls-client-auth zone-certificates get <certificate-id>
27
-
28
- Retrieves details for a specific client certificate used in zone-level authenticated origin pulls.`).positional(`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 Z={command:`get <certificate-id>`,describe:`Get Certificate Details`,builder:X,handler:async e=>o({command:`origin-tls-client-auth zone-certificates get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf origin-tls-client-auth zone-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin_tls_client_auth/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(Y,{zone_id:s,certificate_id:e[`certificate-id`]}));r(c,{successLabel:`Loaded`})})};var Q={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin_tls_client_auth`};function $(e){return e.usage(`$0 origin-tls-client-auth zone-certificates list
29
-
30
- Lists all client certificates configured for zone-level authenticated origin pulls.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`list`,describe:`List Certificates`,builder:$,handler:async e=>o({command:`origin-tls-client-auth zone-certificates list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf origin-tls-client-auth zone-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin_tls_client_auth`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(Q,{zone_id:s}));r(c,{successLabel:`Loaded`})})},ne={command:`zone-certificates`,describe:`Operations for zone-certificates`,builder:e=>e.command(G).command(J).command(Z).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},re={command:`origin-tls-client-auth`,describe:`origin-tls-client-auth`,builder:e=>e.command(g).command(k).command(F).command(H).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{re as default};
@@ -1,54 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./lazy-command-CRcT6Dx-.mjs";import"./api-eMuS5GI1.mjs";import{t}from"./path-DRw6Y-nd.mjs";import{t as n}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as r}from"./local-Dil4fTWX.mjs";import{i,n as a}from"./auth-MNz2D-PD.mjs";import{a as o,t as s}from"./context-q-6bMSL-.mjs";import{t as c}from"./output-Co4xdFf6.mjs";import{t as l}from"./dry-run-C2KjGX10.mjs";import{t as u}from"./progress-DaQ4MzBI.mjs";import{t as d}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as f,t as p}from"./body-parser-DkHKPkJ7.mjs";import{n as m,t as ee}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-KWYZvJWM.mjs";var v={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/purge_build_cache`};function te(e){return e.usage(`$0 pages build-cache purge <project-name>
3
-
4
- Remove cached build artifacts so subsequent builds run without the project's existing build cache.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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 ne={command:`purge <project-name>`,describe:`Purge the Pages build cache`,builder:te,handler:async e=>d({command:`pages build-cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages build-cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<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 t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await _({force:!!e.force,message:`This operation purges the build cache for a Pages project.`})){process.stderr.write(`Aborted.
5
- `);return}let i=await u(`Deleting`,async()=>t.send(v,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})},re={command:`build-cache`,describe:`Operations for build-cache`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects`,body:`json`};function b(e){return e.usage(`$0 pages create
6
-
7
- Create a Cloudflare Pages project for configuring and deploying a site or application.`).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. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).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`]}).coerce(`deployment-configs-preview-usage-model`,e=>m(e,`deployment-configs-preview-usage-model`,`text`)).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. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).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`]}).coerce(`deployment-configs-production-usage-model`,e=>m(e,`deployment-configs-production-usage-model`,`text`)).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 for the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`}).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.
8
- When disabled, no deployments (production or preview) will be triggered automatically.
9
- `}).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`]}).coerce(`source-config-preview-deployment-setting`,e=>m(e,`source-config-preview-deployment-setting`,`text`)).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`]}).coerce(`source-type`,e=>m(e,`source-type`,`text`)).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 x={command:`create`,describe:`Create a Cloudflare Pages project`,builder:b,handler:async e=>d({command:`pages 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){let t=await o();l({command:`cf pages create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({build_config:{build_caching:e[`build-config-build-caching`],build_command:m(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:m(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:m(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:m(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:m(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:m(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:m(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:e[`deployment-configs-preview-usage-model`],wrangler_config_hash:m(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:m(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:m(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:e[`deployment-configs-production-usage-model`],wrangler_config_hash:m(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:m(e.name,`name`,`text`),production_branch:m(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:m(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:m(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:e[`source-config-preview-deployment-setting`],production_branch:m(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:m(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:m(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}}):f(e.body),sensitiveBodyPaths:[[`build_config`,`web_analytics_token`]]});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.body){let r=f(e.body),i=await u(`Creating`,async()=>t.send(y,{body:r,account_id:n}));c(i,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`Name for the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`)),e[`production-branch`]===void 0&&(e[`production-branch`]=await h(`production-branch`,`Production branch of the project. Used to identify production deployments.`));let i=p({build_config:{build_caching:e[`build-config-build-caching`],build_command:m(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:m(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:m(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:m(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:m(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:m(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:m(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:e[`deployment-configs-preview-usage-model`],wrangler_config_hash:m(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:m(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:m(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:e[`deployment-configs-production-usage-model`],wrangler_config_hash:m(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:m(e.name,`name`,`text`),production_branch:m(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:m(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:m(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:e[`source-config-preview-deployment-setting`],production_branch:m(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:m(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:m(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}}),d=await u(`Creating`,async()=>t.send(y,{body:i,account_id:n}));c(d,{successLabel:`Created`})})};var S={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}`};function C(e){return e.usage(`$0 pages delete <project-name>
10
-
11
- Permanently delete a Cloudflare Pages project and its deployments.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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 a Cloudflare Pages project`,builder:C,handler:async e=>d({command:`pages delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<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 t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await _({force:!!e.force})){process.stderr.write(`Aborted.
12
- `);return}let i=await u(`Deleting`,async()=>t.send(S,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})};var T={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments`,pathParams:[`account_id`,`project_name`],body:`form`};function E(e){return e.usage(`$0 pages deployments create <project-name>
13
-
14
- Create a Cloudflare Pages deployment from a Git branch or Direct Upload manifest. Git repositories must already be authorized in Cloudflare Pages.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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:"Git branch to deploy. Uses the branch's `HEAD`; defaults to the project's production branch."}).option(`commit-dirty`,{type:`string`,description:"Whether the associated Git working tree has uncommitted changes. Provide `true` or `false`."}).option(`commit-hash`,{type:`string`,description:`Git commit SHA associated with the deployment.`}).option(`commit-message`,{type:`string`,description:`Git commit message associated with the deployment.`}).option(`manifest`,{type:`string`,description:`JSON-encoded object mapping deployment file paths to their uploaded 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 D={command:`create <project-name>`,describe:`Create a Pages deployment`,builder:E,handler:async e=>d({command:`pages deployments create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<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 t=await a(e),n=e.local?r:await s();if(e.accountId=n,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 r=new FormData;if(e.file){let t=ee(e.file);r.append(`_headers`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&r.append(`_headers`,e.body);e.branch!==void 0&&r.append(`branch`,String(m(e.branch,`branch`,`text`)??``)),e[`commit-dirty`]!==void 0&&r.append(`commit_dirty`,String(m(e[`commit-dirty`],`commit-dirty`,`text`)??``)),e[`commit-hash`]!==void 0&&r.append(`commit_hash`,String(m(e[`commit-hash`],`commit-hash`,`text`)??``)),e[`commit-message`]!==void 0&&r.append(`commit_message`,String(m(e[`commit-message`],`commit-message`,`text`)??``)),e.manifest!==void 0&&r.append(`manifest`,String(m(e.manifest,`manifest`,`text`)??``)),e[`pages-build-output-dir`]!==void 0&&r.append(`pages_build_output_dir`,String(m(e[`pages-build-output-dir`],`pages-build-output-dir`,`text`)??``)),e[`wrangler-config-hash`]!==void 0&&r.append(`wrangler_config_hash`,String(m(e[`wrangler-config-hash`],`wrangler-config-hash`,`text`)??``));let a=await u(`Creating`,async()=>i(t,`POST`,`/accounts/${n}/pages/projects/${encodeURIComponent(String(e[`project-name`]))}/deployments`,{body:r}));c(a,{successLabel:`Created`});return}if(e.body){let r=m(e.body,`body`,`binary`),a=await u(`Creating`,async()=>i(t,`POST`,`/accounts/${n}/pages/projects/${encodeURIComponent(String(e[`project-name`]))}/deployments`,{body:r,headers:{"Content-Type":`multipart/form-data`}}));c(a,{successLabel:`Created`});return}let d=await u(`Creating`,async()=>t.send(T,{account_id:n,project_name:e[`project-name`]}));c(d,{successLabel:`Created`})})};var O={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}`,query:[`force`]};function k(e){return e.usage(`$0 pages deployments delete <deployment-id>
15
-
16
- Remove a deployment from a Cloudflare Pages project.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`allow-aliased`,{type:`boolean`,description:`Allow deletion when a non-production deployment has an active alias.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const A={command:`delete <deployment-id>`,describe:`Delete a Pages deployment`,builder:k,handler:async e=>d({command:`pages deployments delete`,classification:{safeFlags:[`allow-aliased`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={force:e[`allow-aliased`]};if(e.dryRun){let n=await o();l({command:`cf pages deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${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:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},query:t,bodyKind:`none`});return}let n=await a(e),i=e.local?r:await s();if(e.accountId=i,!await _({force:!!e.force})){process.stderr.write(`Aborted.
17
- `);return}let d=await u(`Deleting`,async()=>n.send(O,{account_id:i,project_name:e[`project-name`],deployment_id:e[`deployment-id`],...t}));c(d,{successLabel:`Deleted`})})};var j={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}`};function M(e){return e.usage(`$0 pages deployments get <deployment-id>
18
-
19
- Retrieve the status and details of a Cloudflare Pages deployment.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`get <deployment-id>`,describe:`Get a Pages deployment`,builder:M,handler:async e=>d({command:`pages deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages deployments get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<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:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(j,{account_id:n,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));c(i,{successLabel:`Loaded`})})};var P={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}/history/logs`};function F(e){return e.usage(`$0 pages deployments history logs get <deployment-id>
20
-
21
- Retrieve the build logs for a Cloudflare Pages deployment.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get <deployment-id>`,describe:`Get Pages deployment logs`,builder:F,handler:async e=>d({command:`pages deployments history logs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages deployments history logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<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:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(P,{account_id:n,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));c(i,{successLabel:`Loaded`})})},L={command:`logs`,describe:`Operations for deployments.history.logs`,builder:e=>e.command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},R={command:`history`,describe:`Operations for deployments.history`,builder:e=>e.command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var z={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments`,query:[`env`,`page`,`per_page`]};function B(e){return e.usage(`$0 pages deployments list
22
-
23
- List the production or preview deployments for a Cloudflare Pages project.`).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`env`,{type:`string`,description:"Deployment environment to return. Valid values are `production` and `preview`.",choices:[`production`,`preview`]}).option(`page`,{type:`number`,description:`Page number of results to return.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list`,describe:`List Pages deployments`,builder:B,handler:async e=>d({command:`pages deployments list`,classification:{safeFlags:[`env`,`dry-run`]}},e,async()=>{let t={env:e.env,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let n=await o();l({command:`cf pages deployments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${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:t,bodyKind:`none`});return}let n=await a(e),i=e.local?r:await s();e.accountId=i;let d=await u(`Loading`,async()=>n.send(z,{account_id:i,project_name:e[`project-name`],...t}));c(d,{successLabel:`Loaded`})})};var H={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}/retry`};function U(e){return e.usage(`$0 pages deployments retry <deployment-id>
24
-
25
- Retry a previous Cloudflare Pages deployment.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`retry <deployment-id>`,describe:`Retry a Pages deployment`,builder:U,handler:async e=>d({command:`pages deployments retry`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages deployments retry`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<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:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Creating`,async()=>t.send(H,{account_id:n,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));c(i,{successLabel:`Created`})})};var G={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}/rollback`};function K(e){return e.usage(`$0 pages deployments rollback <deployment-id>
26
-
27
- Roll back production to a previous successful Cloudflare Pages deployment.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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:`rollback <deployment-id>`,describe:`Roll back a Pages deployment`,builder:K,handler:async e=>d({command:`pages deployments rollback`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages deployments rollback`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<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:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await _({force:!!e.force,message:`This operation rolls back the production deployment to an earlier deployment.`})){process.stderr.write(`Aborted.
28
- `);return}let i=await u(`Deleting`,async()=>t.send(G,{account_id:n,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));c(i,{successLabel:`Deleted`})})},J={command:`deployments`,describe:`Operations for deployments`,builder:e=>e.command(D).command(A).command(N).command(V).command(W).command(q).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains`,body:`json`};function X(e){return e.usage(`$0 pages domains create <project-name>
29
-
30
- Attach a custom domain to a Cloudflare Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`name`,{type:`string`,description:"Fully qualified domain name for the Pages project, such as `example.com`."}).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 ie={command:`create <project-name>`,describe:`Add a Pages custom domain`,builder:X,handler:async e=>d({command:`pages domains create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<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?p({name:m(e.name,`name`,`text`)}):f(e.body)});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.body){let r=f(e.body),i=await u(`Creating`,async()=>t.send(Y,{body:r,account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,"Fully qualified domain name for the Pages project, such as `example.com`."));let i=p({name:m(e.name,`name`,`text`)}),d=await u(`Creating`,async()=>t.send(Y,{body:i,account_id:n,project_name:e[`project-name`]}));c(d,{successLabel:`Created`})})};var ae={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains/${e.domain_name}`};function oe(e){return e.usage(`$0 pages domains delete <domain-name>
31
-
32
- Remove a custom domain from a Cloudflare Pages project.`).positional(`domain-name`,{type:`string`,description:"Fully qualified domain name for the Pages project, such as `example.com`.",demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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 se={command:`delete <domain-name>`,describe:`Delete a Pages custom domain`,builder:oe,handler:async e=>d({command:`pages domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<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:{"project-name":String(e[`project-name`]??``),"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await _({force:!!e.force})){process.stderr.write(`Aborted.
33
- `);return}let i=await u(`Deleting`,async()=>t.send(ae,{account_id:n,project_name:e[`project-name`],domain_name:e[`domain-name`]}));c(i,{successLabel:`Deleted`})})};var ce={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains/${e.domain_name}`};function le(e){return e.usage(`$0 pages domains get <domain-name>
34
-
35
- Retrieve the configuration and validation status of a custom domain attached to a Cloudflare Pages project.`).positional(`domain-name`,{type:`string`,description:"Fully qualified domain name for the Pages project, such as `example.com`.",demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get <domain-name>`,describe:`Get a Pages custom domain`,builder:le,handler:async e=>d({command:`pages domains get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<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:{"project-name":String(e[`project-name`]??``),"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(ce,{account_id:n,project_name:e[`project-name`],domain_name:e[`domain-name`]}));c(i,{successLabel:`Loaded`})})};var de={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains`};function fe(e){return e.usage(`$0 pages domains list
36
-
37
- List the custom domains associated with a Cloudflare Pages project.`).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`list`,describe:`List Pages custom domains`,builder:fe,handler:async e=>d({command:`pages domains list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<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 t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(de,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Loaded`})})};var me={method:`PATCH`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains/${e.domain_name}`};function he(e){return e.usage(`$0 pages domains validation retry <domain-name>
38
-
39
- Retry validation for a custom domain attached to a Cloudflare Pages project.`).positional(`domain-name`,{type:`string`,description:"Fully qualified domain name for the Pages project, such as `example.com`.",demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`retry <domain-name>`,describe:`Retry custom domain validation`,builder:he,handler:async e=>d({command:`pages domains validation retry`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages domains validation retry`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<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:{"project-name":String(e[`project-name`]??``),"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Updating`,async()=>t.send(me,{account_id:n,project_name:e[`project-name`],domain_name:e[`domain-name`]}));c(i,{successLabel:`Updated`})})},_e={command:`validation`,describe:`Operations for domains.validation`,builder:e=>e.command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ve={command:`domains`,describe:`Operations for domains`,builder:e=>e.command(ie).command(se).command(ue).command(pe).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`PATCH`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}`,body:`json`};function ye(e){return e.usage(`$0 pages edit <project-name>
40
-
41
- Update the build, deployment, source, or environment settings for a Cloudflare Pages project. To delete an environment variable, set its key to \`null\`.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).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`]}).coerce(`deployment-configs-preview-usage-model`,e=>m(e,`deployment-configs-preview-usage-model`,`text`)).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. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).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`]}).coerce(`deployment-configs-production-usage-model`,e=>m(e,`deployment-configs-production-usage-model`,`text`)).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 for the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`}).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.
42
- When disabled, no deployments (production or preview) will be triggered automatically.
43
- `}).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`]}).coerce(`source-config-preview-deployment-setting`,e=>m(e,`source-config-preview-deployment-setting`,`text`)).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`]}).coerce(`source-type`,e=>m(e,`source-type`,`text`)).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 be={command:`edit <project-name>`,describe:`Update a Cloudflare Pages project`,builder:ye,handler:async e=>d({command:`pages 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){let t=await o();l({command:`cf pages edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<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?p({build_config:{build_caching:e[`build-config-build-caching`],build_command:m(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:m(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:m(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:m(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:m(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:m(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:m(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:e[`deployment-configs-preview-usage-model`],wrangler_config_hash:m(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:m(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:m(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:e[`deployment-configs-production-usage-model`],wrangler_config_hash:m(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:m(e.name,`name`,`text`),production_branch:m(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:m(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:m(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:e[`source-config-preview-deployment-setting`],production_branch:m(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:m(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:m(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}}):f(e.body),sensitiveBodyPaths:[[`build_config`,`web_analytics_token`]]});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.body){let r=f(e.body),i=await u(`Updating`,async()=>t.send(Z,{body:r,account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Updated`});return}let i=p({build_config:{build_caching:e[`build-config-build-caching`],build_command:m(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:m(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:m(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:m(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:m(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:m(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:m(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:e[`deployment-configs-preview-usage-model`],wrangler_config_hash:m(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:m(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:m(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:e[`deployment-configs-production-usage-model`],wrangler_config_hash:m(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:m(e.name,`name`,`text`),production_branch:m(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:m(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:m(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:e[`source-config-preview-deployment-setting`],production_branch:m(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:m(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:m(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}}),d=await u(`Updating`,async()=>t.send(Z,{body:i,account_id:n,project_name:e[`project-name`]}));c(d,{successLabel:`Updated`})})};var xe={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}`};function Se(e){return e.usage(`$0 pages get <project-name>
44
-
45
- Retrieve the configuration and deployment settings for a Cloudflare Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ce={command:`get <project-name>`,describe:`Get a Cloudflare Pages project`,builder:Se,handler:async e=>d({command:`pages get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<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 t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(xe,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Loaded`})})};var we={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects`,query:[`page`,`per_page`]};function Te(e){return e.usage(`$0 pages list
46
-
47
- List the Cloudflare Pages projects in an account.`).option(`page`,{type:`number`,description:`Page number of results to return.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ee={command:`list`,describe:`List Cloudflare Pages projects`,builder:Te,handler:async e=>d({command:`pages list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await o();l({command:`cf pages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pages/projects`,pathParams:{},query:t,bodyKind:`none`});return}let n=await a(e),i=e.local?r:await s();e.accountId=i;let d=await u(`Loading`,async()=>n.send(we,{account_id:i,...t}));c(d,{successLabel:`Loaded`})})};var Q={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/source`,body:`json`};function De(e){return e.usage(`$0 pages source connect <project-name>
48
-
49
- Connect a GitHub or GitLab repository to a Cloudflare Pages project to enable Git-based deployments.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).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`]}).coerce(`source-config-preview-deployment-setting`,e=>m(e,`source-config-preview-deployment-setting`,`text`)).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(`type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).coerce(`type`,e=>m(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Repository and deployment settings for connecting a Git repository to a Pages project.`})}const $={command:`connect <project-name>`,describe:`Connect a Git repository`,builder:De,handler:async e=>d({command:`pages source connect`,classification:{safeFlags:[`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages source connect`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<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?p({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:m(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:m(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:e[`source-config-preview-deployment-setting`],production_branch:m(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:m(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:m(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e.type}):f(e.body)});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.body){let r=f(e.body),i=await u(`Creating`,async()=>t.send(Q,{body:r,account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Created`});return}if(e[`source-config-deployments-enabled`]===void 0)throw Error(`--source-config-deployments-enabled is required (or pass --body with this field set).`);if(e[`source-config-owner`]===void 0&&(e[`source-config-owner`]=await h(`source-config-owner`,`The owner of the repository.`)),e[`source-config-owner-id`]===void 0&&(e[`source-config-owner-id`]=await h(`source-config-owner-id`,`The owner ID of the repository.`)),e[`source-config-path-excludes`]===void 0)throw Error(`--source-config-path-excludes is required (or pass --body with this field set).`);if(e[`source-config-path-includes`]===void 0)throw Error(`--source-config-path-includes is required (or pass --body with this field set).`);if(e[`source-config-pr-comments-enabled`]===void 0)throw Error(`--source-config-pr-comments-enabled is required (or pass --body with this field set).`);if(e[`source-config-preview-branch-excludes`]===void 0)throw Error(`--source-config-preview-branch-excludes is required (or pass --body with this field set).`);if(e[`source-config-preview-branch-includes`]===void 0)throw Error(`--source-config-preview-branch-includes is required (or pass --body with this field set).`);if(e[`source-config-preview-deployment-setting`]===void 0&&(e[`source-config-preview-deployment-setting`]=await g(`source-config-preview-deployment-setting`,`Controls whether commits to preview branches trigger a preview deployment.`,[`all`,`none`,`custom`])),e[`source-config-production-branch`]===void 0&&(e[`source-config-production-branch`]=await h(`source-config-production-branch`,`The production branch of the repository.`)),e[`source-config-production-deployments-enabled`]===void 0)throw Error(`--source-config-production-deployments-enabled is required (or pass --body with this field set).`);e[`source-config-repo-id`]===void 0&&(e[`source-config-repo-id`]=await h(`source-config-repo-id`,`The ID of the repository.`)),e[`source-config-repo-name`]===void 0&&(e[`source-config-repo-name`]=await h(`source-config-repo-name`,`The name of the repository.`)),e.type===void 0&&(e.type=await g(`type`,`The source control management provider.`,[`github`,`gitlab`]));let i=p({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:m(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:m(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:e[`source-config-preview-deployment-setting`],production_branch:m(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:m(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:m(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e.type}),d=await u(`Creating`,async()=>t.send(Q,{body:i,account_id:n,project_name:e[`project-name`]}));c(d,{successLabel:`Created`})})};var Oe={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/source`};function ke(e){return e.usage(`$0 pages source disconnect <project-name>
52
-
53
- Disconnect the Git repository from a Cloudflare Pages project to stop Git-based deployments.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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 Ae={command:`disconnect <project-name>`,describe:`Disconnect a Git repository`,builder:ke,handler:async e=>d({command:`pages source disconnect`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages source disconnect`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<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 t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await _({force:!!e.force})){process.stderr.write(`Aborted.
54
- `);return}let i=await u(`Deleting`,async()=>t.send(Oe,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})},je={command:`source`,describe:`Operations for source`,builder:e=>e.command($).command(Ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Me=e(`deploy [directory]`,`Deploy a directory of static assets as a Pages deployment`,()=>import(`./command-DppVezAB.mjs`),{command:`pages deploy`,recordArgs:!1});const Ne={command:`pages`,describe:`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,builder:e=>e.command(x).command(w).command(n(Me,`preview`)).command(be).command(Ce).command(Ee).command(re).command(J).command(ve).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ne as default};
@@ -1,38 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-MNz2D-PD.mjs";import{a as r,i,t as a}from"./context-q-6bMSL-.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-DaQ4MzBI.mjs";import{t as l}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p}from"./prompt-KWYZvJWM.mjs";var m={method:`POST`,path:t=>e`/zones/${t.zone_id}/pay-per-crawl/configuration`,body:`json`,errors:{400:`BadRequestError`}};function ee(e){return e.usage(`$0 pay-per-crawl config create
3
-
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 te={command:`create`,describe:`Creates pay-per-crawl config for a zone`,builder:ee,handler:async e=>l({command:`pay-per-crawl config create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){s({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?f({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}):u(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Creating`,async()=>t.send(m,{body:n,zone_id:r}));o(i,{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 a=f({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}),l=await c(`Creating`,async()=>t.send(m,{body:a,zone_id:r}));o(l,{successLabel:`Created`})})};var h={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/pay-per-crawl/configuration`,body:`json`,errors:{400:`BadRequestError`}};function ne(e){return e.usage(`$0 pay-per-crawl config edit
5
-
6
- Changes 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 setting flag on zones`})}const g={command:`edit`,describe:`Changes pay-per-crawl config for a zone`,builder:ne,handler:async e=>l({command:`pay-per-crawl config edit`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-crawl config edit`,method:`PATCH`,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?f({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}):u(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Updating`,async()=>t.send(h,{body:n,zone_id:r}));o(i,{successLabel:`Updated`});return}let a=f({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}),l=await c(`Updating`,async()=>t.send(h,{body:a,zone_id:r}));o(l,{successLabel:`Updated`})})};var _={method:`GET`,path:t=>e`/zones/${t.zone_id}/pay-per-crawl/configuration`,errors:{400:`BadRequestError`}};function v(e){return e.usage(`$0 pay-per-crawl config get
7
-
8
- Gets the pay-per-crawl config for a zone including the bot configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get`,describe:`Get the pay-per-crawl config`,builder:v,handler:async e=>l({command:`pay-per-crawl config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-crawl config get`,method:`GET`,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:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(_,{zone_id:r}));o(a,{successLabel:`Loaded`})})},b={command:`config`,describe:`Operations for config`,builder:e=>e.command(te).command(g).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/crawler/stripe`,errors:{400:`BadRequestError`}};function S(e){return e.usage(`$0 pay-per-crawl crawler stripe create
9
-
10
- Creates the stripe config for a crawler.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`create`,describe:`Creates the stripe config for a crawler`,builder:S,handler:async e=>l({command:`pay-per-crawl crawler stripe create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl crawler stripe create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>i.send(x,{account_id:l}));o(u,{successLabel:`Created`})})};var w={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/crawler/stripe`,errors:{400:`BadRequestError`}};function T(e){return e.usage(`$0 pay-per-crawl crawler stripe delete
11
-
12
- Deletes the stripe config for a crawler.`).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 E={command:`delete`,describe:`Deletes the stripe config for a crawler`,builder:T,handler:async e=>l({command:`pay-per-crawl crawler stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl crawler stripe delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await p({force:!!e.force})){process.stderr.write(`Aborted.
13
- `);return}let u=await c(`Deleting`,async()=>i.send(w,{account_id:l}));o(u,{successLabel:`Deleted`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/crawler/stripe`,errors:{400:`BadRequestError`}};function O(e){return e.usage(`$0 pay-per-crawl crawler stripe get
14
-
15
- Gets the stripe config for a crawler.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get`,describe:`Gets the stripe config for a crawler`,builder:O,handler:async e=>l({command:`pay-per-crawl crawler stripe get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl crawler stripe get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(D,{account_id:l}));o(u,{successLabel:`Loaded`})})},A={command:`stripe`,describe:`Operations for crawler.stripe`,builder:e=>e.command(C).command(E).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`crawler`,describe:`Operations for crawler`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/crawlers`,errors:{400:`BadRequestError`}};function N(e){return e.usage(`$0 pay-per-crawl crawlers list
16
-
17
- Lists the crawlers known to pay-per-crawl.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`List pay-per-crawl crawlers`,builder:N,handler:async e=>l({command:`pay-per-crawl crawlers list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl crawlers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawlers`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(M,{account_id:l}));o(u,{successLabel:`Loaded`})})},F={command:`crawlers`,describe:`Operations for crawlers`,builder:e=>e.command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var I={method:`POST`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/publisher/stripe`,errors:{400:`BadRequestError`}};function L(e){return e.usage(`$0 pay-per-crawl publisher stripe create
18
-
19
- Creates the stripe config for a publisher.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`create`,describe:`Creates the stripe config for a publisher`,builder:L,handler:async e=>l({command:`pay-per-crawl publisher stripe create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl publisher stripe create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>i.send(I,{account_id:l}));o(u,{successLabel:`Created`})})};var z={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/publisher/stripe`,errors:{400:`BadRequestError`}};function re(e){return e.usage(`$0 pay-per-crawl publisher stripe delete
20
-
21
- Deletes the stripe config for a publisher.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const B={command:`delete`,describe:`Deletes the stripe config for a publisher`,builder:re,handler:async e=>l({command:`pay-per-crawl publisher stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl publisher stripe delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await p({force:!!e.force})){process.stderr.write(`Aborted.
22
- `);return}let u=await c(`Deleting`,async()=>i.send(z,{account_id:l}));o(u,{successLabel:`Deleted`})})};var V={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/publisher/stripe`,errors:{400:`BadRequestError`}};function H(e){return e.usage(`$0 pay-per-crawl publisher stripe get
23
-
24
- Gets the stripe config for a publisher.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get`,describe:`Gets the stripe config for a publisher`,builder:H,handler:async e=>l({command:`pay-per-crawl publisher stripe get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl publisher stripe get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(V,{account_id:l}));o(u,{successLabel:`Loaded`})})},W={command:`stripe`,describe:`Operations for publisher.stripe`,builder:e=>e.command(R).command(B).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},G={command:`publisher`,describe:`Operations for publisher`,builder:e=>e.command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/signature_link`,errors:{400:`BadRequestError`}};function q(e){return e.usage(`$0 pay-per-crawl terms get-signature-link
25
-
26
- Gets a download link for the account's signed pay-per-crawl terms.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get-signature-link`,describe:`Get signed pay-per-crawl terms link`,builder:q,handler:async e=>l({command:`pay-per-crawl terms get-signature-link`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl terms get-signature-link`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/signature_link`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(K,{account_id:l}));o(u,{successLabel:`Loaded`})})};var Y={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/terms/signature`,query:[`remote`],errors:{400:`BadRequestError`}};function X(e){return e.usage(`$0 pay-per-crawl terms get-signature
27
-
28
- Gets the account's pay-per-crawl terms signature status.`).option(`remote`,{type:`boolean`,description:`Refresh the signature status from Ironclad.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get-signature`,describe:`Get pay-per-crawl terms signature status`,builder:X,handler:async e=>l({command:`pay-per-crawl terms get-signature`,classification:{safeFlags:[`remote`,`dry-run`]}},e,async()=>{let i={remote:e.remote};if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl terms get-signature`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/terms/signature`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Y,{account_id:u,...i}));o(d,{successLabel:`Loaded`})})};var ae={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/terms`,errors:{400:`BadRequestError`}};function oe(e){return e.usage(`$0 pay-per-crawl terms get
29
-
30
- Gets the pay-per-crawl terms and conditions contract.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get`,describe:`Get pay-per-crawl terms`,builder:oe,handler:async e=>l({command:`pay-per-crawl terms get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl terms get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/terms`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(ae,{account_id:l}));o(u,{successLabel:`Loaded`})})};var ce={method:`POST`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/terms/signature`,query:[`event_type`,`vid`],errors:{400:`BadRequestError`}};function le(e){return e.usage(`$0 pay-per-crawl terms send-signature-event
31
-
32
- Records that an account displayed or agreed to the pay-per-crawl terms.`).option(`event-type`,{type:`string`,description:`The terms activity to record.`,choices:[`agreed`,`displayed`],demandOption:!0}).option(`vid`,{type:`string`,description:`Ironclad contract version ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`send-signature-event`,describe:`Record pay-per-crawl terms activity`,builder:le,handler:async e=>l({command:`pay-per-crawl terms send-signature-event`,classification:{safeFlags:[`event-type`,`dry-run`]}},e,async()=>{let i={event_type:e[`event-type`],vid:e.vid};if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl terms send-signature-event`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/terms/signature`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Creating`,async()=>l.send(ce,{account_id:u,...i}));o(d,{successLabel:`Created`})})},de={command:`terms`,describe:`Operations for terms`,builder:e=>e.command(se).command(ie).command(J).command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var fe={method:`GET`,path:t=>e`/zones/${t.zone_id}/pay-per-crawl/can_be_enabled`,errors:{400:`BadRequestError`}};function pe(e){return e.usage(`$0 pay-per-crawl zones get-can-be-enabled
33
-
34
- Gets whether pay-per-crawl can be enabled for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`get-can-be-enabled`,describe:`Get pay-per-crawl zone eligibility`,builder:pe,handler:async e=>l({command:`pay-per-crawl zones get-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-crawl zones get-can-be-enabled`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/can_be_enabled`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(fe,{zone_id:r}));o(a,{successLabel:`Loaded`})})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/zones_can_be_enabled/query`,body:`json`,errors:{400:`BadRequestError`}};function Q(e){return e.usage(`$0 pay-per-crawl zones query-can-be-enabled
35
-
36
- Provided a list of pay-per-crawl configured zones this method will return whether they can enable PPC or not.`).option(`zones`,{type:`string`,array:!0,description:`The zones field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Zone IDs to check for pay-per-crawl eligibility`})}const he={command:`query-can-be-enabled`,describe:`Gets the can_be_enabled zone setting`,builder:Q,handler:async e=>l({command:`pay-per-crawl zones query-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf pay-per-crawl zones query-can-be-enabled`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pay-per-crawl/zones_can_be_enabled/query`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({zones:e.zones}):u(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),n=await c(`Creating`,async()=>i.send(Z,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}let d=f({zones:e.zones}),p=await c(`Creating`,async()=>i.send(Z,{body:d,account_id:l}));o(p,{successLabel:`Created`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/zones_can_be_enabled`,body:`json`,errors:{400:`BadRequestError`}};function ge(e){return e.usage(`$0 pay-per-crawl zones set-can-be-enabled
37
-
38
- Allows an account admin to set the can_be_enabled setting on a list of zones. An omitted can_be_enabled value leaves that zone unchanged.`).option(`zones`,{type:`string`,description:`The zones field. 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:`Data for setting flag on zones`})}const _e={command:`set-can-be-enabled`,describe:`Set can_be_enabled setting on zones`,builder:ge,handler:async e=>l({command:`pay-per-crawl zones set-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf pay-per-crawl zones set-can-be-enabled`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pay-per-crawl/zones_can_be_enabled`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({zones:d(e.zones,`zones`)}):u(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),n=await c(`Updating`,async()=>i.send($,{body:t,account_id:l}));o(n,{successLabel:`Updated`});return}if(e.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let p=f({zones:d(e.zones,`zones`)}),m=await c(`Updating`,async()=>i.send($,{body:p,account_id:l}));o(m,{successLabel:`Updated`})})},ve={command:`zones`,describe:`Operations for zones`,builder:e=>e.command(me).command(he).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ye={command:`pay-per-crawl`,describe:`pay-per-crawl`,builder:e=>e.command(b).command(j).command(F).command(G).command(de).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ye as default};
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-MNz2D-PD.mjs";import{i as n}from"./context-q-6bMSL-.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-DaQ4MzBI.mjs";import{t as o}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as s,r as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/precursor`};function f(e){return e.usage("$0 precursor get\n\nRetrieve a zone's Precursor configuration: the zone-level `default_mode` and the ordered list of `enforcement_rules`.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`get`,describe:`Get Zone Precursor Config`,builder:f,handler:async e=>o({command:`precursor get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf precursor get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var m={method:`PUT`,path:t=>e`/zones/${t.zone_id}/precursor`,body:`json`};function h(e){return e.usage("$0 precursor update\n\nUpdates the Precursor configuration for a zone. `default_mode` sets the zone-level enforcement mode. `enforcement_rules` is the ordered list of rules that override enforcement for matching requests. This is a partial update: only the fields present in the request body are changed. - Sending an empty array (`[]`) clears all enforcement rules. - At least one of `default_mode` or `enforcement_rules` must be present; an empty body (`{}`) is rejected with `400`. - Rule `id` is read-only (assigned by Cloudflare) and ignored on input. - Rule `mode` must be `min-friction` or `max-security` (`off` is not a valid rule mode; use `default_mode` to disable enforcement). - Rule `expression` is limited to 4000 characters. The limit applies to each rule individually, not to the combined size of all rules.").option(`default-mode`,{type:`string`,description:`The zone-level Precursor enforcement mode applied to requests that do
3
- not match a more specific enforcement rule.
4
- `,choices:[`off`,`min-friction`,`max-security`]}).coerce(`default-mode`,e=>u(e,`default-mode`,`text`)).option(`enforcement-rules`,{type:`string`,description:`The ordered list of enforcement rules for the zone. 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 g={command:`update`,describe:`Update Zone Precursor Config`,builder:h,handler:async e=>o({command:`precursor update`,classification:{safeFlags:[`default-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf precursor update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({default_mode:e[`default-mode`],enforcement_rules:c(e[`enforcement-rules`],`enforcement-rules`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(m,{body:t,zone_id:u}));r(n,{successLabel:`Updated`});return}let d=l({default_mode:e[`default-mode`],enforcement_rules:c(e[`enforcement-rules`],`enforcement-rules`)}),f=await a(`Updating`,async()=>o.send(m,{body:d,zone_id:u}));r(f,{successLabel:`Updated`})})},_={command:`precursor`,describe:`Precursor settings for a zone`,builder:e=>e.command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_ as default};