cf 1.0.0-beta.28 → 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 (328) hide show
  1. package/README.md +10 -3
  2. package/dist/_meta/commands.json +2240 -3181
  3. package/dist/_meta/hand-written-commands.json +38 -8
  4. package/dist/_meta/schemas.json +1683 -2505
  5. package/dist/{abuse-reports-D9edOyag.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
  6. package/dist/{access-CKCCSrrU.mjs → access-Cte4yyIz.mjs} +1 -1
  7. package/dist/{accounts-CNb9U9bK.mjs → accounts-G-x-_cEx.mjs} +58 -57
  8. package/dist/{acm-CdKTAToZ.mjs → acm-Bg3HqMGG.mjs} +7 -7
  9. package/dist/{addressing-eZI_C-b0.mjs → addressing-BwEofGEm.mjs} +46 -46
  10. package/dist/{agent-memory-BBHCEE7h.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
  11. package/dist/{ai-Csl_QNwv.mjs → ai-DWWRIQIt.mjs} +16 -16
  12. package/dist/{ai-audit-DlqWsQi-.mjs → ai-audit-CMEBz6ZP.mjs} +3 -3
  13. package/dist/ai-gateway-D2s0isU-.mjs +76 -0
  14. package/dist/ai-search-a0uqr9yJ.mjs +74 -0
  15. package/dist/{ai-security-DvU2iYkY.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-BlIecoOe.mjs → analytics-engine-BLiEaLxb.mjs} +2 -2
  19. package/dist/{api-security-DZ7GWOqD.mjs → api-security-B0YtHglt.mjs} +63 -63
  20. package/dist/{argo-Bh0_cj49.mjs → argo-BPwbzHY7.mjs} +7 -7
  21. package/dist/{artifacts-VZJWVq_6.mjs → artifacts-B6UwC2PH.mjs} +20 -20
  22. package/dist/{audit-logs-B8cGL4B9.mjs → audit-logs-kG97iEnI.mjs} +2 -2
  23. package/dist/auth-Czr8ChBB.mjs +2 -0
  24. package/dist/auth-DA1PHaHi.mjs +2 -0
  25. package/dist/auth-Dwfa4S3h.mjs +7 -0
  26. package/dist/{auth-token-DW4dJVdj.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
  27. package/dist/{autoconfig-C0ynlGHf.mjs → autoconfig-B4tFR6ua.mjs} +120 -116
  28. package/dist/{basin-catalog-TehR1sKZ.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
  29. package/dist/{billing-B2KusU6g.mjs → billing-TERxOuLR.mjs} +11 -11
  30. package/dist/{blocks-BFulF68V.mjs → blocks-C3Im7AT0.mjs} +1 -1
  31. package/dist/body-parser-HN91kAf0.mjs +2 -0
  32. package/dist/{body-unions-DNs981Ia.mjs → body-unions-D9OSaf4M.mjs} +1 -1
  33. package/dist/{bot-management-CXHXgrQC.mjs → bot-management-SZw9jTOC.mjs} +4 -4
  34. package/dist/{botnet-feed-UyK7Rfp6.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
  35. package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
  36. package/dist/browser-run-BvjfMK3f.mjs +40 -0
  37. package/dist/build-CCwo_ydV.mjs +2 -0
  38. package/dist/{build-FFxzigo4.mjs → build-yQOzZg6Z.mjs} +1 -1
  39. package/dist/builds-tMa3sbQU.mjs +62 -0
  40. package/dist/{cache-BacNNtLu.mjs → cache-b_EPh6Is.mjs} +18 -18
  41. package/dist/cf-DmvZ2L51.mjs +18 -0
  42. package/dist/{chunk-DSGVRFIS-BaNZNW-M.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
  43. package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
  44. package/dist/cli-Cc7ujzAy.mjs +4 -0
  45. package/dist/{client-side-security-bzB9JosR.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
  46. package/dist/{cloud-connector-BHtf37R5.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
  47. package/dist/{cloudflared-QDdHMUEY.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
  48. package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
  49. package/dist/{command-D895kdlh.mjs → command-BQbZw4Kx.mjs} +1 -1
  50. package/dist/command-BVct0Dvr.mjs +2 -0
  51. package/dist/{command-DeutqL1n.mjs → command-C4_lMRkw.mjs} +1 -1
  52. package/dist/command-CJ3ldWrA.mjs +2 -0
  53. package/dist/command-CyOdBNur.mjs +2 -0
  54. package/dist/command-D2XkyO1e.mjs +2 -0
  55. package/dist/command-DHODgfFZ.mjs +2 -0
  56. package/dist/command-DIIaZx_f.mjs +2 -0
  57. package/dist/command-DONwHpqZ.mjs +2 -0
  58. package/dist/command-DdYnSf-8.mjs +2 -0
  59. package/dist/command-DqOU7Ql2.mjs +2 -0
  60. package/dist/{command-CbxXc5IW.mjs → command-HW7k43qu.mjs} +1 -1
  61. package/dist/command-NqM0lo4a.mjs +2 -0
  62. package/dist/command-bwVDyMv4.mjs +2 -0
  63. package/dist/command-yzqs4m83.mjs +2 -0
  64. package/dist/{completions-BvdKtzsX.mjs → completions-0YKvIyBT.mjs} +2 -2
  65. package/dist/{connector-interrupts-dUPW6Ya_.mjs → connector-interrupts-CsunbRsr.mjs} +3 -3
  66. package/dist/{connector-telemetry-events-DWVCqnhn.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
  67. package/dist/{connector-telemetry-snapshots-CeMP3qeI.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
  68. package/dist/{connectors-DZFGNw3i.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
  69. package/dist/{containers-DCzQCo79.mjs → containers-BiA_bpPR.mjs} +22 -21
  70. package/dist/{content-scan-XhnNJqXf.mjs → content-scan-4SA2nacB.mjs} +6 -6
  71. package/dist/{context-BY1Eh_Qe.mjs → context-BGm5_wTT.mjs} +1 -1
  72. package/dist/{cps-CohlxvuN.mjs → cps-WDmD3V5I.mjs} +3 -3
  73. package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
  74. package/dist/{custom-csrs-BVdMQjYq.mjs → custom-csrs-D-lvkyRV.mjs} +5 -5
  75. package/dist/{custom-hostnames-r-CxhSa1.mjs → custom-hostnames-B5BQX5m6.mjs} +12 -12
  76. package/dist/{custom-nameservers-CapMDyly.mjs → custom-nameservers-CZrRjcjx.mjs} +4 -4
  77. package/dist/{custom-pages-BVIniWfq.mjs → custom-pages-CWwjtfbj.mjs} +10 -10
  78. package/dist/d1-N81q-FAr.mjs +50 -0
  79. package/dist/{delegate-CcL6RoGw.mjs → delegate-livNdiwK.mjs} +1 -1
  80. package/dist/delegate.mjs +1 -1
  81. package/dist/deploy-Ok4ncy06.mjs +2 -0
  82. package/dist/deploy-context-B_lLfxt7.mjs +55 -0
  83. package/dist/deploy-input-JZlEJwKB.mjs +2 -0
  84. package/dist/dev-DxbkJkzc.mjs +4 -0
  85. package/dist/{diagnostics-C3nqxsAO.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
  86. package/dist/dialog-CD94-Kzw.mjs +2 -0
  87. package/dist/discover-D9FNaCDK.mjs +2 -0
  88. package/dist/discover-DGsMj9ZN.mjs +2 -0
  89. package/dist/{dist-D-ihn_mV.mjs → dist-BxhwE-W1.mjs} +193 -193
  90. package/dist/{dls-N1x8sAK3.mjs → dls-5OXuxLAB.mjs} +8 -8
  91. package/dist/{dns-DATWP-PF.mjs → dns-Burep9O7.mjs} +59 -69
  92. package/dist/{dns-firewall-n3Y2ui6W.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
  93. package/dist/docs-BFVK88kB.mjs +3 -0
  94. package/dist/{dry-run-kJbjn4kG.mjs → dry-run-qsnRlRk6.mjs} +1 -1
  95. package/dist/{durable-objects-DHK9w-vO.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
  96. package/dist/email-auth--2KCzZNA.mjs +6 -0
  97. package/dist/email-routing-DzaExfVf.mjs +44 -0
  98. package/dist/{email-security-DK_SJ0yi.mjs → email-security-DwQJszzy.mjs} +71 -71
  99. package/dist/{email-sending-CTQafGec.mjs → email-sending-mQd2qB-o.mjs} +21 -21
  100. package/dist/errors-C_bGcR0X.mjs +11 -0
  101. package/dist/field-extractors-MVOizTlB.mjs +8 -0
  102. package/dist/{firewall-CW-fAI9m.mjs → firewall-DtSIlkfL.mjs} +19 -19
  103. package/dist/{flagship-RiLnDwfJ.mjs → flagship-9E5gwNki.mjs} +12 -12
  104. package/dist/{fraud-DvfBBTe8.mjs → fraud-DjqhVJdf.mjs} +3 -3
  105. package/dist/generate-BzOnRBij.mjs +2 -0
  106. package/dist/generate-DfxZtpn9.mjs +2 -0
  107. package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
  108. package/dist/{google-tag-gateway-C5WYsSXv.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
  109. package/dist/gt-BV-jij5q.mjs +4 -0
  110. package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
  111. package/dist/{hyperdrive-Ch6klUp3.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
  112. package/dist/{iam-LlGEzRCq.mjs → iam-BK6N7NdQ.mjs} +31 -31
  113. package/dist/{images-C5WqUXkK.mjs → images-3bCWE6Ml.mjs} +33 -33
  114. package/dist/index.mjs +1 -1
  115. package/dist/init-BgCF9K8h.mjs +43 -0
  116. package/dist/{intel-vcWyslaX.mjs → intel-BQ58CJLt.mjs} +30 -30
  117. package/dist/{interactive-BCDFSPtq.mjs → interactive-JBA3qOUa.mjs} +9 -9
  118. package/dist/{internal-BhV9WjLp.mjs → internal-CWPz0sBF.mjs} +2 -2
  119. package/dist/{ips-CqHjVsqd.mjs → ips-3WYegiVW.mjs} +2 -2
  120. package/dist/{k2-CZT2Pd5J.mjs → k2-Bc_hjmiv.mjs} +5 -5
  121. package/dist/{kv-Ipa7dnvF.mjs → kv-DbShBhhg.mjs} +6 -6
  122. package/dist/{lazy-command-DbKVgdGT.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
  123. package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
  124. package/dist/{live-C9L1bNuE.mjs → live-BTtMv1a6.mjs} +2 -2
  125. package/dist/load-balancers-C2hg52WA.mjs +84 -0
  126. package/dist/{local-DIJ7SIKC.mjs → local-B3zt9PXR.mjs} +1 -1
  127. package/dist/local-DRxctCh9.mjs +2 -0
  128. package/dist/local-runtime-BOnDiMDc.mjs +2 -0
  129. package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
  130. package/dist/log-DBAHla_W.mjs +2 -0
  131. package/dist/login-CK3nn9a5.mjs +2 -0
  132. package/dist/{login-DG5ebyab.mjs → login-DiR-buzS.mjs} +3 -3
  133. package/dist/{logpush-C5Gw7F_9.mjs → logpush-CitvUX-J.mjs} +22 -22
  134. package/dist/{logs-y3REfHbb.mjs → logs-CfWHu4Ir.mjs} +14 -16
  135. package/dist/{magic-network-monitoring-BZBGZB6M.mjs → magic-network-monitoring-gU6yzzML.mjs} +17 -17
  136. package/dist/{magic-transit-BPV_POf5.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
  137. package/dist/{managed-defense-BaUBSUcz.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
  138. package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
  139. package/dist/{mcp-RPtrISTy.mjs → mcp-DqhQJVaz.mjs} +15 -15
  140. package/dist/{mesh-DZ4QHBPE.mjs → mesh-DXVZBNDC.mjs} +12 -12
  141. package/dist/{migrate-CRIUqGi2.mjs → migrate-CmXyk9vX.mjs} +1 -1
  142. package/dist/{monetization-CVZqM8Xo.mjs → monetization-CWg-mySr.mjs} +9 -9
  143. package/dist/{network-interconnects-9nS5jL__.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
  144. package/dist/{network-DLt2JUo1.mjs → network-jtgq5eb4.mjs} +24 -24
  145. package/dist/o11y-eYYs59X9.mjs +88 -0
  146. package/dist/oauth-BgDZMd72.mjs +5 -0
  147. package/dist/{oauth-Cidoyxfp.mjs → oauth-V37G-PaV.mjs} +1 -1
  148. package/dist/{observability-C-KNh__y.mjs → observability-CB72eC4T.mjs} +2 -2
  149. package/dist/{ohttp-gateway-B5nCl4s3.mjs → ohttp-gateway-K9ToEft8.mjs} +4 -4
  150. package/dist/{organizations-DbeeWUL4.mjs → organizations-BllV7l_c.mjs} +18 -19
  151. package/dist/output-hFMAotFl.mjs +2 -0
  152. package/dist/package-oNVeacC9.mjs +2 -0
  153. package/dist/page-rules-BVmi-ZFW.mjs +35 -0
  154. package/dist/pages-5spcBpX1.mjs +48 -0
  155. package/dist/{pay-per-crawl-EHYtSKxX.mjs → pay-per-crawl-BgsdGcBi.mjs} +18 -18
  156. package/dist/{pay-per-use-wdEhl8k4.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
  157. package/dist/pipelines-CbtmLRxt.mjs +40 -0
  158. package/dist/{precursor-Dx8lN4UJ.mjs → precursor-Dk8YOKf_.mjs} +2 -2
  159. package/dist/previews-Bv1HMMtO.mjs +6 -0
  160. package/dist/progress-DE_G09u2.mjs +2 -0
  161. package/dist/project-settings-D_S-UC8I.mjs +3 -0
  162. package/dist/prompt-D274Im1O.mjs +4 -0
  163. package/dist/{queues-DgMc7Z6A.mjs → queues-DGCYUr4g.mjs} +26 -26
  164. package/dist/{r2-BpTVicIq.mjs → r2-DtCk-Nfi.mjs} +51 -51
  165. package/dist/{radar-DW-S1VUh.mjs → radar-1CwqOsMZ.mjs} +150 -150
  166. package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
  167. package/dist/{ready-d0li0X6r.mjs → ready-CcoEA7M7.mjs} +2 -2
  168. package/dist/{realtime-DMKHLYF4.mjs → realtime-DFUxwIG5.mjs} +80 -81
  169. package/dist/registrar-Cl1snz8z.mjs +43 -0
  170. package/dist/{registrar-sandbox-lVLB1-mC.mjs → registrar-sandbox-Cne9BVCZ.mjs} +9 -9
  171. package/dist/{reporting-WX8P3Y0k.mjs → reporting-D9FC-Z-3.mjs} +7 -7
  172. package/dist/request-headers-Bopp5lH_.mjs +2 -0
  173. package/dist/request-tracers-CSSB9_aW.mjs +4 -0
  174. package/dist/{resource-sharing-B2ZSt_cA.mjs → resource-sharing-D8yuzJm7.mjs} +18 -18
  175. package/dist/{rules-CB0QQTB3.mjs → rules-DzmOQ3MB.mjs} +8 -8
  176. package/dist/rulesets-DsTGcgbc.mjs +42 -0
  177. package/dist/{rum-BZ_24qZU.mjs → rum-DrJLI93T.mjs} +14 -14
  178. package/dist/run-C5yPsiO2.mjs +2 -0
  179. package/dist/run-CXWkMU3x.mjs +2 -0
  180. package/dist/schema-CfZOW8Zw.mjs +2 -0
  181. package/dist/{schema-cache-5NkOj7Y3.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
  182. package/dist/schema-flags-DO3kLYBu.mjs +4 -0
  183. package/dist/{scim-DchxaJfE.mjs → scim-0OufLKru.mjs} +8 -8
  184. package/dist/{secrets-store-oAft1cFE.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
  185. package/dist/{security-insights-DMm0qg_m.mjs → security-insights-D2pj8-O-.mjs} +20 -20
  186. package/dist/{security-txt-CIt0494b.mjs → security-txt-SKtgW4n-.mjs} +4 -4
  187. package/dist/session-COdP8BXD.mjs +2 -0
  188. package/dist/shared-D_2KLpP3.mjs +2 -0
  189. package/dist/{signed-url-gNangfwc.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
  190. package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
  191. package/dist/snippets-DrrdpLnS.mjs +18 -0
  192. package/dist/spawn-DNf-Ge8d.mjs +5 -0
  193. package/dist/{spectrum-DLYIHelC.mjs → spectrum-CHBGZbZF.mjs} +11 -11
  194. package/dist/{speed-DugG9Tm9.mjs → speed-vOlHyG3v.mjs} +11 -11
  195. package/dist/sql-BCuLxGSf.mjs +4 -0
  196. package/dist/src-ByCoEqOw.mjs +133 -0
  197. package/dist/{ssl-Bg4X3WGk.mjs → ssl-BA_dcVwF.mjs} +60 -62
  198. package/dist/startup-profile-CyQk_f_L.mjs +2 -0
  199. package/dist/{startup-profile-DZL2DC44.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
  200. package/dist/state-B6r-b_-d.mjs +2 -0
  201. package/dist/{state-mr5ux1Nb.mjs → state-CTLznbVs.mjs} +1 -1
  202. package/dist/static-assets-DGDoaJf1.mjs +386 -0
  203. package/dist/stream-CzlqY8hq.mjs +89 -0
  204. package/dist/{tags-SKz2odE_.mjs → tags-BLeaslAb.mjs} +8 -8
  205. package/dist/telemetry-COlodX5Z.mjs +2 -0
  206. package/dist/{telemetry-B4zmCpT0.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
  207. package/dist/{tenant-custom-nameservers-BhkhBerL.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
  208. package/dist/{tenants-DD-GMq0K.mjs → tenants-CRirmhxS.mjs} +3 -3
  209. package/dist/{tools-KW_4hvzY.mjs → tools-BRjRgZnj.mjs} +1 -1
  210. package/dist/tunnels-nLfIWPYT.mjs +27 -0
  211. package/dist/{turnstile-DhSU_Xar.mjs → turnstile-CZjXtBCr.mjs} +10 -10
  212. package/dist/ui-dWsVmFCG.mjs +2 -0
  213. package/dist/{update-check-HltjTMDE.mjs → update-check-CXMdVBhW.mjs} +1 -1
  214. package/dist/{update-check-CRttabfu.mjs → update-check-D_Oky9-u.mjs} +1 -1
  215. package/dist/update-check-worker.mjs +1 -1
  216. package/dist/{url-normalization-K7gkmPvG.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
  217. package/dist/url-scanner-9XW3zLaU.mjs +16 -0
  218. package/dist/user-Bk1BIqZ5.mjs +103 -0
  219. package/dist/{vectorize-BTBerJME.mjs → vectorize-CgOfmWYq.mjs} +15 -15
  220. package/dist/version-CcuBNjqg.mjs +2 -0
  221. package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
  222. package/dist/{web-assets-LHPQsrnY.mjs → web-assets-CWU3jrit.mjs} +29 -29
  223. package/dist/{web3-BsOio0Ae.mjs → web3-CRpQ5sl4.mjs} +13 -13
  224. package/dist/workers-BZMvamn0.mjs +39 -0
  225. package/dist/{workers-for-platforms-BGp6yr6P.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
  226. package/dist/{workers-vpc-D8lefWDo.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
  227. package/dist/{workflows-B-ZIG3y7.mjs → workflows-Dd88_Nqc.mjs} +24 -24
  228. package/dist/{wrangler-migration-6E6wT_LZ.mjs → wrangler-migration-BzMTJPdI.mjs} +294 -294
  229. package/dist/zaraz-BFK0p28R.mjs +22 -0
  230. package/dist/{zero-trust-BZDXM5r6.mjs → zero-trust-Cdjfp0Ie.mjs} +441 -455
  231. package/dist/{zones-B-UV_DGE.mjs → zones-DDn5jk6I.mjs} +51 -51
  232. package/package.json +19 -19
  233. package/dist/ai-gateway-Lj4On37s.mjs +0 -74
  234. package/dist/ai-search-BxyhS3X7.mjs +0 -74
  235. package/dist/alerting-r0G2X9y9.mjs +0 -52
  236. package/dist/analytics-C6bfqm-W.mjs +0 -17
  237. package/dist/auth-B-h0BHg7.mjs +0 -2
  238. package/dist/auth-B6tswVxH.mjs +0 -2
  239. package/dist/auth-clmqFEWU.mjs +0 -7
  240. package/dist/body-parser-DoewLePl.mjs +0 -2
  241. package/dist/brand-protection-kv1ba80i.mjs +0 -14
  242. package/dist/browser-run-D-vRoZmf.mjs +0 -40
  243. package/dist/build-BzJGqb2o.mjs +0 -2
  244. package/dist/builds-BbxINHRP.mjs +0 -64
  245. package/dist/cf-BQ_LRiut.mjs +0 -18
  246. package/dist/chunk-SOBRPAPT-QTjnHSNs.mjs +0 -363
  247. package/dist/cli-B7vslRfu.mjs +0 -4
  248. package/dist/cloudforce-one-DWBPQDA3.mjs +0 -318
  249. package/dist/command-AVwd7XjE.mjs +0 -2
  250. package/dist/command-B87T_f2f.mjs +0 -2
  251. package/dist/command-CEHhi3t0.mjs +0 -2
  252. package/dist/command-CYmQE79n.mjs +0 -2
  253. package/dist/command-Ce8CVLth.mjs +0 -2
  254. package/dist/command-CqDudQZs.mjs +0 -2
  255. package/dist/command-D4YcwpVp.mjs +0 -2
  256. package/dist/command-D9Qyi1B0.mjs +0 -2
  257. package/dist/command-Dl9ICrRK.mjs +0 -2
  258. package/dist/command-DtCSe8Hy.mjs +0 -2
  259. package/dist/command-DwzVtmb3.mjs +0 -2
  260. package/dist/command-wtBubtZ4.mjs +0 -2
  261. package/dist/containers-B06OGOEB.mjs +0 -380
  262. package/dist/csam-scanner-BV4bHq8v.mjs +0 -8
  263. package/dist/d1-nJCOJZb8.mjs +0 -50
  264. package/dist/deploy-DJMnWFNk.mjs +0 -2
  265. package/dist/deploy-context-YCW3eqP1.mjs +0 -56
  266. package/dist/deploy-input-CQLBXFEB.mjs +0 -2
  267. package/dist/dev-GsYHvMah.mjs +0 -4
  268. package/dist/dialog-D5lus4M4.mjs +0 -2
  269. package/dist/discover-6kAmVMPp.mjs +0 -2
  270. package/dist/discover-C06Syc2B.mjs +0 -2
  271. package/dist/docs-CRc_WOXh.mjs +0 -3
  272. package/dist/email-auth-ptdqNSTZ.mjs +0 -6
  273. package/dist/email-domains-uL22-zRY.mjs +0 -14
  274. package/dist/email-routing-CV43rMJC.mjs +0 -44
  275. package/dist/errors-VG1mgwJl.mjs +0 -11
  276. package/dist/field-extractors-jcZ_bAGc.mjs +0 -8
  277. package/dist/generate-CeeWW3eX.mjs +0 -3
  278. package/dist/generate-D6V4Q58z.mjs +0 -2
  279. package/dist/gt-BQkaDQDq.mjs +0 -3
  280. package/dist/healthchecks-BA1fmzTm.mjs +0 -20
  281. package/dist/init-EVsjBrOz.mjs +0 -43
  282. package/dist/leaked-credential-checks-EzT4TTjO.mjs +0 -16
  283. package/dist/load-balancers-Cb3VkSfc.mjs +0 -84
  284. package/dist/local-D5Vq6ooZ.mjs +0 -2
  285. package/dist/local-runtime-BZjgkacr.mjs +0 -2
  286. package/dist/log-DZfik9Jk.mjs +0 -2
  287. package/dist/login-DRJugxya.mjs +0 -2
  288. package/dist/managed-transforms-CjkjLzMC.mjs +0 -8
  289. package/dist/o11y-ySxrnP1Z.mjs +0 -88
  290. package/dist/oauth-CFVUl-Wv.mjs +0 -4
  291. package/dist/output-BZQEl3mK.mjs +0 -2
  292. package/dist/package-B7RgwuFR.mjs +0 -2
  293. package/dist/page-rules-DRw763O1.mjs +0 -38
  294. package/dist/pages-DfQnxiTk.mjs +0 -48
  295. package/dist/pipelines-DbyrI6F4.mjs +0 -40
  296. package/dist/previews-DEVNSip2.mjs +0 -6
  297. package/dist/progress-yvPscjYg.mjs +0 -2
  298. package/dist/project-settings-nBMEx1f-.mjs +0 -3
  299. package/dist/prompt-CEpZ-lQZ.mjs +0 -4
  300. package/dist/raw-fetch-Cl5spWC3.mjs +0 -2
  301. package/dist/registrar-D23gfKBi.mjs +0 -43
  302. package/dist/request-headers-C0FpeBhz.mjs +0 -2
  303. package/dist/request-tracers-qd7XOAka.mjs +0 -4
  304. package/dist/rulesets-DmqwixUC.mjs +0 -42
  305. package/dist/run-BOKI1uWa.mjs +0 -2
  306. package/dist/run-DBqOjD1P.mjs +0 -2
  307. package/dist/schema-Dj9STsWI.mjs +0 -2
  308. package/dist/schema-flags-CXm9iIv6.mjs +0 -4
  309. package/dist/session-vzNfUhPl.mjs +0 -2
  310. package/dist/shared-MK-_lkbn.mjs +0 -2
  311. package/dist/smart-shield-Boy_qbqd.mjs +0 -22
  312. package/dist/snippets-DdoDYXW-.mjs +0 -18
  313. package/dist/spawn-B5F4OIHG.mjs +0 -5
  314. package/dist/sql-Bb56llsb.mjs +0 -4
  315. package/dist/src-BoSDeQ9m.mjs +0 -133
  316. package/dist/startup-profile-DQVkZZpb.mjs +0 -2
  317. package/dist/state-DW3QZtfh.mjs +0 -2
  318. package/dist/stream-BuZYDbNR.mjs +0 -89
  319. package/dist/telemetry-DkDUr4KK.mjs +0 -2
  320. package/dist/tunnels-D90ztENM.mjs +0 -27
  321. package/dist/ui-xjCox-gU.mjs +0 -2
  322. package/dist/url-scanner-BRdWwka4.mjs +0 -16
  323. package/dist/user-Cmb1_Wu5.mjs +0 -103
  324. package/dist/version-6Bpy6Bgt.mjs +0 -2
  325. package/dist/waiting-rooms-LymmKIGr.mjs +0 -52
  326. package/dist/workers-BnLiOjZf.mjs +0 -39
  327. package/dist/workers-builds-sKpITeRk.mjs +0 -14
  328. package/dist/zaraz-BBKki5WS.mjs +0 -22
@@ -1,48 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./lazy-command-DbKVgdGT.mjs";import"./api-Dnt6lRJG.mjs";import{t}from"./path-DRw6Y-nd.mjs";import{t as n}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as r}from"./local-DIJ7SIKC.mjs";import{i,n as a}from"./auth-B-h0BHg7.mjs";import{a as o,t as s}from"./context-BY1Eh_Qe.mjs";import{t as c}from"./output-BZQEl3mK.mjs";import{t as l}from"./dry-run-kJbjn4kG.mjs";import{t as u}from"./progress-yvPscjYg.mjs";import{t as d}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as f,r as p,t as m}from"./body-parser-DoewLePl.mjs";import{n as h,t as g}from"./input-validation-D7z60HJH.mjs";import{a as _,i as v,n as y}from"./prompt-CEpZ-lQZ.mjs";var ee={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/purge_build_cache`};function b(e){return e.usage(`$0 pages build-cache purge <project-name>
3
-
4
- Remove cached build artifacts so subsequent builds run without the project's existing build cache.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const te={command:`purge <project-name>`,describe:`Purge the Pages build cache`,builder:b,handler:async e=>d({command:`pages build-cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages build-cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/purge_build_cache`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await y({force:!!e.force,message:`This operation purges the build cache for a Pages project.`}))return;let i=await u(`Processing`,async()=>t.send(ee,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Done`})})},ne={command:`build-cache`,describe:`Operations for build-cache`,builder:e=>e.command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects`,body:`json`};function re(e){return e.usage(`$0 pages create
5
-
6
- Create a Cloudflare Pages project for configuring and deploying a site or application.`).option(`build-config-build-caching`,{type:`boolean`,description:`Enable build caching for the project.`}).option(`build-config-build-command`,{type:`string`,description:`Command used to build project.`}).option(`build-config-destination-dir`,{type:`string`,description:`Output directory of the build.`}).option(`build-config-root-dir`,{type:`string`,description:`Directory to run the command.`}).option(`build-config-web-analytics-tag`,{type:`string`,description:`The classifying tag for analytics.`}).option(`build-config-web-analytics-token`,{type:`string`,description:`The auth token for analytics.`}).option(`deployment-configs-preview-ai-bindings`,{type:`string`,description:`Constellation bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-preview-analytics-engine-datasets`,{type:`string`,description:`Analytics Engine bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-browsers`,{type:`string`,description:`Browser bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).option(`deployment-configs-preview-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-preview-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-preview-d1-databases`,{type:`string`,description:`D1 databases used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-durable-object-namespaces`,{type:`string`,description:`Durable Object namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-env-vars`,{type:`string`,description:`Environment variables used for builds and Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-preview-hyperdrive-bindings`,{type:`string`,description:`Hyperdrive bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-kv-namespaces`,{type:`string`,description:`KV namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-preview-mtls-certificates`,{type:`string`,description:`mTLS bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-preview-queue-producers`,{type:`string`,description:`Queue Producer bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-r2-buckets`,{type:`string`,description:`R2 buckets used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-services`,{type:`string`,description:`Services used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).coerce(`deployment-configs-preview-usage-model`,e=>h(e,`deployment-configs-preview-usage-model`,`text`)).option(`deployment-configs-preview-vectorize-bindings`,{type:`string`,description:`Vectorize bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`deployment-configs-production-ai-bindings`,{type:`string`,description:`Constellation bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-production-analytics-engine-datasets`,{type:`string`,description:`Analytics Engine bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-browsers`,{type:`string`,description:`Browser bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).option(`deployment-configs-production-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-production-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-production-d1-databases`,{type:`string`,description:`D1 databases used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-durable-object-namespaces`,{type:`string`,description:`Durable Object namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-env-vars`,{type:`string`,description:`Environment variables used for builds and Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-production-hyperdrive-bindings`,{type:`string`,description:`Hyperdrive bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-kv-namespaces`,{type:`string`,description:`KV namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-production-mtls-certificates`,{type:`string`,description:`mTLS bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-production-queue-producers`,{type:`string`,description:`Queue Producer bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-r2-buckets`,{type:`string`,description:`R2 buckets used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-services`,{type:`string`,description:`Services used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).coerce(`deployment-configs-production-usage-model`,e=>h(e,`deployment-configs-production-usage-model`,`text`)).option(`deployment-configs-production-vectorize-bindings`,{type:`string`,description:`Vectorize bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`name`,{type:`string`,description:`Name for the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`}).option(`production-branch`,{type:`string`,description:`Production branch of the project. Used to identify production deployments.`}).option(`source-config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
7
- When disabled, no deployments (production or preview) will be triggered automatically.
8
- `}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).coerce(`source-config-preview-deployment-setting`,e=>h(e,`source-config-preview-deployment-setting`,`text`)).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).coerce(`source-type`,e=>h(e,`source-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`source-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0})}const S={command:`create`,describe:`Create a Cloudflare Pages project`,builder:re,handler:async e=>d({command:`pages create`,classification:{safeFlags:[`build-config-build-caching`,`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-usage-model`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-fail-open`,`deployment-configs-production-usage-model`,`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`source-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]):f(e.body),sensitiveBodyPaths:[[`build_config`,`web_analytics_token`]]});return}let t=e.body===void 0?void 0:f(e.body),n=await a(e),i=e.local?r:await s();if(e.accountId=i,e.body!==void 0){let e=t,r=await u(`Creating`,async()=>n.send(x,{body:e,account_id:i}));c(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await _(`name`,`Name for the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`)),e[`production-branch`]===void 0&&(e[`production-branch`]=await _(`production-branch`,`Production branch of the project. Used to identify production deployments.`));let d=m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]),g=await u(`Creating`,async()=>n.send(x,{body:d,account_id:i}));c(g,{successLabel:`Created`})})};var C={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}`};function w(e){return e.usage(`$0 pages delete <project-name>
9
-
10
- Permanently delete a Cloudflare Pages project and its deployments.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const T={command:`delete <project-name>`,describe:`Delete a Cloudflare Pages project`,builder:w,handler:async e=>d({command:`pages delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await y({force:!!e.force}))return;let i=await u(`Deleting`,async()=>t.send(C,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})};var E={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments`,pathParams:[`account_id`,`project_name`],body:`form`};function D(e){return e.usage(`$0 pages deployments create <project-name>
11
-
12
- Create a Cloudflare Pages deployment from a Git branch or Direct Upload manifest. Git repositories must already be authorized in Cloudflare Pages.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`branch`,{type:`string`,description:"Git branch to deploy. Uses the branch's `HEAD`; defaults to the project's production branch."}).option(`commit-dirty`,{type:`string`,description:"Whether the associated Git working tree has uncommitted changes. Provide `true` or `false`."}).option(`commit-hash`,{type:`string`,description:`Git commit SHA associated with the deployment.`}).option(`commit-message`,{type:`string`,description:`Git commit message associated with the deployment.`}).option(`manifest`,{type:`string`,description:`JSON-encoded object mapping deployment file paths to their uploaded content hashes. Required for Direct Upload deployments. Maximum 20,000 entries. `}).option(`pages-build-output-dir`,{type:`string`,description:`The build output directory path.`}).option(`wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration file used for this deployment.`}).option(`redirects`,{type:`string`,description:"Literal content or @path/to/file for the `_redirects` form field. Redirects configuration file for the deployment."}).option(`routes-json`,{type:`string`,description:"Literal content or @path/to/file for the `_routes.json` form field. Routes configuration file defining routing rules."}).option(`worker-bundle`,{type:`string`,description:"Literal content or @path/to/file for the `_worker.bundle` form field. Worker bundle file in multipart/form-data format. Mutually exclusive with `_worker.js`.\nCannot specify both `_worker.js` and `_worker.bundle` in the same request.\nMaximum size: 25 MiB.\n"}).option(`worker-js`,{type:`string`,description:"Literal content or @path/to/file for the `_worker.js` form field. Worker JavaScript file. Mutually exclusive with `_worker.bundle`.\nCannot specify both `_worker.js` and `_worker.bundle` in the same request.\n"}).option(`functions-filepath-routing-config-json`,{type:`string`,description:"Literal content or @path/to/file for the `functions-filepath-routing-config.json` form field. Functions routing configuration file."})}const O={command:`create <project-name>`,describe:`Create a Pages deployment`,builder:D,handler:async e=>d({command:`pages deployments create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,branch:e.branch,"commit-dirty":e[`commit-dirty`],"commit-hash":e[`commit-hash`],"commit-message":e[`commit-message`],manifest:e.manifest,"pages-build-output-dir":e[`pages-build-output-dir`],"wrangler-config-hash":e[`wrangler-config-hash`],redirects:e.redirects,"routes-json":e[`routes-json`],"worker-bundle":e[`worker-bundle`],"worker-js":e[`worker-js`],"functions-filepath-routing-config-json":e[`functions-filepath-routing-config-json`]}});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.file!==void 0||e.body!==void 0||e.branch!==void 0||e[`commit-dirty`]!==void 0||e[`commit-hash`]!==void 0||e[`commit-message`]!==void 0||e.manifest!==void 0||e[`pages-build-output-dir`]!==void 0||e[`wrangler-config-hash`]!==void 0||e.redirects!==void 0||e[`routes-json`]!==void 0||e[`worker-bundle`]!==void 0||e[`worker-js`]!==void 0||e[`functions-filepath-routing-config-json`]!==void 0){let r=new FormData;if(e.file!==void 0){let t=g(e.file);r.append(`_headers`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&r.append(`_headers`,e.body);if(e.branch!==void 0&&r.append(`branch`,String(h(e.branch,`branch`,`text`)??``)),e[`commit-dirty`]!==void 0&&r.append(`commit_dirty`,String(h(e[`commit-dirty`],`commit-dirty`,`text`)??``)),e[`commit-hash`]!==void 0&&r.append(`commit_hash`,String(h(e[`commit-hash`],`commit-hash`,`text`)??``)),e[`commit-message`]!==void 0&&r.append(`commit_message`,String(h(e[`commit-message`],`commit-message`,`text`)??``)),e.manifest!==void 0&&r.append(`manifest`,String(h(e.manifest,`manifest`,`text`)??``)),e[`pages-build-output-dir`]!==void 0&&r.append(`pages_build_output_dir`,String(h(e[`pages-build-output-dir`],`pages-build-output-dir`,`text`)??``)),e[`wrangler-config-hash`]!==void 0&&r.append(`wrangler_config_hash`,String(h(e[`wrangler-config-hash`],`wrangler-config-hash`,`text`)??``)),e.redirects!==void 0){let t=String(e.redirects);if(t.startsWith(`@`)){let e=t.slice(1),n=h(t,`redirects`,`binary`);r.append(`_redirects`,new Blob([n]),e.split(/[\\/]/).filter(Boolean).pop())}else r.append(`_redirects`,new Blob([t]),`_redirects`)}if(e[`routes-json`]!==void 0){let t=String(e[`routes-json`]);if(t.startsWith(`@`)){let e=t.slice(1),n=h(t,`routes-json`,`binary`);r.append(`_routes.json`,new Blob([n]),e.split(/[\\/]/).filter(Boolean).pop())}else r.append(`_routes.json`,new Blob([t]),`_routes.json`)}if(e[`worker-bundle`]!==void 0){let t=String(e[`worker-bundle`]);if(t.startsWith(`@`)){let e=t.slice(1),n=h(t,`worker-bundle`,`binary`);r.append(`_worker.bundle`,new Blob([n]),e.split(/[\\/]/).filter(Boolean).pop())}else r.append(`_worker.bundle`,new Blob([t]),`_worker.bundle`)}if(e[`worker-js`]!==void 0){let t=String(e[`worker-js`]);if(t.startsWith(`@`)){let e=t.slice(1),n=h(t,`worker-js`,`binary`);r.append(`_worker.js`,new Blob([n]),e.split(/[\\/]/).filter(Boolean).pop())}else r.append(`_worker.js`,new Blob([t]),`_worker.js`)}if(e[`functions-filepath-routing-config-json`]!==void 0){let t=String(e[`functions-filepath-routing-config-json`]);if(t.startsWith(`@`)){let e=t.slice(1),n=h(t,`functions-filepath-routing-config-json`,`binary`);r.append(`functions-filepath-routing-config.json`,new Blob([n]),e.split(/[\\/]/).filter(Boolean).pop())}else r.append(`functions-filepath-routing-config.json`,new Blob([t]),`functions-filepath-routing-config.json`)}let a=await u(`Creating`,async()=>i(t,`POST`,`/accounts/${n}/pages/projects/${encodeURIComponent(String(e[`project-name`]))}/deployments`,{body:r}));c(a,{successLabel:`Created`});return}if(e.body!==void 0){let r=h(e.body,`body`,`binary`),a=await u(`Creating`,async()=>i(t,`POST`,`/accounts/${n}/pages/projects/${encodeURIComponent(String(e[`project-name`]))}/deployments`,{body:r,headers:{"Content-Type":`multipart/form-data`}}));c(a,{successLabel:`Created`});return}let d=await u(`Creating`,async()=>t.send(E,{account_id:n,project_name:e[`project-name`]}));c(d,{successLabel:`Created`})})};var k={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}`,query:[`force`]};function A(e){return e.usage(`$0 pages deployments delete <deployment-id>
13
-
14
- Remove a deployment from a Cloudflare Pages project.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`allow-aliased`,{type:`boolean`,description:`Allow deletion when a non-production deployment has an active alias.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const j={command:`delete <deployment-id>`,describe:`Delete a Pages deployment`,builder:A,handler:async e=>d({command:`pages deployments delete`,classification:{safeFlags:[`allow-aliased`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={force:e[`allow-aliased`]};if(e.dryRun){let n=await o();l({command:`cf pages deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},query:t,bodyKind:`none`});return}let n=await a(e),i=e.local?r:await s();if(e.accountId=i,!await y({force:!!e.force}))return;let d=await u(`Deleting`,async()=>n.send(k,{account_id:i,project_name:e[`project-name`],deployment_id:e[`deployment-id`],...t}));c(d,{successLabel:`Deleted`})})};var M={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}`};function N(e){return e.usage(`$0 pages deployments get <deployment-id>
15
-
16
- Retrieve the status and details of a Cloudflare Pages deployment.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get <deployment-id>`,describe:`Get a Pages deployment`,builder:N,handler:async e=>d({command:`pages deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages deployments get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(M,{account_id:n,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));c(i,{successLabel:`Loaded`})})};var F={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}/history/logs`};function I(e){return e.usage(`$0 pages deployments history logs get <deployment-id>
17
-
18
- Retrieve the build logs for a Cloudflare Pages deployment.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <deployment-id>`,describe:`Get Pages deployment logs`,builder:I,handler:async e=>d({command:`pages deployments history logs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages deployments history logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}/history/logs`,pathParams:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(F,{account_id:n,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));c(i,{successLabel:`Loaded`})})},R={command:`logs`,describe:`Operations for deployments.history.logs`,builder:e=>e.command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},z={command:`history`,describe:`Operations for deployments.history`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments`,query:[`env`,`page`,`per_page`]};function V(e){return e.usage(`$0 pages deployments list
19
-
20
- List the production or preview deployments for a Cloudflare Pages project.`).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`env`,{type:`string`,description:"Deployment environment to return. Valid values are `production` and `preview`.",choices:[`production`,`preview`]}).option(`page`,{type:`number`,description:`Page number of results to return.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`list`,describe:`List Pages deployments`,builder:V,handler:async e=>d({command:`pages deployments list`,classification:{safeFlags:[`env`,`dry-run`]}},e,async()=>{let t={env:e.env,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let n=await o();l({command:`cf pages deployments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments`,pathParams:{"project-name":String(e[`project-name`]??``)},query:t,bodyKind:`none`});return}let n=await a(e),i=e.local?r:await s();e.accountId=i;let d=await u(`Loading`,async()=>n.send(B,{account_id:i,project_name:e[`project-name`],...t}));c(d,{successLabel:`Loaded`})})};var U={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}/retry`};function W(e){return e.usage(`$0 pages deployments retry <deployment-id>
21
-
22
- Retry a previous Cloudflare Pages deployment.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`retry <deployment-id>`,describe:`Retry a Pages deployment`,builder:W,handler:async e=>d({command:`pages deployments retry`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages deployments retry`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}/retry`,pathParams:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Creating`,async()=>t.send(U,{account_id:n,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));c(i,{successLabel:`Created`})})};var K={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}/rollback`};function q(e){return e.usage(`$0 pages deployments rollback <deployment-id>
23
-
24
- Roll back production to a previous successful Cloudflare Pages deployment.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const J={command:`rollback <deployment-id>`,describe:`Roll back a Pages deployment`,builder:q,handler:async e=>d({command:`pages deployments rollback`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages deployments rollback`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}/rollback`,pathParams:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await y({force:!!e.force,message:`This operation rolls back the production deployment to an earlier deployment.`}))return;let i=await u(`Processing`,async()=>t.send(K,{account_id:n,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));c(i,{successLabel:`Done`})})},Y={command:`deployments`,describe:`Operations for deployments`,builder:e=>e.command(O).command(j).command(P).command(H).command(G).command(J).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains`,body:`json`};function ie(e){return e.usage(`$0 pages domains create <project-name>
25
-
26
- Attach a custom domain to a Cloudflare Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`name`,{type:`string`,description:"Fully qualified domain name for the Pages project, such as `example.com`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ae={command:`create <project-name>`,describe:`Add a Pages custom domain`,builder:ie,handler:async e=>d({command:`pages domains create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?m({name:h(e.name,`name`,`text`)}):f(e.body)});return}let t=e.body===void 0?void 0:f(e.body),n=await a(e),i=e.local?r:await s();if(e.accountId=i,e.body!==void 0){let r=t,a=await u(`Creating`,async()=>n.send(X,{body:r,account_id:i,project_name:e[`project-name`]}));c(a,{successLabel:`Created`});return}e.name===void 0&&(e.name=await _(`name`,"Fully qualified domain name for the Pages project, such as `example.com`."));let d=m({name:h(e.name,`name`,`text`)}),p=await u(`Creating`,async()=>n.send(X,{body:d,account_id:i,project_name:e[`project-name`]}));c(p,{successLabel:`Created`})})};var oe={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains/${e.domain_name}`};function se(e){return e.usage(`$0 pages domains delete <domain-name>
27
-
28
- Remove a custom domain from a Cloudflare Pages project.`).positional(`domain-name`,{type:`string`,description:"Fully qualified domain name for the Pages project, such as `example.com`.",demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ce={command:`delete <domain-name>`,describe:`Delete a Pages custom domain`,builder:se,handler:async e=>d({command:`pages domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``),"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await y({force:!!e.force}))return;let i=await u(`Deleting`,async()=>t.send(oe,{account_id:n,project_name:e[`project-name`],domain_name:e[`domain-name`]}));c(i,{successLabel:`Deleted`})})};var le={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains/${e.domain_name}`};function ue(e){return e.usage(`$0 pages domains get <domain-name>
29
-
30
- Retrieve the configuration and validation status of a custom domain attached to a Cloudflare Pages project.`).positional(`domain-name`,{type:`string`,description:"Fully qualified domain name for the Pages project, such as `example.com`.",demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`get <domain-name>`,describe:`Get a Pages custom domain`,builder:ue,handler:async e=>d({command:`pages domains get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``),"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(le,{account_id:n,project_name:e[`project-name`],domain_name:e[`domain-name`]}));c(i,{successLabel:`Loaded`})})};var fe={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains`};function pe(e){return e.usage(`$0 pages domains list
31
-
32
- List the custom domains associated with a Cloudflare Pages project.`).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`list`,describe:`List Pages custom domains`,builder:pe,handler:async e=>d({command:`pages domains list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(fe,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Loaded`})})};var he={method:`PATCH`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains/${e.domain_name}`};function ge(e){return e.usage(`$0 pages domains validation retry <domain-name>
33
-
34
- Retry validation for a custom domain attached to a Cloudflare Pages project.`).positional(`domain-name`,{type:`string`,description:"Fully qualified domain name for the Pages project, such as `example.com`.",demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`retry <domain-name>`,describe:`Retry custom domain validation`,builder:ge,handler:async e=>d({command:`pages domains validation retry`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages domains validation retry`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``),"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Updating`,async()=>t.send(he,{account_id:n,project_name:e[`project-name`],domain_name:e[`domain-name`]}));c(i,{successLabel:`Updated`})})},ve={command:`validation`,describe:`Operations for domains.validation`,builder:e=>e.command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ye={command:`domains`,describe:`Operations for domains`,builder:e=>e.command(ae).command(ce).command(de).command(me).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`PATCH`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}`,body:`json`};function be(e){return e.usage(`$0 pages edit <project-name>
35
-
36
- Update the build, deployment, source, or environment settings for a Cloudflare Pages project. To delete an environment variable, set its key to \`null\`.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`build-config-build-caching`,{type:`boolean`,description:`Enable build caching for the project.`}).option(`build-config-build-command`,{type:`string`,description:`Command used to build project.`}).option(`build-config-destination-dir`,{type:`string`,description:`Output directory of the build.`}).option(`build-config-root-dir`,{type:`string`,description:`Directory to run the command.`}).option(`build-config-web-analytics-tag`,{type:`string`,description:`The classifying tag for analytics.`}).option(`build-config-web-analytics-token`,{type:`string`,description:`The auth token for analytics.`}).option(`deployment-configs-preview-ai-bindings`,{type:`string`,description:`Constellation bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-preview-analytics-engine-datasets`,{type:`string`,description:`Analytics Engine bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-browsers`,{type:`string`,description:`Browser bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).option(`deployment-configs-preview-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-preview-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-preview-d1-databases`,{type:`string`,description:`D1 databases used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-durable-object-namespaces`,{type:`string`,description:`Durable Object namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-env-vars`,{type:`string`,description:`Environment variables used for builds and Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-preview-hyperdrive-bindings`,{type:`string`,description:`Hyperdrive bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-kv-namespaces`,{type:`string`,description:`KV namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-preview-mtls-certificates`,{type:`string`,description:`mTLS bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-preview-queue-producers`,{type:`string`,description:`Queue Producer bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-r2-buckets`,{type:`string`,description:`R2 buckets used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-services`,{type:`string`,description:`Services used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).coerce(`deployment-configs-preview-usage-model`,e=>h(e,`deployment-configs-preview-usage-model`,`text`)).option(`deployment-configs-preview-vectorize-bindings`,{type:`string`,description:`Vectorize bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`deployment-configs-production-ai-bindings`,{type:`string`,description:`Constellation bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-production-analytics-engine-datasets`,{type:`string`,description:`Analytics Engine bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-browsers`,{type:`string`,description:`Browser bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).option(`deployment-configs-production-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-production-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-production-d1-databases`,{type:`string`,description:`D1 databases used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-durable-object-namespaces`,{type:`string`,description:`Durable Object namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-env-vars`,{type:`string`,description:`Environment variables used for builds and Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-production-hyperdrive-bindings`,{type:`string`,description:`Hyperdrive bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-kv-namespaces`,{type:`string`,description:`KV namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-production-mtls-certificates`,{type:`string`,description:`mTLS bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-production-queue-producers`,{type:`string`,description:`Queue Producer bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-r2-buckets`,{type:`string`,description:`R2 buckets used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-services`,{type:`string`,description:`Services used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).coerce(`deployment-configs-production-usage-model`,e=>h(e,`deployment-configs-production-usage-model`,`text`)).option(`deployment-configs-production-vectorize-bindings`,{type:`string`,description:`Vectorize bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`name`,{type:`string`,description:`Name for the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`}).option(`production-branch`,{type:`string`,description:`Production branch of the project. Used to identify production deployments.`}).option(`source-config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
37
- When disabled, no deployments (production or preview) will be triggered automatically.
38
- `}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).coerce(`source-config-preview-deployment-setting`,e=>h(e,`source-config-preview-deployment-setting`,`text`)).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).coerce(`source-type`,e=>h(e,`source-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`source-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0})}const xe={command:`edit <project-name>`,describe:`Update a Cloudflare Pages project`,builder:be,handler:async e=>d({command:`pages edit`,classification:{safeFlags:[`build-config-build-caching`,`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-usage-model`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-fail-open`,`deployment-configs-production-usage-model`,`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`source-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]):f(e.body),sensitiveBodyPaths:[[`build_config`,`web_analytics_token`]]});return}let t=e.body===void 0?void 0:f(e.body),n=await a(e),i=e.local?r:await s();if(e.accountId=i,e.body!==void 0){let r=t,a=await u(`Updating`,async()=>n.send(Z,{body:r,account_id:i,project_name:e[`project-name`]}));c(a,{successLabel:`Updated`});return}let d=m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]),g=await u(`Updating`,async()=>n.send(Z,{body:d,account_id:i,project_name:e[`project-name`]}));c(g,{successLabel:`Updated`})})};var Se={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}`};function Ce(e){return e.usage(`$0 pages get <project-name>
39
-
40
- Retrieve the configuration and deployment settings for a Cloudflare Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const we={command:`get <project-name>`,describe:`Get a Cloudflare Pages project`,builder:Ce,handler:async e=>d({command:`pages get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(Se,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Loaded`})})};var Te={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects`,query:[`page`,`per_page`]};function Ee(e){return e.usage(`$0 pages list
41
-
42
- List the Cloudflare Pages projects in an account.`).option(`page`,{type:`number`,description:`Page number of results to return.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`list`,describe:`List Cloudflare Pages projects`,builder:Ee,handler:async e=>d({command:`pages list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await o();l({command:`cf pages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pages/projects`,pathParams:{},query:t,bodyKind:`none`});return}let n=await a(e),i=e.local?r:await s();e.accountId=i;let d=await u(`Loading`,async()=>n.send(Te,{account_id:i,...t}));c(d,{successLabel:`Loaded`})})};var Q={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/source`,body:`json`};function $(e){return e.usage(`$0 pages source connect <project-name>
43
-
44
- Connect a GitHub or GitLab repository to a Cloudflare Pages project to enable Git-based deployments.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`source-config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
45
- When disabled, no deployments (production or preview) will be triggered automatically.
46
- `}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).coerce(`source-config-preview-deployment-setting`,e=>h(e,`source-config-preview-deployment-setting`,`text`)).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).coerce(`type`,e=>h(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Repository and deployment settings for connecting a Git repository to a Pages project.`})}const Oe={command:`connect <project-name>`,describe:`Connect a Git repository`,builder:$,handler:async e=>d({command:`pages source connect`,classification:{safeFlags:[`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages source connect`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/source`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?m({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e.type}):f(e.body)});return}let t=e.body===void 0?void 0:f(e.body),n=await a(e),i=e.local?r:await s();if(e.accountId=i,e.body!==void 0){let r=t,a=await u(`Creating`,async()=>n.send(Q,{body:r,account_id:i,project_name:e[`project-name`]}));c(a,{successLabel:`Created`});return}if(e[`source-config-deployments-enabled`]===void 0)throw Error(`--source-config-deployments-enabled is required (or pass --body with this field set).`);if(e[`source-config-owner`]===void 0&&(e[`source-config-owner`]=await _(`source-config-owner`,`The owner of the repository.`)),e[`source-config-owner-id`]===void 0&&(e[`source-config-owner-id`]=await _(`source-config-owner-id`,`The owner ID of the repository.`)),e[`source-config-path-excludes`]===void 0)throw Error(`--source-config-path-excludes is required (or pass --body with this field set).`);if(e[`source-config-path-includes`]===void 0)throw Error(`--source-config-path-includes is required (or pass --body with this field set).`);if(e[`source-config-pr-comments-enabled`]===void 0)throw Error(`--source-config-pr-comments-enabled is required (or pass --body with this field set).`);if(e[`source-config-preview-branch-excludes`]===void 0)throw Error(`--source-config-preview-branch-excludes is required (or pass --body with this field set).`);if(e[`source-config-preview-branch-includes`]===void 0)throw Error(`--source-config-preview-branch-includes is required (or pass --body with this field set).`);if(e[`source-config-preview-deployment-setting`]===void 0&&(e[`source-config-preview-deployment-setting`]=await v(`source-config-preview-deployment-setting`,`Controls whether commits to preview branches trigger a preview deployment.`,[`all`,`none`,`custom`])),e[`source-config-production-branch`]===void 0&&(e[`source-config-production-branch`]=await _(`source-config-production-branch`,`The production branch of the repository.`)),e[`source-config-production-deployments-enabled`]===void 0)throw Error(`--source-config-production-deployments-enabled is required (or pass --body with this field set).`);e[`source-config-repo-id`]===void 0&&(e[`source-config-repo-id`]=await _(`source-config-repo-id`,`The ID of the repository.`)),e[`source-config-repo-name`]===void 0&&(e[`source-config-repo-name`]=await _(`source-config-repo-name`,`The name of the repository.`)),e.type===void 0&&(e.type=await v(`type`,`The source control management provider.`,[`github`,`gitlab`]));let d=m({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e.type}),p=await u(`Creating`,async()=>n.send(Q,{body:d,account_id:i,project_name:e[`project-name`]}));c(p,{successLabel:`Created`})})};var ke={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/source`};function Ae(e){return e.usage(`$0 pages source disconnect <project-name>
47
-
48
- Disconnect the Git repository from a Cloudflare Pages project to stop Git-based deployments.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const je={command:`disconnect <project-name>`,describe:`Disconnect a Git repository`,builder:Ae,handler:async e=>d({command:`pages source disconnect`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages source disconnect`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/source`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await y({force:!!e.force}))return;let i=await u(`Deleting`,async()=>t.send(ke,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})},Me={command:`source`,describe:`Operations for source`,builder:e=>e.command(Oe).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ne=e(`deploy [directory]`,`Deploy a directory of static assets as a Pages deployment`,()=>import(`./command-DwzVtmb3.mjs`),{command:`pages deploy`,recordArgs:!1});const Pe={command:`pages`,describe:`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,builder:e=>e.command(S).command(T).command(n(Ne,`preview`)).command(xe).command(we).command(De).command(ne).command(Y).command(ye).command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Pe as default};
@@ -1,40 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{n}from"./auth-B-h0BHg7.mjs";import{a as r,t as i}from"./context-BY1Eh_Qe.mjs";import{t as a}from"./output-BZQEl3mK.mjs";import{t as o}from"./dry-run-kJbjn4kG.mjs";import{t as s}from"./progress-yvPscjYg.mjs";import{t as c}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as l,n as u,t as d}from"./body-parser-DoewLePl.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-CEpZ-lQZ.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines`,body:`json`};function _(e){return e.usage(`$0 pipelines create
3
-
4
- Create a new Pipeline.`).option(`name`,{type:`string`,description:`Specifies the name of the Pipeline.`}).option(`sql`,{type:`string`,description:`Specifies SQL for the Pipeline processing flow.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create Pipeline`,builder:_,handler:async e=>c({command:`pipelines create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`),sql:f(e.sql,`sql`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>l.send(g,{body:e,account_id:m}));a(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Specifies the name of the Pipeline.`)),e.sql===void 0&&(e.sql=await p(`sql`,`Specifies SQL for the Pipeline processing flow.`));let h=d({name:f(e.name,`name`,`text`),sql:f(e.sql,`sql`,`text`)}),_=await s(`Creating`,async()=>l.send(g,{body:h,account_id:m}));a(_,{successLabel:`Created`})})};var ee={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines/${t.pipeline_id}`};function y(e){return e.usage(`$0 pipelines delete <pipeline-id>
5
-
6
- Delete Pipeline in Account.`).positional(`pipeline-id`,{type:`string`,description:`Specifies the public ID of the pipeline.`,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 <pipeline-id>`,describe:`Delete Pipeline`,builder:y,handler:async e=>c({command:`pipelines delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/pipelines/${e[`pipeline-id`]==null?`<pipeline-id>`:encodeURIComponent(String(e[`pipeline-id`]))}`,pathParams:{"pipeline-id":String(e[`pipeline-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(ee,{account_id:l,pipeline_id:e[`pipeline-id`]}));a(u,{successLabel:`Deleted`})})};var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines/${t.pipeline_id}`};function ne(e){return e.usage(`$0 pipelines get <pipeline-id>
7
-
8
- Get Pipeline details.`).positional(`pipeline-id`,{type:`string`,description:`Specifies the public ID of the pipeline.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <pipeline-id>`,describe:`Get Pipeline Details`,builder:ne,handler:async e=>c({command:`pipelines get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/pipelines/${e[`pipeline-id`]==null?`<pipeline-id>`:encodeURIComponent(String(e[`pipeline-id`]))}`,pathParams:{"pipeline-id":String(e[`pipeline-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(te,{account_id:l,pipeline_id:e[`pipeline-id`]}));a(u,{successLabel:`Loaded`})})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines`,body:`json`};function S(e){return e.usage(`$0 pipelines legacy-create
9
-
10
- [DEPRECATED] Create a new pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).option(`destination-batch-max-bytes`,{type:`number`,description:`Specifies rough maximum size of files.`,default:1e8}).option(`destination-batch-max-duration-s`,{type:`number`,description:`Specifies duration to wait to aggregate batches files.`,default:300}).option(`destination-batch-max-rows`,{type:`number`,description:`Specifies rough maximum number of rows per file.`,default:1e7}).option(`destination-compression-type`,{type:`string`,description:`Specifies the desired compression algorithm and format.`,choices:[`none`,`gzip`,`deflate`],default:`gzip`}).coerce(`destination-compression-type`,e=>f(e,`destination-compression-type`,`text`)).option(`destination-credentials-access-key-id`,{type:`string`,description:`Specifies the R2 Bucket Access Key Id.`}).option(`destination-credentials-endpoint`,{type:`string`,description:`Specifies the R2 Endpoint.`}).option(`destination-credentials-secret-access-key`,{type:`string`,description:`Specifies the R2 Bucket Secret Access Key.`}).option(`destination-format`,{type:`string`,description:`Specifies the format of data to deliver.`,choices:[`json`]}).coerce(`destination-format`,e=>f(e,`destination-format`,`text`)).option(`destination-path-bucket`,{type:`string`,description:`Specifies the R2 Bucket to store files.`}).option(`destination-path-filename`,{type:`string`,description:`Specifies the name pattern to for individual data files.`}).option(`destination-path-filepath`,{type:`string`,description:`Specifies the name pattern for directory.`}).option(`destination-path-prefix`,{type:`string`,description:`Specifies the base directory within the bucket.`}).option(`destination-type`,{type:`string`,description:`Specifies the type of destination.`,choices:[`r2`]}).coerce(`destination-type`,e=>f(e,`destination-type`,`text`)).option(`name`,{type:`string`,description:`Defines the name of the pipeline.`}).option(`source`,{type:`string`,description:`The source field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`legacy-create`,describe:`[DEPRECATED] Create Pipeline`,builder:S,handler:async e=>c({command:`pipelines legacy-create`,classification:{safeFlags:[`destination-compression-type`,`destination-format`,`destination-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines legacy-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({destination:{batch:{max_bytes:e[`destination-batch-max-bytes`],max_duration_s:e[`destination-batch-max-duration-s`],max_rows:e[`destination-batch-max-rows`]},compression:{type:e[`destination-compression-type`]},credentials:{access_key_id:f(e[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:f(e[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:f(e[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:e[`destination-format`],path:{bucket:f(e[`destination-path-bucket`],`destination-path-bucket`,`text`),filename:f(e[`destination-path-filename`],`destination-path-filename`,`text`),filepath:f(e[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:f(e[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:e[`destination-type`]},name:f(e.name,`name`,`text`),source:l(e.source,`source`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),h=await n(e),g=e.local?t:await i();if(e.accountId=g,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>h.send(x,{body:e,account_id:g}));a(t,{successLabel:`Created`});return}if(e[`destination-credentials-access-key-id`]===void 0&&(e[`destination-credentials-access-key-id`]=await p(`destination-credentials-access-key-id`,`Specifies the R2 Bucket Access Key Id.`)),e[`destination-credentials-endpoint`]===void 0&&(e[`destination-credentials-endpoint`]=await p(`destination-credentials-endpoint`,`Specifies the R2 Endpoint.`)),e[`destination-credentials-secret-access-key`]===void 0&&(e[`destination-credentials-secret-access-key`]=await p(`destination-credentials-secret-access-key`,`Specifies the R2 Bucket Secret Access Key.`)),e[`destination-format`]===void 0&&(e[`destination-format`]=await m(`destination-format`,`Specifies the format of data to deliver.`,[`json`])),e[`destination-path-bucket`]===void 0&&(e[`destination-path-bucket`]=await p(`destination-path-bucket`,`Specifies the R2 Bucket to store files.`)),e[`destination-type`]===void 0&&(e[`destination-type`]=await m(`destination-type`,`Specifies the type of destination.`,[`r2`])),e.name===void 0&&(e.name=await p(`name`,`Defines the name of the pipeline.`)),e.source===void 0)throw Error(`--source is required (or pass --body with this field set).`);let _=d({destination:{batch:{max_bytes:e[`destination-batch-max-bytes`],max_duration_s:e[`destination-batch-max-duration-s`],max_rows:e[`destination-batch-max-rows`]},compression:{type:e[`destination-compression-type`]},credentials:{access_key_id:f(e[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:f(e[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:f(e[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:e[`destination-format`],path:{bucket:f(e[`destination-path-bucket`],`destination-path-bucket`,`text`),filename:f(e[`destination-path-filename`],`destination-path-filename`,`text`),filepath:f(e[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:f(e[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:e[`destination-type`]},name:f(e.name,`name`,`text`),source:l(e.source,`source`)}),v=await s(`Creating`,async()=>h.send(x,{body:_,account_id:g}));a(v,{successLabel:`Created`})})};var w={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/${t.pipeline_name}`,response:!1};function T(e){return e.usage(`$0 pipelines legacy-delete <pipeline-name>
11
-
12
- [DEPRECATED] Delete a pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).positional(`pipeline-name`,{type:`string`,description:`Defines the name of the pipeline.`,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 E={command:`legacy-delete <pipeline-name>`,describe:`[DEPRECATED] Delete Pipeline`,builder:T,handler:async e=>c({command:`pipelines legacy-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines legacy-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/${e[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(e[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(e[`pipeline-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(w,{account_id:l,pipeline_name:e[`pipeline-name`]}));a(u,{successLabel:`Deleted`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/${t.pipeline_name}`,errors:{404:`NotFoundError`}};function O(e){return e.usage(`$0 pipelines legacy-get <pipeline-name>
13
-
14
- [DEPRECATED] Get configuration of a pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).positional(`pipeline-name`,{type:`string`,description:`Defines the name of the pipeline.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`legacy-get <pipeline-name>`,describe:`[DEPRECATED] Get Pipeline`,builder:O,handler:async e=>c({command:`pipelines legacy-get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines legacy-get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/${e[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(e[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(e[`pipeline-name`]??``)},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(D,{account_id:l,pipeline_name:e[`pipeline-name`]}));a(u,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines`,query:[`search`,`page`,`per_page`]};function j(e){return e.usage(`$0 pipelines legacy-list
15
-
16
- [DEPRECATED] List, filter, and paginate pipelines in an account. Use the new /pipelines/v1/pipelines endpoint instead.`).option(`search`,{type:`string`,description:`Specifies the prefix of pipeline name to search.`}).option(`page`,{type:`string`,description:`Specifies which page to retrieve.`}).option(`per-page`,{type:`string`,description:`Specifies the number of pipelines per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`legacy-list`,describe:`[DEPRECATED] List Pipelines`,builder:j,handler:async e=>c({command:`pipelines legacy-list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={search:e.search,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf pipelines legacy-list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(A,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var N={method:`PUT`,path:t=>e`/accounts/${t.account_id}/pipelines/${t.pipeline_name}`,body:`json`};function P(e){return e.usage(`$0 pipelines legacy-update <pipeline-name>
17
-
18
- [DEPRECATED] Update an existing pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).positional(`pipeline-name`,{type:`string`,description:`Defines the name of the pipeline.`,demandOption:!0}).option(`destination-batch-max-bytes`,{type:`number`,description:`Specifies rough maximum size of files.`}).option(`destination-batch-max-duration-s`,{type:`number`,description:`Specifies duration to wait to aggregate batches files.`}).option(`destination-batch-max-rows`,{type:`number`,description:`Specifies rough maximum number of rows per file.`}).option(`destination-compression-type`,{type:`string`,description:`Specifies the desired compression algorithm and format.`,choices:[`none`,`gzip`,`deflate`]}).coerce(`destination-compression-type`,e=>f(e,`destination-compression-type`,`text`)).option(`destination-credentials-access-key-id`,{type:`string`,description:`Specifies the R2 Bucket Access Key Id.`}).option(`destination-credentials-endpoint`,{type:`string`,description:`Specifies the R2 Endpoint.`}).option(`destination-credentials-secret-access-key`,{type:`string`,description:`Specifies the R2 Bucket Secret Access Key.`}).option(`destination-format`,{type:`string`,description:`Specifies the format of data to deliver.`,choices:[`json`]}).coerce(`destination-format`,e=>f(e,`destination-format`,`text`)).option(`destination-path-bucket`,{type:`string`,description:`Specifies the R2 Bucket to store files.`}).option(`destination-path-filename`,{type:`string`,description:`Specifies the name pattern to for individual data files.`}).option(`destination-path-filepath`,{type:`string`,description:`Specifies the name pattern for directory.`}).option(`destination-path-prefix`,{type:`string`,description:`Specifies the base directory within the bucket.`}).option(`destination-type`,{type:`string`,description:`Specifies the type of destination.`,choices:[`r2`]}).coerce(`destination-type`,e=>f(e,`destination-type`,`text`)).option(`name`,{type:`string`,description:`Defines the name of the pipeline.`}).option(`source`,{type:`string`,description:`The source field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`destination-credentials-access-key-id`,`destination-credentials-endpoint`,`destination-credentials-secret-access-key`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`destination-credentials-access-key-id`,`destination-credentials-endpoint`,`destination-credentials-secret-access-key`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --destination-credentials-* flag is set`)}return!0})}const F={command:`legacy-update <pipeline-name>`,describe:`[DEPRECATED] Update Pipeline`,builder:P,handler:async e=>c({command:`pipelines legacy-update`,classification:{safeFlags:[`destination-compression-type`,`destination-format`,`destination-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines legacy-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/${e[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(e[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(e[`pipeline-name`]??``)},bodyKind:`json`,body:e.body===void 0?d({destination:{batch:{max_bytes:e[`destination-batch-max-bytes`],max_duration_s:e[`destination-batch-max-duration-s`],max_rows:e[`destination-batch-max-rows`]},compression:{type:e[`destination-compression-type`]},credentials:{access_key_id:f(e[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:f(e[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:f(e[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:e[`destination-format`],path:{bucket:f(e[`destination-path-bucket`],`destination-path-bucket`,`text`),filename:f(e[`destination-path-filename`],`destination-path-filename`,`text`),filepath:f(e[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:f(e[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:e[`destination-type`]},name:f(e.name,`name`,`text`),source:l(e.source,`source`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),h=await n(e),g=e.local?t:await i();if(e.accountId=g,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>h.send(N,{body:t,account_id:g,pipeline_name:e[`pipeline-name`]}));a(n,{successLabel:`Updated`});return}if(e[`destination-format`]===void 0&&(e[`destination-format`]=await m(`destination-format`,`Specifies the format of data to deliver.`,[`json`])),e[`destination-path-bucket`]===void 0&&(e[`destination-path-bucket`]=await p(`destination-path-bucket`,`Specifies the R2 Bucket to store files.`)),e[`destination-type`]===void 0&&(e[`destination-type`]=await m(`destination-type`,`Specifies the type of destination.`,[`r2`])),e.name===void 0&&(e.name=await p(`name`,`Defines the name of the pipeline.`)),e.source===void 0)throw Error(`--source is required (or pass --body with this field set).`);let _=d({destination:{batch:{max_bytes:e[`destination-batch-max-bytes`],max_duration_s:e[`destination-batch-max-duration-s`],max_rows:e[`destination-batch-max-rows`]},compression:{type:e[`destination-compression-type`]},credentials:{access_key_id:f(e[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:f(e[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:f(e[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:e[`destination-format`],path:{bucket:f(e[`destination-path-bucket`],`destination-path-bucket`,`text`),filename:f(e[`destination-path-filename`],`destination-path-filename`,`text`),filepath:f(e[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:f(e[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:e[`destination-type`]},name:f(e.name,`name`,`text`),source:l(e.source,`source`)}),v=await s(`Updating`,async()=>h.send(N,{body:_,account_id:g,pipeline_name:e[`pipeline-name`]}));a(v,{successLabel:`Updated`})})};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines`,query:[`page`,`per_page`,`name`]};function L(e){return e.usage(`$0 pipelines list
19
-
20
- List/Filter Pipelines in Account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`name`,{type:`string`,description:`Filters pipelines by name (case-insensitive substring).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`list`,describe:`List Pipelines`,builder:L,handler:async e=>c({command:`pipelines list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],name:e.name};if(e.dryRun){let e=await r();o({command:`cf pipelines list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(I,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var z={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks`,body:`json`};function B(e){return e.usage(`$0 pipelines sinks create
21
-
22
- Create a new Sink.`).option(`sink-config-account-id`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-bucket`,{type:`string`,description:`R2 Bucket to write to`}).option(`sink-config-credentials-access-key-id`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-credentials-secret-access-key`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-file-naming-prefix`,{type:`string`,description:`The prefix to use in file name. i.e prefix-<uuid>.parquet`}).option(`sink-config-file-naming-strategy`,{type:`string`,description:`Filename generation strategy.`,choices:[`serial`,`uuid`,`uuid_v7`,`ulid`]}).coerce(`sink-config-file-naming-strategy`,e=>f(e,`sink-config-file-naming-strategy`,`text`)).option(`sink-config-file-naming-suffix`,{type:`string`,description:`This will overwrite the default file suffix. i.e .parquet, use with caution`}).option(`sink-config-jurisdiction`,{type:`string`,description:`Jurisdiction this bucket is hosted in`}).option(`sink-config-partitioning-time-pattern`,{type:`string`,description:`The pattern of the date string`}).option(`sink-config-path`,{type:`string`,description:`Subpath within the bucket to write to`}).option(`sink-config-rolling-policy-file-size-bytes`,{type:`number`,description:`Files will be rolled after reaching this number of bytes`}).option(`sink-config-rolling-policy-inactivity-seconds`,{type:`number`,description:`Number of seconds of inactivity to wait before rolling over to a new file`}).option(`sink-config-rolling-policy-interval-seconds`,{type:`number`,description:`Number of seconds to wait before rolling over to a new file`}).option(`sink-config-namespace`,{type:`string`,description:`Table namespace`}).option(`sink-config-table-name`,{type:`string`,description:`Table name`}).option(`sink-config-token`,{type:`string`,description:`Authentication token`}).option(`format-decimal-encoding`,{type:`string`,description:`The format.decimal_encoding field`,choices:[`number`,`string`,`bytes`]}).coerce(`format-decimal-encoding`,e=>f(e,`format-decimal-encoding`,`text`)).option(`format-timestamp-format`,{type:`string`,description:`The format.timestamp_format field`,choices:[`rfc3339`,`unix_millis`]}).coerce(`format-timestamp-format`,e=>f(e,`format-timestamp-format`,`text`)).option(`format-unstructured`,{type:`boolean`,description:`The format.unstructured field`}).option(`format-compression`,{type:`string`,description:`Specifies the compression applied to JSON sink output.`,choices:[`uncompressed`,`gzip`,`snappy`,`zstd`,`lz4`]}).coerce(`format-compression`,e=>f(e,`format-compression`,`text`)).option(`format-type`,{type:`string`,description:`The format.type field`,choices:[`json`,`parquet`]}).coerce(`format-type`,e=>f(e,`format-type`,`text`)).option(`format-row-group-bytes`,{type:`number`,description:`The format.row_group_bytes field`}).option(`name`,{type:`string`,description:`Defines the name of the Sink.`}).option(`schema-fields`,{type:`string`,description:`The schema.fields field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`schema-inferred`,{type:`boolean`,description:`The schema.inferred field`}).option(`type`,{type:`string`,description:`Specifies the type of sink.`,choices:[`r2`,`r2_data_catalog`,`basin_catalog`]}).coerce(`type`,e=>f(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`sink-config-credentials-access-key-id`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-credentials-access-key-id`,[`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-credentials-secret-access-key`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-credentials-secret-access-key`,[`sink-config-credentials-access-key-id`]).conflicts(`sink-config-file-naming-prefix`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-file-naming-prefix`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-file-naming-strategy`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-file-naming-strategy`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-file-naming-suffix`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-file-naming-suffix`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-jurisdiction`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-jurisdiction`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-partitioning-time-pattern`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-partitioning-time-pattern`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-path`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-path`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-namespace`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).implies(`sink-config-namespace`,[`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-table-name`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).implies(`sink-config-table-name`,[`sink-config-token`]).conflicts(`sink-config-token`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).implies(`sink-config-token`,[`sink-config-table-name`]).conflicts(`format-decimal-encoding`,[`format-row-group-bytes`]).conflicts(`format-timestamp-format`,[`format-row-group-bytes`]).conflicts(`format-unstructured`,[`format-row-group-bytes`]).conflicts(`format-row-group-bytes`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).check(e=>{let t=[`sink-config-account-id`,`sink-config-bucket`,`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`,`sink-config-rolling-policy-file-size-bytes`,`sink-config-rolling-policy-inactivity-seconds`,`sink-config-rolling-policy-interval-seconds`,`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`sink-config-account-id`,`sink-config-bucket`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --config-* flag is set`)}return!0}).check(e=>{let t=[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-compression`,`format-type`,`format-row-group-bytes`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`format-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --format-* flag is set`)}return!0})}const V={command:`create`,describe:`Create Sink`,builder:B,handler:async e=>c({command:`pipelines sinks create`,classification:{safeFlags:[`sink-config-file-naming-strategy`,`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-compression`,`format-type`,`schema-inferred`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines sinks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/sinks`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({config:{account_id:f(e[`sink-config-account-id`],`sink-config-account-id`,`text`),bucket:f(e[`sink-config-bucket`],`sink-config-bucket`,`text`),credentials:{access_key_id:f(e[`sink-config-credentials-access-key-id`],`sink-config-credentials-access-key-id`,`text`),secret_access_key:f(e[`sink-config-credentials-secret-access-key`],`sink-config-credentials-secret-access-key`,`text`)},file_naming:{prefix:f(e[`sink-config-file-naming-prefix`],`sink-config-file-naming-prefix`,`text`),strategy:e[`sink-config-file-naming-strategy`],suffix:f(e[`sink-config-file-naming-suffix`],`sink-config-file-naming-suffix`,`text`)},jurisdiction:f(e[`sink-config-jurisdiction`],`sink-config-jurisdiction`,`text`),partitioning:{time_pattern:f(e[`sink-config-partitioning-time-pattern`],`sink-config-partitioning-time-pattern`,`text`)},path:f(e[`sink-config-path`],`sink-config-path`,`text`),rolling_policy:{file_size_bytes:e[`sink-config-rolling-policy-file-size-bytes`],inactivity_seconds:e[`sink-config-rolling-policy-inactivity-seconds`],interval_seconds:e[`sink-config-rolling-policy-interval-seconds`]},namespace:f(e[`sink-config-namespace`],`sink-config-namespace`,`text`),table_name:f(e[`sink-config-table-name`],`sink-config-table-name`,`text`),token:f(e[`sink-config-token`],`sink-config-token`,`text`)},format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],compression:e[`format-compression`],type:e[`format-type`],row_group_bytes:e[`format-row-group-bytes`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},type:e.type}):u(e.body),sensitiveBodyPaths:[[`config`,`credentials`,`secret_access_key`],[`config`,`token`]]});return}let c=e.body===void 0?void 0:u(e.body),h=await n(e),g=e.local?t:await i();if(e.accountId=g,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>h.send(z,{body:e,account_id:g}));a(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Defines the name of the Sink.`)),e.type===void 0&&(e.type=await m(`type`,`Specifies the type of sink.`,[`r2`,`r2_data_catalog`,`basin_catalog`]));let _=d({config:{account_id:f(e[`sink-config-account-id`],`sink-config-account-id`,`text`),bucket:f(e[`sink-config-bucket`],`sink-config-bucket`,`text`),credentials:{access_key_id:f(e[`sink-config-credentials-access-key-id`],`sink-config-credentials-access-key-id`,`text`),secret_access_key:f(e[`sink-config-credentials-secret-access-key`],`sink-config-credentials-secret-access-key`,`text`)},file_naming:{prefix:f(e[`sink-config-file-naming-prefix`],`sink-config-file-naming-prefix`,`text`),strategy:e[`sink-config-file-naming-strategy`],suffix:f(e[`sink-config-file-naming-suffix`],`sink-config-file-naming-suffix`,`text`)},jurisdiction:f(e[`sink-config-jurisdiction`],`sink-config-jurisdiction`,`text`),partitioning:{time_pattern:f(e[`sink-config-partitioning-time-pattern`],`sink-config-partitioning-time-pattern`,`text`)},path:f(e[`sink-config-path`],`sink-config-path`,`text`),rolling_policy:{file_size_bytes:e[`sink-config-rolling-policy-file-size-bytes`],inactivity_seconds:e[`sink-config-rolling-policy-inactivity-seconds`],interval_seconds:e[`sink-config-rolling-policy-interval-seconds`]},namespace:f(e[`sink-config-namespace`],`sink-config-namespace`,`text`),table_name:f(e[`sink-config-table-name`],`sink-config-table-name`,`text`),token:f(e[`sink-config-token`],`sink-config-token`,`text`)},format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],compression:e[`format-compression`],type:e[`format-type`],row_group_bytes:e[`format-row-group-bytes`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},type:e.type}),v=await s(`Creating`,async()=>h.send(z,{body:_,account_id:g}));a(v,{successLabel:`Created`})})};var H={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks/${t.sink_id}`};function U(e){return e.usage(`$0 pipelines sinks delete <sink-id>
23
-
24
- Delete Sink in Account.`).positional(`sink-id`,{type:`string`,description:`Specifies the publid ID of the sink.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const W={command:`delete <sink-id>`,describe:`Delete Sink`,builder:U,handler:async e=>c({command:`pipelines sinks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines sinks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/sinks/${e[`sink-id`]==null?`<sink-id>`:encodeURIComponent(String(e[`sink-id`]))}`,pathParams:{"sink-id":String(e[`sink-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(H,{account_id:l,sink_id:e[`sink-id`]}));a(u,{successLabel:`Deleted`})})};var G={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks/${t.sink_id}`};function ie(e){return e.usage(`$0 pipelines sinks get <sink-id>
25
-
26
- Get Sink Details.`).positional(`sink-id`,{type:`string`,description:`Specifies the publid ID of the sink.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get <sink-id>`,describe:`Get Sink Details`,builder:ie,handler:async e=>c({command:`pipelines sinks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines sinks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/sinks/${e[`sink-id`]==null?`<sink-id>`:encodeURIComponent(String(e[`sink-id`]))}`,pathParams:{"sink-id":String(e[`sink-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(G,{account_id:l,sink_id:e[`sink-id`]}));a(u,{successLabel:`Loaded`})})};var q={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks`,query:[`pipeline_id`,`name`,`order_by`,`direction`,`page`,`per_page`]};function J(e){return e.usage(`$0 pipelines sinks list
27
-
28
- List/Filter Sinks in Account.`).option(`pipeline-id`,{type:`string`,description:`Pipeline ID`}).option(`name`,{type:`string`,description:`Filters sinks by name (case-insensitive substring).`}).option(`order-by`,{type:`string`,description:"Sorts sinks by this field. Defaults to `created_at`.",choices:[`name`,`created_at`]}).option(`direction`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`list`,describe:`List Sinks`,builder:J,handler:async e=>c({command:`pipelines sinks list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},e,async()=>{let c={pipeline_id:e[`pipeline-id`],name:e.name,order_by:e[`order-by`],direction:e.direction,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf pipelines sinks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/sinks`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(q,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},ae={command:`sinks`,describe:`Destinations where pipeline data is written — R2 buckets, HTTP endpoints, or other storage`,builder:e=>e.command(V).command(W).command(K).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams`,body:`json`};function oe(e){return e.usage(`$0 pipelines streams create
29
-
30
- Create a new Stream.`).option(`format-decimal-encoding`,{type:`string`,description:`The format.decimal_encoding field`,choices:[`number`,`string`,`bytes`]}).coerce(`format-decimal-encoding`,e=>f(e,`format-decimal-encoding`,`text`)).option(`format-timestamp-format`,{type:`string`,description:`The format.timestamp_format field`,choices:[`rfc3339`,`unix_millis`]}).coerce(`format-timestamp-format`,e=>f(e,`format-timestamp-format`,`text`)).option(`format-unstructured`,{type:`boolean`,description:`The format.unstructured field`}).option(`format-type`,{type:`string`,description:`The format.type field`,choices:[`json`,`parquet`]}).coerce(`format-type`,e=>f(e,`format-type`,`text`)).option(`format-compression`,{type:`string`,description:`The format.compression field`,choices:[`uncompressed`,`snappy`,`gzip`,`zstd`,`lz4`]}).coerce(`format-compression`,e=>f(e,`format-compression`,`text`)).option(`format-row-group-bytes`,{type:`number`,description:`The format.row_group_bytes field`}).option(`http-authentication`,{type:`boolean`,description:`Indicates that authentication is required for the HTTP endpoint.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:`The http.cors.origins field`}).option(`http-enabled`,{type:`boolean`,description:`Indicates that the HTTP endpoint is enabled.`}).option(`name`,{type:`string`,description:`Specifies the name of the Stream.`}).option(`schema-fields`,{type:`string`,description:`The schema.fields field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`schema-inferred`,{type:`boolean`,description:`The schema.inferred field`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates that the worker binding is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`format-decimal-encoding`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-timestamp-format`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-unstructured`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-compression`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).conflicts(`format-row-group-bytes`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).check(e=>{let t=[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-type`,`format-compression`,`format-row-group-bytes`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`format-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --format-* flag is set`)}return!0}).check(e=>{let t=[`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`http-authentication`,`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0})}const se={command:`create`,describe:`Create Stream`,builder:oe,handler:async e=>c({command:`pipelines streams create`,classification:{safeFlags:[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-type`,`format-compression`,`http-authentication`,`http-enabled`,`schema-inferred`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],type:e[`format-type`],compression:e[`format-compression`],row_group_bytes:e[`format-row-group-bytes`]},http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),m=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>m.send(X,{body:e,account_id:h}));a(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Specifies the name of the Stream.`));let g=d({format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],type:e[`format-type`],compression:e[`format-compression`],row_group_bytes:e[`format-row-group-bytes`]},http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}),_=await s(`Creating`,async()=>m.send(X,{body:g,account_id:h}));a(_,{successLabel:`Created`})})};var ce={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams/${t.stream_id}`};function le(e){return e.usage(`$0 pipelines streams delete <stream-id>
31
-
32
- Delete Stream in Account.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ue={command:`delete <stream-id>`,describe:`Delete Stream`,builder:le,handler:async e=>c({command:`pipelines streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(ce,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Deleted`})})};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams/${t.stream_id}`};function fe(e){return e.usage(`$0 pipelines streams get <stream-id>
33
-
34
- Get Stream Details.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`get <stream-id>`,describe:`Get Stream Details`,builder:fe,handler:async e=>c({command:`pipelines streams get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines streams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-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(de,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Loaded`})})};var me={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams`,query:[`pipeline_id`,`name`,`order_by`,`direction`,`page`,`per_page`]};function he(e){return e.usage(`$0 pipelines streams list
35
-
36
- List/Filter Streams in Account.`).option(`pipeline-id`,{type:`string`,description:`Specifies the public ID of the pipeline.`}).option(`name`,{type:`string`,description:`Filters streams by name (case-insensitive substring).`}).option(`order-by`,{type:`string`,description:"Sorts streams by this field. Defaults to `created_at`.",choices:[`name`,`created_at`]}).option(`direction`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`List Streams`,builder:he,handler:async e=>c({command:`pipelines streams list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},e,async()=>{let c={pipeline_id:e[`pipeline-id`],name:e.name,order_by:e[`order-by`],direction:e.direction,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf pipelines streams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/streams`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(me,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var Q={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams/${t.stream_id}`,body:`json`};function ge(e){return e.usage(`$0 pipelines streams update <stream-id>
37
-
38
- Update a Stream.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the stream.`,demandOption:!0}).option(`http-authentication`,{type:`boolean`,description:`Indicates that authentication is required for the HTTP endpoint.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:`The http.cors.origins field`}).option(`http-enabled`,{type:`boolean`,description:`Indicates that the HTTP endpoint is enabled.`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates that the worker binding is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`http-authentication`,`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0})}const _e={command:`update <stream-id>`,describe:`Update Stream`,builder:ge,handler:async e=>c({command:`pipelines streams update`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines streams update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>l.send(Q,{body:t,account_id:f,stream_id:e[`stream-id`]}));a(n,{successLabel:`Updated`});return}let p=d({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}),m=await s(`Updating`,async()=>l.send(Q,{body:p,account_id:f,stream_id:e[`stream-id`]}));a(m,{successLabel:`Updated`})})},ve={command:`streams`,describe:`Inbound data streams that feed events into a pipeline for processing`,builder:e=>e.command(se).command(ue).command(pe).command(Z).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/validate_sql`,body:`json`,errors:{422:`UnprocessableEntityError`}};function ye(e){return e.usage(`$0 pipelines validate-sql
39
-
40
- Validates that the Pipelines SQL is correct.`).option(`sql`,{type:`string`,description:`Specifies SQL to validate.`}).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 be={command:`validate-sql`,describe:`Validate SQL`,builder:ye,handler:async e=>c({command:`pipelines validate-sql`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines validate-sql`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/validate_sql`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({sql:f(e.sql,`sql`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>l.send($,{body:e,account_id:m}));a(t,{successLabel:`Created`});return}e.sql===void 0&&(e.sql=await p(`sql`,`Specifies SQL to validate.`));let h=d({sql:f(e.sql,`sql`,`text`)}),g=await s(`Creating`,async()=>l.send($,{body:h,account_id:m}));a(g,{successLabel:`Created`})})},xe={command:`pipelines`,describe:`Ingest, transform, and route event streams into R2, analytics, or other destinations in real time`,builder:e=>e.command(v).command(b).command(re).command(C).command(E).command(k).command(M).command(F).command(R).command(be).command(ae).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{xe as default};
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import{r as e}from"./dotenv-DKRemNCH.mjs";import{i as t,n,o as r,r as i,s as a,t as o,u as s}from"./containers-B06OGOEB.mjs";import{J as c,K as l,rt as u,z as d}from"./dist-D-ihn_mV.mjs";import{t as f}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as p}from"./local-DIJ7SIKC.mjs";import{i as m,n as h}from"./auth-B-h0BHg7.mjs";import{a as g,t as _}from"./context-BY1Eh_Qe.mjs";import{d as v,s as y}from"./interactive-BCDFSPtq.mjs";import{C as b,_ as x,d as S,f as C,l as w,r as T,t as E,x as D,y as O}from"./deploy-context-YCW3eqP1.mjs";import{t as k}from"./output-BZQEl3mK.mjs";import{t as A}from"./dry-run-kJbjn4kG.mjs";import{t as j}from"./progress-yvPscjYg.mjs";import{n as M,t as N}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as P}from"./prompt-CEpZ-lQZ.mjs";import{a as F,c as I,i as L,n as R,o as z,r as B,s as V}from"./build-FFxzigo4.mjs";import{t as H}from"./deploy-input-CQLBXFEB.mjs";import{readBuildOutput as U}from"@cloudflare/build-output-utils";function W(e){return e.usage(`$0 previews delete <name>
3
-
4
- Delete a Preview.`).positional(`name`,{type:`string`,description:`Identifier for the Preview, which can be ID, slug, or URL-encoded name.`,demandOption:!0}).option(`worker`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`delete-with-references`,{type:`boolean`,description:`If true, delete the Preview even when other Workers still reference it. Service bindings in those Workers may be left broken. Durable Object namespaces implemented by the deleted Preview are deleted even if other Workers reference them.`}).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 <name>`,describe:`Delete Preview`,builder:W,handler:async e=>N({command:`previews delete`,classification:{safeFlags:[`delete-with-references`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={force:e[`delete-with-references`]};if(e.dryRun){let n=await g();A({command:`cf previews delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/previews/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{worker:String(e.worker??``),name:String(e.name??``)},query:t,bodyKind:`none`});return}let n=await h(e),r=e.local?p:await _();if(e.accountId=r,!await P({force:!!e.force,message:`This operation permanently deletes the Preview.`}))return;let i=await j(`Deleting`,async()=>m(n,`DELETE`,`/accounts/${r}/workers/workers/${encodeURIComponent(String(e.worker))}/previews/${encodeURIComponent(String(e.name))}`,{query:t}));k(i,{successLabel:`Deleted`})})};function K(e){return{getNormalizedContainerOptions:async t=>e.standard.normalized.map(e=>({...e,name:t.containers?.find(({class_name:t})=>t===e.class_name)?.name??e.name})),deployPreviewContainers:async(t,n,r,i,a)=>q(a.quiet,async()=>{let o=/* @__PURE__ */ new Map;for(let e of Object.values(r.env??{}))e.type===`durable_object_namespace`&&e.class_name&&e.namespace_id&&e.script_name===void 0&&o.set(e.class_name,e.namespace_id);let s;for(let c of n){let n=o.get(c.class_name);if(n||=(s??=await O(t,i),s.find(e=>e.class===c.class_name&&e.preview?.id===r.preview_id)?.id),!n)throw Error(`Could not find a Preview Durable Object namespace for Container class "${c.class_name}".`);let l=await J(c,e,r.id,i,t,a.localImageReferences?.get(c.class_name));await w({imageRef:l,durable_object_namespace_id:n,configFileName:`cloudflare.config.ts`,observabilityTargetPercentageField:`targetInstancePercentage`,observabilityTargetCountField:`targetInstanceCount`},c,t,i)}await S(e.standard.builtImages.filter(({container:e})=>!a.localImageReferences?.has(e.class_name)),u())})}}async function q(e,t){if(!e)return t();let n=y();v(`error`);try{return await t()}finally{v(n)}}async function J(e,t,n,r,i,a){if(a!==void 0)return b({pathToDocker:u(),sourceTag:a,targetTag:a,accountId:r,complianceConfig:i,containerConfig:`dockerfile`in e?e:void 0,cleanupSourceTag:!1});let o=t.standard.builtImages.find(({container:t})=>t.class_name===e.class_name);if(o)return D(o,n,u(),r,i);if(`image_uri`in e)return{newTag:e.image_uri};throw Error(`Container "${e.name}" has no Build Output image to deploy.`)}function Y(e){return e.positional(`preview-name`,{type:`string`,description:`Preview name. Defaults to the current CI or Git branch; required if no branch is available.`}).option(`prebuilt`,{type:`boolean`,description:`Use existing Preview Build Output Specification files without building`,default:!1}).option(`worker`,B)}function X(e){return{type:`preview`,version:1,preview_id:e.preview.id,preview_name:e.preview.name,preview_slug:e.preview.slug,preview_urls:e.preview.urls,deployment_id:e.deployment.id,deployment_urls:e.deployment.urls}}async function Z(t){let n=t[`preview-name`],i=n??r();if(!i||!n&&i===`HEAD`)throw Error(`We couldn't determine a Preview name from CI or Git. The name is optional when a branch is available. Otherwise, run:
5
-
6
- cf previews deploy PREVIEW_NAME`);return t.prebuilt||await R(t.mode,{output:t.quiet?`silent`:`stderr`,worker:t.worker},{isPreview:!0}),e(t,()=>Q(t,i))}async function Q(e,r){let u=await U(process.cwd());t(u.rootConfig),V(e.mode,u.rootConfig.buildContext.mode),z(u.rootConfig.accountId,e[`temporary-account`]);let f=F(u.workers,e.worker),{wranglerConfig:p,builtConfig:m}=L(f,u.rootConfig),h=c(p),{authToken:g,accountId:_}=await i({accountId:u.rootConfig.accountId,complianceRegion:h,isPreview:!0}),v=E(g);s({...v,logger:{...v.logger,log:()=>{},info:()=>{}}}),x({logger:{...v.logger,debug:()=>{},debugWithSanitization:()=>{},log:()=>{},info:()=>{}},fetchResult:v.fetchResult,fetchPagedListResult:v.fetchPagedListResult});let y=new Set(Object.values(m.exports??{}).filter(n).map(({container:e})=>e)),b=u.containers?.filter(({config:e})=>y.has(e.name))??[],S=o(b,p,{accountId:_}),w=S.source;if(w?.some(e=>e.scheduling_policy===`durable_object`))throw new I(`Preview deployments do not support Durable Object-managed Containers (schedulingPolicy: "durable-object").`);w&&w.length>0&&C(_,g,l(p));let D=await a(_,{name:r,json:!0},{workerConfig:m,rootConfig:u.rootConfig,containers:b.filter(({config:e})=>w?.some(({name:t})=>t===e.name)).map(({config:e})=>e),buildResult:f.bundleDir?H(f,m):void 0,assets:f.assetsDir?{directory:f.assetsDir}:void 0},{deployCommand:`cf deploy`,previewCommand:`cf previews deploy`,...K(S),verifyContainersScope:async()=>{await T.listApplications()}});return d({...X(D),worker_name:m.name??null}),D}var $=M({command:`deploy [preview-name]`,describe:`Deploy a Worker Preview`,builder:Y,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf previews deploy.`);let t=await Z(e);k(X(t),{quiet:e.quiet})}},{command:`previews deploy`,classification:{safeFlags:[`prebuilt`]}});const ee={command:`previews`,describe:`Manage Worker Previews`,builder:e=>e.command(G).command(f($,`preview`)).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ee as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./theme-BGHWSKCw.mjs";import{t}from"./args-BAOHroBC.mjs";import{n}from"./version-6Bpy6Bgt.mjs";import{t as r}from"./session-vzNfUhPl.mjs";import{s as i}from"./log-BWdaOGOW.mjs";import{n as a}from"./interactive-wQM7Blhm.mjs";const o={Hidden:0,Normal:1,Error:2,Indeterminate:3,Warning:4},s=new class{cleanupRegistered=!1;get isDisabled(){return process.env.CF_NO_OSC_PROGRESS===`1`||process.env.CF_QUIET===`1`||t()}get isSupported(){if(this.isDisabled||!process.stderr.isTTY)return!1;if(process.env.CF_FORCE_OSC_PROGRESS===`1`)return!0;let e=process.env.TERM_PROGRAM?.toLowerCase()??``;return!!(e.includes(`ghostty`)||e.includes(`iterm`)||e.includes(`wezterm`)||process.env.WT_SESSION||process.env.ConEmuANSI===`ON`)}setIndeterminate(){this.isSupported&&(this.ensureCleanup(),this.write(o.Indeterminate))}clear(){this.isSupported&&process.stderr.write(`\x1b]9;4;${o.Hidden};0\x07`)}ensureCleanup(){this.cleanupRegistered||(this.cleanupRegistered=!0,process.on(`exit`,()=>{this.clear()}))}write(e){this.isSupported&&process.stderr.write(`\x1b]9;4;${e};0\x07`)}},c=[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`];function l(){return!(!e(process.env,process.stderr.isTTY===!0)||a()||process.env.CF_QUIET===`1`)}async function u(e,t){if(!l())return t();r(n);let a=i({frames:[...c],indicator:`timer`,delay:80,output:process.stderr});s.setIndeterminate(),a.start(e);let o=e=>process.exit(e===`SIGTERM`?143:130),u=e=>{e===0&&(process.exitCode=130)};process.on(`SIGINT`,o),process.on(`SIGTERM`,o),process.on(`exit`,u);try{let n=await t();return s.clear(),a.stop(e),n}catch(t){throw s.clear(),a.error(e),t}finally{process.off(`SIGINT`,o),process.off(`SIGTERM`,o),process.off(`exit`,u)}}export{u as t};
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import{statSync as e}from"node:fs";import{dirname as t,join as n,resolve as r}from"node:path";const i=`cloudflare.config.ts`;let a,o;function s(e){o=e,a=void 0}function c(a=process.cwd()){let o=r(a);for(;;){let r=n(o,i);try{if(e(r).isFile())return r}catch{}let a=t(o);if(a===o)return null;o=a}}async function l(e=process.cwd(),t={}){let n=r(e),s=t.isPreview??!1;a=void 0;let l=c(n);if(!l)return a={startDir:n,isPreview:s,result:null},null;let{loadAndParseConfigSettings:u}=await import(`@cloudflare/config`),d=await u(l,{isPreview:s,mode:o});if(!d.result.success){let e=d.result.error.issues.map(e=>{let t=e.path.filter(e=>typeof e!=`symbol`).join(`.`);return` - ${t?`${t}: `:``}${e.message}`}).join(`
3
- `);throw Error(`Invalid ${i}:\n${e}`)}let f={path:l,settings:d.result.data};return a={startDir:n,isPreview:s,result:f},f}function u(e=process.cwd(),t={}){let n=r(e),i=t.isPreview??!1;return a?.startDir===n&&a.isPreview===i?a.result:void 0}export{s as a,l as i,c as n,u as r,i as t};
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{n}from"./version-6Bpy6Bgt.mjs";import{t as r}from"./session-vzNfUhPl.mjs";import{a as i,c as a,l as o,n as s,o as c,r as l}from"./log-BWdaOGOW.mjs";import{n as u}from"./interactive-wQM7Blhm.mjs";import{i as d}from"./dialog-D5lus4M4.mjs";function f(e){return e.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,` `)}function p(){r(n)}async function m(){let e=[];for await(let t of process.stdin)e.push(Buffer.from(t));let t=Buffer.concat(e).toString(`utf-8`);return t.endsWith(`
3
- `)?t.slice(0,-1):t}async function h(e,n,r){let s=r?.kind??`text`;if(u()){if(s===`secret`){let t=await m();if(t.length>0)return t;throw Error(`--${e} is required. Pipe the value via stdin, pass --${e} <value>, or run interactively.`)}throw Error(`--${e} is required. Pass --${e} <value> or run interactively.`)}let c=`Enter value for --${e}`,l=d(n||r?.question||c),f=e=>e&&e.length>0?r?.validate?.(e):`Value cannot be empty`;p();let h=s===`secret`?await i({message:l,mask:`•`,validate:f,output:process.stderr}):await a({message:l,validate:f,output:process.stderr});if(o(h)||typeof h!=`string`)throw new t(130,{cancelled:!0});return h}async function g(e,n,r,i={}){let a=f(e),s=r.map(f);if(u())throw Error(`--${a} is required (one of: ${s.join(`, `)}). Pass --${a} <value> or run interactively.`);let l=`Select value for --${a}`,d=f(n||l);p();let m=await c({message:d,output:process.stderr,options:r.map(e=>({value:e,label:f((Object.hasOwn(i,e)?i[e]:void 0)??e)}))});if(o(m)||typeof m!=`string`)throw new t(130,{cancelled:!0});return m}async function _(e,n){if(u())throw Error(`--${e} is required and must be true. Pass --${e} or run interactively.`);p();let r=await l({message:n||`Confirm --${e}`,initialValue:!1,output:process.stderr});if(o(r))throw new t(130,{cancelled:!0});return r===!0}async function v(e,{defaultValue:n=!0,fallbackValue:r=!0}={}){if(u())return process.stderr.write(`? ${e}\n Using fallback value in non-interactive context: ${r?`yes`:`no`}\n`),r;p();let i=await l({message:e,initialValue:n,output:process.stderr});if(o(i))throw new t(130,{cancelled:!0});return i===!0}async function y(n={}){if(n.force===!0)return!0;let r=n.message?`${n.message} Continue?`:`This permanently deletes the resource. Continue?`;if(u())throw process.stderr.write(`${e.warning(`?`)} ${r}\n ${e.muted(`(non-interactive; pass --force to confirm)`)}\nAborted.
4
- `),new t(1);p();let i=await l({message:r,initialValue:!1,output:process.stderr});if(o(i))throw new t(130,{cancelled:!0});return i===!0||(s(`Aborted.`,{output:process.stderr}),!1)}export{h as a,g as i,y as n,f as o,_ as r,v as t};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{K as e}from"./dist-D-ihn_mV.mjs";import{i as t}from"./api-Dnt6lRJG.mjs";import{r as n}from"./local-DIJ7SIKC.mjs";import{c as r,l as i}from"./auth-B-h0BHg7.mjs";import{n as a}from"./context-BY1Eh_Qe.mjs";import{t as o}from"./auth-token-DW4dJVdj.mjs";import{n as s}from"./request-headers-C0FpeBhz.mjs";async function c(c,l={}){let{method:u=`GET`,local:d=!1}=l,f=e({compliance_region:await a()}),p=`${f.replace(/\/+$/,``)}${c}`,m={...s()};l.headers&&Object.assign(m,l.headers);let h=globalThis.fetch;d?h=n({persistTo:l.persistTo,apiBaseUrl:f}):m.Authorization=`Bearer ${await o()}`;let g,_=l.body;_!=null&&(_ instanceof FormData?g=_:Buffer.isBuffer(_)||_ instanceof Uint8Array||_ instanceof ArrayBuffer?(g=_,m[`Content-Type`]??=l.contentType??`application/octet-stream`):typeof _==`string`?(g=_,l.contentType&&(m[`Content-Type`]??=l.contentType)):(g=JSON.stringify(_),m[`Content-Type`]??=l.contentType??`application/json`));let v=await h(p,{method:u,headers:m,...g===void 0?{}:{body:g},...r(g)?{}:{signal:AbortSignal.timeout(i)}});if(!v.ok){let e=v.headers.get(`content-type`)??``,n;try{n=e.includes(`application/json`)?await v.json():await v.text()}catch{n=null}throw new t({statusCode:v.status,body:n,rawResponse:{status:v.status,statusText:v.statusText,url:v.url||p,headers:v.headers,redirected:v.redirected,type:v.type}})}let y=await v.arrayBuffer();return Buffer.from(y)}function l(e){process.stdout.write(e)}export{l as n,c as t};