cf 1.0.0-beta.12 → 1.0.0-beta.14

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 (306) hide show
  1. package/dist/_meta/commands.json +4648 -3810
  2. package/dist/_meta/hand-written-commands.json +356 -23
  3. package/dist/_meta/schemas.json +2522 -2143
  4. package/dist/abuse-reports-CVv52Q2w.mjs +24 -0
  5. package/dist/access-k1QjF5rE.mjs +2 -0
  6. package/dist/account-tags-RhvWOkOf.mjs +15 -0
  7. package/dist/{accounts-BSd4b-1j.mjs → accounts--3lrEkmu.mjs} +67 -80
  8. package/dist/{acm-BfI0p2sX.mjs → acm-BJxINEcu.mjs} +2 -2
  9. package/dist/{addressing-lfeJf7YB.mjs → addressing-BqByG9JW.mjs} +55 -43
  10. package/dist/{agent-memory-CP1qpn-y.mjs → agent-memory-D4dQMGbh.mjs} +2 -2
  11. package/dist/{ai-jFzFBANM.mjs → ai-CRkQ4pjC.mjs} +18 -16
  12. package/dist/{ai-audit-B_tSl78A.mjs → ai-audit-fMSn4c5L.mjs} +1 -1
  13. package/dist/ai-gateway-CbhvQK4L.mjs +80 -0
  14. package/dist/ai-search-CvVSnOA0.mjs +79 -0
  15. package/dist/{ai-security-CKGE547U.mjs → ai-security-Z_qpI92I.mjs} +1 -1
  16. package/dist/{alerting-CuxoqG3S.mjs → alerting-CpbCB8br.mjs} +5 -5
  17. package/dist/analytics-DkY9dOP1.mjs +17 -0
  18. package/dist/{analytics_engine-BoapM9wd.mjs → analytics_engine-DE_jvlx_.mjs} +1 -1
  19. package/dist/{api-security-Nk_bg-Kg.mjs → api-security-BHnOU5MM.mjs} +25 -25
  20. package/dist/argo-DhC5L_aN.mjs +14 -0
  21. package/dist/{artifacts-BS6cEqCB.mjs → artifacts-CrIupY7P.mjs} +3 -3
  22. package/dist/{audit-logs-x5tLqeX2.mjs → audit-logs-BjeBxTox.mjs} +1 -1
  23. package/dist/{auth-CKotxfap.mjs → auth-BNYfOMl0.mjs} +1 -1
  24. package/dist/{auth-AobvBmz4.mjs → auth-CAWalgW0.mjs} +1 -1
  25. package/dist/auth-DOwC01PW.mjs +2 -0
  26. package/dist/{auth-token-CtguMdmF.mjs → auth-token-Dop0wLCw.mjs} +1 -1
  27. package/dist/{autoconfig-PfnbLuEO.mjs → autoconfig-RQ3HS4m1.mjs} +151 -151
  28. package/dist/{basin-catalog-Ddi-t3q9.mjs → basin-catalog-DZ7QV-_N.mjs} +3 -3
  29. package/dist/{billing-CDMc4tvX.mjs → billing-BFyte9fL.mjs} +3 -3
  30. package/dist/bot-management-DXcbV3am.mjs +9 -0
  31. package/dist/{botnet-feed-CVwRm42k.mjs → botnet-feed-bGGp_cwX.mjs} +1 -1
  32. package/dist/{brand-protection-DfNf5REj.mjs → brand-protection-DN36XkxH.mjs} +2 -2
  33. package/dist/browser-run-hHD1RT43.mjs +42 -0
  34. package/dist/build-BhpWYgNm.mjs +2 -0
  35. package/dist/{build-BKPVP5ip.mjs → build-CCe7IrWT.mjs} +1 -1
  36. package/dist/{builds-BG5DHqU3.mjs → builds-6aO61R9R.mjs} +4 -4
  37. package/dist/{cache-C05hHXUp.mjs → cache-C5YJpMqi.mjs} +6 -6
  38. package/dist/{certificate-authorities-DyCFmZwR.mjs → certificate-authorities-CbqDAktQ.mjs} +1 -1
  39. package/dist/cf-oRSQKirD.mjs +18 -0
  40. package/dist/chunk-DSGVRFIS-CPI5cYtB.mjs +2 -0
  41. package/dist/{chunk-FT2NMTJB-DQ7s3x7Q.mjs → chunk-NDZDTP46-Civns3WA.mjs} +3 -3
  42. package/dist/{chunk-AUSY7DKT-BJX6Fdc4.mjs → chunk-TAK63GWY-DdMktrgc.mjs} +9 -2
  43. package/dist/{cli-D9qlPB-6.mjs → cli-ht4q6i2y.mjs} +1 -1
  44. package/dist/{client-certificates-B-m8rfM9.mjs → client-certificates-balaN_my.mjs} +1 -1
  45. package/dist/{client-side-security-M4oIUqID.mjs → client-side-security-3_4Ermmg.mjs} +3 -3
  46. package/dist/{cloud-connector-B63Dwn6n.mjs → cloud-connector-avx27sLw.mjs} +1 -1
  47. package/dist/cloudflared-D83U8Yn3.mjs +2 -0
  48. package/dist/{cloudforce-one-Dlc1GNFy.mjs → cloudforce-one-CXdeqJ9l.mjs} +143 -185
  49. package/dist/{command-VuxpEvmH.mjs → command-9VAc7b30.mjs} +1 -1
  50. package/dist/{command-CUkXxZsc.mjs → command-B_Ixlz8Q.mjs} +1 -1
  51. package/dist/{command-ZBQ1WITj.mjs → command-Bpzp8Mz2.mjs} +1 -1
  52. package/dist/{command-DBaNgfA4.mjs → command-BtDY_MKv.mjs} +1 -1
  53. package/dist/command-CUNMrMou.mjs +2 -0
  54. package/dist/{command-SS1z_t68.mjs → command-Ckb9FufU.mjs} +1 -1
  55. package/dist/{command-BWlpCtHe.mjs → command-CtVUNm__.mjs} +1 -1
  56. package/dist/{command-DyE8v4sd.mjs → command-CyJQ40fc.mjs} +1 -1
  57. package/dist/{command-BlGILcTA.mjs → command-DPX9sJVi.mjs} +1 -1
  58. package/dist/{command-CXxh5Hce.mjs → command-DXaRn1ls.mjs} +1 -1
  59. package/dist/{command-CRl00uA2.mjs → command-DjEJaOwV.mjs} +1 -1
  60. package/dist/{command-Rv2MR-eh.mjs → command-DtgJilOK.mjs} +1 -1
  61. package/dist/{command-CKQlxypn.mjs → command-OHov3PEc.mjs} +1 -1
  62. package/dist/{command-DEQSv-S1.mjs → command-OWe3v69l.mjs} +1 -1
  63. package/dist/{command-BQpXcGKV.mjs → command-SmWD-MeI.mjs} +1 -1
  64. package/dist/{completions-lf50FBGm.mjs → completions-CuqAO3N_.mjs} +11 -11
  65. package/dist/{connector-interrupts-DHN1KtUE.mjs → connector-interrupts-ftd10Du-.mjs} +1 -1
  66. package/dist/{connector-telemetry-events-CHg7FmXh.mjs → connector-telemetry-events-TwDZYdEM.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-CSifYi9r.mjs → connector-telemetry-snapshots-CZxkOuC3.mjs} +1 -1
  68. package/dist/{connectors-0UwPUav-.mjs → connectors-6lVSr-fd.mjs} +1 -1
  69. package/dist/containers-Dqs_ZnO2.mjs +78 -0
  70. package/dist/containers-ncw3bd3a.mjs +376 -0
  71. package/dist/{content-scan-COyTz0Wb.mjs → content-scan-BWFbqfQ0.mjs} +3 -3
  72. package/dist/{context-Bwkz4Lm_.mjs → context-BBLtgdR1.mjs} +2 -2
  73. package/dist/cps-C5phNoVU.mjs +6 -0
  74. package/dist/{csamScanner-jez2EYXC.mjs → csamScanner-BwZNZu0A.mjs} +3 -3
  75. package/dist/{ct-alerting-CACDrY0E.mjs → ct-alerting-DPp3qLqO.mjs} +1 -1
  76. package/dist/{custom-certificates-BBd92YlF.mjs → custom-certificates-pfpZcr06.mjs} +5 -5
  77. package/dist/{custom-csrs-DTwBiNMX.mjs → custom-csrs-DrvGRAkl.mjs} +2 -2
  78. package/dist/{custom-hostnames-DIWlqvN9.mjs → custom-hostnames-wGtmFbz1.mjs} +4 -4
  79. package/dist/{custom-nameservers-DISy8v8u.mjs → custom-nameservers-HTG6MPKv.mjs} +1 -1
  80. package/dist/{custom-pages-BHXO_NFv.mjs → custom-pages-DqEHBSVt.mjs} +2 -2
  81. package/dist/d1-EQMUlHTJ.mjs +94 -0
  82. package/dist/{dcv-delegation-Buq0hcm_.mjs → dcv-delegation-D6nj0Z5N.mjs} +1 -1
  83. package/dist/deploy-B22sEVHd.mjs +2 -0
  84. package/dist/deploy-context-DmG9rgPO.mjs +56 -0
  85. package/dist/deploy-input-BCjcuP6u.mjs +2 -0
  86. package/dist/{dev-D8FGPKRt.mjs → dev-ClhhXuNU.mjs} +1 -1
  87. package/dist/diagnostics-tqHjq-Pl.mjs +15 -0
  88. package/dist/dialog-D4Y9ocuF.mjs +2 -0
  89. package/dist/dist-DmRM6WSZ.mjs +449 -0
  90. package/dist/dist-uRuGmkMB.mjs +60 -0
  91. package/dist/{dls-8D00tqvC.mjs → dls-BEHj4X9T.mjs} +1 -1
  92. package/dist/{dns-firewall-DIiF4pro.mjs → dns-firewall-zwbkutyf.mjs} +1 -1
  93. package/dist/{dns-C-A5pwf3.mjs → dns-n4mfYBZg.mjs} +7 -7
  94. package/dist/dry-run-DRj2_uV3.mjs +2 -0
  95. package/dist/{durable-objects-CnIqbj84.mjs → durable-objects-CQ2dHhho.mjs} +1 -1
  96. package/dist/{email-auth-v97Md32E.mjs → email-auth-DOi6yOt3.mjs} +1 -1
  97. package/dist/{email-routing-I29RG4hb.mjs → email-routing-WcSPt22u.mjs} +5 -5
  98. package/dist/{email-security-BCarmbky.mjs → email-security-BXu3OGay.mjs} +15 -15
  99. package/dist/{email-sending-CsHk2HAJ.mjs → email-sending-B9zTlIjt.mjs} +2 -2
  100. package/dist/{error-sanitization-BWnGnB73.mjs → error-sanitization-DE_zSrXw.mjs} +1 -1
  101. package/dist/error-sanitization-DOCQ9Ykh.mjs +2 -0
  102. package/dist/{fieldExtractors-GIVe9jZa.mjs → fieldExtractors-B37m2lKW.mjs} +1 -1
  103. package/dist/{firewall-DpgFqJr3.mjs → firewall-CRtYO0Ha.mjs} +7 -7
  104. package/dist/{flagship-BVaXXlsX.mjs → flagship-DvTFZSay.mjs} +3 -3
  105. package/dist/{fraud-B5GQdEF2.mjs → fraud-uSyibsit.mjs} +5 -5
  106. package/dist/{google-tag-gateway-C4O61lp-.mjs → google-tag-gateway-BFXiiokq.mjs} +1 -1
  107. package/dist/hand-written-dry-run-B82fRl2N.mjs +2 -0
  108. package/dist/{healthchecks-BwYMnKSF.mjs → healthchecks-27u7b7Jb.mjs} +5 -5
  109. package/dist/{hostnames-DhrGRFeI.mjs → hostnames-DvaUSzsj.mjs} +1 -1
  110. package/dist/hyperdrive-BzJvPdu6.mjs +37 -0
  111. package/dist/{iam-sRKDU2Z3.mjs → iam-Dl3cU9GI.mjs} +1 -1
  112. package/dist/{images-DXdekLVs.mjs → images-C2OkI1j7.mjs} +6 -6
  113. package/dist/index.mjs +1 -1
  114. package/dist/init-Da8pe296.mjs +43 -0
  115. package/dist/{intel-CnVeSjIS.mjs → intel-DoB1g_K7.mjs} +2 -2
  116. package/dist/interactive-BW9T1D1q.mjs +48 -0
  117. package/dist/interactive-DGUWZ2Gk.mjs +2 -0
  118. package/dist/{ips-COCUG8mk.mjs → ips-BRt68epr.mjs} +1 -1
  119. package/dist/k2-_eq5ZY2t.mjs +11 -0
  120. package/dist/{keyless-certificates-l2_S__h3.mjs → keyless-certificates-DaO2yqYu.mjs} +2 -2
  121. package/dist/{keys-CDZreums.mjs → keys-7BQ3Zq6Y.mjs} +1 -1
  122. package/dist/{kv-DkpKVimq.mjs → kv-BTYCXKML.mjs} +4 -4
  123. package/dist/{lazy-command-_vZGz6mv.mjs → lazy-command-CDWwCsD2.mjs} +1 -1
  124. package/dist/{leaked-credential-checks-edbapECI.mjs → leaked-credential-checks-CPHOK_dE.mjs} +1 -1
  125. package/dist/load-balancers-Bu9pd2SV.mjs +76 -0
  126. package/dist/{local-C0lQ9sTg.mjs → local-BcPM4I0s.mjs} +1 -1
  127. package/dist/local-BundUuDT.mjs +2 -0
  128. package/dist/{local-runtime-DtnWXN0a.mjs → local-runtime-BHKyRlCP.mjs} +1 -1
  129. package/dist/{login-DeOM4v0L.mjs → login-BBYC_BtH.mjs} +1 -1
  130. package/dist/{login-BrjOuHKu.mjs → login-D2uoWhWh.mjs} +1 -1
  131. package/dist/{logo-matches-CF8321pb.mjs → logo-matches-Bc1DQ4-g.mjs} +1 -1
  132. package/dist/{logos-Bd8xNRKW.mjs → logos-X5B8z7Iv.mjs} +1 -1
  133. package/dist/{logpush-BYk3qqwY.mjs → logpush-C2ENi1et.mjs} +7 -7
  134. package/dist/{logs-Jcj2NN8H.mjs → logs-BKDz7kBW.mjs} +1 -1
  135. package/dist/{magic-cloud-networking-Dgdb9H0f.mjs → magic-cloud-networking-B60Gld8A.mjs} +6 -6
  136. package/dist/{magic-network-monitoring-CxVU4MZB.mjs → magic-network-monitoring-CxXI3Y-H.mjs} +4 -4
  137. package/dist/{magic-transit-KDyfUgTv.mjs → magic-transit-ZCSaCbl8.mjs} +171 -168
  138. package/dist/{managed-defense-CxaDeNUd.mjs → managed-defense-DrxMb7xi.mjs} +1 -1
  139. package/dist/{managed-transforms-C7rT5E-x.mjs → managed-transforms-AI7KrRU1.mjs} +1 -1
  140. package/dist/{matches-BtKqG8T9.mjs → matches-rPMLS3Ip.mjs} +1 -1
  141. package/dist/mcp-DXUMvEWt.mjs +32 -0
  142. package/dist/mesh-MmBCQ37q.mjs +26 -0
  143. package/dist/{migrate-DHlfR_gZ.mjs → migrate-CZNq63Uj.mjs} +1 -1
  144. package/dist/{monetization-pLalYYMI.mjs → monetization-DQE5VtUO.mjs} +2 -2
  145. package/dist/{mtls-certificates-DYA9Wu-c.mjs → mtls-certificates-DwkEb-Hy.mjs} +2 -2
  146. package/dist/{network-DrJxPWXQ.mjs → network-BcfobxQY.mjs} +1 -1
  147. package/dist/{network-interconnects-D73MlYG8.mjs → network-interconnects-BU3tN_Ab.mjs} +10 -11
  148. package/dist/o11y-BBv7nedp.mjs +93 -0
  149. package/dist/{oauth-B08YQ4xq.mjs → oauth-BUr8bPwo.mjs} +1 -1
  150. package/dist/{oauth-clients-CkPDLFd-.mjs → oauth-clients-qWVImhHE.mjs} +3 -3
  151. package/dist/{oauth-TGbM1Q0V.mjs → oauth-n8um6MFk.mjs} +1 -1
  152. package/dist/{oauth-scopes-VgliqcQe.mjs → oauth-scopes-CdeIgJIx.mjs} +1 -1
  153. package/dist/organization-CJeOVWH7.mjs +71 -0
  154. package/dist/{organizations-Dk0D9ukm.mjs → organizations-BpfoqZcG.mjs} +1 -1
  155. package/dist/{origin-ca-certificates-BSFqMTn-.mjs → origin-ca-certificates-Bimf07RF.mjs} +2 -2
  156. package/dist/origin-post-quantum-encryption-CM-If38w.mjs +6 -0
  157. package/dist/{origin-tls-client-auth-BzE3WpcN.mjs → origin-tls-client-auth-BPwYPhc9.mjs} +3 -3
  158. package/dist/{output-BGqhvqe2.mjs → output-BOe-3AQG.mjs} +1 -1
  159. package/dist/{page-rules-BKaU37cM.mjs → page-rules-DOeekMrj.mjs} +4 -4
  160. package/dist/pages-Bn0Sg1ay.mjs +54 -0
  161. package/dist/pay-per-crawl-qJpseNNx.mjs +38 -0
  162. package/dist/pay-per-use-C1MWKJ4O.mjs +33 -0
  163. package/dist/pipelines-rCwXQw6S.mjs +44 -0
  164. package/dist/{precursor-DmQ32-Sp.mjs → precursor-Bk8Pp6jT.mjs} +2 -2
  165. package/dist/previews-BEheHO3T.mjs +4 -0
  166. package/dist/process-2wmDCy17.mjs +2 -0
  167. package/dist/{progress-BYVZuEcG.mjs → progress-CQqDtgmF.mjs} +1 -1
  168. package/dist/prompt-C8FyienX.mjs +3 -0
  169. package/dist/{queries-DPBkVynK.mjs → queries-DJ8looyq.mjs} +1 -1
  170. package/dist/{queues-CCXRs98q.mjs → queues-BBH9Q-Tt.mjs} +7 -7
  171. package/dist/{r2-BKuBSW8h.mjs → r2-CdJKpP2w.mjs} +52 -49
  172. package/dist/{radar-Gv1yFoRX.mjs → radar-CdvQL4xm.mjs} +1 -1
  173. package/dist/raw-fetch-DbXN3SlE.mjs +2 -0
  174. package/dist/{realtime-CVl-rvgx.mjs → realtime-onrXppzh.mjs} +9 -9
  175. package/dist/{registrar-swlnh22i.mjs → registrar-CbEBc5IE.mjs} +2 -2
  176. package/dist/{registrar-sandbox-cmOYDnkp.mjs → registrar-sandbox-BJhn1HFT.mjs} +3 -3
  177. package/dist/{registry-C20J1MW0.mjs → registry-PI6sO95I.mjs} +1 -1
  178. package/dist/{reporting-Bgwsvol1.mjs → reporting-bXZY6obP.mjs} +1 -1
  179. package/dist/{request-headers-CUee83pa.mjs → request-headers-D8L95bEQ.mjs} +1 -1
  180. package/dist/{request-tracers-BBiJvVDz.mjs → request-tracers-CihskC2A.mjs} +1 -1
  181. package/dist/{resolve-DvxgnWjL.mjs → resolve-CaTBV-c6.mjs} +1 -1
  182. package/dist/resolve-DCGSzUDQ.mjs +2 -0
  183. package/dist/{resource-sharing-C1JiYLbl.mjs → resource-sharing-DDqcCHVs.mjs} +11 -11
  184. package/dist/{resource-tagging-C9VOSlDR.mjs → resource-tagging-D63RpBce.mjs} +1 -1
  185. package/dist/{rules-BDunCGMj.mjs → rules-CAW0-Wde.mjs} +1 -1
  186. package/dist/rulesets-CPir63Qc.mjs +37 -0
  187. package/dist/{rum-B7XiECe9.mjs → rum-BfwTcuup.mjs} +1 -1
  188. package/dist/{run-CrZgB8L_.mjs → run-CW2Cgi0S.mjs} +1 -1
  189. package/dist/run-DEynXvCc.mjs +2 -0
  190. package/dist/{schema-DC0kdqgV.mjs → schema-elj12WOx.mjs} +1 -1
  191. package/dist/{schema-flags-BUZR9SLd.mjs → schema-flags-BTItUu1K.mjs} +1 -1
  192. package/dist/{scim-CORcs2wK.mjs → scim-CtZ1FeQE.mjs} +1 -1
  193. package/dist/{secrets-store-BoZQaFey.mjs → secrets-store-BIuBYUJT.mjs} +2 -2
  194. package/dist/{security-insights-DblK_6sg.mjs → security-insights-DfUus0bs.mjs} +3 -3
  195. package/dist/{security-txt-Dl7RPnRb.mjs → security-txt-CgZOsAIZ.mjs} +1 -1
  196. package/dist/{session-BWe9et4K.mjs → session-BcM8Vyyx.mjs} +1 -1
  197. package/dist/shared-CpS23WwR.mjs +2 -0
  198. package/dist/{smart-shield-DX0-8ruu.mjs → smart-shield-ClgB7r-9.mjs} +5 -5
  199. package/dist/{snippets-BFN-Lg3K.mjs → snippets-DLO3iFAg.mjs} +1 -1
  200. package/dist/spawn-D07wH-MH.mjs +10 -0
  201. package/dist/{spectrum-HYWLWB0X.mjs → spectrum-B6qkjR_Z.mjs} +5 -5
  202. package/dist/{speed-Dj0YhfRe.mjs → speed-DX5X2EIR.mjs} +1 -1
  203. package/dist/sql-CF044HDW.mjs +4 -0
  204. package/dist/src-BMATTZU_.mjs +125 -0
  205. package/dist/{ssl-BQL1fNtD.mjs → ssl-CM-rChEC.mjs} +5 -5
  206. package/dist/{startup-profile-0X5ebbng.mjs → startup-profile-CrtCP-6-.mjs} +1 -1
  207. package/dist/startup-profile-D662WI9s.mjs +2 -0
  208. package/dist/state-D7uNYnoi.mjs +2 -0
  209. package/dist/{state-Dy6-rKNd.mjs → state-DIiIGEtR.mjs} +1 -1
  210. package/dist/{stream-DKv2TtZN.mjs → stream-5EmUOQvy.mjs} +5 -5
  211. package/dist/{submit-Byt2KBGI.mjs → submit-lEAaRSMR.mjs} +1 -1
  212. package/dist/{tags-BIBsdG68.mjs → tags-CX23P4jg.mjs} +1 -1
  213. package/dist/telemetry-0Y5hAtCX.mjs +2 -0
  214. package/dist/{telemetry-bu3txnIR.mjs → telemetry-ZlCi5Xhc.mjs} +1 -1
  215. package/dist/{tenant-Bs4Ac4n3.mjs → tenant-DnI7QziH.mjs} +1 -1
  216. package/dist/{tenant-custom-nameservers-DcaELeCE.mjs → tenant-custom-nameservers-MR0dlcGm.mjs} +1 -1
  217. package/dist/{tools-BbTX7rlM.mjs → tools-CSc5DmFi.mjs} +1 -1
  218. package/dist/{tunnels-DWcrz9Sf.mjs → tunnels-NzYpsfi_.mjs} +15 -15
  219. package/dist/{turnstile-2MIGp2ce.mjs → turnstile-M7sKCEz3.mjs} +11 -11
  220. package/dist/{update-check-CfB0PNTY.mjs → update-check-HFkPml6x.mjs} +1 -1
  221. package/dist/update-check-aTutXNRd.mjs +2 -0
  222. package/dist/update-check-worker.mjs +1 -1
  223. package/dist/{url-info-B8udoxlx.mjs → url-info-Dos9VOXV.mjs} +1 -1
  224. package/dist/{url-normalization-C6AdWtaE.mjs → url-normalization-CZbFOq_v.mjs} +2 -2
  225. package/dist/{url-scanner-Dg0c_yVb.mjs → url-scanner-B7quLPGW.mjs} +2 -2
  226. package/dist/{user-BLZ-0Bgv.mjs → user-rXca0J9M.mjs} +14 -14
  227. package/dist/values-D-rrZrDa.mjs +4 -0
  228. package/dist/{vectorize-DEUSEQXY.mjs → vectorize-D2tf_oA8.mjs} +4 -4
  229. package/dist/version-BGnqDvNR.mjs +2 -0
  230. package/dist/waiting-rooms-DrA3-0bw.mjs +53 -0
  231. package/dist/{web-assets-CLZdWOmN.mjs → web-assets-DQAfvPT9.mjs} +3 -3
  232. package/dist/{web3-DjeavuLg.mjs → web3-MI0GQDnu.mjs} +5 -5
  233. package/dist/workers-By6Pf8fv.mjs +40 -0
  234. package/dist/{workers-builds-COn5Ne5G.mjs → workers-builds-6YsWsCmC.mjs} +2 -2
  235. package/dist/{workers-for-platforms-tchCXwNF.mjs → workers-for-platforms-DL8fC1qR.mjs} +4 -6
  236. package/dist/workers-vpc-BYx6sbgd.mjs +13 -0
  237. package/dist/workflows-ByQLnV0E.mjs +52 -0
  238. package/dist/{wrangler-migration-BpJqCFAa.mjs → wrangler-migration-C6FKHER1.mjs} +1 -1
  239. package/dist/{zaraz-BvQZB0YY.mjs → zaraz-CgbpmA85.mjs} +1 -1
  240. package/dist/{zero-trust-FStq4uhn.mjs → zero-trust-CpjTkkWt.mjs} +418 -402
  241. package/dist/{zone-tymlghWb.mjs → zone-DnKIe6po.mjs} +1 -1
  242. package/dist/{zones-Bz6dgT9_.mjs → zones--5ZzsDmQ.mjs} +15 -15
  243. package/package.json +25 -26
  244. package/dist/abuse-reports-Cy9RcWPu.mjs +0 -24
  245. package/dist/access-DwJm1qet.mjs +0 -2
  246. package/dist/account-tags-d0RkEw6s.mjs +0 -15
  247. package/dist/ai-gateway-CJaUlfGc.mjs +0 -82
  248. package/dist/ai-search-PTlpY1T9.mjs +0 -79
  249. package/dist/analytics-NPND7aHB.mjs +0 -20
  250. package/dist/argo-DYfLQhd2.mjs +0 -10
  251. package/dist/auth-CBtzZ3Sw.mjs +0 -2
  252. package/dist/bot-management-UrCM3P8K.mjs +0 -9
  253. package/dist/browser-run-DVaiBLYX.mjs +0 -46
  254. package/dist/build-C4giET85.mjs +0 -2
  255. package/dist/cf-B9aqZZKD.mjs +0 -18
  256. package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +0 -2
  257. package/dist/cloudflared-B48cfu95.mjs +0 -2
  258. package/dist/command-CzvlHvov.mjs +0 -2
  259. package/dist/containers-DRzgE46U.mjs +0 -375
  260. package/dist/containers-DuIsM7lM.mjs +0 -78
  261. package/dist/cps-B7_BJaAU.mjs +0 -6
  262. package/dist/d1-MvAQMvvo.mjs +0 -89
  263. package/dist/deploy-BS47vZvJ.mjs +0 -2
  264. package/dist/deploy-context-Cfushp8j.mjs +0 -56
  265. package/dist/deploy-input-BAhS5LYx.mjs +0 -2
  266. package/dist/diagnostics-ChDfJ-Gv.mjs +0 -15
  267. package/dist/dialog-CL1Zy4pn.mjs +0 -2
  268. package/dist/dist-8rP3V95o.mjs +0 -57
  269. package/dist/dist-CYFkGHYv.mjs +0 -487
  270. package/dist/dry-run-DmsbOMF1.mjs +0 -2
  271. package/dist/error-sanitization-C_a2LxOK.mjs +0 -2
  272. package/dist/hyperdrive-DAA8Fazg.mjs +0 -37
  273. package/dist/init-j47MT4Qe.mjs +0 -39
  274. package/dist/interactive-Dqv0RWVU.mjs +0 -42
  275. package/dist/interactive-Wpd3FcDc.mjs +0 -2
  276. package/dist/k2-CmHkArHL.mjs +0 -13
  277. package/dist/load-balancers-C5YMvhXD.mjs +0 -76
  278. package/dist/local-D5L5Bwju.mjs +0 -2
  279. package/dist/mcp-QDd1Iyc0.mjs +0 -32
  280. package/dist/mesh-DtrIzl5z.mjs +0 -26
  281. package/dist/observability-CvN9oxAo.mjs +0 -80
  282. package/dist/organization-DIwqRBBV.mjs +0 -75
  283. package/dist/origin-post-quantum-encryption-BOKWKDTY.mjs +0 -6
  284. package/dist/pages-2Xg-lrMf.mjs +0 -54
  285. package/dist/pay-per-crawl-5-KTQXRr.mjs +0 -65
  286. package/dist/pay-per-use-sGebKzNK.mjs +0 -6
  287. package/dist/pipelines-BM-T7mMK.mjs +0 -44
  288. package/dist/previews-DDQ9ACDJ.mjs +0 -4
  289. package/dist/prompt-F5wxc8zq.mjs +0 -3
  290. package/dist/raw-fetch-DyYWa923.mjs +0 -2
  291. package/dist/resolve-qwL1LmKN.mjs +0 -2
  292. package/dist/rulesets-BMGxrnv9.mjs +0 -37
  293. package/dist/run-nNxXb_Cv.mjs +0 -2
  294. package/dist/shared-0N31BXkY.mjs +0 -2
  295. package/dist/spawn-DZ9A-xXb.mjs +0 -10
  296. package/dist/src-CAiZlihY.mjs +0 -117
  297. package/dist/startup-profile-CXnsF4c7.mjs +0 -2
  298. package/dist/state-BA2CanJ_.mjs +0 -2
  299. package/dist/telemetry-DBXOMuLh.mjs +0 -2
  300. package/dist/update-check-B-CvDAUz.mjs +0 -2
  301. package/dist/values-BUK-m0Jg.mjs +0 -4
  302. package/dist/version-BZNc7Y3t.mjs +0 -2
  303. package/dist/waiting-rooms-BycGk2Y0.mjs +0 -53
  304. package/dist/workers-C_SfyU-v.mjs +0 -38
  305. package/dist/workers-vpc-CKts8Av0.mjs +0 -13
  306. package/dist/workflows-BibtWuOx.mjs +0 -43
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-AobvBmz4.mjs";import{t}from"./output-BGqhvqe2.mjs";import{t as n}from"./dry-run-DmsbOMF1.mjs";import{t as r}from"./progress-BYVZuEcG.mjs";import{t as i}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as a,t as o}from"./body-parser-DkHKPkJ7.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{a as c,i as l,n as u}from"./prompt-F5wxc8zq.mjs";import{t as d}from"./cli-types-9oYmRTHJ.mjs";function f(e){return e.usage(`$0 origin-ca-certificates create
2
+ import{n as e}from"./auth-CAWalgW0.mjs";import{t}from"./output-BOe-3AQG.mjs";import{t as n}from"./dry-run-DRj2_uV3.mjs";import{t as r}from"./progress-CQqDtgmF.mjs";import{t as i}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as a,t as o}from"./body-parser-DkHKPkJ7.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{a as c,i as l,n as u}from"./prompt-C8FyienX.mjs";import{t as d}from"./cli-types-9oYmRTHJ.mjs";function f(e){return e.usage(`$0 origin-ca-certificates create
3
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`]}).option(`requested-validity`,{type:`number`,description:`The number of days for which the certificate should be valid.`,default:5475}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`create`,describe:`Create Certificate`,builder:f,handler:async u=>i({command:`origin-ca-certificates create`,classification:{safeFlags:[`request-type`,`dry-run`]}},u,async()=>{if(u.dryRun){n({command:`cf origin-ca-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/certificates`,pathParams:{},bodyKind:`json`,body:u.body===void 0?o({csr:s(u.csr,`csr`,`text`),hostnames:u.hostnames,request_type:s(u[`request-type`],`request-type`,`text`),requested_validity:u[`requested-validity`]}):a(u.body)});return}let i=await e(u);if(u.body){let e=a(u.body),n=await r(`Creating`,async()=>i.originCaCertificates.create({...e}));t(n,{successLabel:`Created`});return}if(u.csr===void 0&&(u.csr=await c(`csr`,`The Certificate Signing Request (CSR). Must be newline-encoded.`)),u.hostnames===void 0)throw Error(`--hostnames is required (or pass --body with this field set).`);u[`request-type`]===void 0&&(u[`request-type`]=await l(`request-type`,`Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).`,[`origin-rsa`,`origin-ecc`,`keyless-certificate`]));let d=o({csr:s(u.csr,`csr`,`text`),hostnames:u.hostnames,request_type:s(u[`request-type`],`request-type`,`text`),requested_validity:u[`requested-validity`]}),f=await r(`Creating`,async()=>i.originCaCertificates.create({...d}));t(f,{successLabel:`Created`})})};function m(e){return e.usage(`$0 origin-ca-certificates delete <certificate-id>
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=>s(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 p={command:`create`,describe:`Create Certificate`,builder:f,handler:async u=>i({command:`origin-ca-certificates create`,classification:{safeFlags:[`request-type`,`dry-run`]}},u,async()=>{if(u.dryRun){n({command:`cf origin-ca-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/certificates`,pathParams:{},bodyKind:`json`,body:u.body===void 0?o({csr:s(u.csr,`csr`,`text`),hostnames:u.hostnames,request_type:u[`request-type`],requested_validity:u[`requested-validity`]}):a(u.body)});return}let i=await e(u);if(u.body){let e=a(u.body),n=await r(`Creating`,async()=>i.originCaCertificates.create({...e}));t(n,{successLabel:`Created`});return}if(u.csr===void 0&&(u.csr=await c(`csr`,`The Certificate Signing Request (CSR). Must be newline-encoded.`)),u.hostnames===void 0)throw Error(`--hostnames is required (or pass --body with this field set).`);u[`request-type`]===void 0&&(u[`request-type`]=await l(`request-type`,`Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).`,[`origin-rsa`,`origin-ecc`,`keyless-certificate`]));let d=o({csr:s(u.csr,`csr`,`text`),hostnames:u.hostnames,request_type:u[`request-type`],requested_validity:u[`requested-validity`]}),f=await r(`Creating`,async()=>i.originCaCertificates.create({...d}));t(f,{successLabel:`Created`})})};function m(e){return e.usage(`$0 origin-ca-certificates delete <certificate-id>
5
5
 
6
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 h={command:`delete <certificate-id>`,describe:`Revoke Certificate`,builder:m,handler:async a=>i({command:`origin-ca-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},a,async()=>{if(a.dryRun){n({command:`cf origin-ca-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/certificates/${a[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(a[`certificate-id`]))}`,pathParams:{"certificate-id":String(a[`certificate-id`]??``)},bodyKind:`none`});return}let i=await e(a);if(!await u({force:!!a.force})){process.stderr.write(`Aborted.
7
7
  `);return}let o=await r(`Deleting`,async()=>i.originCaCertificates.delete({certificate_id:a[`certificate-id`]}));t(o,{successLabel:`Deleted`})})};function g(e){return e.usage(`$0 origin-ca-certificates get <certificate-id>
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import{n as e}from"./auth-CAWalgW0.mjs";import{i as t}from"./context-BBLtgdR1.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-CQqDtgmF.mjs";import{t as a}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{i as l}from"./prompt-C8FyienX.mjs";function u(e){return e.usage(`$0 origin-post-quantum-encryption get
3
+
4
+ Instructs Cloudflare to use Post-Quantum (PQ) key agreement algorithms when connecting to your origin. Preferred instructs Cloudflare to opportunistically send a Post-Quantum keyshare in the first message to the origin (for fastest connections when the origin supports and prefers PQ), supported means that PQ algorithms are advertised but only used when requested by the origin, and off means that PQ algorithms are not advertised.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get Origin Post-Quantum Encryption setting`,builder:u,handler:async o=>a({command:`origin-post-quantum-encryption get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-post-quantum-encryption get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/cache/origin_post_quantum_encryption`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.originPostQuantumEncryption.get({zone_id:s}));n(c,{successLabel:`Loaded`})})};function f(e){return e.usage(`$0 origin-post-quantum-encryption update
5
+
6
+ Instructs Cloudflare to use Post-Quantum (PQ) key agreement algorithms when connecting to your origin. Preferred instructs Cloudflare to opportunistically send a Post-Quantum keyshare in the first message to the origin (for fastest connections when the origin supports and prefers PQ), supported means that PQ algorithms are advertised but only used when requested by the origin, and off means that PQ algorithms are not advertised.`).option(`value`,{type:`string`,description:`Value of the Origin Post Quantum Encryption Setting.`,choices:[`preferred`,`supported`,`off`]}).coerce(`value`,e=>c(e,`value`,`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)`})}const p={command:`update`,describe:`Change Origin Post-Quantum Encryption setting`,builder:f,handler:async c=>a({command:`origin-post-quantum-encryption update`,classification:{safeFlags:[`value`,`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf origin-post-quantum-encryption update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/cache/origin_post_quantum_encryption`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({value:c.value}):o(c.body)});return}let a=await e(c),u=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=u,c.body){let e=o(c.body),t=await i(`Updating`,async()=>a.originPostQuantumEncryption.update({...e,zone_id:u}));n(t,{successLabel:`Updated`});return}c.value===void 0&&(c.value=await l(`value`,`Value of the Origin Post Quantum Encryption Setting.`,[`preferred`,`supported`,`off`]));let d=s({value:c.value}),f=await i(`Updating`,async()=>a.originPostQuantumEncryption.update({...d,zone_id:u}));n(f,{successLabel:`Updated`})})},m={command:`origin-post-quantum-encryption`,describe:`Enable post-quantum key exchange for connections between Cloudflare and your origin server`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-AobvBmz4.mjs";import{i as t}from"./context-Bwkz4Lm_.mjs";import{t as n}from"./output-BGqhvqe2.mjs";import{t as r}from"./dry-run-DmsbOMF1.mjs";import{t as i}from"./progress-BYVZuEcG.mjs";import{t as a}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.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,n as d}from"./prompt-F5wxc8zq.mjs";import{t as f}from"./cli-types-9oYmRTHJ.mjs";function p(e){return e.usage(`$0 origin-tls-client-auth hostname-associations list
2
+ import{n as e}from"./auth-CAWalgW0.mjs";import{i as t}from"./context-BBLtgdR1.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-CQqDtgmF.mjs";import{t as a}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.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,n as d}from"./prompt-C8FyienX.mjs";import{t as f}from"./cli-types-9oYmRTHJ.mjs";function p(e){return e.usage(`$0 origin-tls-client-auth hostname-associations list
3
3
 
4
4
  List certificate ID - hostname associations for the given zone. Shows which hostnames are associated to which certificates for authenticated origin pulls.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of associations per page.`}).option(`status`,{type:`string`,description:`Filter associations by status. Use comma-separated values to filter by multiple statuses, or "all" to include every status. Defaults to "active" if not provided.`,choices:[`active`,`pending_deployment`,`pending_deletion`,`deleted`,`deployment_timed_out`,`deletion_timed_out`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`list`,describe:`List Hostname Associations`,builder:f(p),handler:async o=>a({command:`origin-tls-client-auth hostname-associations list`,classification:{safeFlags:[`status`,`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`],status:o.status};if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-associations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c;let l=await i(`Loading`,async()=>s.originTlsClientAuth.hostnameAssociations.list({zone_id:c,...a}));n(l,{successLabel:`Loaded`})})},h={command:`hostname-associations`,describe:`Operations for hostname-associations`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates create
5
5
 
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 _={command:`create`,describe:`Upload a Hostname Client Certificate`,builder:g,handler:async s=>a({command:`origin-tls-client-auth hostname-certificates create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}):o(s.body)});return}let a=await e(s),d=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body),t=await i(`Creating`,async()=>a.originTlsClientAuth.hostnameCertificates.create({...e,zone_id:d}));n(t,{successLabel:`Created`});return}s.certificate===void 0&&(s.certificate=await u(`certificate`,`The hostname certificate.`)),s[`private-key`]===void 0&&(s[`private-key`]=await u(`private-key`,`The hostname certificate's private key.`,{kind:`secret`}));let f=c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}),p=await i(`Creating`,async()=>a.originTlsClientAuth.hostnameCertificates.create({...f,zone_id:d}));n(p,{successLabel:`Created`})})};function v(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates delete <certificate-id>
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 _={command:`create`,describe:`Upload a Hostname Client Certificate`,builder:g,handler:async s=>a({command:`origin-tls-client-auth hostname-certificates create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}):o(s.body),sensitiveBodyPaths:[[`private_key`]]});return}let a=await e(s),d=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body),t=await i(`Creating`,async()=>a.originTlsClientAuth.hostnameCertificates.create({...e,zone_id:d}));n(t,{successLabel:`Created`});return}s.certificate===void 0&&(s.certificate=await u(`certificate`,`The hostname certificate.`)),s[`private-key`]===void 0&&(s[`private-key`]=await u(`private-key`,`The hostname certificate's private key.`,{kind:`secret`}));let f=c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}),p=await i(`Creating`,async()=>a.originTlsClientAuth.hostnameCertificates.create({...f,zone_id:d}));n(p,{successLabel:`Created`})})};function v(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates delete <certificate-id>
7
7
 
8
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 y={command:`delete <certificate-id>`,describe:`Delete Hostname Client Certificate`,builder:v,handler:async o=>a({command:`origin-tls-client-auth hostname-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await d({force:!!o.force})){process.stderr.write(`Aborted.
9
9
  `);return}let c=await i(`Deleting`,async()=>a.originTlsClientAuth.hostnameCertificates.delete({zone_id:s,certificate_id:o[`certificate-id`]}));n(c,{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates get <certificate-id>
@@ -20,7 +20,7 @@ Get whether zone-level authenticated origin pulls is enabled or not. It is false
20
20
 
21
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 N={command:`update`,describe:`Set Enablement for Zone`,builder:M,handler:async s=>a({command:`origin-tls-client-auth settings update`,classification:{safeFlags:[`enabled`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth/settings`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({enabled:s.enabled}):o(s.body)});return}let a=await e(s),l=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=l,s.body){let e=o(s.body),t=await i(`Updating`,async()=>a.originTlsClientAuth.settings.update({...e,zone_id:l}));n(t,{successLabel:`Updated`});return}if(s.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=c({enabled:s.enabled}),d=await i(`Updating`,async()=>a.originTlsClientAuth.settings.update({...u,zone_id:l}));n(d,{successLabel:`Updated`})})},P={command:`settings`,describe:`Operations for settings`,builder:e=>e.command(j).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.usage(`$0 origin-tls-client-auth zone-certificates create
22
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 I={command:`create`,describe:`Upload Certificate`,builder:F,handler:async s=>a({command:`origin-tls-client-auth zone-certificates create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth zone-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}):o(s.body)});return}let a=await e(s),d=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body),t=await i(`Creating`,async()=>a.originTlsClientAuth.zoneCertificates.create({...e,zone_id:d}));n(t,{successLabel:`Created`});return}s.certificate===void 0&&(s.certificate=await u(`certificate`,`The zone's leaf certificate.`)),s[`private-key`]===void 0&&(s[`private-key`]=await u(`private-key`,`The zone's private key.`,{kind:`secret`}));let f=c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}),p=await i(`Creating`,async()=>a.originTlsClientAuth.zoneCertificates.create({...f,zone_id:d}));n(p,{successLabel:`Created`})})};function L(e){return e.usage(`$0 origin-tls-client-auth zone-certificates delete <certificate-id>
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 I={command:`create`,describe:`Upload Certificate`,builder:F,handler:async s=>a({command:`origin-tls-client-auth zone-certificates create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth zone-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}):o(s.body),sensitiveBodyPaths:[[`private_key`]]});return}let a=await e(s),d=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body),t=await i(`Creating`,async()=>a.originTlsClientAuth.zoneCertificates.create({...e,zone_id:d}));n(t,{successLabel:`Created`});return}s.certificate===void 0&&(s.certificate=await u(`certificate`,`The zone's leaf certificate.`)),s[`private-key`]===void 0&&(s[`private-key`]=await u(`private-key`,`The zone's private key.`,{kind:`secret`}));let f=c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}),p=await i(`Creating`,async()=>a.originTlsClientAuth.zoneCertificates.create({...f,zone_id:d}));n(p,{successLabel:`Created`})})};function L(e){return e.usage(`$0 origin-tls-client-auth zone-certificates delete <certificate-id>
24
24
 
25
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 R={command:`delete <certificate-id>`,describe:`Delete Certificate`,builder:L,handler:async o=>a({command:`origin-tls-client-auth zone-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth zone-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await d({force:!!o.force})){process.stderr.write(`Aborted.
26
26
  `);return}let c=await i(`Deleting`,async()=>a.originTlsClientAuth.zoneCertificates.delete({zone_id:s,certificate_id:o[`certificate-id`]}));n(c,{successLabel:`Deleted`})})};function z(e){return e.usage(`$0 origin-tls-client-auth zone-certificates get <certificate-id>
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e,t}from"./theme-CQ_TYifs.mjs";import{n}from"./interactive-Dqv0RWVU.mjs";import{t as r}from"./Page-BShsqCXr.mjs";function i(e){return e instanceof r?e.data:typeof e==`object`&&e&&`result`in e&&Array.isArray(e.result)&&`result_info`in e?e.result:e}function a(t,n={}){if(!n.quiet){if(t=i(t),t==null){n.successLabel&&process.stderr.isTTY&&process.stderr.write(`${e.success(`✓`)} ${n.successLabel}\n`);return}console.log(o(t))}}function o(r){let i=JSON.stringify(r,null,2);return n()||!t()||i.length>5e4?i:i.replace(/"([^"]+)":/g,(t,n)=>`${e.jsonKey(`"${n}"`)}:`).replace(/: "([^"]*)"/g,(t,n)=>`: ${e.jsonString(`"${n}"`)}`).replace(/: (-?\d+\.?\d*)/g,(t,n)=>`: ${e.jsonNumber(n)}`).replace(/: (true|false)/g,(t,n)=>`: ${e.jsonBoolean(n)}`).replace(/: (null)/g,(t,n)=>`: ${e.muted(n)}`)}export{a as t};
2
+ import{r as e,t}from"./theme-CQ_TYifs.mjs";import{n}from"./interactive-BW9T1D1q.mjs";import{t as r}from"./Page-BShsqCXr.mjs";function i(e){return e instanceof r?e.data:typeof e==`object`&&e&&`result`in e&&Array.isArray(e.result)&&`result_info`in e?e.result:e}function a(t,n={}){if(!n.quiet){if(t=i(t),t==null){n.successLabel&&process.stderr.isTTY&&process.stderr.write(`${e.success(`✓`)} ${n.successLabel}\n`);return}console.log(o(t))}}function o(r){let i=JSON.stringify(r,null,2);return n()||!t()||i.length>5e4?i:i.replace(/"((?:[^"\\]|\\.)*)":/g,(t,n)=>`${e.jsonKey(`"${n}"`)}:`).replace(/: "((?:[^"\\]|\\.)*)"/g,(t,n)=>`: ${e.jsonString(`"${n}"`)}`).replace(/: (-?\d+\.?\d*)/g,(t,n)=>`: ${e.jsonNumber(n)}`).replace(/: (true|false)/g,(t,n)=>`: ${e.jsonBoolean(n)}`).replace(/: (null)/g,(t,n)=>`: ${e.muted(n)}`)}export{a as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-AobvBmz4.mjs";import{i as t}from"./context-Bwkz4Lm_.mjs";import{t as n}from"./output-BGqhvqe2.mjs";import{t as r}from"./dry-run-DmsbOMF1.mjs";import{t as i}from"./progress-BYVZuEcG.mjs";import{t as a}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.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{n as u}from"./prompt-F5wxc8zq.mjs";import{t as d}from"./cli-types-9oYmRTHJ.mjs";function f(e){return e.usage(`$0 page-rules create
2
+ import{n as e}from"./auth-CAWalgW0.mjs";import{i as t}from"./context-BBLtgdR1.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-CQqDtgmF.mjs";import{t as a}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.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{n as u}from"./prompt-C8FyienX.mjs";import{t as d}from"./cli-types-9oYmRTHJ.mjs";function f(e){return e.usage(`$0 page-rules create
3
3
 
4
4
  Creates a new Page Rule.`).option(`actions`,{type:`string`,description:`The set of actions to perform if the targets of this rule match the
5
5
  request. Actions can redirect to another URL or override settings, but
@@ -9,7 +9,7 @@ over another. A higher number indicates a higher priority. For example,
9
9
  if you have a catch-all Page Rule (rule A: \`/images/*\`) but want a more
10
10
  specific Page Rule to take precedence (rule B: \`/images/special/*\`),
11
11
  specify a higher priority for rule B so it overrides rule A.
12
- `,default:1}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`],default:`disabled`}).option(`targets`,{type:`string`,description:`The rule targets to evaluate on each request. 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 p={command:`create`,describe:`Create a Page Rule`,builder:f,handler:async u=>a({command:`page-rules create`,classification:{safeFlags:[`status`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf page-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/pagerules`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body),t=await i(`Creating`,async()=>a.pageRules.create({...e,zone_id:d}));n(t,{successLabel:`Created`});return}if(u.actions===void 0)throw Error(`--actions is required (or pass --body with this field set).`);if(u.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let f=c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)}),p=await i(`Creating`,async()=>a.pageRules.create({...f,zone_id:d}));n(p,{successLabel:`Created`})})};function m(e){return e.usage(`$0 page-rules delete <pagerule-id>
12
+ `,default:1}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`],default:`disabled`}).coerce(`status`,e=>l(e,`status`,`text`)).option(`targets`,{type:`string`,description:`The rule targets to evaluate on each request. 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 p={command:`create`,describe:`Create a Page Rule`,builder:f,handler:async l=>a({command:`page-rules create`,classification:{safeFlags:[`status`,`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf page-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/pagerules`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({actions:s(l.actions,`actions`),priority:l.priority,status:l.status,targets:s(l.targets,`targets`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body),t=await i(`Creating`,async()=>a.pageRules.create({...e,zone_id:u}));n(t,{successLabel:`Created`});return}if(l.actions===void 0)throw Error(`--actions is required (or pass --body with this field set).`);if(l.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let d=c({actions:s(l.actions,`actions`),priority:l.priority,status:l.status,targets:s(l.targets,`targets`)}),f=await i(`Creating`,async()=>a.pageRules.create({...d,zone_id:u}));n(f,{successLabel:`Created`})})};function m(e){return e.usage(`$0 page-rules delete <pagerule-id>
13
13
 
14
14
  Deletes an existing Page Rule.`).positional(`pagerule-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const h={command:`delete <pagerule-id>`,describe:`Delete a Page Rule`,builder:m,handler:async o=>a({command:`page-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf page-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/pagerules/${o[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(o[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(o[`pagerule-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
15
15
  `);return}let c=await i(`Deleting`,async()=>a.pageRules.delete({zone_id:s,pagerule_id:o[`pagerule-id`]}));n(c,{successLabel:`Deleted`})})};function g(e){return e.usage(`$0 page-rules edit <pagerule-id>
@@ -22,7 +22,7 @@ over another. A higher number indicates a higher priority. For example,
22
22
  if you have a catch-all Page Rule (rule A: \`/images/*\`) but want a more
23
23
  specific Page Rule to take precedence (rule B: \`/images/special/*\`),
24
24
  specify a higher priority for rule B so it overrides rule A.
25
- `}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`]}).option(`targets`,{type:`string`,description:`The rule targets to evaluate on each request. 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 _={command:`edit <pagerule-id>`,describe:`Edit a Page Rule`,builder:g,handler:async u=>a({command:`page-rules edit`,classification:{safeFlags:[`status`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf page-rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/pagerules/${u[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(u[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(u[`pagerule-id`]??``),"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body),t=await i(`Updating`,async()=>a.pageRules.edit({...e,zone_id:d,pagerule_id:u[`pagerule-id`]}));n(t,{successLabel:`Updated`});return}let f=c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)}),p=await i(`Updating`,async()=>a.pageRules.edit({...f,zone_id:d,pagerule_id:u[`pagerule-id`]}));n(p,{successLabel:`Updated`})})};function v(e){return e.usage(`$0 page-rules get <pagerule-id>
25
+ `}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`]}).coerce(`status`,e=>l(e,`status`,`text`)).option(`targets`,{type:`string`,description:`The rule targets to evaluate on each request. 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 _={command:`edit <pagerule-id>`,describe:`Edit a Page Rule`,builder:g,handler:async l=>a({command:`page-rules edit`,classification:{safeFlags:[`status`,`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf page-rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/pagerules/${l[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(l[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(l[`pagerule-id`]??``),"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({actions:s(l.actions,`actions`),priority:l.priority,status:l.status,targets:s(l.targets,`targets`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body),t=await i(`Updating`,async()=>a.pageRules.edit({...e,zone_id:u,pagerule_id:l[`pagerule-id`]}));n(t,{successLabel:`Updated`});return}let d=c({actions:s(l.actions,`actions`),priority:l.priority,status:l.status,targets:s(l.targets,`targets`)}),f=await i(`Updating`,async()=>a.pageRules.edit({...d,zone_id:u,pagerule_id:l[`pagerule-id`]}));n(f,{successLabel:`Updated`})})};function v(e){return e.usage(`$0 page-rules get <pagerule-id>
26
26
 
27
27
  Fetches the details of a Page Rule.`).positional(`pagerule-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <pagerule-id>`,describe:`Get a Page Rule`,builder:v,handler:async o=>a({command:`page-rules get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf page-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/pagerules/${o[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(o[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(o[`pagerule-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.pageRules.get({zone_id:s,pagerule_id:o[`pagerule-id`]}));n(c,{successLabel:`Loaded`})})};function b(e){return e.usage(`$0 page-rules list
28
28
 
@@ -36,4 +36,4 @@ over another. A higher number indicates a higher priority. For example,
36
36
  if you have a catch-all Page Rule (rule A: \`/images/*\`) but want a more
37
37
  specific Page Rule to take precedence (rule B: \`/images/special/*\`),
38
38
  specify a higher priority for rule B so it overrides rule A.
39
- `}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`]}).option(`targets`,{type:`string`,description:`The rule targets to evaluate on each request. 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 C={command:`update <pagerule-id>`,describe:`Update a Page Rule`,builder:S,handler:async u=>a({command:`page-rules update`,classification:{safeFlags:[`status`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf page-rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/pagerules/${u[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(u[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(u[`pagerule-id`]??``),"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body),t=await i(`Updating`,async()=>a.pageRules.update({...e,zone_id:d,pagerule_id:u[`pagerule-id`]}));n(t,{successLabel:`Updated`});return}if(u.actions===void 0)throw Error(`--actions is required (or pass --body with this field set).`);if(u.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let f=c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)}),p=await i(`Updating`,async()=>a.pageRules.update({...f,zone_id:d,pagerule_id:u[`pagerule-id`]}));n(p,{successLabel:`Updated`})})},w={command:`page-rules`,describe:`page-rules`,builder:e=>e.command(p).command(h).command(_).command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
39
+ `}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`]}).coerce(`status`,e=>l(e,`status`,`text`)).option(`targets`,{type:`string`,description:`The rule targets to evaluate on each request. 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 C={command:`update <pagerule-id>`,describe:`Update a Page Rule`,builder:S,handler:async l=>a({command:`page-rules update`,classification:{safeFlags:[`status`,`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf page-rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/pagerules/${l[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(l[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(l[`pagerule-id`]??``),"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({actions:s(l.actions,`actions`),priority:l.priority,status:l.status,targets:s(l.targets,`targets`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body),t=await i(`Updating`,async()=>a.pageRules.update({...e,zone_id:u,pagerule_id:l[`pagerule-id`]}));n(t,{successLabel:`Updated`});return}if(l.actions===void 0)throw Error(`--actions is required (or pass --body with this field set).`);if(l.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let d=c({actions:s(l.actions,`actions`),priority:l.priority,status:l.status,targets:s(l.targets,`targets`)}),f=await i(`Updating`,async()=>a.pageRules.update({...d,zone_id:u,pagerule_id:l[`pagerule-id`]}));n(f,{successLabel:`Updated`})})},w={command:`page-rules`,describe:`page-rules`,builder:e=>e.command(p).command(h).command(_).command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./lazy-command-CDWwCsD2.mjs";import{t}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as n}from"./local-BcPM4I0s.mjs";import{i as r,n as i}from"./auth-CAWalgW0.mjs";import{a,t as o}from"./context-BBLtgdR1.mjs";import{t as s}from"./output-BOe-3AQG.mjs";import{t as c}from"./dry-run-DRj2_uV3.mjs";import{t as l}from"./progress-CQqDtgmF.mjs";import{t as u}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-C8FyienX.mjs";import{t as ee}from"./cli-types-9oYmRTHJ.mjs";function v(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 y={command:`purge <project-name>`,describe:`Purge the Pages build cache`,builder:v,handler:async e=>u({command:`pages build-cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();c({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 i(e),r=e.local?n:await o();if(e.accountId=r,!await _({force:!!e.force,message:`This operation purges the build cache for a Pages project.`})){process.stderr.write(`Aborted.
5
+ `);return}let u=await l(`Deleting`,async()=>t.pages.buildCache.purge({account_id:r,project_name:e[`project-name`]}));s(u,{successLabel:`Deleted`})})},b={command:`build-cache`,describe:`Operations for build-cache`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(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=>p(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=>p(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=>p(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=>p(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 S={command:`create`,describe:`Create a Cloudflare Pages project`,builder:x,handler:async e=>u({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 a();c({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?f({build_config:{build_caching:e[`build-config-build-caching`],build_command:p(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:p(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:p(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:p(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:p(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:p(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],fail_open:e[`deployment-configs-preview-fail-open`],limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:p(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:e[`deployment-configs-preview-usage-model`],wrangler_config_hash:p(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:p(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],fail_open:e[`deployment-configs-production-fail-open`],limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:p(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:e[`deployment-configs-production-usage-model`],wrangler_config_hash:p(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:p(e.name,`name`,`text`),production_branch:p(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:p(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:p(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:p(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:p(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:p(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}}):d(e.body),sensitiveBodyPaths:[[`build_config`,`web_analytics_token`]]});return}let t=await i(e),r=e.local?n:await o();if(e.accountId=r,e.body){let n=d(e.body),i=await l(`Creating`,async()=>t.pages.create({...n,account_id:r}));s(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 u=f({build_config:{build_caching:e[`build-config-build-caching`],build_command:p(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:p(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:p(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:p(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:p(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:p(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],fail_open:e[`deployment-configs-preview-fail-open`],limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:p(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:e[`deployment-configs-preview-usage-model`],wrangler_config_hash:p(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:p(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],fail_open:e[`deployment-configs-production-fail-open`],limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:p(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:e[`deployment-configs-production-usage-model`],wrangler_config_hash:p(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:p(e.name,`name`,`text`),production_branch:p(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:p(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:p(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:p(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:p(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:p(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}}),m=await l(`Creating`,async()=>t.pages.create({...u,account_id:r}));s(m,{successLabel:`Created`})})};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=>u({command:`pages delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();c({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 i(e),r=e.local?n:await o();if(e.accountId=r,!await _({force:!!e.force})){process.stderr.write(`Aborted.
12
+ `);return}let u=await l(`Deleting`,async()=>t.pages.delete({account_id:r,project_name:e[`project-name`]}));s(u,{successLabel:`Deleted`})})};function T(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 E={command:`create <project-name>`,describe:`Create a Pages deployment`,builder:T,handler:async e=>u({command:`pages deployments create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({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 i(e),u=e.local?n:await o();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.branch!==void 0||e[`commit-dirty`]!==void 0||e[`commit-hash`]!==void 0||e[`commit-message`]!==void 0||e.manifest!==void 0||e[`pages-build-output-dir`]!==void 0||e[`wrangler-config-hash`]!==void 0){let n=new FormData;if(e.file){let t=m(e.file);n.append(`_headers`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&n.append(`_headers`,e.body);e.branch!==void 0&&n.append(`branch`,String(p(e.branch,`branch`,`text`)??``)),e[`commit-dirty`]!==void 0&&n.append(`commit_dirty`,String(p(e[`commit-dirty`],`commit-dirty`,`text`)??``)),e[`commit-hash`]!==void 0&&n.append(`commit_hash`,String(p(e[`commit-hash`],`commit-hash`,`text`)??``)),e[`commit-message`]!==void 0&&n.append(`commit_message`,String(p(e[`commit-message`],`commit-message`,`text`)??``)),e.manifest!==void 0&&n.append(`manifest`,String(p(e.manifest,`manifest`,`text`)??``)),e[`pages-build-output-dir`]!==void 0&&n.append(`pages_build_output_dir`,String(p(e[`pages-build-output-dir`],`pages-build-output-dir`,`text`)??``)),e[`wrangler-config-hash`]!==void 0&&n.append(`wrangler_config_hash`,String(p(e[`wrangler-config-hash`],`wrangler-config-hash`,`text`)??``));let i=await l(`Creating`,async()=>r(t,`POST`,`/accounts/${u}/pages/projects/${encodeURIComponent(String(e[`project-name`]))}/deployments`,{body:n}));s(i,{successLabel:`Created`});return}if(e.body){let n=p(e.body,`body`,`binary`),i=await l(`Creating`,async()=>r(t,`POST`,`/accounts/${u}/pages/projects/${encodeURIComponent(String(e[`project-name`]))}/deployments`,{body:n,headers:{"Content-Type":`multipart/form-data`}}));s(i,{successLabel:`Created`});return}let d=await l(`Creating`,async()=>t.pages.deployments.create({account_id:u,project_name:e[`project-name`]}));s(d,{successLabel:`Created`})})};function D(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 O={command:`delete <deployment-id>`,describe:`Delete a Pages deployment`,builder:D,handler:async e=>u({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 a();c({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:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},query:t,bodyKind:`none`});return}let r=await i(e),u=e.local?n:await o();if(e.accountId=u,!await _({force:!!e.force})){process.stderr.write(`Aborted.
17
+ `);return}let d=await l(`Deleting`,async()=>r.pages.deployments.delete({account_id:u,project_name:e[`project-name`],deployment_id:e[`deployment-id`],...t}));s(d,{successLabel:`Deleted`})})};function k(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 A={command:`get <deployment-id>`,describe:`Get a Pages deployment`,builder:k,handler:async e=>u({command:`pages deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({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:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await i(e),r=e.local?n:await o();e.accountId=r;let u=await l(`Loading`,async()=>t.pages.deployments.get({account_id:r,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));s(u,{successLabel:`Loaded`})})};function j(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 M={command:`get <deployment-id>`,describe:`Get Pages deployment logs`,builder:j,handler:async e=>u({command:`pages deployments history logs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({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:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await i(e),r=e.local?n:await o();e.accountId=r;let u=await l(`Loading`,async()=>t.pages.deployments.history.logs.get({account_id:r,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));s(u,{successLabel:`Loaded`})})},N={command:`logs`,describe:`Operations for deployments.history.logs`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`history`,describe:`Operations for deployments.history`,builder:e=>e.command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(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 I={command:`list`,describe:`List Pages deployments`,builder:ee(F),handler:async e=>u({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 a();c({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 r=await i(e),u=e.local?n:await o();e.accountId=u;let d=await l(`Loading`,async()=>r.pages.deployments.list({account_id:u,project_name:e[`project-name`],...t}));s(d,{successLabel:`Loaded`})})};function L(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 R={command:`retry <deployment-id>`,describe:`Retry a Pages deployment`,builder:L,handler:async e=>u({command:`pages deployments retry`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({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:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await i(e),r=e.local?n:await o();e.accountId=r;let u=await l(`Creating`,async()=>t.pages.deployments.retry({account_id:r,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));s(u,{successLabel:`Created`})})};function z(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 B={command:`rollback <deployment-id>`,describe:`Roll back a Pages deployment`,builder:z,handler:async e=>u({command:`pages deployments rollback`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();c({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:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await i(e),r=e.local?n:await o();if(e.accountId=r,!await _({force:!!e.force,message:`This operation rolls back the production deployment to an earlier deployment.`})){process.stderr.write(`Aborted.
28
+ `);return}let u=await l(`Deleting`,async()=>t.pages.deployments.rollback({account_id:r,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));s(u,{successLabel:`Deleted`})})},V={command:`deployments`,describe:`Operations for deployments`,builder:e=>e.command(E).command(O).command(A).command(I).command(R).command(B).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(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 H={command:`create <project-name>`,describe:`Add a Pages custom domain`,builder:te,handler:async e=>u({command:`pages domains create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({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?f({name:p(e.name,`name`,`text`)}):d(e.body)});return}let t=await i(e),r=e.local?n:await o();if(e.accountId=r,e.body){let n=d(e.body),i=await l(`Creating`,async()=>t.pages.domains.create({...n,account_id:r,project_name:e[`project-name`]}));s(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 u=f({name:p(e.name,`name`,`text`)}),m=await l(`Creating`,async()=>t.pages.domains.create({...u,account_id:r,project_name:e[`project-name`]}));s(m,{successLabel:`Created`})})};function U(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 W={command:`delete <domain-name>`,describe:`Delete a Pages custom domain`,builder:U,handler:async e=>u({command:`pages domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();c({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:{"domain-name":String(e[`domain-name`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await i(e),r=e.local?n:await o();if(e.accountId=r,!await _({force:!!e.force})){process.stderr.write(`Aborted.
33
+ `);return}let u=await l(`Deleting`,async()=>t.pages.domains.delete({account_id:r,project_name:e[`project-name`],domain_name:e[`domain-name`]}));s(u,{successLabel:`Deleted`})})};function G(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 K={command:`get <domain-name>`,describe:`Get a Pages custom domain`,builder:G,handler:async e=>u({command:`pages domains get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({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:{"domain-name":String(e[`domain-name`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await i(e),r=e.local?n:await o();e.accountId=r;let u=await l(`Loading`,async()=>t.pages.domains.get({account_id:r,project_name:e[`project-name`],domain_name:e[`domain-name`]}));s(u,{successLabel:`Loaded`})})};function q(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 J={command:`list`,describe:`List Pages custom domains`,builder:q,handler:async e=>u({command:`pages domains list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({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 i(e),r=e.local?n:await o();e.accountId=r;let u=await l(`Loading`,async()=>t.pages.domains.list({account_id:r,project_name:e[`project-name`]}));s(u,{successLabel:`Loaded`})})};function Y(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 X={command:`retry <domain-name>`,describe:`Retry custom domain validation`,builder:Y,handler:async e=>u({command:`pages domains validation retry`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({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:{"domain-name":String(e[`domain-name`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await i(e),r=e.local?n:await o();e.accountId=r;let u=await l(`Updating`,async()=>t.pages.domains.validation.retry({account_id:r,project_name:e[`project-name`],domain_name:e[`domain-name`]}));s(u,{successLabel:`Updated`})})},Z={command:`validation`,describe:`Operations for domains.validation`,builder:e=>e.command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Q={command:`domains`,describe:`Operations for domains`,builder:e=>e.command(H).command(W).command(K).command(J).command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(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=>p(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=>p(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=>p(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=>p(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 re={command:`edit <project-name>`,describe:`Update a Cloudflare Pages project`,builder:ne,handler:async e=>u({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 a();c({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?f({build_config:{build_caching:e[`build-config-build-caching`],build_command:p(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:p(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:p(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:p(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:p(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:p(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],fail_open:e[`deployment-configs-preview-fail-open`],limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:p(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:e[`deployment-configs-preview-usage-model`],wrangler_config_hash:p(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:p(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],fail_open:e[`deployment-configs-production-fail-open`],limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:p(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:e[`deployment-configs-production-usage-model`],wrangler_config_hash:p(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:p(e.name,`name`,`text`),production_branch:p(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:p(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:p(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:p(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:p(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:p(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}}):d(e.body),sensitiveBodyPaths:[[`build_config`,`web_analytics_token`]]});return}let t=await i(e),r=e.local?n:await o();if(e.accountId=r,e.body){let n=d(e.body),i=await l(`Updating`,async()=>t.pages.edit({...n,account_id:r,project_name:e[`project-name`]}));s(i,{successLabel:`Updated`});return}let u=f({build_config:{build_caching:e[`build-config-build-caching`],build_command:p(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:p(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:p(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:p(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:p(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:p(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],fail_open:e[`deployment-configs-preview-fail-open`],limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:p(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:e[`deployment-configs-preview-usage-model`],wrangler_config_hash:p(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:p(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],fail_open:e[`deployment-configs-production-fail-open`],limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:p(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:e[`deployment-configs-production-usage-model`],wrangler_config_hash:p(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:p(e.name,`name`,`text`),production_branch:p(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:p(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:p(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:p(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:p(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:p(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}}),m=await l(`Updating`,async()=>t.pages.edit({...u,account_id:r,project_name:e[`project-name`]}));s(m,{successLabel:`Updated`})})};function ie(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 ae={command:`get <project-name>`,describe:`Get a Cloudflare Pages project`,builder:ie,handler:async e=>u({command:`pages get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({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 i(e),r=e.local?n:await o();e.accountId=r;let u=await l(`Loading`,async()=>t.pages.get({account_id:r,project_name:e[`project-name`]}));s(u,{successLabel:`Loaded`})})};function oe(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 $={command:`list`,describe:`List Cloudflare Pages projects`,builder:oe,handler:async e=>u({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 a();c({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 r=await i(e),u=e.local?n:await o();e.accountId=u;let d=await l(`Loading`,async()=>r.pages.list({account_id:u,...t}));s(d,{successLabel:`Loaded`})})};function se(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=>p(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=>p(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 ce={command:`connect <project-name>`,describe:`Connect a Git repository`,builder:se,handler:async e=>u({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 a();c({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?f({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:p(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:p(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:p(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:p(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:p(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e.type}):d(e.body)});return}let t=await i(e),r=e.local?n:await o();if(e.accountId=r,e.body){let n=d(e.body),i=await l(`Creating`,async()=>t.pages.source.connect({...n,account_id:r,project_name:e[`project-name`]}));s(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 u=f({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:p(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:p(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:p(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:p(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:p(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e.type}),m=await l(`Creating`,async()=>t.pages.source.connect({...u,account_id:r,project_name:e[`project-name`]}));s(m,{successLabel:`Created`})})};function le(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 ue={command:`disconnect <project-name>`,describe:`Disconnect a Git repository`,builder:le,handler:async e=>u({command:`pages source disconnect`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();c({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 i(e),r=e.local?n:await o();if(e.accountId=r,!await _({force:!!e.force})){process.stderr.write(`Aborted.
54
+ `);return}let u=await l(`Deleting`,async()=>t.pages.source.disconnect({account_id:r,project_name:e[`project-name`]}));s(u,{successLabel:`Deleted`})})},de={command:`source`,describe:`Operations for source`,builder:e=>e.command(ce).command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var fe=e(`deploy [directory]`,`Deploy a directory of static assets as a Pages deployment`,()=>import(`./command-DXaRn1ls.mjs`),{command:`pages deploy`,recordArgs:!1});const pe={command:`pages`,describe:`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,builder:e=>e.command(S).command(w).command(t(fe,`preview`)).command(re).command(ae).command($).command(b).command(V).command(Q).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{pe as default};
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,i as r,t as i}from"./context-BBLtgdR1.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-CQqDtgmF.mjs";import{t as c}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./prompt-C8FyienX.mjs";import{t as p}from"./cli-types-9oYmRTHJ.mjs";function m(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 h={command:`create`,describe:`Creates pay-per-crawl config for a zone`,builder:m,handler:async e=>c({command:`pay-per-crawl config create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Creating`,async()=>n.payPerCrawl.config.create({...t,zone_id:i}));a(r,{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let c=d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}),u=await s(`Creating`,async()=>n.payPerCrawl.config.create({...c,zone_id:i}));a(u,{successLabel:`Created`})})};function g(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 _={command:`edit`,describe:`Changes pay-per-crawl config for a zone`,builder:g,handler:async e=>c({command:`pay-per-crawl config edit`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({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?d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Updating`,async()=>n.payPerCrawl.config.edit({body:t,zone_id:i}));a(r,{successLabel:`Updated`});return}let c=d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}),u=await s(`Updating`,async()=>n.payPerCrawl.config.edit({body:c,zone_id:i}));a(u,{successLabel:`Updated`})})};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=>c({command:`pay-per-crawl config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({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 n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let c=await s(`Loading`,async()=>n.payPerCrawl.config.get({zone_id:i}));a(c,{successLabel:`Loaded`})})},b={command:`config`,describe:`Operations for config`,builder:e=>e.command(h).command(_).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(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 S={command:`create`,describe:`Creates the stripe config for a crawler`,builder:x,handler:async r=>c({command:`pay-per-crawl crawler stripe create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({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 c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Creating`,async()=>c.payPerCrawl.crawler.stripe.create({account_id:l}));a(u,{successLabel:`Created`})})};function C(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 w={command:`delete`,describe:`Deletes the stripe config for a crawler`,builder:C,handler:async r=>c({command:`pay-per-crawl crawler stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){let e=await n();o({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 c=await t(r),l=r.local?e:await i();if(r.accountId=l,!await f({force:!!r.force})){process.stderr.write(`Aborted.
13
+ `);return}let u=await s(`Deleting`,async()=>c.payPerCrawl.crawler.stripe.delete({account_id:l}));a(u,{successLabel:`Deleted`})})};function T(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 E={command:`get`,describe:`Gets the stripe config for a crawler`,builder:T,handler:async r=>c({command:`pay-per-crawl crawler stripe get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({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 c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.crawler.stripe.get({account_id:l}));a(u,{successLabel:`Loaded`})})},D={command:`stripe`,describe:`Operations for crawler.stripe`,builder:e=>e.command(S).command(w).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},O={command:`crawler`,describe:`Operations for crawler`,builder:e=>e.command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(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 A={command:`list`,describe:`List pay-per-crawl crawlers`,builder:k,handler:async r=>c({command:`pay-per-crawl crawlers list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({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 c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.crawlers.list({account_id:l}));a(u,{successLabel:`Loaded`})})},j={command:`crawlers`,describe:`Operations for crawlers`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(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 N={command:`create`,describe:`Creates the stripe config for a publisher`,builder:M,handler:async r=>c({command:`pay-per-crawl publisher stripe create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({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 c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Creating`,async()=>c.payPerCrawl.publisher.stripe.create({account_id:l}));a(u,{successLabel:`Created`})})};function P(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 F={command:`delete`,describe:`Deletes the stripe config for a publisher`,builder:P,handler:async r=>c({command:`pay-per-crawl publisher stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){let e=await n();o({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 c=await t(r),l=r.local?e:await i();if(r.accountId=l,!await f({force:!!r.force})){process.stderr.write(`Aborted.
22
+ `);return}let u=await s(`Deleting`,async()=>c.payPerCrawl.publisher.stripe.delete({account_id:l}));a(u,{successLabel:`Deleted`})})};function ee(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 I={command:`get`,describe:`Gets the stripe config for a publisher`,builder:ee,handler:async r=>c({command:`pay-per-crawl publisher stripe get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({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 c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.publisher.stripe.get({account_id:l}));a(u,{successLabel:`Loaded`})})},L={command:`stripe`,describe:`Operations for publisher.stripe`,builder:e=>e.command(N).command(F).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},R={command:`publisher`,describe:`Operations for publisher`,builder:e=>e.command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(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 B={command:`get-signature-link`,describe:`Get signed pay-per-crawl terms link`,builder:z,handler:async r=>c({command:`pay-per-crawl terms get-signature-link`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({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 c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.terms.getSignatureLink({account_id:l}));a(u,{successLabel:`Loaded`})})};function V(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 H={command:`get-signature`,describe:`Get pay-per-crawl terms signature status`,builder:V,handler:async r=>c({command:`pay-per-crawl terms get-signature`,classification:{safeFlags:[`remote`,`dry-run`]}},r,async()=>{let c={remote:r.remote};if(r.dryRun){let e=await n();o({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:c,bodyKind:`none`});return}let l=await t(r),u=r.local?e:await i();r.accountId=u;let d=await s(`Loading`,async()=>l.payPerCrawl.terms.getSignature({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function U(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 W={command:`get`,describe:`Get pay-per-crawl terms`,builder:U,handler:async r=>c({command:`pay-per-crawl terms get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({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 c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.terms.get({account_id:l}));a(u,{successLabel:`Loaded`})})};function G(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 K={command:`send-signature-event`,describe:`Record pay-per-crawl terms activity`,builder:p(G),handler:async r=>c({command:`pay-per-crawl terms send-signature-event`,classification:{safeFlags:[`event-type`,`dry-run`]}},r,async()=>{let c={event_type:r[`event-type`],vid:r.vid};if(r.dryRun){let e=await n();o({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:c,bodyKind:`none`});return}let l=await t(r),u=r.local?e:await i();r.accountId=u;let d=await s(`Creating`,async()=>l.payPerCrawl.terms.sendSignatureEvent({account_id:u,...c}));a(d,{successLabel:`Created`})})},q={command:`terms`,describe:`Operations for terms`,builder:e=>e.command(W).command(H).command(B).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function J(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 Y={command:`get-can-be-enabled`,describe:`Get pay-per-crawl zone eligibility`,builder:J,handler:async e=>c({command:`pay-per-crawl zones get-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({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 n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let c=await s(`Loading`,async()=>n.payPerCrawl.zones.getCanBeEnabled({zone_id:i}));a(c,{successLabel:`Loaded`})})};function X(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 Z={command:`query-can-be-enabled`,describe:`Gets the can_be_enabled zone setting`,builder:X,handler:async r=>c({command:`pay-per-crawl zones query-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl zones query-can-be-enabled`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/zones_can_be_enabled/query`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({zones:r.zones}):l(r.body)});return}let c=await t(r),u=r.local?e:await i();if(r.accountId=u,r.body){let e=l(r.body),t=await s(`Creating`,async()=>c.payPerCrawl.zones.queryCanBeEnabled({...e,account_id:u}));a(t,{successLabel:`Created`});return}let f=d({zones:r.zones}),p=await s(`Creating`,async()=>c.payPerCrawl.zones.queryCanBeEnabled({...f,account_id:u}));a(p,{successLabel:`Created`})})};function Q(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 $={command:`set-can-be-enabled`,describe:`Set can_be_enabled setting on zones`,builder:Q,handler:async r=>c({command:`pay-per-crawl zones set-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl zones set-can-be-enabled`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/zones_can_be_enabled`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({zones:u(r.zones,`zones`)}):l(r.body)});return}let c=await t(r),f=r.local?e:await i();if(r.accountId=f,r.body){let e=l(r.body),t=await s(`Updating`,async()=>c.payPerCrawl.zones.setCanBeEnabled({...e,account_id:f}));a(t,{successLabel:`Updated`});return}if(r.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let p=d({zones:u(r.zones,`zones`)}),m=await s(`Updating`,async()=>c.payPerCrawl.zones.setCanBeEnabled({...p,account_id:f}));a(m,{successLabel:`Updated`})})},te={command:`zones`,describe:`Operations for zones`,builder:e=>e.command(Y).command(Z).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ne={command:`pay-per-crawl`,describe:`pay-per-crawl`,builder:e=>e.command(b).command(O).command(j).command(R).command(q).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ne as default};
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-BcPM4I0s.mjs";import{i as t,n}from"./auth-CAWalgW0.mjs";import{a as r,i,t as a}from"./context-BBLtgdR1.mjs";import{t as o}from"./output-BOe-3AQG.mjs";import{t as s}from"./dry-run-DRj2_uV3.mjs";import{t as c}from"./progress-CQqDtgmF.mjs";import{t as l}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-C8FyienX.mjs";function v(e){return e.usage(`$0 pay-per-use enabled-domains list
3
+
4
+ Returns publisher domains associated with the requesting Pay Per Use operator through an accepted price agreement. License expiration is the earlier non-null boundary from the price agreement and publisher zone lifecycles. A future expiration remains active and is exposed to the operator. After expiration, the license remains listed as expired for one calendar month before it is omitted; an active agreement for the same domain takes precedence. The requesting account must be an active Pay Per Use operator.`).option(`cursor`,{type:`string`,description:`Opaque, account-bound cursor returned by the previous page. Cursors expire after one hour; restart pagination without a cursor after receiving a 400 response for an expired cursor.`}).option(`per-page`,{type:`number`,description:`Maximum number of domains to return`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`list`,describe:`List enabled Pay Per Use domains`,builder:v,handler:async t=>l({command:`pay-per-use enabled-domains list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={cursor:t.cursor,per_page:t[`per-page`]};if(t.dryRun){let e=await r();s({command:`cf pay-per-use enabled-domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/enabled-domains`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.payPerUse.enabledDomains.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},b={command:`enabled-domains`,describe:`Operations for enabled-domains`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.usage(`$0 pay-per-use operator get-configuration
5
+
6
+ Gets the pay-per-use operator configuration for an account, including its read-only non-billable classification timestamp.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get-configuration`,describe:`Get pay-per-use operator configuration`,builder:x,handler:async t=>l({command:`pay-per-use operator get-configuration`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf pay-per-use operator get-configuration`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/operator/configuration`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.payPerUse.operator.getConfiguration({account_id:l}));o(u,{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 pay-per-use operator set-configuration
7
+
8
+ Creates or updates the pay-per-use operator configuration for an account. Creating an enabled configuration or re-enabling a disabled billable operator requires completed Stripe onboarding, while non-billable operators do not; an already-enabled operator is not affected by later Stripe status changes. A Cloudflare-verified operator's name and default price cannot be changed.`).option(`default-price-usd-microcents`,{type:`number`,description:`Default price in microcents. 1 USD = 100,000,000 microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator configuration`})}const w={command:`set-configuration`,describe:`Set pay-per-use operator configuration`,builder:C,handler:async t=>l({command:`pay-per-use operator set-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf pay-per-use operator set-configuration`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/operator/configuration`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({default_price_usd_microcents:t[`default-price-usd-microcents`],enabled:t.enabled,name:p(t.name,`name`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.payPerUse.operator.setConfiguration({body:e,account_id:l}));o(n,{successLabel:`Updated`});return}if(t[`default-price-usd-microcents`]===void 0)throw Error(`--default-price-usd-microcents is required (or pass --body with this field set).`);if(t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);t.name===void 0&&(t.name=await h(`name`,`The name field`));let d=f({default_price_usd_microcents:t[`default-price-usd-microcents`],enabled:t.enabled,name:p(t.name,`name`,`text`)}),m=await c(`Updating`,async()=>i.payPerUse.operator.setConfiguration({body:d,account_id:l}));o(m,{successLabel:`Updated`})})};function T(e){return e.usage(`$0 pay-per-use operator update-configuration
9
+
10
+ Updates one or more fields of an existing pay-per-use operator configuration. Re-enabling a disabled billable operator requires completed Stripe onboarding, while non-billable operators do not; an already-enabled operator is not affected by later Stripe status changes. A Cloudflare-verified operator's name and default price cannot be changed.`).option(`default-price-usd-microcents`,{type:`number`,description:`Default price in microcents. 1 USD = 100,000,000 microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator configuration update`})}const E={command:`update-configuration`,describe:`Update pay-per-use operator configuration`,builder:T,handler:async t=>l({command:`pay-per-use operator update-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf pay-per-use operator update-configuration`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/operator/configuration`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({default_price_usd_microcents:t[`default-price-usd-microcents`],enabled:t.enabled,name:p(t.name,`name`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.payPerUse.operator.updateConfiguration({...e,account_id:l}));o(n,{successLabel:`Updated`});return}let d=f({default_price_usd_microcents:t[`default-price-usd-microcents`],enabled:t.enabled,name:p(t.name,`name`,`text`)}),m=await c(`Updating`,async()=>i.payPerUse.operator.updateConfiguration({...d,account_id:l}));o(m,{successLabel:`Updated`})})},D={command:`operator`,describe:`Operations for operator`,builder:e=>e.command(S).command(w).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.usage(`$0 pay-per-use pricing list-operators
11
+
12
+ Lists a paginated set of enabled pay-per-use operators with verified names, matching billing classification, and their prices for a zone.`).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list-operators`,describe:`List pay-per-use operators`,builder:O,handler:async e=>l({command:`pay-per-use pricing list-operators`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){s({command:`cf pay-per-use pricing list-operators`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/operators`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let l=await c(`Loading`,async()=>r.payPerUse.pricing.listOperators({zone_id:a,...t}));o(l,{successLabel:`Loaded`})})};function A(e){return e.usage(`$0 pay-per-use pricing opt-out-operator-price <operator-id>
13
+
14
+ Opts a zone out by scheduling the current accepted pay-per-use operator price to expire at the start of the next UTC month. Use the withdraw action for a pending proposal.`).positional(`operator-id`,{type:`string`,description:`Stable pay-per-use operator identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const j={command:`opt-out-operator-price <operator-id>`,describe:`Opt out of a pay-per-use operator price`,builder:A,handler:async e=>l({command:`pay-per-use pricing opt-out-operator-price`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-use pricing opt-out-operator-price`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/operators/${e[`operator-id`]==null?`<operator-id>`:encodeURIComponent(String(e[`operator-id`]))}/price`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operator-id":String(e[`operator-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await _({force:!!e.force})){process.stderr.write(`Aborted.
15
+ `);return}let a=await c(`Deleting`,async()=>t.payPerUse.pricing.optOutOperatorPrice({zone_id:r,operator_id:e[`operator-id`]}));o(a,{successLabel:`Deleted`})})};function M(e){return e.usage(`$0 pay-per-use pricing set-operator-price <operator-id>
16
+
17
+ Proposes a required price, withdraws a pending proposal, accepts an operator's default pay-per-use price, or resumes an accepted price before its scheduled expiry. Propose, accept_default, and resume require an enabled operator with a verified name, an enabled publisher zone, and matching billing classifications.`).positional(`operator-id`,{type:`string`,description:`Stable pay-per-use operator identifier.`,demandOption:!0}).option(`action`,{type:`string`,description:`The action field`,choices:[`propose`,`withdraw`,`accept_default`,`resume`]}).coerce(`action`,e=>p(e,`action`,`text`)).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use publisher price action`})}const ee={command:`set-operator-price <operator-id>`,describe:`Set a pay-per-use operator price`,builder:M,handler:async e=>l({command:`pay-per-use pricing set-operator-price`,classification:{safeFlags:[`action`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-use pricing set-operator-price`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/operators/${e[`operator-id`]==null?`<operator-id>`:encodeURIComponent(String(e[`operator-id`]))}/price`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operator-id":String(e[`operator-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({action:e.action,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.payPerUse.pricing.setOperatorPrice({body:n,zone_id:r,operator_id:e[`operator-id`]}));o(i,{successLabel:`Created`});return}if(e.action===void 0&&(e.action=await g(`action`,`The action field`,[`propose`,`withdraw`,`accept_default`,`resume`])),e.action===`propose`&&e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let a=f({action:e.action,price_usd_microcents:e[`price-usd-microcents`]}),l=await c(`Creating`,async()=>t.payPerUse.pricing.setOperatorPrice({body:a,zone_id:r,operator_id:e[`operator-id`]}));o(l,{successLabel:`Created`})})},N={command:`pricing`,describe:`Operations for pricing`,builder:e=>e.command(k).command(j).command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage(`$0 pay-per-use proposals decide
18
+
19
+ Accepts or rejects the pending pay-per-use price proposal identified by price_id in the request body. Acceptance requires an enabled operator with a verified name, an enabled publisher zone, and matching billing classifications; rejection remains available for cleanup.`).option(`action`,{type:`string`,description:`The action field`,choices:[`accept`,`reject`]}).coerce(`action`,e=>p(e,`action`,`text`)).option(`price-id`,{type:`number`,description:`Pending pay-per-use price id returned in the operator proposal queue.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator proposal decision`})}const F={command:`decide`,describe:`Decide a pay-per-use price proposal`,builder:P,handler:async t=>l({command:`pay-per-use proposals decide`,classification:{safeFlags:[`action`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf pay-per-use proposals decide`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/proposals`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({action:t.action,price_id:t[`price-id`]}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.payPerUse.proposals.decide({...e,account_id:l}));o(n,{successLabel:`Created`});return}if(t.action===void 0&&(t.action=await g(`action`,`The action field`,[`accept`,`reject`])),t[`price-id`]===void 0)throw Error(`--price-id is required (or pass --body with this field set).`);let d=f({action:t.action,price_id:t[`price-id`]}),p=await c(`Creating`,async()=>i.payPerUse.proposals.decide({...d,account_id:l}));o(p,{successLabel:`Created`})})};function I(e){return e.usage(`$0 pay-per-use proposals list
20
+
21
+ Lists a paginated set of outstanding pay-per-use publisher price proposals for an operator. Listing remains available while the operator is disabled or its name is unverified so proposals can be rejected.`).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List pay-per-use price proposals`,builder:I,handler:async t=>l({command:`pay-per-use proposals list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={page:t.page,per_page:t[`per-page`]};if(t.dryRun){let e=await r();s({command:`cf pay-per-use proposals list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/proposals`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.payPerUse.proposals.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},R={command:`proposals`,describe:`Operations for proposals`,builder:e=>e.command(F).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage(`$0 pay-per-use usage-reports submit
22
+
23
+ Validates and submits a usage report for an active Pay Per Use participant. The complete report is rejected if any item is invalid.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const B={command:`submit`,describe:`Submit a participant usage report`,builder:z,handler:async i=>l({command:`pay-per-use usage-reports submit`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=await r();s({command:`cf pay-per-use usage-reports submit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/usage-reports`,pathParams:{},bodyKind:`octet-stream`,body:i.body});return}let l=await n(i),u=i.local?e:await a();if(i.accountId=u,i.file){let e=m(i.file),n=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/pay-per-use/usage-reports`,{body:e,headers:{"Content-Type":`application/jsonl`}}));o(n,{successLabel:`Created`});return}if(i.body){let e=p(i.body,`body`,`binary`),n=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/pay-per-use/usage-reports`,{body:e,headers:{"Content-Type":`application/jsonl`}}));o(n,{successLabel:`Created`});return}if(i.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},V={command:`usage-reports`,describe:`Operations for usage-reports`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function H(e){return e.usage(`$0 pay-per-use usage-stats get-account
24
+
25
+ Returns reported usage and the full gross value across all Pay Per Use zones in a publisher account or zone over an explicit UTC range of at most 31 days. Usage from every domain and snapshotted price is summed by buyer. Ranges up to and including 7 days use hourly data points; longer ranges use daily data points. Because source data is aggregated hourly, both requested bounds are rounded down to the selected UTC interval and the resolved bounds are returned in the response. The resolved range must contain at least one complete interval. Empty periods are omitted. Buyers and their data points are paginated, while totals cover every buyer in the range. Values are raw usage counts and USD microcents; total_price_usd_microcents is the full value before the publisher revenue share.`).option(`since`,{type:`string`,description:`Requested inclusive beginning of the statistics range as an RFC3339 timestamp. Rounded down to the selected UTC interval.`,demandOption:!0}).option(`until`,{type:`string`,description:`Requested exclusive end of the statistics range as an RFC3339 timestamp. Rounded down to the selected UTC interval. The requested duration from since cannot exceed 31 days.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get-account`,describe:`Get pay-per-use usage statistics`,builder:H,handler:async t=>l({command:`pay-per-use usage-stats get-account`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let l={since:t.since,until:t.until,page:t.page,per_page:t[`per-page`]};if(t.dryRun){let e=t.zone===void 0?await r():void 0,n=t.zone===void 0?`accounts`:`zones`,i=t.zone??e??`<account-id>`;s({command:`cf pay-per-use usage-stats get-account`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/pay-per-use/usage-stats`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(t),d=t.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:t.zone},u,{quiet:t.quiet}):t.local?e:await a();d===`zones`?t.zoneId=f:t.accountId=f;let p=await c(`Loading`,async()=>u.payPerUse.usageStats.getAccount({account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})},W={command:`usage-stats`,describe:`Operations for usage-stats`,builder:e=>e.command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 pay-per-use zones get-can-be-enabled
26
+
27
+ Gets whether pay-per-use can be enabled for a zone and the current zone-level grace period.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get-can-be-enabled`,describe:`Get pay-per-use zone eligibility`,builder:G,handler:async e=>l({command:`pay-per-use zones get-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-use zones get-can-be-enabled`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/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.payPerUse.zones.getCanBeEnabled({zone_id:r}));o(a,{successLabel:`Loaded`})})};function q(e){return e.usage(`$0 pay-per-use zones get-configuration
28
+
29
+ Gets the pay-per-use configuration, zone-level grace period, and read-only non-billable classification timestamp for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get-configuration`,describe:`Get pay-per-use zone configuration`,builder:q,handler:async e=>l({command:`pay-per-use zones get-configuration`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-use zones get-configuration`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/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.payPerUse.zones.getConfiguration({zone_id:r}));o(a,{successLabel:`Loaded`})})};function Y(e){return e.usage(`$0 pay-per-use zones set-can-be-enabled
30
+
31
+ Sets pay-per-use eligibility for a list of account zones. An omitted can_be_enabled value leaves that zone unchanged. Revoking eligibility disables the zone immediately while existing accepted licenses remain active until the start of the next UTC month.`).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:`Pay-per-use zone eligibility updates`})}const X={command:`set-can-be-enabled`,describe:`Set pay-per-use zone eligibility`,builder:Y,handler:async t=>l({command:`pay-per-use zones set-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf pay-per-use zones set-can-be-enabled`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/zones_can_be_enabled`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({zones:d(t.zones,`zones`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.payPerUse.zones.setCanBeEnabled({...e,account_id:l}));o(n,{successLabel:`Updated`});return}if(t.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let p=f({zones:d(t.zones,`zones`)}),m=await c(`Updating`,async()=>i.payPerUse.zones.setCanBeEnabled({...p,account_id:l}));o(m,{successLabel:`Updated`})})};function Z(e){return e.usage(`$0 pay-per-use zones update-configuration
32
+
33
+ Enables or disables an existing pay-per-use zone configuration. Omitting enabled leaves the zone unchanged. Enabling a disabled billable zone requires completed publisher Stripe onboarding, while non-billable zones do not; an already-enabled zone is not affected by later Stripe status changes. Disabling starts a disabled period immediately while existing accepted licenses remain active until the start of the next UTC month; re-enabling before expiry clears the schedule and restores those licenses.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use zone configuration update`})}const Q={command:`update-configuration`,describe:`Update pay-per-use zone configuration`,builder:Z,handler:async e=>l({command:`pay-per-use zones update-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-use zones update-configuration`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({enabled:e.enabled}):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.payPerUse.zones.updateConfiguration({...n,zone_id:r}));o(i,{successLabel:`Updated`});return}let a=f({enabled:e.enabled}),l=await c(`Updating`,async()=>t.payPerUse.zones.updateConfiguration({...a,zone_id:r}));o(l,{successLabel:`Updated`})})},$={command:`zones`,describe:`Operations for zones`,builder:e=>e.command(K).command(J).command(X).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},te={command:`pay-per-use`,describe:`pay-per-use`,builder:e=>e.command(b).command(D).command(N).command(R).command(V).command(W).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{te as default};