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,64 +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,r as d,t as f}from"./body-parser-DoewLePl.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-CEpZ-lQZ.mjs";import{t as _}from"./body-unions-DNs981Ia.mjs";var v={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}/cancel`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function y(e){return e.usage(`$0 builds cancel <build-uuid>
3
-
4
- Cancel a queued or running build.`).positional(`build-uuid`,{type:`string`,description:`Build UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`cancel <build-uuid>`,describe:`Cancel a Workers build`,builder:y,handler:async e=>c({command:`builds cancel`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds cancel`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/builds/${e[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(e[`build-uuid`]))}/cancel`,pathParams:{"build-uuid":String(e[`build-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Updating`,async()=>c.send(v,{account_id:l,build_uuid:e[`build-uuid`]}));a(u,{successLabel:`Updated`})})};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/builds`,body:`json`,errors:{401:`UnauthorizedError`}};function x(e){return e.usage(`$0 builds create <trigger-uuid>
5
-
6
- Start a build for a branch or commit using the selected trigger.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name (required if commit_hash not provided)`}).option(`commit-hash`,{type:`string`,description:`Git commit hash (required if branch not provided)`}).option(`seed-repo-branch`,{type:`string`,description:`Repository branch to seed.`}).option(`seed-repo-files`,{type:`string`,description:`Files to add or replace for this build. Maximum 2. Provide as a JSON array of objects or @path/to/file.json.`}).option(`seed-repo-owner`,{type:`string`,description:`Repository owner or namespace.`}).option(`seed-repo-path`,{type:`string`,description:`Path within the repository to seed.`}).option(`seed-repo-provider`,{type:`string`,description:`Source control provider for the seed repository.`,choices:[`github`,`gitlab`]}).coerce(`seed-repo-provider`,e=>p(e,`seed-repo-provider`,`text`)).option(`seed-repo-repository`,{type:`string`,description:`Repository name.`}).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=[`seed-repo-branch`,`seed-repo-files`,`seed-repo-owner`,`seed-repo-path`,`seed-repo-provider`,`seed-repo-repository`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`seed-repo-owner`,`seed-repo-provider`,`seed-repo-repository`].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 --seed-repo-* flag is set`)}return!0})}const te={command:`create <trigger-uuid>`,describe:`Start a Workers build`,builder:x,handler:async e=>c({command:`builds create`,classification:{safeFlags:[`seed-repo-provider`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/builds`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?f({branch:p(e.branch,`branch`,`text`),commit_hash:p(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:p(e[`seed-repo-branch`],`seed-repo-branch`,`text`),files:l(e[`seed-repo-files`],`seed-repo-files`),owner:p(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:p(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:p(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),d=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body!==void 0){let t=c,n=await s(`Creating`,async()=>d.send(b,{body:t,account_id:m,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Created`});return}let h=f({branch:p(e.branch,`branch`,`text`),commit_hash:p(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:p(e[`seed-repo-branch`],`seed-repo-branch`,`text`),files:l(e[`seed-repo-files`],`seed-repo-files`),owner:p(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:p(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:p(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}),g=await s(`Creating`,async()=>d.send(b,{body:h,account_id:m,trigger_uuid:e[`trigger-uuid`]}));a(g,{successLabel:`Created`})})};var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function ne(e){return e.usage(`$0 builds deploy-hooks create <script-name>
7
-
8
- Create an HTTP hook that starts a build for a selected Worker branch.`).positional(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name.`}).option(`deploy-hook-name`,{type:`string`,description:`Deploy hook name (1-58 characters).`}).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 re={command:`create <script-name>`,describe:`Create a deploy hook`,builder:ne,handler:async e=>c({command:`builds deploy-hooks create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?f({branch:p(e.branch,`branch`,`text`),deploy_hook_name:p(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let t=c,n=await s(`Creating`,async()=>l.send(S,{body:t,account_id:d,script_name:e[`script-name`]}));a(n,{successLabel:`Created`});return}e.branch===void 0&&(e.branch=await m(`branch`,`Git branch name.`)),e[`deploy-hook-name`]===void 0&&(e[`deploy-hook-name`]=await m(`deploy-hook-name`,`Deploy hook name (1-58 characters).`));let h=f({branch:p(e.branch,`branch`,`text`),deploy_hook_name:p(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}),g=await s(`Creating`,async()=>l.send(S,{body:h,account_id:d,script_name:e[`script-name`]}));a(g,{successLabel:`Created`})})};var ie={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks/${t.deploy_hook_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function ae(e){return e.usage(`$0 builds deploy-hooks delete <deploy-hook-uuid>
9
-
10
- Delete a deploy hook so its UUID can no longer start builds.`).positional(`deploy-hook-uuid`,{type:`string`,description:`Deploy hook UUID`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,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 oe={command:`delete <deploy-hook-uuid>`,describe:`Delete a deploy hook`,builder:ae,handler:async e=>c({command:`builds deploy-hooks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(ie,{account_id:l,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(u,{successLabel:`Deleted`})})};var se={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks/${t.deploy_hook_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function ce(e){return e.usage(`$0 builds deploy-hooks get <deploy-hook-uuid>
11
-
12
- Retrieve the name, branch, Worker identifier, and timestamps for a deploy hook.`).positional(`deploy-hook-uuid`,{type:`string`,description:`Deploy hook UUID`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <deploy-hook-uuid>`,describe:`Get a deploy hook`,builder:ce,handler:async e=>c({command:`builds deploy-hooks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},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(se,{account_id:l,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(u,{successLabel:`Loaded`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks`,errors:{401:`UnauthorizedError`}};function T(e){return e.usage(`$0 builds deploy-hooks list
13
-
14
- List the branch-specific deploy hooks configured for a Worker.`).option(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List deploy hooks`,builder:T,handler:async e=>c({command:`builds deploy-hooks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks`,pathParams:{"script-name":String(e[`script-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(w,{account_id:l,script_name:e[`script-name`]}));a(u,{successLabel:`Loaded`})})};var D={method:`POST`,path:t=>e`/workers/builds/deploy_hooks/${t.deploy_hook_uuid}`,errors:{404:`NotFoundError`,429:`TooManyRequestsError`}};function O(e){return e.usage(`$0 builds deploy-hooks trigger <deploy-hook-uuid>
15
-
16
- Trigger a build using a deploy hook. This endpoint does not require authentication - the deploy_hook_uuid acts as a secret token.`).positional(`deploy-hook-uuid`,{type:`string`,description:`Deploy hook UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`trigger <deploy-hook-uuid>`,describe:`Trigger deploy hook`,builder:O,handler:async e=>c({command:`builds deploy-hooks trigger`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf builds deploy-hooks trigger`,method:`POST`,url:`https://api.cloudflare.com/client/v4/workers/builds/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},bodyKind:`none`});return}let t=await n(e),r=await s(`Creating`,async()=>t.send(D,{deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(r,{successLabel:`Created`})})};var A={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks/${t.deploy_hook_uuid}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function j(e){return e.usage(`$0 builds deploy-hooks update <deploy-hook-uuid>
17
-
18
- Replace the name and target branch for a deploy hook.`).positional(`deploy-hook-uuid`,{type:`string`,description:`Deploy hook UUID`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name.`}).option(`deploy-hook-name`,{type:`string`,description:`Deploy hook name (1-58 characters).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`update <deploy-hook-uuid>`,describe:`Update a deploy hook`,builder:j,handler:async e=>c({command:`builds deploy-hooks update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?f({branch:p(e.branch,`branch`,`text`),deploy_hook_name:p(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>l.send(A,{body:t,account_id:d,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(n,{successLabel:`Updated`});return}e.branch===void 0&&(e.branch=await m(`branch`,`Git branch name.`)),e[`deploy-hook-name`]===void 0&&(e[`deploy-hook-name`]=await m(`deploy-hook-name`,`Deploy hook name (1-58 characters).`));let h=f({branch:p(e.branch,`branch`,`text`),deploy_hook_name:p(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}),g=await s(`Updating`,async()=>l.send(A,{body:h,account_id:d,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(g,{successLabel:`Updated`})})},N={command:`deploy-hooks`,describe:`Manage branch-specific HTTP hooks that start builds.`,builder:e=>e.command(re).command(oe).command(C).command(E).command(k).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function F(e){return e.usage(`$0 builds get <build-uuid>
19
-
20
- Retrieve status, outcome, timestamps, trigger settings, and source metadata for a build UUID.`).positional(`build-uuid`,{type:`string`,description:`Build UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get <build-uuid>`,describe:`Get a Workers build`,builder:F,handler:async e=>c({command:`builds get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/builds/${e[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(e[`build-uuid`]))}`,pathParams:{"build-uuid":String(e[`build-uuid`]??``)},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(P,{account_id:l,build_uuid:e[`build-uuid`]}));a(u,{successLabel:`Loaded`})})};var L={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/account/limits`,errors:{401:`UnauthorizedError`}};function R(e){return e.usage(`$0 builds limits get
21
-
22
- Return whether the account's build-minute allowance is exhausted and when it refreshes.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get`,describe:`Get build-minute availability`,builder:R,handler:async e=>c({command:`builds limits get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf builds limits get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/account/limits`,pathParams:{},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(L,{account_id:l}));a(u,{successLabel:`Loaded`})})},B={command:`limits`,describe:`View build-minute availability and refresh information.`,builder:e=>e.command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.external_script_id}/builds`,query:[`page`,`per_page`],errors:{401:`UnauthorizedError`}};function H(e){return e.usage(`$0 builds list
23
-
24
- List paginated build records associated with a Worker tag.`).option(`external-script-id`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker name.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`list`,describe:`List builds for a Worker`,builder:H,handler:async e=>c({command:`builds list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await r();o({command:`cf builds list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`external-script-id`]==null?`<external-script-id>`:encodeURIComponent(String(e[`external-script-id`]))}/builds`,pathParams:{"external-script-id":String(e[`external-script-id`]??``)},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(V,{account_id:u,external_script_id:e[`external-script-id`],...c}));a(d,{successLabel:`Loaded`})})};var W={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}/logs`,query:[`cursor`],errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function G(e){return e.usage(`$0 builds logs get <build-uuid>
25
-
26
- Retrieve cursor-paginated log lines for a build UUID.`).positional(`build-uuid`,{type:`string`,description:`Build UUID.`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Pagination cursor for log retrieval.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`get <build-uuid>`,describe:`Get Workers build logs`,builder:G,handler:async e=>c({command:`builds logs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={cursor:e.cursor};if(e.dryRun){let t=await r();o({command:`cf builds logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/builds/${e[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(e[`build-uuid`]))}/logs`,pathParams:{"build-uuid":String(e[`build-uuid`]??``)},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(W,{account_id:u,build_uuid:e[`build-uuid`],...c}));a(d,{successLabel:`Loaded`})})},ue={command:`logs`,describe:`Retrieve build logs.`,builder:e=>e.command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/repos/${t.provider_type}/${t.provider_account_id}/${t.repo_id}/config_autofill`,query:[`branch`,`root_directory`],errors:{401:`UnauthorizedError`}};function fe(e){return e.usage(`$0 builds repos config-autofill get <repo-id>
27
-
28
- Analyze repository for automatic configuration detection`).positional(`repo-id`,{type:`string`,description:`Provider-specific repository identifier.`,demandOption:!0}).option(`provider-type`,{type:`string`,description:`SCM provider type`,demandOption:!0}).option(`provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name.`,demandOption:!0}).option(`root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`get <repo-id>`,describe:`Get repository configuration autofill`,builder:fe,handler:async e=>c({command:`builds repos config-autofill get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={branch:e.branch,root_directory:e[`root-directory`]};if(e.dryRun){let t=await r();o({command:`cf builds repos config-autofill get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/repos/${e[`provider-type`]==null?`<provider-type>`:encodeURIComponent(String(e[`provider-type`]))}/${e[`provider-account-id`]==null?`<provider-account-id>`:encodeURIComponent(String(e[`provider-account-id`]))}/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}/config_autofill`,pathParams:{"provider-type":String(e[`provider-type`]??``),"provider-account-id":String(e[`provider-account-id`]??``),"repo-id":String(e[`repo-id`]??``)},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(de,{account_id:u,provider_type:e[`provider-type`],provider_account_id:e[`provider-account-id`],repo_id:e[`repo-id`],...c}));a(d,{successLabel:`Loaded`})})},me={command:`config-autofill`,describe:`Operations for repos.config-autofill`,builder:e=>e.command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var he={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/repos/connections/${t.repo_connection_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function ge(e){return e.usage(`$0 builds repos connections delete <repo-connection-uuid>
29
-
30
- Delete a saved repository connection.`).positional(`repo-connection-uuid`,{type:`string`,description:`Repository connection UUID.`,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:`delete <repo-connection-uuid>`,describe:`Delete a repository connection`,builder:ge,handler:async e=>c({command:`builds repos connections delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds repos connections delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/repos/connections/${e[`repo-connection-uuid`]==null?`<repo-connection-uuid>`:encodeURIComponent(String(e[`repo-connection-uuid`]))}`,pathParams:{"repo-connection-uuid":String(e[`repo-connection-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(he,{account_id:l,repo_connection_uuid:e[`repo-connection-uuid`]}));a(u,{successLabel:`Deleted`})})};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/repos/connections`,body:`json`,errors:{401:`UnauthorizedError`}};function ve(e){return e.usage(`$0 builds repos connections upsert
31
-
32
- Save the repository connection required by build triggers.`).option(`provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`}).option(`provider-account-name`,{type:`string`,description:`Human-readable name of the account or namespace that owns the repository.`}).option(`provider-type`,{type:`string`,description:`Source control provider.`,choices:[`github`,`gitlab`,`gitlab_internal`,`origin`]}).coerce(`provider-type`,e=>p(e,`provider-type`,`text`)).option(`repo-id`,{type:`string`,description:`Provider-specific repository identifier.`}).option(`repo-name`,{type:`string`,description:`Human-readable repository name.`}).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 ye={command:`upsert`,describe:`Create or update a repository connection`,builder:ve,handler:async e=>c({command:`builds repos connections upsert`,classification:{safeFlags:[`provider-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds repos connections upsert`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/repos/connections`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({provider_account_id:p(e[`provider-account-id`],`provider-account-id`,`text`),provider_account_name:p(e[`provider-account-name`],`provider-account-name`,`text`),provider_type:e[`provider-type`],repo_id:p(e[`repo-id`],`repo-id`,`text`),repo_name:p(e[`repo-name`],`repo-name`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let e=c,t=await s(`Updating`,async()=>l.send(K,{body:e,account_id:d}));a(t,{successLabel:`Updated`});return}e[`provider-account-id`]===void 0&&(e[`provider-account-id`]=await m(`provider-account-id`,`Provider-specific identifier of the account or namespace that owns the repository.`)),e[`provider-account-name`]===void 0&&(e[`provider-account-name`]=await m(`provider-account-name`,`Human-readable name of the account or namespace that owns the repository.`)),e[`provider-type`]===void 0&&(e[`provider-type`]=await h(`provider-type`,`Source control provider.`,[`github`,`gitlab`,`gitlab_internal`,`origin`])),e[`repo-id`]===void 0&&(e[`repo-id`]=await m(`repo-id`,`Provider-specific repository identifier.`)),e[`repo-name`]===void 0&&(e[`repo-name`]=await m(`repo-name`,`Human-readable repository name.`));let g=f({provider_account_id:p(e[`provider-account-id`],`provider-account-id`,`text`),provider_account_name:p(e[`provider-account-name`],`provider-account-name`,`text`),provider_type:e[`provider-type`],repo_id:p(e[`repo-id`],`repo-id`,`text`),repo_name:p(e[`repo-name`],`repo-name`,`text`)}),_=await s(`Updating`,async()=>l.send(K,{body:g,account_id:d}));a(_,{successLabel:`Updated`})})},be={command:`connections`,describe:`Operations for repos.connections`,builder:e=>e.command(_e).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`repos`,describe:`Manage source repository connections for Workers Builds.`,builder:e=>e.command(me).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/tokens`,body:`json`,errors:{401:`UnauthorizedError`}};function Se(e){return e.usage(`$0 builds tokens create
33
-
34
- Create a new build authentication token`).option(`build-token-name`,{type:`string`,description:`The build_token_name field`}).option(`build-token-secret`,{type:`string`,description:`The build_token_secret field`}).option(`cloudflare-token-id`,{type:`string`,description:`The cloudflare_token_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ce={command:`create`,describe:`Create build token`,builder:Se,handler:async e=>c({command:`builds tokens create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/tokens`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({build_token_name:p(e[`build-token-name`],`build-token-name`,`text`),build_token_secret:p(e[`build-token-secret`],`build-token-secret`,`text`),cloudflare_token_id:p(e[`cloudflare-token-id`],`cloudflare-token-id`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>l.send(q,{body:e,account_id:d}));a(t,{successLabel:`Created`});return}e[`build-token-name`]===void 0&&(e[`build-token-name`]=await m(`build-token-name`,`The build_token_name field`)),e[`build-token-secret`]===void 0&&(e[`build-token-secret`]=await m(`build-token-secret`,`The build_token_secret field`)),e[`cloudflare-token-id`]===void 0&&(e[`cloudflare-token-id`]=await m(`cloudflare-token-id`,`The cloudflare_token_id field`));let h=f({build_token_name:p(e[`build-token-name`],`build-token-name`,`text`),build_token_secret:p(e[`build-token-secret`],`build-token-secret`,`text`),cloudflare_token_id:p(e[`cloudflare-token-id`],`cloudflare-token-id`,`text`)}),g=await s(`Creating`,async()=>l.send(q,{body:h,account_id:d}));a(g,{successLabel:`Created`})})};var we={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/tokens/${t.build_token_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Te(e){return e.usage(`$0 builds tokens delete <build-token-uuid>
35
-
36
- Delete a stored build token owned by the current user.`).positional(`build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`,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 Ee={command:`delete <build-token-uuid>`,describe:`Delete a build token`,builder:Te,handler:async e=>c({command:`builds tokens delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds tokens delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/tokens/${e[`build-token-uuid`]==null?`<build-token-uuid>`:encodeURIComponent(String(e[`build-token-uuid`]))}`,pathParams:{"build-token-uuid":String(e[`build-token-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(we,{account_id:l,build_token_uuid:e[`build-token-uuid`]}));a(u,{successLabel:`Deleted`})})};var De={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/tokens`,query:[`page`,`per_page`],errors:{401:`UnauthorizedError`}};function Oe(e){return e.usage(`$0 builds tokens list
37
-
38
- List metadata for build tokens available to the current user without returning their secrets.`).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ke={command:`list`,describe:`List build tokens`,builder:Oe,handler:async e=>c({command:`builds tokens list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf builds tokens list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/tokens`,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(De,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},Ae={command:`tokens`,describe:`Manage credentials used by Workers Builds to deploy Workers.`,builder:e=>e.command(Ce).command(Ee).command(ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var je={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/purge_build_cache`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Me(e){return e.usage(`$0 builds triggers cache purge <trigger-uuid>
39
-
40
- Delete cached dependencies and build artifacts associated with a trigger.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,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 Ne={command:`purge <trigger-uuid>`,describe:`Purge a trigger's build cache`,builder:Me,handler:async e=>c({command:`builds triggers cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/purge_build_cache`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force,message:`This operation purges the build cache for a Workers Builds trigger.`}))return;let u=await s(`Processing`,async()=>c.send(je,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Done`})})},Pe={command:`cache`,describe:`Operations for triggers.cache`,builder:e=>e.command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/triggers`,body:`json`,errors:{401:`UnauthorizedError`}};function Fe(e){return e.usage(`$0 builds triggers create
41
-
42
- Create a trigger defining the repository connection, Worker tag, commands, filters, cache setting, and build token.`).option(`branch-excludes`,{type:`string`,array:!0,description:`Branch patterns that must not start builds.`}).option(`branch-includes`,{type:`string`,array:!0,description:`Branch patterns that can start builds.`}).option(`build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`,default:!1}).option(`build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`external-script-id`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker name.`}).option(`path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`repo-connection-uuid`,{type:`string`,description:`Repository connection UUID.`}).option(`root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`trigger-name`,{type:`string`,description:`Human-readable name of the build trigger.`}).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 Ie={command:`create`,describe:`Create a build trigger`,builder:Fe,handler:async e=>c({command:`builds triggers create`,classification:{safeFlags:[`build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:p(e[`build-command`],`build-command`,`text`),build_token_uuid:p(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:p(e[`deploy-command`],`deploy-command`,`text`),external_script_id:p(e[`external-script-id`],`external-script-id`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],repo_connection_uuid:p(e[`repo-connection-uuid`],`repo-connection-uuid`,`text`),root_directory:p(e[`root-directory`],`root-directory`,`text`),trigger_name:p(e[`trigger-name`],`trigger-name`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>l.send(J,{body:e,account_id:d}));a(t,{successLabel:`Created`});return}if(e[`branch-excludes`]===void 0)throw Error(`--branch-excludes is required (or pass --body with this field set).`);if(e[`branch-includes`]===void 0)throw Error(`--branch-includes is required (or pass --body with this field set).`);if(e[`build-command`]===void 0&&(e[`build-command`]=await m(`build-command`,`Command to build the Worker.`)),e[`build-token-uuid`]===void 0&&(e[`build-token-uuid`]=await m(`build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`deploy-command`]===void 0&&(e[`deploy-command`]=await m(`deploy-command`,`Command to deploy the Worker.`)),e[`external-script-id`]===void 0&&(e[`external-script-id`]=await m(`external-script-id`,`System-generated tag of the Worker. This is not the Worker name.`)),e[`path-excludes`]===void 0)throw Error(`--path-excludes is required (or pass --body with this field set).`);if(e[`path-includes`]===void 0)throw Error(`--path-includes is required (or pass --body with this field set).`);e[`repo-connection-uuid`]===void 0&&(e[`repo-connection-uuid`]=await m(`repo-connection-uuid`,`Repository connection UUID.`)),e[`root-directory`]===void 0&&(e[`root-directory`]=await m(`root-directory`,`Repository directory in which build and deploy commands run.`)),e[`trigger-name`]===void 0&&(e[`trigger-name`]=await m(`trigger-name`,`Human-readable name of the build trigger.`));let h=f({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:p(e[`build-command`],`build-command`,`text`),build_token_uuid:p(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:p(e[`deploy-command`],`deploy-command`,`text`),external_script_id:p(e[`external-script-id`],`external-script-id`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],repo_connection_uuid:p(e[`repo-connection-uuid`],`repo-connection-uuid`,`text`),root_directory:p(e[`root-directory`],`root-directory`,`text`),trigger_name:p(e[`trigger-name`],`trigger-name`,`text`)}),g=await s(`Creating`,async()=>l.send(J,{body:h,account_id:d}));a(g,{successLabel:`Created`})})};var Le={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Re(e){return e.usage(`$0 builds triggers delete <trigger-uuid>
43
-
44
- Delete a trigger and cancel its unfinished builds.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,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 ze={command:`delete <trigger-uuid>`,describe:`Delete a build trigger`,builder:Re,handler:async e=>c({command:`builds triggers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force,message:`This operation deletes the build trigger and cancels its unfinished builds.`}))return;let u=await s(`Deleting`,async()=>c.send(Le,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Deleted`})})};var Be={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/environment_variables/${t.environment_variable_key}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Ve(e){return e.usage(`$0 builds triggers environment-variables delete <environment-variable-key>
45
-
46
- Delete one build-time variable or secret by key.`).positional(`environment-variable-key`,{type:`string`,description:`Environment variable key.`,demandOption:!0}).option(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,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 He={command:`delete <environment-variable-key>`,describe:`Delete a build variable`,builder:Ve,handler:async e=>c({command:`builds triggers environment-variables delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers environment-variables delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/environment_variables/${e[`environment-variable-key`]==null?`<environment-variable-key>`:encodeURIComponent(String(e[`environment-variable-key`]))}`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``),"environment-variable-key":String(e[`environment-variable-key`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(Be,{account_id:l,trigger_uuid:e[`trigger-uuid`],environment_variable_key:e[`environment-variable-key`]}));a(u,{successLabel:`Deleted`})})};var Ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/environment_variables`,errors:{401:`UnauthorizedError`}};function We(e){return e.usage(`$0 builds triggers environment-variables list
47
-
48
- List build-time variables configured for a trigger. Secret values are not returned.`).option(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ge={command:`list`,describe:`List build variables`,builder:We,handler:async e=>c({command:`builds triggers environment-variables list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers environment-variables list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/environment_variables`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},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(Ue,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Loaded`})})};var Ke={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/environment_variables`,body:`json`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function qe(e){return e.usage(`$0 builds triggers environment-variables upsert <trigger-uuid>
49
-
50
- Add or replace build-time variables and secrets without changing unspecified keys.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores.`})}const Je={command:`upsert <trigger-uuid>`,describe:`Set build variables`,builder:qe,handler:async e=>c({command:`builds triggers environment-variables upsert`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers environment-variables upsert`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/environment_variables`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let c=e.body===void 0?void 0:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>l.send(Ke,{body:t,account_id:d,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Updated`})}})},Ye={command:`environment-variables`,describe:`Operations for triggers.environment-variables`,builder:e=>e.command(He).command(Ge).command(Je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Xe={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.external_script_id}/triggers`,errors:{401:`UnauthorizedError`}};function Ze(e){return e.usage(`$0 builds triggers list
51
-
52
- List trigger UUIDs and build settings associated with a Worker tag.`).option(`external-script-id`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qe={command:`list`,describe:`List triggers for a Worker`,builder:Ze,handler:async e=>c({command:`builds triggers list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`external-script-id`]==null?`<external-script-id>`:encodeURIComponent(String(e[`external-script-id`]))}/triggers`,pathParams:{"external-script-id":String(e[`external-script-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(Xe,{account_id:l,external_script_id:e[`external-script-id`]}));a(u,{successLabel:`Loaded`})})};var Y={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}`,body:`json`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function $e(e){return e.usage(`$0 builds triggers update <trigger-uuid>
53
-
54
- Update commands, cache settings, or branch and path filters for a trigger.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`branch-excludes`,{type:`string`,array:!0,description:`Branch patterns that must not start builds.`}).option(`branch-includes`,{type:`string`,array:!0,description:`Branch patterns that can start builds.`}).option(`build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`trigger-name`,{type:`string`,description:`Human-readable name of the build trigger.`}).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 et={command:`update <trigger-uuid>`,describe:`Update a build trigger`,builder:$e,handler:async e=>c({command:`builds triggers update`,classification:{safeFlags:[`build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?f({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:p(e[`build-command`],`build-command`,`text`),build_token_uuid:p(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:p(e[`deploy-command`],`deploy-command`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],root_directory:p(e[`root-directory`],`root-directory`,`text`),trigger_name:p(e[`trigger-name`],`trigger-name`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>l.send(Y,{body:t,account_id:d,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Updated`});return}let m=f({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:p(e[`build-command`],`build-command`,`text`),build_token_uuid:p(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:p(e[`deploy-command`],`deploy-command`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],root_directory:p(e[`root-directory`],`root-directory`,`text`),trigger_name:p(e[`trigger-name`],`trigger-name`,`text`)}),h=await s(`Updating`,async()=>l.send(Y,{body:m,account_id:d,trigger_uuid:e[`trigger-uuid`]}));a(h,{successLabel:`Updated`})})},tt={command:`triggers`,describe:`Configure how repository changes build and deploy Workers.`,builder:e=>e.command(Ie).command(ze).command(Qe).command(et).command(Pe).command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var nt={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds`,query:[`version_ids`],errors:{401:`UnauthorizedError`}};function rt(e){return e.usage(`$0 builds versions get
55
-
56
- Retrieve builds associated with one or more Worker version IDs.`).option(`version-ids`,{type:`string`,description:`Comma-separated list of version UUIDs (max 20).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const it={command:`get`,describe:`Get builds by Worker version`,builder:rt,handler:async e=>c({command:`builds versions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={version_ids:e[`version-ids`]};if(e.dryRun){let e=await r();o({command:`cf builds versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/builds`,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(nt,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},X={command:`versions`,describe:`Find builds associated with Worker versions.`,builder:e=>e.command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/workers`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function at(e){return e.usage(`$0 builds workers create
57
-
58
- Connect a Worker tag to a repository and production build settings.`).option(`git-repository-branch`,{type:`string`,description:`Git branch to watch for builds`}).option(`git-repository-provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`}).option(`git-repository-provider-account-name`,{type:`string`,description:`Human-readable name of the account or namespace that owns the repository.`}).option(`git-repository-provider-type`,{type:`string`,description:`The git_repository.provider_type field`,choices:[`github`,`gitlab`,`gitlab_internal`,`origin`]}).coerce(`git-repository-provider-type`,e=>p(e,`git-repository-provider-type`,`text`)).option(`git-repository-repo-id`,{type:`string`,description:`Provider-specific repository identifier.`}).option(`git-repository-repo-name`,{type:`string`,description:`Human-readable repository name.`}).option(`git-repository-grant-id`,{type:`string`,description:`Grant ID required for grant-backed providers`}).option(`previews-base-config-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`,default:!0}).option(`previews-base-config-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`previews-base-config-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`previews-base-config-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`previews-base-config-environment-variables`,{type:`string`,description:`Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores. Provide as a JSON object or @path/to/file.json.`}).option(`previews-base-config-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`previews-base-config-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`previews-base-config-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`,default:`/`}).option(`previews-enabled`,{type:`boolean`,description:`Whether Previews are enabled for this Worker`}).option(`production-settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`,default:!0}).option(`production-settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`production-settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`production-settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`production-settings-environment-variables`,{type:`string`,description:`Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores. Provide as a JSON object or @path/to/file.json.`}).option(`production-settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`production-settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`production-settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`,default:`/`}).option(`script-tag`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating a Worker build configuration.`})}const Q=[{path:[`git_repository`],selector:`provider_type`,variants:[{values:[`github`,`gitlab`],schema:{type:`object`,properties:{branch:{type:`string`},provider_account_id:{type:`string`},provider_account_name:{type:`string`},provider_type:{enum:[`github`,`gitlab`]},repo_id:{type:`string`},repo_name:{type:`string`}},required:[`branch`,`provider_account_id`,`provider_account_name`,`provider_type`,`repo_id`,`repo_name`],additionalProperties:!1}},{values:[`gitlab_internal`,`origin`],schema:{type:`object`,properties:{branch:{type:`string`},grant_id:{type:`string`},provider_account_id:{type:`string`},provider_account_name:{type:`string`},provider_type:{enum:[`gitlab_internal`,`origin`]},repo_id:{type:`string`},repo_name:{type:`string`}},required:[`branch`,`grant_id`,`provider_account_id`,`provider_account_name`,`provider_type`,`repo_id`,`repo_name`],additionalProperties:!1}}]}],ot={command:`create`,describe:`Create Worker build configuration`,builder:at,handler:async e=>c({command:`builds workers create`,classification:{safeFlags:[`git-repository-provider-type`,`previews-base-config-build-caching-enabled`,`previews-enabled`,`production-settings-build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds workers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_(f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`),provider_account_id:p(e[`git-repository-provider-account-id`],`git-repository-provider-account-id`,`text`),provider_account_name:p(e[`git-repository-provider-account-name`],`git-repository-provider-account-name`,`text`),provider_type:e[`git-repository-provider-type`],repo_id:p(e[`git-repository-repo-id`],`git-repository-repo-id`,`text`),repo_name:p(e[`git-repository-repo-name`],`git-repository-repo-name`,`text`),grant_id:p(e[`git-repository-grant-id`],`git-repository-grant-id`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)},script_tag:p(e[`script-tag`],`script-tag`,`text`)},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]),Q):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=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()=>l.send(Z,{body:e,account_id:g}));a(t,{successLabel:`Created`});return}if(e[`git-repository-branch`]===void 0&&(e[`git-repository-branch`]=await m(`git-repository-branch`,`Git branch to watch for builds`)),e[`git-repository-provider-account-id`]===void 0&&(e[`git-repository-provider-account-id`]=await m(`git-repository-provider-account-id`,`Provider-specific identifier of the account or namespace that owns the repository.`)),e[`git-repository-provider-account-name`]===void 0&&(e[`git-repository-provider-account-name`]=await m(`git-repository-provider-account-name`,`Human-readable name of the account or namespace that owns the repository.`)),e[`git-repository-provider-type`]===void 0&&(e[`git-repository-provider-type`]=await h(`git-repository-provider-type`,`The git_repository.provider_type field`,[`github`,`gitlab`,`gitlab_internal`,`origin`])),e[`git-repository-repo-id`]===void 0&&(e[`git-repository-repo-id`]=await m(`git-repository-repo-id`,`Provider-specific repository identifier.`)),e[`git-repository-repo-name`]===void 0&&(e[`git-repository-repo-name`]=await m(`git-repository-repo-name`,`Human-readable repository name.`)),e[`previews-base-config-build-command`]===void 0&&(e[`previews-base-config-build-command`]=await m(`previews-base-config-build-command`,`Command to build the Worker.`)),e[`previews-base-config-build-token-uuid`]===void 0&&(e[`previews-base-config-build-token-uuid`]=await m(`previews-base-config-build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`previews-base-config-deploy-command`]===void 0&&(e[`previews-base-config-deploy-command`]=await m(`previews-base-config-deploy-command`,`Command to deploy the Worker.`)),e[`previews-enabled`]===void 0)throw Error(`--previews-enabled is required (or pass --body with this field set).`);e[`production-settings-build-command`]===void 0&&(e[`production-settings-build-command`]=await m(`production-settings-build-command`,`Command to build the Worker.`)),e[`production-settings-build-token-uuid`]===void 0&&(e[`production-settings-build-token-uuid`]=await m(`production-settings-build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`production-settings-deploy-command`]===void 0&&(e[`production-settings-deploy-command`]=await m(`production-settings-deploy-command`,`Command to deploy the Worker.`)),e[`script-tag`]===void 0&&(e[`script-tag`]=await m(`script-tag`,`System-generated tag of the Worker. This is not the Worker name.`));let v=f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`),provider_account_id:p(e[`git-repository-provider-account-id`],`git-repository-provider-account-id`,`text`),provider_account_name:p(e[`git-repository-provider-account-name`],`git-repository-provider-account-name`,`text`),provider_type:e[`git-repository-provider-type`],repo_id:p(e[`git-repository-repo-id`],`git-repository-repo-id`,`text`),repo_name:p(e[`git-repository-repo-name`],`git-repository-repo-name`,`text`),grant_id:p(e[`git-repository-grant-id`],`git-repository-grant-id`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)},script_tag:p(e[`script-tag`],`script-tag`,`text`)},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]);_(v,Q);let y=await s(`Creating`,async()=>l.send(Z,{body:v,account_id:g}));a(y,{successLabel:`Created`})})};var st={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function ct(e){return e.usage(`$0 builds workers delete <script-tag>
59
-
60
- Delete build settings and triggers for a Worker tag and cancel unfinished builds. The Worker is not deleted.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const lt={command:`delete <script-tag>`,describe:`Delete Worker build configuration`,builder:ct,handler:async e=>c({command:`builds workers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds workers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}`,pathParams:{"script-tag":String(e[`script-tag`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force,message:`This operation deletes the Worker build configuration and its triggers, and cancels unfinished builds. The Worker is not deleted.`}))return;let u=await s(`Deleting`,async()=>c.send(st,{account_id:l,script_tag:e[`script-tag`]}));a(u,{successLabel:`Deleted`})})};var ut={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function dt(e){return e.usage(`$0 builds workers get <script-tag>
61
-
62
- Retrieve the repository and production build settings associated with a Worker tag.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ft={command:`get <script-tag>`,describe:`Get Worker build configuration`,builder:dt,handler:async e=>c({command:`builds workers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds workers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}`,pathParams:{"script-tag":String(e[`script-tag`]??``)},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(ut,{account_id:l,script_tag:e[`script-tag`]}));a(u,{successLabel:`Loaded`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}`,query:[`patch_existing_previews`],body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`}};function pt(e){return e.usage(`$0 builds workers update <script-tag>
63
-
64
- Update the build configuration for a Worker script. Supports partial updates to git repository settings, production build settings, and Preview settings.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`patch-existing-previews`,{type:`string`,description:`Apply a previews_base_config patch to every existing Preview of the Worker as well as to the base config.`,choices:[`true`,`false`]}).option(`git-repository-branch`,{type:`string`,description:`New git branch to watch for builds`}).option(`previews-base-config-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`previews-base-config-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`previews-base-config-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`previews-base-config-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`previews-base-config-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json.`}).option(`previews-base-config-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`previews-base-config-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`previews-base-config-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`previews-enabled`,{type:`boolean`,description:`Enable or disable Previews for this Worker. Enabling requires previews_base_config to already exist or to be sent in the same request.`}).option(`production-settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`production-settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`production-settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`production-settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`production-settings-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json.`}).option(`production-settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`production-settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`production-settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a Worker build configuration. At least one field must be provided.`})}const mt={command:`update <script-tag>`,describe:`Update Worker build configuration`,builder:pt,handler:async e=>c({command:`builds workers update`,classification:{safeFlags:[`patch-existing-previews`,`previews-base-config-build-caching-enabled`,`previews-enabled`,`production-settings-build-caching-enabled`,`dry-run`]}},e,async()=>{let c={patch_existing_previews:e[`patch-existing-previews`]};if(e.dryRun){let t=await r();o({command:`cf builds workers update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}`,pathParams:{"script-tag":String(e[`script-tag`]??``)},query:c,bodyKind:`json`,body:e.body===void 0?f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)}},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]):u(e.body)});return}let l=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 t=l;new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await s(`Updating`,async()=>m.send($,{body:t,account_id:h,script_tag:e[`script-tag`],...c}));a(n,{successLabel:`Updated`});return}let g=f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)}},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let _=await s(`Updating`,async()=>m.send($,{body:g,account_id:h,script_tag:e[`script-tag`],...c}));a(_,{successLabel:`Updated`})})},ht={command:`workers`,describe:`Manage repository-backed build configuration for Workers.`,builder:e=>e.command(ot).command(lt).command(ft).command(mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},gt={command:`builds`,describe:`Build and deploy Workers from connected repositories, then inspect build status and logs.`,builder:e=>e.command(ee).command(te).command(I).command(U).command(N).command(B).command(ue).command(xe).command(Ae).command(tt).command(X).command(ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{gt as default};
@@ -1,18 +0,0 @@
1
- #!/usr/bin/env node
2
- import{D as e,E as t,J as n,L as r,N as i,d as a,et as o,h as s,it as c,k as l,q as u}from"./dist-D-ihn_mV.mjs";import{N as d,O as f}from"./chunk-AAQI36FL-e6E5HW1g.mjs";import{_ as p,a as m,c as ee,d as h,f as g,g as te,h as ne,i as re,l as ie,m as ae,o as _,p as v,r as oe,s as y,t as se,u as b}from"./chunk-SOBRPAPT-QTjnHSNs.mjs";import{createRequire as x}from"node:module";import{chmodSync as S,existsSync as C,mkdirSync as w,readFileSync as T,readdirSync as E,rmSync as D,writeFileSync as O}from"node:fs";import k from"node:path";import{URLSearchParams as ce}from"node:url";x(import.meta.url||(typeof __filename==`string`?__filename:`/`));function A(e){function t(){return k.resolve(e(),`preferences.json`)}p(t,`getUserPreferencesPath`);function n(){try{let e=T(t(),`utf8`),n=JSON.parse(e);return typeof n==`object`&&n?n:{}}catch{return{}}}p(n,`readUserPreferences`);function r(e){let r={...n(),...e},i=t();w(k.dirname(i),{recursive:!0}),O(i,JSON.stringify(r,null,` `),{encoding:`utf-8`})}return p(r,`updateUserPreferences`),{readUserPreferences:n,updateUserPreferences:r}}p(A,`createPreferences`);var j=6e4,M=525600,N=43200,P=1440,F=Symbol.for(`constructDateFrom`);function I(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&F in e?e[F](t):e instanceof Date?new e.constructor(t):new Date(t)}p(I,`constructFrom`);function L(e,t){return I(t||e,e)}p(L,`toDate`);var R={};function z(){return R}p(z,`getDefaultOptions`);function B(e){let t=L(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-n}p(B,`getTimezoneOffsetInMilliseconds`);function V(e,...t){let n=I.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}p(V,`normalizeDates`);function H(e,t){let n=+L(e)-L(t);return n<0?-1:n>0?1:n}p(H,`compareAsc`);function U(e){return I(e,Date.now())}p(U,`constructNow`);function le(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}p(le,`getRoundingMethod`);var ue={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},de=/* @__PURE__ */ p((e,t,n)=>{let r,i=ue[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r},`formatDistance`);function W(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}p(W,`buildFormatLongFn`);var fe={date:W({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:W({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:W({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},pe={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},me=/* @__PURE__ */ p((e,t,n,r)=>pe[e],`formatRelative`);function G(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}p(G,`buildLocalizeFn`);var he={ordinalNumber:/* @__PURE__ */ p((e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},`ordinalNumber`),era:G({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:G({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:/* @__PURE__ */ p(e=>e-1,`argumentCallback`)}),month:G({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:G({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:G({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function K(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?_e(s,e=>e.test(o)):ge(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}p(K,`buildMatchFn`);function ge(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}p(ge,`findKey`);function _e(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}p(_e,`findIndex`);function ve(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}p(ve,`buildMatchPatternFn`);var ye={code:`en-US`,formatDistance:de,formatLong:fe,formatRelative:me,localize:he,match:{ordinalNumber:ve({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:/* @__PURE__ */ p(e=>parseInt(e,10),`valueCallback`)}),era:K({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:K({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:/* @__PURE__ */ p(e=>e+1,`valueCallback`)}),month:K({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:K({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:K({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function be(e,t,n){let r=z(),i=n?.locale??r.locale??ye,a=H(e,t);if(isNaN(a))throw RangeError(`Invalid time value`);let o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[s,c]=V(n?.in,...a>0?[t,e]:[e,t]),l=le(n?.roundingMethod??`round`),u=c.getTime()-s.getTime(),d=u/j,f=(u-(B(c)-B(s)))/j,p=n?.unit,m;if(m=p||(d<1?`second`:d<60?`minute`:d<P?`hour`:f<N?`day`:f<M?`month`:`year`),m===`second`){let e=l(u/1e3);return i.formatDistance(`xSeconds`,e,o)}if(m===`minute`){let e=l(d);return i.formatDistance(`xMinutes`,e,o)}if(m===`hour`){let e=l(d/60);return i.formatDistance(`xHours`,e,o)}if(m===`day`){let e=l(f/P);return i.formatDistance(`xDays`,e,o)}if(m===`month`){let e=l(f/N);return e===12&&p!==`month`?i.formatDistance(`xYears`,1,o):i.formatDistance(`xMonths`,e,o)}{let e=l(f/M);return i.formatDistance(`xYears`,e,o)}}p(be,`formatDistanceStrict`);function xe(e,t){return be(e,U(e),t)}p(xe,`formatDistanceToNowStrict`);function q(e,t){return{read:/* @__PURE__ */ p(()=>{let n=t();if(!C(n))return;let r=f(n);try{return g(e,r)}catch{return}},`read`),write(n){let r=t();w(k.dirname(r),{recursive:!0}),O(r,ae(e,n),{encoding:`utf-8`,mode:384}),S(r,384)},clear(){let e=t(),n=C(e);return D(e,{force:!0}),n},path:t}}p(q,`createFileStorage`);function Se(e){let{temporaryAccountLogger:t,prompt:n}=e;return/* @__PURE__ */ p(async function(e,r){if(l())return t.log(r),!0;let i=await n(e);return typeof i==`string`&&i.trim().toLowerCase()===`yes`},`ensureTemporaryTermsAccepted`)}p(Se,`createTemporaryTermsPrompt`);var Ce=[9106,1e4];function J(e){return e?.code}p(J,`getErrorCode`);function we(e){let t=J(e);return t!==void 0&&Ce.includes(t)}p(we,`isMembershipsInaccessible`);function Te(e){return{"no-credentials-non-interactive":`Could not authenticate because no credentials were found and the environment is non-interactive. Set a CLOUDFLARE_API_TOKEN environment variable or run \`${e}\` in an interactive terminal first.`,"no-credentials-login-failed":`No credentials were found and the login attempt was unsuccessful. Run \`${e}\` to try again.`,"token-expired-non-interactive":`Your auth token has expired and could not be refreshed, and the environment is non-interactive. Run \`${e}\` in an interactive terminal or set a CLOUDFLARE_API_TOKEN.`,"token-expired-login-failed":`Your auth token has expired and could not be refreshed, and the login attempt was unsuccessful. Run \`${e}\` to try again.`,"token-refresh-unreachable":`Your auth token has expired and could not be refreshed because the Cloudflare auth server could not be reached. This is usually a network problem (connectivity, proxy, or IPv6), not an invalid login: your stored credentials were left unchanged. Check your connection and try again.`}}p(Te,`notLoggedInErrorBodies`);function Ee(e,t,n){let r=new Date(t.claim.expiresAt);e.log(_`
3
- Temporary account ready:
4
- Account: ${t.account.name} (${n?`reused`:`created`})
5
- Claim within: ${xe(r)}
6
- Claim URL: ${t.claim.url}
7
- `)}p(Ee,`logTemporaryPreviewAccount`);function De(o,c){let{logger:u}=c,f=c.temporaryAccountLogger??u,m=o.cliName,h=o.temporaryAccountFlag??`--temporary-account`,g=Te(o.commands.login),te=`
8
- Run \`${o.commands.whoami}\` to check your current authentication status.`,ae=A(o.getConfigPath),_=a(u,o.cacheNamespace?{namespace:o.cacheNamespace}:void 0),v=oe({serviceName:o.keyringServiceName,getConfigPath:o.getConfigPath,isKeyringEnabled:/* @__PURE__ */ p(()=>ae.readUserPreferences().keyring_enabled===!0,`isKeyringEnabled`),logger:u,isNonInteractiveOrCI:l,loginCommand:o.commands.login,format:o.fileFormat}),y=o.allowGlobalAuthKey??!0,b=re({logger:u,isNonInteractiveOrCI:l,openInBrowser:/* @__PURE__ */ p(e=>i(e,u),`openInBrowser`),hasEnvCredentials:/* @__PURE__ */ p(()=>ee({allowGlobalAuthKey:y})!==void 0,`hasEnvCredentials`),purgeOnLoginOrLogout:_.purgeConfigCaches,clientId:o.clientId,consent:o.consent,cliDisplayName:o.displayName,deviceLoginCommand:o.commands.deviceLogin,redirectUri:o.redirectUri,storageFactory:v.storageFactory,allowGlobalAuthKey:y,temporary:{storage:q(o.fileFormat,o.getTemporaryAccountConfigPath),cliDisplayName:o.displayName,logoutCommand:o.commands.logout,temporaryAccountFlag:h,prompt:Se({temporaryAccountLogger:f,prompt:c.prompt}),temporaryAccountLogger:f}});function x(e){b.setProfile(e)}p(x,`setProfile`);function S(){return b.getActiveProfile()}p(S,`getActiveProfile`);function C(){return v.getActiveStore(b.getActiveProfile())}p(C,`getCredentialStore`);function w(e,t){b.setTemporaryAllowed(e,t)}p(w,`setTemporaryAllowed`);function T(){return b.getAPIToken()}p(T,`getAPIToken`);function E(){return b.requireApiToken()}p(E,`requireApiToken`);function D(e,t){return{complianceConfig:e,scopes:t?.scopes??o.getDefaultScopeKeys(),browser:t?.browser??!0,callbackHost:t?.callbackHost,callbackPort:t?.callbackPort,profile:t?.profile,device:t?.device??o.useDeviceFlowByDefault??!1}}p(D,`withLoginDefaults`);async function O(e,t){return b.login(D(e,t))}p(O,`login`);async function k(e){return b.logout(e)}p(k,`logout`);async function j(e,t){return b.getActiveTemporaryAccount()?{loggedIn:!0}:b.loginOrRefreshIfRequired(D(e,t))}p(j,`loginOrRefreshIfRequired`);async function M(){return b.getOAuthTokenFromLocalState()}p(M,`getOAuthTokenFromLocalState`);function N(){return b.getScopes()}p(N,`getScopes`);function P(){return v.storageFactory(S()).read()}p(P,`readAuthCredentials`);function F(e){v.storageFactory(S()).write(e)}p(F,`writeAuthCredentials`);function I(){let e=b.getActiveProfile();return e==="default"?`${o.accountCachePrefix}.json`:`${o.accountCachePrefix}-${e}.json`}p(I,`getAccountCacheFileName`);function L(e){_.saveToConfigCache(I(),{account:e})}p(L,`saveAccountToCache`);function R(){return _.getConfigCache(I()).account}p(R,`getAccountFromCache`);async function z(e,n,i){let a=[],o=!0,l=1,d;for(;o;){d=new ce(d),d.set(`page`,String(l));let{response:f,status:p}=await s(e,n,{},c.userAgent,u,d,void 0,i);f.success?(a.push(...f.result),t(f.result_info)?l+=1:o=!1):r(n,f,p)}return a}p(z,`fetchAccountsPaged`);async function B(e,t={}){let{throwOnEmpty:n=!0}=t,r=await j(e);if(!r.loggedIn)throw new se(`Not logged in. ${g[r.reason]}${te}`,r.reason,`cfetch auth login required`);let i=E(),[a,s]=await Promise.allSettled([z(e,`/accounts`,i),z(e,`/memberships`,i)]);if(a.status===`rejected`)throw a.reason;if(s.status===`rejected`){if(we(s.reason)){if(a.status===`fulfilled`&&a.value.length>0)return a.value;throw J(s.reason)===9106?new d(`Failed to automatically retrieve account IDs for the logged in user.
9
- You may have incorrect permissions on your API token, or an environment variable such as CLOUDFLARE_API_TOKEN, CLOUDFLARE_API_KEY, or CLOUDFLARE_EMAIL may be set to an invalid value.
10
- Check your environment and unset or correct any Cloudflare credential variables, or run \`${o.commands.login}\` to re-authenticate.
11
- You can also skip this account check by adding an \`account_id\` in your ${o.getConfigFileLabel()} file, or by setting the value of CLOUDFLARE_ACCOUNT_ID`,{telemetryMessage:`user account fetch permission denied`}):new d(`Failed to automatically retrieve account IDs for the logged in user.
12
- You may have incorrect permissions on your API token, or your authentication may have expired. Try running \`${o.commands.login}\` to re-authenticate. You can also skip this account check by adding an \`account_id\` in your ${o.getConfigFileLabel()} file, or by setting the value of CLOUDFLARE_ACCOUNT_ID`,{telemetryMessage:`user account fetch permission denied`})}throw s.reason}let c=new Set(s.value.map(e=>e.account.id)),l=a.value.filter(e=>c.has(e.id));if(l.length===0&&n)throw new d(`Failed to automatically retrieve account IDs for the logged in user.
13
- In a non-interactive environment, it is mandatory to specify an account ID, either by assigning its value to CLOUDFLARE_ACCOUNT_ID, or as \`account_id\` in your ${o.getConfigFileLabel()} file.
14
- Alternatively, try running \`${o.commands.login}\` to re-authenticate.`,{telemetryMessage:`user account fetch empty`});return l}p(B,`fetchAllAccounts`);function V(e){let t=b.getActiveTemporaryAccount();return t?t.account.id:e.account_id?ne(e.account_id,`set as \`account_id\` in your ${o.getConfigFileLabel()} file`):ie()||R()?.id}p(V,`getActiveAccountId`);async function H(t){let n=V(t);if(n)return n;let r=await B(t);if(r.length===1)return L({id:r[0].id,name:r[0].name}),r[0].id;try{let e=await c.select(`Select an account`,{choices:r.map(e=>({title:e.name,value:e.id}))}),t=r.find(t=>t.id===e);if(!t)throw Error(`Selected account not found in accounts list`);return L({id:t.id,name:t.name}),e}catch(t){if(c.isNoDefaultValueProvidedError(t)){let t=e();throw new d(`More than one account available but unable to select one in non-interactive mode.
15
- Please set the appropriate \`account_id\` in your ${o.getConfigFileLabel()} file or assign it to the \`CLOUDFLARE_ACCOUNT_ID\` environment variable.
16
- Available accounts are (\`<name>\`: \`<account_id>\`):
17
- ${r.map(e=>` \`${t?`(redacted)`:e.name}\`: \`${e.id}\``).join(`
18
- `)}`,{telemetryMessage:`user account selection unavailable`})}throw t}}p(H,`getOrSelectAccountId`);async function U(e){if(b.isTemporaryAllowed()){if(n(e)!==`public`)throw new d(`Temporary accounts aren't available when the compliance region is not set to public.`,{telemetryMessage:`user temporary account unavailable in compliance region`});let t=b.getActiveTemporaryAccount();if(t)return t.account.id;if(T())throw new d(`You're already authenticated with Cloudflare, so \`${h}\` can't be used. Temporary preview accounts are only for unauthenticated use. Either remove \`${h}\` to use your existing account, or log out (and unset CLOUDFLARE_API_TOKEN) first.`,{telemetryMessage:`user temporary account already authenticated`});let{account:r,cached:i}=await b.activateTemporaryAccount();return Ee(f,r,i),r.account.id}let t=await j(e);if(!t.loggedIn)throw t.reason===`no-credentials-non-interactive`||t.reason===`token-expired-non-interactive`?new d(`In a non-interactive environment, it's necessary to set a CLOUDFLARE_API_TOKEN environment variable for ${m} to work. Please go to https://developers.cloudflare.com/fundamentals/api/get-started/create-token/ for instructions on how to create an api token, and assign its value to CLOUDFLARE_API_TOKEN.`,{telemetryMessage:`user auth missing api token non interactive`}):t.reason===`token-refresh-unreachable`?new d(g[t.reason],{telemetryMessage:`user auth token refresh unreachable`}):new d(`Did not login, quitting...`,{telemetryMessage:`user login cancelled`});let r=await H(e);if(!r)throw new d(`No account id found, quitting...`,{telemetryMessage:`user auth missing account id`});return r}return p(U,`requireAuth`),{setProfile:x,getActiveProfile:S,getCredentialStore:C,setTemporaryAllowed:w,getAPIToken:T,requireApiToken:E,login:O,logout:k,loginOrRefreshIfRequired:j,getOAuthTokenFromLocalState:M,getScopes:N,readAuthCredentials:P,writeAuthCredentials:F,getActiveAccountId:V,getOrSelectAccountId:H,getAccountFromCache:R,fetchAllAccounts:B,requireAuth:U}}p(De,`createCloudflareAuth`);var Oe=`profiles/directory-bindings.json`,ke=`.enc`;function Y(e){let{logger:t,getConfigPath:n,keyringServiceName:r,format:i}=e,a=`.${i}`;function o(e){return y(n(),e,i)}p(o,`plaintextPath`);function s(e){return h(n(),e)}p(s,`encryptedPath`);function c(){return k.dirname(o(`default`))}p(c,`getProfileConfigDirectory`);let l={exists(e){return C(o(e))||C(s(e))},list(){let e=c();if(!C(e))return[];let t=/* @__PURE__ */ new Set;for(let n of E(e))n.endsWith(a)?t.add(n.slice(0,-a.length)):n.endsWith(ke)&&t.add(n.slice(0,-ke.length));return[...t]},delete(e){let{backendAvailable:a,encryptedFileExisted:s}=v({serviceName:r,configPath:n(),profile:e,format:i});q(i,()=>o(e)).clear(),s&&!a&&t.warn(`Removed the credential files for profile "${e}", but the keyring backend was not reachable on this host so its keyring entry could not be cleared. Clear it manually if it persists.`)}};function u(){return k.join(n(),Oe)}return p(u,`getDirectoryBindingsPath`),m({configs:l,bindings:{read(){try{let e=T(u(),`utf-8`);return JSON.parse(e)}catch{return{}}},write(e){let t=u();w(k.dirname(t),{recursive:!0}),O(t,JSON.stringify(e,null,` `),`utf-8`)}}})}p(Y,`createCloudflareProfileStore`);function Ae(e){let{loginCommand:t,createProfileCommand:n,keyringServiceName:r,getConfigPath:i,format:a,preferences:o}=e,{readUserPreferences:s,updateUserPreferences:c}=o;function l(e){return e??`default`}p(l,`describeProfile`);function u(e){let t=[];C(h(i()))&&t.push(void 0);let n=Y({logger:e,getConfigPath:i,keyringServiceName:r,format:a});for(let e of n.configs.list()){try{te(e)}catch{continue}C(h(i(),e))&&t.push(e)}return t}p(u,`listEncryptedProfiles`);function d(e){let o=u(e);if(o.length===0)return;let s=[],c=[];for(let t of o)try{let{backendAvailable:e}=v({serviceName:r,configPath:i(),profile:t,format:a});s.push(l(t)),e||c.push(l(t))}catch(n){e.warn(`Failed to remove encrypted credentials for profile "${l(t)}": ${n instanceof Error?n.message:String(n)}. You may need to clear them manually.`)}if(s.length>0){let r=n?`Re-authenticate with \`${t}\` (default profile) or \`${n} <name>\` (named profiles).`:`Re-authenticate with \`${t}\`.`;e.log(`Removed encrypted credentials for ${s.map(e=>`"${e}"`).join(`, `)}. ${r}`)}c.length>0&&e.warn(`The keyring backend was not reachable on this host, so the keyring entry for ${c.map(e=>`"${e}"`).join(`, `)} could not be cleared. Clear it manually if it persists.`)}p(d,`scrubAllEncryptedProfiles`);function f(e,t){let{logger:n,getCredentialStore:r}=t,i=s().keyring_enabled===!0,a=b();if(a!==void 0&&a!==e&&n.warn(`CLOUDFLARE_AUTH_USE_KEYRING=${a} overrides ${e?`enabling`:`disabling`} keyring storage for this command.`),!e&&a!==!0&&d(n),c({keyring_enabled:e}),e&&a!==!1)try{r().kind!==`encrypted-file`&&(c({keyring_enabled:i}),n.warn(`Keyring storage isn't available on this host (see warning above), so it was not enabled. Try again once the keyring backend is reachable.`))}catch(e){throw c({keyring_enabled:i}),e}return{enabled:s().keyring_enabled===!0}}return p(f,`setKeyringPreference`),{setKeyringPreference:f}}p(Ae,`createKeyringPreference`);function je(e){let{getConfigPath:t,format:n}=e;function r(e){return y(t(),e,n)}p(r,`getAuthConfigFilePath`);function i(e){return h(t(),e)}p(i,`getEncryptedAuthConfigFilePath`);function a(e){return q(n,()=>r(e))}p(a,`defaultAuthConfigStorage`);function o(e,t){a(t).write(e)}p(o,`writeAuthConfigFile`);function s(e){return a(e).read()}return p(s,`readAuthConfigFile`),{getAuthConfigFilePath:r,getEncryptedAuthConfigFilePath:i,defaultAuthConfigStorage:a,readAuthConfigFile:s,writeAuthConfigFile:o}}p(je,`createAuthConfigFileHelpers`),x(import.meta.url||(typeof __filename==`string`?__filename:`/`));var X=`cloudflare`,Me=`cf`,Ne=`cf`,Pe=`http://localhost:8877/oauth/callback`,Fe={granted:{url:`https://welcome.developers.workers.dev/cf-oauth-consent-granted`},denied:{url:`https://welcome.developers.workers.dev/cf-oauth-consent-denied`,error:"Error: Consent denied. You must grant consent to cf in order to login.\nIf you don't want to do this consider passing an API token via the `CLOUDFLARE_API_TOKEN` environment variable"}},Ie=c({variableName:`CLOUDFLARE_CLIENT_ID`,defaultValue:/* @__PURE__ */ p(()=>`cbca97e7-c331-4cdd-8fd8-e25a451b98bf`,`defaultValue`)});function Z(){return o({appName:`cloudflare`,leadingDot:!1,useLegacyHomeDir:!1})}p(Z,`getCfConfigPath`);var Le=/* @__PURE__ */ `access:read,access:write,account:read,account_api_tokens:create,agw:read,agw:run,agw:write,ai:read,ai:write,ai-search:read,ai-search:run,ai-search:write,aiaudit:read,aiaudit:write,aig:read,aig:write,auditlogs:read,billing:read,billing:write,browser:read,browser:write,cfone:read,cfone:write,cloudchamber:write,connectivity:admin,connectivity:bind,connectivity:read,constellation:write,containers:write,d1:write,dex:read,dex:write,dns_analytics:read,dns_records:edit,dns_records:read,dns_settings:read,email_routing:read,email_routing:write,email_sending:read,email_sending:write,firstpartytags:write,images:read,images:write,lb:edit,lb:read,logpush:read,logpush:write,mcp_portals:read,mcp_portals:write,notebook-examples:read,notebook-managed:read,notification:read,notification:write,oauth_account_ssl_and_certificates_write,offline,openid,pages:read,pages:write,pipelines:read,pipelines:setup,pipelines:write,query_cache:write,queues:write,r2_catalog:write,radar:read,rag:read,rag:write,registrar:read,registrar:write,secrets_store:read,secrets_store:write,sso-connector:read,sso-connector:write,ssl_certs:write,teams:pii,teams:read,teams:secure_location,teams:write,url_scanner:read,url_scanner:write,user:read,vectorize:write,workers:read,workers:write,workers_builds:read,workers_builds:write,workers_deployments:read,workers_kv:write,workers_observability:read,workers_observability:write,workers_observability_telemetry:write,workers_routes:write,workers_scripts:write,workers_tail:read,zone:read,account-analytics.read,account-ssl-and-certificates.write,ssl-and-certificates.read,ssl-and-certificates.write,registrar-domains.read,registrar-domains.admin,logs.read,logs.write,websearch.run,snippets.read,snippets.write,access-acct.read,access-acct.revoke,access-acct.write,access-app.read,access-app.revoke,access-app.write,access-audit-log.read,access-certificate.read,access-certificate.write,access-custom-page.read,access-custom-page.write,access-device-posture.read,access-device-posture.write,access-group.read,access-group.write,access-idp.read,access-idp.write,access-key.read,access-key.write,access-org.read,access-org.revoke,access-org.write,access-policy-test.read,access-policy-test.write,access-policy.read,access-policy.write,access-population.read,access-population.write,access-saml-certificate.read,access-saml-certificate.write,access-scim-log.read,access-seats.write,access-service-token.read,access-service-token.write,access-ssh-auditing.read,access-ssh-auditing.write,access-tag.read,access-tag.write,access-users.read,access-users.write,access.read,access.revoke,access.write,account-api-gateway.read,account-api-gateway.write,account-custom-asset.read,account-custom-asset.write,account-custom-error-rules.read,account-custom-error-rules.write,account-custom-pages.read,account-custom-pages.write,account-disable-esc.read,account-disable-esc.write,account-dns-settings.read,account-dns-settings.write,account-firewall-access-rules.read,account-firewall-access-rules.write,account-logs.read,account-logs.write,account-rule-lists.read,account-rule-lists.write,account-rulesets.read,account-rulesets.write,account-security-center-insights.read,account-security-center-insights.write,account-settings.read,account-settings.write,account-ssl-and-certificates.read,account-waf.read,account-waf.write,account-waiting-rooms.read,address-maps.read,address-maps.write,agent-memory.write,agw.read,agw.run,agw.write,ai-search.index,ai-search.metadata_read,ai-search.read,ai-search.run,ai-search.write,ai.read,ai.write,aiaudit.read,aiaudit.write,aig.metadata_read,aig.read,aig.run,aig.write,analytics.read,api-gateway.read,api-gateway.write,apps.write,argotunnel.read,argotunnel.write,artifacts.read,artifacts.write,bot-management-feedback.read,bot-management-feedback.write,bot-management.read,bot-management.write,browser-rendering.read,browser-rendering.write,cache-settings.read,cache-settings.write,cache.purge,calls.read,calls.write,casb.read,casb.write,cf-agents.read,cf-agents.write,challenge-widgets.read,challenge-widgets.write,chinanetwork-steering.read,chinanetwork-steering.write,cloud-connector.read,cloud-connector.write,cloud-email-security.read,cloud-email-security.write,cloudchamber.read,cloudchamber.write,cloudforce-one.read,cloudforce-one.write,config-settings.read,config-settings.write,connectivity-directory.admin,connectivity-directory.bind,connectivity-directory.read,constellation.read,constellation.write,containers.read,containers.write,custom-errors.read,custom-errors.write,custom-pages.read,custom-pages.write,d1.metadata_read,d1.read,d1.write,ddos-botnet-feed.read,ddos-botnet-feed.write,ddos-protection.read,ddos-protection.write,dls.read,dls.write,dns-firewall.read,dns-firewall.write,dns-view.read,dns-view.write,dns.read,dns.write,domain-page-shield.read,domain-page.shield,dynamic-redirect.read,dynamic-redirect.write,email-routing-account-rule.read,email-routing-address.read,email-routing-address.write,email-routing-rule.read,email-routing-rule.write,email-routing-suppression.read,email-routing-suppression.write,email-security-dmarcreports.read,email-security-dmarcreports.write,email-sending.read,email-sending.write,fbm.admin,fbm.read,fbm.write,field-extractor.read,field-extractor.write,firewall-for-ai.read,firewall-for-ai.write,firewall-services.read,firewall-services.write,flagship.evaluate,flagship.read,flagship.write,fraud-detection-pii.read,fraud-detection.read,fraud-detection.write,fraud-events.write,fraud-feedback.read,fraud-feedback.write,healthcheck.read,healthcheck.write,hyperdrive-planetscale.setup,http-applications.read,http-applications.write,http-ddos-managed-ruleset.read,http-ddos-managed-ruleset.write,images.metadata_read,images.read,images.write,integration.write,intel.read,intel.write,iot.read,iot.write,ip-prefix-bgp-on-demand.read,ip-prefix-bgp-on-demand.write,ip-prefix.read,ip-prefix.write,k2.consume,k2.produce,k2.read,k2.write,l4-ddos-managed-ruleset.read,l4-ddos-managed-ruleset.write,load-balancers-account.read,load-balancers-account.write,load-balancers.read,load-balancers.write,load-balancing-monitors-and-pools.read,load-balancing-monitors-and-pools.write,magic-firewall.read,magic-firewall.write,magic-transit.read,magic-transit.write,magic-wan.read,magic-wan.write,managed-headers.read,managed-headers.write,mass-url-redirects.read,mass-url-redirects.write,mcp-portals.read,mcp-portals.write,memberships.read,memberships.write,messaging.edit,messaging.metadata_read,messaging.read,moq.read,moq.write,notifications.read,notifications.write,origin.read,origin.write,page-rules.read,page-rules.write,page-shield.read,page.read,page.shield,page.write,pages.metadata_read,payments-gateway.read,payments-gateway.write,pcaps-api.read,pcaps-api.write,pipelines.read,pipelines.send,pipelines.write,precursor.read,precursor.write,pubsub.read,pubsub.write,query-cache.read,query-cache.write,queues.metadata_read,queues.read,queues.write,r2-catalog-sql.read,r2-catalog.read,r2-catalog.write,radar.read,rag.read,rag.run,rag.write,realtime.admin,realtime.read,realtime.write,registrar-sandbox-domains.admin,registrar-sandbox-domains.read,reports-application-security-report.read,request-tracer.read,resource-library.read,resource-library.write,resource-sharing.read,response-compression.read,response-compression.write,sanitize.read,sanitize.write,secrets-store.read,secrets-store.write,select-configuration.read,select-configuration.write,stream.metadata_read,stream.read,stream.write,tag.read,tag.write,teams-cds-compute-account.read,teams-cds-compute-account.write,teams-connector-cloudflared.monitoring,teams-connector-cloudflared.read,teams-connector-cloudflared.write,teams-connector-warp.read,teams-connector-warp.write,teams-connectors.read,teams-connectors.write,teams-dex.read,teams-dex.write,teams-networks.read,teams-networks.write,teams-pii.read,teams-resilience.read,teams-resilience.write,teams-secure.location,teams.read,teams.report,teams.write,transform-rules.read,transform-rules.write,trust-and-safety.read,trust-and-safety.write,url-scanner.read,url-scanner.write,user-api-tokens.write,user-details.read,user-details.write,vectorize.read,vectorize.write,waiting-rooms.read,waiting-rooms.write,web3-hostnames.read,web3-hostnames.write,websearch.metadata_read,websearch.read,websearch.write,workers-ci.read,workers-ci.write,workers-kv-storage.metadata_read,workers-kv-storage.read,workers-kv-storage.write,workers-observability-telemetry.write,workers-observability.read,workers-observability.write,workers-r2-bucket-item.read,workers-r2-bucket-item.write,workers-r2.metadata_read,workers-r2.read,workers-r2.write,workers-routes.read,workers-routes.write,workers-scripts.bind,workers-scripts.read,workers-scripts.write,workers-tail.read,workers_ai.metadata_read,zaraz.edit,zaraz.read,zaraz.write,zone-access.read,zone-access.revoke,zone-access.write,zone-custom-asset.read,zone-custom-asset.write,zone-disable-esc.read,zone-disable-esc.write,zone-dns-settings.read,zone-dns-settings.write,zone-observability.read,zone-observability.write,zone-security-center-insights.read,zone-security-center-insights.write,zone-settings.read,zone-settings.write,zone-transform-rules.read,zone-transform-rules.write,zone-versioning.read,zone-versioning.write,zone-waf.read,zone-waf.write,zone.read,zone.write`.split(`,`),Re=/* @__PURE__ */ new Set([`billing:read`,`billing:write`,`email_routing:read`,`email_sending:read`,`notebook-managed:read`,`oauth_account_ssl_and_certificates_write`]),ze=Le.filter(e=>!Re.has(e)),Q=[...ze];function Be(e){Q=e}p(Be,`setLoginScopeKeys`);var Ve=new Set(ze);function He(e){return e.every(e=>Ve.has(e))}p(He,`validateScopeKeys`);function Ue(){let e=u();return e===`production`?`cloudflare-temporary-account.json`:`cloudflare-temporary-account.${e}.json`}p(Ue,`getTemporaryAccountConfigFile`);function We(){return k.join(Z(),Ue())}p(We,`getCfTemporaryAccountConfigPath`);function Ge(e){return q(`json`,e)}p(Ge,`createJsonFileStorage`);var{getAuthConfigFilePath:Ke,getEncryptedAuthConfigFilePath:qe,defaultAuthConfigStorage:Je,readAuthConfigFile:Ye,writeAuthConfigFile:Xe}=je({getConfigPath:Z,format:`json`}),$={cliName:Me,displayName:Ne,temporaryAccountFlag:`--temporary-account`,commands:{login:`cf auth login`,logout:`cf auth logout`,whoami:`cf auth whoami`,createProfile:`cf auth create`,deviceLogin:`cf auth login`},keyringServiceName:X,clientId:Ie,consent:Fe,redirectUri:Pe,useDeviceFlowByDefault:!0,allowGlobalAuthKey:!1,getConfigPath:Z,getTemporaryAccountConfigPath:We,fileFormat:`json`,accountCachePrefix:`cloudflare-account`,cacheNamespace:`cloudflare`,getConfigFileLabel:/* @__PURE__ */ p(()=>`cf config`,`getConfigFileLabel`),getDefaultScopeKeys:/* @__PURE__ */ p(()=>Q,`getDefaultScopeKeys`)},Ze=A(Z),{readUserPreferences:Qe,updateUserPreferences:$e}=Ze;function et(e){return De($,e)}p(et,`createCfAuth`);function tt(e){return Y({logger:e.logger,getConfigPath:Z,keyringServiceName:X,format:`json`})}p(tt,`createCfProfileStore`);var nt=Ae({loginCommand:$.commands.login,createProfileCommand:$.commands.createProfile,keyringServiceName:X,getConfigPath:Z,format:`json`,preferences:Ze});function rt(e,t){return nt.setKeyringPreference(e,t)}p(rt,`setKeyringPreference`);export{Z as a,Ge as i,et as n,rt as o,tt as r,He as s,Q as t};