cf 1.0.0-beta.5 → 1.0.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/dist/_meta/commands.json +5047 -5068
  2. package/dist/_meta/hand-written-commands.json +1 -1
  3. package/dist/_meta/schemas.json +3026 -3123
  4. package/dist/abuse-reports-BtI6fvRl.mjs +24 -0
  5. package/dist/{access-DRlrq_cq.mjs → access-CqOyTHw4.mjs} +1 -1
  6. package/dist/{account-tags-DMCYk5rR.mjs → account-tags-7I77Dwsd.mjs} +1 -1
  7. package/dist/{accounts-BlVDzIWc.mjs → accounts-Cq-eOPzL.mjs} +32 -26
  8. package/dist/{acm-CCc33e4l.mjs → acm-CSXnlN6o.mjs} +1 -1
  9. package/dist/{addressing-BA-5A3jQ.mjs → addressing-C5XvjNhk.mjs} +1 -1
  10. package/dist/{agent-memory-Csgs8W5u.mjs → agent-memory-CSzr9gty.mjs} +1 -1
  11. package/dist/{ai-BN_pzw7p.mjs → ai-C0xWIvsG.mjs} +7 -9
  12. package/dist/{ai-audit-Dbln3Ai6.mjs → ai-audit-B43vm1KJ.mjs} +1 -1
  13. package/dist/{ai-gateway-BhASWwdp.mjs → ai-gateway-BK3MbIzT.mjs} +1 -1
  14. package/dist/{ai-search-DvA8g4xr.mjs → ai-search-TrFTxBbn.mjs} +1 -1
  15. package/dist/{ai-security-nualpneg.mjs → ai-security-JrYa27qd.mjs} +1 -1
  16. package/dist/{alerting-HUbVuQMl.mjs → alerting-B1-ZwfVT.mjs} +1 -1
  17. package/dist/{analytics-ClKN9YnQ.mjs → analytics-B-wlVtDV.mjs} +1 -1
  18. package/dist/{analytics_engine-DP_O5HIq.mjs → analytics_engine-DWzzQzOs.mjs} +1 -1
  19. package/dist/{api-security-Ce_9nFH9.mjs → api-security-BWFWWmXl.mjs} +1 -1
  20. package/dist/{argo-CLLBrtiV.mjs → argo-DHPGTvCT.mjs} +1 -1
  21. package/dist/{artifacts-CIxZX3VM.mjs → artifacts-mmBDk3wO.mjs} +1 -1
  22. package/dist/{audit-logs-DjzIj9T4.mjs → audit-logs-CCF5e500.mjs} +1 -1
  23. package/dist/{auth-CgPQplnD.mjs → auth-Dnp10uLy.mjs} +1 -1
  24. package/dist/{auth-B_Utev-x.mjs → auth-gOCL6Pm0.mjs} +2 -2
  25. package/dist/{autoconfig-BunaOShS.mjs → autoconfig-DqEPKpj0.mjs} +1 -1
  26. package/dist/basin-catalog-hRY01t_Z.mjs +44 -0
  27. package/dist/{billing-tHlHhEVf.mjs → billing-C_ev-9nh.mjs} +1 -1
  28. package/dist/{bot-management-ChV-gaXh.mjs → bot-management-CyYsXkZt.mjs} +1 -1
  29. package/dist/{botnet-feed-DQWBOEqC.mjs → botnet-feed-Dj5R5v2o.mjs} +1 -1
  30. package/dist/{brand-protection-B3afeuOj.mjs → brand-protection-CmQ6Iu0I.mjs} +1 -1
  31. package/dist/{browser-run-eQMomr1x.mjs → browser-run-sWHTsCSB.mjs} +1 -1
  32. package/dist/build-Dyt1M_Ib.mjs +2 -0
  33. package/dist/{build-VUz0URCV.mjs → build-_qqitpn0.mjs} +1 -1
  34. package/dist/{builds-wTOvlp0S.mjs → builds-c21rTfcg.mjs} +1 -1
  35. package/dist/{cache-s4HK0we7.mjs → cache-CuNjJl6m.mjs} +27 -27
  36. package/dist/{certificate-authorities-CaPUfYzA.mjs → certificate-authorities-DRUUzvI3.mjs} +1 -1
  37. package/dist/{cli-CT-QJu7q.mjs → cli-Caa776EB.mjs} +1 -1
  38. package/dist/{client-certificates-BfNDnT8H.mjs → client-certificates-BSi1CEGk.mjs} +1 -1
  39. package/dist/{client-side-security-BV7iORbb.mjs → client-side-security-BdxUX3Y8.mjs} +1 -1
  40. package/dist/{cloud-connector-CGT8ezvv.mjs → cloud-connector-B46ajuAj.mjs} +1 -1
  41. package/dist/{cloudforce-one-BDhbXtA_.mjs → cloudforce-one-adbVR2Ah.mjs} +47 -56
  42. package/dist/{command-DJF4wdrM.mjs → command-B47VlNBp.mjs} +1 -1
  43. package/dist/{command-ozwmaY7n.mjs → command-B5Itp2BM.mjs} +1 -1
  44. package/dist/{command-DjNcY4cf.mjs → command-BDCTd8Ra.mjs} +1 -1
  45. package/dist/{command-Cox9Wh1i.mjs → command-BmXnByw9.mjs} +1 -1
  46. package/dist/{command-C3Qhz4kU.mjs → command-Bw-M_qxb.mjs} +1 -1
  47. package/dist/{command-BgBsFEYv.mjs → command-C2bU5Etc.mjs} +1 -1
  48. package/dist/{command-DQcG8PK-.mjs → command-CHcCSvVz.mjs} +1 -1
  49. package/dist/{command-C8gLcKlB.mjs → command-CRgQ0dM3.mjs} +1 -1
  50. package/dist/{command-DH67hNLj.mjs → command-CVg0qT13.mjs} +1 -1
  51. package/dist/{command-DpEQ07Xe.mjs → command-CkJvjkfK.mjs} +1 -1
  52. package/dist/{command-C_l69o2b.mjs → command-DV196MKR.mjs} +1 -1
  53. package/dist/{command-lYaHS62l.mjs → command-Du3MiYA7.mjs} +1 -1
  54. package/dist/{command-SgtzgQrs.mjs → command-eBmGBTA7.mjs} +1 -1
  55. package/dist/{command-G_VL3Jf8.mjs → command-eqgT8zz4.mjs} +1 -1
  56. package/dist/{completions-VR53Fiec.mjs → completions-DbT6O2ol.mjs} +1 -1
  57. package/dist/{connector-interrupts-hfttjm-b.mjs → connector-interrupts-BhfMiPcq.mjs} +1 -1
  58. package/dist/{connector-telemetry-events-5nVvivYA.mjs → connector-telemetry-events-CxKECRgO.mjs} +1 -1
  59. package/dist/{connector-telemetry-snapshots-DKk_7VQa.mjs → connector-telemetry-snapshots-BHi-jHE5.mjs} +1 -1
  60. package/dist/{connectors-CvX4Z3cg.mjs → connectors-gkP2aNSN.mjs} +1 -1
  61. package/dist/{containers-BU9RquYh.mjs → containers-BY8pinEV.mjs} +1 -1
  62. package/dist/{containers-BQxj87na.mjs → containers-DUvBpnRo.mjs} +1 -1
  63. package/dist/{content-scan-hWh-aGbO.mjs → content-scan-BCPhAjMZ.mjs} +1 -1
  64. package/dist/{context-CPVzoKbN.mjs → context-CE7QFX-z.mjs} +1 -1
  65. package/dist/{cps-o8QQFfnF.mjs → cps-B35EPUAk.mjs} +1 -1
  66. package/dist/{csamScanner-DHod3Hak.mjs → csamScanner-DcTA9oLR.mjs} +1 -1
  67. package/dist/{ct-alerting-D-_YsE1x.mjs → ct-alerting-B3CS-CPk.mjs} +1 -1
  68. package/dist/{custom-certificates-UnaVRb3W.mjs → custom-certificates-IjJJhl7_.mjs} +1 -1
  69. package/dist/{custom-csrs-BCJ7LOUe.mjs → custom-csrs-ChYOaEQg.mjs} +1 -1
  70. package/dist/{custom-hostnames-DOluVIfa.mjs → custom-hostnames-Bai3cqAD.mjs} +1 -1
  71. package/dist/{custom-nameservers-CvIucaA2.mjs → custom-nameservers-DsukmLNZ.mjs} +1 -1
  72. package/dist/{custom-pages-DzrXSeCR.mjs → custom-pages-CiboX-9D.mjs} +1 -1
  73. package/dist/d1-s293SFAJ.mjs +41 -0
  74. package/dist/{dcv-delegation-9bMHPSoc.mjs → dcv-delegation-BfgvmpQT.mjs} +1 -1
  75. package/dist/{deploy-BT_EVz0K.mjs → deploy-CvxNMDbS.mjs} +1 -1
  76. package/dist/{deploy-input-YW632ysz.mjs → deploy-input-CNrImP7B.mjs} +1 -1
  77. package/dist/{dev-jRnP9IIJ.mjs → dev-Z6vYszaT.mjs} +1 -1
  78. package/dist/{diagnostics-BIe-XR-P.mjs → diagnostics-Ops0RjxG.mjs} +1 -1
  79. package/dist/discover-CcGReXr0.mjs +2 -0
  80. package/dist/{dist-COohnEBL.mjs → dist-Dgnf_i4w.mjs} +1 -1
  81. package/dist/{dls-BuKO5QWL.mjs → dls-uo7NYEqE.mjs} +1 -1
  82. package/dist/{dns-DzVN-WA4.mjs → dns-B-NwBOpQ.mjs} +52 -43
  83. package/dist/{dns-firewall-Dx_XvWKJ.mjs → dns-firewall-LTIP13nb.mjs} +1 -1
  84. package/dist/durable-objects-o7uB3YYg.mjs +6 -0
  85. package/dist/{email-auth-DqIyzEcR.mjs → email-auth-BUdBDCaE.mjs} +1 -1
  86. package/dist/{email-routing-8rhAmzOY.mjs → email-routing-BPRliM3z.mjs} +1 -1
  87. package/dist/{email-security-BRq5J31C.mjs → email-security-dbLE3I5c.mjs} +50 -50
  88. package/dist/{email-sending-Bsfk4Jia.mjs → email-sending-BLlGy5Mn.mjs} +1 -1
  89. package/dist/error-sanitization-CEf4JTNN.mjs +2 -0
  90. package/dist/{error-sanitization-Dc4bLj8k.mjs → error-sanitization-CcNUzN1f.mjs} +1 -1
  91. package/dist/{fieldExtractors-COaK02vB.mjs → fieldExtractors-M-KfLOGw.mjs} +1 -1
  92. package/dist/{firewall-Dar706zc.mjs → firewall-DzbLwqo3.mjs} +1 -1
  93. package/dist/flagship-DcXWEywy.mjs +28 -0
  94. package/dist/{fraud-H-mdJfRU.mjs → fraud-CGXRWANi.mjs} +1 -1
  95. package/dist/generate-t4dFfFRV.mjs +2 -0
  96. package/dist/{google-tag-gateway-zqXS_12f.mjs → google-tag-gateway-B3Z3Puwl.mjs} +1 -1
  97. package/dist/{healthchecks-x889sT8g.mjs → healthchecks-BIiV29q7.mjs} +1 -1
  98. package/dist/{hostnames-DqB5I-_U.mjs → hostnames-ueWsZFwv.mjs} +1 -1
  99. package/dist/{hyperdrive-sR7Mwif9.mjs → hyperdrive-Bxk9LZf5.mjs} +1 -1
  100. package/dist/{iam-CKt7U41p.mjs → iam-kA9gcv79.mjs} +1 -1
  101. package/dist/{images-CakdBcMc.mjs → images-CK4J5as7.mjs} +1 -1
  102. package/dist/index.mjs +1 -1
  103. package/dist/{init-CVyWV_Ow.mjs → init-COcG8sp5.mjs} +2 -2
  104. package/dist/{intel-Dcv1vMsK.mjs → intel-z7DkM9Xc.mjs} +1 -1
  105. package/dist/{ips-Ce9_k1Vh.mjs → ips-BXdBK4Co.mjs} +1 -1
  106. package/dist/{keyless-certificates-Cf_6sc7K.mjs → keyless-certificates-Dp9xTYtD.mjs} +1 -1
  107. package/dist/{keys-DW2A43fL.mjs → keys-DrVlj4VI.mjs} +1 -1
  108. package/dist/{kv-BKBWXf8s.mjs → kv-WX-dlUT1.mjs} +1 -1
  109. package/dist/{lazy-command-BOjQB_U7.mjs → lazy-command-g04RHlS2.mjs} +1 -1
  110. package/dist/{leaked-credential-checks-D-gwxxaF.mjs → leaked-credential-checks-BMQ0VhCd.mjs} +1 -1
  111. package/dist/{load-balancers-DHUVei95.mjs → load-balancers-BbkSL89c.mjs} +1 -1
  112. package/dist/local-BWhuu9TH.mjs +2 -0
  113. package/dist/{local-B3OyWKkW.mjs → local-Cyk8fPvL.mjs} +1 -1
  114. package/dist/{local-runtime-Co5vVDlI.mjs → local-runtime-CWWJJB2E.mjs} +1 -1
  115. package/dist/{login-CptngugC.mjs → login-CyU_ZTNI.mjs} +1 -1
  116. package/dist/{login-D37fy09s.mjs → login-DYQ8UgJQ.mjs} +1 -1
  117. package/dist/{logo-matches-D1aNSBnZ.mjs → logo-matches-HFmD2hK6.mjs} +1 -1
  118. package/dist/{logos-SyEjq15s.mjs → logos-Di2PABE_.mjs} +1 -1
  119. package/dist/{logpush-l9tVWnua.mjs → logpush-DEqdt0I0.mjs} +1 -1
  120. package/dist/logs-Ckfw-3Q_.mjs +37 -0
  121. package/dist/{magic-cloud-networking-CN2Qd2Lx.mjs → magic-cloud-networking-C0yBJKMb.mjs} +1 -1
  122. package/dist/{magic-network-monitoring-8jxG-tPc.mjs → magic-network-monitoring-CLvaiI7s.mjs} +1 -1
  123. package/dist/{magic-transit-DLhIQz2l.mjs → magic-transit-Bhb1kxYj.mjs} +108 -112
  124. package/dist/{managed-defense-CgKdTd9J.mjs → managed-defense-COL3aqXw.mjs} +1 -1
  125. package/dist/{managed-transforms-BASi4j_s.mjs → managed-transforms-cK0strTK.mjs} +1 -1
  126. package/dist/{matches-BCV6x948.mjs → matches-Df4WEz0x.mjs} +1 -1
  127. package/dist/{mcp-DQODvLQm.mjs → mcp-DK_5OUVl.mjs} +1 -1
  128. package/dist/{mesh-S_yYh-w3.mjs → mesh-CVXpTYED.mjs} +1 -1
  129. package/dist/{migrate-B4kBnkpV.mjs → migrate-CipwWhJE.mjs} +1 -1
  130. package/dist/monetization-BHk0S5BF.mjs +20 -0
  131. package/dist/{mtls-certificates-XJXK21J_.mjs → mtls-certificates-8pzdxzOX.mjs} +1 -1
  132. package/dist/{network-DA81Mcdh.mjs → network-ClNeXTvG.mjs} +1 -1
  133. package/dist/{network-interconnects-OttR92s7.mjs → network-interconnects-t3jSoV7o.mjs} +1 -1
  134. package/dist/{oauth-ChXrM0q9.mjs → oauth-CJamdfrC.mjs} +1 -1
  135. package/dist/{oauth-CKeW8CqE.mjs → oauth-CNSirGUu.mjs} +1 -1
  136. package/dist/{oauth-clients-Ba-YZsxB.mjs → oauth-clients-DBxdvlJC.mjs} +1 -1
  137. package/dist/{oauth-scopes-XqOk2zCQ.mjs → oauth-scopes-D39GYkt6.mjs} +1 -1
  138. package/dist/{observability-BdIbZ1D8.mjs → observability-ZV1yPflB.mjs} +1 -1
  139. package/dist/{organization-DnQ2_txo.mjs → organization-Bk-TkQlB.mjs} +7 -7
  140. package/dist/{organizations-BkI0IhEg.mjs → organizations-hXITNpPl.mjs} +1 -1
  141. package/dist/{origin-ca-certificates-Br91H1EG.mjs → origin-ca-certificates-DsLR_Z2e.mjs} +1 -1
  142. package/dist/{origin-post-quantum-encryption-BcpK8DaG.mjs → origin-post-quantum-encryption-C_egsVQu.mjs} +1 -1
  143. package/dist/{origin-tls-client-auth-CYK6YnzK.mjs → origin-tls-client-auth-DPG6A6kz.mjs} +1 -1
  144. package/dist/{page-rules-DpOcNsJr.mjs → page-rules-B8lrkiiF.mjs} +1 -1
  145. package/dist/pages-Cx4doLvQ.mjs +54 -0
  146. package/dist/{pay-per-crawl-BORpCGxC.mjs → pay-per-crawl-BUVHqPPA.mjs} +1 -1
  147. package/dist/{pay-per-use-CZw-KHEz.mjs → pay-per-use-CzYgryid.mjs} +1 -1
  148. package/dist/{pipelines-DDDyJ6Oe.mjs → pipelines-CGHmwc4a.mjs} +1 -1
  149. package/dist/{precursor-DrH1i64o.mjs → precursor--Jim5u4y.mjs} +1 -1
  150. package/dist/{previews-CiYBBKj8.mjs → previews-BKO1pZyG.mjs} +1 -1
  151. package/dist/{progress-DS2fwfNP.mjs → progress-CRjK46r1.mjs} +1 -1
  152. package/dist/{prompt-doX80PCd.mjs → prompt-C_90YsVE.mjs} +1 -1
  153. package/dist/{queries-CD6h6iEP.mjs → queries-z2pjzXlA.mjs} +1 -1
  154. package/dist/{queues-3TpjE349.mjs → queues-D0IXxSa7.mjs} +1 -1
  155. package/dist/{r2-CV_hSFkM.mjs → r2-DQ7w9dCM.mjs} +1 -1
  156. package/dist/r2-data-catalog-DpktRU5y.mjs +2 -0
  157. package/dist/{radar-6-4_LoQ1.mjs → radar-DyLO7Zg1.mjs} +1 -1
  158. package/dist/{raw-fetch-_Z55VEDY.mjs → raw-fetch-C8SdmQBp.mjs} +1 -1
  159. package/dist/{realtime-B5ce977I.mjs → realtime-mQzLbDxe.mjs} +1 -1
  160. package/dist/{registrar-CF-3h2dN.mjs → registrar-ClbtM5Dy.mjs} +2 -2
  161. package/dist/{registrar-sandbox-BDRZbyAV.mjs → registrar-sandbox-BIEHm_Jp.mjs} +2 -2
  162. package/dist/{reporting-CiS-RBNJ.mjs → reporting-CjkMzSsZ.mjs} +1 -1
  163. package/dist/{request-headers-DPbWytRv.mjs → request-headers-jr2VznA9.mjs} +1 -1
  164. package/dist/{request-tracers-Drcpv8ha.mjs → request-tracers-BoSXOTox.mjs} +1 -1
  165. package/dist/{resource-sharing-BI3CoOjl.mjs → resource-sharing-CFS39nJq.mjs} +1 -1
  166. package/dist/{resource-tagging-D4i_-E0W.mjs → resource-tagging-CZ5mvMhE.mjs} +1 -1
  167. package/dist/{rules-C4I4CLoq.mjs → rules-CfqumI45.mjs} +4 -4
  168. package/dist/{rulesets-c2efesdy.mjs → rulesets-o3jsPv4U.mjs} +20 -20
  169. package/dist/{rum-DT58nW8a.mjs → rum-BZ0rYlun.mjs} +1 -1
  170. package/dist/run-D0_7wBp2.mjs +2 -0
  171. package/dist/{run-CJ-6owN3.mjs → run-huwFFwXd.mjs} +1 -1
  172. package/dist/{schema-flags-DDW79Tda.mjs → schema-flags-nL7pHvaE.mjs} +1 -1
  173. package/dist/{scim-PfJWMuRu.mjs → scim-0-eR9pvC.mjs} +1 -1
  174. package/dist/{sdk-Bx29ZKK3.mjs → sdk-Bmz7t_CD.mjs} +1 -1
  175. package/dist/{secrets-store-7jrgww1J.mjs → secrets-store-Duc29Zs-.mjs} +1 -1
  176. package/dist/security-insights-5CuLC-Yo.mjs +40 -0
  177. package/dist/{security-txt-ButEG3qy.mjs → security-txt-qm2PqCPz.mjs} +1 -1
  178. package/dist/{shared-JNtE--kh.mjs → shared-BDIrEKWt.mjs} +1 -1
  179. package/dist/{smart-shield-DgbYuUFC.mjs → smart-shield-BXLH9OM0.mjs} +1 -1
  180. package/dist/{snippets-De-xVTIb.mjs → snippets-DZG6UWeH.mjs} +1 -1
  181. package/dist/{spawn-IM_tQldH.mjs → spawn-KZqyx6KK.mjs} +1 -1
  182. package/dist/{spectrum-DcknX0jS.mjs → spectrum-Be4ImAIY.mjs} +1 -1
  183. package/dist/{speed-Cn_p-ieT.mjs → speed-CNWujfIC.mjs} +1 -1
  184. package/dist/{src-BYjublVL.mjs → src-CW6py11z.mjs} +5 -5
  185. package/dist/{ssl-Bkn4ke9Q.mjs → ssl-BIlS4Qs8.mjs} +1 -1
  186. package/dist/{stream-Cx78uNm_.mjs → stream-C5RvTAKF.mjs} +1 -1
  187. package/dist/{submit-Gu34n1a6.mjs → submit-Bpru4P79.mjs} +1 -1
  188. package/dist/{tags-BQqO7TLX.mjs → tags-Rv7X1rU9.mjs} +1 -1
  189. package/dist/{telemetry-Qc-g_0fL.mjs → telemetry-0npQCuKc.mjs} +1 -1
  190. package/dist/telemetry-B4_YhD82.mjs +2 -0
  191. package/dist/tenant-CjYf6OPN.mjs +10 -0
  192. package/dist/{tenant-custom-nameservers-B5Nf5hLr.mjs → tenant-custom-nameservers-BbHaaEhv.mjs} +1 -1
  193. package/dist/{tunnels-ndJtol-f.mjs → tunnels-CLWPaIIF.mjs} +1 -1
  194. package/dist/{turnstile-Cd65N6jD.mjs → turnstile-C5ezKSoz.mjs} +1 -1
  195. package/dist/update-check-CebyUyqG.mjs +2 -0
  196. package/dist/{update-check-AraGlAQf.mjs → update-check-aOpHVlzB.mjs} +1 -1
  197. package/dist/update-check-worker.mjs +1 -1
  198. package/dist/{url-info-CQKJ5A-x.mjs → url-info-Gcf8-MyB.mjs} +1 -1
  199. package/dist/{url-normalization-BPXZwYu0.mjs → url-normalization-Dvg8mZRk.mjs} +1 -1
  200. package/dist/{url-scanner-Bq43LJ98.mjs → url-scanner-BZCsgh0O.mjs} +1 -1
  201. package/dist/{user-D4InwQxA.mjs → user-BnkvXmjc.mjs} +1 -1
  202. package/dist/{values-C3YLablc.mjs → values-yUGls__L.mjs} +1 -1
  203. package/dist/{vectorize-CYt0qXQ5.mjs → vectorize-BiXngTuI.mjs} +3 -3
  204. package/dist/version-C3q1GMTe.mjs +2 -0
  205. package/dist/{waiting-rooms-B3ksWao9.mjs → waiting-rooms-BoLWF74U.mjs} +1 -1
  206. package/dist/{web-assets-DNiElHgV.mjs → web-assets-CEJ9Zne1.mjs} +1 -1
  207. package/dist/{web3-DfMKMDix.mjs → web3-CIjm7EuJ.mjs} +1 -1
  208. package/dist/workers-DdtWb7Ws.mjs +38 -0
  209. package/dist/{workers-builds-DbEy311-.mjs → workers-builds-DT4tA-KT.mjs} +1 -1
  210. package/dist/workers-for-platforms-CaCr8ApU.mjs +42 -0
  211. package/dist/{workers-vpc-BEnB6e_3.mjs → workers-vpc-DRtjG39D.mjs} +1 -1
  212. package/dist/{workflows-CX3Zer8w.mjs → workflows-DRme6yrC.mjs} +2 -2
  213. package/dist/{wrangler-migration-BDkh1_IV.mjs → wrangler-migration-BDnS1puc.mjs} +1 -1
  214. package/dist/{zaraz-DR1KbYY-.mjs → zaraz-DmjDEnUJ.mjs} +1 -1
  215. package/dist/{zero-trust-CLoXVq1e.mjs → zero-trust-BRAHExxa.mjs} +427 -441
  216. package/dist/{zone-B9qejq6W.mjs → zone-CclLvb-g.mjs} +1 -1
  217. package/dist/{zones-BxU08wO0.mjs → zones-C6tc2OOV.mjs} +1 -1
  218. package/package.json +3 -2
  219. package/dist/abuse-reports-DoqL_52r.mjs +0 -26
  220. package/dist/account-DfC3gRTf.mjs +0 -12
  221. package/dist/build-DFa0ngeO.mjs +0 -2
  222. package/dist/d1-BCg7BhWi.mjs +0 -45
  223. package/dist/discover-DgHRf-qo.mjs +0 -2
  224. package/dist/durable-objects-DnU6OsEb.mjs +0 -8
  225. package/dist/error-sanitization-Cu-8OKRA.mjs +0 -2
  226. package/dist/flagship-CTchDpyw.mjs +0 -28
  227. package/dist/generate-qMU-2MgC.mjs +0 -2
  228. package/dist/local-qOpZjDed.mjs +0 -2
  229. package/dist/logs-EW0Pq-gf.mjs +0 -48
  230. package/dist/pages-Cw4DM-1N.mjs +0 -60
  231. package/dist/r2-data-catalog-D_YHTMFG.mjs +0 -44
  232. package/dist/run-D0esoYSn.mjs +0 -2
  233. package/dist/security-center-BhUM_Flh.mjs +0 -30
  234. package/dist/telemetry-D2UwfCd1.mjs +0 -2
  235. package/dist/tenant-Dr0hGlhU.mjs +0 -12
  236. package/dist/update-check-D5-zqJoN.mjs +0 -2
  237. package/dist/version-DyZwKU6l.mjs +0 -2
  238. package/dist/workers-C8uiRedD.mjs +0 -40
  239. package/dist/workers-for-platforms-BjvcY5A1.mjs +0 -25
  240. /package/dist/{alerts-DqZgVSCT.mjs → alerts-DY_7Nknx.mjs} +0 -0
  241. /package/dist/{autorag-Cq9k9Ye6.mjs → autorag-K396-M2S.mjs} +0 -0
  242. /package/dist/{cloudflared-91JvyShh.mjs → cloudflared-Ciq4L97v.mjs} +0 -0
  243. /package/dist/{command-C72KLHMc.mjs → command-D1Z5uf_S.mjs} +0 -0
  244. /package/dist/{discover-VRFBjse7.mjs → discover-B_3A4a_t.mjs} +0 -0
  245. /package/dist/{generate-iV6OVNin.mjs → generate-QUDsysBJ.mjs} +0 -0
  246. /package/dist/{rate-limit-analytics-Bw9qmxMx.mjs → rate-limit-analytics-YsGha5pH.mjs} +0 -0
  247. /package/dist/{rate-limits-CDm_xzKt.mjs → rate-limits-kH13NRdf.mjs} +0 -0
  248. /package/dist/{ready-BXGqY1Wi.mjs → ready-DYun4Fpn.mjs} +0 -0
  249. /package/dist/{recent-submissions-AhGZD3a3.mjs → recent-submissions-18NaOGOo.mjs} +0 -0
  250. /package/dist/{refute-D_w5Gw20.mjs → refute-BhMiJcE1.mjs} +0 -0
  251. /package/dist/{registry-DBMUTYqf.mjs → registry-CSv7HR1J.mjs} +0 -0
  252. /package/dist/{scan-logo-BZzFam-Q.mjs → scan-logo-7y0pqFMk.mjs} +0 -0
  253. /package/dist/{scan-page-BPA8nSPM.mjs → scan-page-B6jnK3QI.mjs} +0 -0
  254. /package/dist/{schema-CueLBLXC.mjs → schema-JVvksQ1J.mjs} +0 -0
  255. /package/dist/{search-De0UlXYN.mjs → search-Rn3Eefv8.mjs} +0 -0
  256. /package/dist/{signed-url-ziDz9frX.mjs → signed-url-Dzwy9Xiw.mjs} +0 -0
  257. /package/dist/{submission-info-83D2DCCG.mjs → submission-info-SNhkDRRZ.mjs} +0 -0
  258. /package/dist/{tools-BJbI_f35.mjs → tools-CFEubTr4.mjs} +0 -0
  259. /package/dist/{total-queries-Dhol31Kn.mjs → total-queries-B20xslrH.mjs} +0 -0
  260. /package/dist/{tracked-domains-DoOPs6Vd.mjs → tracked-domains-BCvIOZOK.mjs} +0 -0
  261. /package/dist/{verify-CxpGEnJb.mjs → verify-DOeBG4PL.mjs} +0 -0
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./lazy-command-g04RHlS2.mjs";import{t}from"./local-Cyk8fPvL.mjs";import{a as n,t as r}from"./context-CE7QFX-z.mjs";import{a as i,r as a}from"./auth-gOCL6Pm0.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-CRjK46r1.mjs";import{t as l}from"./run-huwFFwXd.mjs";import"./telemetry-B4_YhD82.mjs";import{n as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f,t as p}from"./input-validation-Dk52b0me.mjs";import{a as m,i as h,n as g}from"./prompt-C_90YsVE.mjs";import{t as ee}from"./cli-types-DoVT5q_M.mjs";var _=e(`deploy [directory]`,`Deploy a directory of static assets as a Pages deployment`,()=>import(`./command-D1Z5uf_S.mjs`),{command:`pages deploy`,recordArgs:!1});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=>l({command:`pages build-cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf pages build-cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/purge_build_cache`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,!await g({force:!!e.force,message:`This operation purges the build cache for a Pages project.`})){process.stderr.write(`Aborted.
5
+ `);return}o(await c(`Deleting`,async()=>i.pages.buildCache.purge({account_id:l,project_name:e[`project-name`]})),{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.`}).option(`deployment-configs-preview-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-preview-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-preview-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-preview-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-preview-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-preview-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-preview-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`deployment-configs-production-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-production-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-production-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-production-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-production-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-production-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-production-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-production-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-production-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`name`,{type:`string`,description:`Name 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`]}).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-build-image-major-version`,`deployment-configs-preview-compatibility-date`,`deployment-configs-preview-compatibility-flags`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-preview-usage-model`,`deployment-configs-preview-wrangler-config-hash`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-build-image-major-version`,`deployment-configs-production-compatibility-date`,`deployment-configs-production-compatibility-flags`,`deployment-configs-production-fail-open`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`,`deployment-configs-production-usage-model`,`deployment-configs-production-wrangler-config-hash`].some(t=>e[t]!==void 0)){let t=[`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --deployment_configs-* flag is set`)}return!0}).check(e=>{if([`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0)){let t=[`source-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0})}const S={command:`create`,describe:`Create a Cloudflare Pages project`,builder:x,handler:async e=>l({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){s({command:`cf pages create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({build_config:{build_caching:e[`build-config-build-caching`],build_command:f(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:f(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:f(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:f(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:f(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:f(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:f(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:f(e[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:f(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:f(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:f(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:f(e[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:f(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:f(e.name,`name`,`text`),production_branch:f(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:f(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(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:f(e[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:f(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(e[`source-type`],`source-type`,`text`)}}):u(e.body)});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,e.body){let t=u(e.body);o(await c(`Creating`,async()=>i.pages.create({...t,account_id:l})),{successLabel:`Created`});return}e.name===void 0&&(e.name=await m(`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 m(`production-branch`,`Production branch of the project. Used to identify production deployments.`));let p=d({build_config:{build_caching:e[`build-config-build-caching`],build_command:f(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:f(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:f(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:f(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:f(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:f(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:f(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:f(e[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:f(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:f(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:f(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:f(e[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:f(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:f(e.name,`name`,`text`),production_branch:f(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:f(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(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:f(e[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:f(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(e[`source-type`],`source-type`,`text`)}});o(await c(`Creating`,async()=>i.pages.create({...p,account_id:l})),{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=>l({command:`pages delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf pages delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,!await g({force:!!e.force})){process.stderr.write(`Aborted.
12
+ `);return}o(await c(`Deleting`,async()=>i.pages.delete({account_id:l,project_name:e[`project-name`]})),{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=>l({command:`pages deployments create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,branch:e.branch,"commit-dirty":e[`commit-dirty`],"commit-hash":e[`commit-hash`],"commit-message":e[`commit-message`],manifest:e.manifest,"pages-build-output-dir":e[`pages-build-output-dir`],"wrangler-config-hash":e[`wrangler-config-hash`]}});return}let l=await a(e),u=e.local?t:await r();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.branch!==void 0||e[`commit-dirty`]!==void 0||e[`commit-hash`]!==void 0||e[`commit-message`]!==void 0||e.manifest!==void 0||e[`pages-build-output-dir`]!==void 0||e[`wrangler-config-hash`]!==void 0){let t=new FormData;if(e.file){let n=p(e.file);t.append(`_headers`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`_headers`,e.body);e.branch!==void 0&&t.append(`branch`,String(f(e.branch,`branch`,`text`)??``)),e[`commit-dirty`]!==void 0&&t.append(`commit_dirty`,String(f(e[`commit-dirty`],`commit-dirty`,`text`)??``)),e[`commit-hash`]!==void 0&&t.append(`commit_hash`,String(f(e[`commit-hash`],`commit-hash`,`text`)??``)),e[`commit-message`]!==void 0&&t.append(`commit_message`,String(f(e[`commit-message`],`commit-message`,`text`)??``)),e.manifest!==void 0&&t.append(`manifest`,String(f(e.manifest,`manifest`,`text`)??``)),e[`pages-build-output-dir`]!==void 0&&t.append(`pages_build_output_dir`,String(f(e[`pages-build-output-dir`],`pages-build-output-dir`,`text`)??``)),e[`wrangler-config-hash`]!==void 0&&t.append(`wrangler_config_hash`,String(f(e[`wrangler-config-hash`],`wrangler-config-hash`,`text`)??``)),o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/pages/projects/${encodeURIComponent(String(e[`project-name`]))}/deployments`,{body:t})),{successLabel:`Created`});return}if(e.body){let t=f(e.body,`body`,`binary`);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/pages/projects/${encodeURIComponent(String(e[`project-name`]))}/deployments`,{body:t,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}o(await c(`Creating`,async()=>l.pages.deployments.create({account_id:u,project_name:e[`project-name`]})),{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=>l({command:`pages deployments delete`,classification:{safeFlags:[`allow-aliased`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let i={force:e[`allow-aliased`]};if(e.dryRun){s({command:`cf pages deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},query:i,bodyKind:`none`});return}let l=await a(e),u=e.local?t:await r();if(e.accountId=u,!await g({force:!!e.force})){process.stderr.write(`Aborted.
17
+ `);return}o(await c(`Deleting`,async()=>l.pages.deployments.delete({account_id:u,project_name:e[`project-name`],deployment_id:e[`deployment-id`],...i})),{successLabel:`Deleted`})})};function k(e){return e.usage(`$0 pages 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=>l({command:`pages deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages deployments get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();e.accountId=l,o(await c(`Loading`,async()=>i.pages.deployments.get({account_id:l,project_name:e[`project-name`],deployment_id:e[`deployment-id`]})),{successLabel:`Loaded`})})};function j(e){return e.usage(`$0 pages 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=>l({command:`pages deployments history logs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages deployments history logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}/history/logs`,pathParams:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();e.accountId=l,o(await c(`Loading`,async()=>i.pages.deployments.history.logs.get({account_id:l,project_name:e[`project-name`],deployment_id:e[`deployment-id`]})),{successLabel:`Loaded`})})},N={command:`logs`,describe:`Operations for 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=>l({command:`pages deployments list`,classification:{safeFlags:[`env`,`dry-run`]}},e,async()=>{let i={env:e.env,page:e.page,per_page:e[`per-page`]};if(e.dryRun){s({command:`cf pages deployments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments`,pathParams:{"project-name":String(e[`project-name`]??``)},query:i,bodyKind:`none`});return}let l=await a(e),u=e.local?t:await r();e.accountId=u,o(await c(`Loading`,async()=>l.pages.deployments.list({account_id:u,project_name:e[`project-name`],...i})),{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=>l({command:`pages deployments retry`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages deployments retry`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}/retry`,pathParams:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();e.accountId=l,o(await c(`Creating`,async()=>i.pages.deployments.retry({account_id:l,project_name:e[`project-name`],deployment_id:e[`deployment-id`]})),{successLabel:`Created`})})};function z(e){return e.usage(`$0 pages 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=>l({command:`pages deployments rollback`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf pages deployments rollback`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}/rollback`,pathParams:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,!await g({force:!!e.force,message:`This operation rolls back the production deployment to an earlier deployment.`})){process.stderr.write(`Aborted.
28
+ `);return}o(await c(`Deleting`,async()=>i.pages.deployments.rollback({account_id:l,project_name:e[`project-name`],deployment_id:e[`deployment-id`]})),{successLabel:`Deleted`})})},te={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 V(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:V,handler:async e=>l({command:`pages domains create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):u(e.body)});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,e.body){let t=u(e.body);o(await c(`Creating`,async()=>i.pages.domains.create({...t,account_id:l,project_name:e[`project-name`]})),{successLabel:`Created`});return}e.name===void 0&&(e.name=await m(`name`,"Fully qualified domain name for the Pages project, such as `example.com`."));let p=d({name:f(e.name,`name`,`text`)});o(await c(`Creating`,async()=>i.pages.domains.create({...p,account_id:l,project_name:e[`project-name`]})),{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=>l({command:`pages domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf pages domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,!await g({force:!!e.force})){process.stderr.write(`Aborted.
33
+ `);return}o(await c(`Deleting`,async()=>i.pages.domains.delete({account_id:l,project_name:e[`project-name`],domain_name:e[`domain-name`]})),{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=>l({command:`pages domains get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();e.accountId=l,o(await c(`Loading`,async()=>i.pages.domains.get({account_id:l,project_name:e[`project-name`],domain_name:e[`domain-name`]})),{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=>l({command:`pages domains list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();e.accountId=l,o(await c(`Loading`,async()=>i.pages.domains.list({account_id:l,project_name:e[`project-name`]})),{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=>l({command:`pages domains validation retry`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages domains validation retry`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();e.accountId=l,o(await c(`Updating`,async()=>i.pages.domains.validation.retry({account_id:l,project_name:e[`project-name`],domain_name:e[`domain-name`]})),{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.`}).option(`deployment-configs-preview-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-preview-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-preview-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-preview-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-preview-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-preview-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-preview-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`deployment-configs-production-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-production-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-production-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-production-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-production-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-production-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-production-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-production-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-production-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`name`,{type:`string`,description:`Name 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`]}).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-build-image-major-version`,`deployment-configs-preview-compatibility-date`,`deployment-configs-preview-compatibility-flags`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-preview-usage-model`,`deployment-configs-preview-wrangler-config-hash`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-build-image-major-version`,`deployment-configs-production-compatibility-date`,`deployment-configs-production-compatibility-flags`,`deployment-configs-production-fail-open`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`,`deployment-configs-production-usage-model`,`deployment-configs-production-wrangler-config-hash`].some(t=>e[t]!==void 0)){let t=[`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --deployment_configs-* flag is set`)}return!0}).check(e=>{if([`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0)){let t=[`source-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0})}const re={command:`edit <project-name>`,describe:`Update a Cloudflare Pages project`,builder:ne,handler:async e=>l({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){s({command:`cf pages edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?d({build_config:{build_caching:e[`build-config-build-caching`],build_command:f(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:f(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:f(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:f(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:f(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:f(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:f(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:f(e[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:f(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:f(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:f(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:f(e[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:f(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:f(e.name,`name`,`text`),production_branch:f(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:f(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(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:f(e[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:f(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(e[`source-type`],`source-type`,`text`)}}):u(e.body)});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,e.body){let t=u(e.body);o(await c(`Updating`,async()=>i.pages.edit({...t,account_id:l,project_name:e[`project-name`]})),{successLabel:`Updated`});return}let p=d({build_config:{build_caching:e[`build-config-build-caching`],build_command:f(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:f(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:f(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:f(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:f(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:f(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:f(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:f(e[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:f(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:f(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:f(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:f(e[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:f(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:f(e.name,`name`,`text`),production_branch:f(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:f(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(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:f(e[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:f(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(e[`source-type`],`source-type`,`text`)}});o(await c(`Updating`,async()=>i.pages.edit({...p,account_id:l,project_name:e[`project-name`]})),{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=>l({command:`pages get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();e.accountId=l,o(await c(`Loading`,async()=>i.pages.get({account_id:l,project_name:e[`project-name`]})),{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=>l({command:`pages list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={page:e.page,per_page:e[`per-page`]};if(e.dryRun){s({command:`cf pages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(e),u=e.local?t:await r();e.accountId=u,o(await c(`Loading`,async()=>l.pages.list({account_id:u,...i})),{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`]}).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`]}).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=>l({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){s({command:`cf pages source connect`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/source`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?d({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:f(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(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:f(e[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:f(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(e.type,`type`,`text`)}):u(e.body)});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,e.body){let t=u(e.body);o(await c(`Creating`,async()=>i.pages.source.connect({...t,account_id:l,project_name:e[`project-name`]})),{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 m(`source-config-owner`,`The owner of the repository.`)),e[`source-config-owner-id`]===void 0&&(e[`source-config-owner-id`]=await m(`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 h(`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 m(`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 m(`source-config-repo-id`,`The ID of the repository.`)),e[`source-config-repo-name`]===void 0&&(e[`source-config-repo-name`]=await m(`source-config-repo-name`,`The name of the repository.`)),e.type===void 0&&(e.type=await h(`type`,`The source control management provider.`,[`github`,`gitlab`]));let p=d({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:f(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(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:f(e[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:f(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(e.type,`type`,`text`)});o(await c(`Creating`,async()=>i.pages.source.connect({...p,account_id:l,project_name:e[`project-name`]})),{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=>l({command:`pages source disconnect`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf pages source disconnect`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/source`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let i=await a(e),l=e.local?t:await r();if(e.accountId=l,!await g({force:!!e.force})){process.stderr.write(`Aborted.
54
+ `);return}o(await c(`Deleting`,async()=>i.pages.source.disconnect({account_id:l,project_name:e[`project-name`]})),{successLabel:`Deleted`})})},de={command:`source`,describe:`Operations for source`,builder:e=>e.command(ce).command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fe={command:`pages`,describe:`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,builder:e=>e.command(S).command(w).command(_).command(re).command(ae).command($).command(b).command(te).command(Q).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{fe as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-CPVzoKbN.mjs";import{r as i}from"./auth-B_Utev-x.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DS2fwfNP.mjs";import{t as c}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,i as m,n as h}from"./prompt-doX80PCd.mjs";import{t as ee}from"./cli-types-DoVT5q_M.mjs";function te(e){return e.usage(`$0 pay-per-crawl config create
2
+ import{t as e}from"./local-Cyk8fPvL.mjs";import{a as t,i as n,t as r}from"./context-CE7QFX-z.mjs";import{r as i}from"./auth-gOCL6Pm0.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-CRjK46r1.mjs";import{t as c}from"./run-huwFFwXd.mjs";import"./telemetry-B4_YhD82.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,i as m,n as h}from"./prompt-C_90YsVE.mjs";import{t as ee}from"./cli-types-DoVT5q_M.mjs";function te(e){return e.usage(`$0 pay-per-crawl config create
3
3
 
4
4
  Creates the pay-per-crawl config for a zone.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents 1 USD = 100,000,000 microcents. Must be 0 or a multiple of 100,000 $0.001. Range: $0.001–$9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for fully replacing a pay-per-crawl zone configuration`})}const g={command:`create`,describe:`Creates pay-per-crawl config for a zone`,builder:te,handler:async e=>c({command:`pay-per-crawl config create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}):l(e.body)});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=l(e.body);a(await s(`Creating`,async()=>t.payPerCrawl.config.create({...n,zone_id:r})),{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let c=d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]});a(await s(`Creating`,async()=>t.payPerCrawl.config.create({...c,zone_id:r})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 pay-per-crawl config edit
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{a as r,r as i}from"./auth-B_Utev-x.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DS2fwfNP.mjs";import{t as c}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as l,t as u}from"./input-validation-Dk52b0me.mjs";function d(e){return e.usage(`$0 pay-per-use enabled-domains list
2
+ import{t as e}from"./local-Cyk8fPvL.mjs";import{a as t,t as n}from"./context-CE7QFX-z.mjs";import{a as r,r as i}from"./auth-gOCL6Pm0.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-CRjK46r1.mjs";import{t as c}from"./run-huwFFwXd.mjs";import"./telemetry-B4_YhD82.mjs";import{n as l,t as u}from"./input-validation-Dk52b0me.mjs";function d(e){return e.usage(`$0 pay-per-use enabled-domains list
3
3
 
4
4
  Returns publisher domains associated with the requesting Pay Per Use operator through an accepted price agreement. License expiration is the earlier non-null boundary from the price agreement and publisher zone lifecycles. A future expiration remains active and is exposed to the operator. After expiration, the license remains listed as expired for one calendar month before it is omitted; an active agreement for the same domain takes precedence. The requesting account must be an active Pay Per Use operator.`).option(`cursor`,{type:`string`,description:`Opaque, account-bound cursor returned by the previous page. Cursors expire after one hour; restart pagination without a cursor after receiving a 400 response for an expired cursor.`}).option(`per-page`,{type:`number`,description:`Maximum number of domains to return`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`list`,describe:`List enabled Pay Per Use domains`,builder:d,handler:async r=>c({command:`pay-per-use enabled-domains list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={cursor:r.cursor,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf pay-per-use enabled-domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pay-per-use/enabled-domains`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.payPerUse.enabledDomains.list({account_id:u,...c})),{successLabel:`Loaded`})})},p={command:`enabled-domains`,describe:`Operations for enabled-domains`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function m(e){return e.usage(`$0 pay-per-use usage-reports submit
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p,n as m}from"./prompt-doX80PCd.mjs";function h(e){return e.usage(`$0 pipelines create
2
+ import{t as e}from"./local-Cyk8fPvL.mjs";import{a as t,t as n}from"./context-CE7QFX-z.mjs";import{r}from"./auth-gOCL6Pm0.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-CRjK46r1.mjs";import{t as s}from"./run-huwFFwXd.mjs";import"./telemetry-B4_YhD82.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p,n as m}from"./prompt-C_90YsVE.mjs";function h(e){return e.usage(`$0 pipelines create
3
3
 
4
4
  Create a new Pipeline.`).option(`name`,{type:`string`,description:`Specifies the name of the Pipeline.`}).option(`sql`,{type:`string`,description:`Specifies SQL for the Pipeline processing flow.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create Pipeline`,builder:h,handler:async l=>s({command:`pipelines create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf pipelines create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`),sql:d(l.sql,`sql`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await n();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.pipelines.create({...e,account_id:p})),{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`Specifies the name of the Pipeline.`)),l.sql===void 0&&(l.sql=await f(`sql`,`Specifies SQL for the Pipeline processing flow.`));let m=u({name:d(l.name,`name`,`text`),sql:d(l.sql,`sql`,`text`)});i(await o(`Creating`,async()=>s.pipelines.create({...m,account_id:p})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 pipelines delete <pipeline-id>
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-CPVzoKbN.mjs";import{r as t}from"./auth-B_Utev-x.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-DS2fwfNP.mjs";import{t as a}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as o,r as s,t as c}from"./body-parser-hh2avzkz.mjs";import{n as l}from"./input-validation-Dk52b0me.mjs";function u(e){return e.usage("$0 precursor get\n\nRetrieve a zone's Precursor configuration: the zone-level `default_mode` and the ordered list of `enforcement_rules`.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get Zone Precursor Config`,builder:u,handler:async o=>a({command:`precursor get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf precursor get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.precursor.get({zone_id:s})),{successLabel:`Loaded`})})};function f(e){return e.usage("$0 precursor update\n\nUpdates the Precursor configuration for a zone. `default_mode` sets the zone-level enforcement mode. `enforcement_rules` is the ordered list of rules that override enforcement for matching requests. This is a partial update: only the fields present in the request body are changed. - Sending an empty array (`[]`) clears all enforcement rules. - At least one of `default_mode` or `enforcement_rules` must be present; an empty body (`{}`) is rejected with `400`. - Rule `id` is read-only (assigned by Cloudflare) and ignored on input. - Rule `mode` must be `min-friction` or `max-security` (`off` is not a valid rule mode; use `default_mode` to disable enforcement). - Rule `expression` is limited to 4000 characters. The limit applies to each rule individually, not to the combined size of all rules.").option(`default-mode`,{type:`string`,description:`The zone-level Precursor enforcement mode applied to requests that do
2
+ import{i as e}from"./context-CE7QFX-z.mjs";import{r as t}from"./auth-gOCL6Pm0.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-CRjK46r1.mjs";import{t as a}from"./run-huwFFwXd.mjs";import"./telemetry-B4_YhD82.mjs";import{n as o,r as s,t as c}from"./body-parser-hh2avzkz.mjs";import{n as l}from"./input-validation-Dk52b0me.mjs";function u(e){return e.usage("$0 precursor get\n\nRetrieve a zone's Precursor configuration: the zone-level `default_mode` and the ordered list of `enforcement_rules`.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get Zone Precursor Config`,builder:u,handler:async o=>a({command:`precursor get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf precursor get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.precursor.get({zone_id:s})),{successLabel:`Loaded`})})};function f(e){return e.usage("$0 precursor update\n\nUpdates the Precursor configuration for a zone. `default_mode` sets the zone-level enforcement mode. `enforcement_rules` is the ordered list of rules that override enforcement for matching requests. This is a partial update: only the fields present in the request body are changed. - Sending an empty array (`[]`) clears all enforcement rules. - At least one of `default_mode` or `enforcement_rules` must be present; an empty body (`{}`) is rejected with `400`. - Rule `id` is read-only (assigned by Cloudflare) and ignored on input. - Rule `mode` must be `min-friction` or `max-security` (`off` is not a valid rule mode; use `default_mode` to disable enforcement). - Rule `expression` is limited to 4000 characters. The limit applies to each rule individually, not to the combined size of all rules.").option(`default-mode`,{type:`string`,description:`The zone-level Precursor enforcement mode applied to requests that do
3
3
  not match a more specific enforcement rule.
4
4
  `,choices:[`off`,`min-friction`,`max-security`]}).option(`enforcement-rules`,{type:`string`,description:`The ordered list of enforcement rules for the zone. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`update`,describe:`Update Zone Precursor Config`,builder:f,handler:async u=>a({command:`precursor update`,classification:{safeFlags:[`default-mode`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf precursor update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({default_mode:l(u[`default-mode`],`default-mode`,`text`),enforcement_rules:s(u[`enforcement-rules`],`enforcement-rules`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.precursor.update({body:e,zone_id:d})),{successLabel:`Updated`});return}let f=c({default_mode:l(u[`default-mode`],`default-mode`,`text`),enforcement_rules:s(u[`enforcement-rules`],`enforcement-rules`)});n(await i(`Updating`,async()=>a.precursor.update({body:f,zone_id:d})),{successLabel:`Updated`})})},m={command:`precursor`,describe:`Precursor settings for a zone`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./dotenv-CcQjGlV0.mjs";import{G as t,nt as n,q as r}from"./dist-DfMipWKR.mjs";import{t as i}from"./context-CPVzoKbN.mjs";import{m as a,u as o}from"./interactive-C-o16XQs.mjs";import{i as s}from"./auth-B_Utev-x.mjs";import{t as c}from"./output-CvQFJkvi.mjs";import{n as l}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{D as u,S as d,b as f,c as p,d as m,g as h,n as g,u as _,v}from"./dist-COohnEBL.mjs";import{a as y,l as b,n as x,o as S,r as C,t as w}from"./containers-BU9RquYh.mjs";import{a as T,i as E,n as D,o as O,r as k,s as A}from"./build-VUz0URCV.mjs";import{t as j}from"./deploy-input-YW632ysz.mjs";import{readBuildOutput as M}from"@cloudflare/build-output-utils";function N(e){return{getNormalizedContainerOptions:async t=>e.standard.normalized.map(e=>({...e,name:t.containers?.find(({class_name:t})=>t===e.class_name)?.name??e.name})),deployPreviewContainers:async(t,r,i,a,o)=>P(o.quiet,async()=>{let s=new Map;for(let e of Object.values(i.env??{}))e.type===`durable_object_namespace`&&e.class_name&&e.namespace_id&&e.script_name===void 0&&s.set(e.class_name,e.namespace_id);let c;for(let n of r){let r=s.get(n.class_name);if(r||=(c??=await v(t,a),c.find(e=>e.class===n.class_name&&e.preview?.id===i.preview_id)?.id),!r)throw Error(`Could not find a Preview Durable Object namespace for Container class "${n.class_name}".`);await p({imageRef:await F(n,e,i.id,a,t,o.localImageReferences?.get(n.class_name)),durable_object_namespace_id:r},n,t,a)}await _(e.standard.builtImages.filter(({container:e})=>!o.localImageReferences?.has(e.class_name)),n())})}}async function P(e,t){if(!e)return t();let n=o();a(`error`);try{return await t()}finally{a(n)}}async function F(e,t,r,i,a,o){if(o!==void 0)return d({pathToDocker:n(),sourceTag:o,targetTag:o,accountId:i,complianceConfig:a,containerConfig:`dockerfile`in e?e:void 0,cleanupSourceTag:!1});let s=t.standard.builtImages.find(({container:t})=>t.class_name===e.class_name);if(s)return f(s,r,n(),i,a);if(`image_uri`in e)return{newTag:e.image_uri};throw Error(`Container "${e.name}" has no Build Output image to deploy.`)}function I(e){return e.positional(`preview-name`,{type:`string`,description:`Preview name. Defaults to the current CI or Git branch; required if no branch is available.`}).option(`prebuilt`,{type:`boolean`,description:`Use existing Preview Build Output Specification files without building`,default:!1}).option(`worker`,k)}function L(e){return{type:`preview`,version:1,preview_id:e.preview.id,preview_name:e.preview.name,preview_slug:e.preview.slug,preview_urls:e.preview.urls,deployment_id:e.deployment.id,deployment_urls:e.deployment.urls}}async function R(t){let n=t[`preview-name`],r=n??y();if(!r||!n&&r===`HEAD`)throw Error(`We couldn't determine a Preview name from CI or Git. The name is optional when a branch is available. Otherwise, run:
2
+ import{r as e}from"./dotenv-CcQjGlV0.mjs";import{G as t,nt as n,q as r}from"./dist-DfMipWKR.mjs";import{t as i}from"./context-CE7QFX-z.mjs";import{m as a,u as o}from"./interactive-C-o16XQs.mjs";import{i as s}from"./auth-gOCL6Pm0.mjs";import{t as c}from"./output-CvQFJkvi.mjs";import{n as l}from"./run-huwFFwXd.mjs";import"./telemetry-B4_YhD82.mjs";import{D as u,S as d,b as f,c as p,d as m,g as h,n as g,u as _,v}from"./dist-Dgnf_i4w.mjs";import{a as y,l as b,n as x,o as S,r as C,t as w}from"./containers-BY8pinEV.mjs";import{a as T,i as E,n as D,o as O,r as k,s as A}from"./build-_qqitpn0.mjs";import{t as j}from"./deploy-input-CNrImP7B.mjs";import{readBuildOutput as M}from"@cloudflare/build-output-utils";function N(e){return{getNormalizedContainerOptions:async t=>e.standard.normalized.map(e=>({...e,name:t.containers?.find(({class_name:t})=>t===e.class_name)?.name??e.name})),deployPreviewContainers:async(t,r,i,a,o)=>P(o.quiet,async()=>{let s=new Map;for(let e of Object.values(i.env??{}))e.type===`durable_object_namespace`&&e.class_name&&e.namespace_id&&e.script_name===void 0&&s.set(e.class_name,e.namespace_id);let c;for(let n of r){let r=s.get(n.class_name);if(r||=(c??=await v(t,a),c.find(e=>e.class===n.class_name&&e.preview?.id===i.preview_id)?.id),!r)throw Error(`Could not find a Preview Durable Object namespace for Container class "${n.class_name}".`);await p({imageRef:await F(n,e,i.id,a,t,o.localImageReferences?.get(n.class_name)),durable_object_namespace_id:r},n,t,a)}await _(e.standard.builtImages.filter(({container:e})=>!o.localImageReferences?.has(e.class_name)),n())})}}async function P(e,t){if(!e)return t();let n=o();a(`error`);try{return await t()}finally{a(n)}}async function F(e,t,r,i,a,o){if(o!==void 0)return d({pathToDocker:n(),sourceTag:o,targetTag:o,accountId:i,complianceConfig:a,containerConfig:`dockerfile`in e?e:void 0,cleanupSourceTag:!1});let s=t.standard.builtImages.find(({container:t})=>t.class_name===e.class_name);if(s)return f(s,r,n(),i,a);if(`image_uri`in e)return{newTag:e.image_uri};throw Error(`Container "${e.name}" has no Build Output image to deploy.`)}function I(e){return e.positional(`preview-name`,{type:`string`,description:`Preview name. Defaults to the current CI or Git branch; required if no branch is available.`}).option(`prebuilt`,{type:`boolean`,description:`Use existing Preview Build Output Specification files without building`,default:!1}).option(`worker`,k)}function L(e){return{type:`preview`,version:1,preview_id:e.preview.id,preview_name:e.preview.name,preview_slug:e.preview.slug,preview_urls:e.preview.urls,deployment_id:e.deployment.id,deployment_urls:e.deployment.urls}}async function R(t){let n=t[`preview-name`],r=n??y();if(!r||!n&&r===`HEAD`)throw Error(`We couldn't determine a Preview name from CI or Git. The name is optional when a branch is available. Otherwise, run:
3
3
 
4
4
  cf previews deploy PREVIEW_NAME`);return t.prebuilt||await D(t.mode,{output:t.quiet?`silent`:`stderr`,worker:t.worker},{isPreview:!0}),e(t,()=>z(t,r))}async function z(e,n){let a=await M(process.cwd());C(a.rootConfig),O(e.mode,a.rootConfig.buildContext.mode);let o=T(a.workers,e.worker),{wranglerConfig:c,builtConfig:l}=E(o,a.rootConfig),d=await s(),f=a.rootConfig.accountId??await i({isPreview:!0,skipProjectSettings:!0,complianceRegion:r(c)}),p=u(d);b({...p,logger:{...p.logger,log:()=>{},info:()=>{}}}),h({logger:{...p.logger,debug:()=>{},debugWithSanitization:()=>{},log:()=>{},info:()=>{}},fetchResult:p.fetchResult,fetchPagedListResult:p.fetchPagedListResult});let _=new Set(Object.values(l.exports??{}).filter(x).map(({container:e})=>e)),v=a.containers?.filter(({config:e})=>_.has(e.name))??[],y=w(v,c,{accountId:f}),D=y.source;if(D?.some(e=>e.scheduling_policy===`durable_object`))throw new A(`Preview deployments do not support Durable Object-managed Containers (schedulingPolicy: "durable-object").`);return D&&D.length>0&&m(f,d,t(c)),S(f,{name:n,json:!0},{workerConfig:l,rootConfig:a.rootConfig,containers:v.filter(({config:e})=>D?.some(({name:t})=>t===e.name)).map(({config:e})=>e),buildResult:o.bundleDir?j(o,l):void 0,assets:o.assetsDir?{directory:o.assetsDir}:void 0},{...N(y),verifyContainersScope:async()=>{await g.listApplications()}})}const B={command:`deploy [preview-name]`,describe:`Deploy a Worker Preview`,builder:I,handler:async e=>{c(L(await R(e)),{quiet:e.quiet})}},V={command:`previews`,describe:`Manage Worker Previews`,builder:e=>e.command(l(B,{command:`previews deploy`,classification:{safeFlags:[`prebuilt`]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{V as default};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./theme-BIWQFmZ0.mjs";import{t}from"./args-CXgkQKK7.mjs";import{n}from"./version-DyZwKU6l.mjs";import{t as r}from"./session-CjQFm10R.mjs";import{a as i}from"./dist-DW47TUGh.mjs";const a={Hidden:0,Normal:1,Error:2,Indeterminate:3,Warning:4},o=new class{cleanupRegistered=!1;get isDisabled(){return process.env.CF_NO_OSC_PROGRESS===`1`||process.env.CF_QUIET===`1`||t()}get isSupported(){if(this.isDisabled||!process.stderr.isTTY)return!1;if(process.env.CF_FORCE_OSC_PROGRESS===`1`)return!0;let e=process.env.TERM_PROGRAM?.toLowerCase()??``;return!!(e.includes(`ghostty`)||e.includes(`iterm`)||e.includes(`wezterm`)||process.env.WT_SESSION||process.env.ConEmuANSI===`ON`)}setIndeterminate(){this.isSupported&&(this.ensureCleanup(),this.write(a.Indeterminate))}clear(){this.isSupported&&process.stderr.write(`\x1b]9;4;${a.Hidden};0\x07`)}ensureCleanup(){this.cleanupRegistered||(this.cleanupRegistered=!0,process.on(`exit`,()=>{this.clear()}))}write(e){this.isSupported&&process.stderr.write(`\x1b]9;4;${e};0\x07`)}},s=[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`];function c(){return!(!e()||!process.stdout.isTTY||process.env.CF_QUIET===`1`)}async function l(e,t){if(!c())return t();r(n);let a=i({frames:[...s],indicator:`timer`,delay:80});o.setIndeterminate(),a.start(e);try{let n=await t();return o.clear(),a.stop(e),n}catch(t){throw o.clear(),a.error(e),t}}export{l as t};
2
+ import{t as e}from"./theme-BIWQFmZ0.mjs";import{t}from"./args-CXgkQKK7.mjs";import{n}from"./version-C3q1GMTe.mjs";import{t as r}from"./session-CjQFm10R.mjs";import{a as i}from"./dist-DW47TUGh.mjs";const a={Hidden:0,Normal:1,Error:2,Indeterminate:3,Warning:4},o=new class{cleanupRegistered=!1;get isDisabled(){return process.env.CF_NO_OSC_PROGRESS===`1`||process.env.CF_QUIET===`1`||t()}get isSupported(){if(this.isDisabled||!process.stderr.isTTY)return!1;if(process.env.CF_FORCE_OSC_PROGRESS===`1`)return!0;let e=process.env.TERM_PROGRAM?.toLowerCase()??``;return!!(e.includes(`ghostty`)||e.includes(`iterm`)||e.includes(`wezterm`)||process.env.WT_SESSION||process.env.ConEmuANSI===`ON`)}setIndeterminate(){this.isSupported&&(this.ensureCleanup(),this.write(a.Indeterminate))}clear(){this.isSupported&&process.stderr.write(`\x1b]9;4;${a.Hidden};0\x07`)}ensureCleanup(){this.cleanupRegistered||(this.cleanupRegistered=!0,process.on(`exit`,()=>{this.clear()}))}write(e){this.isSupported&&process.stderr.write(`\x1b]9;4;${e};0\x07`)}},s=[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`];function c(){return!(!e()||!process.stdout.isTTY||process.env.CF_QUIET===`1`)}async function l(e,t){if(!c())return t();r(n);let a=i({frames:[...s],indicator:`timer`,delay:80});o.setIndeterminate(),a.start(e);try{let n=await t();return o.clear(),a.stop(e),n}catch(t){throw o.clear(),a.error(e),t}}export{l as t};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BIWQFmZ0.mjs";import{t}from"./cli-exit-Dqoo6Jgb.mjs";import{n}from"./version-DyZwKU6l.mjs";import{t as r}from"./session-CjQFm10R.mjs";import{M as i,n as a}from"./interactive-C-o16XQs.mjs";import{i as o,o as s,r as c,t as l}from"./dist-DW47TUGh.mjs";function u(e){return e.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,` `)}function d(){r(n)}async function f(){let e=[];for await(let t of process.stdin)e.push(Buffer.from(t));let t=Buffer.concat(e).toString(`utf-8`);return t.endsWith(`
2
+ import{r as e}from"./theme-BIWQFmZ0.mjs";import{t}from"./cli-exit-Dqoo6Jgb.mjs";import{n}from"./version-C3q1GMTe.mjs";import{t as r}from"./session-CjQFm10R.mjs";import{M as i,n as a}from"./interactive-C-o16XQs.mjs";import{i as o,o as s,r as c,t as l}from"./dist-DW47TUGh.mjs";function u(e){return e.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,` `)}function d(){r(n)}async function f(){let e=[];for await(let t of process.stdin)e.push(Buffer.from(t));let t=Buffer.concat(e).toString(`utf-8`);return t.endsWith(`
3
3
  `)?t.slice(0,-1):t}async function p(e,n,r){let o=r?.kind??`text`;if(a()){if(o===`secret`){let t=await f();if(t.length>0)return t;throw Error(`--${e} is required. Pipe the value via stdin, pass --${e} <value>, or run interactively.`)}throw Error(`--${e} is required. Pass --${e} <value> or run interactively.`)}let l=`Enter value for --${e}`,u=n||r?.question||l,p=e=>e&&e.length>0?r?.validate?.(e):`Value cannot be empty`;d();let m=o===`secret`?await c({message:u,mask:`•`,validate:p}):await s({message:u,validate:p});if(i(m)||typeof m!=`string`)throw new t(130,{cancelled:!0});return m}async function m(e,n,r,s={}){let c=u(e),l=r.map(u);if(a())throw Error(`--${c} is required (one of: ${l.join(`, `)}). Pass --${c} <value> or run interactively.`);let f=`Select value for --${c}`,p=u(n||f);d();let m=await o({message:p,options:r.map(e=>({value:e,label:u((Object.hasOwn(s,e)?s[e]:void 0)??e)}))});if(i(m)||typeof m!=`string`)throw new t(130,{cancelled:!0});return m}async function h(e,n){if(a())throw Error(`--${e} is required and must be true. Pass --${e} or run interactively.`);d();let r=await l({message:n||`Confirm --${e}`,initialValue:!1});if(i(r))throw new t(130,{cancelled:!0});return r===!0}async function g(e,{defaultValue:n=!0,fallbackValue:r=!0}={}){if(a())return process.stderr.write(`? ${e}\n Using fallback value in non-interactive context: ${r?`yes`:`no`}\n`),r;d();let o=await l({message:e,initialValue:n});if(i(o))throw new t(130,{cancelled:!0});return o===!0}async function _(n={}){if(n.force===!0)return!0;let r=n.message?`${n.message} Continue?`:`This permanently deletes the resource. Continue?`;if(a())return process.stderr.write(`${e.warning(`?`)} ${r}\n ${e.muted(`(non-interactive; pass --force to confirm)`)}\n`),!1;d();let o=await l({message:r,initialValue:!1});if(i(o))throw new t(130,{cancelled:!0});return o===!0}export{p as a,m as i,_ as n,u as o,h as r,g as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{n as f}from"./prompt-doX80PCd.mjs";function p(e){return e.usage(`$0 queries bulk create
2
+ import{t as e}from"./local-Cyk8fPvL.mjs";import{a as t,t as n}from"./context-CE7QFX-z.mjs";import{r}from"./auth-gOCL6Pm0.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-CRjK46r1.mjs";import{t as s}from"./run-huwFFwXd.mjs";import"./telemetry-B4_YhD82.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{n as f}from"./prompt-C_90YsVE.mjs";function p(e){return e.usage(`$0 queries bulk create
3
3
 
4
4
  Return a success message after creating new saved string queries in bulk`).option(`queries`,{type:`string`,description:`The queries field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create`,describe:`Create new saved string queries in bulk`,builder:p,handler:async d=>s({command:`queries bulk create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf queries bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/brand-protection/queries/bulk`,pathParams:{},bodyKind:`json`,body:d.body===void 0?u({queries:l(d.queries,`queries`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await n();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.queries.bulk.create({...e,account_id:f})),{successLabel:`Created`});return}let p=u({queries:l(d.queries,`queries`)});i(await o(`Creating`,async()=>s.queries.bulk.create({...p,account_id:f})),{successLabel:`Created`})})},h={command:`bulk`,describe:`Operations for bulk`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 queries create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p,n as m}from"./prompt-doX80PCd.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function ee(e){return e.usage(`$0 queues consumers create <queue-id>
2
+ import{t as e}from"./local-Cyk8fPvL.mjs";import{a as t,t as n}from"./context-CE7QFX-z.mjs";import{r}from"./auth-gOCL6Pm0.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-CRjK46r1.mjs";import{t as s}from"./run-huwFFwXd.mjs";import"./telemetry-B4_YhD82.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p,n as m}from"./prompt-C_90YsVE.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function ee(e){return e.usage(`$0 queues consumers create <queue-id>
3
3
 
4
4
  Creates a consumer for a Queue.`).positional(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`dead-letter-queue`,{type:`string`,description:`The dead_letter_queue field`}).option(`script-name`,{type:`string`,description:`Name of a Worker`}).option(`settings-batch-size`,{type:`number`,description:`The maximum number of messages to include in a batch.`}).option(`settings-max-concurrency`,{type:`number`,description:"Maximum number of concurrent consumers that may consume from this Queue. Set to `null` to automatically opt in to the platform's maximum (recommended)."}).option(`settings-max-retries`,{type:`number`,description:`The maximum number of retries`}).option(`settings-max-wait-time-ms`,{type:`number`,description:`The number of milliseconds to wait for a batch to fill up before attempting to deliver it`}).option(`settings-retry-delay`,{type:`number`,description:`The number of seconds to delay before making the message available for another attempt.`}).option(`settings-visibility-timeout-ms`,{type:`number`,description:`The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.`}).option(`type`,{type:`string`,description:`The type field`,choices:[`worker`,`http_pull`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or updating a consumer`}).conflicts(`script-name`,[`settings-visibility-timeout-ms`]).conflicts(`settings-max-concurrency`,[`settings-visibility-timeout-ms`]).conflicts(`settings-max-wait-time-ms`,[`settings-visibility-timeout-ms`]).conflicts(`settings-visibility-timeout-ms`,[`script-name`,`settings-max-concurrency`,`settings-max-wait-time-ms`])}const g={command:`create <queue-id>`,describe:`Create a Queue Consumer`,builder:ee,handler:async l=>s({command:`queues consumers create`,classification:{safeFlags:[`type`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf queues consumers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/queues/${l[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(l[`queue-id`]))}/consumers`,pathParams:{"queue-id":String(l[`queue-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({dead_letter_queue:d(l[`dead-letter-queue`],`dead-letter-queue`,`text`),script_name:d(l[`script-name`],`script-name`,`text`),settings:{batch_size:l[`settings-batch-size`],max_concurrency:l[`settings-max-concurrency`],max_retries:l[`settings-max-retries`],max_wait_time_ms:l[`settings-max-wait-time-ms`],retry_delay:l[`settings-retry-delay`],visibility_timeout_ms:l[`settings-visibility-timeout-ms`]},type:d(l.type,`type`,`text`)}):c(l.body)});return}let s=await r(l),m=l.local?e:await n();if(l.accountId=m,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.queues.consumers.create({body:e,account_id:m,queue_id:l[`queue-id`]})),{successLabel:`Created`});return}l.type===void 0&&(l.type=await p(`type`,`The type field`,[`worker`,`http_pull`])),l.type===`worker`&&l[`script-name`]===void 0&&(l[`script-name`]=await f(`script-name`,`Name of a Worker`,{question:`Enter value for --script-name`}));let h=u({dead_letter_queue:d(l[`dead-letter-queue`],`dead-letter-queue`,`text`),script_name:d(l[`script-name`],`script-name`,`text`),settings:{batch_size:l[`settings-batch-size`],max_concurrency:l[`settings-max-concurrency`],max_retries:l[`settings-max-retries`],max_wait_time_ms:l[`settings-max-wait-time-ms`],retry_delay:l[`settings-retry-delay`],visibility_timeout_ms:l[`settings-visibility-timeout-ms`]},type:d(l.type,`type`,`text`)});i(await o(`Creating`,async()=>s.queues.consumers.create({body:h,account_id:m,queue_id:l[`queue-id`]})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 queues consumers delete <consumer-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{a as r,r as i}from"./auth-B_Utev-x.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DS2fwfNP.mjs";import{t as c}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p,t as m}from"./input-validation-Dk52b0me.mjs";import{a as h,i as g,n as _}from"./prompt-doX80PCd.mjs";import{n as v,t as ee}from"./raw-fetch-_Z55VEDY.mjs";function te(e){return e.usage(`$0 r2 buckets cors delete <bucket-name>
2
+ import{t as e}from"./local-Cyk8fPvL.mjs";import{a as t,t as n}from"./context-CE7QFX-z.mjs";import{a as r,r as i}from"./auth-gOCL6Pm0.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-CRjK46r1.mjs";import{t as c}from"./run-huwFFwXd.mjs";import"./telemetry-B4_YhD82.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p,t as m}from"./input-validation-Dk52b0me.mjs";import{a as h,i as g,n as _}from"./prompt-C_90YsVE.mjs";import{n as v,t as ee}from"./raw-fetch-C8SdmQBp.mjs";function te(e){return e.usage(`$0 r2 buckets cors delete <bucket-name>
3
3
 
4
4
  Delete the CORS policy for a bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).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 <bucket-name>`,describe:`Delete Bucket CORS Policy`,builder:te,handler:async l=>c({command:`r2 buckets cors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 buckets cors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/cors`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();if(l.accountId=d,!await _({force:!!l.force,message:`This removes the R2 bucket's CORS policy. Browser requests that depend on these cross-origin permissions may fail.`})){process.stderr.write(`Aborted.
5
5
  `);return}a(await s(`Deleting`,async()=>r(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/cors`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 r2 buckets cors get <bucket-name>
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ const e={command:`r2-data-catalog`,describe:`Iceberg-compatible data catalog for R2 — organize objects into tables and namespaces for SQL query engines`,builder:e=>e.demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{e as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./auth-B_Utev-x.mjs";import{t}from"./output-CvQFJkvi.mjs";import{t as n}from"./dry-run-Bq0JAsbX.mjs";import{t as r}from"./progress-DS2fwfNP.mjs";import{t as i}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as a,t as o}from"./body-parser-hh2avzkz.mjs";import{t as s}from"./cli-types-DoVT5q_M.mjs";import{n as c,t as l}from"./raw-fetch-_Z55VEDY.mjs";function ee(e){return e.usage(`$0 radar agent-readiness summary <dimension>
2
+ import{r as e}from"./auth-gOCL6Pm0.mjs";import{t}from"./output-CvQFJkvi.mjs";import{t as n}from"./dry-run-Bq0JAsbX.mjs";import{t as r}from"./progress-CRjK46r1.mjs";import{t as i}from"./run-huwFFwXd.mjs";import"./telemetry-B4_YhD82.mjs";import{n as a,t as o}from"./body-parser-hh2avzkz.mjs";import{t as s}from"./cli-types-DoVT5q_M.mjs";import{n as c,t as l}from"./raw-fetch-C8SdmQBp.mjs";function ee(e){return e.usage(`$0 radar agent-readiness summary <dimension>
3
3
 
4
4
  Returns a summary of AI agent readiness scores across scanned domains, grouped by the specified dimension. Data is sourced from weekly bulk scans. All values are raw domain counts.`).positional(`dimension`,{type:`string`,description:`Specifies the agent readiness data dimension by which to group the results.`,demandOption:!0}).option(`date`,{type:`string`,description:`Filters results by the specified date.`}).option(`domain-category`,{type:`string`,description:`Filters results by domain category.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`summary <dimension>`,describe:`Get agent readiness summary`,builder:s(ee),handler:async a=>i({command:`radar agent-readiness summary`,classification:{safeFlags:[`format`,`dry-run`]}},a,async()=>{let i={date:a.date,domainCategory:a[`domain-category`],name:a.name,format:a.format};if(a.dryRun){n({command:`cf radar agent-readiness summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/agent_readiness/summary/${a.dimension==null?`<dimension>`:encodeURIComponent(String(a.dimension))}`,pathParams:{dimension:String(a.dimension??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.radar.agentReadiness.summary({dimension:a.dimension,...i})),{successLabel:`Loaded`})})},u={command:`agent-readiness`,describe:`Agent readiness summary statistics across the Cloudflare network`,builder:e=>e.command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.usage(`$0 radar ai bots timeseries-groups <dimension>
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./sdk-Bx29ZKK3.mjs";import{G as t}from"./dist-DfMipWKR.mjs";import{r as n}from"./local-B3OyWKkW.mjs";import{n as r}from"./context-CPVzoKbN.mjs";import{n as i}from"./request-headers-DPbWytRv.mjs";import{i as a,t as o}from"./auth-B_Utev-x.mjs";async function s(s,c={}){let{method:l=`GET`,local:u=!1}=c,d=t({compliance_region:await r()}),f=`${d.replace(/\/+$/,``)}${s}`,p={...i()};c.headers&&Object.assign(p,c.headers);let m=globalThis.fetch;u?m=n({persistTo:c.persistTo,apiBaseUrl:d}):p.Authorization=`Bearer ${await a()}`;let h,g=c.body;g!=null&&(g instanceof FormData?h=g:Buffer.isBuffer(g)||g instanceof Uint8Array||g instanceof ArrayBuffer?(h=g,p[`Content-Type`]??=c.contentType??`application/octet-stream`):typeof g==`string`?(h=g,c.contentType&&(p[`Content-Type`]??=c.contentType)):(h=JSON.stringify(g),p[`Content-Type`]??=c.contentType??`application/json`));let _=await m(f,{method:l,headers:p,...h===void 0?{}:{body:h},signal:AbortSignal.timeout(o)});if(!_.ok){let t=_.headers.get(`content-type`)??``,n;try{n=t.includes(`application/json`)?await _.json():await _.text()}catch{n=null}throw new e({statusCode:_.status,body:n,rawResponse:{status:_.status,statusText:_.statusText,url:_.url||f,headers:_.headers,redirected:_.redirected,type:_.type}})}let v=await _.arrayBuffer();return Buffer.from(v)}function c(e){process.stdout.write(e)}export{c as n,s as t};
2
+ import{r as e}from"./sdk-Bmz7t_CD.mjs";import{G as t}from"./dist-DfMipWKR.mjs";import{r as n}from"./local-Cyk8fPvL.mjs";import{n as r}from"./context-CE7QFX-z.mjs";import{n as i}from"./request-headers-jr2VznA9.mjs";import{i as a,t as o}from"./auth-gOCL6Pm0.mjs";async function s(s,c={}){let{method:l=`GET`,local:u=!1}=c,d=t({compliance_region:await r()}),f=`${d.replace(/\/+$/,``)}${s}`,p={...i()};c.headers&&Object.assign(p,c.headers);let m=globalThis.fetch;u?m=n({persistTo:c.persistTo,apiBaseUrl:d}):p.Authorization=`Bearer ${await a()}`;let h,g=c.body;g!=null&&(g instanceof FormData?h=g:Buffer.isBuffer(g)||g instanceof Uint8Array||g instanceof ArrayBuffer?(h=g,p[`Content-Type`]??=c.contentType??`application/octet-stream`):typeof g==`string`?(h=g,c.contentType&&(p[`Content-Type`]??=c.contentType)):(h=JSON.stringify(g),p[`Content-Type`]??=c.contentType??`application/json`));let _=await m(f,{method:l,headers:p,...h===void 0?{}:{body:h},signal:AbortSignal.timeout(o)});if(!_.ok){let t=_.headers.get(`content-type`)??``,n;try{n=t.includes(`application/json`)?await _.json():await _.text()}catch{n=null}throw new e({statusCode:_.status,body:n,rawResponse:{status:_.status,statusText:_.statusText,url:_.url||f,headers:_.headers,redirected:_.redirected,type:_.type}})}let v=await _.arrayBuffer();return Buffer.from(v)}function c(e){process.stdout.write(e)}export{c as n,s as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,i as f,n as p}from"./prompt-doX80PCd.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 realtime kit analytics livestreams daily get <app-id>
2
+ import{t as e}from"./local-Cyk8fPvL.mjs";import{a as t,t as n}from"./context-CE7QFX-z.mjs";import{r}from"./auth-gOCL6Pm0.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-CRjK46r1.mjs";import{t as s}from"./run-huwFFwXd.mjs";import"./telemetry-B4_YhD82.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,i as f,n as p}from"./prompt-C_90YsVE.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 realtime kit analytics livestreams daily get <app-id>
3
3
 
4
4
  Returns day-wise livestream analytics for the specified time range.`).positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-time`,{type:`number`,description:`Specify the start time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`end-time`,{type:`number`,description:`Specify the end time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`filters`,{type:`string`,description:`Optional filters for livestream analytics.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <app-id>`,describe:`Fetch day-wise analytics data for your livestreams`,builder:h,handler:async c=>s({command:`realtime kit analytics livestreams daily get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={start_time:c[`start-time`],end_time:c[`end-time`],filters:c.filters};if(c.dryRun){a({command:`cf realtime kit analytics livestreams daily get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/analytics/livestreams/daywise`,pathParams:{"app-id":String(c[`app-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.analytics.livestreams.daily.get({account_id:u,app_id:c[`app-id`],...s})),{successLabel:`Loaded`})})},te={command:`daily`,describe:`Daily livestream analytics for RealtimeKit applications`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 realtime kit analytics livestreams get <app-id>
5
5
 
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BIWQFmZ0.mjs";import{n as t,t as n}from"./local-B3OyWKkW.mjs";import{a as r,t as i}from"./context-CPVzoKbN.mjs";import{a,o,r as s}from"./auth-B_Utev-x.mjs";import{t as c}from"./output-CvQFJkvi.mjs";import{t as l}from"./dry-run-Bq0JAsbX.mjs";import{t as u}from"./progress-DS2fwfNP.mjs";import{n as d,t as f}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{i as p,n as m,r as h,t as g}from"./body-parser-hh2avzkz.mjs";import{n as _}from"./input-validation-Dk52b0me.mjs";import{a as v,i as y,n as ee,o as b,r as x}from"./prompt-doX80PCd.mjs";import{t as S}from"./cli-types-DoVT5q_M.mjs";import{_ as C,a as w,c as T,d as E,g as D,h as O,i as k,m as A,o as j,p as M,r as N,s as te,t as ne,u as re}from"./schema-flags-DDW79Tda.mjs";import{domainToASCII as ie}from"node:url";import{isDeepStrictEqual as ae}from"node:util";function oe(e){return e.usage("$0 registrar extensions get <extension>\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on a specific extension (TLD). Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").positional(`extension`,{type:`string`,description:"The extension name (e.g., `com`, `co.uk`).",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get <extension>`,describe:`Get extension`,builder:oe,handler:async e=>f({command:`registrar extensions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/extensions/${e.extension==null?`<extension>`:encodeURIComponent(String(e.extension))}`,pathParams:{extension:String(e.extension??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await i();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.extensions.get({account_id:a,extension:e.extension})),{successLabel:`Loaded`})})};function ce(e){return e.usage("$0 registrar extensions list\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on each supported extension (TLD). This endpoint uses cursor-based pagination. Results are ordered by extension name by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").option(`name`,{type:`string`,description:"Filter extensions by exact name match.\nFor example, `name=com` returns only the `com` extension."}).option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
2
+ import{r as e}from"./theme-BIWQFmZ0.mjs";import{n as t,t as n}from"./local-Cyk8fPvL.mjs";import{a as r,t as i}from"./context-CE7QFX-z.mjs";import{a,o,r as s}from"./auth-gOCL6Pm0.mjs";import{t as c}from"./output-CvQFJkvi.mjs";import{t as l}from"./dry-run-Bq0JAsbX.mjs";import{t as u}from"./progress-CRjK46r1.mjs";import{n as d,t as f}from"./run-huwFFwXd.mjs";import"./telemetry-B4_YhD82.mjs";import{i as p,n as m,r as h,t as g}from"./body-parser-hh2avzkz.mjs";import{n as _}from"./input-validation-Dk52b0me.mjs";import{a as v,i as y,n as ee,o as b,r as x}from"./prompt-C_90YsVE.mjs";import{t as S}from"./cli-types-DoVT5q_M.mjs";import{_ as C,a as w,c as T,d as E,g as D,h as O,i as k,m as A,o as j,p as M,r as N,s as te,t as ne,u as re}from"./schema-flags-nL7pHvaE.mjs";import{domainToASCII as ie}from"node:url";import{isDeepStrictEqual as ae}from"node:util";function oe(e){return e.usage("$0 registrar extensions get <extension>\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on a specific extension (TLD). Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").positional(`extension`,{type:`string`,description:"The extension name (e.g., `com`, `co.uk`).",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get <extension>`,describe:`Get extension`,builder:oe,handler:async e=>f({command:`registrar extensions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/extensions/${e.extension==null?`<extension>`:encodeURIComponent(String(e.extension))}`,pathParams:{extension:String(e.extension??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await i();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.extensions.get({account_id:a,extension:e.extension})),{successLabel:`Loaded`})})};function ce(e){return e.usage("$0 registrar extensions list\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on each supported extension (TLD). This endpoint uses cursor-based pagination. Results are ordered by extension name by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").option(`name`,{type:`string`,description:"Filter extensions by exact name match.\nFor example, `name=com` returns only the `com` extension."}).option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
3
3
  Pass this value to fetch the next page of results. Omit (or
4
4
  pass an empty string) for the first page.`}).option(`per-page`,{type:`number`,description:`Number of items to return per page.`}).option(`direction`,{type:`string`,description:`Sort direction for results. Defaults to ascending order.`,choices:[`asc`,`desc`]}).option(`sort-by`,{type:`string`,description:"Column to sort results by. Defaults to `name` when omitted.",choices:[`name`,`created_at`,`updated_at`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`list`,describe:`List extensions`,builder:S(ce),handler:async e=>f({command:`registrar extensions list`,classification:{safeFlags:[`direction`,`sort-by`,`dry-run`]}},e,async()=>{let t={name:e.name,cursor:e.cursor,per_page:e[`per-page`],direction:e.direction,sort_by:e[`sort-by`]};if(e.dryRun){l({command:`cf registrar extensions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/extensions`,pathParams:{},query:t,bodyKind:`none`});return}let a=await s(e),o=e.local?n:await i();e.accountId=o,c(await u(`Loading`,async()=>a.registrar.extensions.list({account_id:o,...t})),{successLabel:`Loaded`})})},ue={command:`extensions`,describe:`Operations for extensions`,builder:e=>e.command(se).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};async function P(e,t,n){let r=b(n),i=ie(n.trim().replace(/\.$/,``)).toLowerCase(),a=await u(`Checking availability`,()=>e.registrar.registrations.check({account_id:t,domains:[n]})),o=i===``?[]:a.domains.filter(e=>e.name.toLowerCase()===i),s=o.length===1?o[0]:void 0;if(!s)throw Error(`The availability check returned no result for ${r}, so cf cannot safely register it.`);if(s.registrable!==!0&&s.reason===`domain_premium`)throw Error(`${r} is a premium domain (domain_premium). Premium registration is not supported by this API, so cf will not submit it.`);if(s.registrable!==!0){let e=s.reason===void 0?``:` (${b(s.reason)})`;throw Error(`${r} is not available for registration${e}.`)}if(s.tier===`premium`)throw Error(`${r} is a premium domain. Premium registration is not supported by this API, so cf will not submit it.`);if(s.tier!==`standard`)throw Error(`${r} is not confirmed as a standard domain. This API only supports standard registrations, so cf will not submit it.`);if(!s.pricing)throw Error(`The availability check returned no pricing for ${r}, so cf cannot safely register it.`);return s.pricing}const F=`registrar-extension-schema`;function de(e){let t=e.trim().toLowerCase().replace(/\.$/,``).split(`.`);return t.slice(1).map((e,n)=>t.slice(n+1).join(`.`))}async function fe(e,t,n,r){let i;try{i=r===void 0?await n.registrar.extensions.get({account_id:t,extension:e}):await n.registrar.extensions.get({account_id:t,extension:e},{timeoutInSeconds:r/1e3,maxRetries:0})}catch(e){return{ok:!1,reason:A(e)}}let a=O(i,`registration_schema`);return a?{ok:!0,extension:e,schema:a}:{ok:!1,reason:`the API returned no registration schema for .${e}`}}async function I(e,t,n,r,i){let a=t?[t]:de(e);if(a.length===0)return{ok:!1,reason:`'${e}' has no extension — pass a fully qualified domain name`};let o,s=`not found`;for(let e of a){let t=D(F,[n,e]);if(t)return{ok:!0,extension:e,schema:t};if(!o)try{o=await r()}catch(e){return{ok:!1,reason:A(e)}}let a;if(i!==void 0&&(a=i-Date.now(),a<=0))return{ok:!1,reason:`the request timed out`};let c=await fe(e,n,o,a);if(c.ok)return C(F,[n,e],c.schema),c;if(s=c.reason,!/not found/i.test(c.reason))return c}return{ok:!1,reason:a.length>1?`no registration schema for ${a.map(e=>`.${e}`).join(` or `)} (${s})`:s}}const pe=new Set([`domain_name`,`years`,`auto_renew`,`privacy_mode`]),me={acknowledgements:`Acknowledgements`,contact_extensions:`Registry Details`,contacts:`Contacts`};function L(e,t){return e!==void 0&&Object.hasOwn(e,t)?e[t]:void 0}function he(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).split(/[-_\s]+/).filter(Boolean).map(e=>`${e[0]?.toUpperCase()??``}${e.slice(1)}`).join(` `)}function R(e){return typeof e==`boolean`?e?`Yes`:`No`:e===null?`null`:typeof e==`string`||typeof e==`number`?String(e):JSON.stringify(e)??`undefined`}function z(e,t){return e.find(e=>e.path.length===t.length&&e.path.every((e,n)=>e===t[n]))}function ge(e,t,n){if(typeof t==`boolean`&&e.some(e=>e.includes(`acknowledgement`)))return t?`Accepted`:`Declined`;let r=z(n,e),i=R(t),a=L(r?.choiceLabels,i);if(a)return`${a} (${i})`;let o=(r?.schema.oneOf??r?.schema.anyOf)?.find(e=>e.title&&E(e,t).length===0);return o?.title?`${o.title} (${i})`:i}function _e(e,t){return e.map((n,r)=>r===e.length-1&&t?.schema.title?t.schema.title:L(me,n)??he(n)).join(` · `)}function B(e,t,n=[]){let r=[];for(let[i,a]of Object.entries(e)){if(n.length===0&&pe.has(i))continue;let e=[...n,i];if(typeof a==`object`&&a&&!Array.isArray(a)&&Object.keys(a).length>0){r.push(...B(a,t,e));continue}let o=z(t,e);r.push([_e(e,o),ge(e,a,t)])}return r.sort(([e],[t])=>e.localeCompare(t))}function V(e,t,n){if(Object.hasOwn(e,n))return R(e[n]);let r=ve(t,n);return r===void 0?`API default`:`${R(r)} (default)`}function H(e){return e===void 0?[]:[...e.default===void 0?[]:[e.default],...(e.allOf??[]).flatMap(H)]}function U(e,t){return e===void 0?[]:[...H(e.properties?.[t]),...(e.allOf??[]).flatMap(e=>U(e,t))]}function ve(e,t){let n=U(e,t),r=n[0];return n.length>0&&n.every(e=>ae(e,r))?r:void 0}function W(t){let n=t.map(([e,t])=>[b(e),b(t)]),r=Math.min(32,Math.max(...n.map(([e])=>e.length),0));return n.map(([t,n])=>`│ ${e.muted(t.padEnd(r))} ${e.bold(n)}`)}function ye(t){let n=[[`Domain`,t.domain],[`Account`,t.accountId],[`Registration term`,`${t.years} ${t.years===1?`year`:`years`}`],[`Due now`,t.quotedCost],[`Renewal price`,`${t.pricing.currency} ${t.pricing.renewal_cost} per year`],[`Auto-renew`,V(t.body,t.schema,`auto_renew`)],[`Privacy mode`,V(t.body,t.schema,`privacy_mode`)]],r=B(t.body,t.descriptors??[]);return[`│`,`${e.brand(`◇`)} ${e.bold(`Review registration`)}`,`│`,...W(n),...r.length>0?[`│`,`│ ${e.bold(`Registration details`)}`,...W(r)]:[],`│`].join(`
5
5
  `)}const G=[`domain_name`],K=`Fully qualified domain name to register, e.g. example.travel`,q=[`domain-name`,`domainName`,`extension`,`force`,`f`,`prefer`,`contacts`];function be(e){return`/${e.map(e=>e.replace(/~/g,`~0`).replace(/\//g,`~1`)).join(`/`)}`}function xe(e,t,n){return t.some(t=>{if(t.path[0]!==e||t.path.length===1)return!1;let r=t.name.replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase());return Object.hasOwn(n,t.name)&&n[t.name]!==void 0||Object.hasOwn(n,r)&&n[r]!==void 0})}function Se(e){if(e.choices===void 0)return;let t=(e.schema.enum??(e.schema.oneOf??e.schema.anyOf)?.flatMap(e=>e.const===void 0?e.enum??[]:[e.const]))?.filter(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`);return t?.length===e.choices.length?t:void 0}function Ce(e){let t=e.type===`boolean`&&e.schema.const===!0,n=e.schema.description,r=n===void 0?void 0:b(n);return{path:be(e.path),flag:`--${e.name}`,question:te(e),description:r,choices:Se(e)?.map(t=>{let n=String(t);return{value:t,label:b(e.choiceLabels!==void 0&&Object.hasOwn(e.choiceLabels,n)?e.choiceLabels[n]??n:n)}}),requiredValue:e.schema.const,acknowledgementText:t?r:void 0}}function we(e,t,n,r,i){let a=w(n,r);return a.length===0?!1:(c({submitted:!1,reason:`registration_input_required`,message:`Not submitted. Additional registration input is required.`,domainName:e,extension:t,missingFields:a.map(Ce),validationErrors:i}),!0)}function Te(e){let t=/^(\d+)(?:\.(\d+))?$/.exec(e);if(!t)return;let n=t[2]??``;return{units:BigInt(`${t[1]}${n}`),scale:n.length}}function Ee(e,t){let n=Te(e.registration_cost),r=Te(e.renewal_cost);if(!n||!r)return;let i=Math.max(n.scale,r.scale),a=e=>10n**BigInt(e),o=n.units*a(i-n.scale)+r.units*a(i-r.scale)*BigInt(t-1);if(i===0)return o.toString();let s=a(i);return`${o/s}.${(o%s).toString().padStart(i,`0`)}`}function De(e,t){let n=Ee(e,t);if(!n||!/^[A-Z]{3}$/.test(e.currency))throw Error(`The availability check returned invalid pricing, so cf cannot safely confirm this registration.`);return`${e.currency} ${n}`}function J(e,t){return e.flatMap(e=>t.map(t=>[...e,...t]))}function Y(e,t,n,r=!1,i=[]){let a=e.properties?.[t],o=a!==void 0,s=[a===void 0?[]:[a]],c=e.if&&e.then&&N(e.if)&&E(e.if,n).length===0?[e.then]:[];for(let a of[...e.allOf??[],...c]){let e=Y(a,t,n,r,i);e.found&&(o=!0,s=J(s,e.bundles))}for(let a of[e.oneOf,e.anyOf]){if(!a?.length)continue;let e=r&&a.every(N)?a.filter(e=>je(e,t,n,i)):[],c=(e.length>0?e:a).map(e=>Y(e,t,n,r,i));c.some(e=>e.found)&&(o=!0,s=J(s,c.flatMap(e=>e.bundles)))}return{found:o,bundles:s}}function X(e,t){let n=e[t];return[...n===void 0?[]:[n],...(e.allOf??[]).flatMap(e=>X(e,t))]}function Z(e){return e.length===0?{}:e.length===1?e[0]??{}:{allOf:e}}function Oe(e){let t=[...typeof e.minimum==`number`?[e.exclusiveMinimum===!0?Math.floor(e.minimum)+1:Math.ceil(e.minimum)]:[],...typeof e.exclusiveMinimum==`number`?[Math.floor(e.exclusiveMinimum)+1]:[],...(e.allOf??[]).flatMap(e=>{let t=Oe(e);return t===void 0?[]:[t]})];return t.length>0?Math.max(1,...t):void 0}function ke(e){let t=X(e,`const`);if(t.length>0)return t.every(e=>Object.is(e,t[0]))?{found:!0,value:t[0]}:{found:!1};let n=X(e,`default`);if(n.length>0)return n.every(e=>Object.is(e,n[0]))?{found:!0,value:n[0]}:{found:!1};let r=Oe(e);return r===void 0?{found:!1}:{found:!0,value:r}}function Q(e){let{allOf:t,anyOf:n,oneOf:r,...i}=e,a=[Object.keys(i).length===0?[]:[i]];for(let e of t??[])a=J(a,Q(e).map(e=>[e]));for(let e of[r,n])e?.length&&(a=J(a,e.flatMap(e=>Q(e).map(e=>[e]))));return a.map(Z)}function Ae(e){return e.flatMap(e=>Q(e).map(t=>({schema:e,candidate:ke(t)})))}function je(e,t,n,r){let i=E(e,n);return Object.hasOwn(n,t)||i.length===0?i.length===0:r.some(r=>E(e,{...n,[t]:r}).length===0)}function Me(e,t){let n=Object.hasOwn(e,`years`),r=Y(t,`years`,e,!1);if(!r.found)throw Error(`The extension schema returned no registration-term field, so cf cannot safely confirm this registration.`);let i=r.bundles.map(Z),a=Y(t,`years`,e,!0,n?[]:Ae(i).flatMap(({schema:e,candidate:t})=>t.found&&E(e,t.value).length===0?[t.value]:[]));if(!a.found||n&&a.bundles.some(e=>e.length===0))throw Error(`The extension schema returned no registration-term field, so cf cannot safely confirm this registration.`);let o=a.bundles.map(Z),s=o,c,l;if(n)l=e.years;else{let n=Ae(o).filter(({schema:e,candidate:t})=>{if(!t.found)return!0;let[n]=E(e,t.value);return n===void 0?!0:(c??=n,!1)});if(N(t)){let r=n.filter(({candidate:e})=>!e.found),i=n.filter(({candidate:n})=>n.found&&E(t,{...e,years:n.value}).length===0);i.length>0&&(n=[...r,...i])}s=n.map(({schema:e})=>e);let r=n.map(({candidate:e})=>e),[i]=r;l=i?.found===!0&&r.every(e=>e.found&&Object.is(e.value,i.value))?i.value:void 0}if(typeof l!=`number`||!Number.isInteger(l)||l<=0)throw!n&&s.length===0&&c?Error(`The extension schema returned an invalid default registration term: ${c}`):Error(n?`The requested registration term must be a positive whole number of years.`:`The extension schema returned no safe default registration term, so cf cannot safely confirm this registration.`);let u=n?E(o.length===1?o[0]??{}:{anyOf:o},l):s.flatMap(e=>E(e,l));if(u.length>0)throw Error(n?`The requested registration term is invalid: ${u[0]}`:`The extension schema returned an invalid default registration term: ${u[0]}`);return e.years=l,l}let Ne;function $(e){let t=_(e,`domain-name`,`text`);if(t!==void 0&&typeof t!=`string`)throw Error(`--domain-name must be a string`);return t}function Pe(e){return Ne=e,e.positional(`domain-name`,{type:`string`,description:`Fully qualified domain name, e.g. example.travel`}).option(`extension`,{type:`string`,description:`Extension whose registration schema to use (default: derived from the domain)`}).option(`prefer`,{type:`string`,description:"Set the Prefer header, e.g. `respond-async` to skip the synchronous wait"}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip the registration confirmation prompt`,default:!1}).option(`contacts`,{type:`string`,description:`Registrant contacts as inline JSON or @path to a reusable JSON file`}).option(`body`,{type:`string`,description:`Raw JSON request body, or @path to a JSON file`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).strictOptions(!1).help(!1).option(`help`,{type:`boolean`,alias:`h`,description:`Show help, including this extension's input flags`}).epilogue("Input flags depend on the extension: run `cf registrar registrations create <domain> --help`.\ncf rechecks availability and pricing before confirmation. Run `cf registrar registrations check --domains <domain>` to inspect them separately.")}async function Fe(t){Ne?.showHelp(`log`);let n=$(t[`domain-name`]);if(!n)return;let r=b(n);if(t.local){console.log(`\n${e.muted(`Registration fields are unavailable in local mode.`)}`);return}let i=Date.now()+M,a=await o(i);if(!a){console.log(`\n${e.muted(`Set \`CLOUDFLARE_ACCOUNT_ID\` or sign in with \`cf auth login\` to see the registration fields for ${r}.`)}`);return}let c=await I(n,t.extension,a,()=>s(t),i);console.log(c.ok?`\n${j(T(c.schema,{exclude:[G]}),`Registration fields for .${c.extension}`)}`:`\n${e.muted(`Could not load the registration fields for ${r}: ${b(c.reason)}.`)}`)}async function Ie(e,t,n){for(;;){let r=k(e,t,n);if(r.length===0)return!0;for(let e of r){let n=e.description??``,r=te(e);if(e.type===`boolean`&&e.schema.const===!0){let r=b(e.schema.description??n);if(!await x(e.name,r))return!1;t[e.name]=!0}else e.choices?.length?t[e.name]=await y(e.name,r,e.choices,e.choiceLabels):t[e.name]=await v(e.name,r,{validate:t=>re(e,t)})}}}function Le(e){let t=m(e);if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`--body must contain a JSON object`);return t}function Re(e){let t;if(e.startsWith(`@`))t=_(e,`contacts`,`json`);else try{t=JSON.parse(e)}catch{throw Error(`--contacts must contain a JSON object or @path to a JSON file`)}if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`--contacts must contain a JSON object or @path to a JSON file`);return t}var ze=d({command:`create [domain-name]`,describe:"Register a domain. Billable and non-refundable — input fields are extension-specific, see `create <domain> --help`",builder:Pe,handler:async e=>{if(e.help){await Fe(e);return}if(e.local)throw Error(t);let n={};e.prefer!==void 0&&(n.Prefer=String(e.prefer));let o;if(e.body!==void 0){let t=ne([],e,{reserved:q}).errors.some(e=>e.startsWith(`Unknown flag`));if(e.contacts!==void 0||t)throw Error(`--body cannot be combined with registration field flags. Pass one or the other.`);o=Le(e.body)}let d=e.contacts===void 0?void 0:Re(e.contacts),f=$(e[`domain-name`]),p=o?.domain_name;if(p!==void 0&&typeof p!=`string`)throw Error(`--body field domain_name must be a string`);if(f!==void 0&&p!==void 0&&f!==p)throw Error(`The positional domain '${b(f)}' does not match --body domain_name '${b(p)}'`);let m=f??p;if(!m){if(o!==void 0){c({submitted:!1,reason:`registration_input_required`,message:`Not submitted. A domain is required to determine the registration schema.`,missingFields:[{path:`/domain_name`,flag:`--domain-name`,question:K}],validationErrors:["`/domain_name` is required"]});return}m=await v(`domain-name`,K)}let h=b(m);o&&(o.domain_name=m);let g=e.dryRun?await r()??`<account-id>`:await i(),_,y=async()=>(_||=await s(e),_);e.dryRun||await P(await y(),g,m);let x=await I(m,e.extension,g,y);if(!x.ok)throw Error(`Could not load the registration schema for ${h}: ${b(x.reason)}.`);let S=b(x.extension),C=x.schema,w=T(x.schema,{exclude:[G]});if(!o){if(d!==void 0&&xe(`contacts`,w,e))throw Error(`--contacts cannot be combined with --contacts-* fields. Pass one or the other.`);let t={...e},n=d===void 0?void 0:{contacts:d};if(n!==void 0&&delete t.contacts,!await Ie(w,t,n))return;let r=ne(w,t,{reserved:q,baseBody:n});if(r.errors.length>0)throw Error(`${r.errors.join(`
6
6
  `)}\n\nRun \`cf registrar registrations create ${h} --help\` for .${S}'s registration fields.`);o={domain_name:m,...r.body}}let D;try{D=Me(o,C)}catch(e){let t=E(C,o);if(we(m,x.extension,w,o,t))return;throw e}let O=E(C,o);if(we(m,x.extension,w,o,O))return;if(O.length>0)throw Error(`${O.join(`
7
- `)}\n\nRun \`cf registrar registrations create ${h} --help\` for this extension's registration fields.`);if(e.dryRun){l({command:`cf registrar registrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${g}/registrar/registrations`,pathParams:{},bodyKind:`json`,body:o});return}let k=await P(await y(),g,m),A=De(k,D);if(e.force||process.stderr.write(`${ye({domain:m,accountId:g,years:D,quotedCost:A,pricing:k,body:o,schema:C,descriptors:w})}\n`),!await ee({force:e.force,message:`Registering ${h} for ${D} ${D===1?`year`:`years`} costs ${A}, charges the account's default payment method, and cannot be refunded.`}))return;if(o.years!==D)throw Error(`The registration term changed after confirmation, so cf will not submit this registration.`);let j=await P(await y(),g,m);if(j.currency!==k.currency||j.registration_cost!==k.registration_cost||j.renewal_cost!==k.renewal_cost)throw Error(`Availability or pricing changed while awaiting confirmation, so cf will not submit this registration. Re-run the command to review the current quote.`);let M=await y();e.accountId=g,c(await u(`Registering`,async()=>a(M,`POST`,`/accounts/${g}/registrar/registrations`,{body:o,headers:Object.keys(n).length>0?n:void 0})),{successLabel:`Registered ${h}`})}},{command:`registrar registrations create`,recordArgs:!1});function Be(e){return e.usage("$0 registrar registrations check <domains>\n\nPerforms real-time, authoritative availability checks directly against domain registries. Use this endpoint to verify a domain is available before attempting registration via `POST /registrations`. **Important:** Unlike the Search endpoint, these results are authoritative and reflect current registry status. Always check availability immediately before registration as domain status can change rapidly. **Note:** This endpoint uses POST to accept a list of domains in the request body. It is a read-only operation — it does not create, modify, or reserve any domains. ### Extension support Only domains on extensions supported for programmatic registration by this API can be registered. If you check a domain on an unsupported extension, the response will include `registrable: false` with a `reason` field explaining why: - `extension_not_supported_via_api` — Cloudflare Registrar supports this extension in the dashboard, but it is not yet available for programmatic registration via this API. Register via `https://dash.cloudflare.com/{account_id}/domains/registrations` instead. - `extension_not_supported` — This extension is not supported by Cloudflare Registrar. - `extension_disallows_registration` — The extension's registry has temporarily or permanently frozen new registrations. No registrar can register domains on this extension at this time. - `domain_premium` — The domain is premium priced. Premium registration is not currently supported by this API. - `domain_unavailable` — The domain is already registered, reserved, or otherwise not available for registration on a supported extension. The `reason` field is only present when `registrable` is `false`. ### Behavior - Maximum 20 domains per request - Pricing is only returned for domains where `registrable: true` - Results are not cached; each request queries the registry ### Workflow 1. Call this endpoint with domains the user wants to register. 2. For each domain where `registrable: true`, present pricing to the user. 3. If `tier: premium`, note that premium registration is not currently supported by this API and do not proceed to `POST /registrations`. 4. Proceed to `POST /registrations` only for supported non-premium domains.").positional(`domains`,{type:`string`,description:"List of fully qualified domain names (FQDNs) to check for availability. Each domain must include the extension. - Minimum: 1 domain. - Maximum: 20 domains per request. - The response returns domains on unsupported extensions with `registrable: false` and a `reason` field. - The response may omit malformed domain names (e.g., names missing an extension). ",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of fully qualified domain names (FQDNs) to check. Each domain must include the extension (e.g., "example.com", not "example").`})}const Ve={command:`check <domains>`,describe:`Check domain availability`,builder:Be,handler:async e=>f({command:`registrar registrations check`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/domain-check`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:m(e.body)});return}let t=await s(e),a=e.local?n:await i();if(e.accountId=a,e.body){let n=m(e.body);c(await u(`Creating`,async()=>t.registrar.registrations.check({...n,account_id:a})),{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function He(e){return e.usage("$0 registrar registrations get-registration-status <domain-name>\n\nReturns the current status of a domain registration workflow. Use this endpoint to poll for completion when the POST response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. **Terminal states:** `succeeded` and `failed` are terminal and always have `completed: true`. **Non-terminal states:** - `action_required` has `completed: false` and will not resolve on its own. The workflow is paused pending user intervention. - `blocked` has `completed: false` and indicates the workflow is waiting on a third party such as the extension registry or losing registrar. Continue polling while informing the user of the delay. Use increasing backoff between polls. When `state: blocked`, use a longer polling interval and do not poll indefinitely. A naive polling loop that only checks `completed` can run indefinitely when `state: action_required`. Break explicitly on `action_required`: ```js let status; do { await new Promise(r => setTimeout(r, 2000)); status = await cloudflare.request({ method: 'GET', path: reg.result.links.self, }); } while ( !status.result.completed && status.result.state !== 'action_required' ); if (status.result.state === 'action_required') { // Surface context.action and context.confirmation_sent_to to the user. // Do not re-submit the registration request. } ```").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ue={command:`get-registration-status <domain-name>`,describe:`Get Registration Status`,builder:He,handler:async e=>f({command:`registrar registrations get-registration-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations get-registration-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/registration-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await i();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.getRegistrationStatus({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})})};function We(e){return e.usage("$0 registrar registrations get-transfer-status <domain-name>\n\nReturns the current status of a domain transfer workflow. Use this endpoint to poll transfer progress after initiating a transfer with `POST /accounts/{account_id}/registrar/registrations/{domain_name}/transfer-in`. The URL is provided in the `links.self` field of the transfer response. ### Transfer timelines Transfers typically take 1–10 days due to ICANN-mandated approval windows. ### Workflow states **Terminal states:** `succeeded` and `failed` are terminal and always have `completed: true`. **Non-terminal states:** - `in_progress`: Transfer has been submitted to the registry and is being processed. Continue polling. - `blocked`: The workflow is waiting on the losing registrar or registry to release the domain. This is the **most common state** for transfers and is entirely normal — it means the ICANN transfer approval window is in effect. The losing registrar has up to 5 days to approve or reject. Continue polling with longer intervals (e.g., every 30–60 minutes). - `action_required`: The user needs to take action (e.g., the FOA email needs to be accepted). See `context` for details on what is needed. - `pending`: Transfer workflow created but not yet started processing. ### Polling guidance Adjust your polling interval based on the current workflow state: - `pending` or `in_progress`: Poll every 30 seconds. - `blocked`: The transfer is waiting on a third party (e.g., losing registrar approval). Poll every 30–60 minutes. - `action_required`: Stop polling. The workflow will not advance until the user takes action. Check `context` for details on what is needed. - `succeeded` or `failed`: Terminal — stop polling.").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ge={command:`get-transfer-status <domain-name>`,describe:`Get Transfer Status`,builder:We,handler:async e=>f({command:`registrar registrations get-transfer-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations get-transfer-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/transfer-in-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await i();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.getTransferStatus({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})})};function Ke(e){return e.usage("$0 registrar registrations get-update-status <domain-name>\n\nReturns the current status of a domain update workflow. Use this endpoint to poll for completion when the PATCH response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. Use increasing backoff between polls. When the workflow remains blocked on a third party, use a longer polling interval and do not poll indefinitely.").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qe={command:`get-update-status <domain-name>`,describe:`Get Update Status`,builder:Ke,handler:async e=>f({command:`registrar registrations get-update-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations get-update-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/update-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await i();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.getUpdateStatus({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})})};function Je(e){return e.usage("$0 registrar registrations get <domain-name>\n\nReturns the current state of a domain registration. This is the canonical read endpoint for a domain you own. It returns the full registration resource including current settings and expiration. When the registration resource is ready, both `created_at` and `expires_at` are present in the response.").positional(`domain-name`,{type:`string`,description:`Domain name to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ye={command:`get <domain-name>`,describe:`Get Registration`,builder:Je,handler:async e=>f({command:`registrar registrations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await i();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.get({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})})};function Xe(e){return e.usage("$0 registrar registrations list\n\nReturns a paginated list of domain registrations owned by the account. This endpoint uses cursor-based pagination. Results are ordered by registration date by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages.").option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
7
+ `)}\n\nRun \`cf registrar registrations create ${h} --help\` for this extension's registration fields.`);if(e.dryRun){l({command:`cf registrar registrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${g}/registrar/registrations`,pathParams:{},bodyKind:`json`,body:o});return}let k=await P(await y(),g,m),A=De(k,D);if(e.force||process.stderr.write(`${ye({domain:m,accountId:g,years:D,quotedCost:A,pricing:k,body:o,schema:C,descriptors:w})}\n`),!await ee({force:e.force,message:`Registering ${h} for ${D} ${D===1?`year`:`years`} costs ${A}, charges the account's default payment method, and cannot be refunded.`}))return;if(o.years!==D)throw Error(`The registration term changed after confirmation, so cf will not submit this registration.`);let j=await P(await y(),g,m);if(j.currency!==k.currency||j.registration_cost!==k.registration_cost||j.renewal_cost!==k.renewal_cost)throw Error(`Availability or pricing changed while awaiting confirmation, so cf will not submit this registration. Re-run the command to review the current quote.`);let M=await y();e.accountId=g,c(await u(`Registering`,async()=>a(M,`POST`,`/accounts/${g}/registrar/registrations`,{body:o,headers:Object.keys(n).length>0?n:void 0})),{successLabel:`Registered ${h}`})}},{command:`registrar registrations create`,recordArgs:!1});function Be(e){return e.usage("$0 registrar registrations check <domains...>\n\nPerforms real-time, authoritative availability checks directly against domain registries. Use this endpoint to verify a domain is available before attempting registration via `POST /registrations`. **Important:** Unlike the Search endpoint, these results are authoritative and reflect current registry status. Always check availability immediately before registration as domain status can change rapidly. **Note:** This endpoint uses POST to accept a list of domains in the request body. It is a read-only operation — it does not create, modify, or reserve any domains. ### Extension support Only domains on extensions supported for programmatic registration by this API can be registered. If you check a domain on an unsupported extension, the response will include `registrable: false` with a `reason` field explaining why: - `extension_not_supported_via_api` — Cloudflare Registrar supports this extension in the dashboard, but it is not yet available for programmatic registration via this API. Register via `https://dash.cloudflare.com/{account_id}/domains/registrations` instead. - `extension_not_supported` — This extension is not supported by Cloudflare Registrar. - `extension_disallows_registration` — The extension's registry has temporarily or permanently frozen new registrations. No registrar can register domains on this extension at this time. - `domain_premium` — The domain is premium priced. Premium registration is not currently supported by this API. - `domain_unavailable` — The domain is already registered, reserved, or otherwise not available for registration on a supported extension. The `reason` field is only present when `registrable` is `false`. ### Behavior - Maximum 20 domains per request - Pricing is only returned for domains where `registrable: true` - Results are not cached; each request queries the registry ### Workflow 1. Call this endpoint with domains the user wants to register. 2. For each domain where `registrable: true`, present pricing to the user. 3. If `tier: premium`, note that premium registration is not currently supported by this API and do not proceed to `POST /registrations`. 4. Proceed to `POST /registrations` only for supported non-premium domains.").positional(`domains`,{type:`string`,array:!0,description:"List of fully qualified domain names (FQDNs) to check for availability. Each domain must include the extension. - Minimum: 1 domain. - Maximum: 20 domains per request. - The response returns domains on unsupported extensions with `registrable: false` and a `reason` field. - The response may omit malformed domain names (e.g., names missing an extension). ",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of fully qualified domain names (FQDNs) to check. Each domain must include the extension (e.g., "example.com", not "example").`})}const Ve={command:`check <domains...>`,describe:`Check domain availability`,builder:Be,handler:async e=>f({command:`registrar registrations check`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/domain-check`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({domains:e.domains}):m(e.body)});return}let t=await s(e),a=e.local?n:await i();if(e.accountId=a,e.body){let n=m(e.body);c(await u(`Creating`,async()=>t.registrar.registrations.check({...n,account_id:a})),{successLabel:`Created`});return}let o=g({domains:e.domains});c(await u(`Creating`,async()=>t.registrar.registrations.check({...o,account_id:a})),{successLabel:`Created`})})};function He(e){return e.usage("$0 registrar registrations get-registration-status <domain-name>\n\nReturns the current status of a domain registration workflow. Use this endpoint to poll for completion when the POST response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. **Terminal states:** `succeeded` and `failed` are terminal and always have `completed: true`. **Non-terminal states:** - `action_required` has `completed: false` and will not resolve on its own. The workflow is paused pending user intervention. - `blocked` has `completed: false` and indicates the workflow is waiting on a third party such as the extension registry or losing registrar. Continue polling while informing the user of the delay. Use increasing backoff between polls. When `state: blocked`, use a longer polling interval and do not poll indefinitely. A naive polling loop that only checks `completed` can run indefinitely when `state: action_required`. Break explicitly on `action_required`: ```js let status; do { await new Promise(r => setTimeout(r, 2000)); status = await cloudflare.request({ method: 'GET', path: reg.result.links.self, }); } while ( !status.result.completed && status.result.state !== 'action_required' ); if (status.result.state === 'action_required') { // Surface context.action and context.confirmation_sent_to to the user. // Do not re-submit the registration request. } ```").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ue={command:`get-registration-status <domain-name>`,describe:`Get Registration Status`,builder:He,handler:async e=>f({command:`registrar registrations get-registration-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations get-registration-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/registration-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await i();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.getRegistrationStatus({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})})};function We(e){return e.usage("$0 registrar registrations get-transfer-status <domain-name>\n\nReturns the current status of a domain transfer workflow. Use this endpoint to poll transfer progress after initiating a transfer with `POST /accounts/{account_id}/registrar/registrations/{domain_name}/transfer-in`. The URL is provided in the `links.self` field of the transfer response. ### Transfer timelines Transfers typically take 1–10 days due to ICANN-mandated approval windows. ### Workflow states **Terminal states:** `succeeded` and `failed` are terminal and always have `completed: true`. **Non-terminal states:** - `in_progress`: Transfer has been submitted to the registry and is being processed. Continue polling. - `blocked`: The workflow is waiting on the losing registrar or registry to release the domain. This is the **most common state** for transfers and is entirely normal — it means the ICANN transfer approval window is in effect. The losing registrar has up to 5 days to approve or reject. Continue polling with longer intervals (e.g., every 30–60 minutes). - `action_required`: The user needs to take action (e.g., the FOA email needs to be accepted). See `context` for details on what is needed. - `pending`: Transfer workflow created but not yet started processing. ### Polling guidance Adjust your polling interval based on the current workflow state: - `pending` or `in_progress`: Poll every 30 seconds. - `blocked`: The transfer is waiting on a third party (e.g., losing registrar approval). Poll every 30–60 minutes. - `action_required`: Stop polling. The workflow will not advance until the user takes action. Check `context` for details on what is needed. - `succeeded` or `failed`: Terminal — stop polling.").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ge={command:`get-transfer-status <domain-name>`,describe:`Get Transfer Status`,builder:We,handler:async e=>f({command:`registrar registrations get-transfer-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations get-transfer-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/transfer-in-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await i();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.getTransferStatus({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})})};function Ke(e){return e.usage("$0 registrar registrations get-update-status <domain-name>\n\nReturns the current status of a domain update workflow. Use this endpoint to poll for completion when the PATCH response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. Use increasing backoff between polls. When the workflow remains blocked on a third party, use a longer polling interval and do not poll indefinitely.").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qe={command:`get-update-status <domain-name>`,describe:`Get Update Status`,builder:Ke,handler:async e=>f({command:`registrar registrations get-update-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations get-update-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/update-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await i();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.getUpdateStatus({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})})};function Je(e){return e.usage("$0 registrar registrations get <domain-name>\n\nReturns the current state of a domain registration. This is the canonical read endpoint for a domain you own. It returns the full registration resource including current settings and expiration. When the registration resource is ready, both `created_at` and `expires_at` are present in the response.").positional(`domain-name`,{type:`string`,description:`Domain name to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ye={command:`get <domain-name>`,describe:`Get Registration`,builder:Je,handler:async e=>f({command:`registrar registrations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await i();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.get({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})})};function Xe(e){return e.usage("$0 registrar registrations list\n\nReturns a paginated list of domain registrations owned by the account. This endpoint uses cursor-based pagination. Results are ordered by registration date by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages.").option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
8
8
  Pass this value to fetch the next page of results. Omit (or
9
9
  pass an empty string) for the first page.`}).option(`per-page`,{type:`number`,description:`Number of items to return per page.`}).option(`direction`,{type:`string`,description:`Sort direction for results. Defaults to ascending order.`,choices:[`asc`,`desc`]}).option(`sort-by`,{type:`string`,description:"Column to sort results by. Defaults to registration date (`registry_created_at`) when omitted.",choices:[`registry_created_at`,`registry_expires_at`,`name`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ze={command:`list`,describe:`List Registrations`,builder:S(Xe),handler:async e=>f({command:`registrar registrations list`,classification:{safeFlags:[`direction`,`sort-by`,`dry-run`]}},e,async()=>{let t={cursor:e.cursor,per_page:e[`per-page`],direction:e.direction,sort_by:e[`sort-by`]};if(e.dryRun){l({command:`cf registrar registrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/registrations`,pathParams:{},query:t,bodyKind:`none`});return}let a=await s(e),o=e.local?n:await i();e.accountId=o,c(await u(`Loading`,async()=>a.registrar.registrations.list({account_id:o,...t})),{successLabel:`Loaded`})})};function Qe(e){return e.usage('$0 registrar registrations search\n\nSearches for domain name suggestions based on a keyword, phrase, or partial domain name. Returns a list of potentially available domains with pricing information. **Important:** Results are non-authoritative and based on cached data. Always use the `/domain-check` endpoint to verify real-time availability before attempting registration. Suggestions are scoped to extensions supported for programmatic registration via this API (`POST /registrations`). Domains on unsupported extensions will not appear in results, even if they are available at the registry level. ### Use cases - Brand name discovery (e.g., "acme corp" → acmecorp.com, acmecorp.dev) - Keyword-based suggestions (e.g., "coffee shop" → coffeeshop.com, mycoffeeshop.net) - Alternative extension discovery (e.g., "example.com" → example.com, example.app, example.xyz) ### Workflow 1. Call this endpoint with a keyword or domain name. 2. Present suggestions to the user. 3. Call `/domain-check` with the user\'s chosen domains to confirm real-time availability and pricing. 4. Proceed to `POST /registrations` only for supported non-premium domains where the Check response returns `registrable: true`. **Note:** Searching with just a domain extension (e.g., "com" or ".app") is not supported. Provide a keyword or domain name.').option(`query`,{type:`string`,description:`The search term to find domain suggestions. Accepts keywords, phrases, or full domain names.
10
10
  - Phrases: "coffee shop" returns coffeeshop.com, mycoffeeshop.net, etc.