cf 1.0.0-beta.27 → 1.0.0-beta.29

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 (370) hide show
  1. package/README.md +10 -3
  2. package/dist/_meta/commands.json +7966 -5034
  3. package/dist/_meta/hand-written-commands.json +40 -10
  4. package/dist/_meta/schemas.json +3153 -3736
  5. package/dist/{abuse-reports-RxXqfDEW.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
  6. package/dist/{access-BxEprr2f.mjs → access-Cte4yyIz.mjs} +1 -1
  7. package/dist/{accounts-DU2ZNYqP.mjs → accounts-G-x-_cEx.mjs} +58 -57
  8. package/dist/{acm-CBCIKBJ4.mjs → acm-Bg3HqMGG.mjs} +7 -7
  9. package/dist/{addressing-BKxiLRHk.mjs → addressing-BwEofGEm.mjs} +46 -46
  10. package/dist/{agent-memory-DkBpQYUL.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
  11. package/dist/ai-DWWRIQIt.mjs +30 -0
  12. package/dist/ai-audit-CMEBz6ZP.mjs +6 -0
  13. package/dist/ai-gateway-D2s0isU-.mjs +76 -0
  14. package/dist/ai-search-a0uqr9yJ.mjs +74 -0
  15. package/dist/{ai-security-CvZfP2JC.mjs → ai-security-H_RqjRoL.mjs} +4 -4
  16. package/dist/alerting-Bgp9rE4I.mjs +52 -0
  17. package/dist/analytics-CFYM82FD.mjs +17 -0
  18. package/dist/analytics-engine-BLiEaLxb.mjs +4 -0
  19. package/dist/api-Dnt6lRJG.mjs +3 -0
  20. package/dist/{api-security-BbcvDtff.mjs → api-security-B0YtHglt.mjs} +63 -63
  21. package/dist/argo-BPwbzHY7.mjs +14 -0
  22. package/dist/{artifacts-2R2sxIKO.mjs → artifacts-B6UwC2PH.mjs} +20 -20
  23. package/dist/{audit-logs-LoBB1OO_.mjs → audit-logs-kG97iEnI.mjs} +2 -2
  24. package/dist/auth-Czr8ChBB.mjs +2 -0
  25. package/dist/auth-DA1PHaHi.mjs +2 -0
  26. package/dist/auth-Dwfa4S3h.mjs +7 -0
  27. package/dist/{auth-token-BwpERbnG.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
  28. package/dist/{autoconfig-B2w-woU0.mjs → autoconfig-B4tFR6ua.mjs} +118 -114
  29. package/dist/{basin-catalog-AgOHGiPI.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
  30. package/dist/billing-TERxOuLR.mjs +22 -0
  31. package/dist/{blocks-C8vyXIAT.mjs → blocks-C3Im7AT0.mjs} +1 -1
  32. package/dist/body-parser-HN91kAf0.mjs +2 -0
  33. package/dist/{body-unions-CjpNjwSW.mjs → body-unions-D9OSaf4M.mjs} +1 -1
  34. package/dist/{bot-management-fwxKIbaB.mjs → bot-management-SZw9jTOC.mjs} +4 -4
  35. package/dist/{botnet-feed-DCYB5kYZ.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
  36. package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
  37. package/dist/browser-run-BvjfMK3f.mjs +40 -0
  38. package/dist/build-CCwo_ydV.mjs +2 -0
  39. package/dist/build-yQOzZg6Z.mjs +2 -0
  40. package/dist/builds-tMa3sbQU.mjs +62 -0
  41. package/dist/cache-b_EPh6Is.mjs +36 -0
  42. package/dist/cf-DmvZ2L51.mjs +18 -0
  43. package/dist/{chunk-DSGVRFIS-DQwKND2c.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
  44. package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
  45. package/dist/cli-Cc7ujzAy.mjs +4 -0
  46. package/dist/{client-side-security-VmZzMy-m.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
  47. package/dist/{cloud-connector-bMlFnqP0.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
  48. package/dist/{cloudflared-Ba4KWdTO.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
  49. package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
  50. package/dist/{command-BxZBNPxG.mjs → command-BQbZw4Kx.mjs} +1 -1
  51. package/dist/command-BVct0Dvr.mjs +2 -0
  52. package/dist/{command-BiIVclNA.mjs → command-C4_lMRkw.mjs} +1 -1
  53. package/dist/command-CJ3ldWrA.mjs +2 -0
  54. package/dist/command-CyOdBNur.mjs +2 -0
  55. package/dist/command-D2XkyO1e.mjs +2 -0
  56. package/dist/command-DHODgfFZ.mjs +2 -0
  57. package/dist/command-DIIaZx_f.mjs +2 -0
  58. package/dist/command-DONwHpqZ.mjs +2 -0
  59. package/dist/command-DdYnSf-8.mjs +2 -0
  60. package/dist/command-DqOU7Ql2.mjs +2 -0
  61. package/dist/{command-pMoNdd22.mjs → command-HW7k43qu.mjs} +1 -1
  62. package/dist/command-NqM0lo4a.mjs +2 -0
  63. package/dist/command-bwVDyMv4.mjs +2 -0
  64. package/dist/command-yzqs4m83.mjs +2 -0
  65. package/dist/{completions-DRzBiqpv.mjs → completions-0YKvIyBT.mjs} +2 -2
  66. package/dist/connector-interrupts-CsunbRsr.mjs +6 -0
  67. package/dist/{connector-telemetry-events-BbAOUt9h.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
  68. package/dist/{connector-telemetry-snapshots-DcpBx7Qx.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
  69. package/dist/{connectors-D1WFLJoE.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
  70. package/dist/containers-BiA_bpPR.mjs +76 -0
  71. package/dist/{content-scan-D1GfPSL0.mjs → content-scan-4SA2nacB.mjs} +6 -6
  72. package/dist/{context-Dp4CXG22.mjs → context-BGm5_wTT.mjs} +1 -1
  73. package/dist/{cps-D4uhzg3k.mjs → cps-WDmD3V5I.mjs} +3 -3
  74. package/dist/create-DmLDMvrj.mjs +2 -0
  75. package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
  76. package/dist/custom-csrs-D-lvkyRV.mjs +18 -0
  77. package/dist/custom-hostnames-B5BQX5m6.mjs +24 -0
  78. package/dist/custom-nameservers-CZrRjcjx.mjs +12 -0
  79. package/dist/custom-pages-CWwjtfbj.mjs +38 -0
  80. package/dist/d1-N81q-FAr.mjs +50 -0
  81. package/dist/{delegate-B4bKqF7i.mjs → delegate-livNdiwK.mjs} +1 -1
  82. package/dist/delegate.mjs +1 -1
  83. package/dist/deploy-Ok4ncy06.mjs +2 -0
  84. package/dist/deploy-context-B_lLfxt7.mjs +55 -0
  85. package/dist/deploy-input-JZlEJwKB.mjs +2 -0
  86. package/dist/dev-DxbkJkzc.mjs +4 -0
  87. package/dist/{diagnostics-D1CUs2o9.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
  88. package/dist/dialog-CD94-Kzw.mjs +2 -0
  89. package/dist/discover-D9FNaCDK.mjs +2 -0
  90. package/dist/discover-DGsMj9ZN.mjs +2 -0
  91. package/dist/{dist-D5qkmHhC.mjs → dist-BxhwE-W1.mjs} +202 -193
  92. package/dist/{dls-DWBiYzY1.mjs → dls-5OXuxLAB.mjs} +8 -8
  93. package/dist/dns-Burep9O7.mjs +142 -0
  94. package/dist/{dns-firewall-DH9xIT5H.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
  95. package/dist/docs-BFVK88kB.mjs +3 -0
  96. package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-qsnRlRk6.mjs} +1 -1
  97. package/dist/{durable-objects-DF0MYpnV.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
  98. package/dist/email-auth--2KCzZNA.mjs +6 -0
  99. package/dist/email-routing-DzaExfVf.mjs +44 -0
  100. package/dist/{email-security-CnNa1YON.mjs → email-security-DwQJszzy.mjs} +71 -71
  101. package/dist/{email-sending-CpDSw-Eb.mjs → email-sending-mQd2qB-o.mjs} +21 -21
  102. package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
  103. package/dist/error-sanitization-D069tpKk.mjs +2 -0
  104. package/dist/errors-C_bGcR0X.mjs +11 -0
  105. package/dist/field-extractors-MVOizTlB.mjs +8 -0
  106. package/dist/{firewall-CY_oem-d.mjs → firewall-DtSIlkfL.mjs} +19 -19
  107. package/dist/flagship-9E5gwNki.mjs +24 -0
  108. package/dist/{fraud-CSUKLh8X.mjs → fraud-DjqhVJdf.mjs} +3 -3
  109. package/dist/generate-BzOnRBij.mjs +2 -0
  110. package/dist/generate-DfxZtpn9.mjs +2 -0
  111. package/dist/get-3XNn0upb.mjs +2 -0
  112. package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
  113. package/dist/{google-tag-gateway-C2skt6t-.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
  114. package/dist/gt-BV-jij5q.mjs +4 -0
  115. package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
  116. package/dist/{hyperdrive-FcBbpew4.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
  117. package/dist/{iam-8T74DNhH.mjs → iam-BK6N7NdQ.mjs} +31 -31
  118. package/dist/{images-C3JUaf6b.mjs → images-3bCWE6Ml.mjs} +33 -33
  119. package/dist/index.mjs +1 -1
  120. package/dist/init-BgCF9K8h.mjs +43 -0
  121. package/dist/intel-BQ58CJLt.mjs +62 -0
  122. package/dist/{interactive-CKHdGvkh.mjs → interactive-JBA3qOUa.mjs} +9 -9
  123. package/dist/{internal-CamuESs0.mjs → internal-CWPz0sBF.mjs} +2 -2
  124. package/dist/{ips-DinCNnWj.mjs → ips-3WYegiVW.mjs} +2 -2
  125. package/dist/k2-Bc_hjmiv.mjs +10 -0
  126. package/dist/kv-DbShBhhg.mjs +12 -0
  127. package/dist/{lazy-command-WB1FOuew.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
  128. package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
  129. package/dist/{live-B6AsI_E5.mjs → live-BTtMv1a6.mjs} +2 -2
  130. package/dist/load-balancers-C2hg52WA.mjs +84 -0
  131. package/dist/{local-CgBhtmON.mjs → local-B3zt9PXR.mjs} +1 -1
  132. package/dist/local-DRxctCh9.mjs +2 -0
  133. package/dist/local-runtime-BOnDiMDc.mjs +2 -0
  134. package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
  135. package/dist/log-DBAHla_W.mjs +2 -0
  136. package/dist/login-CK3nn9a5.mjs +2 -0
  137. package/dist/{login-BJHaTERg.mjs → login-DiR-buzS.mjs} +3 -3
  138. package/dist/{logpush-qhlxsioM.mjs → logpush-CitvUX-J.mjs} +22 -22
  139. package/dist/{logs-bI54CJ0w.mjs → logs-CfWHu4Ir.mjs} +14 -16
  140. package/dist/magic-network-monitoring-gU6yzzML.mjs +34 -0
  141. package/dist/{magic-transit-BwDyySHJ.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
  142. package/dist/{managed-defense-CsBBkfeQ.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
  143. package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
  144. package/dist/{mcp-CyI0sDmL.mjs → mcp-DqhQJVaz.mjs} +15 -15
  145. package/dist/{mesh-Czr0UCP4.mjs → mesh-DXVZBNDC.mjs} +12 -12
  146. package/dist/{migrate-DKDWYrz2.mjs → migrate-CmXyk9vX.mjs} +1 -1
  147. package/dist/{monetization-NUgfDtSy.mjs → monetization-CWg-mySr.mjs} +9 -9
  148. package/dist/{network-interconnects-DuIBe8fK.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
  149. package/dist/{network-B42zrBic.mjs → network-jtgq5eb4.mjs} +24 -24
  150. package/dist/o11y-eYYs59X9.mjs +88 -0
  151. package/dist/oauth-BgDZMd72.mjs +5 -0
  152. package/dist/{oauth-BLQ1-y3R.mjs → oauth-V37G-PaV.mjs} +1 -1
  153. package/dist/{observability-BxhJQCgZ.mjs → observability-CB72eC4T.mjs} +2 -2
  154. package/dist/ohttp-gateway-K9ToEft8.mjs +8 -0
  155. package/dist/organizations-BllV7l_c.mjs +70 -0
  156. package/dist/output-hFMAotFl.mjs +2 -0
  157. package/dist/package-oNVeacC9.mjs +2 -0
  158. package/dist/page-rules-BVmi-ZFW.mjs +35 -0
  159. package/dist/pages-5spcBpX1.mjs +48 -0
  160. package/dist/pay-per-crawl-BgsdGcBi.mjs +36 -0
  161. package/dist/{pay-per-use-VatiU-Nt.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
  162. package/dist/pipelines-CbtmLRxt.mjs +40 -0
  163. package/dist/{precursor-D3VH2MXT.mjs → precursor-Dk8YOKf_.mjs} +2 -2
  164. package/dist/previews-Bv1HMMtO.mjs +6 -0
  165. package/dist/progress-DE_G09u2.mjs +2 -0
  166. package/dist/project-settings-D_S-UC8I.mjs +3 -0
  167. package/dist/prompt-D274Im1O.mjs +4 -0
  168. package/dist/queues-DGCYUr4g.mjs +52 -0
  169. package/dist/r2-DtCk-Nfi.mjs +112 -0
  170. package/dist/{radar-CvLtu-Vr.mjs → radar-1CwqOsMZ.mjs} +150 -150
  171. package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
  172. package/dist/{ready-gsGEaWLL.mjs → ready-CcoEA7M7.mjs} +2 -2
  173. package/dist/{realtime-DiCEgFTC.mjs → realtime-DFUxwIG5.mjs} +80 -81
  174. package/dist/registrar-Cl1snz8z.mjs +43 -0
  175. package/dist/registrar-sandbox-Cne9BVCZ.mjs +58 -0
  176. package/dist/{reporting-BiHgnT8L.mjs → reporting-D9FC-Z-3.mjs} +7 -7
  177. package/dist/request-headers-Bopp5lH_.mjs +2 -0
  178. package/dist/request-tracers-CSSB9_aW.mjs +4 -0
  179. package/dist/resource-sharing-D8yuzJm7.mjs +36 -0
  180. package/dist/{rules-CRhe_ca9.mjs → rules-DzmOQ3MB.mjs} +8 -8
  181. package/dist/rulesets-DsTGcgbc.mjs +42 -0
  182. package/dist/{rum-BfnWHW_d.mjs → rum-DrJLI93T.mjs} +14 -14
  183. package/dist/run-C5yPsiO2.mjs +2 -0
  184. package/dist/run-CXWkMU3x.mjs +2 -0
  185. package/dist/schema-CfZOW8Zw.mjs +2 -0
  186. package/dist/{schema-cache-BIo0Gi2H.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
  187. package/dist/schema-flags-DO3kLYBu.mjs +4 -0
  188. package/dist/scim-0OufLKru.mjs +16 -0
  189. package/dist/{secrets-store-DgtzZRze.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
  190. package/dist/{security-insights-SlUGW3F_.mjs → security-insights-D2pj8-O-.mjs} +20 -20
  191. package/dist/{security-txt-C3YS0REz.mjs → security-txt-SKtgW4n-.mjs} +4 -4
  192. package/dist/session-COdP8BXD.mjs +2 -0
  193. package/dist/shared-D_2KLpP3.mjs +2 -0
  194. package/dist/{signed-url-ClLk45_J.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
  195. package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
  196. package/dist/snippets-DrrdpLnS.mjs +18 -0
  197. package/dist/spawn-DNf-Ge8d.mjs +5 -0
  198. package/dist/{spectrum-Cj0BMtg2.mjs → spectrum-CHBGZbZF.mjs} +11 -11
  199. package/dist/{speed-BrVeZRyX.mjs → speed-vOlHyG3v.mjs} +11 -11
  200. package/dist/sql-BCuLxGSf.mjs +4 -0
  201. package/dist/src-ByCoEqOw.mjs +133 -0
  202. package/dist/{ssl-Bx4LCutF.mjs → ssl-BA_dcVwF.mjs} +60 -62
  203. package/dist/startup-profile-CyQk_f_L.mjs +2 -0
  204. package/dist/{startup-profile-DqaYNT0b.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
  205. package/dist/state-B6r-b_-d.mjs +2 -0
  206. package/dist/{state-BmzOLELo.mjs → state-CTLznbVs.mjs} +1 -1
  207. package/dist/{containers-DINLx5_i.mjs → static-assets-DGDoaJf1.mjs} +216 -210
  208. package/dist/stream-CzlqY8hq.mjs +89 -0
  209. package/dist/{tags-xVzjZxdt.mjs → tags-BLeaslAb.mjs} +8 -8
  210. package/dist/telemetry-COlodX5Z.mjs +2 -0
  211. package/dist/{telemetry-CJ9URio3.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
  212. package/dist/{tenant-custom-nameservers-M7Fxqh2W.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
  213. package/dist/tenants-CRirmhxS.mjs +13 -0
  214. package/dist/{tools-C-vmgYSv.mjs → tools-BRjRgZnj.mjs} +1 -1
  215. package/dist/tunnels-nLfIWPYT.mjs +27 -0
  216. package/dist/{turnstile-B_Ugzgom.mjs → turnstile-CZjXtBCr.mjs} +10 -10
  217. package/dist/ui-dWsVmFCG.mjs +2 -0
  218. package/dist/{update-check-DRr0eRhB.mjs → update-check-CXMdVBhW.mjs} +1 -1
  219. package/dist/{update-check-DHUo4FOJ.mjs → update-check-D_Oky9-u.mjs} +1 -1
  220. package/dist/update-check-worker.mjs +1 -1
  221. package/dist/{url-normalization-CZRQH_pJ.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
  222. package/dist/url-scanner-9XW3zLaU.mjs +16 -0
  223. package/dist/user-Bk1BIqZ5.mjs +103 -0
  224. package/dist/vectorize-CgOfmWYq.mjs +30 -0
  225. package/dist/verify-B9ILCohg.mjs +2 -0
  226. package/dist/verify-BCuWaO-L.mjs +2 -0
  227. package/dist/version-CcuBNjqg.mjs +2 -0
  228. package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
  229. package/dist/{web-assets-CgQXsp8m.mjs → web-assets-CWU3jrit.mjs} +29 -29
  230. package/dist/web3-CRpQ5sl4.mjs +26 -0
  231. package/dist/workers-BZMvamn0.mjs +39 -0
  232. package/dist/{workers-for-platforms-5RkV9MVp.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
  233. package/dist/{workers-vpc-Bt4OQbwM.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
  234. package/dist/workflows-Dd88_Nqc.mjs +48 -0
  235. package/dist/{wrangler-migration-BbmGOu8l.mjs → wrangler-migration-BzMTJPdI.mjs} +302 -293
  236. package/dist/zaraz-BFK0p28R.mjs +22 -0
  237. package/dist/zero-trust-Cdjfp0Ie.mjs +1008 -0
  238. package/dist/{zones-DTAcguf6.mjs → zones-DDn5jk6I.mjs} +51 -51
  239. package/package.json +20 -20
  240. package/dist/ai-DqEN_hhg.mjs +0 -30
  241. package/dist/ai-audit-BmzOgt6x.mjs +0 -6
  242. package/dist/ai-gateway-B0uiYVHq.mjs +0 -74
  243. package/dist/ai-search-DbZIxdio.mjs +0 -74
  244. package/dist/alerting-BjGwBxZT.mjs +0 -52
  245. package/dist/analytics-C7kT_H-W.mjs +0 -17
  246. package/dist/analytics-engine-BHpcNSdD.mjs +0 -4
  247. package/dist/api-X3wKppsT.mjs +0 -3
  248. package/dist/argo-D1VONzu-.mjs +0 -14
  249. package/dist/auth-CspwoBlp.mjs +0 -2
  250. package/dist/auth-D499YE2n.mjs +0 -7
  251. package/dist/auth-FK2eLQ02.mjs +0 -2
  252. package/dist/billing-DRNww0iC.mjs +0 -24
  253. package/dist/body-parser-BKcZS9iJ.mjs +0 -2
  254. package/dist/brand-protection-BVICLzBc.mjs +0 -26
  255. package/dist/browser-run-CEk-NIgP.mjs +0 -40
  256. package/dist/build-CRm2TQq8.mjs +0 -2
  257. package/dist/build-DO_GNhRl.mjs +0 -2
  258. package/dist/builds-CoazxuN-.mjs +0 -64
  259. package/dist/cache-jlLJLSu7.mjs +0 -36
  260. package/dist/cf-hP0SOgC6.mjs +0 -18
  261. package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +0 -363
  262. package/dist/cli-Nqf58-1c.mjs +0 -4
  263. package/dist/cloudforce-one-CCaIBOAo.mjs +0 -318
  264. package/dist/command-BASaTmJc.mjs +0 -2
  265. package/dist/command-Bih1HLr3.mjs +0 -2
  266. package/dist/command-ByYf12-8.mjs +0 -2
  267. package/dist/command-C0qCuw03.mjs +0 -2
  268. package/dist/command-C2FVMd1b.mjs +0 -2
  269. package/dist/command-C4OgtX_x.mjs +0 -2
  270. package/dist/command-C5Kqc5Km.mjs +0 -2
  271. package/dist/command-CFxyp8Uo.mjs +0 -2
  272. package/dist/command-CZAR85ba.mjs +0 -2
  273. package/dist/command-CelQVrZL.mjs +0 -2
  274. package/dist/command-CrAlzysj.mjs +0 -2
  275. package/dist/command-MxFFWqMg.mjs +0 -2
  276. package/dist/connector-interrupts-CrTeSyaM.mjs +0 -6
  277. package/dist/containers-BOBEs1Gk.mjs +0 -75
  278. package/dist/create-BtmuVqVL.mjs +0 -2
  279. package/dist/csam-scanner-DOOUBeBM.mjs +0 -8
  280. package/dist/custom-csrs-DtdFo5YZ.mjs +0 -18
  281. package/dist/custom-hostnames-ccdlELaD.mjs +0 -24
  282. package/dist/custom-nameservers-p3gDjfva.mjs +0 -12
  283. package/dist/custom-pages-DAkKVzgR.mjs +0 -38
  284. package/dist/d1-CDIyRdh4.mjs +0 -52
  285. package/dist/deploy-BaC5Ty7F.mjs +0 -2
  286. package/dist/deploy-context-DTTgNGro.mjs +0 -56
  287. package/dist/deploy-input-mAy06fAI.mjs +0 -2
  288. package/dist/dev-De-HszNT.mjs +0 -4
  289. package/dist/dialog-D5lus4M4.mjs +0 -2
  290. package/dist/discover-6kAmVMPp.mjs +0 -2
  291. package/dist/discover-C06Syc2B.mjs +0 -2
  292. package/dist/dns-wMjf1t6-.mjs +0 -152
  293. package/dist/docs-BA7qslb2.mjs +0 -3
  294. package/dist/email-auth-BShMFXn4.mjs +0 -6
  295. package/dist/email-domains-CDSbVclP.mjs +0 -14
  296. package/dist/email-routing-CBCkbg_F.mjs +0 -44
  297. package/dist/error-sanitization-B025CygB.mjs +0 -2
  298. package/dist/errors-DatLr-iR.mjs +0 -11
  299. package/dist/field-extractors-BwGdMnTr.mjs +0 -8
  300. package/dist/flagship-Bat5EZCk.mjs +0 -24
  301. package/dist/generate-CeeWW3eX.mjs +0 -3
  302. package/dist/generate-D6V4Q58z.mjs +0 -2
  303. package/dist/get-Be821dio.mjs +0 -2
  304. package/dist/gt-BQkaDQDq.mjs +0 -3
  305. package/dist/healthchecks-uC43QKQd.mjs +0 -20
  306. package/dist/init-BEVVz4_P.mjs +0 -43
  307. package/dist/intel-DRy4rHrt.mjs +0 -62
  308. package/dist/k2-wsanPL3y.mjs +0 -10
  309. package/dist/kv-BLSPcEnH.mjs +0 -12
  310. package/dist/leaked-credential-checks-CSZd9hBQ.mjs +0 -16
  311. package/dist/load-balancers-gap5u4b1.mjs +0 -84
  312. package/dist/local-CFsO9Tkg.mjs +0 -2
  313. package/dist/local-runtime-CmlJ20uJ.mjs +0 -2
  314. package/dist/log-DZfik9Jk.mjs +0 -2
  315. package/dist/login-BfuOf-Yi.mjs +0 -2
  316. package/dist/magic-network-monitoring-CX3TaMTu.mjs +0 -34
  317. package/dist/managed-transforms-CUC-uAbW.mjs +0 -8
  318. package/dist/o11y-oEUpMC3O.mjs +0 -86
  319. package/dist/oauth-BmSFLp_s.mjs +0 -4
  320. package/dist/organization-CEnlXwrl.mjs +0 -70
  321. package/dist/organizations-Dt86ToxE.mjs +0 -4
  322. package/dist/origin-post-quantum-encryption-lX-uaJSL.mjs +0 -6
  323. package/dist/output-BJEgbI0G.mjs +0 -2
  324. package/dist/package-CiRJBRHO.mjs +0 -2
  325. package/dist/page-rules-J6LhwR-s.mjs +0 -38
  326. package/dist/pages-BksdnChs.mjs +0 -48
  327. package/dist/pay-per-crawl-BLcbHRoR.mjs +0 -36
  328. package/dist/pipelines-B5AoB3f3.mjs +0 -40
  329. package/dist/previews-DzJ85fsr.mjs +0 -6
  330. package/dist/progress-DLri-rA7.mjs +0 -2
  331. package/dist/project-settings-nBMEx1f-.mjs +0 -3
  332. package/dist/prompt-D0dXwuME.mjs +0 -4
  333. package/dist/queues-BsAck4To.mjs +0 -52
  334. package/dist/r2-BYjdHDEZ.mjs +0 -112
  335. package/dist/raw-fetch-DQeDx1wT.mjs +0 -2
  336. package/dist/registrar-D4wdgWpo.mjs +0 -43
  337. package/dist/registrar-sandbox-B6yopzdG.mjs +0 -58
  338. package/dist/request-headers-CoxHUNcB.mjs +0 -2
  339. package/dist/request-tracers-817HTytF.mjs +0 -4
  340. package/dist/resource-sharing-CW9xxtq5.mjs +0 -36
  341. package/dist/rulesets-CKyc-Xlx.mjs +0 -42
  342. package/dist/run-Ciw_GIrC.mjs +0 -2
  343. package/dist/run-DD45EQTm.mjs +0 -2
  344. package/dist/schema-DuLIZRhA.mjs +0 -2
  345. package/dist/schema-flags-DrqvwQNw.mjs +0 -4
  346. package/dist/scim-C4iRWNYB.mjs +0 -16
  347. package/dist/session-D2yuwO4i.mjs +0 -2
  348. package/dist/shared--uVkAAd7.mjs +0 -2
  349. package/dist/smart-shield-Dn95hqUH.mjs +0 -22
  350. package/dist/snippets-BNUKOajz.mjs +0 -18
  351. package/dist/spawn-DuT4snxu.mjs +0 -5
  352. package/dist/sql-BX1pBqj3.mjs +0 -4
  353. package/dist/src-DPnUfK4c.mjs +0 -131
  354. package/dist/startup-profile-tZNb2HGz.mjs +0 -2
  355. package/dist/state-Uwfrmw5I.mjs +0 -2
  356. package/dist/stream-BRzr6yh0.mjs +0 -89
  357. package/dist/telemetry-Pt5GpCKD.mjs +0 -2
  358. package/dist/tunnels-DQVXKUKA.mjs +0 -27
  359. package/dist/ui-FYultowZ.mjs +0 -2
  360. package/dist/url-scanner-BH4PLy16.mjs +0 -16
  361. package/dist/user-Bn82Qw0Y.mjs +0 -103
  362. package/dist/vectorize-DoVVz_sh.mjs +0 -30
  363. package/dist/version-Zr2oF8mY.mjs +0 -2
  364. package/dist/waiting-rooms-QUW131o3.mjs +0 -52
  365. package/dist/web3-TY9s6Swn.mjs +0 -26
  366. package/dist/workers-B3uJqJKc.mjs +0 -39
  367. package/dist/workers-builds-BgGY0IGk.mjs +0 -14
  368. package/dist/workflows-6m85DdqF.mjs +0 -48
  369. package/dist/zaraz-8WSJ7l0L.mjs +0 -22
  370. package/dist/zero-trust-DK0cqDZv.mjs +0 -1022
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-DKRemNCH.mjs";import{n}from"./context-Dp4CXG22.mjs";import{n as r}from"./cloudflared-Ba4KWdTO.mjs";const i={command:`curl <url>`,describe:`Run curl against an Access-protected application with its JWT injected by cloudflared.`,builder:e=>e.parserConfiguration({"populate--":!0,"parse-positional-numbers":!1,"short-option-groups":!1}).option(`allow-request`,{alias:`ar`,type:`boolean`,description:`Continue the request when no Access token is available`}).positional(`url`,{type:`string`,description:`URL of the Access application`,demandOption:!0}),handler:async i=>{if(i.local)throw Error(`--local is not supported by cf access curl.`);let a=[`access`];throw await t({mode:i.mode,local:i.local},()=>n())===`fedramp_high`&&a.push(`--fedramp`),a.push(`curl`),i[`allow-request`]&&a.push(`--allow-request`),a.push(i.url,...(i[`--`]??[]).map(String)),new e(await r(a))}};export{i as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-DKRemNCH.mjs";import{n}from"./context-Dp4CXG22.mjs";import{n as r}from"./cloudflared-Ba4KWdTO.mjs";const i={command:`login <url>`,describe:`Authenticate with an Access application and store its JWT through cloudflared.`,builder:e=>e.positional(`url`,{type:`string`,description:`URL of the Access application`,demandOption:!0}),handler:async i=>{if(i.local)throw Error(`--local is not supported by cf access login.`);let a=[`access`];throw await t({mode:i.mode,local:i.local},()=>n())===`fedramp_high`&&a.push(`--fedramp`),a.push(`login`),i.quiet&&a.push(`--quiet`),a.push(i.url),new e(await r(a))}};export{i as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-DKRemNCH.mjs";import{n}from"./context-Dp4CXG22.mjs";import{n as r,t as i}from"./cloudflared-Ba4KWdTO.mjs";function a(e){return e.option(`hostname`,{type:`string`,demandOption:!0,description:`Hostname of the Access application`}).option(`destination`,{type:`string`,description:`Destination address of the target server`}).option(`url`,{type:`string`,description:`Local host and port to forward to the Cloudflare edge`}).option(`header`,{type:`string`,array:!0,description:`Additional request header; repeat for multiple headers`}).option(`service-token-id`,{type:`string`,description:`Access service token ID`}).option(`service-token-secret`,{type:`string`,description:`Access service token secret`}).option(`log-level`,{alias:`loglevel`,type:`string`,choices:i,description:`cloudflared log level`})}const o={command:`tcp`,aliases:[`ssh`,`rdp`,`smb`],describe:`Proxy a TCP connection through Access. The command is also available as ssh, rdp, and smb.`,builder:a,handler:async i=>{if(i.local)throw Error(`--local is not supported by cf access tcp.`);let a=[`access`];await t({mode:i.mode,local:i.local},()=>n())===`fedramp_high`&&a.push(`--fedramp`),a.push(`tcp`),a.push(`--hostname`,i.hostname),i.destination&&a.push(`--destination`,i.destination),i.url&&a.push(`--url`,i.url);for(let e of i.header??[])a.push(`--header`,e);i[`service-token-id`]&&a.push(`--service-token-id`,i[`service-token-id`]),i[`log-level`]&&a.push(`--loglevel`,i[`log-level`]);let o=i[`service-token-secret`]?{TUNNEL_SERVICE_TOKEN_SECRET:i[`service-token-secret`]}:void 0;throw new e(await r(a,{env:o}))}};export{o as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{x as e}from"./dist-D5qkmHhC.mjs";import{t}from"./chunk-DSGVRFIS-DQwKND2c.mjs";import{i as n,n as r,t as i}from"./startup-profile-DqaYNT0b.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./progress-DLri-rA7.mjs";import{a as s,c,i as l,n as u,r as d,s as f}from"./build-DO_GNhRl.mjs";import{t as p}from"./deploy-input-mAy06fAI.mjs";import m from"node:path";import{writeFile as h}from"node:fs/promises";import{readBuildOutput as g}from"@cloudflare/build-output-utils";function _(e){return e.option(`outfile`,{type:`string`,description:`Output file for the startup CPU profile`,default:`worker-startup.cpuprofile`,requiresArg:!0}).option(`prebuilt`,{type:`boolean`,description:`Use existing Build Output Specification files without building`,default:!1}).option(`worker`,d)}const v={command:`check`,describe:`Profile a Worker's startup performance`,builder:_,handler:async d=>{if(d.local)throw Error(`--local is not supported by cf workers check.`);d.prebuilt||await u(d.mode,{output:d.quiet?`silent`:`stderr`,worker:d.worker});let{workers:_,rootConfig:v}=await g(process.cwd());f(d.mode,v.buildContext.mode);let y=s(_,d.worker),{wranglerConfig:b,builtConfig:x}=l(y,v),S=p(y,x);if(!S.resolvedEntryPointPath)throw new c(`Startup profiling requires a Worker entrypoint; assets-only projects cannot be profiled.`);if(S.bundleType===`commonjs`)throw new c(`Startup profiling does not support service-worker format Workers. Refer to https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/ for migration guidance.`);let C=t({name:b.name??y.config.name??`worker`,main:{name:x.manifest?.mainModule??m.basename(S.resolvedEntryPointPath),filePath:S.resolvedEntryPointPath,content:S.content,type:S.bundleType},modules:S.modules,sourceMaps:S.sourceMaps,compatibility_date:b.compatibility_date,compatibility_flags:b.compatibility_flags??[],assets:void 0,containers:void 0,migrations:void 0,exports:void 0,keepVars:void 0,keepSecrets:void 0,logpush:void 0,placement:void 0,tail_consumers:void 0,streaming_tail_consumers:void 0,limits:void 0,annotations:void 0,observability:void 0,cache:void 0,package_dependencies:void 0},e(b),{dryRun:!0,unsafe:b.unsafe}),w=await r(C),T=d.quiet?await i(C):await o(`Profiling Worker startup`,()=>i(C)),E=n(T);await h(d.outfile,JSON.stringify(T)),a({bundle:{sizeBytes:w.size,gzipSizeBytes:w.gzipSize},startup:{profileWindowMs:E.profileWindow/1e3,sampledTimeMs:E.sampledTime/1e3,activeTimeMs:E.activeTime/1e3,garbageCollectionTimeMs:E.garbageCollectionTime/1e3,idleTimeMs:E.idleTime/1e3,sampleCount:E.sampleCount},profile:d.outfile,note:`This profile was measured locally. Use it to understand where startup time is spent, not to predict startup time on Cloudflare.`},{quiet:d.quiet})}};export{v as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{d as t}from"./dist-D5qkmHhC.mjs";import{existsSync as n}from"node:fs";import{join as r}from"node:path";const i={command:`deploy [directory]`,describe:`Deploy a directory of static assets as a Pages deployment`,builder:e=>e.positional(`directory`,{type:`string`,description:`Pages build output directory (not deployed by cf)`}),handler:i=>{if(i.local)throw Error(`--local is not supported by cf pages deploy.`);let a=r(t(console).getCacheFolder(),`pages.json`);throw n(a)?console.error("Legacy Pages is not supported in `cf`. Please use `npx wrangler pages deploy` for this project."):console.error("Legacy Pages is not supported in `cf`. To deploy to the new version of Pages on Workers, use `cf deploy` instead."),new e(1)}};export{i as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-DKRemNCH.mjs";import"./api-X3wKppsT.mjs";import{t as n}from"./path-DRw6Y-nd.mjs";import{n as r}from"./auth-FK2eLQ02.mjs";import{r as i}from"./resolve-C3FmNlSO.mjs";import{t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./progress-DLri-rA7.mjs";import{t as s}from"./get-Be821dio.mjs";import{n as c,t as l}from"./cloudflared-Ba4KWdTO.mjs";const u={method:`GET`,path:e=>n`/accounts/${e.account_id}/cfd_tunnel`,query:[`name`,`is_deleted`,`existed_at`,`uuid`,`was_active_at`,`was_inactive_at`,`include_prefix`,`exclude_prefix`,`status`,`per_page`,`page`]},d=1e3;async function f(e,t,n){if(i(n))return n;let r=0,a;for(let i=1;;i++){let o=await e.send(u,{account_id:t,name:n,is_deleted:!1,page:i,per_page:d}),s=o.result??[];for(let e of s)e.name===n&&(r++,a=e.id);let c=o.result_info?.per_page||d;if(s.length<c)break}if(r===0)throw Error(`"${n}" is neither the ID nor the name of any tunnel. Run \`cf tunnels list\` to see available tunnels.`);if(r>1)throw Error(`Found multiple tunnels named "${n}". Pass the tunnel UUID instead.`);if(!a)throw Error(`Tunnel "${n}" was found but has no ID. Pass the tunnel UUID instead.`);return a}async function p(e,t,n){let r=await e.send(s,{account_id:t,tunnel_id:n});if(typeof r!=`string`||r.length===0)throw Error(`The API returned an empty token for tunnel ${n}.`);return r}function m(e){return e.positional(`tunnel`,{type:`string`,description:`Tunnel name or UUID; required unless --token is provided`}).option(`token`,{type:`string`,description:`Tunnel token supplied directly to cloudflared`}).option(`log-level`,{type:`string`,choices:l,default:`info`,description:`cloudflared log level`})}const h={command:`run [tunnel]`,describe:`Run a named Cloudflare Tunnel using the cf-managed cloudflared binary.`,builder:m,handler:async n=>{if(n.local)throw Error(`--local is not supported by cf tunnels run.`);let i=n.token,s=n.tunnel;if(!i){if(!s)throw Error(`Either a tunnel name/UUID or --token must be provided.`);i=await t(n,async()=>{let e=await r(n),t=await a();return o(`Fetching tunnel token`,async()=>{let n=await f(e,t,s);return p(e,t,n)})})}let l=[`tunnel`,`--loglevel`,n[`log-level`]];throw l.push(`run`),new e(await c(l,{env:{TUNNEL_TOKEN:i}}))}};export{h as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-DKRemNCH.mjs";import{n}from"./context-Dp4CXG22.mjs";import{n as r}from"./cloudflared-Ba4KWdTO.mjs";const i={command:`token <url>`,describe:`Print a JWT for authenticating with an Access application.`,builder:e=>e.positional(`url`,{type:`string`,description:`URL of the Access application`,demandOption:!0}),handler:async i=>{if(i.local)throw Error(`--local is not supported by cf access token.`);let a=[`access`];throw await t({mode:i.mode,local:i.local},()=>n())===`fedramp_high`&&a.push(`--fedramp`),a.push(`token`,i.url),new e(await r(a))}};export{i as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-DKRemNCH.mjs";import{n}from"./context-Dp4CXG22.mjs";import{n as r}from"./cloudflared-Ba4KWdTO.mjs";const i={command:`login`,describe:`Authorize cloudflared and download an origin certificate for locally managed tunnels.`,handler:async i=>{if(i.local)throw Error(`--local is not supported by cf tunnels login.`);let a=[`tunnel`,`login`];throw await t({mode:i.mode,local:i.local},()=>n())===`fedramp_high`&&a.push(`--fedramp`),new e(await r(a))}};export{i as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-DKRemNCH.mjs";import{n}from"./context-Dp4CXG22.mjs";import{n as r}from"./cloudflared-Ba4KWdTO.mjs";const i={command:`ssh-config`,describe:`Print an example SSH configuration for an Access application.`,builder:e=>e.option(`hostname`,{type:`string`,description:`Hostname of the Access application`}).option(`short-lived-cert`,{type:`boolean`,description:`Include short-lived certificate configuration`}),handler:async i=>{if(i.local)throw Error(`--local is not supported by cf access ssh-config.`);if(await t({mode:i.mode,local:i.local},()=>n())===`fedramp_high`)throw Error(`cf access ssh-config does not support FedRAMP because cloudflared does not include --fedramp in its generated SSH configuration.`);let a=[`access`,`ssh-config`];throw i.hostname&&a.push(`--hostname`,i.hostname),i[`short-lived-cert`]&&a.push(`--short-lived-cert`),new e(await r(a))}};export{i as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-DKRemNCH.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{t as r}from"./context-Dp4CXG22.mjs";import{t as i}from"./progress-DLri-rA7.mjs";import{t as a}from"./create-BtmuVqVL.mjs";import{n as o}from"./cloudflared-Ba4KWdTO.mjs";const s=[`cloudflared`,`http`,`tcp`,`udp`],c=[`debug`,`info`,`warn`,`error`],l=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function u(e,t){if(!l.test(e))throw Error(`${t} must be a valid UUID.`);return e}const d={command:`tail [tunnel-id]`,describe:`Stream logs from a remote cloudflared instance.`,builder:e=>e.positional(`tunnel-id`,{type:`string`,coerce:e=>u(e,`Tunnel ID`),description:`Tunnel UUID to stream logs from`}).option(`connector-id`,{type:`string`,coerce:e=>u(e,`--connector-id`),description:`Target a specific cloudflared connector`}).option(`event`,{type:`string`,choices:s,array:!0,description:`Filter by event type (may be repeated)`}).option(`level`,{type:`string`,choices:c,description:`Filter by log level`}).option(`sample`,{type:`number`,coerce:e=>{if(!Number.isFinite(e)||e<=0||e>1)throw Error(`--sample must be greater than 0.0 and no greater than 1.0.`);return e},description:`Sample log events by fraction greater than 0.0 and no greater than 1.0`}),handler:async s=>{if(s.local)throw Error(`--local is not supported by cf tunnels tail.`);let c=process.env.TUNNEL_MANAGEMENT_TOKEN;if(c!==void 0&&!c.trim())throw Error(`TUNNEL_MANAGEMENT_TOKEN must not be empty.`);if(c&&s[`tunnel-id`])throw Error(`Specify either a tunnel ID or TUNNEL_MANAGEMENT_TOKEN, not both.`);let l=c;if(!l){let e=s[`tunnel-id`];if(!e)throw Error(`Either a tunnel ID or TUNNEL_MANAGEMENT_TOKEN must be provided.`);l=await t({mode:s.mode,local:s.local},async()=>{let t=await n(s),o=await r();return i(`Fetching tunnel management token`,async()=>t.send(a,{account_id:o,tunnel_id:e,body:{resources:[`logs`]}}))})}let u=[`tail`,`--output`,`json`];if(s[`connector-id`]&&u.push(`--connector-id`,s[`connector-id`]),s.event)for(let e of s.event)u.push(`--event`,e);throw s.level&&u.push(`--level`,s.level),s.sample!==void 0&&u.push(`--sample`,String(s.sample)),s[`tunnel-id`]&&u.push(s[`tunnel-id`]),new e(await o(u,{env:{TUNNEL_MANAGEMENT_TOKEN:l}}))}};export{d as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-DKRemNCH.mjs";import{n}from"./context-Dp4CXG22.mjs";import{n as r}from"./cloudflared-Ba4KWdTO.mjs";const i={command:`ssh-gen`,describe:`Generate a short-lived certificate for an Access SSH application.`,builder:e=>e.option(`hostname`,{type:`string`,description:`Hostname of the Access application`,demandOption:!0}),handler:async i=>{if(i.local)throw Error(`--local is not supported by cf access ssh-gen.`);let a=[`access`];throw await t({mode:i.mode,local:i.local},()=>n())===`fedramp_high`&&a.push(`--fedramp`),a.push(`ssh-gen`,`--hostname`,i.hostname),new e(await r(a))}};export{i as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{n as e,t}from"./project-settings-nBMEx1f-.mjs";import{t as n}from"./output-BJEgbI0G.mjs";import{n as r}from"./generate-CeeWW3eX.mjs";import*as i from"node:path";function a(e){return e.option(`include-runtime`,{type:`boolean`,description:`Include Cloudflare Workers runtime types`,default:!0})}const o={command:`types`,describe:`Generate types from cloudflare.config.ts`,builder:a,handler:async a=>{if(a.local)throw Error(`--local is not supported by cf workers types.`);let o=e();if(o===null)throw Error(`${t} is required by cf workers types.`);let s=await r({configPath:o,mode:a.mode,includeRuntime:a.includeRuntime});n({path:i.relative(process.cwd(),s)},{quiet:a.quiet})}};export{o as default};
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";var d={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/connectors/${t.connector_id}/interrupts`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function f(e){return e.usage(`$0 connector-interrupts create <connector-id>
3
-
4
- Creates an interrupt for a Magic WAN Connector.`).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 p={command:`create <connector-id>`,describe:`Create Interrupt`,builder:f,handler:async e=>c({command:`connector-interrupts create`,classification:{safeFlags:[`reboot-purge`,`restart-purge`,`shutdown-purge`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf connector-interrupts create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/connectors/${e[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(e[`connector-id`]))}/interrupts`,pathParams:{"connector-id":String(e[`connector-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({reboot:{purge:e[`reboot-purge`]},restart:{purge:e[`restart-purge`]},shutdown:{purge:e[`shutdown-purge`]}}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(d,{body:t,account_id:f,connector_id:e[`connector-id`]}));a(n,{successLabel:`Created`});return}let p=u({reboot:{purge:e[`reboot-purge`]},restart:{purge:e[`restart-purge`]},shutdown:{purge:e[`shutdown-purge`]}}),m=await s(`Creating`,async()=>c.send(d,{body:p,account_id:f,connector_id:e[`connector-id`]}));a(m,{successLabel:`Created`})})};var m={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/connectors/${t.connector_id}/interrupts`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 connector-interrupts list
5
-
6
- Lists interrupts for a Magic WAN Connector.`).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 g={command:`list`,describe:`List Interrupts`,builder:h,handler:async e=>c({command:`connector-interrupts list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf connector-interrupts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/connectors/${e[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(e[`connector-id`]))}/interrupts`,pathParams:{"connector-id":String(e[`connector-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(m,{account_id:l,connector_id:e[`connector-id`]}));a(u,{successLabel:`Loaded`})})},_={command:`connector-interrupts`,describe:`connector-interrupts`,builder:e=>e.command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_ as default};
@@ -1,75 +0,0 @@
1
- #!/usr/bin/env node
2
- import{K as e}from"./dist-D5qkmHhC.mjs";import{t}from"./version-Zr2oF8mY.mjs";import{o as n}from"./blocks-C8vyXIAT.mjs";import"./api-X3wKppsT.mjs";import{t as r}from"./path-DRw6Y-nd.mjs";import{t as i}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as a}from"./local-CgBhtmON.mjs";import{n as o}from"./auth-FK2eLQ02.mjs";import{a as s,n as c,t as l}from"./context-Dp4CXG22.mjs";import{t as u}from"./auth-token-BwpERbnG.mjs";import{E as d,S as ee,T as f,_ as p,b as te,f as m,h as ne,p as re,s as h,t as g,u as ie,v as ae}from"./deploy-context-DTTgNGro.mjs";import{n as _}from"./request-headers-CoxHUNcB.mjs";import{t as v}from"./output-BJEgbI0G.mjs";import{t as y}from"./dry-run-gy0Hl9xo.mjs";import{t as b}from"./progress-DLri-rA7.mjs";import{n as x,t as S}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as C,n as w,t as T}from"./body-parser-BKcZS9iJ.mjs";import{n as E}from"./input-validation-D7z60HJH.mjs";import{a as D,i as O,n as k}from"./prompt-D0dXwuME.mjs";var A={method:`POST`,path:e=>r`/accounts/${e.account_id}/containers/applications`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function oe(e){return e.usage('$0 containers applications create\n\nCreate 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. Supply `name`, `scheduling_policy`, and `durable_objects`, with optional `configuration` and optional top-level `observability` settings. Deployment configuration, scaling, constraints, versions, and rollouts do not apply.').option(`configuration-authorized-keys`,{type:`string`,description:`The configuration.authorized_keys field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`configuration-command`,{type:`string`,array:!0,description:`The command that runs when the container starts, passed to the entrypoint.
3
- You can override this at run-time. If you override only the command,
4
- it gets passed to the default entrypoint specified in the image.
5
- `}).option(`configuration-entrypoint`,{type:`string`,array:!0,description:`The entry point for the container, specifying the executable to run when the container starts.
6
- You can override this at run-time. If you do, the default command from the image is ignored.
7
- Specify both entrypoint and command at run-time to completely replace the image defaults.
8
- `}).option(`configuration-environment-variables`,{type:`string`,description:`Container environment variables. Provide as a JSON array of objects or @path/to/file.json.`}).option(`configuration-image`,{type:`string`,description:`Image url.`}).option(`configuration-instance-type`,{type:`string`,description:`The instance type configures vCPU, memory, and disk.
9
-
10
- - "lite": 1/16 vCPU, 256 MiB memory, 2 GB disk
11
- - "basic": 1/4 vCPU, 1 GiB memory, 4 GB disk
12
- - "standard-1": 1/2 vCPU, 4 GiB memory, 8 GB disk
13
- - "standard-2": 1 vCPU, 6 GiB memory, 12 GB disk
14
- - "standard-3": 2 vCPU, 8 GiB memory, 16 GB disk
15
- - "standard-4": 4 vCPU, 12 GiB memory, 20 GB disk
16
- `,choices:[`lite`,`basic`,`standard-1`,`standard-2`,`standard-3`,`standard-4`]}).coerce(`configuration-instance-type`,e=>E(e,`configuration-instance-type`,`text`)).option(`configuration-observability-logs-enabled`,{type:`boolean`,description:`The configuration.observability.logs.enabled field`}).option(`configuration-wrangler-ssh-enabled`,{type:`boolean`,description:`The configuration.wrangler_ssh.enabled field`}).option(`configuration-wrangler-ssh-port`,{type:`number`,description:`The configuration.wrangler_ssh.port field`}).option(`constraints-jurisdiction`,{type:`string`,description:`Restricts placement to datacenters in the selected jurisdiction. Choose "eu", "fedramp", or "us". When combined with regions, EU supports EEUR and WEUR while FedRAMP and US support ENAM and WNAM.`}).option(`constraints-regions`,{type:`string`,array:!0,description:`The constraints.regions field`}).option(`durable-objects-namespace-id`,{type:`string`,description:`The namespace ID of the durable object namespace to use for this application.`}).option(`durable-objects-class-name`,{type:`string`,description:`The class name of the durable object.`}).option(`durable-objects-script-name`,{type:`string`,description:`The script name where the durable object class is defined.`}).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
- Defaults to 0.
18
- `}).option(`scheduling-policy`,{type:`string`,description:`Selects a scheduler-backed application. Use \`default\` when the Containers
19
- scheduler should maintain the requested number of instances and manage deployment
20
- configuration, placement, scaling, versions, and rollouts.`,choices:[`default`,`durable_object`]}).coerce(`scheduling-policy`,e=>E(e,`scheduling-policy`,`text`)).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 `name`, `scheduling_policy`, and `durable_objects`, with optional `configuration` and top-level `observability` settings. "}).conflicts(`configuration-command`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-command`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`configuration-entrypoint`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-entrypoint`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`configuration-environment-variables`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-environment-variables`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`configuration-image`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-image`,[`instances`,`max-instances`]).conflicts(`configuration-instance-type`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-instance-type`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`configuration-observability-logs-enabled`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-observability-logs-enabled`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`configuration-wrangler-ssh-enabled`,[`configuration-command`,`configuration-entrypoint`,`configuration-environment-variables`,`configuration-image`,`configuration-instance-type`,`configuration-observability-logs-enabled`,`constraints-regions`,`instances`,`max-instances`,`rollout-active-grace-period`]).conflicts(`configuration-wrangler-ssh-port`,[`configuration-command`,`configuration-entrypoint`,`configuration-environment-variables`,`configuration-image`,`configuration-instance-type`,`configuration-observability-logs-enabled`,`constraints-regions`,`instances`,`max-instances`,`rollout-active-grace-period`]).conflicts(`constraints-regions`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`constraints-regions`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`durable-objects-namespace-id`,[`durable-objects-class-name`,`durable-objects-script-name`]).conflicts(`durable-objects-class-name`,[`durable-objects-namespace-id`]).implies(`durable-objects-class-name`,[`durable-objects-script-name`]).conflicts(`durable-objects-script-name`,[`durable-objects-namespace-id`]).implies(`durable-objects-script-name`,[`durable-objects-class-name`]).conflicts(`instances`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`instances`,[`configuration-image`,`max-instances`]).conflicts(`max-instances`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`max-instances`,[`configuration-image`,`instances`]).conflicts(`rollout-active-grace-period`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`rollout-active-grace-period`,[`configuration-image`,`instances`,`max-instances`])}const se={command:`create`,describe:`Create a new application`,builder:oe,handler:async e=>S({command:`containers applications create`,classification:{safeFlags:[`configuration-instance-type`,`configuration-observability-logs-enabled`,`configuration-wrangler-ssh-enabled`,`observability-logs-enabled`,`scheduling-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers applications create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications`,pathParams:{},bodyKind:`json`,body:e.body===void 0?T({configuration:{authorized_keys:C(e[`configuration-authorized-keys`],`configuration-authorized-keys`),command:e[`configuration-command`],entrypoint:e[`configuration-entrypoint`],environment_variables:C(e[`configuration-environment-variables`],`configuration-environment-variables`),image:E(e[`configuration-image`],`configuration-image`,`text`),instance_type:e[`configuration-instance-type`],observability:{logs:{enabled:e[`configuration-observability-logs-enabled`]}},wrangler_ssh:{enabled:e[`configuration-wrangler-ssh-enabled`],port:e[`configuration-wrangler-ssh-port`]}},constraints:{jurisdiction:E(e[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:e[`constraints-regions`]},durable_objects:{namespace_id:E(e[`durable-objects-namespace-id`],`durable-objects-namespace-id`,`text`),class_name:E(e[`durable-objects-class-name`],`durable-objects-class-name`,`text`),script_name:E(e[`durable-objects-script-name`],`durable-objects-script-name`,`text`)},instances:e.instances,max_instances:e[`max-instances`],name:E(e.name,`name`,`text`),observability:{logs:{enabled:e[`observability-logs-enabled`]}},rollout_active_grace_period:e[`rollout-active-grace-period`],scheduling_policy:e[`scheduling-policy`]}):w(e.body)});return}let t=await o(e),n=e.local?a:await l();if(e.accountId=n,e.body){let r=w(e.body),i=await b(`Creating`,async()=>t.send(A,{body:r,account_id:n}));v(i,{successLabel:`Created`});return}e.name===void 0&&(e.name=await D(`name`,`The name for this application.`)),e[`scheduling-policy`]===void 0&&(e[`scheduling-policy`]=await O(`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 r=T({configuration:{authorized_keys:C(e[`configuration-authorized-keys`],`configuration-authorized-keys`),command:e[`configuration-command`],entrypoint:e[`configuration-entrypoint`],environment_variables:C(e[`configuration-environment-variables`],`configuration-environment-variables`),image:E(e[`configuration-image`],`configuration-image`,`text`),instance_type:e[`configuration-instance-type`],observability:{logs:{enabled:e[`configuration-observability-logs-enabled`]}},wrangler_ssh:{enabled:e[`configuration-wrangler-ssh-enabled`],port:e[`configuration-wrangler-ssh-port`]}},constraints:{jurisdiction:E(e[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:e[`constraints-regions`]},durable_objects:{namespace_id:E(e[`durable-objects-namespace-id`],`durable-objects-namespace-id`,`text`),class_name:E(e[`durable-objects-class-name`],`durable-objects-class-name`,`text`),script_name:E(e[`durable-objects-script-name`],`durable-objects-script-name`,`text`)},instances:e.instances,max_instances:e[`max-instances`],name:E(e.name,`name`,`text`),observability:{logs:{enabled:e[`observability-logs-enabled`]}},rollout_active_grace_period:e[`rollout-active-grace-period`],scheduling_policy:e[`scheduling-policy`]}),i=await b(`Creating`,async()=>t.send(A,{body:r,account_id:n}));v(i,{successLabel:`Created`})})};var ce={method:`DELETE`,path:e=>r`/accounts/${e.account_id}/containers/applications/${e.application_id}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function j(e){return e.usage(`$0 containers applications delete <application-id>
21
-
22
- Deletes a single application by id.`).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 M={command:`delete <application-id>`,describe:`Delete a single application by id`,builder:j,handler:async e=>S({command:`containers applications delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers applications delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?a:await l();if(e.accountId=n,!await k({force:!!e.force,message:`This operation permanently deletes the application and stops its containers.`}))return;let r=await b(`Deleting`,async()=>t.send(ce,{account_id:n,application_id:e[`application-id`]}));v(r,{successLabel:`Deleted`})})};var N={method:`PATCH`,path:e=>r`/accounts/${e.account_id}/containers/applications/${e.application_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function P(e){return e.usage("$0 containers applications edit <application-id>\n\nModifies a single application by id. Durable Object-managed application settings are published to runtime metadata without creating deployments or rollouts. Top-level `observability` for these applications supports only `logs.enabled`. The supported fields depend on the existing application's scheduling policy. For scheduler-backed applications, changes that replace instance deployment configuration, including the image, require a rollout.").positional(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`configuration-authorized-keys`,{type:`string`,description:`The configuration.authorized_keys field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`configuration-wrangler-ssh-enabled`,{type:`boolean`,description:`The configuration.wrangler_ssh.enabled field`}).option(`configuration-wrangler-ssh-port`,{type:`number`,description:`The configuration.wrangler_ssh.port field`}).option(`constraints-jurisdiction`,{type:`string`,description:`Restricts placement to datacenters in the selected jurisdiction. Choose "eu", "fedramp", or "us". When combined with regions, EU supports EEUR and WEUR while FedRAMP and US support ENAM and WNAM.`}).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
- 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. Durable Object-managed applications support only top-level observability.logs.enabled. The other fields apply to scheduler-backed applications, where deployment configuration changes such as image, resource allocation, command, and environment variables require an application rollout. `})}const F={command:`edit <application-id>`,describe:`Modify an application`,builder:P,handler:async e=>S({command:`containers applications edit`,classification:{safeFlags:[`configuration-wrangler-ssh-enabled`,`observability-logs-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers applications edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`json`,body:e.body===void 0?T({configuration:{authorized_keys:C(e[`configuration-authorized-keys`],`configuration-authorized-keys`),wrangler_ssh:{enabled:e[`configuration-wrangler-ssh-enabled`],port:e[`configuration-wrangler-ssh-port`]}},constraints:{jurisdiction:E(e[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:e[`constraints-regions`]},max_instances:e[`max-instances`],observability:{logs:{enabled:e[`observability-logs-enabled`]}},rollout_active_grace_period:e[`rollout-active-grace-period`]}):w(e.body)});return}let t=await o(e),n=e.local?a:await l();if(e.accountId=n,e.body){let r=w(e.body),i=await b(`Updating`,async()=>t.send(N,{body:r,account_id:n,application_id:e[`application-id`]}));v(i,{successLabel:`Updated`});return}let r=T({configuration:{authorized_keys:C(e[`configuration-authorized-keys`],`configuration-authorized-keys`),wrangler_ssh:{enabled:e[`configuration-wrangler-ssh-enabled`],port:e[`configuration-wrangler-ssh-port`]}},constraints:{jurisdiction:E(e[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:e[`constraints-regions`]},max_instances:e[`max-instances`],observability:{logs:{enabled:e[`observability-logs-enabled`]}},rollout_active_grace_period:e[`rollout-active-grace-period`]}),i=await b(`Updating`,async()=>t.send(N,{body:r,account_id:n,application_id:e[`application-id`]}));v(i,{successLabel:`Updated`})})};var I={method:`GET`,path:e=>r`/accounts/${e.account_id}/containers/applications/${e.application_id}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function L(e){return e.usage(`$0 containers applications get <application-id>
25
-
26
- Returns a single application by id.`).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 R={command:`get <application-id>`,describe:`Get a single application by id`,builder:L,handler:async e=>S({command:`containers applications get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers applications get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?a:await l();e.accountId=n;let r=await b(`Loading`,async()=>t.send(I,{account_id:n,application_id:e[`application-id`]}));v(r,{successLabel:`Loaded`})})};var z={method:`GET`,path:e=>r`/accounts/${e.account_id}/containers/applications/${e.application_id}/instances/${e.instance_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function B(e){return e.usage(`$0 containers applications instances get <instance-id>
27
-
28
- Returns a container instance belonging to an application.`).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 V={command:`get <instance-id>`,describe:`Get a container instance`,builder:B,handler:async e=>S({command:`containers applications instances get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers applications instances get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}/instances/${e[`instance-id`]==null?`<instance-id>`:encodeURIComponent(String(e[`instance-id`]))}`,pathParams:{"application-id":String(e[`application-id`]??``),"instance-id":String(e[`instance-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?a:await l();e.accountId=n;let r=await b(`Loading`,async()=>t.send(z,{account_id:n,application_id:e[`application-id`],instance_id:e[`instance-id`]}));v(r,{successLabel:`Loaded`})})};var H={method:`GET`,path:e=>r`/accounts/${e.account_id}/containers/applications/${e.application_id}/instances-v2`,query:[`per_page`,`page_token`,`state`,`name_prefix`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function U(e){return e.usage(`$0 containers applications instances list
29
-
30
- Lists container instances belonging to an application.`).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 100.`}).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, falling back to the actor ID when no name is known. 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 W={command:`list`,describe:`List container instances`,builder:U,handler:async e=>S({command:`containers applications instances list`,classification:{safeFlags:[`state`,`dry-run`]}},e,async()=>{let t={per_page:e[`per-page`],page_token:e[`page-token`],state:e.state,name_prefix:e[`name-prefix`]};if(e.dryRun){let n=await s();y({command:`cf containers applications instances list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}/instances-v2`,pathParams:{"application-id":String(e[`application-id`]??``)},query:t,bodyKind:`none`});return}let n=await o(e),r=e.local?a:await l();e.accountId=r;let i=await b(`Loading`,async()=>n.send(H,{account_id:r,application_id:e[`application-id`],...t}));v(i,{successLabel:`Loaded`})})},G={command:`instances`,describe:`Inspect Containers instances belonging to applications`,builder:e=>e.command(V).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var le={method:`GET`,path:e=>r`/accounts/${e.account_id}/containers/applications`,query:[`per_page`,`page_token`,`name`,`image`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,500:`InternalServerError`}};function ue(e){return e.usage(`$0 containers applications list
31
-
32
- Lists all the applications that are associated with your account.`).option(`per-page`,{type:`number`,description:"Maximum number of applications to return per page. Defaults to all, or 100 when `page_token` is set."}).option(`page-token`,{type:`string`,description:`Opaque token from a previous response to retrieve the next page.`}).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 de={command:`list`,describe:`List Applications associated with your account`,builder:ue,handler:async e=>S({command:`containers applications list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={per_page:e[`per-page`],page_token:e[`page-token`],name:e.name,image:e.image};if(e.dryRun){let e=await s();y({command:`cf containers applications list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/containers/applications`,pathParams:{},query:t,bodyKind:`none`});return}let n=await o(e),r=e.local?a:await l();e.accountId=r;let i=await b(`Loading`,async()=>n.send(le,{account_id:r,...t}));v(i,{successLabel:`Loaded`})})};var K={method:`POST`,path:e=>r`/accounts/${e.account_id}/containers/applications/${e.application_id}/rollouts`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function fe(e){return e.usage('$0 containers applications rollouts create <application-id>\n\nCreates 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"`.').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".
33
- - "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.
34
- - "full_manual": Requires manually progressing each step in the rollout using the UpdateRollout's action parameter.
35
- `,choices:[`full_auto`,`full_manual`],default:`full_auto`}).coerce(`kind`,e=>E(e,`kind`,`text`)).option(`percentage`,{type:`number`,description:`Initial target version percentage (0-100). Version sync actively replaces instances to match.
36
- Required when strategy is "new_instances" and kind is "full_manual". When strategy is "new_instances" and kind is "full_auto", omitted percentage starts at 10% or the smallest percentage that targets at least one instance. Unused for "rolling".
37
- `}).option(`step-percentage`,{type:`number`,description:`Percentage of rollout to increase in each step when "steps" is absent. Applicable values: 5, 10, 20, 25, 50, 100.
38
- These create rollouts with 20, 10, 5, 4, 2, 1 steps respectively.
39
- Only valid for "rolling" strategy.
40
- `}).option(`steps`,{type:`string`,description:`Steps defining the rollout process, used when "step_percentage" is absent.
41
- Specify only one of "step_percentage" or "steps" when creating a rollout.
42
- "steps" allow granular control over each step.
43
- Only valid for "rolling" strategy.
44
- . Provide as a JSON array of objects or @path/to/file.json.`}).option(`strategy`,{type:`string`,description:`Strategy used for the rollout.
45
- - "rolling": Step-based rollout with health gates. Actively replaces instances to reach each step's target percentage.
46
- - "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.
47
- `,choices:[`rolling`,`new_instances`]}).coerce(`strategy`,e=>E(e,`strategy`,`text`)).option(`target-configuration-authorized-keys`,{type:`string`,description:`The target_configuration.authorized_keys field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`target-configuration-command`,{type:`string`,array:!0,description:`The command that runs when the container starts, passed to the entrypoint.
48
- You can override this at run-time. If you override only the command,
49
- it gets passed to the default entrypoint specified in the image.
50
- `}).option(`target-configuration-entrypoint`,{type:`string`,array:!0,description:`The entry point for the container, specifying the executable to run when the container starts.
51
- You can override this at run-time. If you do, the default command from the image is ignored.
52
- Specify both entrypoint and command at run-time to completely replace the image defaults.
53
- `}).option(`target-configuration-environment-variables`,{type:`string`,description:`Container environment variables. Provide as a JSON array of objects or @path/to/file.json.`}).option(`target-configuration-image`,{type:`string`,description:`Image url.`}).option(`target-configuration-instance-type`,{type:`string`,description:`The instance type configures vCPU, memory, and disk.
54
-
55
- - "lite": 1/16 vCPU, 256 MiB memory, 2 GB disk
56
- - "basic": 1/4 vCPU, 1 GiB memory, 4 GB disk
57
- - "standard-1": 1/2 vCPU, 4 GiB memory, 8 GB disk
58
- - "standard-2": 1 vCPU, 6 GiB memory, 12 GB disk
59
- - "standard-3": 2 vCPU, 8 GiB memory, 16 GB disk
60
- - "standard-4": 4 vCPU, 12 GiB memory, 20 GB disk
61
- `,choices:[`lite`,`basic`,`standard-1`,`standard-2`,`standard-3`,`standard-4`],default:`lite`}).coerce(`target-configuration-instance-type`,e=>E(e,`target-configuration-instance-type`,`text`)).option(`target-configuration-observability-logs-enabled`,{type:`boolean`,description:`The target_configuration.observability.logs.enabled field`}).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 pe={command:`create <application-id>`,describe:`Create a new rollout for an application`,builder:fe,handler:async e=>S({command:`containers applications rollouts create`,classification:{safeFlags:[`kind`,`strategy`,`target-configuration-instance-type`,`target-configuration-observability-logs-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers applications rollouts create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}/rollouts`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`json`,body:e.body===void 0?T({description:E(e.description,`description`,`text`),kind:e.kind,percentage:e.percentage,step_percentage:e[`step-percentage`],steps:C(e.steps,`steps`),strategy:e.strategy,target_configuration:{authorized_keys:C(e[`target-configuration-authorized-keys`],`target-configuration-authorized-keys`),command:e[`target-configuration-command`],entrypoint:e[`target-configuration-entrypoint`],environment_variables:C(e[`target-configuration-environment-variables`],`target-configuration-environment-variables`),image:E(e[`target-configuration-image`],`target-configuration-image`,`text`),instance_type:e[`target-configuration-instance-type`],observability:{logs:{enabled:e[`target-configuration-observability-logs-enabled`]}}}}):w(e.body)});return}let t=await o(e),n=e.local?a:await l();if(e.accountId=n,e.body){let r=w(e.body),i=await b(`Creating`,async()=>t.send(K,{body:r,account_id:n,application_id:e[`application-id`]}));v(i,{successLabel:`Created`});return}e.description===void 0&&(e.description=await D(`description`,`Description of the rollout process.`)),e.strategy===void 0&&(e.strategy=await O(`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 r=T({description:E(e.description,`description`,`text`),kind:e.kind,percentage:e.percentage,step_percentage:e[`step-percentage`],steps:C(e.steps,`steps`),strategy:e.strategy,target_configuration:{authorized_keys:C(e[`target-configuration-authorized-keys`],`target-configuration-authorized-keys`),command:e[`target-configuration-command`],entrypoint:e[`target-configuration-entrypoint`],environment_variables:C(e[`target-configuration-environment-variables`],`target-configuration-environment-variables`),image:E(e[`target-configuration-image`],`target-configuration-image`,`text`),instance_type:e[`target-configuration-instance-type`],observability:{logs:{enabled:e[`target-configuration-observability-logs-enabled`]}}}}),i=await b(`Creating`,async()=>t.send(K,{body:r,account_id:n,application_id:e[`application-id`]}));v(i,{successLabel:`Created`})})},me={command:`rollouts`,describe:`Manage rollouts for scheduler-backed applications`,builder:e=>e.command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var he={method:`GET`,path:e=>r`/accounts/${e.account_id}/containers/applications/${e.application_id}/versions`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function ge(e){return e.usage('$0 containers applications versions list\n\nReturns all versions for a scheduler-backed application with `scheduling_policy: "default"`. Versions and rollouts do not apply to applications with `scheduling_policy: "durable_object"`.').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 _e={command:`list`,describe:`List all application versions`,builder:ge,handler:async e=>S({command:`containers applications versions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers applications versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}/versions`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?a:await l();e.accountId=n;let r=await b(`Loading`,async()=>t.send(he,{account_id:n,application_id:e[`application-id`]}));v(r,{successLabel:`Loaded`})})},ve={command:`versions`,describe:`Inspect versions of scheduler-backed applications`,builder:e=>e.command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ye={command:`applications`,describe:`Manage Containers applications`,builder:e=>e.command(se).command(M).command(F).command(R).command(de).command(G).command(me).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`POST`,path:e=>r`/accounts/${e.account_id}/containers/image-preparations`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function be(e){return e.usage(`$0 containers images prepare
62
-
63
- 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.`).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 xe={command:`prepare`,describe:`Prepare a container image`,builder:be,handler:async e=>S({command:`containers images prepare`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers images prepare`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/image-preparations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?T({image:E(e.image,`image`,`text`)}):w(e.body)});return}let t=await o(e),n=e.local?a:await l();if(e.accountId=n,e.body){let r=w(e.body),i=await b(`Creating`,async()=>t.send(q,{body:r,account_id:n}));v(i,{successLabel:`Created`});return}e.image===void 0&&(e.image=await D(`image`,`Image url.`));let r=T({image:E(e.image,`image`,`text`)}),i=await b(`Creating`,async()=>t.send(q,{body:r,account_id:n}));v(i,{successLabel:`Created`})})};async function J(){let t=await u(),n=await l(),r={compliance_region:await c()};return h.HEADERS=_(),m(n,t,e(r)),{accountId:n,complianceConfig:r}}function Se(e){return e.positional(`image`,{type:`string`,demandOption:!0,description:`Image and tag to delete, of the form IMAGE:TAG`}).option(`force`,{type:`boolean`,alias:`f`,default:!1,description:`Skip the deletion confirmation prompt`})}var Ce=x({command:`delete <image>`,describe:`Delete an image tag from the Cloudflare managed registry`,builder:Se,async handler(e){if(e.local)throw Error("--local is not supported with `cf containers images delete`.");if(te(e.image),!await k({force:e.force,message:`Delete ${e.image}? This action cannot be undone.`}))return;let t=await J(),r=await b(`Deleting`,()=>ne({...t,image:e.image}));v({image:e.image,...r},{quiet:e.quiet}),r.warning&&console.warn(n(r.warning))}},{command:`containers images delete`,classification:{safeFlags:[`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}});function we(e){return e.option(`filter`,{type:`string`,description:`Regex to filter repository names`})}var Te=x({command:`list`,describe:`List images in the Cloudflare managed registry`,builder:we,async handler(e){if(e.local)throw Error("--local is not supported with `cf containers images list`.");e.filter!==void 0&&new RegExp(e.filter);let t=await J(),n=await b(`Loading`,()=>ae({...t,filter:e.filter}));v(n,{quiet:e.quiet})}},{command:`containers images list`,classification:{safeFlags:[]}});const Ee={command:`images`,describe:`Operations for images`,builder:e=>e.command(i(Ce,`preview`)).command(i(Te,`preview`)).command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`POST`,path:e=>r`/accounts/${e.account_id}/containers/registries`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,409:`ConflictError`,500:`InternalServerError`}};function De(e){return e.usage(`$0 containers registries create
64
-
65
- 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.`).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,
66
- a username for Docker Hub, or a service account email for Google Artifact Registry.
67
- `}).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
68
- registry configuration and cannot be added with this endpoint.
69
- `}).option(`kind`,{type:`string`,description:"Registry provider. This must match `domain`: `DockerHub` for `docker.io`,\n`ECR` for AWS ECR, or `GAR` for Google Artifact Registry.\n",choices:[`ECR`,`DockerHub`,`GAR`]}).coerce(`kind`,e=>E(e,`kind`,`text`)).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 Oe={command:`create`,describe:`Configure a private external image registry`,builder:De,handler:async e=>S({command:`containers registries create`,classification:{safeFlags:[`is-public`,`kind`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers registries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/registries`,pathParams:{},bodyKind:`json`,body:e.body===void 0?T({auth:{private_credential:{secret_name:E(e[`auth-private-credential-secret-name`],`auth-private-credential-secret-name`,`text`),store_id:E(e[`auth-private-credential-store-id`],`auth-private-credential-store-id`,`text`)},public_credential:E(e[`auth-public-credential`],`auth-public-credential`,`text`)},domain:E(e.domain,`domain`,`text`),is_public:e[`is-public`],kind:e.kind}):w(e.body)});return}let t=await o(e),n=e.local?a:await l();if(e.accountId=n,e.body){let r=w(e.body),i=await b(`Creating`,async()=>t.send(Y,{body:r,account_id:n}));v(i,{successLabel:`Created`});return}e[`auth-private-credential-secret-name`]===void 0&&(e[`auth-private-credential-secret-name`]=await D(`auth-private-credential-secret-name`,`Name of the secret within the store.`)),e[`auth-private-credential-store-id`]===void 0&&(e[`auth-private-credential-store-id`]=await D(`auth-private-credential-store-id`,`Identifier of the Secrets Store containing the secret.`)),e[`auth-public-credential`]===void 0&&(e[`auth-public-credential`]=await D(`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. `)),e.domain===void 0&&(e.domain=await D(`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. ")),e.kind===void 0&&(e.kind=await O(`kind`,"Registry provider. This must match `domain`: `DockerHub` for `docker.io`, `ECR` for AWS ECR, or `GAR` for Google Artifact Registry. ",[`ECR`,`DockerHub`,`GAR`]));let r=T({auth:{private_credential:{secret_name:E(e[`auth-private-credential-secret-name`],`auth-private-credential-secret-name`,`text`),store_id:E(e[`auth-private-credential-store-id`],`auth-private-credential-store-id`,`text`)},public_credential:E(e[`auth-public-credential`],`auth-public-credential`,`text`)},domain:E(e.domain,`domain`,`text`),is_public:e[`is-public`],kind:e.kind}),i=await b(`Creating`,async()=>t.send(Y,{body:r,account_id:n}));v(i,{successLabel:`Created`})})};var X={method:`POST`,path:e=>r`/accounts/${e.account_id}/containers/registries/${e.domain}/credentials`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function ke(e){return e.usage(`$0 containers registries credentials generate <domain>
70
-
71
- Generates credentials for accessing a configured container image registry.`).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 Ae={command:`generate <domain>`,describe:`Generate a JWT to interact with the specified image registry.`,builder:ke,handler:async e=>S({command:`containers registries credentials generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers registries credentials generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/registries/${e.domain==null?`<domain>`:encodeURIComponent(String(e.domain))}/credentials`,pathParams:{domain:String(e.domain??``)},bodyKind:`json`,body:e.body===void 0?T({expiration_minutes:e[`expiration-minutes`],permissions:e.permissions}):w(e.body)});return}let t=await o(e),n=e.local?a:await l();if(e.accountId=n,e.body){let r=w(e.body),i=await b(`Creating`,async()=>t.send(X,{body:r,account_id:n,domain:e.domain}));v(i,{successLabel:`Created`});return}let r=T({expiration_minutes:e[`expiration-minutes`],permissions:e.permissions}),i=await b(`Creating`,async()=>t.send(X,{body:r,account_id:n,domain:e.domain}));v(i,{successLabel:`Created`})})},je={command:`credentials`,describe:`Generate image registry credentials`,builder:e=>e.command(Ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Me={method:`DELETE`,path:e=>r`/accounts/${e.account_id}/containers/registries/${e.domain}`,errors:{403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function Ne(e){return e.usage(`$0 containers registries delete <domain>
72
-
73
- Delete a registry from the account, this will prevent Containers from pulling images from the registry.`).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 Pe={command:`delete <domain>`,describe:`Delete a registry from the account`,builder:Ne,handler:async e=>S({command:`containers registries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers registries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/registries/${e.domain==null?`<domain>`:encodeURIComponent(String(e.domain))}`,pathParams:{domain:String(e.domain??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?a:await l();if(e.accountId=n,!await k({force:!!e.force,message:`This operation deletes the registry configuration. Containers will no longer be able to pull images from it.`}))return;let r=await b(`Deleting`,async()=>t.send(Me,{account_id:n,domain:e.domain}));v(r,{successLabel:`Deleted`})})};var Fe={method:`GET`,path:e=>r`/accounts/${e.account_id}/containers/registries`,errors:{401:`UnauthorizedError`,500:`InternalServerError`}};function Ie(e){return e.usage(`$0 containers registries list
74
-
75
- Get the list of configured registries in the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`Get the list of configured registries in the account`,builder:Ie,handler:async e=>S({command:`containers registries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await s();y({command:`cf containers registries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/containers/registries`,pathParams:{},bodyKind:`none`});return}let t=await o(e),n=e.local?a:await l();e.accountId=n;let r=await b(`Loading`,async()=>t.send(Fe,{account_id:n}));v(r,{successLabel:`Loaded`})})},Le={command:`registries`,describe:`Manage Containers image registries`,builder:e=>e.command(Oe).command(Pe).command(Z).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Re(e){return e.positional(`path`,{type:`string`,demandOption:!0,description:`Directory containing the Dockerfile to build`}).option(`tag`,{alias:`t`,type:`string`,demandOption:!0,description:`Name and optional tag for the built image`}).option(`push`,{alias:`p`,type:`boolean`,default:!1,description:`Push the built image to Cloudflare's managed registry`}).option(`path-to-docker`,{type:`string`,description:`Path to the Docker binary if it is not on PATH`})}var ze=x({command:`build <path>`,describe:`Build a Container image`,builder:Re,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers build`.");let n={compliance_region:t.push?await c():`public`},r=t.push?await u():``,i=g(r);p({logger:i.logger,fetchResult:i.fetchResult,fetchPagedListResult:i.fetchPagedListResult}),t.push&&m(await l(),r,e(n)),await ie({PATH:t.path,tag:t.tag,push:t.push,pathToDocker:t[`path-to-docker`]},n)}},{command:`containers build`,classification:{safeFlags:[`push`],shortFlagAliases:{p:{canonical:`push`,type:`boolean`},t:{canonical:`tag`,type:`value`}}}});function Be(e){return e.option(`tag`,{alias:`t`,type:`string`,demandOption:!0,description:`Tag of the local image to push`}).option(`path-to-docker`,{type:`string`,description:`Path to the Docker binary if it is not on PATH`})}var Ve=x({command:`push`,describe:`Push a local image to the Cloudflare managed registry`,builder:Be,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers push`.");let n=await u(),r=await l(),i={compliance_region:await c()},a=g(n);p({logger:a.logger,fetchResult:a.fetchResult,fetchPagedListResult:a.fetchPagedListResult}),m(r,n,e(i)),await ee({TAG:t.tag,pathToDocker:t[`path-to-docker`]},r,i)}},{command:`containers push`,classification:{safeFlags:[],shortFlagAliases:{t:{canonical:`tag`,type:`value`}}}});function He(e){return e.positional(`id`,{type:`string`,demandOption:!0,description:`ID of the container instance`}).positional(`ssh-command`,{type:`string`,array:!0,description:`Command and arguments to run in the container`}).options(re).middleware(e=>{f(e)&&(e.quiet=!0)},!0).parserConfiguration({"populate--":!0,"unknown-options-as-args":!0,"parse-positional-numbers":!1})}const Q={command:`ssh <id> [ssh-command..]`,describe:`SSH into a container`,builder:He,handler:async n=>{if(n.local)throw Error("--local is not supported with `cf containers ssh`.");let r=await u(),i=await l(),a={compliance_region:await c()},o=g(r);p({logger:o.logger,fetchResult:o.fetchResult}),h.HEADERS=_(),m(i,r,e(a)),await d({...n,id:n.id,command:[...n[`ssh-command`]??[],...Array.isArray(n[`--`])?n[`--`].map(String):[]]},t)}},$=x(Q,{command:`containers ssh`,recordArgs:!1});var Ue={...$,handler:async e=>{if(f(e)){let{markCommandReported:t}=await import(`./telemetry-CJ9URio3.mjs`);return t(),Q.handler(e)}return $.handler(e)}};const We={command:`containers`,describe:`Deploy and manage Containers applications on Cloudflare's global network`,builder:e=>e.command(i(ze,`preview`)).command(i(Ve,`preview`)).command(i(Ue,`preview`)).command(ye).command(Ee).command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{We as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";var t={method:`POST`,path:t=>e`/accounts/${t.account_id}/cfd_tunnel/${t.tunnel_id}/management`,body:`json`};export{t};
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-FK2eLQ02.mjs";import{i as n}from"./context-Dp4CXG22.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-DLri-rA7.mjs";import{t as o}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as s,r as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";var d={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/settings/csam_scanner_third_party`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function f(e){return e.usage("$0 csam-scanner edit\n\nUpdate the CSAM Scanner configuration for a zone. Allows enabling or disabling CSAM scanning, updating the notification email, and configuring scanning sources. This is a partial update: fields omitted from `value` keep their current setting, and `sources` is merged per source (`null` clears all sources). Send an empty `email` to clear the notification address. When a new email is provided, email verification is triggered automatically. The `enabled` field is a toggle; the server may adjust it based on whether the notification email is verified. Returns 403 if the zone or account is locked by Trust & Safety.").option(`id`,{type:`string`,description:`The feature identifier.`,choices:[`csam_scanner`]}).coerce(`id`,e=>u(e,`id`,`text`)).option(`value-email`,{type:`string`,description:`Notification email address for CSAM scan results. When changed,
3
- email verification is triggered automatically.
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
- Write-only; never appears in responses (omitted when false).
6
- `}).option(`value-sources`,{type:`string`,description:`Map of scanning sources and their enabled state. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating CSAM Scanner configuration. `})}const p={command:`edit`,describe:`Update CSAM Scanner setting`,builder:f,handler:async e=>o({command:`csam-scanner edit`,classification:{safeFlags:[`id`,`value-enabled`,`value-resend-email`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf csam-scanner edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/csam_scanner_third_party`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({id:e.id,value:{email:u(e[`value-email`],`value-email`,`text`),enabled:e[`value-enabled`],resend_email:e[`value-resend-email`],sources:c(e[`value-sources`],`value-sources`)}},[[`value`,`sources`]]):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(d,{body:t,zone_id:f}));r(n,{successLabel:`Updated`});return}let p=l({id:e.id,value:{email:u(e[`value-email`],`value-email`,`text`),enabled:e[`value-enabled`],resend_email:e[`value-resend-email`],sources:c(e[`value-sources`],`value-sources`)}},[[`value`,`sources`]]),m=await a(`Updating`,async()=>o.send(d,{body:p,zone_id:f}));r(m,{successLabel:`Updated`})})};var m={method:`GET`,path:t=>e`/zones/${t.zone_id}/settings/csam_scanner_third_party`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 csam-scanner get
7
-
8
- Retrieve the current CSAM Scanner configuration for a zone. The notification email is masked by default in responses.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get`,describe:`Get CSAM Scanner setting`,builder:h,handler:async e=>o({command:`csam-scanner get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf csam-scanner get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/csam_scanner_third_party`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(m,{zone_id:s}));r(c,{successLabel:`Loaded`})})},_={command:`csam-scanner`,describe:`csam-scanner`,builder:e=>e.command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_ as default};
@@ -1,18 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-D0dXwuME.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_csrs`,body:`json`};function g(e){return e.usage(`$0 custom-csrs create
3
-
4
- 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.
5
-
6
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).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`}).coerce(`key-type`,e=>f(e,`key-type`,`text`)).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 _={command:`create`,describe:`Create Custom CSR`,builder:g,handler:async e=>l({command:`custom-csrs create`,classification:{safeFlags:[`key-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-csrs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_csrs`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?d({common_name:f(e[`common-name`],`common-name`,`text`),country:f(e.country,`country`,`text`),description:f(e.description,`description`,`text`),key_type:e[`key-type`],locality:f(e.locality,`locality`,`text`),name:f(e.name,`name`,`text`),organization:f(e.organization,`organization`,`text`),organizational_unit:f(e[`organizational-unit`],`organizational-unit`,`text`),sans:e.sans,state:f(e.state,`state`,`text`)}):u(e.body)});return}let l=await n(e),m=e.zone===void 0?`accounts`:`zones`,g=m===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(m===`zones`?e.zoneId=g:e.accountId=g,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(h,{body:t,account_or_zone:m,account_or_zone_id:g}));o(n,{successLabel:`Created`});return}if(e[`common-name`]===void 0&&(e[`common-name`]=await p(`common-name`,`The common name (domain) for the CSR. Must be at most 64 characters.`)),e.country===void 0&&(e.country=await p(`country`,`Two-letter ISO 3166-1 alpha-2 country code.`)),e.locality===void 0&&(e.locality=await p(`locality`,`City or locality name.`)),e.organization===void 0&&(e.organization=await p(`organization`,`Organization name.`)),e.sans===void 0)throw Error(`--sans is required (or pass --body with this field set).`);e.state===void 0&&(e.state=await p(`state`,`State or province name.`));let _=d({common_name:f(e[`common-name`],`common-name`,`text`),country:f(e.country,`country`,`text`),description:f(e.description,`description`,`text`),key_type:e[`key-type`],locality:f(e.locality,`locality`,`text`),name:f(e.name,`name`,`text`),organization:f(e.organization,`organization`,`text`),organizational_unit:f(e[`organizational-unit`],`organizational-unit`,`text`),sans:e.sans,state:f(e.state,`state`,`text`)}),v=await c(`Creating`,async()=>l.send(h,{body:_,account_or_zone:m,account_or_zone_id:g}));o(v,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_csrs/${t.custom_csr_id}`};function y(e){return e.usage(`$0 custom-csrs delete <custom-csr-id>
7
-
8
- Delete a custom Certificate Signing Request (CSR) and its associated private key.
9
-
10
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).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 b={command:`delete <custom-csr-id>`,describe:`Delete Custom CSR`,builder:y,handler:async e=>l({command:`custom-csrs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-csrs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_csrs/${e[`custom-csr-id`]==null?`<custom-csr-id>`:encodeURIComponent(String(e[`custom-csr-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"custom-csr-id":String(e[`custom-csr-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=d:e.accountId=d,!await m({force:!!e.force}))return;let f=await c(`Deleting`,async()=>l.send(v,{account_or_zone:u,account_or_zone_id:d,custom_csr_id:e[`custom-csr-id`]}));o(f,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_csrs/${t.custom_csr_id}`};function S(e){return e.usage(`$0 custom-csrs get <custom-csr-id>
11
-
12
- Retrieve details for a specific custom Certificate Signing Request (CSR).
13
-
14
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).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 C={command:`get <custom-csr-id>`,describe:`Custom CSR Details`,builder:S,handler:async e=>l({command:`custom-csrs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-csrs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_csrs/${e[`custom-csr-id`]==null?`<custom-csr-id>`:encodeURIComponent(String(e[`custom-csr-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"custom-csr-id":String(e[`custom-csr-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(x,{account_or_zone:u,account_or_zone_id:d,custom_csr_id:e[`custom-csr-id`]}));o(f,{successLabel:`Loaded`})})};var w={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_csrs`,query:[`page`,`per_page`,`order`,`direction`]};function T(e){return e.usage(`$0 custom-csrs list
15
-
16
- List all custom Certificate Signing Requests (CSRs) for an account or zone.
17
-
18
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).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 E={command:`list`,describe:`List Custom CSRs`,builder:T,handler:async e=>l({command:`custom-csrs list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let l={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-csrs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_csrs`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(w,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})},D={command:`custom-csrs`,describe:`custom-csrs`,builder:e=>e.command(_).command(b).command(C).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{D as default};
@@ -1,24 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-FK2eLQ02.mjs";import{i as n}from"./context-Dp4CXG22.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-DLri-rA7.mjs";import{t as o}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as s,n as c,r as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-D0dXwuME.mjs";var m={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}/certificate_pack/${t.certificate_pack_id}/certificates/${t.certificate_id}`};function h(e){return e.usage(`$0 custom-hostnames certificate-pack certificates delete <certificate-id>
3
-
4
- 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.`).positional(`certificate-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`custom-hostname-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`certificate-pack-id`,{type:`string`,description:`Custom hostname 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 g={command:`delete <certificate-id>`,describe:`Delete Single Certificate And Key For Custom Hostname`,builder:h,handler:async e=>o({command:`custom-hostnames certificate-pack certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames certificate-pack certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}/certificate_pack/${e[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(e[`certificate-pack-id`]))}/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``),"certificate-pack-id":String(e[`certificate-pack-id`]??``),"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(m,{zone_id:s,custom_hostname_id:e[`custom-hostname-id`],certificate_pack_id:e[`certificate-pack-id`],certificate_id:e[`certificate-id`]}));r(c,{successLabel:`Deleted`})})};var _={method:`PUT`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}/certificate_pack/${t.certificate_pack_id}/certificates/${t.certificate_id}`,body:`json`};function v(e){return e.usage(`$0 custom-hostnames certificate-pack certificates update <certificate-id>
5
-
6
- 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.`).positional(`certificate-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`custom-hostname-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`certificate-pack-id`,{type:`string`,description:`Custom hostname identifier tag.`,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 y={command:`update <certificate-id>`,describe:`Replace Custom Certificate and Custom Key In Custom Hostname`,builder:v,handler:async e=>o({command:`custom-hostnames certificate-pack certificates update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames certificate-pack certificates update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}/certificate_pack/${e[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(e[`certificate-pack-id`]))}/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``),"certificate-pack-id":String(e[`certificate-pack-id`]??``),"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({custom_certificate:d(e[`custom-certificate`],`custom-certificate`,`text`),custom_key:d(e[`custom-key`],`custom-key`,`text`)}):c(e.body),sensitiveBodyPaths:[[`custom_key`]]});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,e.body){let t=c(e.body),n=await a(`Updating`,async()=>o.send(_,{body:t,zone_id:s,custom_hostname_id:e[`custom-hostname-id`],certificate_pack_id:e[`certificate-pack-id`],certificate_id:e[`certificate-id`]}));r(n,{successLabel:`Updated`});return}e[`custom-certificate`]===void 0&&(e[`custom-certificate`]=await f(`custom-certificate`,`If a custom uploaded certificate is used.`)),e[`custom-key`]===void 0&&(e[`custom-key`]=await f(`custom-key`,`The key for a custom uploaded certificate.`,{kind:`secret`}));let l=u({custom_certificate:d(e[`custom-certificate`],`custom-certificate`,`text`),custom_key:d(e[`custom-key`],`custom-key`,`text`)}),p=await a(`Updating`,async()=>o.send(_,{body:l,zone_id:s,custom_hostname_id:e[`custom-hostname-id`],certificate_pack_id:e[`certificate-pack-id`],certificate_id:e[`certificate-id`]}));r(p,{successLabel:`Updated`})})},b={command:`certificates`,describe:`Operations for certificate-pack.certificates`,builder:e=>e.command(g).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},x={command:`certificate-pack`,describe:`Operations for certificate-pack`,builder:e=>e.command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var S={method:`POST`,path:t=>e`/zones/${t.zone_id}/custom_hostnames`,body:`json`};function C(e){return e.usage(`$0 custom-hostnames create
7
-
8
- 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.`).option(`custom-metadata`,{type:`string`,description:`Unique key/value metadata for this hostname. These are per-hostname (customer) settings. Provide as a JSON object or @path/to/file.json.`}).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`]}).coerce(`ssl-bundle-method`,e=>d(e,`ssl-bundle-method`,`text`)).option(`ssl-certificate-authority`,{type:`string`,description:`The Certificate Authority that will issue the certificate.`,choices:[`digicert`,`google`,`lets_encrypt`,`ssl_com`]}).coerce(`ssl-certificate-authority`,e=>d(e,`ssl-certificate-authority`,`text`)).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-cert-bundle`,{type:`string`,description:`Array of custom certificate and key pairs (1 or 2 pairs allowed). Provide as a JSON array of objects or @path/to/file.json.`}).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`]}).coerce(`ssl-method`,e=>d(e,`ssl-method`,`text`)).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`]}).coerce(`ssl-settings-early-hints`,e=>d(e,`ssl-settings-early-hints`,`text`)).option(`ssl-settings-http2`,{type:`string`,description:`Whether or not HTTP2 is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-http2`,e=>d(e,`ssl-settings-http2`,`text`)).option(`ssl-settings-min-tls-version`,{type:`string`,description:`The minimum TLS version supported.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).coerce(`ssl-settings-min-tls-version`,e=>d(e,`ssl-settings-min-tls-version`,`text`)).option(`ssl-settings-tls-1-3`,{type:`string`,description:`Whether or not TLS 1.3 is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-tls-1-3`,e=>d(e,`ssl-settings-tls-1-3`,`text`)).option(`ssl-type`,{type:`string`,description:`Level of validation to be used for this hostname. Domain validation (dv) must be used.`,choices:[`dv`]}).coerce(`ssl-type`,e=>d(e,`ssl-type`,`text`)).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:`create`,describe:`Create Custom Hostname`,builder:C,handler:async e=>o({command:`custom-hostnames create`,classification:{safeFlags:[`ssl-bundle-method`,`ssl-certificate-authority`,`ssl-cloudflare-branding`,`ssl-method`,`ssl-settings-early-hints`,`ssl-settings-http2`,`ssl-settings-min-tls-version`,`ssl-settings-tls-1-3`,`ssl-type`,`ssl-wildcard`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({custom_metadata:l(e[`custom-metadata`],`custom-metadata`),custom_origin_server:d(e[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:d(e[`custom-origin-sni`],`custom-origin-sni`,`text`),hostname:d(e.hostname,`hostname`,`text`),ssl:{bundle_method:e[`ssl-bundle-method`],certificate_authority:e[`ssl-certificate-authority`],cloudflare_branding:e[`ssl-cloudflare-branding`],custom_cert_bundle:s(e[`ssl-custom-cert-bundle`],`ssl-custom-cert-bundle`),custom_certificate:d(e[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:d(e[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:d(e[`ssl-custom-key`],`ssl-custom-key`,`text`),method:e[`ssl-method`],settings:{ciphers:e[`ssl-settings-ciphers`],early_hints:e[`ssl-settings-early-hints`],http2:e[`ssl-settings-http2`],min_tls_version:e[`ssl-settings-min-tls-version`],tls_1_3:e[`ssl-settings-tls-1-3`]},type:e[`ssl-type`],wildcard:e[`ssl-wildcard`]}},[[`custom_metadata`]]):c(e.body),sensitiveBodyPaths:[[`ssl`,`custom_key`]]});return}let o=await t(e),p=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=p,e.body){let t=c(e.body),n=await a(`Creating`,async()=>o.send(S,{body:t,zone_id:p}));r(n,{successLabel:`Created`});return}e.hostname===void 0&&(e.hostname=await f(`hostname`,`The custom hostname that will point to your hostname via CNAME.`));let m=u({custom_metadata:l(e[`custom-metadata`],`custom-metadata`),custom_origin_server:d(e[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:d(e[`custom-origin-sni`],`custom-origin-sni`,`text`),hostname:d(e.hostname,`hostname`,`text`),ssl:{bundle_method:e[`ssl-bundle-method`],certificate_authority:e[`ssl-certificate-authority`],cloudflare_branding:e[`ssl-cloudflare-branding`],custom_cert_bundle:s(e[`ssl-custom-cert-bundle`],`ssl-custom-cert-bundle`),custom_certificate:d(e[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:d(e[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:d(e[`ssl-custom-key`],`ssl-custom-key`,`text`),method:e[`ssl-method`],settings:{ciphers:e[`ssl-settings-ciphers`],early_hints:e[`ssl-settings-early-hints`],http2:e[`ssl-settings-http2`],min_tls_version:e[`ssl-settings-min-tls-version`],tls_1_3:e[`ssl-settings-tls-1-3`]},type:e[`ssl-type`],wildcard:e[`ssl-wildcard`]}},[[`custom_metadata`]]),h=await a(`Creating`,async()=>o.send(S,{body:m,zone_id:p}));r(h,{successLabel:`Created`})})};var T={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}`};function E(e){return e.usage(`$0 custom-hostnames delete <custom-hostname-id>
9
-
10
- Permanently deletes a custom hostname and revokes any SSL certificates that were issued for it. This action cannot be undone.`).positional(`custom-hostname-id`,{type:`string`,description:`Custom hostname 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 D={command:`delete <custom-hostname-id>`,describe:`Delete Custom Hostname (and any issued SSL certificates)`,builder:E,handler:async e=>o({command:`custom-hostnames delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(T,{zone_id:s,custom_hostname_id:e[`custom-hostname-id`]}));r(c,{successLabel:`Deleted`})})};var O={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}`,body:`json`};function k(e){return e.usage(`$0 custom-hostnames edit <custom-hostname-id>
11
-
12
- 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.`).positional(`custom-hostname-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`custom-metadata`,{type:`string`,description:`Unique key/value metadata for this hostname. These are per-hostname (customer) settings. Provide as a JSON object or @path/to/file.json.`}).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`]}).coerce(`ssl-bundle-method`,e=>d(e,`ssl-bundle-method`,`text`)).option(`ssl-certificate-authority`,{type:`string`,description:`The Certificate Authority that will issue the certificate.`,choices:[`digicert`,`google`,`lets_encrypt`,`ssl_com`]}).coerce(`ssl-certificate-authority`,e=>d(e,`ssl-certificate-authority`,`text`)).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-cert-bundle`,{type:`string`,description:`Array of custom certificate and key pairs (1 or 2 pairs allowed). Provide as a JSON array of objects or @path/to/file.json.`}).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`]}).coerce(`ssl-method`,e=>d(e,`ssl-method`,`text`)).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`]}).coerce(`ssl-settings-early-hints`,e=>d(e,`ssl-settings-early-hints`,`text`)).option(`ssl-settings-http2`,{type:`string`,description:`Whether or not HTTP2 is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-http2`,e=>d(e,`ssl-settings-http2`,`text`)).option(`ssl-settings-min-tls-version`,{type:`string`,description:`The minimum TLS version supported.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).coerce(`ssl-settings-min-tls-version`,e=>d(e,`ssl-settings-min-tls-version`,`text`)).option(`ssl-settings-tls-1-3`,{type:`string`,description:`Whether or not TLS 1.3 is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-tls-1-3`,e=>d(e,`ssl-settings-tls-1-3`,`text`)).option(`ssl-type`,{type:`string`,description:`Level of validation to be used for this hostname. Domain validation (dv) must be used.`,choices:[`dv`]}).coerce(`ssl-type`,e=>d(e,`ssl-type`,`text`)).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 A={command:`edit <custom-hostname-id>`,describe:`Edit Custom Hostname`,builder:k,handler:async e=>o({command:`custom-hostnames edit`,classification:{safeFlags:[`ssl-bundle-method`,`ssl-certificate-authority`,`ssl-cloudflare-branding`,`ssl-method`,`ssl-settings-early-hints`,`ssl-settings-http2`,`ssl-settings-min-tls-version`,`ssl-settings-tls-1-3`,`ssl-type`,`ssl-wildcard`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({custom_metadata:l(e[`custom-metadata`],`custom-metadata`),custom_origin_server:d(e[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:d(e[`custom-origin-sni`],`custom-origin-sni`,`text`),ssl:{bundle_method:e[`ssl-bundle-method`],certificate_authority:e[`ssl-certificate-authority`],cloudflare_branding:e[`ssl-cloudflare-branding`],custom_cert_bundle:s(e[`ssl-custom-cert-bundle`],`ssl-custom-cert-bundle`),custom_certificate:d(e[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:d(e[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:d(e[`ssl-custom-key`],`ssl-custom-key`,`text`),method:e[`ssl-method`],settings:{ciphers:e[`ssl-settings-ciphers`],early_hints:e[`ssl-settings-early-hints`],http2:e[`ssl-settings-http2`],min_tls_version:e[`ssl-settings-min-tls-version`],tls_1_3:e[`ssl-settings-tls-1-3`]},type:e[`ssl-type`],wildcard:e[`ssl-wildcard`]}},[[`custom_metadata`]]):c(e.body),sensitiveBodyPaths:[[`ssl`,`custom_key`]]});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=c(e.body),n=await a(`Updating`,async()=>o.send(O,{body:t,zone_id:f,custom_hostname_id:e[`custom-hostname-id`]}));r(n,{successLabel:`Updated`});return}let p=u({custom_metadata:l(e[`custom-metadata`],`custom-metadata`),custom_origin_server:d(e[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:d(e[`custom-origin-sni`],`custom-origin-sni`,`text`),ssl:{bundle_method:e[`ssl-bundle-method`],certificate_authority:e[`ssl-certificate-authority`],cloudflare_branding:e[`ssl-cloudflare-branding`],custom_cert_bundle:s(e[`ssl-custom-cert-bundle`],`ssl-custom-cert-bundle`),custom_certificate:d(e[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:d(e[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:d(e[`ssl-custom-key`],`ssl-custom-key`,`text`),method:e[`ssl-method`],settings:{ciphers:e[`ssl-settings-ciphers`],early_hints:e[`ssl-settings-early-hints`],http2:e[`ssl-settings-http2`],min_tls_version:e[`ssl-settings-min-tls-version`],tls_1_3:e[`ssl-settings-tls-1-3`]},type:e[`ssl-type`],wildcard:e[`ssl-wildcard`]}},[[`custom_metadata`]]),m=await a(`Updating`,async()=>o.send(O,{body:p,zone_id:f,custom_hostname_id:e[`custom-hostname-id`]}));r(m,{successLabel:`Updated`})})};var j={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/fallback_origin`};function M(e){return e.usage(`$0 custom-hostnames fallback-origin delete
13
-
14
- Removes the fallback origin configuration for custom hostnames on a zone. Custom hostnames without specific origins will no longer have a fallback.`).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 N={command:`delete`,describe:`Delete Fallback Origin for Custom Hostnames`,builder:M,handler:async e=>o({command:`custom-hostnames fallback-origin delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames fallback-origin delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(j,{zone_id:s}));r(c,{successLabel:`Deleted`})})};var P={method:`GET`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/fallback_origin`};function F(e){return e.usage(`$0 custom-hostnames fallback-origin get
15
-
16
- Retrieves the current fallback origin configuration for custom hostnames on a zone. The fallback origin handles traffic when specific custom hostname origins are unavailable.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get`,describe:`Get Fallback Origin for Custom Hostnames`,builder:F,handler:async e=>o({command:`custom-hostnames fallback-origin get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames fallback-origin get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(P,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var L={method:`PUT`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/fallback_origin`,body:`json`};function R(e){return e.usage(`$0 custom-hostnames fallback-origin update
17
-
18
- Updates the fallback origin configuration for custom hostnames on a zone. Sets the default origin server for custom hostname traffic.`).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 z={command:`update`,describe:`Update Fallback Origin for Custom Hostnames`,builder:R,handler:async e=>o({command:`custom-hostnames fallback-origin update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames fallback-origin update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({origin:d(e.origin,`origin`,`text`)}):c(e.body)});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,e.body){let t=c(e.body),n=await a(`Updating`,async()=>o.send(L,{body:t,zone_id:s}));r(n,{successLabel:`Updated`});return}e.origin===void 0&&(e.origin=await f(`origin`,`Your origin hostname that requests to your custom hostnames will be sent to.`));let l=u({origin:d(e.origin,`origin`,`text`)}),p=await a(`Updating`,async()=>o.send(L,{body:l,zone_id:s}));r(p,{successLabel:`Updated`})})},B={command:`fallback-origin`,describe:`Operations for fallback-origin`,builder:e=>e.command(N).command(I).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`GET`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}`};function H(e){return e.usage(`$0 custom-hostnames get <custom-hostname-id>
19
-
20
- Retrieves detailed information about a specific custom hostname, including SSL certificate status, ownership verification, and origin configuration.`).positional(`custom-hostname-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get <custom-hostname-id>`,describe:`Custom Hostname Details`,builder:H,handler:async e=>o({command:`custom-hostnames get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(V,{zone_id:s,custom_hostname_id:e[`custom-hostname-id`]}));r(c,{successLabel:`Loaded`})})};var W={method:`GET`,path:t=>e`/zones/${t.zone_id}/custom_hostnames`,query:[`hostname`,`hostname.exact`,`hostname.startsWith`,`hostname.contain`,`id`,`page`,`per_page`,`order`,`direction`,`ssl_status`,`hostname_status`,`certificate_authority`,`wildcard`,`custom_origin_server`,`ssl`]};function G(e){return e.usage(`$0 custom-hostnames list
21
-
22
- List, search, sort, and filter all of your custom hostnames.`).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 K={command:`list`,describe:`List Custom Hostnames`,builder:G,handler:async e=>o({command:`custom-hostnames list`,classification:{safeFlags:[`order`,`direction`,`ssl-status`,`hostname-status`,`certificate-authority`,`wildcard`,`ssl`,`dry-run`]}},e,async()=>{let o={hostname:e.hostname,"hostname.exact":e[`hostname-exact`],"hostname.startsWith":e[`hostname-starts-with`],"hostname.contain":e[`hostname-contain`],id:e.id,page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,ssl_status:e[`ssl-status`],hostname_status:e[`hostname-status`],certificate_authority:e[`certificate-authority`],wildcard:e.wildcard,custom_origin_server:e[`custom-origin-server`],ssl:e.ssl};if(e.dryRun){i({command:`cf custom-hostnames list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(W,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})};var q={method:`GET`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/quota`};function J(e){return e.usage(`$0 custom-hostnames quota get
23
-
24
- 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.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`get`,describe:`Get Custom Hostname Quota`,builder:J,handler:async e=>o({command:`custom-hostnames quota get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames quota get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/quota`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(q,{zone_id:s}));r(c,{successLabel:`Loaded`})})},X={command:`quota`,describe:`Operations for quota`,builder:e=>e.command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Z={command:`custom-hostnames`,describe:`custom-hostnames`,builder:e=>e.command(w).command(D).command(A).command(U).command(K).command(x).command(B).command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Z as default};
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-D0dXwuME.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_ns`,body:`json`};function g(e){return e.usage(`$0 custom-nameservers create
3
-
4
- Adds a custom nameserver to the account or zone for use as a vanity nameserver on zones.
5
-
6
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`ns-name`,{type:`string`,description:`The FQDN of the name server.`}).option(`ns-set`,{type:`number`,description:`The number of the set that this name server belongs to.`,default:1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Add account or zone Custom Nameserver`,builder:g,handler:async e=>l({command:`custom-nameservers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-nameservers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_ns`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?d({ns_name:f(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}):u(e.body)});return}let l=await n(e),m=e.zone===void 0?`accounts`:`zones`,g=m===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(m===`zones`?e.zoneId=g:e.accountId=g,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(h,{body:t,account_or_zone:m,account_or_zone_id:g}));o(n,{successLabel:`Created`});return}e[`ns-name`]===void 0&&(e[`ns-name`]=await p(`ns-name`,`The FQDN of the name server.`));let _=d({ns_name:f(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}),v=await c(`Creating`,async()=>l.send(h,{body:_,account_or_zone:m,account_or_zone_id:g}));o(v,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/custom_ns/${t.custom_ns_id}`};function y(e){return e.usage(`$0 custom-nameservers delete <custom-ns-id>
7
-
8
- Removes a custom nameserver from the account.`).positional(`custom-ns-id`,{type:`string`,description:`The FQDN of the name server.`,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-ns-id>`,describe:`Delete Account Custom Nameserver`,builder:y,handler:async e=>l({command:`custom-nameservers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf custom-nameservers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/custom_ns/${e[`custom-ns-id`]==null?`<custom-ns-id>`:encodeURIComponent(String(e[`custom-ns-id`]))}`,pathParams:{"custom-ns-id":String(e[`custom-ns-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await m({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(v,{account_id:l,custom_ns_id:e[`custom-ns-id`]}));o(u,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_ns`};function S(e){return e.usage(`$0 custom-nameservers get
9
-
10
- List an account or zone's custom nameservers.
11
-
12
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get`,describe:`List account or zone Custom Nameservers`,builder:S,handler:async e=>l({command:`custom-nameservers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-nameservers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_ns`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(x,{account_or_zone:u,account_or_zone_id:d}));o(f,{successLabel:`Loaded`})})},w={command:`custom-nameservers`,describe:`custom-nameservers`,builder:e=>e.command(_).command(b).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
@@ -1,38 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-D0dXwuME.mjs";var g={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/assets`,body:`json`};function _(e){return e.usage(`$0 custom-pages account-assets create
3
-
4
- Creates a custom asset for an account or zone.
5
-
6
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`description`,{type:`string`,description:`A short description of the custom asset.`}).option(`name`,{type:`string`,description:`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`}).option(`url`,{type:`string`,description:`The URL where the asset content is fetched from.`}).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:`Create a custom asset`,builder:_,handler:async e=>l({command:`custom-pages account-assets create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-assets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/assets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?d({description:f(e.description,`description`,`text`),name:f(e.name,`name`,`text`),url:f(e.url,`url`,`text`)}):u(e.body)});return}let l=await n(e),m=e.zone===void 0?`accounts`:`zones`,h=m===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(m===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(g,{body:t,account_or_zone:m,account_or_zone_id:h}));o(n,{successLabel:`Created`});return}e.description===void 0&&(e.description=await p(`description`,`A short description of the custom asset.`)),e.name===void 0&&(e.name=await p(`name`,`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`)),e.url===void 0&&(e.url=await p(`url`,`The URL where the asset content is fetched from.`));let _=d({description:f(e.description,`description`,`text`),name:f(e.name,`name`,`text`),url:f(e.url,`url`,`text`)}),v=await c(`Creating`,async()=>l.send(g,{body:_,account_or_zone:m,account_or_zone_id:h}));o(v,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/assets/${t.asset_name}`,response:!1};function b(e){return e.usage(`$0 custom-pages account-assets delete <asset-name>
7
-
8
- Deletes a custom asset from an account or zone.
9
-
10
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`asset-name`,{type:`string`,description:`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`,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 x={command:`delete <asset-name>`,describe:`Delete a custom asset`,builder:b,handler:async e=>l({command:`custom-pages account-assets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-assets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/assets/${e[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(e[`asset-name`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"asset-name":String(e[`asset-name`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=d:e.accountId=d,!await h({force:!!e.force}))return;let f=await c(`Deleting`,async()=>l.send(y,{account_or_zone:u,account_or_zone_id:d,asset_name:e[`asset-name`]}));o(f,{successLabel:`Deleted`})})};var S={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/assets/${t.asset_name}`};function C(e){return e.usage(`$0 custom-pages account-assets get <asset-name>
11
-
12
- Returns a custom asset for an account or zone.
13
-
14
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`asset-name`,{type:`string`,description:`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <asset-name>`,describe:`Get a custom asset`,builder:C,handler:async e=>l({command:`custom-pages account-assets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-assets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/assets/${e[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(e[`asset-name`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"asset-name":String(e[`asset-name`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(S,{account_or_zone:u,account_or_zone_id:d,asset_name:e[`asset-name`]}));o(f,{successLabel:`Loaded`})})};var T={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/assets`,query:[`page`,`per_page`]};function E(e){return e.usage(`$0 custom-pages account-assets list
15
-
16
- Lists custom assets for an account or zone.
17
-
18
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of custom assets per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List custom assets`,builder:E,handler:async e=>l({command:`custom-pages account-assets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-assets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/assets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(T,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})};var O={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/assets/${t.asset_name}`,body:`json`};function k(e){return e.usage(`$0 custom-pages account-assets update <asset-name>
19
-
20
- Updates a custom asset for an account or zone.
21
-
22
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`asset-name`,{type:`string`,description:`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`,demandOption:!0}).option(`description`,{type:`string`,description:`A short description of the custom asset.`}).option(`url`,{type:`string`,description:`The URL where the asset content is fetched from.`}).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 <asset-name>`,describe:`Update a custom asset`,builder:k,handler:async e=>l({command:`custom-pages account-assets update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-assets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/assets/${e[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(e[`asset-name`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"asset-name":String(e[`asset-name`]??``)},bodyKind:`json`,body:e.body===void 0?d({description:f(e.description,`description`,`text`),url:f(e.url,`url`,`text`)}):u(e.body)});return}let l=await n(e),m=e.zone===void 0?`accounts`:`zones`,h=m===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(m===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=u(e.body),n=await c(`Updating`,async()=>l.send(O,{body:t,account_or_zone:m,account_or_zone_id:h,asset_name:e[`asset-name`]}));o(n,{successLabel:`Updated`});return}e.description===void 0&&(e.description=await p(`description`,`A short description of the custom asset.`)),e.url===void 0&&(e.url=await p(`url`,`The URL where the asset content is fetched from.`));let g=d({description:f(e.description,`description`,`text`),url:f(e.url,`url`,`text`)}),_=await c(`Updating`,async()=>l.send(O,{body:g,account_or_zone:m,account_or_zone_id:h,asset_name:e[`asset-name`]}));o(_,{successLabel:`Updated`})})},j={command:`account-assets`,describe:`Manage account-level custom assets`,builder:e=>e.command(v).command(x).command(w).command(D).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/${t.identifier}`};function N(e){return e.usage(`$0 custom-pages account-custom-pages get <identifier>
23
-
24
- Returns the configuration for a custom page type.
25
-
26
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`identifier`,{type:`string`,description:`Custom page type.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get <identifier>`,describe:`Get a custom page`,builder:N,handler:async e=>l({command:`custom-pages account-custom-pages get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-custom-pages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),identifier:String(e.identifier??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(M,{account_or_zone:u,account_or_zone_id:d,identifier:e.identifier}));o(f,{successLabel:`Loaded`})})};var F={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages`};function I(e){return e.usage(`$0 custom-pages account-custom-pages list
27
-
28
- Lists all custom page configurations for an account or zone.
29
-
30
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List custom pages`,builder:I,handler:async e=>l({command:`custom-pages account-custom-pages list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-custom-pages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(F,{account_or_zone:u,account_or_zone_id:d}));o(f,{successLabel:`Loaded`})})};var R={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/preview_tokens`,body:`json`};function z(e){return e.usage(`$0 custom-pages account-custom-pages preview-tokens create
31
-
32
- Creates a signed JWT for previewing an account or zone-level custom page before it is published.
33
-
34
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`act`,{type:`string`,description:`The preview action type. Required for request parsing but not used in token generation. Typically set to "preview".`}).option(`target`,{type:`string`,description:`The target custom page type to preview (e.g. "block:waf"). Encoded as the "endpoint" claim in the resulting JWT.`}).option(`url`,{type:`string`,description:`The URL of the custom page content to preview. Encoded as the "zone" claim in the resulting JWT.`}).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 B={command:`create`,describe:`Create a preview token`,builder:z,handler:async e=>l({command:`custom-pages account-custom-pages preview-tokens create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-custom-pages preview-tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/preview_tokens`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?d({act:f(e.act,`act`,`text`),target:f(e.target,`target`,`text`),url:f(e.url,`url`,`text`)}):u(e.body)});return}let l=await n(e),m=e.zone===void 0?`accounts`:`zones`,h=m===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(m===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(R,{body:t,account_or_zone:m,account_or_zone_id:h}));o(n,{successLabel:`Created`});return}e.act===void 0&&(e.act=await p(`act`,`The preview action type. Required for request parsing but not used in token generation. Typically set to "preview".`)),e.target===void 0&&(e.target=await p(`target`,`The target custom page type to preview (e.g. "block:waf"). Encoded as the "endpoint" claim in the resulting JWT.`)),e.url===void 0&&(e.url=await p(`url`,`The URL of the custom page content to preview. Encoded as the "zone" claim in the resulting JWT.`));let g=d({act:f(e.act,`act`,`text`),target:f(e.target,`target`,`text`),url:f(e.url,`url`,`text`)}),_=await c(`Creating`,async()=>l.send(R,{body:g,account_or_zone:m,account_or_zone_id:h}));o(_,{successLabel:`Created`})})},V={command:`preview-tokens`,describe:`Preview tokens for account-level custom pages`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var H={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/${t.identifier}`,body:`json`};function U(e){return e.usage(`$0 custom-pages account-custom-pages update <identifier>
35
-
36
- Updates the configuration for a custom page type.
37
-
38
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`identifier`,{type:`string`,description:`Custom page type.`,demandOption:!0}).option(`state`,{type:`string`,description:`The custom page state.`,choices:[`default`,`customized`]}).coerce(`state`,e=>f(e,`state`,`text`)).option(`url`,{type:`string`,description:`The URL associated with the custom page.`}).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:`update <identifier>`,describe:`Update a custom page`,builder:U,handler:async e=>l({command:`custom-pages account-custom-pages update`,classification:{safeFlags:[`state`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-custom-pages update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?d({state:e.state,url:f(e.url,`url`,`text`)}):u(e.body)});return}let l=await n(e),h=e.zone===void 0?`accounts`:`zones`,g=h===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(h===`zones`?e.zoneId=g:e.accountId=g,e.body){let t=u(e.body),n=await c(`Updating`,async()=>l.send(H,{body:t,account_or_zone:h,account_or_zone_id:g,identifier:e.identifier}));o(n,{successLabel:`Updated`});return}e.state===void 0&&(e.state=await m(`state`,`The custom page state.`,[`default`,`customized`])),e.url===void 0&&(e.url=await p(`url`,`The URL associated with the custom page.`));let _=d({state:e.state,url:f(e.url,`url`,`text`)}),v=await c(`Updating`,async()=>l.send(H,{body:_,account_or_zone:h,account_or_zone_id:g,identifier:e.identifier}));o(v,{successLabel:`Updated`})})},G={command:`account-custom-pages`,describe:`Manage account-level custom pages`,builder:e=>e.command(P).command(L).command(W).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},K={command:`custom-pages`,describe:`Manage custom error and challenge pages and their assets for accounts and zones`,builder:e=>e.command(j).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{K as default};