cf 0.9.1 → 0.10.0

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 (262) hide show
  1. package/README.md +5 -0
  2. package/dist/_meta/agent-context.json +34 -35
  3. package/dist/_meta/commands.json +6834 -10044
  4. package/dist/_meta/schemas.json +11228 -12752
  5. package/dist/{abuse-reports-CzDAjFpo.mjs → abuse-reports-CGF4zcKf.mjs} +2 -2
  6. package/dist/{access-CxyW_sIW.mjs → access-lhLJo1v2.mjs} +1 -1
  7. package/dist/{account-Dd4-tDYJ.mjs → account-CYRm3yoN.mjs} +1 -1
  8. package/dist/account-tags-B88TotoH.mjs +9 -0
  9. package/dist/accounts-BSIAT_iP.mjs +28 -0
  10. package/dist/{acm-CHacxa3s.mjs → acm-VULm1djv.mjs} +1 -1
  11. package/dist/{addressing-BnqNmmYN.mjs → addressing-BHPBIkRY.mjs} +1 -1
  12. package/dist/{agent-context-Bu6yvDqA.mjs → agent-context-KBy48G1b.mjs} +1 -1
  13. package/dist/{agent-memory-D--BQS0W.mjs → agent-memory-DDv_Gxr7.mjs} +2 -2
  14. package/dist/{ai-audit-CfpDKXkD.mjs → ai-audit-BWZGvbca.mjs} +1 -1
  15. package/dist/{ai-gateway-oG4j_oYN.mjs → ai-gateway-jeB-sAgP.mjs} +1 -1
  16. package/dist/ai-search-BmdskMjR.mjs +7 -0
  17. package/dist/{ai-security-byjIIrfl.mjs → ai-security-CsmfcaUx.mjs} +1 -1
  18. package/dist/{ai-BnVlQDiI.mjs → ai-viHB1tgI.mjs} +1 -1
  19. package/dist/{alerting-qa8SkXlD.mjs → alerting-Bl8OqViR.mjs} +4 -4
  20. package/dist/analytics-vOxw8Hy0.mjs +3 -0
  21. package/dist/{analytics_engine-BnECMIWJ.mjs → analytics_engine-DO4-C0wD.mjs} +1 -1
  22. package/dist/{api-security-MfHbfZyf.mjs → api-security-4FVrD4n8.mjs} +1 -1
  23. package/dist/argo-CQfCgazW.mjs +2 -0
  24. package/dist/args-DlUhyGU0.mjs +2 -0
  25. package/dist/artifacts-CVDGnr2V.mjs +4 -0
  26. package/dist/{audit-logs-retFtvow.mjs → audit-logs-CzpwvQ6A.mjs} +1 -1
  27. package/dist/{auth-aazs91XL.mjs → auth-D0xZxAEa.mjs} +1 -1
  28. package/dist/{auth-DuLchM18.mjs → auth-MQEamPN9.mjs} +2 -2
  29. package/dist/{billing-CxQVqpGZ.mjs → billing-aJgapeRm.mjs} +2 -2
  30. package/dist/{bot-management-Rli7v7tg.mjs → bot-management-Y2q5d-pi.mjs} +1 -1
  31. package/dist/{botnet-feed-Cw6XSEf8.mjs → botnet-feed-DANJqfmE.mjs} +1 -1
  32. package/dist/{brand-protection-CTvnHGfV.mjs → brand-protection-CjpZWBjp.mjs} +1 -1
  33. package/dist/{browser-extension-q79xHrVW.mjs → browser-extension-BtpCbh-2.mjs} +1 -1
  34. package/dist/browser-run-BFn9h2Tz.mjs +4 -0
  35. package/dist/{build-Dji9BYmV.mjs → build-DcflwvqN.mjs} +1 -1
  36. package/dist/{cache-Cl7vKJwH.mjs → cache-VyWK1SjY.mjs} +1 -1
  37. package/dist/{calls-DtK_ANxq.mjs → calls-BxoRYxs4.mjs} +1 -1
  38. package/dist/{certificate-authorities-DZP1RzAs.mjs → certificate-authorities-D7OAFxF_.mjs} +1 -1
  39. package/dist/{cf-oSz9pud_.mjs → cf-C7DU4819.mjs} +1 -1
  40. package/dist/{chunk-LQW53VED-Xakf_rUn.mjs → chunk-LQW53VED-DLrXV-hE.mjs} +2 -2
  41. package/dist/{client-certificates-BtPU9GsQ.mjs → client-certificates-DDUv8K0a.mjs} +1 -1
  42. package/dist/{client-side-security-DAn-3jwp.mjs → client-side-security-D4ysjwWT.mjs} +1 -1
  43. package/dist/{cloud-connector-BpVcvhjZ.mjs → cloud-connector-Bhec6z2P.mjs} +1 -1
  44. package/dist/cloudforce-one-J_hn9ss9.mjs +36 -0
  45. package/dist/config.mjs +1 -1
  46. package/dist/connector-interrupts-Dycx8zFx.mjs +2 -0
  47. package/dist/{connector-telemetry-events-D5_3X7XW.mjs → connector-telemetry-events-BmxOSNtN.mjs} +1 -1
  48. package/dist/connector-telemetry-events-latest-BY2556uL.mjs +2 -0
  49. package/dist/{connector-telemetry-snapshots-CJ9gLRFR.mjs → connector-telemetry-snapshots-CdcqfKnH.mjs} +1 -1
  50. package/dist/connector-telemetry-snapshots-latest-BHYdxUEF.mjs +2 -0
  51. package/dist/{connectors-Bo6ZT8PT.mjs → connectors-BqxYMMtQ.mjs} +1 -1
  52. package/dist/{containers-Bog7j0Hw.mjs → containers-CKW081JA.mjs} +8 -8
  53. package/dist/{content-scan-D03UfK2X.mjs → content-scan-Dgd7A8KF.mjs} +1 -1
  54. package/dist/{csamScanner-DgS-7ADh.mjs → csamScanner-DYL37wLc.mjs} +1 -1
  55. package/dist/{ct-alerting-8AKtNnUg.mjs → ct-alerting-CkhSbfAs.mjs} +1 -1
  56. package/dist/{custom-certificates-4y35UC1X.mjs → custom-certificates-BzAOnEoT.mjs} +1 -1
  57. package/dist/custom-csrs-CgzG3pd3.mjs +3 -0
  58. package/dist/{custom-hostnames-CDIAnsRa.mjs → custom-hostnames-q_nsnlye.mjs} +4 -4
  59. package/dist/custom-nameservers-BUBmfhUe.mjs +3 -0
  60. package/dist/custom-pages-M7jA2Hit.mjs +3 -0
  61. package/dist/{d1-Cllm-iTT.mjs → d1-BFvMd6-S.mjs} +1 -1
  62. package/dist/{data-security-rnoSCEdL.mjs → data-security-Bji4Or_j.mjs} +2 -2
  63. package/dist/{dcv-delegation-DCRCOL6l.mjs → dcv-delegation-BuoRQ1Yh.mjs} +1 -1
  64. package/dist/{deploy-DGlmjPTS.mjs → deploy-CZ7bgNDu.mjs} +1 -1
  65. package/dist/{deploy-input-DhCo1I0I.mjs → deploy-input-CrvuoDGJ.mjs} +1 -1
  66. package/dist/{dev-BbLV0Ti-.mjs → dev-V10MG-Bg.mjs} +1 -1
  67. package/dist/{diagnostics-D5Yo2xqx.mjs → diagnostics-BTH-8nJH.mjs} +2 -2
  68. package/dist/{directory-CCndFkbQ.mjs → directory-BlH6N6Qy.mjs} +1 -1
  69. package/dist/{dispatch-namespaces-C48JQ9EA.mjs → dispatch-namespaces-BCjH1JzB.mjs} +1 -1
  70. package/dist/{dist-COfwjT96.mjs → dist-CgrMkXFx.mjs} +1 -1
  71. package/dist/{dls-BBq99pjI.mjs → dls-BF5iN78p.mjs} +1 -1
  72. package/dist/{dns-DdQYtenF.mjs → dns-CeCTNqRk.mjs} +11 -11
  73. package/dist/{dns-firewall-DdwVtm12.mjs → dns-firewall-B54MaLGm.mjs} +1 -1
  74. package/dist/{dot-prop-6SRZBKHT-C_xd7eTS.mjs → dot-prop-6SRZBKHT-wIVDg_fl.mjs} +1 -1
  75. package/dist/{durable-objects-BvxXBht_.mjs → durable-objects-D8FQORrL.mjs} +1 -1
  76. package/dist/{email-auth-DFvXKSkg.mjs → email-auth-DJK0Eb30.mjs} +1 -1
  77. package/dist/email-routing-NpmiKIrl.mjs +6 -0
  78. package/dist/{email-security-BFagcRPP.mjs → email-security-BLZ7WZ9Z.mjs} +2 -2
  79. package/dist/email-sending-dn-353Nx.mjs +7 -0
  80. package/dist/fieldExtractors-ahysj57J.mjs +3 -0
  81. package/dist/firewall-CBPGJ43p.mjs +11 -0
  82. package/dist/{flagship-FJHc4mFi.mjs → flagship-BusjRNIb.mjs} +3 -3
  83. package/dist/{fraud-AH47n-wL.mjs → fraud-BIhS8pLf.mjs} +1 -1
  84. package/dist/{google-tag-gateway-149kbuG_.mjs → google-tag-gateway-TZZ3F1tV.mjs} +1 -1
  85. package/dist/{healthchecks-DfEUG007.mjs → healthchecks-FiXIk-KP.mjs} +2 -2
  86. package/dist/{hostnames-DQUiD3Vr.mjs → hostnames-Bx0mykMR.mjs} +1 -1
  87. package/dist/{hyperdrive-RyQboMWI.mjs → hyperdrive-C8qCabBF.mjs} +1 -1
  88. package/dist/{iam-BhHYhMXO.mjs → iam-Cj63Kjc6.mjs} +1 -1
  89. package/dist/{images-CDViyKtZ.mjs → images-CBWXCDhy.mjs} +1 -1
  90. package/dist/index.mjs +1 -1
  91. package/dist/{intel-YHZbPlS3.mjs → intel-B-9Z_sJs.mjs} +2 -2
  92. package/dist/{interactive-mV8PABm6.mjs → interactive-DtsCYfrK.mjs} +1 -1
  93. package/dist/{ips-BpCdldFx.mjs → ips-qs9eGJnI.mjs} +1 -1
  94. package/dist/{keyless-certificates-oNu5jWKF.mjs → keyless-certificates-THHvoXX3.mjs} +1 -1
  95. package/dist/{keys-yYtv7Ztr.mjs → keys-D7N0j4-x.mjs} +1 -1
  96. package/dist/{kv-Bi9B4E0A.mjs → kv-BFDUCnft.mjs} +1 -1
  97. package/dist/{leaked-credential-checks-DKRjBLcr.mjs → leaked-credential-checks-DUlUCOoJ.mjs} +1 -1
  98. package/dist/load-balancers-D2zbQ8fT.mjs +6 -0
  99. package/dist/{local-DTyuGwTw.mjs → local-D-aVNu6A.mjs} +1 -1
  100. package/dist/{local-runtime-IAXhEugU.mjs → local-runtime-Dh3keC5v.mjs} +1 -1
  101. package/dist/logexplorer-CUsfZ_bS.mjs +13 -0
  102. package/dist/{logo-matches-LyDAYPbI.mjs → logo-matches-CJcthPHf.mjs} +1 -1
  103. package/dist/{logos-O9f5bGSB.mjs → logos-BS65zN8q.mjs} +1 -1
  104. package/dist/logpush-BK34mMQs.mjs +4 -0
  105. package/dist/{logs-DmWWL5f9.mjs → logs-CLAqX9h2.mjs} +1 -1
  106. package/dist/{magic-cloud-networking-XbTa6P52.mjs → magic-cloud-networking-h_ozrC5S.mjs} +1 -1
  107. package/dist/magic-network-monitoring-C7tAPNKP.mjs +4 -0
  108. package/dist/{magic-transit-DwgZeIj-.mjs → magic-transit-BtsFePMx.mjs} +5 -5
  109. package/dist/{managed-transforms-DCmogkxv.mjs → managed-transforms-Cm_KVCMB.mjs} +1 -1
  110. package/dist/{matches-BAeN8VM1.mjs → matches-InA1hwII.mjs} +1 -1
  111. package/dist/{mcp-DKZ2D050.mjs → mcp-mJ7bekNJ.mjs} +1 -1
  112. package/dist/mesh-BK4S1Ezy.mjs +4 -0
  113. package/dist/{moq-CJpE-eNj.mjs → moq-qmuVPAO0.mjs} +1 -1
  114. package/dist/{mtls-certificates-Bbm_1lQI.mjs → mtls-certificates-CU4OAAXY.mjs} +1 -1
  115. package/dist/{network-D2WRXCDe.mjs → network-D74cSy3t.mjs} +1 -1
  116. package/dist/{network-interconnects-Clq4X1U8.mjs → network-interconnects-BJ0Nc48J.mjs} +1 -1
  117. package/dist/{oauth-BPizUUqP.mjs → oauth-B0ETkNcX.mjs} +2 -2
  118. package/dist/{oauth-clients-hilWfAlm.mjs → oauth-clients-Br-smLxQ.mjs} +1 -1
  119. package/dist/{oauth-scopes-CmbgsPYd.mjs → oauth-scopes-D5bF11ju.mjs} +1 -1
  120. package/dist/observability-BWE0Gg3V.mjs +4 -0
  121. package/dist/{open-PBXRGS4R-C46yIm3u.mjs → open-PBXRGS4R-R-qesf18.mjs} +1 -1
  122. package/dist/{organization-D41rIvJa.mjs → organization-NX7yCZrq.mjs} +1 -1
  123. package/dist/{organizations-eNzfOwlP.mjs → organizations-DLhiRt8g.mjs} +1 -1
  124. package/dist/{origin-ca-certificates-DaiAmw45.mjs → origin-ca-certificates-Ff4McZRQ.mjs} +1 -1
  125. package/dist/{origin-post-quantum-encryption-7YztBged.mjs → origin-post-quantum-encryption-UuTr4_SW.mjs} +1 -1
  126. package/dist/{origin-tls-client-auth-DRwURM8s.mjs → origin-tls-client-auth-DOJ1zlH3.mjs} +1 -1
  127. package/dist/{output-DgW1hQGX.mjs → output-DrpYYfnB.mjs} +1 -1
  128. package/dist/{page-rules-B2Csdc4h.mjs → page-rules-BSz1gO-_.mjs} +1 -1
  129. package/dist/{pages-BAL6Q7OY.mjs → pages-DVDogxPs.mjs} +4 -4
  130. package/dist/{pay-per-crawl-C-1-ZAtn.mjs → pay-per-crawl-BrLXK7gT.mjs} +1 -1
  131. package/dist/{pipelines-cyQOuFLb.mjs → pipelines-BszRk4sM.mjs} +2 -2
  132. package/dist/{precursor-BrweY39h.mjs → precursor-BPNjQr76.mjs} +1 -1
  133. package/dist/progress-CsHIt3Tp.mjs +2 -0
  134. package/dist/{prompt-CDtLWxNv.mjs → prompt-DdegNPpg.mjs} +1 -1
  135. package/dist/{queries-oM8uGZy5.mjs → queries-JL1H1Biz.mjs} +1 -1
  136. package/dist/{queues-CTx04ZNw.mjs → queues-DpkYdRUE.mjs} +1 -1
  137. package/dist/{r2-CnlIUn7R.mjs → r2-CKozthw_.mjs} +4 -4
  138. package/dist/{r2-data-catalog-DLtf9d6o.mjs → r2-data-catalog-Du7hN9jA.mjs} +1 -1
  139. package/dist/radar-C-92vggG.mjs +2 -0
  140. package/dist/{rate-limits-B1YjnGue.mjs → rate-limits-yBF3qoYD.mjs} +1 -1
  141. package/dist/{raw-fetch-Dz-QBoP_.mjs → raw-fetch-CteyTOM2.mjs} +1 -1
  142. package/dist/realtimekit-CIP7lP-a.mjs +7 -0
  143. package/dist/{registrar-BEcb90RX.mjs → registrar-DKKN0M29.mjs} +3 -3
  144. package/dist/{registrar-sandbox-0i1T3zne.mjs → registrar-sandbox-DiXg8p_1.mjs} +3 -3
  145. package/dist/{registry-DDcSvd8H.mjs → registry-Bck_zFkz.mjs} +1 -1
  146. package/dist/{reporting-CLbjHlnw.mjs → reporting-fg_GKXe1.mjs} +1 -1
  147. package/dist/{request-tracers-BcKpofP1.mjs → request-tracers-CkMya96z.mjs} +1 -1
  148. package/dist/{resource-sharing-Ctdi9D-j.mjs → resource-sharing-D1pSDvtf.mjs} +1 -1
  149. package/dist/{resource-tagging-DGEyVTDN.mjs → resource-tagging-z48JGHCq.mjs} +1 -1
  150. package/dist/{rules-CmuB5rIN.mjs → rules-BTmNjDN-.mjs} +1 -1
  151. package/dist/rulesets-CsoSM-17.mjs +5 -0
  152. package/dist/{rum-QT6EP4JK.mjs → rum-DB4iO2q5.mjs} +1 -1
  153. package/dist/{schema-BeXPWeK9.mjs → schema-B34Q9tLF.mjs} +1 -1
  154. package/dist/{schema-flags-DHryz6SF.mjs → schema-flags-iGoOriJt.mjs} +1 -1
  155. package/dist/{scim-BgGsmHrL.mjs → scim-CcSyfKCH.mjs} +1 -1
  156. package/dist/sdk-ZctLa5jW.mjs +3 -0
  157. package/dist/{secrets-store-BCpFhYFv.mjs → secrets-store-DFmvtphu.mjs} +1 -1
  158. package/dist/security-center-DFKeHq5c.mjs +2 -0
  159. package/dist/{security-txt-Be2Bif0z.mjs → security-txt-DqnFpjMI.mjs} +1 -1
  160. package/dist/{session-Ckt20hHa.mjs → session-D6KHthHf.mjs} +1 -1
  161. package/dist/{share-Bz2tFTUP.mjs → share-BuwYUzOL.mjs} +1 -1
  162. package/dist/{shared-BzPQog8H.mjs → shared-VppSAQf4.mjs} +1 -1
  163. package/dist/{smart-shield-SODkOUyO.mjs → smart-shield-D6X8L7p8.mjs} +2 -2
  164. package/dist/{snippets-B5jY8v_7.mjs → snippets-DIpc9pb_.mjs} +1 -1
  165. package/dist/{spawn-CHkoow5W.mjs → spawn-O1RS01vr.mjs} +2 -2
  166. package/dist/{spectrum-BA0a42eM.mjs → spectrum-b7N1ZRAm.mjs} +1 -1
  167. package/dist/{speed-mmOjxOzo.mjs → speed-cw31yFva.mjs} +1 -1
  168. package/dist/src-D_HETJNy.mjs +108 -0
  169. package/dist/{ssl-Yr6kELqg.mjs → ssl-CsEhRVTO.mjs} +1 -1
  170. package/dist/{state-DZC531l2.mjs → state-Bb5Cbc_L.mjs} +1 -1
  171. package/dist/{stream-Cu0kYWbc.mjs → stream-DFOao6Gu.mjs} +3 -3
  172. package/dist/{submit-Dl_27e0n.mjs → submit--xTzyNPy.mjs} +1 -1
  173. package/dist/{tags-Cdo_Pwtr.mjs → tags-efICDkah.mjs} +1 -1
  174. package/dist/{tenant-EX-ANl6X.mjs → tenant-CerHuToJ.mjs} +1 -1
  175. package/dist/{tenant-custom-nameservers-BPHUeckw.mjs → tenant-custom-nameservers-C4otMBm2.mjs} +1 -1
  176. package/dist/{tools-D2Xxfkrc.mjs → tools-BHfBOZOU.mjs} +1 -1
  177. package/dist/{triggers-Bf9hbP3h.mjs → triggers-BEsiiKAf.mjs} +1 -1
  178. package/dist/{tunnel-CDYkWjnt.mjs → tunnel-DkMiNtVY.mjs} +1 -1
  179. package/dist/{tunnels-CgyX8R2J.mjs → tunnels-D0J8lJoI.mjs} +1 -1
  180. package/dist/{turnstile-BUtzlW-0.mjs → turnstile-CFmtY5bn.mjs} +2 -2
  181. package/dist/{ui-DIpjthrV.mjs → ui-DE8CNn6c.mjs} +1 -1
  182. package/dist/{url-info-CJsa1Oc9.mjs → url-info-DBCeRWwb.mjs} +1 -1
  183. package/dist/{url-normalization-BeKkOZz7.mjs → url-normalization-ClfFiruK.mjs} +1 -1
  184. package/dist/{url-scanner-Cz-yl0_3.mjs → url-scanner-CNyvg65L.mjs} +1 -1
  185. package/dist/{user-BxHjEqpd.mjs → user-bifVEQq5.mjs} +2 -2
  186. package/dist/{values-C43NurfT.mjs → values-OxkdP1tV.mjs} +1 -1
  187. package/dist/{vectorize-CjXfiFH4.mjs → vectorize-CVKu7lEt.mjs} +1 -1
  188. package/dist/{versions-BFbc90Wu.mjs → versions-BVL-Ludh.mjs} +1 -1
  189. package/dist/waiting-rooms-CmRAl51T.mjs +11 -0
  190. package/dist/{web-assets-BzM5vVzy.mjs → web-assets-C2s9kzWf.mjs} +1 -1
  191. package/dist/{web3-Ctv9HGiR.mjs → web3-y_cY91V_.mjs} +1 -1
  192. package/dist/{workers-builds-B44wc67O.mjs → workers-builds-B55-oXOa.mjs} +4 -4
  193. package/dist/{workers-D-YbIedB.mjs → workers-jDcq14GH.mjs} +6 -6
  194. package/dist/{workflows-rFuQWClt.mjs → workflows-B-kGHxFu.mjs} +2 -2
  195. package/dist/{zaraz-BA6kY-b6.mjs → zaraz-27zwjLvv.mjs} +1 -1
  196. package/dist/zero-trust-DV3sIOvu.mjs +92 -0
  197. package/dist/{zone-B_rgejLV.mjs → zone-BJix2KQ9.mjs} +1 -1
  198. package/dist/{zones-DTWO7Vvn.mjs → zones-Bkj5i92c.mjs} +1 -1
  199. package/package.json +1 -1
  200. package/dist/account-tags-65fAlHrf.mjs +0 -9
  201. package/dist/accounts-Bp5KGc6r.mjs +0 -28
  202. package/dist/ai-search-B2l3B_jn.mjs +0 -7
  203. package/dist/analytics-DeIKjC9n.mjs +0 -3
  204. package/dist/argo-DFerMyXF.mjs +0 -2
  205. package/dist/artifacts-CtyEYYDa.mjs +0 -4
  206. package/dist/browser-run-FwtwnBzA.mjs +0 -4
  207. package/dist/cloudforce-one-2PecncfX.mjs +0 -30
  208. package/dist/connector-interrupts-ollUcksZ.mjs +0 -2
  209. package/dist/custom-csrs-DwBrLh-H.mjs +0 -4
  210. package/dist/custom-nameservers-stk7ymnP.mjs +0 -3
  211. package/dist/custom-pages-vfDxrXbt.mjs +0 -4
  212. package/dist/email-CGOC_evd.mjs +0 -2
  213. package/dist/email-routing-QBRPBlyl.mjs +0 -6
  214. package/dist/email-sending-Ddhe7xjN.mjs +0 -7
  215. package/dist/filters-CGisPGD1.mjs +0 -4
  216. package/dist/firewall-DD8U-Brd.mjs +0 -11
  217. package/dist/load-balancers-jRCN75mX.mjs +0 -7
  218. package/dist/logexplorer-kO8CULiK.mjs +0 -24
  219. package/dist/logpush-dtXLu3Ck.mjs +0 -5
  220. package/dist/magic-network-monitoring-CpfkgZMp.mjs +0 -4
  221. package/dist/media-CnxgOViL.mjs +0 -2
  222. package/dist/mesh-CzIPtuaM.mjs +0 -4
  223. package/dist/observability-DXYgDdU5.mjs +0 -4
  224. package/dist/progress-B84wYh91.mjs +0 -2
  225. package/dist/radar-CGNgGh8v.mjs +0 -2
  226. package/dist/realtimekit-BPwzhNS9.mjs +0 -7
  227. package/dist/rulesets-CGaMq8vG.mjs +0 -8
  228. package/dist/sdk-m4xeaua4.mjs +0 -3
  229. package/dist/security-center-BNm4uPVB.mjs +0 -2
  230. package/dist/src-CHW7s5IS.mjs +0 -108
  231. package/dist/waiting-rooms-C5jSQv_r.mjs +0 -11
  232. package/dist/zero-trust-DOFLlUz1.mjs +0 -102
  233. package/dist/zone-tags-BWdza4rH.mjs +0 -9
  234. /package/dist/{Page-C-JHZnIy.mjs → Page-9ry_XAVC.mjs} +0 -0
  235. /package/dist/{alerts-B85uj2Vx.mjs → alerts-CRmjqOZi.mjs} +0 -0
  236. /package/dist/{autorag-Do9l_LyY.mjs → autorag-BD7cu5NU.mjs} +0 -0
  237. /package/dist/{body-parser-CYD7PKFC.mjs → body-parser-C-c9gfH1.mjs} +0 -0
  238. /package/dist/{brands-DateHCdd.mjs → brands-BhALBkX2.mjs} +0 -0
  239. /package/dist/{chunk-6EUZQHAF-l8tR2Qyj.mjs → chunk-6EUZQHAF-B7bSMYLe.mjs} +0 -0
  240. /package/dist/{chunk-Q72B4Q5Z-CPy_WJKU.mjs → chunk-Q72B4Q5Z-DVMMVVEs.mjs} +0 -0
  241. /package/dist/{clear-CB2kgcEB.mjs → clear-BgF8No7D.mjs} +0 -0
  242. /package/dist/{cli-types-BWdZbsFE.mjs → cli-types-BsTty22w.mjs} +0 -0
  243. /package/dist/{domain-info-DJHEt8JJ.mjs → domain-info-C50W5GhA.mjs} +0 -0
  244. /package/dist/{health-buY5f5pp.mjs → health-BFNZqiAm.mjs} +0 -0
  245. /package/dist/{input-validation-BBKJRoRB.mjs → input-validation-Bav2M9F-.mjs} +0 -0
  246. /package/dist/{internal-CwyoJUHh.mjs → internal-BTeSewwB.mjs} +0 -0
  247. /package/dist/{live-wEpA5V_n.mjs → live-Dkiyu30_.mjs} +0 -0
  248. /package/dist/{public-BwQqexwo-DbWj8rrr.mjs → public-BwQqexwo-CNW_dPly.mjs} +0 -0
  249. /package/dist/{rate-limit-analytics-Bf1uT0lT.mjs → rate-limit-analytics-Dz-Wv1T0.mjs} +0 -0
  250. /package/dist/{ready-CBSCPiHE.mjs → ready-TKOkKeRg.mjs} +0 -0
  251. /package/dist/{recent-submissions-Dpmq1f7z.mjs → recent-submissions-3Asm6eIi.mjs} +0 -0
  252. /package/dist/{refute-u7ZPQJZy.mjs → refute-BVz9nMyd.mjs} +0 -0
  253. /package/dist/{resolve-XgxRJ-Ys.mjs → resolve-CeBbH6Pq.mjs} +0 -0
  254. /package/dist/{scan-logo-Ba8WZAyp.mjs → scan-logo-ZteA-PUV.mjs} +0 -0
  255. /package/dist/{scan-page-Bcq3Ei86.mjs → scan-page-DWDSyzQ7.mjs} +0 -0
  256. /package/dist/{search-D9WDwnV4.mjs → search-DGNc37HK.mjs} +0 -0
  257. /package/dist/{signed-url-CjPbG5zV.mjs → signed-url-B5Qpn2mn.mjs} +0 -0
  258. /package/dist/{submission-info-Z9hhp9Rq.mjs → submission-info-FjUolE6A.mjs} +0 -0
  259. /package/dist/{theme-BePJemMn.mjs → theme-CeVf-5qG.mjs} +0 -0
  260. /package/dist/{total-queries-aKAYX1iX.mjs → total-queries-NHJj1HGq.mjs} +0 -0
  261. /package/dist/{tracked-domains-Ck7Jm4Kn.mjs → tracked-domains-CniKVHIp.mjs} +0 -0
  262. /package/dist/{verify-2yi0H93r.mjs → verify-DS1PWAJe.mjs} +0 -0
package/dist/config.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,n as t,o as n,r,t as i}from"./public-BwQqexwo-DbWj8rrr.mjs";export{i as bindings,t as defineSettings,r as defineWorker,e as exports,n as triggers};
2
+ import{i as e,n as t,o as n,r,t as i}from"./public-BwQqexwo-CNW_dPly.mjs";export{i as bindings,t as defineSettings,r as defineWorker,e as exports,n as triggers};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n}from"./oauth-B0ETkNcX.mjs";import{r}from"./auth-MQEamPN9.mjs";import{t as i}from"./output-DrpYYfnB.mjs";import{n as a,t as o}from"./progress-CsHIt3Tp.mjs";import{n as s,t as c}from"./body-parser-C-c9gfH1.mjs";function l(e){return e.positional(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`reboot-purge`,{type:`boolean`,description:`Purge connector state.`}).option(`restart-purge`,{type:`boolean`,description:`Purge connector state.`}).option(`shutdown-purge`,{type:`boolean`,description:`Purge connector state.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Interrupt action for a connector.`})}const u={command:`create <connector-id>`,describe:`Creates an interrupt for a Magic WAN Connector.`,builder:l,handler:async l=>{if(l.dryRun){a({command:`cf connector-interrupts create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${l[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(l[`connector-id`]))}/interrupts`,pathParams:{"connector-id":String(l[`connector-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({reboot:{purge:l[`reboot-purge`]},restart:{purge:l[`restart-purge`]},shutdown:{purge:l[`shutdown-purge`]}}):s(l.body)});return}let u=await r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=s(l.body);i(await o(`Creating`,async()=>u.connectorInterrupts.create({...e,account_id:d,connector_id:l[`connector-id`]})),{successLabel:`Created`});return}let f=c({reboot:{purge:l[`reboot-purge`]},restart:{purge:l[`restart-purge`]},shutdown:{purge:l[`shutdown-purge`]}});i(await o(`Creating`,async()=>u.connectorInterrupts.create({...f,account_id:d,connector_id:l[`connector-id`]})),{successLabel:`Created`})}};function d(e){return e.option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`list`,describe:`Lists interrupts for a Magic WAN Connector.`,builder:d,handler:async s=>{if(s.dryRun){a({command:`cf connector-interrupts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${s[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(s[`connector-id`]))}/interrupts`,pathParams:{"connector-id":String(s[`connector-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.connectorInterrupts.list({account_id:l,connector_id:s[`connector-id`]})),{successLabel:`Loaded`})}},p={command:`connector-interrupts`,describe:`connector-interrupts`,builder:e=>e.command(u).command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{p as default};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n}from"./oauth-BPizUUqP.mjs";import{r}from"./auth-DuLchM18.mjs";import{t as i}from"./output-DgW1hQGX.mjs";import{n as a,t as o}from"./progress-B84wYh91.mjs";function s(e){return e.positional(`event-n`,{type:`string`,description:`Event n`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`event-t`,{type:`string`,description:`Event t`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`get <event-n>`,describe:`Gets Magic WAN Connector Telemetry Event`,builder:s,handler:async s=>{if(s.dryRun){a({command:`cf connector-telemetry-events get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${s[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(s[`connector-id`]))}/telemetry/events/${s[`event-t`]==null?`<event-t>`:encodeURIComponent(String(s[`event-t`]))}.${s[`event-n`]==null?`<event-n>`:encodeURIComponent(String(s[`event-n`]))}`,pathParams:{"connector-id":String(s[`connector-id`]??``),"event-t":String(s[`event-t`]??``),"event-n":String(s[`event-n`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.connectorTelemetryEvents.get({account_id:l,connector_id:s[`connector-id`],event_t:s[`event-t`],event_n:s[`event-n`]})),{successLabel:`Loaded`})}};function l(e){return e.option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`from`,{type:`number`,description:`From`,demandOption:!0}).option(`to`,{type:`number`,description:`To`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`k`,{type:`string`,description:`Filter by event kind`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`list`,describe:`Lists Magic WAN Connector Telemetry Events`,builder:l,handler:async s=>{let c={from:s.from,to:s.to,limit:s.limit,cursor:s.cursor,k:s.k};if(s.dryRun){a({command:`cf connector-telemetry-events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${s[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(s[`connector-id`]))}/telemetry/events`,pathParams:{"connector-id":String(s[`connector-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.connectorTelemetryEvents.list({account_id:u,connector_id:s[`connector-id`],...c})),{successLabel:`Loaded`})}},d={command:`connector-telemetry-events`,describe:`connector-telemetry-events`,builder:e=>e.command(c).command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};
2
+ import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n}from"./oauth-B0ETkNcX.mjs";import{r}from"./auth-MQEamPN9.mjs";import{t as i}from"./output-DrpYYfnB.mjs";import{n as a,t as o}from"./progress-CsHIt3Tp.mjs";function s(e){return e.positional(`event-n`,{type:`string`,description:`Event n`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`event-t`,{type:`string`,description:`Event t`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`get <event-n>`,describe:`Gets Magic WAN Connector Telemetry Event`,builder:s,handler:async s=>{if(s.dryRun){a({command:`cf connector-telemetry-events get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${s[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(s[`connector-id`]))}/telemetry/events/${s[`event-t`]==null?`<event-t>`:encodeURIComponent(String(s[`event-t`]))}.${s[`event-n`]==null?`<event-n>`:encodeURIComponent(String(s[`event-n`]))}`,pathParams:{"connector-id":String(s[`connector-id`]??``),"event-t":String(s[`event-t`]??``),"event-n":String(s[`event-n`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.connectorTelemetryEvents.get({account_id:l,connector_id:s[`connector-id`],event_t:s[`event-t`],event_n:s[`event-n`]})),{successLabel:`Loaded`})}};function l(e){return e.option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`from`,{type:`number`,description:`From`,demandOption:!0}).option(`to`,{type:`number`,description:`To`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`k`,{type:`string`,description:`Filter by event kind`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`list`,describe:`Lists Magic WAN Connector Telemetry Events`,builder:l,handler:async s=>{let c={from:s.from,to:s.to,limit:s.limit,cursor:s.cursor,k:s.k};if(s.dryRun){a({command:`cf connector-telemetry-events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${s[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(s[`connector-id`]))}/telemetry/events`,pathParams:{"connector-id":String(s[`connector-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.connectorTelemetryEvents.list({account_id:u,connector_id:s[`connector-id`],...c})),{successLabel:`Loaded`})}},d={command:`connector-telemetry-events`,describe:`connector-telemetry-events`,builder:e=>e.command(c).command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ const e={command:`connector-telemetry-events-latest`,describe:`connector-telemetry-events-latest`,builder:e=>e.demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{e as default};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n}from"./oauth-BPizUUqP.mjs";import{r}from"./auth-DuLchM18.mjs";import{t as i}from"./output-DgW1hQGX.mjs";import{n as a,t as o}from"./progress-B84wYh91.mjs";function s(e){return e.positional(`snapshot-t`,{type:`string`,description:`Snapshot t`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`get <snapshot-t>`,describe:`Gets Magic WAN Connector Telemetry Snapshot`,builder:s,handler:async s=>{if(s.dryRun){a({command:`cf connector-telemetry-snapshots get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${s[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(s[`connector-id`]))}/telemetry/snapshots/${s[`snapshot-t`]==null?`<snapshot-t>`:encodeURIComponent(String(s[`snapshot-t`]))}`,pathParams:{"connector-id":String(s[`connector-id`]??``),"snapshot-t":String(s[`snapshot-t`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.connectorTelemetrySnapshots.get({account_id:l,connector_id:s[`connector-id`],snapshot_t:s[`snapshot-t`]})),{successLabel:`Loaded`})}};function l(e){return e.option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`from`,{type:`number`,description:`From`,demandOption:!0}).option(`to`,{type:`number`,description:`To`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`list`,describe:`Lists Magic WAN Connector Telemetry Snapshots`,builder:l,handler:async s=>{let c={from:s.from,to:s.to,limit:s.limit,cursor:s.cursor};if(s.dryRun){a({command:`cf connector-telemetry-snapshots list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${s[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(s[`connector-id`]))}/telemetry/snapshots`,pathParams:{"connector-id":String(s[`connector-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.connectorTelemetrySnapshots.list({account_id:u,connector_id:s[`connector-id`],...c})),{successLabel:`Loaded`})}},d={command:`connector-telemetry-snapshots`,describe:`connector-telemetry-snapshots`,builder:e=>e.command(c).command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};
2
+ import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n}from"./oauth-B0ETkNcX.mjs";import{r}from"./auth-MQEamPN9.mjs";import{t as i}from"./output-DrpYYfnB.mjs";import{n as a,t as o}from"./progress-CsHIt3Tp.mjs";function s(e){return e.positional(`snapshot-t`,{type:`string`,description:`Snapshot t`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`get <snapshot-t>`,describe:`Gets Magic WAN Connector Telemetry Snapshot`,builder:s,handler:async s=>{if(s.dryRun){a({command:`cf connector-telemetry-snapshots get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${s[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(s[`connector-id`]))}/telemetry/snapshots/${s[`snapshot-t`]==null?`<snapshot-t>`:encodeURIComponent(String(s[`snapshot-t`]))}`,pathParams:{"connector-id":String(s[`connector-id`]??``),"snapshot-t":String(s[`snapshot-t`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.connectorTelemetrySnapshots.get({account_id:l,connector_id:s[`connector-id`],snapshot_t:s[`snapshot-t`]})),{successLabel:`Loaded`})}};function l(e){return e.option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`from`,{type:`number`,description:`From`,demandOption:!0}).option(`to`,{type:`number`,description:`To`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`list`,describe:`Lists Magic WAN Connector Telemetry Snapshots`,builder:l,handler:async s=>{let c={from:s.from,to:s.to,limit:s.limit,cursor:s.cursor};if(s.dryRun){a({command:`cf connector-telemetry-snapshots list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${s[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(s[`connector-id`]))}/telemetry/snapshots`,pathParams:{"connector-id":String(s[`connector-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.connectorTelemetrySnapshots.list({account_id:u,connector_id:s[`connector-id`],...c})),{successLabel:`Loaded`})}},d={command:`connector-telemetry-snapshots`,describe:`connector-telemetry-snapshots`,builder:e=>e.command(c).command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ const e={command:`connector-telemetry-snapshots-latest`,describe:`connector-telemetry-snapshots-latest`,builder:e=>e.demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{e as default};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n}from"./oauth-BPizUUqP.mjs";import{r}from"./auth-DuLchM18.mjs";import{t as i}from"./output-DgW1hQGX.mjs";import{n as a,t as o}from"./progress-B84wYh91.mjs";import{n as s,t as c}from"./body-parser-CYD7PKFC.mjs";import{n as l}from"./input-validation-BBKJRoRB.mjs";import{n as u}from"./prompt-CDtLWxNv.mjs";import{t as d}from"./cli-types-BWdZbsFE.mjs";function f(e){return e.option(`device-id`,{type:`string`,description:`The device.id field`}).option(`device-provision-license`,{type:`boolean`,description:`When true, create and provision a new licence key for the connector.`}).option(`device-serial-number`,{type:`string`,description:`The device.serial_number field`}).option(`activated`,{type:`boolean`,description:`The activated field`}).option(`interrupt-window-days-of-week`,{type:`string`,array:!0,description:`Allowed days of the week for upgrades. Default is all days.`}).option(`interrupt-window-duration-hours`,{type:`number`,description:`The interrupt_window_duration_hours field`}).option(`interrupt-window-embargo-dates`,{type:`string`,array:!0,description:`List of dates (YYYY-MM-DD) when upgrades are blocked.`}).option(`interrupt-window-hour-of-day`,{type:`number`,description:`The interrupt_window_hour_of_day field`}).option(`notes`,{type:`string`,description:`The notes field`}).option(`primary`,{type:`boolean`,description:`The primary field`,default:!0}).option(`site-id`,{type:`string`,description:`The site_id field`}).option(`timezone`,{type:`string`,description:`The timezone field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`create`,describe:`Creates a Magic WAN Connector.`,builder:f,handler:async u=>{if(u.dryRun){a({command:`cf connectors create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors`,pathParams:{},bodyKind:`json`,body:u.body===void 0?c({device:{id:l(u[`device-id`],`device-id`,`text`),provision_license:u[`device-provision-license`],serial_number:l(u[`device-serial-number`],`device-serial-number`,`text`)},activated:u.activated,interrupt_window_days_of_week:u[`interrupt-window-days-of-week`],interrupt_window_duration_hours:u[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:u[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:u[`interrupt-window-hour-of-day`],notes:l(u.notes,`notes`,`text`),primary:u.primary,site_id:l(u[`site-id`],`site-id`,`text`),timezone:l(u.timezone,`timezone`,`text`)}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Creating`,async()=>d.connectors.create({...e,account_id:f})),{successLabel:`Created`});return}let p=c({device:{id:l(u[`device-id`],`device-id`,`text`),provision_license:u[`device-provision-license`],serial_number:l(u[`device-serial-number`],`device-serial-number`,`text`)},activated:u.activated,interrupt_window_days_of_week:u[`interrupt-window-days-of-week`],interrupt_window_duration_hours:u[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:u[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:u[`interrupt-window-hour-of-day`],notes:l(u.notes,`notes`,`text`),primary:u.primary,site_id:l(u[`site-id`],`site-id`,`text`),timezone:l(u.timezone,`timezone`,`text`)});i(await o(`Creating`,async()=>d.connectors.create({...p,account_id:f})),{successLabel:`Created`})}};function m(e){return e.positional(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const h={command:`delete <connector-id>`,describe:`Deletes a Magic WAN Connector.`,builder:m,handler:async s=>{if(s.dryRun){a({command:`cf connectors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${s[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(s[`connector-id`]))}`,pathParams:{"connector-id":String(s[`connector-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await u({force:!!s.force})){process.stderr.write(`Aborted.
2
+ import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n}from"./oauth-B0ETkNcX.mjs";import{r}from"./auth-MQEamPN9.mjs";import{t as i}from"./output-DrpYYfnB.mjs";import{n as a,t as o}from"./progress-CsHIt3Tp.mjs";import{n as s,t as c}from"./body-parser-C-c9gfH1.mjs";import{n as l}from"./input-validation-Bav2M9F-.mjs";import{n as u}from"./prompt-DdegNPpg.mjs";import{t as d}from"./cli-types-BsTty22w.mjs";function f(e){return e.option(`device-id`,{type:`string`,description:`The device.id field`}).option(`device-provision-license`,{type:`boolean`,description:`When true, create and provision a new licence key for the connector.`}).option(`device-serial-number`,{type:`string`,description:`The device.serial_number field`}).option(`activated`,{type:`boolean`,description:`The activated field`}).option(`interrupt-window-days-of-week`,{type:`string`,array:!0,description:`Allowed days of the week for upgrades. Default is all days.`}).option(`interrupt-window-duration-hours`,{type:`number`,description:`The interrupt_window_duration_hours field`}).option(`interrupt-window-embargo-dates`,{type:`string`,array:!0,description:`List of dates (YYYY-MM-DD) when upgrades are blocked.`}).option(`interrupt-window-hour-of-day`,{type:`number`,description:`The interrupt_window_hour_of_day field`}).option(`notes`,{type:`string`,description:`The notes field`}).option(`primary`,{type:`boolean`,description:`The primary field`,default:!0}).option(`site-id`,{type:`string`,description:`The site_id field`}).option(`timezone`,{type:`string`,description:`The timezone field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`create`,describe:`Creates a Magic WAN Connector.`,builder:f,handler:async u=>{if(u.dryRun){a({command:`cf connectors create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors`,pathParams:{},bodyKind:`json`,body:u.body===void 0?c({device:{id:l(u[`device-id`],`device-id`,`text`),provision_license:u[`device-provision-license`],serial_number:l(u[`device-serial-number`],`device-serial-number`,`text`)},activated:u.activated,interrupt_window_days_of_week:u[`interrupt-window-days-of-week`],interrupt_window_duration_hours:u[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:u[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:u[`interrupt-window-hour-of-day`],notes:l(u.notes,`notes`,`text`),primary:u.primary,site_id:l(u[`site-id`],`site-id`,`text`),timezone:l(u.timezone,`timezone`,`text`)}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Creating`,async()=>d.connectors.create({...e,account_id:f})),{successLabel:`Created`});return}let p=c({device:{id:l(u[`device-id`],`device-id`,`text`),provision_license:u[`device-provision-license`],serial_number:l(u[`device-serial-number`],`device-serial-number`,`text`)},activated:u.activated,interrupt_window_days_of_week:u[`interrupt-window-days-of-week`],interrupt_window_duration_hours:u[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:u[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:u[`interrupt-window-hour-of-day`],notes:l(u.notes,`notes`,`text`),primary:u.primary,site_id:l(u[`site-id`],`site-id`,`text`),timezone:l(u.timezone,`timezone`,`text`)});i(await o(`Creating`,async()=>d.connectors.create({...p,account_id:f})),{successLabel:`Created`})}};function m(e){return e.positional(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const h={command:`delete <connector-id>`,describe:`Deletes a Magic WAN Connector.`,builder:m,handler:async s=>{if(s.dryRun){a({command:`cf connectors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${s[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(s[`connector-id`]))}`,pathParams:{"connector-id":String(s[`connector-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await u({force:!!s.force})){process.stderr.write(`Aborted.
3
3
  `);return}i(await o(`Deleting`,async()=>c.connectors.delete({account_id:l,connector_id:s[`connector-id`]})),{successLabel:`Deleted`})}};function g(e){return e.positional(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`activated`,{type:`boolean`,description:`The activated field`}).option(`interrupt-window-days-of-week`,{type:`string`,array:!0,description:`Allowed days of the week for upgrades. Default is all days.`}).option(`interrupt-window-duration-hours`,{type:`number`,description:`The interrupt_window_duration_hours field`}).option(`interrupt-window-embargo-dates`,{type:`string`,array:!0,description:`List of dates (YYYY-MM-DD) when upgrades are blocked.`}).option(`interrupt-window-hour-of-day`,{type:`number`,description:`The interrupt_window_hour_of_day field`}).option(`notes`,{type:`string`,description:`The notes field`}).option(`primary`,{type:`boolean`,description:`The primary field`}).option(`site-id`,{type:`string`,description:`The site_id field`}).option(`timezone`,{type:`string`,description:`The timezone field`}).option(`provision-license`,{type:`boolean`,description:`When true, regenerate license key for the connector.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`edit <connector-id>`,describe:`Edits properties of a Magic WAN Connector. May be used to re-provision a license key.`,builder:g,handler:async u=>{if(u.dryRun){a({command:`cf connectors edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${u[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(u[`connector-id`]))}`,pathParams:{"connector-id":String(u[`connector-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({activated:u.activated,interrupt_window_days_of_week:u[`interrupt-window-days-of-week`],interrupt_window_duration_hours:u[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:u[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:u[`interrupt-window-hour-of-day`],notes:l(u.notes,`notes`,`text`),primary:u.primary,site_id:l(u[`site-id`],`site-id`,`text`),timezone:l(u.timezone,`timezone`,`text`),provision_license:u[`provision-license`]}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Updating`,async()=>d.connectors.edit({...e,account_id:f,connector_id:u[`connector-id`]})),{successLabel:`Updated`});return}let p=c({activated:u.activated,interrupt_window_days_of_week:u[`interrupt-window-days-of-week`],interrupt_window_duration_hours:u[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:u[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:u[`interrupt-window-hour-of-day`],notes:l(u.notes,`notes`,`text`),primary:u.primary,site_id:l(u[`site-id`],`site-id`,`text`),timezone:l(u.timezone,`timezone`,`text`),provision_license:u[`provision-license`]});i(await o(`Updating`,async()=>d.connectors.edit({...p,account_id:f,connector_id:u[`connector-id`]})),{successLabel:`Updated`})}};function v(e){return e.positional(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <connector-id>`,describe:`Gets a Magic WAN Connector.`,builder:v,handler:async s=>{if(s.dryRun){a({command:`cf connectors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${s[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(s[`connector-id`]))}`,pathParams:{"connector-id":String(s[`connector-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.connectors.get({account_id:l,connector_id:s[`connector-id`]})),{successLabel:`Loaded`})}};function b(e){return e.option(`device-type`,{type:`string`,description:`Filter connectors by device type.`,choices:[`MANAGED`,`LICENSED`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`Lists Magic WAN Connectors.`,builder:d(b),handler:async s=>{let c={device_type:s[`device-type`]};if(s.dryRun){a({command:`cf connectors list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.connectors.list({account_id:u,...c})),{successLabel:`Loaded`})}};function S(e){return e.positional(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`activated`,{type:`boolean`,description:`The activated field`}).option(`interrupt-window-days-of-week`,{type:`string`,array:!0,description:`Allowed days of the week for upgrades. Default is all days.`}).option(`interrupt-window-duration-hours`,{type:`number`,description:`The interrupt_window_duration_hours field`}).option(`interrupt-window-embargo-dates`,{type:`string`,array:!0,description:`List of dates (YYYY-MM-DD) when upgrades are blocked.`}).option(`interrupt-window-hour-of-day`,{type:`number`,description:`The interrupt_window_hour_of_day field`}).option(`notes`,{type:`string`,description:`The notes field`}).option(`primary`,{type:`boolean`,description:`The primary field`}).option(`site-id`,{type:`string`,description:`The site_id field`}).option(`timezone`,{type:`string`,description:`The timezone field`}).option(`provision-license`,{type:`boolean`,description:`When true, regenerate license key for the connector.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`update <connector-id>`,describe:`Updates properties of a Magic WAN Connector. May be used to re-provision a license key.`,builder:S,handler:async u=>{if(u.dryRun){a({command:`cf connectors update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${u[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(u[`connector-id`]))}`,pathParams:{"connector-id":String(u[`connector-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({activated:u.activated,interrupt_window_days_of_week:u[`interrupt-window-days-of-week`],interrupt_window_duration_hours:u[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:u[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:u[`interrupt-window-hour-of-day`],notes:l(u.notes,`notes`,`text`),primary:u.primary,site_id:l(u[`site-id`],`site-id`,`text`),timezone:l(u.timezone,`timezone`,`text`),provision_license:u[`provision-license`]}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Updating`,async()=>d.connectors.update({...e,account_id:f,connector_id:u[`connector-id`]})),{successLabel:`Updated`});return}let p=c({activated:u.activated,interrupt_window_days_of_week:u[`interrupt-window-days-of-week`],interrupt_window_duration_hours:u[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:u[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:u[`interrupt-window-hour-of-day`],notes:l(u.notes,`notes`,`text`),primary:u.primary,site_id:l(u[`site-id`],`site-id`,`text`),timezone:l(u.timezone,`timezone`,`text`),provision_license:u[`provision-license`]});i(await o(`Updating`,async()=>d.connectors.update({...p,account_id:f,connector_id:u[`connector-id`]})),{successLabel:`Updated`})}},w={command:`connectors`,describe:`connectors`,builder:e=>e.command(p).command(h).command(_).command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n}from"./oauth-BPizUUqP.mjs";import{r}from"./auth-DuLchM18.mjs";import{t as i}from"./output-DgW1hQGX.mjs";import{n as a,t as o}from"./progress-B84wYh91.mjs";import{n as s,t as c}from"./body-parser-CYD7PKFC.mjs";import{n as l}from"./input-validation-BBKJRoRB.mjs";import{a as u,i as d,n as f}from"./prompt-CDtLWxNv.mjs";function p(e){return e.option(`configuration-command`,{type:`string`,array:!0,description:`The command that runs when the container starts, passed to the entrypoint.
2
+ import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n}from"./oauth-B0ETkNcX.mjs";import{r}from"./auth-MQEamPN9.mjs";import{t as i}from"./output-DrpYYfnB.mjs";import{n as a,t as o}from"./progress-CsHIt3Tp.mjs";import{n as s,t as c}from"./body-parser-C-c9gfH1.mjs";import{n as l}from"./input-validation-Bav2M9F-.mjs";import{a as u,i as d,n as f}from"./prompt-DdegNPpg.mjs";import{t as p}from"./cli-types-BsTty22w.mjs";function m(e){return e.option(`configuration-command`,{type:`string`,array:!0,description:`The command that runs when the container starts, passed to the entrypoint.
3
3
  You can override this at run-time. If you override only the command,
4
4
  it gets passed to the default entrypoint specified in the image.
5
5
  `}).option(`configuration-entrypoint`,{type:`string`,array:!0,description:`The entry point for the container, specifying the executable to run when the container starts.
@@ -13,15 +13,15 @@ Specify both entrypoint and command at run-time to completely replace the image
13
13
  - "standard-2": 1 vCPU, 6 GiB memory, 12 GB disk
14
14
  - "standard-3": 2 vCPU, 8 GiB memory, 16 GB disk
15
15
  - "standard-4": 4 vCPU, 12 GiB memory, 20 GB disk
16
- `,default:`lite`}).option(`configuration-observability-logs-enabled`,{type:`boolean`,description:`The configuration.observability.logs.enabled field`,default:!1}).option(`constraints-jurisdiction`,{type:`string`,description:`Currently supports only "eu" and "fedramp". Overlap between jurisdiction and region is allowed for ENAM, WNAM (FedRAMP) and EEUR, WEUR (EU).`}).option(`constraints-regions`,{type:`string`,array:!0,description:`The constraints.regions field`}).option(`instances`,{type:`number`,description:`The initial number of deployments to create.`}).option(`max-instances`,{type:`number`,description:`Sets the maximum number of instances that the application can run.`}).option(`name`,{type:`string`,description:`The name for this application.`}).option(`observability-logs-enabled`,{type:`boolean`,description:`The observability.logs.enabled field`,default:!1}).option(`rollout-active-grace-period`,{type:`number`,description:`Grace period for active instances to stay alive before becoming eligible for shutdown signal due to a rollout, in seconds.
16
+ `}).option(`configuration-observability-logs-enabled`,{type:`boolean`,description:`The configuration.observability.logs.enabled field`}).option(`constraints-jurisdiction`,{type:`string`,description:`Currently supports only "eu" and "fedramp". Overlap between jurisdiction and region is allowed for ENAM, WNAM (FedRAMP) and EEUR, WEUR (EU).`}).option(`constraints-regions`,{type:`string`,array:!0,description:`The constraints.regions field`}).option(`instances`,{type:`number`,description:`The initial number of deployments to create.`}).option(`max-instances`,{type:`number`,description:`Sets the maximum number of instances that the application can run.`}).option(`name`,{type:`string`,description:`The name for this application.`}).option(`observability-logs-enabled`,{type:`boolean`,description:`The observability.logs.enabled field`}).option(`rollout-active-grace-period`,{type:`number`,description:`Grace period for active instances to stay alive before becoming eligible for shutdown signal due to a rollout, in seconds.
17
17
  Defaults to 0.
18
18
  `,default:0}).option(`scheduling-policy`,{type:`string`,description:`Selects a scheduler-backed application. Use \`default\` when the Containers
19
19
  scheduler should maintain the requested number of instances and manage deployment
20
20
  configuration, placement, scaling, versions, and rollouts.
21
- `,choices:[`default`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Create a Containers application. Set `scheduling_policy` to `default` for a scheduler-backed application with deployment configuration, instance counts, constraints, versions, and rollouts. Set it to `durable_object` for a Durable Object-managed application where each Durable Object creates and manages the lifecycle of its container instance. For `durable_object` requests, supply only `name`, `scheduling_policy`, and `durable_objects`. "}).implies(`instances`,[`max-instances`]).implies(`max-instances`,[`instances`]).check(e=>{if([`configuration-command`,`configuration-entrypoint`,`configuration-image`].some(t=>e[t]!==void 0)){let t=[`configuration-image`].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 --configuration-* flag is set`)}return!0})}const m={command:`create`,describe:'Create a Containers application. Use `scheduling_policy: "default"` for a scheduler-backed application. The Containers scheduler maintains the requested instance count and manages deployment configuration, placement, scaling, versions, and rollouts. Use `scheduling_policy: "durable_object"` for a Durable Object-managed application. Each Durable Object creates and manages the lifecycle of its container instance. This request accepts only `name`, `scheduling_policy`, and `durable_objects`. Application-level configuration, scaling, constraints, versions, and rollouts do not apply.',builder:p,handler:async f=>{if(f.dryRun){a({command:`cf containers applications create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications`,pathParams:{},bodyKind:`json`,body:f.body===void 0?c({configuration:{command:f[`configuration-command`],entrypoint:f[`configuration-entrypoint`],image:l(f[`configuration-image`],`configuration-image`,`text`),instance_type:l(f[`configuration-instance-type`],`configuration-instance-type`,`text`),observability:{logs:{enabled:f[`configuration-observability-logs-enabled`]}}},constraints:{jurisdiction:l(f[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:f[`constraints-regions`]},instances:f.instances,max_instances:f[`max-instances`],name:l(f.name,`name`,`text`),observability:{logs:{enabled:f[`observability-logs-enabled`]}},rollout_active_grace_period:f[`rollout-active-grace-period`],scheduling_policy:l(f[`scheduling-policy`],`scheduling-policy`,`text`)}):s(f.body)});return}let p=await r(f),m=f.local?e:await t();if(f.accountId=m,f.body){let e=s(f.body);i(await o(`Creating`,async()=>p.containers.applications.create({body:e,account_id:m})),{successLabel:`Created`});return}f.name===void 0&&(f.name=await u(`name`,`The name for this application.`)),f[`scheduling-policy`]===void 0&&(f[`scheduling-policy`]=await d(`scheduling-policy`,"Selects a scheduler-backed application. Use `default` when the Containers scheduler should maintain the requested number of instances and manage deployment configuration, placement, scaling, versions, and rollouts. ",[`default`]));let h=c({configuration:{command:f[`configuration-command`],entrypoint:f[`configuration-entrypoint`],image:l(f[`configuration-image`],`configuration-image`,`text`),instance_type:l(f[`configuration-instance-type`],`configuration-instance-type`,`text`),observability:{logs:{enabled:f[`configuration-observability-logs-enabled`]}}},constraints:{jurisdiction:l(f[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:f[`constraints-regions`]},instances:f.instances,max_instances:f[`max-instances`],name:l(f.name,`name`,`text`),observability:{logs:{enabled:f[`observability-logs-enabled`]}},rollout_active_grace_period:f[`rollout-active-grace-period`],scheduling_policy:l(f[`scheduling-policy`],`scheduling-policy`,`text`)});i(await o(`Creating`,async()=>p.containers.applications.create({body:h,account_id:m})),{successLabel:`Created`})}};function h(e){return e.positional(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,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 g={command:`delete <application-id>`,describe:`Deletes a single application by id.`,builder:h,handler:async s=>{if(s.dryRun){a({command:`cf containers applications delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications/${s[`application-id`]==null?`<application-id>`:encodeURIComponent(String(s[`application-id`]))}`,pathParams:{"application-id":String(s[`application-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`This operation permanently deletes the application and stops its containers.`})){process.stderr.write(`Aborted.
22
- `);return}i(await o(`Deleting`,async()=>c.containers.applications.delete({account_id:l,application_id:s[`application-id`]})),{successLabel:`Deleted`})}};function _(e){return e.positional(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`constraints-jurisdiction`,{type:`string`,description:`Currently supports only "eu" and "fedramp". Overlap between jurisdiction and region is allowed for ENAM, WNAM (FedRAMP) and EEUR, WEUR (EU).`}).option(`constraints-regions`,{type:`string`,array:!0,description:`The constraints.regions field`}).option(`max-instances`,{type:`number`,description:`Maximum number of instances that an autoscaling application can run.`}).option(`observability-logs-enabled`,{type:`boolean`,description:`The observability.logs.enabled field`}).option(`rollout-active-grace-period`,{type:`number`,description:`Grace period for active instances to stay alive before becoming eligible for shutdown signal due to a rollout, in seconds.
21
+ `,choices:[`default`,`durable_object`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Create a Containers application. Set `scheduling_policy` to `default` for a scheduler-backed application with deployment configuration, instance counts, constraints, versions, and rollouts. Set it to `durable_object` for a Durable Object-managed application where each Durable Object creates and manages the lifecycle of its container instance. For `durable_object` requests, supply only `name`, `scheduling_policy`, and `durable_objects`. "}).implies(`instances`,[`max-instances`]).implies(`max-instances`,[`instances`]).check(e=>{if([`configuration-command`,`configuration-entrypoint`,`configuration-image`,`configuration-instance-type`,`configuration-observability-logs-enabled`].some(t=>e[t]!==void 0)){let t=[`configuration-image`].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 --configuration-* flag is set`)}return!0})}const h={command:`create`,describe:'Create a Containers application. Use `scheduling_policy: "default"` for a scheduler-backed application. The Containers scheduler maintains the requested instance count and manages deployment configuration, placement, scaling, versions, and rollouts. Use `scheduling_policy: "durable_object"` for a Durable Object-managed application. Each Durable Object creates and manages the lifecycle of its container instance. This request accepts only `name`, `scheduling_policy`, and `durable_objects`. Application-level configuration, scaling, constraints, versions, and rollouts do not apply.',builder:m,handler:async f=>{if(f.dryRun){a({command:`cf containers applications create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications`,pathParams:{},bodyKind:`json`,body:f.body===void 0?c({configuration:{command:f[`configuration-command`],entrypoint:f[`configuration-entrypoint`],image:l(f[`configuration-image`],`configuration-image`,`text`),instance_type:l(f[`configuration-instance-type`],`configuration-instance-type`,`text`),observability:{logs:{enabled:f[`configuration-observability-logs-enabled`]}}},constraints:{jurisdiction:l(f[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:f[`constraints-regions`]},instances:f.instances,max_instances:f[`max-instances`],name:l(f.name,`name`,`text`),observability:{logs:{enabled:f[`observability-logs-enabled`]}},rollout_active_grace_period:f[`rollout-active-grace-period`],scheduling_policy:l(f[`scheduling-policy`],`scheduling-policy`,`text`)}):s(f.body)});return}let p=await r(f),m=f.local?e:await t();if(f.accountId=m,f.body){let e=s(f.body);i(await o(`Creating`,async()=>p.containers.applications.create({body:e,account_id:m})),{successLabel:`Created`});return}f.name===void 0&&(f.name=await u(`name`,`The name for this application.`)),f[`scheduling-policy`]===void 0&&(f[`scheduling-policy`]=await d(`scheduling-policy`,"Selects a scheduler-backed application. Use `default` when the Containers scheduler should maintain the requested number of instances and manage deployment configuration, placement, scaling, versions, and rollouts. ",[`default`,`durable_object`]));let h=c({configuration:{command:f[`configuration-command`],entrypoint:f[`configuration-entrypoint`],image:l(f[`configuration-image`],`configuration-image`,`text`),instance_type:l(f[`configuration-instance-type`],`configuration-instance-type`,`text`),observability:{logs:{enabled:f[`configuration-observability-logs-enabled`]}}},constraints:{jurisdiction:l(f[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:f[`constraints-regions`]},instances:f.instances,max_instances:f[`max-instances`],name:l(f.name,`name`,`text`),observability:{logs:{enabled:f[`observability-logs-enabled`]}},rollout_active_grace_period:f[`rollout-active-grace-period`],scheduling_policy:l(f[`scheduling-policy`],`scheduling-policy`,`text`)});i(await o(`Creating`,async()=>p.containers.applications.create({body:h,account_id:m})),{successLabel:`Created`})}};function g(e){return e.positional(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _={command:`delete <application-id>`,describe:`Deletes a single application by id.`,builder:g,handler:async s=>{if(s.dryRun){a({command:`cf containers applications delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications/${s[`application-id`]==null?`<application-id>`:encodeURIComponent(String(s[`application-id`]))}`,pathParams:{"application-id":String(s[`application-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`This operation permanently deletes the application and stops its containers.`})){process.stderr.write(`Aborted.
22
+ `);return}i(await o(`Deleting`,async()=>c.containers.applications.delete({account_id:l,application_id:s[`application-id`]})),{successLabel:`Deleted`})}};function v(e){return e.positional(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`constraints-jurisdiction`,{type:`string`,description:`Currently supports only "eu" and "fedramp". Overlap between jurisdiction and region is allowed for ENAM, WNAM (FedRAMP) and EEUR, WEUR (EU).`}).option(`constraints-regions`,{type:`string`,array:!0,description:`The constraints.regions field`}).option(`max-instances`,{type:`number`,description:`Maximum number of instances that an autoscaling application can run.`}).option(`observability-logs-enabled`,{type:`boolean`,description:`The observability.logs.enabled field`}).option(`rollout-active-grace-period`,{type:`number`,description:`Grace period for active instances to stay alive before becoming eligible for shutdown signal due to a rollout, in seconds.
23
23
  Defaults to 0.
24
- `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for modifying a Containers application without replacing its instances. Deployment configuration changes such as image, resource allocation, command, and environment variables require an application rollout. `})}const v={command:`edit <application-id>`,describe:`Modifies a single application by id. Changes that replace instance deployment configuration, including the image, must be applied with a rollout.`,builder:_,handler:async u=>{if(u.dryRun){a({command:`cf containers applications edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications/${u[`application-id`]==null?`<application-id>`:encodeURIComponent(String(u[`application-id`]))}`,pathParams:{"application-id":String(u[`application-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({constraints:{jurisdiction:l(u[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:u[`constraints-regions`]},max_instances:u[`max-instances`],observability:{logs:{enabled:u[`observability-logs-enabled`]}},rollout_active_grace_period:u[`rollout-active-grace-period`]}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Updating`,async()=>d.containers.applications.edit({...e,account_id:f,application_id:u[`application-id`]})),{successLabel:`Updated`});return}let p=c({constraints:{jurisdiction:l(u[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:u[`constraints-regions`]},max_instances:u[`max-instances`],observability:{logs:{enabled:u[`observability-logs-enabled`]}},rollout_active_grace_period:u[`rollout-active-grace-period`]});i(await o(`Updating`,async()=>d.containers.applications.edit({...p,account_id:f,application_id:u[`application-id`]})),{successLabel:`Updated`})}};function y(e){return e.positional(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <application-id>`,describe:`Returns a single application by id.`,builder:y,handler:async s=>{if(s.dryRun){a({command:`cf containers applications get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications/${s[`application-id`]==null?`<application-id>`:encodeURIComponent(String(s[`application-id`]))}`,pathParams:{"application-id":String(s[`application-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.containers.applications.get({account_id:l,application_id:s[`application-id`]})),{successLabel:`Loaded`})}};function x(e){return e.positional(`instance-id`,{type:`string`,description:`A container instance ID (64-character hex Durable Object actor ID).`,demandOption:!0}).option(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <instance-id>`,describe:`Returns a container instance belonging to an application.`,builder:x,handler:async s=>{if(s.dryRun){a({command:`cf containers applications instances get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications/${s[`application-id`]==null?`<application-id>`:encodeURIComponent(String(s[`application-id`]))}/instances/${s[`instance-id`]==null?`<instance-id>`:encodeURIComponent(String(s[`instance-id`]))}`,pathParams:{"application-id":String(s[`application-id`]??``),"instance-id":String(s[`instance-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.containers.applications.instances.get({account_id:l,application_id:s[`application-id`],instance_id:s[`instance-id`]})),{successLabel:`Loaded`})}};function C(e){return e.option(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Maximum number of instances to return per page. Defaults to all.`}).option(`page-token`,{type:`string`,description:`Opaque token from a previous response to retrieve the next page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`list`,describe:`Lists container instances belonging to an application.`,builder:C,handler:async s=>{let c={per_page:s[`per-page`],page_token:s[`page-token`]};if(s.dryRun){a({command:`cf containers applications instances list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications/${s[`application-id`]==null?`<application-id>`:encodeURIComponent(String(s[`application-id`]))}/instances`,pathParams:{"application-id":String(s[`application-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.containers.applications.instances.list({account_id:u,application_id:s[`application-id`],...c})),{successLabel:`Loaded`})}},T={command:`instances`,describe:`Inspect Containers instances belonging to applications`,builder:e=>e.command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.option(`name`,{type:`string`,description:`Filter applications by name.`}).option(`image`,{type:`string`,description:`Filter applications by image.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`Lists all the applications that are associated with your account.`,builder:E,handler:async s=>{let c={name:s.name,image:s.image};if(s.dryRun){a({command:`cf containers applications list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.containers.applications.list({account_id:u,...c})),{successLabel:`Loaded`})}};function O(e){return e.positional(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`description`,{type:`string`,description:`Description of the rollout process.`}).option(`kind`,{type:`string`,description:`Kind of the rollout process. Defaults to "full_auto".
24
+ `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for modifying a Containers application without replacing its instances. Deployment configuration changes such as image, resource allocation, command, and environment variables require an application rollout. `})}const y={command:`edit <application-id>`,describe:`Modifies a single application by id. Changes that replace instance deployment configuration, including the image, must be applied with a rollout.`,builder:v,handler:async u=>{if(u.dryRun){a({command:`cf containers applications edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications/${u[`application-id`]==null?`<application-id>`:encodeURIComponent(String(u[`application-id`]))}`,pathParams:{"application-id":String(u[`application-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({constraints:{jurisdiction:l(u[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:u[`constraints-regions`]},max_instances:u[`max-instances`],observability:{logs:{enabled:u[`observability-logs-enabled`]}},rollout_active_grace_period:u[`rollout-active-grace-period`]}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Updating`,async()=>d.containers.applications.edit({...e,account_id:f,application_id:u[`application-id`]})),{successLabel:`Updated`});return}let p=c({constraints:{jurisdiction:l(u[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:u[`constraints-regions`]},max_instances:u[`max-instances`],observability:{logs:{enabled:u[`observability-logs-enabled`]}},rollout_active_grace_period:u[`rollout-active-grace-period`]});i(await o(`Updating`,async()=>d.containers.applications.edit({...p,account_id:f,application_id:u[`application-id`]})),{successLabel:`Updated`})}};function b(e){return e.positional(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <application-id>`,describe:`Returns a single application by id.`,builder:b,handler:async s=>{if(s.dryRun){a({command:`cf containers applications get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications/${s[`application-id`]==null?`<application-id>`:encodeURIComponent(String(s[`application-id`]))}`,pathParams:{"application-id":String(s[`application-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.containers.applications.get({account_id:l,application_id:s[`application-id`]})),{successLabel:`Loaded`})}};function S(e){return e.positional(`instance-id`,{type:`string`,description:`A container instance ID (64-character hex Durable Object actor ID).`,demandOption:!0}).option(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <instance-id>`,describe:`Returns a container instance belonging to an application.`,builder:S,handler:async s=>{if(s.dryRun){a({command:`cf containers applications instances get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications/${s[`application-id`]==null?`<application-id>`:encodeURIComponent(String(s[`application-id`]))}/instances/${s[`instance-id`]==null?`<instance-id>`:encodeURIComponent(String(s[`instance-id`]))}`,pathParams:{"application-id":String(s[`application-id`]??``),"instance-id":String(s[`instance-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.containers.applications.instances.get({account_id:l,application_id:s[`application-id`],instance_id:s[`instance-id`]})),{successLabel:`Loaded`})}};function w(e){return e.option(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Maximum number of instances to return per page. Defaults to all.`}).option(`page-token`,{type:`string`,description:`Opaque token from a previous response to retrieve the next page.`}).option(`state`,{type:`string`,description:"Filters instances by lifecycle state. `active` includes provisioning, running, and stopping instances; `not-active` includes stopped and failed instances. When omitted, all instances are returned.",choices:[`active`,`not-active`]}).option(`name-prefix`,{type:`string`,description:`Filter instances by a case-sensitive name prefix. Keep the same prefix when using a page token.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`Lists container instances belonging to an application.`,builder:p(w),handler:async s=>{let c={per_page:s[`per-page`],page_token:s[`page-token`],state:s.state,name_prefix:s[`name-prefix`]};if(s.dryRun){a({command:`cf containers applications instances list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications/${s[`application-id`]==null?`<application-id>`:encodeURIComponent(String(s[`application-id`]))}/instances`,pathParams:{"application-id":String(s[`application-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.containers.applications.instances.list({account_id:u,application_id:s[`application-id`],...c})),{successLabel:`Loaded`})}},E={command:`instances`,describe:`Inspect Containers instances belonging to applications`,builder:e=>e.command(C).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function D(e){return e.option(`name`,{type:`string`,description:`Filter applications by name.`}).option(`image`,{type:`string`,description:`Filter applications by image.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`Lists all the applications that are associated with your account.`,builder:D,handler:async s=>{let c={name:s.name,image:s.image};if(s.dryRun){a({command:`cf containers applications list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.containers.applications.list({account_id:u,...c})),{successLabel:`Loaded`})}};function k(e){return e.positional(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`description`,{type:`string`,description:`Description of the rollout process.`}).option(`kind`,{type:`string`,description:`Kind of the rollout process. Defaults to "full_auto".
25
25
  - "full_auto": For rolling rollouts, starts progressing steps upon rollout creation. For new_instances rollouts, advances percentage targets automatically after target-version health is observed.
26
26
  - "full_manual": Requires manually progressing each step in the rollout using the UpdateRollout's action parameter.
27
27
  `,choices:[`full_auto`,`full_manual`],default:`full_auto`}).option(`percentage`,{type:`number`,description:`Initial target version percentage (0-100). Version sync actively replaces instances to match.
@@ -46,9 +46,9 @@ Specify both entrypoint and command at run-time to completely replace the image
46
46
  - "standard-2": 1 vCPU, 6 GiB memory, 12 GB disk
47
47
  - "standard-3": 2 vCPU, 8 GiB memory, 16 GB disk
48
48
  - "standard-4": 4 vCPU, 12 GiB memory, 20 GB disk
49
- `,default:`lite`}).option(`target-configuration-observability-logs-enabled`,{type:`boolean`,description:`The target_configuration.observability.logs.enabled field`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body to create a new rollout for a scheduler-backed application.`})}const k={command:`create <application-id>`,describe:'Creates a rollout to update the application\'s configuration across instances with minimal downtime. Rollouts apply only to scheduler-backed applications with `scheduling_policy: "default"`. Versions and rollouts do not apply to applications with `scheduling_policy: "durable_object"`.',builder:O,handler:async f=>{if(f.dryRun){a({command:`cf containers applications rollouts create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications/${f[`application-id`]==null?`<application-id>`:encodeURIComponent(String(f[`application-id`]))}/rollouts`,pathParams:{"application-id":String(f[`application-id`]??``)},bodyKind:`json`,body:f.body===void 0?c({description:l(f.description,`description`,`text`),kind:l(f.kind,`kind`,`text`),percentage:f.percentage,step_percentage:f[`step-percentage`],strategy:l(f.strategy,`strategy`,`text`),target_configuration:{command:f[`target-configuration-command`],entrypoint:f[`target-configuration-entrypoint`],image:l(f[`target-configuration-image`],`target-configuration-image`,`text`),instance_type:l(f[`target-configuration-instance-type`],`target-configuration-instance-type`,`text`),observability:{logs:{enabled:f[`target-configuration-observability-logs-enabled`]}}}}):s(f.body)});return}let p=await r(f),m=f.local?e:await t();if(f.accountId=m,f.body){let e=s(f.body);i(await o(`Creating`,async()=>p.containers.applications.rollouts.create({...e,account_id:m,application_id:f[`application-id`]})),{successLabel:`Created`});return}f.description===void 0&&(f.description=await u(`description`,`Description of the rollout process.`)),f.strategy===void 0&&(f.strategy=await d(`strategy`,`Strategy used for the rollout. - "rolling": Step-based rollout with health gates. Actively replaces instances to reach each step's target percentage. - "new_instances": Percentage control over version distribution. Version sync actively replaces instances to match the configured percentage. The "full_auto" kind advances through fixed percentage targets after target-version health is observed. `,[`rolling`,`new_instances`]));let h=c({description:l(f.description,`description`,`text`),kind:l(f.kind,`kind`,`text`),percentage:f.percentage,step_percentage:f[`step-percentage`],strategy:l(f.strategy,`strategy`,`text`),target_configuration:{command:f[`target-configuration-command`],entrypoint:f[`target-configuration-entrypoint`],image:l(f[`target-configuration-image`],`target-configuration-image`,`text`),instance_type:l(f[`target-configuration-instance-type`],`target-configuration-instance-type`,`text`),observability:{logs:{enabled:f[`target-configuration-observability-logs-enabled`]}}}});i(await o(`Creating`,async()=>p.containers.applications.rollouts.create({...h,account_id:m,application_id:f[`application-id`]})),{successLabel:`Created`})}},A={command:`rollouts`,describe:`Manage rollouts for scheduler-backed applications`,builder:e=>e.command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.option(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:'Returns all versions for a scheduler-backed application with `scheduling_policy: "default"`. Versions and rollouts do not apply to applications with `scheduling_policy: "durable_object"`.',builder:j,handler:async s=>{if(s.dryRun){a({command:`cf containers applications versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications/${s[`application-id`]==null?`<application-id>`:encodeURIComponent(String(s[`application-id`]))}/versions`,pathParams:{"application-id":String(s[`application-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.containers.applications.versions.list({account_id:l,application_id:s[`application-id`]})),{successLabel:`Loaded`})}},N={command:`versions`,describe:`Inspect versions of scheduler-backed applications`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`applications`,describe:`Manage Containers applications`,builder:e=>e.command(m).command(g).command(v).command(b).command(D).command(T).command(A).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.option(`image`,{type:`string`,description:`Image url.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A digest-pinned managed container image to prepare for the new runtime.`})}const I={command:`prepare`,describe:`Idempotently starts or observes preparation of the runtime artifacts required to run one digest-pinned managed container image on Cloudflare's network. Returns 202 while durable preparation continues and 200 when the image is ready or preparation has reached a terminal error.`,builder:F,handler:async d=>{if(d.dryRun){a({command:`cf containers images prepare`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/image-preparations`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({image:l(d.image,`image`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.containers.images.prepare({...e,account_id:p})),{successLabel:`Created`});return}d.image===void 0&&(d.image=await u(`image`,`Image url.`));let m=c({image:l(d.image,`image`,`text`)});i(await o(`Creating`,async()=>f.containers.images.prepare({...m,account_id:p})),{successLabel:`Created`})}},L={command:`images`,describe:`Operations for images`,builder:e=>e.command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(e){return e.option(`auth-private-credential-secret-name`,{type:`string`,description:`Name of the secret within the store.`}).option(`auth-private-credential-store-id`,{type:`string`,description:`Identifier of the Secrets Store containing the secret.`}).option(`auth-public-credential`,{type:`string`,description:`The non-secret part of the registry credential: an AWS access key ID for ECR,
49
+ `,default:`lite`}).option(`target-configuration-observability-logs-enabled`,{type:`boolean`,description:`The target_configuration.observability.logs.enabled field`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body to create a new rollout for a scheduler-backed application.`})}const A={command:`create <application-id>`,describe:'Creates a rollout to update the application\'s configuration across instances with minimal downtime. Rollouts apply only to scheduler-backed applications with `scheduling_policy: "default"`. Versions and rollouts do not apply to applications with `scheduling_policy: "durable_object"`.',builder:k,handler:async f=>{if(f.dryRun){a({command:`cf containers applications rollouts create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications/${f[`application-id`]==null?`<application-id>`:encodeURIComponent(String(f[`application-id`]))}/rollouts`,pathParams:{"application-id":String(f[`application-id`]??``)},bodyKind:`json`,body:f.body===void 0?c({description:l(f.description,`description`,`text`),kind:l(f.kind,`kind`,`text`),percentage:f.percentage,step_percentage:f[`step-percentage`],strategy:l(f.strategy,`strategy`,`text`),target_configuration:{command:f[`target-configuration-command`],entrypoint:f[`target-configuration-entrypoint`],image:l(f[`target-configuration-image`],`target-configuration-image`,`text`),instance_type:l(f[`target-configuration-instance-type`],`target-configuration-instance-type`,`text`),observability:{logs:{enabled:f[`target-configuration-observability-logs-enabled`]}}}}):s(f.body)});return}let p=await r(f),m=f.local?e:await t();if(f.accountId=m,f.body){let e=s(f.body);i(await o(`Creating`,async()=>p.containers.applications.rollouts.create({...e,account_id:m,application_id:f[`application-id`]})),{successLabel:`Created`});return}f.description===void 0&&(f.description=await u(`description`,`Description of the rollout process.`)),f.strategy===void 0&&(f.strategy=await d(`strategy`,`Strategy used for the rollout. - "rolling": Step-based rollout with health gates. Actively replaces instances to reach each step's target percentage. - "new_instances": Percentage control over version distribution. Version sync actively replaces instances to match the configured percentage. The "full_auto" kind advances through fixed percentage targets after target-version health is observed. `,[`rolling`,`new_instances`]));let h=c({description:l(f.description,`description`,`text`),kind:l(f.kind,`kind`,`text`),percentage:f.percentage,step_percentage:f[`step-percentage`],strategy:l(f.strategy,`strategy`,`text`),target_configuration:{command:f[`target-configuration-command`],entrypoint:f[`target-configuration-entrypoint`],image:l(f[`target-configuration-image`],`target-configuration-image`,`text`),instance_type:l(f[`target-configuration-instance-type`],`target-configuration-instance-type`,`text`),observability:{logs:{enabled:f[`target-configuration-observability-logs-enabled`]}}}});i(await o(`Creating`,async()=>p.containers.applications.rollouts.create({...h,account_id:m,application_id:f[`application-id`]})),{successLabel:`Created`})}},j={command:`rollouts`,describe:`Manage rollouts for scheduler-backed applications`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.option(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:'Returns all versions for a scheduler-backed application with `scheduling_policy: "default"`. Versions and rollouts do not apply to applications with `scheduling_policy: "durable_object"`.',builder:M,handler:async s=>{if(s.dryRun){a({command:`cf containers applications versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/applications/${s[`application-id`]==null?`<application-id>`:encodeURIComponent(String(s[`application-id`]))}/versions`,pathParams:{"application-id":String(s[`application-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.containers.applications.versions.list({account_id:l,application_id:s[`application-id`]})),{successLabel:`Loaded`})}},P={command:`versions`,describe:`Inspect versions of scheduler-backed applications`,builder:e=>e.command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},F={command:`applications`,describe:`Manage Containers applications`,builder:e=>e.command(h).command(_).command(y).command(x).command(O).command(E).command(j).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function I(e){return e.option(`image`,{type:`string`,description:`Image url.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A digest-pinned managed container image to prepare for the new runtime.`})}const L={command:`prepare`,describe:`Idempotently starts or observes preparation of the runtime artifacts required to run one digest-pinned managed container image on Cloudflare's network. Returns 202 while durable preparation continues and 200 when the image is ready or preparation has reached a terminal error.`,builder:I,handler:async d=>{if(d.dryRun){a({command:`cf containers images prepare`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/image-preparations`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({image:l(d.image,`image`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.containers.images.prepare({...e,account_id:p})),{successLabel:`Created`});return}d.image===void 0&&(d.image=await u(`image`,`Image url.`));let m=c({image:l(d.image,`image`,`text`)});i(await o(`Creating`,async()=>f.containers.images.prepare({...m,account_id:p})),{successLabel:`Created`})}},R={command:`images`,describe:`Operations for images`,builder:e=>e.command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.option(`auth-private-credential-secret-name`,{type:`string`,description:`Name of the secret within the store.`}).option(`auth-private-credential-store-id`,{type:`string`,description:`Identifier of the Secrets Store containing the secret.`}).option(`auth-public-credential`,{type:`string`,description:`The non-secret part of the registry credential: an AWS access key ID for ECR,
50
50
  a username for Docker Hub, or a service account email for Google Artifact Registry.
51
51
  `}).option(`domain`,{type:`string`,description:"Hostname of the private registry, without a scheme or image path. Supported\nhostnames are `docker.io`, AWS ECR hostnames, and Google Artifact Registry\n`*-docker.pkg.dev` hostnames.\n"}).option(`is-public`,{type:`boolean`,description:`Omit this field or set it to \`false\`. Public Docker Hub images do not require
52
52
  registry configuration and cannot be added with this endpoint.
53
- `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Configuration for connecting Containers to a supported private external image registry. See [Image management](https://developers.cloudflare.com/containers/platform-details/image-management/) for supported providers and credential setup instructions. `})}const z={command:`create`,describe:`Registers credentials for a supported private external image registry so Containers can pull images from it. This endpoint does not create a registry or upload an image. Public Docker Hub images and images in the Cloudflare managed registry do not require this configuration. Refer to [Image management](https://developers.cloudflare.com/containers/platform-details/image-management/) for supported registries and instructions for storing registry credentials.`,builder:R,handler:async d=>{if(d.dryRun){a({command:`cf containers registries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/registries`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({auth:{private_credential:{secret_name:l(d[`auth-private-credential-secret-name`],`auth-private-credential-secret-name`,`text`),store_id:l(d[`auth-private-credential-store-id`],`auth-private-credential-store-id`,`text`)},public_credential:l(d[`auth-public-credential`],`auth-public-credential`,`text`)},domain:l(d.domain,`domain`,`text`),is_public:d[`is-public`]}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.containers.registries.create({...e,account_id:p})),{successLabel:`Created`});return}d[`auth-private-credential-secret-name`]===void 0&&(d[`auth-private-credential-secret-name`]=await u(`auth-private-credential-secret-name`,`Name of the secret within the store.`)),d[`auth-private-credential-store-id`]===void 0&&(d[`auth-private-credential-store-id`]=await u(`auth-private-credential-store-id`,`Identifier of the Secrets Store containing the secret.`)),d[`auth-public-credential`]===void 0&&(d[`auth-public-credential`]=await u(`auth-public-credential`,`The non-secret part of the registry credential: an AWS access key ID for ECR, a username for Docker Hub, or a service account email for Google Artifact Registry. `)),d.domain===void 0&&(d.domain=await u(`domain`,"Hostname of the private registry, without a scheme or image path. Supported hostnames are `docker.io`, AWS ECR hostnames, and Google Artifact Registry `*-docker.pkg.dev` hostnames. "));let m=c({auth:{private_credential:{secret_name:l(d[`auth-private-credential-secret-name`],`auth-private-credential-secret-name`,`text`),store_id:l(d[`auth-private-credential-store-id`],`auth-private-credential-store-id`,`text`)},public_credential:l(d[`auth-public-credential`],`auth-public-credential`,`text`)},domain:l(d.domain,`domain`,`text`),is_public:d[`is-public`]});i(await o(`Creating`,async()=>f.containers.registries.create({...m,account_id:p})),{successLabel:`Created`})}};function B(e){return e.positional(`domain`,{type:`string`,description:`The domain to get credentials for.`,demandOption:!0}).option(`expiration-minutes`,{type:`number`,description:`The number of minutes Cloudflare managed registry credentials stay valid. Required for managed registries and must remain positive. Cloudflare ignores this value for external registries.`}).option(`permissions`,{type:`string`,array:!0,description:`The permissions for Cloudflare managed registry credentials. Required for managed registries. Cloudflare ignores this value for external registries.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specifies the configuration for the image registry credential to create. Cloudflare requires both fields for managed registries. For external registries, Cloudflare ignores both fields, and the registry provider determines the returned credentials' permissions and lifetime.`})}const V={command:`generate <domain>`,describe:`Generates credentials for accessing a configured container image registry.`,builder:B,handler:async l=>{if(l.dryRun){a({command:`cf containers registries credentials generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/registries/${l.domain==null?`<domain>`:encodeURIComponent(String(l.domain))}/credentials`,pathParams:{domain:String(l.domain??``)},bodyKind:`json`,body:l.body===void 0?c({expiration_minutes:l[`expiration-minutes`],permissions:l.permissions}):s(l.body)});return}let u=await r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=s(l.body);i(await o(`Creating`,async()=>u.containers.registries.credentials.generate({...e,account_id:d,domain:l.domain})),{successLabel:`Created`});return}let f=c({expiration_minutes:l[`expiration-minutes`],permissions:l.permissions});i(await o(`Creating`,async()=>u.containers.registries.credentials.generate({...f,account_id:d,domain:l.domain})),{successLabel:`Created`})}},H={command:`credentials`,describe:`Generate image registry credentials`,builder:e=>e.command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function U(e){return e.positional(`domain`,{type:`string`,description:`The domain to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const W={command:`delete <domain>`,describe:`Delete a registry from the account, this will prevent Containers from pulling images from the registry.`,builder:U,handler:async s=>{if(s.dryRun){a({command:`cf containers registries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/registries/${s.domain==null?`<domain>`:encodeURIComponent(String(s.domain))}`,pathParams:{domain:String(s.domain??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`This operation deletes the registry configuration. Containers will no longer be able to pull images from it.`})){process.stderr.write(`Aborted.
54
- `);return}i(await o(`Deleting`,async()=>c.containers.registries.delete({account_id:l,domain:s.domain})),{successLabel:`Deleted`})}};function G(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`list`,describe:`Get the list of configured registries in the account.`,builder:G,handler:async s=>{if(s.dryRun){a({command:`cf containers registries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/registries`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.containers.registries.list({account_id:l})),{successLabel:`Loaded`})}},q={command:`registries`,describe:`Manage Containers image registries`,builder:e=>e.command(z).command(W).command(K).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`containers`,describe:`Deploy and manage Containers applications on Cloudflare's global network`,builder:e=>e.command(P).command(L).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{J as default};
53
+ `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Configuration for connecting Containers to a supported private external image registry. See [Image management](https://developers.cloudflare.com/containers/platform-details/image-management/) for supported providers and credential setup instructions. `})}const B={command:`create`,describe:`Registers credentials for a supported private external image registry so Containers can pull images from it. This endpoint does not create a registry or upload an image. Public Docker Hub images and images in the Cloudflare managed registry do not require this configuration. Refer to [Image management](https://developers.cloudflare.com/containers/platform-details/image-management/) for supported registries and instructions for storing registry credentials.`,builder:z,handler:async d=>{if(d.dryRun){a({command:`cf containers registries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/registries`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({auth:{private_credential:{secret_name:l(d[`auth-private-credential-secret-name`],`auth-private-credential-secret-name`,`text`),store_id:l(d[`auth-private-credential-store-id`],`auth-private-credential-store-id`,`text`)},public_credential:l(d[`auth-public-credential`],`auth-public-credential`,`text`)},domain:l(d.domain,`domain`,`text`),is_public:d[`is-public`]}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.containers.registries.create({...e,account_id:p})),{successLabel:`Created`});return}d[`auth-private-credential-secret-name`]===void 0&&(d[`auth-private-credential-secret-name`]=await u(`auth-private-credential-secret-name`,`Name of the secret within the store.`)),d[`auth-private-credential-store-id`]===void 0&&(d[`auth-private-credential-store-id`]=await u(`auth-private-credential-store-id`,`Identifier of the Secrets Store containing the secret.`)),d[`auth-public-credential`]===void 0&&(d[`auth-public-credential`]=await u(`auth-public-credential`,`The non-secret part of the registry credential: an AWS access key ID for ECR, a username for Docker Hub, or a service account email for Google Artifact Registry. `)),d.domain===void 0&&(d.domain=await u(`domain`,"Hostname of the private registry, without a scheme or image path. Supported hostnames are `docker.io`, AWS ECR hostnames, and Google Artifact Registry `*-docker.pkg.dev` hostnames. "));let m=c({auth:{private_credential:{secret_name:l(d[`auth-private-credential-secret-name`],`auth-private-credential-secret-name`,`text`),store_id:l(d[`auth-private-credential-store-id`],`auth-private-credential-store-id`,`text`)},public_credential:l(d[`auth-public-credential`],`auth-public-credential`,`text`)},domain:l(d.domain,`domain`,`text`),is_public:d[`is-public`]});i(await o(`Creating`,async()=>f.containers.registries.create({...m,account_id:p})),{successLabel:`Created`})}};function V(e){return e.positional(`domain`,{type:`string`,description:`The domain to get credentials for.`,demandOption:!0}).option(`expiration-minutes`,{type:`number`,description:`The number of minutes Cloudflare managed registry credentials stay valid. Required for managed registries and must remain positive. Cloudflare ignores this value for external registries.`}).option(`permissions`,{type:`string`,array:!0,description:`The permissions for Cloudflare managed registry credentials. Required for managed registries. Cloudflare ignores this value for external registries.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specifies the configuration for the image registry credential to create. Cloudflare requires both fields for managed registries. For external registries, Cloudflare ignores both fields, and the registry provider determines the returned credentials' permissions and lifetime.`})}const H={command:`generate <domain>`,describe:`Generates credentials for accessing a configured container image registry.`,builder:V,handler:async l=>{if(l.dryRun){a({command:`cf containers registries credentials generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/registries/${l.domain==null?`<domain>`:encodeURIComponent(String(l.domain))}/credentials`,pathParams:{domain:String(l.domain??``)},bodyKind:`json`,body:l.body===void 0?c({expiration_minutes:l[`expiration-minutes`],permissions:l.permissions}):s(l.body)});return}let u=await r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=s(l.body);i(await o(`Creating`,async()=>u.containers.registries.credentials.generate({...e,account_id:d,domain:l.domain})),{successLabel:`Created`});return}let f=c({expiration_minutes:l[`expiration-minutes`],permissions:l.permissions});i(await o(`Creating`,async()=>u.containers.registries.credentials.generate({...f,account_id:d,domain:l.domain})),{successLabel:`Created`})}},U={command:`credentials`,describe:`Generate image registry credentials`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.positional(`domain`,{type:`string`,description:`The domain to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const G={command:`delete <domain>`,describe:`Delete a registry from the account, this will prevent Containers from pulling images from the registry.`,builder:W,handler:async s=>{if(s.dryRun){a({command:`cf containers registries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/registries/${s.domain==null?`<domain>`:encodeURIComponent(String(s.domain))}`,pathParams:{domain:String(s.domain??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`This operation deletes the registry configuration. Containers will no longer be able to pull images from it.`})){process.stderr.write(`Aborted.
54
+ `);return}i(await o(`Deleting`,async()=>c.containers.registries.delete({account_id:l,domain:s.domain})),{successLabel:`Deleted`})}};function K(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`list`,describe:`Get the list of configured registries in the account.`,builder:K,handler:async s=>{if(s.dryRun){a({command:`cf containers registries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/containers/registries`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.containers.registries.list({account_id:l})),{successLabel:`Loaded`})}},J={command:`registries`,describe:`Manage Containers image registries`,builder:e=>e.command(B).command(G).command(q).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Y={command:`containers`,describe:`Deploy and manage Containers applications on Cloudflare's global network`,builder:e=>e.command(F).command(R).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Y as default};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{h as e}from"./oauth-BPizUUqP.mjs";import{r as t}from"./auth-DuLchM18.mjs";import{t as n}from"./output-DgW1hQGX.mjs";import{n as r,t as i}from"./progress-B84wYh91.mjs";import{n as a,t as o}from"./body-parser-CYD7PKFC.mjs";import{n as s}from"./input-validation-BBKJRoRB.mjs";import{a as c,i as l,n as u}from"./prompt-CDtLWxNv.mjs";function d(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Array of Content Scanning custom expressions to create.`})}const f={command:`create`,describe:'Create one or more Content Scanning custom expressions, appending them to the existing list of the zone, and return the updated list. Each expression reaches content objects the scanner cannot find automatically, for example `lookup_json_string(http.request.body.raw, "file")`.',builder:d,handler:async o=>{if(o.dryRun){r({command:`cf content-scan expressions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/content-upload-scan/payloads`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`json`,body:o.body===void 0?void 0:a(o.body)});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});if(o.zoneId=c,o.body){let e=a(o.body);n(await i(`Creating`,async()=>s.contentScan.expressions.create({body:e,zone_id:c})),{successLabel:`Created`});return}if(o.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function p(e){return e.positional(`expression-id`,{type:`string`,description:`Defines the unique ID for this Content Scanning custom expression.`,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 m={command:`delete <expression-id>`,describe:`Delete the Content Scanning custom expression with the given identifier and return the expressions that remain. Content objects reached only by the deleted expression are no longer scanned.`,builder:p,handler:async a=>{if(a.dryRun){r({command:`cf content-scan expressions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/content-upload-scan/payloads/${a[`expression-id`]==null?`<expression-id>`:encodeURIComponent(String(a[`expression-id`]))}`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``),"expression-id":String(a[`expression-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await u({force:!!a.force,message:`This operation deletes a Content Scanning custom expression.`})){process.stderr.write(`Aborted.
2
+ import{h as e}from"./oauth-B0ETkNcX.mjs";import{r as t}from"./auth-MQEamPN9.mjs";import{t as n}from"./output-DrpYYfnB.mjs";import{n as r,t as i}from"./progress-CsHIt3Tp.mjs";import{n as a,t as o}from"./body-parser-C-c9gfH1.mjs";import{n as s}from"./input-validation-Bav2M9F-.mjs";import{a as c,i as l,n as u}from"./prompt-DdegNPpg.mjs";function d(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Array of Content Scanning custom expressions to create.`})}const f={command:`create`,describe:'Create one or more Content Scanning custom expressions, appending them to the existing list of the zone, and return the updated list. Each expression reaches content objects the scanner cannot find automatically, for example `lookup_json_string(http.request.body.raw, "file")`.',builder:d,handler:async o=>{if(o.dryRun){r({command:`cf content-scan expressions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/content-upload-scan/payloads`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`json`,body:o.body===void 0?void 0:a(o.body)});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});if(o.zoneId=c,o.body){let e=a(o.body);n(await i(`Creating`,async()=>s.contentScan.expressions.create({body:e,zone_id:c})),{successLabel:`Created`});return}if(o.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function p(e){return e.positional(`expression-id`,{type:`string`,description:`Defines the unique ID for this Content Scanning custom expression.`,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 m={command:`delete <expression-id>`,describe:`Delete the Content Scanning custom expression with the given identifier and return the expressions that remain. Content objects reached only by the deleted expression are no longer scanned.`,builder:p,handler:async a=>{if(a.dryRun){r({command:`cf content-scan expressions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/content-upload-scan/payloads/${a[`expression-id`]==null?`<expression-id>`:encodeURIComponent(String(a[`expression-id`]))}`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``),"expression-id":String(a[`expression-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await u({force:!!a.force,message:`This operation deletes a Content Scanning custom expression.`})){process.stderr.write(`Aborted.
3
3
  `);return}n(await i(`Deleting`,async()=>o.contentScan.expressions.delete({zone_id:s,expression_id:a[`expression-id`]})),{successLabel:`Deleted`})}};function h(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`List the Content Scanning custom expressions configured for the zone, each with its own identifier. A custom expression tells the scanner how to reach content objects in a request it cannot parse on its own, such as files Base64-encoded inside a JSON body.`,builder:h,handler:async a=>{if(a.dryRun){r({command:`cf content-scan expressions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/content-upload-scan/payloads`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.contentScan.expressions.list({zone_id:s})),{successLabel:`Loaded`})}};function _(e){return e.positional(`expression-id`,{type:`string`,description:`Defines the unique ID for this Content Scanning custom expression.`,demandOption:!0}).option(`payload`,{type:`string`,description:`Defines the custom content extraction expression used to reach content objects in the request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Content Scanning custom expression to update.`})}const v={command:`update <expression-id>`,describe:`Update the Content Scanning custom expression with the given identifier and return the updated list of expressions.`,builder:_,handler:async l=>{if(l.dryRun){r({command:`cf content-scan expressions update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/content-upload-scan/payloads/${l[`expression-id`]==null?`<expression-id>`:encodeURIComponent(String(l[`expression-id`]))}`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``),"expression-id":String(l[`expression-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({payload:s(l.payload,`payload`,`text`)}):a(l.body)});return}let u=await t(l),d=await e({zone:l.zone},u,{quiet:l.quiet});if(l.zoneId=d,l.body){let e=a(l.body);n(await i(`Updating`,async()=>u.contentScan.expressions.update({...e,zone_id:d,expression_id:l[`expression-id`]})),{successLabel:`Updated`});return}l.payload===void 0&&(l.payload=await c(`payload`,`Defines the custom content extraction expression used to reach content objects in the request.`));let f=o({payload:s(l.payload,`payload`,`text`)});n(await i(`Updating`,async()=>u.contentScan.expressions.update({...f,zone_id:d,expression_id:l[`expression-id`]})),{successLabel:`Updated`})}},y={command:`expressions`,describe:`Custom expressions that tell the scanner how to reach content objects it cannot parse on its own`,builder:e=>e.command(f).command(m).command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get`,describe:`Get the current Content Scanning status for the zone, together with the date the status was last modified.`,builder:b,handler:async a=>{if(a.dryRun){r({command:`cf content-scan get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/content-upload-scan/settings`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.contentScan.get({zone_id:s})),{successLabel:`Loaded`})}};function S(e){return e.option(`value`,{type:`string`,description:`The status value for Content Scanning.`,choices:[`enabled`,`disabled`]}).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}).option(`body`,{type:`string`,description:`Content Scanning settings to update.`})}const C={command:`update`,describe:"Update the Content Scanning status by setting the status value to `enabled` or `disabled`. This is equivalent to calling the dedicated enable and disable endpoints.",builder:S,handler:async c=>{if(c.dryRun){r({command:`cf content-scan update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/content-upload-scan/settings`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({value:s(c.value,`value`,`text`)}):a(c.body)});return}let d=await t(c),f=await e({zone:c.zone},d,{quiet:c.quiet});if(c.zoneId=f,!await u({force:!!c.force,message:`This operation toggles Content Scanning for a zone.`})){process.stderr.write(`Aborted.
4
4
  `);return}if(c.body){let e=a(c.body);n(await i(`Deleting`,async()=>d.contentScan.update({...e,zone_id:f})),{successLabel:`Deleted`});return}c.value===void 0&&(c.value=await l(`value`,`The status value for Content Scanning.`,[`enabled`,`disabled`]));let p=o({value:s(c.value,`value`,`text`)});n(await i(`Deleting`,async()=>d.contentScan.update({...p,zone_id:f})),{successLabel:`Deleted`})}},w={command:`content-scan`,describe:`Malicious uploads detection, scan uploaded content in HTTP requests for malware and malicious payloads`,builder:e=>e.command(x).command(C).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{h as e}from"./oauth-BPizUUqP.mjs";import{r as t}from"./auth-DuLchM18.mjs";import{t as n}from"./output-DgW1hQGX.mjs";import{n as r,t as i}from"./progress-B84wYh91.mjs";import{n as a,t as o}from"./body-parser-CYD7PKFC.mjs";import{n as s}from"./input-validation-BBKJRoRB.mjs";function c(e){return e.option(`id`,{type:`string`,description:`The feature identifier.`,choices:[`csam_scanner`]}).option(`value-email`,{type:`string`,description:`Notification email address for CSAM scan results. When changed,
2
+ import{h as e}from"./oauth-B0ETkNcX.mjs";import{r as t}from"./auth-MQEamPN9.mjs";import{t as n}from"./output-DrpYYfnB.mjs";import{n as r,t as i}from"./progress-CsHIt3Tp.mjs";import{n as a,t as o}from"./body-parser-C-c9gfH1.mjs";import{n as s}from"./input-validation-Bav2M9F-.mjs";function c(e){return e.option(`id`,{type:`string`,description:`The feature identifier.`,choices:[`csam_scanner`]}).option(`value-email`,{type:`string`,description:`Notification email address for CSAM scan results. When changed,
3
3
  email verification is triggered automatically.
4
4
  `}).option(`value-enabled`,{type:`boolean`,description:`Whether CSAM scanning is enabled for this zone.`}).option(`value-resend-email`,{type:`boolean`,description:`Set to true to trigger re-sending the email verification.
5
5
  Write-only; never appears in responses (omitted when false).
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{h as e}from"./oauth-BPizUUqP.mjs";import{r as t}from"./auth-DuLchM18.mjs";import{t as n}from"./output-DgW1hQGX.mjs";import{n as r,t as i}from"./progress-B84wYh91.mjs";import{n as a,t as o}from"./body-parser-CYD7PKFC.mjs";function s(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`get`,describe:`Retrieve the Certificate Transparency alerting subscription settings for a zone. Returns whether CT monitoring is enabled and the list of email addresses that receive alerts, if any have been configured.`,builder:s,handler:async a=>{if(a.dryRun){r({command:`cf ct-alerting get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/ct/alerting`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.ctAlerting.get({zone_id:s})),{successLabel:`Loaded`})}};function l(e){return e.option(`emails`,{type:`string`,array:!0,description:`Email addresses that receive CT alert notifications for the zone. A maximum of 100 addresses may be configured. Each address must be a valid RFC 5322 email address and must not contain a comma.
2
+ import{h as e}from"./oauth-B0ETkNcX.mjs";import{r as t}from"./auth-MQEamPN9.mjs";import{t as n}from"./output-DrpYYfnB.mjs";import{n as r,t as i}from"./progress-CsHIt3Tp.mjs";import{n as a,t as o}from"./body-parser-C-c9gfH1.mjs";function s(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`get`,describe:`Retrieve the Certificate Transparency alerting subscription settings for a zone. Returns whether CT monitoring is enabled and the list of email addresses that receive alerts, if any have been configured.`,builder:s,handler:async a=>{if(a.dryRun){r({command:`cf ct-alerting get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/ct/alerting`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.ctAlerting.get({zone_id:s})),{successLabel:`Loaded`})}};function l(e){return e.option(`emails`,{type:`string`,array:!0,description:`Email addresses that receive CT alert notifications for the zone. A maximum of 100 addresses may be configured. Each address must be a valid RFC 5322 email address and must not contain a comma.
3
3
  `}).option(`enabled`,{type:`boolean`,description:`Whether CT alerting is enabled for the zone.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating CT alerting subscription settings.`})}const u={command:`update`,describe:"Create or update the Certificate Transparency alerting subscription for a zone. Enables or disables email notifications when certificates are issued for the zone's domains. The `enabled` field is required on every request and controls whether the subscription is active. The `emails` field is optional and, when provided, replaces the stored recipient list for the zone. When `emails` is omitted, the stored recipient list is preserved and only the enabled state is toggled. A maximum of 100 email addresses may be configured per zone. Requests that omit `enabled` are rejected with error code 1008. Subscribe and unsubscribe notification emails are only sent for recipients whose effective subscription state changes. Idempotent requests (no state change) send no notification email.",builder:l,handler:async s=>{if(s.dryRun){r({command:`cf ct-alerting update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/ct/alerting`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?o({emails:s.emails,enabled:s.enabled}):a(s.body)});return}let c=await t(s),l=await e({zone:s.zone},c,{quiet:s.quiet});if(s.zoneId=l,s.body){let e=a(s.body);n(await i(`Updating`,async()=>c.ctAlerting.update({...e,zone_id:l})),{successLabel:`Updated`});return}if(s.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=o({emails:s.emails,enabled:s.enabled});n(await i(`Updating`,async()=>c.ctAlerting.update({...u,zone_id:l})),{successLabel:`Updated`})}},d={command:`ct-alerting`,describe:`ct-alerting`,builder:e=>e.command(c).command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{h as e}from"./oauth-BPizUUqP.mjs";import{a as t,r as n}from"./auth-DuLchM18.mjs";import{t as r}from"./output-DgW1hQGX.mjs";import{n as i,t as a}from"./progress-B84wYh91.mjs";import{n as o,t as s}from"./body-parser-CYD7PKFC.mjs";import{n as c}from"./input-validation-BBKJRoRB.mjs";import{a as l,n as u}from"./prompt-CDtLWxNv.mjs";import{t as d}from"./cli-types-BWdZbsFE.mjs";function f(e){return e.option(`bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`],default:`ubiquitous`}).option(`certificate`,{type:`string`,description:`The zone's SSL certificate or certificate and the intermediate(s).`}).option(`custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`deploy`,{type:`string`,description:`The environment to deploy the certificate to, defaults to production.`,choices:[`staging`,`production`],default:`production`}).option(`geo-restrictions-label`,{type:`string`,description:`The geo_restrictions.label field`,choices:[`us`,`eu`,`highest_security`]}).option(`policy`,{type:`string`,description:`Specify the policy that determines the region where your private key will be held locally. HTTPS connections to any excluded data center will still be fully encrypted, but will incur some latency while Keyless SSL is used to complete the handshake with the nearest allowed data center. Any combination of countries, specified by their two letter country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) can be chosen, such as 'country: IN', as well as 'region: EU' which refers to the EU region. If there are too few data centers satisfying the policy, it will be rejected.
2
+ import{h as e}from"./oauth-B0ETkNcX.mjs";import{a as t,r as n}from"./auth-MQEamPN9.mjs";import{t as r}from"./output-DrpYYfnB.mjs";import{n as i,t as a}from"./progress-CsHIt3Tp.mjs";import{n as o,t as s}from"./body-parser-C-c9gfH1.mjs";import{n as c}from"./input-validation-Bav2M9F-.mjs";import{a as l,n as u}from"./prompt-DdegNPpg.mjs";import{t as d}from"./cli-types-BsTty22w.mjs";function f(e){return e.option(`bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`],default:`ubiquitous`}).option(`certificate`,{type:`string`,description:`The zone's SSL certificate or certificate and the intermediate(s).`}).option(`custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`deploy`,{type:`string`,description:`The environment to deploy the certificate to, defaults to production.`,choices:[`staging`,`production`],default:`production`}).option(`geo-restrictions-label`,{type:`string`,description:`The geo_restrictions.label field`,choices:[`us`,`eu`,`highest_security`]}).option(`policy`,{type:`string`,description:`Specify the policy that determines the region where your private key will be held locally. HTTPS connections to any excluded data center will still be fully encrypted, but will incur some latency while Keyless SSL is used to complete the handshake with the nearest allowed data center. Any combination of countries, specified by their two letter country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) can be chosen, such as 'country: IN', as well as 'region: EU' which refers to the EU region. If there are too few data centers satisfying the policy, it will be rejected.
3
3
  Note: The API accepts this field as either "policy" or "policy_restrictions" in requests. Responses return this field as "policy_restrictions".`}).option(`private-key`,{type:`string`,description:`The zone's private key. Not required if custom_csr_id is provided, in which case the private key is retrieved from the CSR record held by Cloudflare.`}).option(`type`,{type:`string`,description:`The type 'legacy_custom' enables support for legacy clients which do not include SNI in the TLS handshake.`,choices:[`legacy_custom`,`sni_custom`],default:`legacy_custom`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`create`,describe:`Upload a new SSL certificate for a zone.`,builder:f,handler:async t=>{if(t.dryRun){i({command:`cf custom-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/custom_certificates`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`json`,body:t.body===void 0?s({bundle_method:c(t[`bundle-method`],`bundle-method`,`text`),certificate:c(t.certificate,`certificate`,`text`),custom_csr_id:c(t[`custom-csr-id`],`custom-csr-id`,`text`),deploy:c(t.deploy,`deploy`,`text`),geo_restrictions:{label:c(t[`geo-restrictions-label`],`geo-restrictions-label`,`text`)},policy:c(t.policy,`policy`,`text`),private_key:c(t[`private-key`],`private-key`,`text`),type:c(t.type,`type`,`text`)}):o(t.body)});return}let u=await n(t),d=await e({zone:t.zone},u,{quiet:t.quiet});if(t.zoneId=d,t.body){let e=o(t.body);r(await a(`Creating`,async()=>u.customCertificates.create({...e,zone_id:d})),{successLabel:`Created`});return}t.certificate===void 0&&(t.certificate=await l(`certificate`,`The zone's SSL certificate or certificate and the intermediate(s).`));let f=s({bundle_method:c(t[`bundle-method`],`bundle-method`,`text`),certificate:c(t.certificate,`certificate`,`text`),custom_csr_id:c(t[`custom-csr-id`],`custom-csr-id`,`text`),deploy:c(t.deploy,`deploy`,`text`),geo_restrictions:{label:c(t[`geo-restrictions-label`],`geo-restrictions-label`,`text`)},policy:c(t.policy,`policy`,`text`),private_key:c(t[`private-key`],`private-key`,`text`),type:c(t.type,`type`,`text`)});r(await a(`Creating`,async()=>u.customCertificates.create({...f,zone_id:d})),{successLabel:`Created`})}};function m(e){return e.positional(`custom-certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const h={command:`delete <custom-certificate-id>`,describe:`Remove a SSL certificate from a zone.`,builder:m,handler:async t=>{if(t.dryRun){i({command:`cf custom-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/custom_certificates/${t[`custom-certificate-id`]==null?`<custom-certificate-id>`:encodeURIComponent(String(t[`custom-certificate-id`]))}`,pathParams:{"custom-certificate-id":String(t[`custom-certificate-id`]??``),"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=s,!await u({force:!!t.force})){process.stderr.write(`Aborted.
4
4
  `);return}r(await a(`Deleting`,async()=>o.customCertificates.delete({zone_id:s,custom_certificate_id:t[`custom-certificate-id`]})),{successLabel:`Deleted`})}};function g(e){return e.positional(`custom-certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`]}).option(`certificate`,{type:`string`,description:`The zone's SSL certificate or certificate and the intermediate(s).`}).option(`custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`deploy`,{type:`string`,description:`The environment to deploy the certificate to, defaults to production.`,choices:[`staging`,`production`]}).option(`geo-restrictions-label`,{type:`string`,description:`The geo_restrictions.label field`,choices:[`us`,`eu`,`highest_security`]}).option(`policy`,{type:`string`,description:`Specify the policy that determines the region where your private key will be held locally. HTTPS connections to any excluded data center will still be fully encrypted, but will incur some latency while Keyless SSL is used to complete the handshake with the nearest allowed data center. Any combination of countries, specified by their two letter country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) can be chosen, such as 'country: IN', as well as 'region: EU' which refers to the EU region. If there are too few data centers satisfying the policy, it will be rejected.
5
5
  Note: The API accepts this field as either "policy" or "policy_restrictions" in requests. Responses return this field as "policy_restrictions".`}).option(`private-key`,{type:`string`,description:`The zone's private key. Not required if custom_csr_id is provided, in which case the private key is retrieved from the CSR record held by Cloudflare.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`edit <custom-certificate-id>`,describe:`Upload a new private key and/or PEM/CRT for the SSL certificate. Note: PATCHing a configuration for sni_custom certificates will result in a new resource id being returned, and the previous one being deleted.`,builder:g,handler:async t=>{if(t.dryRun){i({command:`cf custom-certificates edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/custom_certificates/${t[`custom-certificate-id`]==null?`<custom-certificate-id>`:encodeURIComponent(String(t[`custom-certificate-id`]))}`,pathParams:{"custom-certificate-id":String(t[`custom-certificate-id`]??``),"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`json`,body:t.body===void 0?s({bundle_method:c(t[`bundle-method`],`bundle-method`,`text`),certificate:c(t.certificate,`certificate`,`text`),custom_csr_id:c(t[`custom-csr-id`],`custom-csr-id`,`text`),deploy:c(t.deploy,`deploy`,`text`),geo_restrictions:{label:c(t[`geo-restrictions-label`],`geo-restrictions-label`,`text`)},policy:c(t.policy,`policy`,`text`),private_key:c(t[`private-key`],`private-key`,`text`)}):o(t.body)});return}let l=await n(t),u=await e({zone:t.zone},l,{quiet:t.quiet});if(t.zoneId=u,t.body){let e=o(t.body);r(await a(`Updating`,async()=>l.customCertificates.edit({...e,zone_id:u,custom_certificate_id:t[`custom-certificate-id`]})),{successLabel:`Updated`});return}let d=s({bundle_method:c(t[`bundle-method`],`bundle-method`,`text`),certificate:c(t.certificate,`certificate`,`text`),custom_csr_id:c(t[`custom-csr-id`],`custom-csr-id`,`text`),deploy:c(t.deploy,`deploy`,`text`),geo_restrictions:{label:c(t[`geo-restrictions-label`],`geo-restrictions-label`,`text`)},policy:c(t.policy,`policy`,`text`),private_key:c(t[`private-key`],`private-key`,`text`)});r(await a(`Updating`,async()=>l.customCertificates.edit({...d,zone_id:u,custom_certificate_id:t[`custom-certificate-id`]})),{successLabel:`Updated`})}};function v(e){return e.positional(`custom-certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <custom-certificate-id>`,describe:`Retrieves details for a specific custom SSL certificate, including certificate metadata, bundle method, geographic restrictions, and associated keyless server configuration.`,builder:v,handler:async t=>{if(t.dryRun){i({command:`cf custom-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/custom_certificates/${t[`custom-certificate-id`]==null?`<custom-certificate-id>`:encodeURIComponent(String(t[`custom-certificate-id`]))}`,pathParams:{"custom-certificate-id":String(t[`custom-certificate-id`]??``),"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});t.zoneId=s,r(await a(`Loading`,async()=>o.customCertificates.get({zone_id:s,custom_certificate_id:t[`custom-certificate-id`]})),{successLabel:`Loaded`})}};function b(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of zones per page.`}).option(`match`,{type:`string`,description:`Whether to match all search requirements or at least one (any).`,choices:[`any`,`all`]}).option(`status`,{type:`string`,description:`Status of the zone's custom SSL.`,choices:[`active`,`expired`,`deleted`,`pending`,`initializing`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List, search, and filter all of your custom SSL certificates. The higher priority will break ties across overlapping 'legacy_custom' certificates, but 'legacy_custom' certificates will always supercede 'sni_custom' certificates.`,builder:d(b),handler:async t=>{let o={page:t.page,per_page:t[`per-page`],match:t.match,status:t.status};if(t.dryRun){i({command:`cf custom-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/custom_certificates`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await n(t),c=await e({zone:t.zone},s,{quiet:t.quiet});t.zoneId=c,r(await a(`Loading`,async()=>s.customCertificates.list({zone_id:c,...o})),{successLabel:`Loaded`})}};function S(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`update`,describe:`If a zone has multiple SSL certificates, you can set the order in which they should be used during a request. The higher priority will break ties across overlapping 'legacy_custom' certificates.`,builder:S,handler:async s=>{if(s.dryRun){i({command:`cf custom-certificates prioritize update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/custom_certificates/prioritize`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?void 0:o(s.body)});return}let c=await n(s),l=await e({zone:s.zone},c,{quiet:s.quiet});if(s.zoneId=l,s.body){let e=o(s.body);r(await a(`Updating`,async()=>c.customCertificates.prioritize.update({...e,zone_id:l})),{successLabel:`Updated`});return}r(await a(`Updating`,async()=>t(c,`PUT`,`/zones/${s.zoneId}/custom_certificates/prioritize`)),{successLabel:`Updated`})}},w={command:`prioritize`,describe:`Operations for prioritize`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},T={command:`custom-certificates`,describe:`custom-certificates`,builder:e=>e.command(p).command(h).command(_).command(y).command(x).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{T as default};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n,h as r}from"./oauth-B0ETkNcX.mjs";import{r as i}from"./auth-MQEamPN9.mjs";import{t as a}from"./output-DrpYYfnB.mjs";import{n as o,t as s}from"./progress-CsHIt3Tp.mjs";import{n as c,t as l}from"./body-parser-C-c9gfH1.mjs";import{n as u}from"./input-validation-Bav2M9F-.mjs";import{a as d,n as f}from"./prompt-DdegNPpg.mjs";import{t as p}from"./cli-types-BsTty22w.mjs";function m(e){return e.option(`common-name`,{type:`string`,description:`The common name (domain) for the CSR. Must be at most 64 characters.`}).option(`country`,{type:`string`,description:`Two-letter ISO 3166-1 alpha-2 country code.`}).option(`description`,{type:`string`,description:`Optional description for the CSR.`}).option(`key-type`,{type:`string`,description:`Key algorithm to use for the CSR. Defaults to rsa2048 if not specified.`,choices:[`rsa2048`,`p256v1`],default:`rsa2048`}).option(`locality`,{type:`string`,description:`City or locality name.`}).option(`name`,{type:`string`,description:`Human-readable name for the CSR.`}).option(`organization`,{type:`string`,description:`Organization name.`}).option(`organizational-unit`,{type:`string`,description:`Organizational unit name.`}).option(`sans`,{type:`string`,array:!0,description:`Subject Alternative Names for the CSR. At least one SAN is required.`}).option(`state`,{type:`string`,description:`State or province name.`}).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 a custom CSR.`})}const h={command:`create`,describe:`Generate a new custom Certificate Signing Request (CSR) for an account or zone. Cloudflare generates and securely stores the private key associated with the CSR.`,builder:m,handler:async f=>{if(f.dryRun){let e=f.zone===void 0?await n():void 0,t=f.zone===void 0?`accounts`:`zones`,r=f.zone??e??`<account-id>`;o({command:`cf custom-csrs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_csrs`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:f.body===void 0?l({common_name:u(f[`common-name`],`common-name`,`text`),country:u(f.country,`country`,`text`),description:u(f.description,`description`,`text`),key_type:u(f[`key-type`],`key-type`,`text`),locality:u(f.locality,`locality`,`text`),name:u(f.name,`name`,`text`),organization:u(f.organization,`organization`,`text`),organizational_unit:u(f[`organizational-unit`],`organizational-unit`,`text`),sans:f.sans,state:u(f.state,`state`,`text`)}):c(f.body)});return}let p=await i(f),m=f.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:f.zone},p,{quiet:f.quiet}):f.local?e:await t();if(m===`zones`?f.zoneId=h:f.accountId=h,f.body){let e=c(f.body);a(await s(`Creating`,async()=>p.customCsrs.create({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}if(f[`common-name`]===void 0&&(f[`common-name`]=await d(`common-name`,`The common name (domain) for the CSR. Must be at most 64 characters.`)),f.country===void 0&&(f.country=await d(`country`,`Two-letter ISO 3166-1 alpha-2 country code.`)),f.locality===void 0&&(f.locality=await d(`locality`,`City or locality name.`)),f.organization===void 0&&(f.organization=await d(`organization`,`Organization name.`)),f.sans===void 0)throw Error(`--sans is required (or pass --body with this field set).`);f.state===void 0&&(f.state=await d(`state`,`State or province name.`));let g=l({common_name:u(f[`common-name`],`common-name`,`text`),country:u(f.country,`country`,`text`),description:u(f.description,`description`,`text`),key_type:u(f[`key-type`],`key-type`,`text`),locality:u(f.locality,`locality`,`text`),name:u(f.name,`name`,`text`),organization:u(f.organization,`organization`,`text`),organizational_unit:u(f[`organizational-unit`],`organizational-unit`,`text`),sans:f.sans,state:u(f.state,`state`,`text`)});a(await s(`Creating`,async()=>p.customCsrs.create({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})}};function g(e){return e.positional(`custom-csr-id`,{type:`string`,description:`Custom CSR identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _={command:`delete <custom-csr-id>`,describe:`Delete a custom Certificate Signing Request (CSR) and its associated private key.`,builder:g,handler:async c=>{if(c.dryRun){let e=c.zone===void 0?await n():void 0,t=c.zone===void 0?`accounts`:`zones`,r=c.zone??e??`<account-id>`;o({command:`cf custom-csrs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_csrs/${c[`custom-csr-id`]==null?`<custom-csr-id>`:encodeURIComponent(String(c[`custom-csr-id`]))}`,pathParams:{"account-or-zone":String(t),"custom-csr-id":String(c[`custom-csr-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let l=await i(c),u=c.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:c.zone},l,{quiet:c.quiet}):c.local?e:await t();if(u===`zones`?c.zoneId=d:c.accountId=d,!await f({force:!!c.force})){process.stderr.write(`Aborted.
3
+ `);return}a(await s(`Deleting`,async()=>l.customCsrs.delete({account_or_zone:u,account_or_zone_id:d,custom_csr_id:c[`custom-csr-id`]})),{successLabel:`Deleted`})}};function v(e){return e.positional(`custom-csr-id`,{type:`string`,description:`Custom CSR identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <custom-csr-id>`,describe:`Retrieve details for a specific custom Certificate Signing Request (CSR).`,builder:v,handler:async c=>{if(c.dryRun){let e=c.zone===void 0?await n():void 0,t=c.zone===void 0?`accounts`:`zones`,r=c.zone??e??`<account-id>`;o({command:`cf custom-csrs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_csrs/${c[`custom-csr-id`]==null?`<custom-csr-id>`:encodeURIComponent(String(c[`custom-csr-id`]))}`,pathParams:{"account-or-zone":String(t),"custom-csr-id":String(c[`custom-csr-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let l=await i(c),u=c.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:c.zone},l,{quiet:c.quiet}):c.local?e:await t();u===`zones`?c.zoneId=d:c.accountId=d,a(await s(`Loading`,async()=>l.customCsrs.get({account_or_zone:u,account_or_zone_id:d,custom_csr_id:c[`custom-csr-id`]})),{successLabel:`Loaded`})}};function b(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of custom CSRs per page.`}).option(`order`,{type:`string`,description:`The field to sort the returned custom CSRs by.`,choices:[`name`,`account_tag`,`created_at`]}).option(`direction`,{type:`string`,description:`The direction to sort by.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List all custom Certificate Signing Requests (CSRs) for an account or zone.`,builder:p(b),handler:async c=>{let l={page:c.page,per_page:c[`per-page`],order:c.order,direction:c.direction};if(c.dryRun){let e=c.zone===void 0?await n():void 0,t=c.zone===void 0?`accounts`:`zones`,r=c.zone??e??`<account-id>`;o({command:`cf custom-csrs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_csrs`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:l,bodyKind:`none`});return}let u=await i(c),d=c.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:c.zone},u,{quiet:c.quiet}):c.local?e:await t();d===`zones`?c.zoneId=f:c.accountId=f,a(await s(`Loading`,async()=>u.customCsrs.list({account_or_zone:d,account_or_zone_id:f,...l})),{successLabel:`Loaded`})}},S={command:`custom-csrs`,describe:`custom-csrs`,builder:e=>e.command(h).command(_).command(y).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{S as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{h as e}from"./oauth-BPizUUqP.mjs";import{r as t}from"./auth-DuLchM18.mjs";import{t as n}from"./output-DgW1hQGX.mjs";import{n as r,t as i}from"./progress-B84wYh91.mjs";import{n as a,t as o}from"./body-parser-CYD7PKFC.mjs";import{n as s}from"./input-validation-BBKJRoRB.mjs";import{a as c,n as l}from"./prompt-CDtLWxNv.mjs";import{t as u}from"./cli-types-BWdZbsFE.mjs";function d(e){return e.positional(`certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`custom-hostname-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`certificate-pack-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const f={command:`delete <certificate-id>`,describe:`Delete a single custom certificate from a certificate pack that contains two bundled certificates. Deletion is subject to the following constraints. You cannot delete a certificate if it is the only remaining certificate in the pack. At least one certificate must remain in the pack.`,builder:d,handler:async a=>{if(a.dryRun){r({command:`cf custom-hostnames certificate-pack certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/custom_hostnames/${a[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(a[`custom-hostname-id`]))}/certificate_pack/${a[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(a[`certificate-pack-id`]))}/certificates/${a[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(a[`certificate-id`]))}`,pathParams:{"custom-hostname-id":String(a[`custom-hostname-id`]??``),"certificate-pack-id":String(a[`certificate-pack-id`]??``),"certificate-id":String(a[`certificate-id`]??``),"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await l({force:!!a.force})){process.stderr.write(`Aborted.
3
- `);return}n(await i(`Deleting`,async()=>o.customHostnames.certificatePack.certificates.delete({zone_id:s,custom_hostname_id:a[`custom-hostname-id`],certificate_pack_id:a[`certificate-pack-id`],certificate_id:a[`certificate-id`]})),{successLabel:`Deleted`})}};function p(e){return e.positional(`certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`custom-hostname-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`certificate-pack-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).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:`update <certificate-id>`,describe:`Replace a single custom certificate within a certificate pack that contains two bundled certificates. The replacement must adhere to the following constraints. You can only replace an RSA certificate with another RSA certificate or an ECDSA certificate with another ECDSA certificate.`,builder:p,handler:async l=>{if(l.dryRun){r({command:`cf custom-hostnames certificate-pack certificates update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/custom_hostnames/${l[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(l[`custom-hostname-id`]))}/certificate_pack/${l[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(l[`certificate-pack-id`]))}/certificates/${l[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(l[`certificate-id`]))}`,pathParams:{"custom-hostname-id":String(l[`custom-hostname-id`]??``),"certificate-pack-id":String(l[`certificate-pack-id`]??``),"certificate-id":String(l[`certificate-id`]??``),"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({custom_certificate:s(l[`custom-certificate`],`custom-certificate`,`text`),custom_key:s(l[`custom-key`],`custom-key`,`text`)}):a(l.body)});return}let u=await t(l),d=await e({zone:l.zone},u,{quiet:l.quiet});if(l.zoneId=d,l.body){let e=a(l.body);n(await i(`Updating`,async()=>u.customHostnames.certificatePack.certificates.update({body:e,zone_id:d,custom_hostname_id:l[`custom-hostname-id`],certificate_pack_id:l[`certificate-pack-id`],certificate_id:l[`certificate-id`]})),{successLabel:`Updated`});return}l[`custom-certificate`]===void 0&&(l[`custom-certificate`]=await c(`custom-certificate`,`If a custom uploaded certificate is used.`)),l[`custom-key`]===void 0&&(l[`custom-key`]=await c(`custom-key`,`The key for a custom uploaded certificate.`,{kind:`secret`}));let f=o({custom_certificate:s(l[`custom-certificate`],`custom-certificate`,`text`),custom_key:s(l[`custom-key`],`custom-key`,`text`)});n(await i(`Updating`,async()=>u.customHostnames.certificatePack.certificates.update({body:f,zone_id:d,custom_hostname_id:l[`custom-hostname-id`],certificate_pack_id:l[`certificate-pack-id`],certificate_id:l[`certificate-id`]})),{successLabel:`Updated`})}},h={command:`certificates`,describe:`Operations for certificate-pack.certificates`,builder:e=>e.command(f).command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},g={command:`certificate-pack`,describe:`Operations for certificate-pack`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.option(`custom-origin-server`,{type:`string`,description:`a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME record.`}).option(`custom-origin-sni`,{type:`string`,description:`A hostname that will be sent to your custom origin server as SNI for TLS handshake. This can be a valid subdomain of the zone or custom origin server name or the string ':request_host_header:' which will cause the host header in the request to be used as SNI. Not configurable with default/fallback origin server.`}).option(`hostname`,{type:`string`,description:`The custom hostname that will point to your hostname via CNAME.`}).option(`ssl-bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`],default:`ubiquitous`}).option(`ssl-certificate-authority`,{type:`string`,description:`The Certificate Authority that will issue the certificate.`,choices:[`digicert`,`google`,`lets_encrypt`,`ssl_com`]}).option(`ssl-cloudflare-branding`,{type:`boolean`,description:`Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.`}).option(`ssl-custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`ssl-custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`ssl-custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).option(`ssl-method`,{type:`string`,description:`Domain control validation (DCV) method used for this hostname.`,choices:[`http`,`txt`,`email`]}).option(`ssl-settings-ciphers`,{type:`string`,array:!0,description:`An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.`}).option(`ssl-settings-early-hints`,{type:`string`,description:`Whether or not Early Hints is enabled.`,choices:[`on`,`off`]}).option(`ssl-settings-http2`,{type:`string`,description:`Whether or not HTTP2 is enabled.`,choices:[`on`,`off`]}).option(`ssl-settings-min-tls-version`,{type:`string`,description:`The minimum TLS version supported.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).option(`ssl-settings-tls-1-3`,{type:`string`,description:`Whether or not TLS 1.3 is enabled.`,choices:[`on`,`off`]}).option(`ssl-type`,{type:`string`,description:`Level of validation to be used for this hostname. Domain validation (dv) must be used.`,choices:[`dv`]}).option(`ssl-wildcard`,{type:`boolean`,description:`Indicates whether the certificate covers a wildcard.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Add a new custom hostname and request that an SSL certificate be issued for it. One of three validation methods—http, txt, email—should be used, with 'http' recommended if the CNAME is already in place (or will be soon). Specifying 'email' will send an email to the WHOIS contacts on file for the base domain plus hostmaster, postmaster, webmaster, admin, administrator. If http is used and the domain is not already pointing to the Managed CNAME host, the PATCH method must be used once it is (to complete validation). Enable bundling of certificates using the custom_cert_bundle field. The bundling process requires the following condition One certificate in the bundle must use an RSA, and the other must use an ECDSA.`,builder:_,handler:async l=>{if(l.dryRun){r({command:`cf custom-hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/custom_hostnames`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({custom_origin_server:s(l[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:s(l[`custom-origin-sni`],`custom-origin-sni`,`text`),hostname:s(l.hostname,`hostname`,`text`),ssl:{bundle_method:s(l[`ssl-bundle-method`],`ssl-bundle-method`,`text`),certificate_authority:s(l[`ssl-certificate-authority`],`ssl-certificate-authority`,`text`),cloudflare_branding:l[`ssl-cloudflare-branding`],custom_certificate:s(l[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:s(l[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:s(l[`ssl-custom-key`],`ssl-custom-key`,`text`),method:s(l[`ssl-method`],`ssl-method`,`text`),settings:{ciphers:l[`ssl-settings-ciphers`],early_hints:s(l[`ssl-settings-early-hints`],`ssl-settings-early-hints`,`text`),http2:s(l[`ssl-settings-http2`],`ssl-settings-http2`,`text`),min_tls_version:s(l[`ssl-settings-min-tls-version`],`ssl-settings-min-tls-version`,`text`),tls_1_3:s(l[`ssl-settings-tls-1-3`],`ssl-settings-tls-1-3`,`text`)},type:s(l[`ssl-type`],`ssl-type`,`text`),wildcard:l[`ssl-wildcard`]}}):a(l.body)});return}let u=await t(l),d=await e({zone:l.zone},u,{quiet:l.quiet});if(l.zoneId=d,l.body){let e=a(l.body);n(await i(`Creating`,async()=>u.customHostnames.create({...e,zone_id:d})),{successLabel:`Created`});return}l.hostname===void 0&&(l.hostname=await c(`hostname`,`The custom hostname that will point to your hostname via CNAME.`));let f=o({custom_origin_server:s(l[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:s(l[`custom-origin-sni`],`custom-origin-sni`,`text`),hostname:s(l.hostname,`hostname`,`text`),ssl:{bundle_method:s(l[`ssl-bundle-method`],`ssl-bundle-method`,`text`),certificate_authority:s(l[`ssl-certificate-authority`],`ssl-certificate-authority`,`text`),cloudflare_branding:l[`ssl-cloudflare-branding`],custom_certificate:s(l[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:s(l[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:s(l[`ssl-custom-key`],`ssl-custom-key`,`text`),method:s(l[`ssl-method`],`ssl-method`,`text`),settings:{ciphers:l[`ssl-settings-ciphers`],early_hints:s(l[`ssl-settings-early-hints`],`ssl-settings-early-hints`,`text`),http2:s(l[`ssl-settings-http2`],`ssl-settings-http2`,`text`),min_tls_version:s(l[`ssl-settings-min-tls-version`],`ssl-settings-min-tls-version`,`text`),tls_1_3:s(l[`ssl-settings-tls-1-3`],`ssl-settings-tls-1-3`,`text`)},type:s(l[`ssl-type`],`ssl-type`,`text`),wildcard:l[`ssl-wildcard`]}});n(await i(`Creating`,async()=>u.customHostnames.create({...f,zone_id:d})),{successLabel:`Created`})}};function y(e){return e.positional(`custom-hostname-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`customHostnameForAZoneCustomHostnameDetails <custom-hostname-id>`,describe:`Retrieves detailed information about a specific custom hostname, including SSL certificate status, ownership verification, and origin configuration.`,builder:y,handler:async a=>{if(a.dryRun){r({command:`cf custom-hostnames customHostnameForAZoneCustomHostnameDetails`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/custom_hostnames/${a[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(a[`custom-hostname-id`]))}`,pathParams:{"custom-hostname-id":String(a[`custom-hostname-id`]??``),"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.customHostnames.customHostnameForAZoneCustomHostnameDetails({zone_id:s,custom_hostname_id:a[`custom-hostname-id`]})),{successLabel:`Loaded`})}};function x(e){return e.positional(`custom-hostname-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const S={command:`delete <custom-hostname-id>`,describe:`Permanently deletes a custom hostname and revokes any SSL certificates that were issued for it. This action cannot be undone.`,builder:x,handler:async a=>{if(a.dryRun){r({command:`cf custom-hostnames delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/custom_hostnames/${a[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(a[`custom-hostname-id`]))}`,pathParams:{"custom-hostname-id":String(a[`custom-hostname-id`]??``),"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await l({force:!!a.force})){process.stderr.write(`Aborted.
4
- `);return}n(await i(`Deleting`,async()=>o.customHostnames.delete({zone_id:s,custom_hostname_id:a[`custom-hostname-id`]})),{successLabel:`Deleted`})}};function C(e){return e.positional(`custom-hostname-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`custom-origin-server`,{type:`string`,description:`a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME record.`}).option(`custom-origin-sni`,{type:`string`,description:`A hostname that will be sent to your custom origin server as SNI for TLS handshake. This can be a valid subdomain of the zone or custom origin server name or the string ':request_host_header:' which will cause the host header in the request to be used as SNI. Not configurable with default/fallback origin server.`}).option(`ssl-bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`]}).option(`ssl-certificate-authority`,{type:`string`,description:`The Certificate Authority that will issue the certificate.`,choices:[`digicert`,`google`,`lets_encrypt`,`ssl_com`]}).option(`ssl-cloudflare-branding`,{type:`boolean`,description:`Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.`}).option(`ssl-custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`ssl-custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`ssl-custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).option(`ssl-method`,{type:`string`,description:`Domain control validation (DCV) method used for this hostname.`,choices:[`http`,`txt`,`email`]}).option(`ssl-settings-ciphers`,{type:`string`,array:!0,description:`An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.`}).option(`ssl-settings-early-hints`,{type:`string`,description:`Whether or not Early Hints is enabled.`,choices:[`on`,`off`]}).option(`ssl-settings-http2`,{type:`string`,description:`Whether or not HTTP2 is enabled.`,choices:[`on`,`off`]}).option(`ssl-settings-min-tls-version`,{type:`string`,description:`The minimum TLS version supported.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).option(`ssl-settings-tls-1-3`,{type:`string`,description:`Whether or not TLS 1.3 is enabled.`,choices:[`on`,`off`]}).option(`ssl-type`,{type:`string`,description:`Level of validation to be used for this hostname. Domain validation (dv) must be used.`,choices:[`dv`]}).option(`ssl-wildcard`,{type:`boolean`,description:`Indicates whether the certificate covers a wildcard.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`edit <custom-hostname-id>`,describe:`Modify SSL configuration for a custom hostname. When sent with SSL config that matches existing config, used to indicate that hostname should pass domain control validation (DCV). Can also be used to change validation type, e.g., from 'http' to 'email'. Bundle an existing certificate with another certificate by using the "custom_cert_bundle" field. The bundling process supports combining certificates as long as the following condition is met. One certificate must use the RSA algorithm, and the other must use the ECDSA algorithm.`,builder:C,handler:async c=>{if(c.dryRun){r({command:`cf custom-hostnames edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/custom_hostnames/${c[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(c[`custom-hostname-id`]))}`,pathParams:{"custom-hostname-id":String(c[`custom-hostname-id`]??``),"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({custom_origin_server:s(c[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:s(c[`custom-origin-sni`],`custom-origin-sni`,`text`),ssl:{bundle_method:s(c[`ssl-bundle-method`],`ssl-bundle-method`,`text`),certificate_authority:s(c[`ssl-certificate-authority`],`ssl-certificate-authority`,`text`),cloudflare_branding:c[`ssl-cloudflare-branding`],custom_certificate:s(c[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:s(c[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:s(c[`ssl-custom-key`],`ssl-custom-key`,`text`),method:s(c[`ssl-method`],`ssl-method`,`text`),settings:{ciphers:c[`ssl-settings-ciphers`],early_hints:s(c[`ssl-settings-early-hints`],`ssl-settings-early-hints`,`text`),http2:s(c[`ssl-settings-http2`],`ssl-settings-http2`,`text`),min_tls_version:s(c[`ssl-settings-min-tls-version`],`ssl-settings-min-tls-version`,`text`),tls_1_3:s(c[`ssl-settings-tls-1-3`],`ssl-settings-tls-1-3`,`text`)},type:s(c[`ssl-type`],`ssl-type`,`text`),wildcard:c[`ssl-wildcard`]}}):a(c.body)});return}let l=await t(c),u=await e({zone:c.zone},l,{quiet:c.quiet});if(c.zoneId=u,c.body){let e=a(c.body);n(await i(`Updating`,async()=>l.customHostnames.edit({...e,zone_id:u,custom_hostname_id:c[`custom-hostname-id`]})),{successLabel:`Updated`});return}let d=o({custom_origin_server:s(c[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:s(c[`custom-origin-sni`],`custom-origin-sni`,`text`),ssl:{bundle_method:s(c[`ssl-bundle-method`],`ssl-bundle-method`,`text`),certificate_authority:s(c[`ssl-certificate-authority`],`ssl-certificate-authority`,`text`),cloudflare_branding:c[`ssl-cloudflare-branding`],custom_certificate:s(c[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:s(c[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:s(c[`ssl-custom-key`],`ssl-custom-key`,`text`),method:s(c[`ssl-method`],`ssl-method`,`text`),settings:{ciphers:c[`ssl-settings-ciphers`],early_hints:s(c[`ssl-settings-early-hints`],`ssl-settings-early-hints`,`text`),http2:s(c[`ssl-settings-http2`],`ssl-settings-http2`,`text`),min_tls_version:s(c[`ssl-settings-min-tls-version`],`ssl-settings-min-tls-version`,`text`),tls_1_3:s(c[`ssl-settings-tls-1-3`],`ssl-settings-tls-1-3`,`text`)},type:s(c[`ssl-type`],`ssl-type`,`text`),wildcard:c[`ssl-wildcard`]}});n(await i(`Updating`,async()=>l.customHostnames.edit({...d,zone_id:u,custom_hostname_id:c[`custom-hostname-id`]})),{successLabel:`Updated`})}};function T(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const E={command:`delete`,describe:`Removes the fallback origin configuration for custom hostnames on a zone. Custom hostnames without specific origins will no longer have a fallback.`,builder:T,handler:async a=>{if(a.dryRun){r({command:`cf custom-hostnames fallback-origin delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await l({force:!!a.force})){process.stderr.write(`Aborted.
5
- `);return}n(await i(`Deleting`,async()=>o.customHostnames.fallbackOrigin.delete({zone_id:s})),{successLabel:`Deleted`})}};function D(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get`,describe:`Retrieves the current fallback origin configuration for custom hostnames on a zone. The fallback origin handles traffic when specific custom hostname origins are unavailable.`,builder:D,handler:async a=>{if(a.dryRun){r({command:`cf custom-hostnames fallback-origin get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.customHostnames.fallbackOrigin.get({zone_id:s})),{successLabel:`Loaded`})}};function k(e){return e.option(`origin`,{type:`string`,description:`Your origin hostname that requests to your custom hostnames will be sent to.`}).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 A={command:`update`,describe:`Updates the fallback origin configuration for custom hostnames on a zone. Sets the default origin server for custom hostname traffic.`,builder:k,handler:async l=>{if(l.dryRun){r({command:`cf custom-hostnames fallback-origin update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({origin:s(l.origin,`origin`,`text`)}):a(l.body)});return}let u=await t(l),d=await e({zone:l.zone},u,{quiet:l.quiet});if(l.zoneId=d,l.body){let e=a(l.body);n(await i(`Updating`,async()=>u.customHostnames.fallbackOrigin.update({...e,zone_id:d})),{successLabel:`Updated`});return}l.origin===void 0&&(l.origin=await c(`origin`,`Your origin hostname that requests to your custom hostnames will be sent to.`));let f=o({origin:s(l.origin,`origin`,`text`)});n(await i(`Updating`,async()=>u.customHostnames.fallbackOrigin.update({...f,zone_id:d})),{successLabel:`Updated`})}},j={command:`fallback-origin`,describe:`Operations for fallback-origin`,builder:e=>e.command(E).command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`get`,describe:`Returns custom hostname quota usage for a zone. The allocated quota is a soft limit; creating custom hostnames after usage exceeds this limit can still succeed until the hard cap is reached. Use the exceeded and hard_cap fields to track when usage is above the soft limit and when new custom hostname creation will be rejected.`,builder:M,handler:async a=>{if(a.dryRun){r({command:`cf custom-hostnames get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/custom_hostnames/quota`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.customHostnames.get({zone_id:s})),{successLabel:`Loaded`})}};function P(e){return e.option(`hostname`,{type:`string`,description:`Fully qualified domain name to match against. This parameter cannot be used with the 'id', 'hostname.exact', 'hostname.contain', or 'hostname.startsWith' parameters.`}).option(`hostname-exact`,{type:`string`,description:`Fully qualified domain name to match against. This parameter cannot be used with the 'id', 'hostname', 'hostname.contain', or 'hostname.startsWith' parameters.`}).option(`hostname-starts-with`,{type:`string`,description:`Filters hostnames by a prefix match on the hostname value. This parameter cannot be used with the 'id', 'hostname', 'hostname.exact', or 'hostname.contain' parameters.`}).option(`hostname-contain`,{type:`string`,description:`Filters hostnames by a substring match on the hostname value. This parameter cannot be used with the 'id', 'hostname', 'hostname.exact', or 'hostname.startsWith' parameters.`}).option(`id`,{type:`string`,description:`Hostname ID to match against. This ID was generated and returned during the initial custom_hostname creation. This parameter cannot be used with the 'hostname', 'hostname.exact', 'hostname.contain', or 'hostname.startsWith' parameters.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of hostnames per page.`}).option(`order`,{type:`string`,description:`Field to order hostnames by.`,choices:[`ssl`,`ssl_status`]}).option(`direction`,{type:`string`,description:`Direction to order hostnames.`,choices:[`asc`,`desc`]}).option(`ssl-status`,{type:`string`,description:`Filter by SSL certificate status.`,choices:[`initializing`,`pending_validation`,`deleted`,`pending_issuance`,`pending_deployment`,`pending_deletion`,`pending_expiration`,`expired`,`active`,`initializing_timed_out`,`validation_timed_out`,`issuance_timed_out`,`deployment_timed_out`,`deletion_timed_out`,`pending_cleanup`,`staging_deployment`,`staging_active`,`deactivating`,`inactive`,`backup_issued`,`holding_deployment`]}).option(`hostname-status`,{type:`string`,description:`Filter by the hostname's activation status.`,choices:[`active`,`pending`,`active_redeploying`,`moved`,`pending_deletion`,`deleted`,`pending_blocked`,`pending_migration`,`pending_provisioned`,`test_pending`,`test_active`,`test_active_apex`,`test_blocked`,`test_failed`,`provisioned`,`blocked`]}).option(`certificate-authority`,{type:`string`,description:`Filter by the certificate authority that issued the SSL certificate.`,choices:[`google`,`lets_encrypt`,`ssl_com`]}).option(`wildcard`,{type:`boolean`,description:`Filter by whether the custom hostname is a wildcard hostname.`}).option(`custom-origin-server`,{type:`string`,description:`Filter by custom origin server name.`}).option(`ssl`,{type:`string`,description:`Whether to filter hostnames based on if they have SSL enabled.`,choices:[`0`,`1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`list`,describe:`List, search, sort, and filter all of your custom hostnames.`,builder:u(P),handler:async a=>{let o={hostname:a.hostname,"hostname.exact":a[`hostname-exact`],"hostname.startsWith":a[`hostname-starts-with`],"hostname.contain":a[`hostname-contain`],id:a.id,page:a.page,per_page:a[`per-page`],order:a.order,direction:a.direction,ssl_status:a[`ssl-status`],hostname_status:a[`hostname-status`],certificate_authority:a[`certificate-authority`],wildcard:a.wildcard,custom_origin_server:a[`custom-origin-server`],ssl:a.ssl};if(a.dryRun){r({command:`cf custom-hostnames list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/custom_hostnames`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(a),c=await e({zone:a.zone},s,{quiet:a.quiet});a.zoneId=c,n(await i(`Loading`,async()=>s.customHostnames.list({zone_id:c,...o})),{successLabel:`Loaded`})}},I={command:`custom-hostnames`,describe:`custom-hostnames`,builder:e=>e.command(v).command(b).command(S).command(w).command(N).command(F).command(g).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{I as default};
2
+ import{h as e}from"./oauth-B0ETkNcX.mjs";import{r as t}from"./auth-MQEamPN9.mjs";import{t as n}from"./output-DrpYYfnB.mjs";import{n as r,t as i}from"./progress-CsHIt3Tp.mjs";import{n as a,t as o}from"./body-parser-C-c9gfH1.mjs";import{n as s}from"./input-validation-Bav2M9F-.mjs";import{a as c,n as l}from"./prompt-DdegNPpg.mjs";import{t as u}from"./cli-types-BsTty22w.mjs";function d(e){return e.positional(`certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`custom-hostname-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`certificate-pack-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const f={command:`delete <certificate-id>`,describe:`Delete a single custom certificate from a certificate pack that contains two bundled certificates. Deletion is subject to the following constraints. You cannot delete a certificate if it is the only remaining certificate in the pack. At least one certificate must remain in the pack.`,builder:d,handler:async a=>{if(a.dryRun){r({command:`cf custom-hostnames certificate-pack certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/custom_hostnames/${a[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(a[`custom-hostname-id`]))}/certificate_pack/${a[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(a[`certificate-pack-id`]))}/certificates/${a[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(a[`certificate-id`]))}`,pathParams:{"custom-hostname-id":String(a[`custom-hostname-id`]??``),"certificate-pack-id":String(a[`certificate-pack-id`]??``),"certificate-id":String(a[`certificate-id`]??``),"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await l({force:!!a.force})){process.stderr.write(`Aborted.
3
+ `);return}n(await i(`Deleting`,async()=>o.customHostnames.certificatePack.certificates.delete({zone_id:s,custom_hostname_id:a[`custom-hostname-id`],certificate_pack_id:a[`certificate-pack-id`],certificate_id:a[`certificate-id`]})),{successLabel:`Deleted`})}};function p(e){return e.positional(`certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`custom-hostname-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`certificate-pack-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).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:`update <certificate-id>`,describe:`Replace a single custom certificate within a certificate pack that contains two bundled certificates. The replacement must adhere to the following constraints. You can only replace an RSA certificate with another RSA certificate or an ECDSA certificate with another ECDSA certificate.`,builder:p,handler:async l=>{if(l.dryRun){r({command:`cf custom-hostnames certificate-pack certificates update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/custom_hostnames/${l[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(l[`custom-hostname-id`]))}/certificate_pack/${l[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(l[`certificate-pack-id`]))}/certificates/${l[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(l[`certificate-id`]))}`,pathParams:{"custom-hostname-id":String(l[`custom-hostname-id`]??``),"certificate-pack-id":String(l[`certificate-pack-id`]??``),"certificate-id":String(l[`certificate-id`]??``),"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({custom_certificate:s(l[`custom-certificate`],`custom-certificate`,`text`),custom_key:s(l[`custom-key`],`custom-key`,`text`)}):a(l.body)});return}let u=await t(l),d=await e({zone:l.zone},u,{quiet:l.quiet});if(l.zoneId=d,l.body){let e=a(l.body);n(await i(`Updating`,async()=>u.customHostnames.certificatePack.certificates.update({body:e,zone_id:d,custom_hostname_id:l[`custom-hostname-id`],certificate_pack_id:l[`certificate-pack-id`],certificate_id:l[`certificate-id`]})),{successLabel:`Updated`});return}l[`custom-certificate`]===void 0&&(l[`custom-certificate`]=await c(`custom-certificate`,`If a custom uploaded certificate is used.`)),l[`custom-key`]===void 0&&(l[`custom-key`]=await c(`custom-key`,`The key for a custom uploaded certificate.`,{kind:`secret`}));let f=o({custom_certificate:s(l[`custom-certificate`],`custom-certificate`,`text`),custom_key:s(l[`custom-key`],`custom-key`,`text`)});n(await i(`Updating`,async()=>u.customHostnames.certificatePack.certificates.update({body:f,zone_id:d,custom_hostname_id:l[`custom-hostname-id`],certificate_pack_id:l[`certificate-pack-id`],certificate_id:l[`certificate-id`]})),{successLabel:`Updated`})}},h={command:`certificates`,describe:`Operations for certificate-pack.certificates`,builder:e=>e.command(f).command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},g={command:`certificate-pack`,describe:`Operations for certificate-pack`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.option(`custom-origin-server`,{type:`string`,description:`a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME record.`}).option(`custom-origin-sni`,{type:`string`,description:`A hostname that will be sent to your custom origin server as SNI for TLS handshake. This can be a valid subdomain of the zone or custom origin server name or the string ':request_host_header:' which will cause the host header in the request to be used as SNI. Not configurable with default/fallback origin server.`}).option(`hostname`,{type:`string`,description:`The custom hostname that will point to your hostname via CNAME.`}).option(`ssl-bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`]}).option(`ssl-certificate-authority`,{type:`string`,description:`The Certificate Authority that will issue the certificate.`,choices:[`digicert`,`google`,`lets_encrypt`,`ssl_com`]}).option(`ssl-cloudflare-branding`,{type:`boolean`,description:`Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.`}).option(`ssl-custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`ssl-custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`ssl-custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).option(`ssl-method`,{type:`string`,description:`Domain control validation (DCV) method used for this hostname.`,choices:[`http`,`txt`,`email`]}).option(`ssl-settings-ciphers`,{type:`string`,array:!0,description:`An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.`}).option(`ssl-settings-early-hints`,{type:`string`,description:`Whether or not Early Hints is enabled.`,choices:[`on`,`off`]}).option(`ssl-settings-http2`,{type:`string`,description:`Whether or not HTTP2 is enabled.`,choices:[`on`,`off`]}).option(`ssl-settings-min-tls-version`,{type:`string`,description:`The minimum TLS version supported.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).option(`ssl-settings-tls-1-3`,{type:`string`,description:`Whether or not TLS 1.3 is enabled.`,choices:[`on`,`off`]}).option(`ssl-type`,{type:`string`,description:`Level of validation to be used for this hostname. Domain validation (dv) must be used.`,choices:[`dv`]}).option(`ssl-wildcard`,{type:`boolean`,description:`Indicates whether the certificate covers a wildcard.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Add a new custom hostname and request that an SSL certificate be issued for it. One of three validation methods—http, txt, email—should be used, with 'http' recommended if the CNAME is already in place (or will be soon). Specifying 'email' will send an email to the WHOIS contacts on file for the base domain plus hostmaster, postmaster, webmaster, admin, administrator. If http is used and the domain is not already pointing to the Managed CNAME host, the PATCH method must be used once it is (to complete validation). Enable bundling of certificates using the custom_cert_bundle field. The bundling process requires the following condition One certificate in the bundle must use an RSA, and the other must use an ECDSA.`,builder:_,handler:async l=>{if(l.dryRun){r({command:`cf custom-hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/custom_hostnames`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({custom_origin_server:s(l[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:s(l[`custom-origin-sni`],`custom-origin-sni`,`text`),hostname:s(l.hostname,`hostname`,`text`),ssl:{bundle_method:s(l[`ssl-bundle-method`],`ssl-bundle-method`,`text`),certificate_authority:s(l[`ssl-certificate-authority`],`ssl-certificate-authority`,`text`),cloudflare_branding:l[`ssl-cloudflare-branding`],custom_certificate:s(l[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:s(l[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:s(l[`ssl-custom-key`],`ssl-custom-key`,`text`),method:s(l[`ssl-method`],`ssl-method`,`text`),settings:{ciphers:l[`ssl-settings-ciphers`],early_hints:s(l[`ssl-settings-early-hints`],`ssl-settings-early-hints`,`text`),http2:s(l[`ssl-settings-http2`],`ssl-settings-http2`,`text`),min_tls_version:s(l[`ssl-settings-min-tls-version`],`ssl-settings-min-tls-version`,`text`),tls_1_3:s(l[`ssl-settings-tls-1-3`],`ssl-settings-tls-1-3`,`text`)},type:s(l[`ssl-type`],`ssl-type`,`text`),wildcard:l[`ssl-wildcard`]}}):a(l.body)});return}let u=await t(l),d=await e({zone:l.zone},u,{quiet:l.quiet});if(l.zoneId=d,l.body){let e=a(l.body);n(await i(`Creating`,async()=>u.customHostnames.create({...e,zone_id:d})),{successLabel:`Created`});return}l.hostname===void 0&&(l.hostname=await c(`hostname`,`The custom hostname that will point to your hostname via CNAME.`));let f=o({custom_origin_server:s(l[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:s(l[`custom-origin-sni`],`custom-origin-sni`,`text`),hostname:s(l.hostname,`hostname`,`text`),ssl:{bundle_method:s(l[`ssl-bundle-method`],`ssl-bundle-method`,`text`),certificate_authority:s(l[`ssl-certificate-authority`],`ssl-certificate-authority`,`text`),cloudflare_branding:l[`ssl-cloudflare-branding`],custom_certificate:s(l[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:s(l[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:s(l[`ssl-custom-key`],`ssl-custom-key`,`text`),method:s(l[`ssl-method`],`ssl-method`,`text`),settings:{ciphers:l[`ssl-settings-ciphers`],early_hints:s(l[`ssl-settings-early-hints`],`ssl-settings-early-hints`,`text`),http2:s(l[`ssl-settings-http2`],`ssl-settings-http2`,`text`),min_tls_version:s(l[`ssl-settings-min-tls-version`],`ssl-settings-min-tls-version`,`text`),tls_1_3:s(l[`ssl-settings-tls-1-3`],`ssl-settings-tls-1-3`,`text`)},type:s(l[`ssl-type`],`ssl-type`,`text`),wildcard:l[`ssl-wildcard`]}});n(await i(`Creating`,async()=>u.customHostnames.create({...f,zone_id:d})),{successLabel:`Created`})}};function y(e){return e.positional(`custom-hostname-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <custom-hostname-id>`,describe:`Permanently deletes a custom hostname and revokes any SSL certificates that were issued for it. This action cannot be undone.`,builder:y,handler:async a=>{if(a.dryRun){r({command:`cf custom-hostnames delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/custom_hostnames/${a[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(a[`custom-hostname-id`]))}`,pathParams:{"custom-hostname-id":String(a[`custom-hostname-id`]??``),"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await l({force:!!a.force})){process.stderr.write(`Aborted.
4
+ `);return}n(await i(`Deleting`,async()=>o.customHostnames.delete({zone_id:s,custom_hostname_id:a[`custom-hostname-id`]})),{successLabel:`Deleted`})}};function x(e){return e.positional(`custom-hostname-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`custom-origin-server`,{type:`string`,description:`a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME record.`}).option(`custom-origin-sni`,{type:`string`,description:`A hostname that will be sent to your custom origin server as SNI for TLS handshake. This can be a valid subdomain of the zone or custom origin server name or the string ':request_host_header:' which will cause the host header in the request to be used as SNI. Not configurable with default/fallback origin server.`}).option(`ssl-bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`]}).option(`ssl-certificate-authority`,{type:`string`,description:`The Certificate Authority that will issue the certificate.`,choices:[`digicert`,`google`,`lets_encrypt`,`ssl_com`]}).option(`ssl-cloudflare-branding`,{type:`boolean`,description:`Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.`}).option(`ssl-custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`ssl-custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`ssl-custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).option(`ssl-method`,{type:`string`,description:`Domain control validation (DCV) method used for this hostname.`,choices:[`http`,`txt`,`email`]}).option(`ssl-settings-ciphers`,{type:`string`,array:!0,description:`An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.`}).option(`ssl-settings-early-hints`,{type:`string`,description:`Whether or not Early Hints is enabled.`,choices:[`on`,`off`]}).option(`ssl-settings-http2`,{type:`string`,description:`Whether or not HTTP2 is enabled.`,choices:[`on`,`off`]}).option(`ssl-settings-min-tls-version`,{type:`string`,description:`The minimum TLS version supported.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).option(`ssl-settings-tls-1-3`,{type:`string`,description:`Whether or not TLS 1.3 is enabled.`,choices:[`on`,`off`]}).option(`ssl-type`,{type:`string`,description:`Level of validation to be used for this hostname. Domain validation (dv) must be used.`,choices:[`dv`]}).option(`ssl-wildcard`,{type:`boolean`,description:`Indicates whether the certificate covers a wildcard.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`edit <custom-hostname-id>`,describe:`Modify SSL configuration for a custom hostname. When sent with SSL config that matches existing config, used to indicate that hostname should pass domain control validation (DCV). Can also be used to change validation type, e.g., from 'http' to 'email'. Bundle an existing certificate with another certificate by using the "custom_cert_bundle" field. The bundling process supports combining certificates as long as the following condition is met. One certificate must use the RSA algorithm, and the other must use the ECDSA algorithm.`,builder:x,handler:async c=>{if(c.dryRun){r({command:`cf custom-hostnames edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/custom_hostnames/${c[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(c[`custom-hostname-id`]))}`,pathParams:{"custom-hostname-id":String(c[`custom-hostname-id`]??``),"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({custom_origin_server:s(c[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:s(c[`custom-origin-sni`],`custom-origin-sni`,`text`),ssl:{bundle_method:s(c[`ssl-bundle-method`],`ssl-bundle-method`,`text`),certificate_authority:s(c[`ssl-certificate-authority`],`ssl-certificate-authority`,`text`),cloudflare_branding:c[`ssl-cloudflare-branding`],custom_certificate:s(c[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:s(c[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:s(c[`ssl-custom-key`],`ssl-custom-key`,`text`),method:s(c[`ssl-method`],`ssl-method`,`text`),settings:{ciphers:c[`ssl-settings-ciphers`],early_hints:s(c[`ssl-settings-early-hints`],`ssl-settings-early-hints`,`text`),http2:s(c[`ssl-settings-http2`],`ssl-settings-http2`,`text`),min_tls_version:s(c[`ssl-settings-min-tls-version`],`ssl-settings-min-tls-version`,`text`),tls_1_3:s(c[`ssl-settings-tls-1-3`],`ssl-settings-tls-1-3`,`text`)},type:s(c[`ssl-type`],`ssl-type`,`text`),wildcard:c[`ssl-wildcard`]}}):a(c.body)});return}let l=await t(c),u=await e({zone:c.zone},l,{quiet:c.quiet});if(c.zoneId=u,c.body){let e=a(c.body);n(await i(`Updating`,async()=>l.customHostnames.edit({...e,zone_id:u,custom_hostname_id:c[`custom-hostname-id`]})),{successLabel:`Updated`});return}let d=o({custom_origin_server:s(c[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:s(c[`custom-origin-sni`],`custom-origin-sni`,`text`),ssl:{bundle_method:s(c[`ssl-bundle-method`],`ssl-bundle-method`,`text`),certificate_authority:s(c[`ssl-certificate-authority`],`ssl-certificate-authority`,`text`),cloudflare_branding:c[`ssl-cloudflare-branding`],custom_certificate:s(c[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:s(c[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:s(c[`ssl-custom-key`],`ssl-custom-key`,`text`),method:s(c[`ssl-method`],`ssl-method`,`text`),settings:{ciphers:c[`ssl-settings-ciphers`],early_hints:s(c[`ssl-settings-early-hints`],`ssl-settings-early-hints`,`text`),http2:s(c[`ssl-settings-http2`],`ssl-settings-http2`,`text`),min_tls_version:s(c[`ssl-settings-min-tls-version`],`ssl-settings-min-tls-version`,`text`),tls_1_3:s(c[`ssl-settings-tls-1-3`],`ssl-settings-tls-1-3`,`text`)},type:s(c[`ssl-type`],`ssl-type`,`text`),wildcard:c[`ssl-wildcard`]}});n(await i(`Updating`,async()=>l.customHostnames.edit({...d,zone_id:u,custom_hostname_id:c[`custom-hostname-id`]})),{successLabel:`Updated`})}};function C(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const w={command:`delete`,describe:`Removes the fallback origin configuration for custom hostnames on a zone. Custom hostnames without specific origins will no longer have a fallback.`,builder:C,handler:async a=>{if(a.dryRun){r({command:`cf custom-hostnames fallback-origin delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await l({force:!!a.force})){process.stderr.write(`Aborted.
5
+ `);return}n(await i(`Deleting`,async()=>o.customHostnames.fallbackOrigin.delete({zone_id:s})),{successLabel:`Deleted`})}};function T(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get`,describe:`Retrieves the current fallback origin configuration for custom hostnames on a zone. The fallback origin handles traffic when specific custom hostname origins are unavailable.`,builder:T,handler:async a=>{if(a.dryRun){r({command:`cf custom-hostnames fallback-origin get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.customHostnames.fallbackOrigin.get({zone_id:s})),{successLabel:`Loaded`})}};function D(e){return e.option(`origin`,{type:`string`,description:`Your origin hostname that requests to your custom hostnames will be sent to.`}).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 O={command:`update`,describe:`Updates the fallback origin configuration for custom hostnames on a zone. Sets the default origin server for custom hostname traffic.`,builder:D,handler:async l=>{if(l.dryRun){r({command:`cf custom-hostnames fallback-origin update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({origin:s(l.origin,`origin`,`text`)}):a(l.body)});return}let u=await t(l),d=await e({zone:l.zone},u,{quiet:l.quiet});if(l.zoneId=d,l.body){let e=a(l.body);n(await i(`Updating`,async()=>u.customHostnames.fallbackOrigin.update({...e,zone_id:d})),{successLabel:`Updated`});return}l.origin===void 0&&(l.origin=await c(`origin`,`Your origin hostname that requests to your custom hostnames will be sent to.`));let f=o({origin:s(l.origin,`origin`,`text`)});n(await i(`Updating`,async()=>u.customHostnames.fallbackOrigin.update({...f,zone_id:d})),{successLabel:`Updated`})}},k={command:`fallback-origin`,describe:`Operations for fallback-origin`,builder:e=>e.command(w).command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.positional(`custom-hostname-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get <custom-hostname-id>`,describe:`Retrieves detailed information about a specific custom hostname, including SSL certificate status, ownership verification, and origin configuration.`,builder:A,handler:async a=>{if(a.dryRun){r({command:`cf custom-hostnames get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/custom_hostnames/${a[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(a[`custom-hostname-id`]))}`,pathParams:{"custom-hostname-id":String(a[`custom-hostname-id`]??``),"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.customHostnames.get({zone_id:s,custom_hostname_id:a[`custom-hostname-id`]})),{successLabel:`Loaded`})}};function M(e){return e.option(`hostname`,{type:`string`,description:`Fully qualified domain name to match against. This parameter cannot be used with the 'id', 'hostname.exact', 'hostname.contain', or 'hostname.startsWith' parameters.`}).option(`hostname-exact`,{type:`string`,description:`Fully qualified domain name to match against. This parameter cannot be used with the 'id', 'hostname', 'hostname.contain', or 'hostname.startsWith' parameters.`}).option(`hostname-starts-with`,{type:`string`,description:`Filters hostnames by a prefix match on the hostname value. This parameter cannot be used with the 'id', 'hostname', 'hostname.exact', or 'hostname.contain' parameters.`}).option(`hostname-contain`,{type:`string`,description:`Filters hostnames by a substring match on the hostname value. This parameter cannot be used with the 'id', 'hostname', 'hostname.exact', or 'hostname.startsWith' parameters.`}).option(`id`,{type:`string`,description:`Hostname ID to match against. This ID was generated and returned during the initial custom_hostname creation. This parameter cannot be used with the 'hostname', 'hostname.exact', 'hostname.contain', or 'hostname.startsWith' parameters.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of hostnames per page.`}).option(`order`,{type:`string`,description:`Field to order hostnames by.`,choices:[`ssl`,`ssl_status`]}).option(`direction`,{type:`string`,description:`Direction to order hostnames.`,choices:[`asc`,`desc`]}).option(`ssl-status`,{type:`string`,description:`Filter by SSL certificate status.`,choices:[`initializing`,`pending_validation`,`deleted`,`pending_issuance`,`pending_deployment`,`pending_deletion`,`pending_expiration`,`expired`,`active`,`initializing_timed_out`,`validation_timed_out`,`issuance_timed_out`,`deployment_timed_out`,`deletion_timed_out`,`pending_cleanup`,`staging_deployment`,`staging_active`,`deactivating`,`inactive`,`backup_issued`,`holding_deployment`]}).option(`hostname-status`,{type:`string`,description:`Filter by the hostname's activation status.`,choices:[`active`,`pending`,`active_redeploying`,`moved`,`pending_deletion`,`deleted`,`pending_blocked`,`pending_migration`,`pending_provisioned`,`test_pending`,`test_active`,`test_active_apex`,`test_blocked`,`test_failed`,`provisioned`,`blocked`]}).option(`certificate-authority`,{type:`string`,description:`Filter by the certificate authority that issued the SSL certificate.`,choices:[`google`,`lets_encrypt`,`ssl_com`]}).option(`wildcard`,{type:`boolean`,description:`Filter by whether the custom hostname is a wildcard hostname.`}).option(`custom-origin-server`,{type:`string`,description:`Filter by custom origin server name.`}).option(`ssl`,{type:`string`,description:`Whether to filter hostnames based on if they have SSL enabled.`,choices:[`0`,`1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:`List, search, sort, and filter all of your custom hostnames.`,builder:u(M),handler:async a=>{let o={hostname:a.hostname,"hostname.exact":a[`hostname-exact`],"hostname.startsWith":a[`hostname-starts-with`],"hostname.contain":a[`hostname-contain`],id:a.id,page:a.page,per_page:a[`per-page`],order:a.order,direction:a.direction,ssl_status:a[`ssl-status`],hostname_status:a[`hostname-status`],certificate_authority:a[`certificate-authority`],wildcard:a.wildcard,custom_origin_server:a[`custom-origin-server`],ssl:a.ssl};if(a.dryRun){r({command:`cf custom-hostnames list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/custom_hostnames`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(a),c=await e({zone:a.zone},s,{quiet:a.quiet});a.zoneId=c,n(await i(`Loading`,async()=>s.customHostnames.list({zone_id:c,...o})),{successLabel:`Loaded`})}};function P(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get`,describe:`Returns custom hostname quota usage for a zone. The allocated quota is a soft limit; creating custom hostnames after usage exceeds this limit can still succeed until the hard cap is reached. Use the exceeded and hard_cap fields to track when usage is above the soft limit and when new custom hostname creation will be rejected.`,builder:P,handler:async a=>{if(a.dryRun){r({command:`cf custom-hostnames quota get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/custom_hostnames/quota`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.customHostnames.quota.get({zone_id:s})),{successLabel:`Loaded`})}},I={command:`quota`,describe:`Operations for quota`,builder:e=>e.command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},L={command:`custom-hostnames`,describe:`custom-hostnames`,builder:e=>e.command(v).command(b).command(S).command(j).command(N).command(g).command(k).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{L as default};