cf 1.0.0-beta.8 → 1.0.0-beta.9

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 (248) hide show
  1. package/dist/_meta/commands.json +546 -25
  2. package/dist/_meta/schemas.json +400 -1
  3. package/dist/{abuse-reports-D9LttL99.mjs → abuse-reports-LBVv-g3M.mjs} +1 -1
  4. package/dist/{access-CSUG9fDH.mjs → access-lTeHFhwl.mjs} +1 -1
  5. package/dist/{account-tags-BkmuF6bd.mjs → account-tags-BJOkTRcJ.mjs} +1 -1
  6. package/dist/{accounts-CmqKD3xG.mjs → accounts-CxfmZ26h.mjs} +1 -1
  7. package/dist/{acm-D9WirG6Y.mjs → acm-Lwxk9U-L.mjs} +1 -1
  8. package/dist/{addressing-DAdzF3M5.mjs → addressing-C4Y5vVvy.mjs} +1 -1
  9. package/dist/{agent-memory-CIEk0dD-.mjs → agent-memory-DD0BUFmc.mjs} +1 -1
  10. package/dist/{ai-Dq1GOYn7.mjs → ai-D9GX6Huo.mjs} +1 -1
  11. package/dist/{ai-audit-D5XtqDkx.mjs → ai-audit-COn-Iiyc.mjs} +1 -1
  12. package/dist/{ai-gateway-D16_7Zbq.mjs → ai-gateway-CYMqceyk.mjs} +16 -14
  13. package/dist/{ai-search-Ce3p9ccc.mjs → ai-search-DbpDgJAl.mjs} +1 -1
  14. package/dist/{ai-security-BodoNshv.mjs → ai-security-bRPA5p1v.mjs} +1 -1
  15. package/dist/{alerting-DuF0tdhO.mjs → alerting-Bo1lxRbE.mjs} +1 -1
  16. package/dist/{analytics-DmnqxoBT.mjs → analytics-85GRwRHh.mjs} +4 -5
  17. package/dist/{analytics_engine-BOYHgzoX.mjs → analytics_engine-DgSsozQ2.mjs} +1 -1
  18. package/dist/{api-security-B3v-EKrg.mjs → api-security-B0Y0gif0.mjs} +1 -1
  19. package/dist/{argo-BsSvWev6.mjs → argo-BFxaIesT.mjs} +1 -1
  20. package/dist/{artifacts-Dq5t2ZQO.mjs → artifacts-DicFDolv.mjs} +2 -2
  21. package/dist/{audit-logs-DpszUSNO.mjs → audit-logs-DN1mQRY_.mjs} +1 -1
  22. package/dist/{auth-BjxUTZWb.mjs → auth-C_-fMmUL.mjs} +2 -2
  23. package/dist/{auth-skaSvH3I.mjs → auth-CeiDicp4.mjs} +1 -1
  24. package/dist/{autoconfig-DXXV-Xyz.mjs → autoconfig-DPUztTL2.mjs} +1 -1
  25. package/dist/{basin-catalog-c_Z-KmdC.mjs → basin-catalog-CLd6aFV_.mjs} +1 -1
  26. package/dist/{billing-D8eSkPUk.mjs → billing-sbqGqYgk.mjs} +1 -1
  27. package/dist/{bot-management-gPqJF81w.mjs → bot-management-BDZwYRbv.mjs} +1 -1
  28. package/dist/{botnet-feed-B1TeX5OO.mjs → botnet-feed-BDs84Rk7.mjs} +1 -1
  29. package/dist/{brand-protection-jjdTCYeF.mjs → brand-protection-D4-67mgV.mjs} +1 -1
  30. package/dist/{browser-run-CkmofJ6D.mjs → browser-run-Cw4OgHMC.mjs} +1 -1
  31. package/dist/{build-B-tN7mO-.mjs → build-B5UYMEQH.mjs} +1 -1
  32. package/dist/build-DLZ9gBNA.mjs +2 -0
  33. package/dist/{builds-Ca9hPvgz.mjs → builds-CdS0Jjme.mjs} +1 -1
  34. package/dist/{cache-BnRnlPjP.mjs → cache-574Higpi.mjs} +1 -1
  35. package/dist/{certificate-authorities-D2J5rh-m.mjs → certificate-authorities-RpWY-yHx.mjs} +1 -1
  36. package/dist/{cli-xbKU3h28.mjs → cli-CIu0GeU7.mjs} +1 -1
  37. package/dist/{client-certificates-D3mKJGFa.mjs → client-certificates-C-aZxVUT.mjs} +1 -1
  38. package/dist/{client-side-security-DcO8apX2.mjs → client-side-security-ChUBdwcX.mjs} +1 -1
  39. package/dist/{cloud-connector-CCbT4xFi.mjs → cloud-connector-DTHuCkjj.mjs} +1 -1
  40. package/dist/{cloudforce-one-Cnj0OnZF.mjs → cloudforce-one-DiOsWYK2.mjs} +1 -1
  41. package/dist/{command-BxrOxsu9.mjs → command-4-_i7Drg.mjs} +1 -1
  42. package/dist/{command-8lsstsSi.mjs → command-BCag-xjk.mjs} +1 -1
  43. package/dist/{command-_4j_XD3U.mjs → command-BLJaqN2i.mjs} +1 -1
  44. package/dist/{command-BUWmTl5w.mjs → command-BS0D67wS.mjs} +1 -1
  45. package/dist/{command-CwsA28Vt.mjs → command-Bp-Ono5h.mjs} +1 -1
  46. package/dist/{command-D5vy9tlg.mjs → command-DFPF1MDP.mjs} +1 -1
  47. package/dist/{command-CUQF-QFP.mjs → command-DPZl5lDW.mjs} +1 -1
  48. package/dist/{command-CvzUv83h.mjs → command-DUafPVUr.mjs} +1 -1
  49. package/dist/{command-BtmIP6e1.mjs → command-DfffeX-k.mjs} +1 -1
  50. package/dist/{command-BvwvCWkB.mjs → command-DmCeLhAR.mjs} +1 -1
  51. package/dist/{command-BDCTd8Ra.mjs → command-DzHL5LKI.mjs} +1 -1
  52. package/dist/{command-BWUoVso3.mjs → command-HpcRetCI.mjs} +1 -1
  53. package/dist/{command-DwbJIcAA.mjs → command-qX0mcMdJ.mjs} +1 -1
  54. package/dist/{command-B9rrie65.mjs → command-siVEvKhD.mjs} +1 -1
  55. package/dist/{completions-EHied_ON.mjs → completions-Ksnj6C10.mjs} +1 -1
  56. package/dist/{connector-interrupts-CyeiC7gw.mjs → connector-interrupts-BMVVtRoe.mjs} +1 -1
  57. package/dist/{connector-telemetry-events-D-cL2RuW.mjs → connector-telemetry-events-BVIKzaGu.mjs} +1 -1
  58. package/dist/{connector-telemetry-snapshots-MrpBZ5fC.mjs → connector-telemetry-snapshots-ChUsGxJA.mjs} +1 -1
  59. package/dist/{connectors-Ds5PWdpP.mjs → connectors-v5tsuazm.mjs} +1 -1
  60. package/dist/{containers-D9masRwv.mjs → containers-CkVjC4WK.mjs} +1 -1
  61. package/dist/{containers-BR6paNcL.mjs → containers-D2NT0_6_.mjs} +1 -1
  62. package/dist/{content-scan-eX3wIB8J.mjs → content-scan-BhPn2Ri6.mjs} +1 -1
  63. package/dist/{context-M2Ho8pi3.mjs → context-Cibc7DIM.mjs} +1 -1
  64. package/dist/{cps-CyviY22M.mjs → cps-DjsEAp0Y.mjs} +1 -1
  65. package/dist/{csamScanner-CHF53DZw.mjs → csamScanner-NxvG2dHV.mjs} +1 -1
  66. package/dist/{ct-alerting-BORxnBtn.mjs → ct-alerting-Bx2UZEx6.mjs} +1 -1
  67. package/dist/{custom-certificates-KsS8xnfG.mjs → custom-certificates-nNHIgfAg.mjs} +1 -1
  68. package/dist/{custom-csrs-BtNQaSVn.mjs → custom-csrs-CWQYjo1J.mjs} +1 -1
  69. package/dist/{custom-hostnames-4tLpHtCK.mjs → custom-hostnames-Ba-AX6GI.mjs} +1 -1
  70. package/dist/{custom-nameservers-DYM29vGA.mjs → custom-nameservers-CBYeF3EA.mjs} +1 -1
  71. package/dist/{custom-pages-BIwM1IyN.mjs → custom-pages-B8npWgUd.mjs} +1 -1
  72. package/dist/{d1-Yhj_t0--.mjs → d1-C1jAzZdm.mjs} +1 -1
  73. package/dist/{dcv-delegation-DXspPfEr.mjs → dcv-delegation-BcWil-n0.mjs} +1 -1
  74. package/dist/{deploy-su0BR90P.mjs → deploy-C1YhIsYf.mjs} +1 -1
  75. package/dist/{deploy-input-DJWWJs3a.mjs → deploy-input-DTjBGloL.mjs} +1 -1
  76. package/dist/{dev-DqgkwmRH.mjs → dev-BML-bpNU.mjs} +1 -1
  77. package/dist/{diagnostics-B6FqDbQY.mjs → diagnostics-Dhv2hv7H.mjs} +1 -1
  78. package/dist/discover-DwczTkRX.mjs +2 -0
  79. package/dist/{dist-CxGYQfpW.mjs → dist-BOwFXRl5.mjs} +1 -1
  80. package/dist/{dls-CDvZjyjo.mjs → dls-D1r38j3_.mjs} +1 -1
  81. package/dist/{dns-DGMcGcBE.mjs → dns-BRFzX8NU.mjs} +1 -1
  82. package/dist/{dns-firewall-BahlWOJO.mjs → dns-firewall-DtLBYFPM.mjs} +1 -1
  83. package/dist/{durable-objects-Cnho3J7w.mjs → durable-objects-C2Aefs4L.mjs} +1 -1
  84. package/dist/{email-auth-CkqeIq8V.mjs → email-auth-YiFzQwVf.mjs} +1 -1
  85. package/dist/{email-routing-D_Mw8HSX.mjs → email-routing-z-z1rYZH.mjs} +1 -1
  86. package/dist/{email-security-D9yMRsXl.mjs → email-security-CGmTS-uF.mjs} +1 -1
  87. package/dist/{email-sending-CQfuE7h6.mjs → email-sending-D29kFQug.mjs} +1 -1
  88. package/dist/{error-sanitization-BXqhvJsR.mjs → error-sanitization-CJ5OLJrh.mjs} +1 -1
  89. package/dist/error-sanitization-hmi1CqE5.mjs +2 -0
  90. package/dist/{fieldExtractors-Bbbegy-c.mjs → fieldExtractors-pYznM75V.mjs} +1 -1
  91. package/dist/{firewall-DtlT_8mG.mjs → firewall-CZo7QDd9.mjs} +1 -1
  92. package/dist/{flagship-BWEdMJSQ.mjs → flagship-CXnjhYkL.mjs} +1 -1
  93. package/dist/{fraud-mszBJHV6.mjs → fraud-CSqdPZ71.mjs} +1 -1
  94. package/dist/generate-BPqoDbck.mjs +2 -0
  95. package/dist/{google-tag-gateway-DD8rztUs.mjs → google-tag-gateway-DX20Ia5e.mjs} +1 -1
  96. package/dist/{healthchecks-CzCJR3df.mjs → healthchecks-n2tjszDt.mjs} +1 -1
  97. package/dist/{hostnames-BTSxAv-T.mjs → hostnames-CCg1WdH6.mjs} +1 -1
  98. package/dist/{hyperdrive-Bg1T58qE.mjs → hyperdrive-GECLKycn.mjs} +1 -1
  99. package/dist/{iam-cAzxdXI7.mjs → iam-C4CHSG7c.mjs} +1 -1
  100. package/dist/{images-CfHt8v2n.mjs → images-6Cs-Feuz.mjs} +1 -1
  101. package/dist/index.mjs +1 -1
  102. package/dist/{init-9TwyFuzD.mjs → init-fa1wFHUX.mjs} +2 -2
  103. package/dist/{intel-WWPG0-t7.mjs → intel-DiCFqJET.mjs} +1 -1
  104. package/dist/{ips-CxSw5R88.mjs → ips-Bq1BTfPF.mjs} +1 -1
  105. package/dist/k2-BAQnWQIM.mjs +13 -0
  106. package/dist/{keyless-certificates-Jfsyada7.mjs → keyless-certificates-CZftNR60.mjs} +1 -1
  107. package/dist/{keys-BrDarg28.mjs → keys-BFqSZOfP.mjs} +1 -1
  108. package/dist/{kv-C8eauBSy.mjs → kv-Dpo1EtAM.mjs} +1 -1
  109. package/dist/{lazy-command-B0914_IJ.mjs → lazy-command-C8fVcK9z.mjs} +1 -1
  110. package/dist/{leaked-credential-checks-Y9mDSJKn.mjs → leaked-credential-checks-twflfhgD.mjs} +1 -1
  111. package/dist/{load-balancers-DsKJIF_U.mjs → load-balancers-DywhdyKf.mjs} +1 -1
  112. package/dist/{local-CQc36Viv.mjs → local-B5oRPTEN.mjs} +1 -1
  113. package/dist/local-Bj-l0TP6.mjs +2 -0
  114. package/dist/{local-runtime-CifOYlPq.mjs → local-runtime-CZnegFEM.mjs} +1 -1
  115. package/dist/{login-DGXSiCII.mjs → login-BWuV_6Ti.mjs} +1 -1
  116. package/dist/{login-DFZ3DEjI.mjs → login-CStejTNn.mjs} +1 -1
  117. package/dist/{logo-matches-D1vjZF-k.mjs → logo-matches-BbuNQTBr.mjs} +1 -1
  118. package/dist/{logos-CCEIMvE7.mjs → logos-mAj8GzO0.mjs} +1 -1
  119. package/dist/{logpush-DAx2y5MY.mjs → logpush-riOF9-YV.mjs} +1 -1
  120. package/dist/{logs-D9BsByMt.mjs → logs-DITH6eet.mjs} +1 -1
  121. package/dist/{magic-cloud-networking-C_FsIQoS.mjs → magic-cloud-networking-trqm-ciY.mjs} +1 -1
  122. package/dist/{magic-network-monitoring-DBo1mI3a.mjs → magic-network-monitoring-CF0uR3b_.mjs} +1 -1
  123. package/dist/{magic-transit-BgRq6ZeA.mjs → magic-transit-438AP90W.mjs} +1 -1
  124. package/dist/{managed-defense-BRdCrVVh.mjs → managed-defense-Criu9sDQ.mjs} +1 -1
  125. package/dist/{managed-transforms-cmvRuRQ7.mjs → managed-transforms-BdwEjDxz.mjs} +1 -1
  126. package/dist/{matches-B0bzP6tB.mjs → matches-DMLDhZbo.mjs} +1 -1
  127. package/dist/{mcp-CSxoAB-y.mjs → mcp-Caedd-uE.mjs} +1 -1
  128. package/dist/{mesh-C-n2gi4F.mjs → mesh-jh4ALI5y.mjs} +1 -1
  129. package/dist/{migrate-CipwWhJE.mjs → migrate-BJ9Go_wP.mjs} +1 -1
  130. package/dist/{monetization-DHFiy5qs.mjs → monetization-CgujyJxp.mjs} +1 -1
  131. package/dist/{mtls-certificates-o11WJKM1.mjs → mtls-certificates-B5b1_uyW.mjs} +1 -1
  132. package/dist/{network-Ck6XHs9j.mjs → network-CC3P2gHc.mjs} +1 -1
  133. package/dist/{network-interconnects-CT4a_D5b.mjs → network-interconnects-DOJI5uxJ.mjs} +1 -1
  134. package/dist/{oauth-D6EZEBcY.mjs → oauth-BYkPua5f.mjs} +1 -1
  135. package/dist/{oauth-D9jA6L9a.mjs → oauth-DrAKiya8.mjs} +1 -1
  136. package/dist/{oauth-clients-DRBvDDNL.mjs → oauth-clients-DxU4Eo_n.mjs} +1 -1
  137. package/dist/{oauth-scopes-eV0VbNV-.mjs → oauth-scopes-CgWZFINf.mjs} +1 -1
  138. package/dist/{observability-CBCuWCen.mjs → observability-D0CSfZP3.mjs} +1 -1
  139. package/dist/{organization-3y27rtm7.mjs → organization-432YJF6t.mjs} +1 -1
  140. package/dist/{organizations-Q9QPbB-p.mjs → organizations-DDTdCDHF.mjs} +1 -1
  141. package/dist/{origin-ca-certificates-CbTgmQ2N.mjs → origin-ca-certificates-Ky57Fh6y.mjs} +1 -1
  142. package/dist/{origin-post-quantum-encryption-D5zeAJJ1.mjs → origin-post-quantum-encryption-OIFZe2l_.mjs} +1 -1
  143. package/dist/{origin-tls-client-auth-V5hB1Bwu.mjs → origin-tls-client-auth-BfbHQSxd.mjs} +1 -1
  144. package/dist/{page-rules-BYYBcKRU.mjs → page-rules-DPbQjYvh.mjs} +1 -1
  145. package/dist/{pages-CfinrrWX.mjs → pages-CPcDlbnc.mjs} +1 -1
  146. package/dist/{pay-per-crawl-C-S5WxQT.mjs → pay-per-crawl-AWBV8rpZ.mjs} +1 -1
  147. package/dist/{pay-per-use-B3gl7GQo.mjs → pay-per-use-C8ZCkTrQ.mjs} +1 -1
  148. package/dist/{pipelines-lfvTXng7.mjs → pipelines-BWGZv1kD.mjs} +2 -2
  149. package/dist/{precursor-CNm5rIPl.mjs → precursor-DX32b7mu.mjs} +1 -1
  150. package/dist/{previews-DV7OxoSM.mjs → previews-B6xfp2lU.mjs} +1 -1
  151. package/dist/{progress-BnIv4lh5.mjs → progress-BtNgm5yx.mjs} +1 -1
  152. package/dist/{prompt-DjRAo2Up.mjs → prompt-CbKaAX24.mjs} +1 -1
  153. package/dist/{queries-D0obyA9I.mjs → queries-z5ok-W9I.mjs} +1 -1
  154. package/dist/{queues-G1CS4M1H.mjs → queues-BcCod15K.mjs} +1 -1
  155. package/dist/{r2-BLXUGlGq.mjs → r2--_Gw1ru7.mjs} +1 -1
  156. package/dist/{radar-hGFsVuHs.mjs → radar-CJonQ35E.mjs} +1 -1
  157. package/dist/{raw-fetch-CuMHmrn0.mjs → raw-fetch-CAZrlsc6.mjs} +1 -1
  158. package/dist/{realtime-CZYwfmjr.mjs → realtime-4WdJ83cQ.mjs} +1 -1
  159. package/dist/{registrar-dvv2gU93.mjs → registrar-14yKfqak.mjs} +1 -1
  160. package/dist/{registrar-sandbox-Cnqn9BDJ.mjs → registrar-sandbox-D53qdGoh.mjs} +1 -1
  161. package/dist/{reporting-Bfwnpc7z.mjs → reporting-ZQmJVXcc.mjs} +1 -1
  162. package/dist/{request-headers-DaUqNccK.mjs → request-headers-B72_sA_G.mjs} +1 -1
  163. package/dist/{request-tracers-CF4_bzqx.mjs → request-tracers-DAKyy7Om.mjs} +1 -1
  164. package/dist/{resource-sharing-DaY7ISTQ.mjs → resource-sharing-BLsx1Nmo.mjs} +1 -1
  165. package/dist/{resource-tagging-D669i7sI.mjs → resource-tagging-B6EReDYx.mjs} +1 -1
  166. package/dist/{rules-C9w-8uyl.mjs → rules-CbCrIq7Y.mjs} +1 -1
  167. package/dist/{rulesets-yYRTXZ71.mjs → rulesets-CyCCWsk4.mjs} +1 -1
  168. package/dist/{rum-DPrqqYSC.mjs → rum-Cyl674km.mjs} +1 -1
  169. package/dist/{run-Duj1fsxa.mjs → run-BqAAX99Z.mjs} +1 -1
  170. package/dist/run-DZYLWyvE.mjs +2 -0
  171. package/dist/{schema-flags-CK4J4XhG.mjs → schema-flags-CpW8oSUF.mjs} +1 -1
  172. package/dist/{scim-DAZek91U.mjs → scim-Cw0LvYqJ.mjs} +1 -1
  173. package/dist/{sdk-DzVznUuv.mjs → sdk-BCzcRJCi.mjs} +1 -1
  174. package/dist/{secrets-store-COlaXNll.mjs → secrets-store-Bxn1jdZE.mjs} +1 -1
  175. package/dist/{security-insights-DF6ffEWO.mjs → security-insights-BgI7_mM3.mjs} +1 -1
  176. package/dist/{security-txt-D1nLEOCZ.mjs → security-txt-B2FOknxR.mjs} +1 -1
  177. package/dist/{shared-_YyZp2AY.mjs → shared-ZaIcKXbz.mjs} +1 -1
  178. package/dist/{smart-shield-CKSVq1sT.mjs → smart-shield-CjhSz9Ea.mjs} +1 -1
  179. package/dist/{snippets-D5zLR7Nj.mjs → snippets-CJiarnnh.mjs} +1 -1
  180. package/dist/{spawn-DiZTRMi2.mjs → spawn-B0Sl8lUu.mjs} +1 -1
  181. package/dist/{spectrum-L56rh44p.mjs → spectrum-BXIQwKUp.mjs} +1 -1
  182. package/dist/{speed-CfufTtTk.mjs → speed-B91sRfsz.mjs} +1 -1
  183. package/dist/{src-BIRFlqDR.mjs → src-DkO1fDN2.mjs} +5 -5
  184. package/dist/{ssl-BrDo1vL9.mjs → ssl-DDOj0RIi.mjs} +1 -1
  185. package/dist/{stream-1BpcnrhV.mjs → stream-BbvWFDAg.mjs} +1 -1
  186. package/dist/{submit-C-ICyQA7.mjs → submit-C11F-D4G.mjs} +1 -1
  187. package/dist/{tags-BA2CG06z.mjs → tags-CI_8DCQk.mjs} +1 -1
  188. package/dist/{telemetry-D14VqvDU.mjs → telemetry-C34WnJUm.mjs} +1 -1
  189. package/dist/telemetry-DNHEg6tE.mjs +2 -0
  190. package/dist/{tenant-DZ4dgD2t.mjs → tenant-Ddq-iTue.mjs} +1 -1
  191. package/dist/{tenant-custom-nameservers-YjOHEMtf.mjs → tenant-custom-nameservers-ClTjU8XP.mjs} +1 -1
  192. package/dist/{tunnels-l8YE_pie.mjs → tunnels-CMNU17n3.mjs} +1 -1
  193. package/dist/{turnstile-BQrUOlSx.mjs → turnstile-CR24j5Gf.mjs} +1 -1
  194. package/dist/update-check-CE0SmpBx.mjs +2 -0
  195. package/dist/{update-check-BPVQSvnH.mjs → update-check-DKJ_werM.mjs} +1 -1
  196. package/dist/update-check-worker.mjs +1 -1
  197. package/dist/{url-info-D2l_0t3y.mjs → url-info-Dz-CeD1r.mjs} +1 -1
  198. package/dist/{url-normalization-K8zAzorz.mjs → url-normalization-C695-pdG.mjs} +1 -1
  199. package/dist/{url-scanner-Dv7lSDeH.mjs → url-scanner-CtLWYlOL.mjs} +1 -1
  200. package/dist/{user-DleZBZED.mjs → user-BHgQmcY6.mjs} +1 -1
  201. package/dist/{values-BnpLZYLh.mjs → values-vERAUyO1.mjs} +1 -1
  202. package/dist/{vectorize-DyHeuA7K.mjs → vectorize-czzldF6P.mjs} +1 -1
  203. package/dist/version-Di2YJMgh.mjs +2 -0
  204. package/dist/{waiting-rooms-CKp_ty0T.mjs → waiting-rooms-CGk6Vjlo.mjs} +1 -1
  205. package/dist/{web-assets-XrKWHvN4.mjs → web-assets-C97qTerK.mjs} +1 -1
  206. package/dist/{web3-Bntbgx_4.mjs → web3-DuImSXsP.mjs} +1 -1
  207. package/dist/{workers-DM3cs8PN.mjs → workers-ClNKh7z_.mjs} +1 -1
  208. package/dist/{workers-builds-02i1psK2.mjs → workers-builds-DD_B-7Tt.mjs} +1 -1
  209. package/dist/{workers-for-platforms-B5RlZXZK.mjs → workers-for-platforms-KBtgR7F_.mjs} +1 -1
  210. package/dist/{workers-vpc-kjiAIRuT.mjs → workers-vpc-CsaJobJQ.mjs} +1 -1
  211. package/dist/{workflows-BkuFC47X.mjs → workflows-BbIvMUTv.mjs} +1 -1
  212. package/dist/{wrangler-migration-BDnS1puc.mjs → wrangler-migration-CJEb9hY3.mjs} +1 -1
  213. package/dist/{zaraz-BPOqw7RU.mjs → zaraz-D-hdVlz2.mjs} +1 -1
  214. package/dist/{zero-trust-B4sjDfre.mjs → zero-trust-DroiBnoL.mjs} +1 -1
  215. package/dist/{zone-DkaGQuB6.mjs → zone-CanTvmfK.mjs} +1 -1
  216. package/dist/{zones-DIlihhZN.mjs → zones-B3-NxJ-8.mjs} +1 -1
  217. package/package.json +1 -1
  218. package/dist/build-D5D56lvE.mjs +0 -2
  219. package/dist/discover-CcGReXr0.mjs +0 -2
  220. package/dist/error-sanitization-CSlapZbU.mjs +0 -2
  221. package/dist/generate-t4dFfFRV.mjs +0 -2
  222. package/dist/local-B5d4OPhA.mjs +0 -2
  223. package/dist/run-Dkcz54xY.mjs +0 -2
  224. package/dist/telemetry-Bn5lYtiy.mjs +0 -2
  225. package/dist/update-check-zLVAcGWy.mjs +0 -2
  226. package/dist/version-CH8K5y4G.mjs +0 -2
  227. /package/dist/{cloudflared-C4KjWoEY.mjs → cloudflared-DGuau-lC.mjs} +0 -0
  228. /package/dist/{command-WCtue6i1.mjs → command-TCklVvOY.mjs} +0 -0
  229. /package/dist/{discover-B_3A4a_t.mjs → discover-C5aiI6u0.mjs} +0 -0
  230. /package/dist/{generate-QUDsysBJ.mjs → generate-CLqGOlOx.mjs} +0 -0
  231. /package/dist/{live-a01OfPf9.mjs → live-MeJQXIei.mjs} +0 -0
  232. /package/dist/{r2-data-catalog-DpktRU5y.mjs → r2-data-catalog-2jQrdAdo.mjs} +0 -0
  233. /package/dist/{rate-limit-analytics-YsGha5pH.mjs → rate-limit-analytics-CU55zqCU.mjs} +0 -0
  234. /package/dist/{rate-limits-kH13NRdf.mjs → rate-limits-CZ-qHDPK.mjs} +0 -0
  235. /package/dist/{ready-DYun4Fpn.mjs → ready-BOpbZ1pN.mjs} +0 -0
  236. /package/dist/{recent-submissions-18NaOGOo.mjs → recent-submissions-KDqD2HyS.mjs} +0 -0
  237. /package/dist/{refute-BhMiJcE1.mjs → refute-DkF4XIMw.mjs} +0 -0
  238. /package/dist/{registry-DWTPK8_Q.mjs → registry-Cg5lP8oo.mjs} +0 -0
  239. /package/dist/{scan-logo-7y0pqFMk.mjs → scan-logo-DQkf6glG.mjs} +0 -0
  240. /package/dist/{scan-page-B6jnK3QI.mjs → scan-page-CMOJ_E0n.mjs} +0 -0
  241. /package/dist/{schema-JVvksQ1J.mjs → schema-GdBsV4P7.mjs} +0 -0
  242. /package/dist/{search-Rn3Eefv8.mjs → search-Bre1Zwn3.mjs} +0 -0
  243. /package/dist/{signed-url-Dzwy9Xiw.mjs → signed-url-24ZbX4yV.mjs} +0 -0
  244. /package/dist/{submission-info-SNhkDRRZ.mjs → submission-info-BmkbZVqM.mjs} +0 -0
  245. /package/dist/{tools-CFEubTr4.mjs → tools-BJZ0DDlL.mjs} +0 -0
  246. /package/dist/{total-queries-B20xslrH.mjs → total-queries-j8OAF_cE.mjs} +0 -0
  247. /package/dist/{tracked-domains-BCvIOZOK.mjs → tracked-domains-fe3EWYmF.mjs} +0 -0
  248. /package/dist/{verify-DOeBG4PL.mjs → verify-CKgZYvln.mjs} +0 -0
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";function c(e){return e.usage(`$0 durable-objects namespaces list
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{r}from"./auth-C_-fMmUL.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BtNgm5yx.mjs";import{t as s}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";function c(e){return e.usage(`$0 durable-objects namespaces list
3
3
 
4
4
  Returns the Durable Object namespaces owned by an account.`).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`list`,describe:`List Durable Object Namespaces`,builder:c,handler:async c=>s({command:`durable-objects namespaces list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf durable-objects namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/workers/durable_objects/namespaces`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.durableObjects.namespaces.list({account_id:u,...s})),{successLabel:`Loaded`})})};function u(e){return e.usage(`$0 durable-objects namespaces objects list
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-M2Ho8pi3.mjs";import{r as t}from"./auth-BjxUTZWb.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BnIv4lh5.mjs";import{t as a}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";function c(e){return e.usage("$0 email-auth dmarc-reports edit\n\nUpdates the DMARC report configuration for a zone. At least one of `enabled` or `skip_wizard` must be provided. When enabling, the handler will ensure the DMARC RUA record exists in DNS.").option(`enabled`,{type:`boolean`,description:`Enable or disable DMARC reports for this zone`}).option(`skip-wizard`,{type:`boolean`,description:`Skip the DMARC setup wizard`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for PATCH /dmarc-reports`})}const l={command:`edit`,describe:`Configure DMARC Reports`,builder:c,handler:async c=>a({command:`email-auth dmarc-reports edit`,classification:{safeFlags:[`enabled`,`skip-wizard`,`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf email-auth dmarc-reports edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/email/auth/dmarc-reports`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({enabled:c.enabled,skip_wizard:c[`skip-wizard`]}):o(c.body)});return}let a=await t(c),l=await e({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body);n(await i(`Updating`,async()=>a.emailAuth.dmarcReports.edit({...e,zone_id:l})),{successLabel:`Updated`});return}let u=s({enabled:c.enabled,skip_wizard:c[`skip-wizard`]});n(await i(`Updating`,async()=>a.emailAuth.dmarcReports.edit({...u,zone_id:l})),{successLabel:`Updated`})})};function u(e){return e.usage(`$0 email-auth dmarc-reports get
2
+ import{i as e}from"./context-Cibc7DIM.mjs";import{r as t}from"./auth-C_-fMmUL.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BtNgm5yx.mjs";import{t as a}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";function c(e){return e.usage("$0 email-auth dmarc-reports edit\n\nUpdates the DMARC report configuration for a zone. At least one of `enabled` or `skip_wizard` must be provided. When enabling, the handler will ensure the DMARC RUA record exists in DNS.").option(`enabled`,{type:`boolean`,description:`Enable or disable DMARC reports for this zone`}).option(`skip-wizard`,{type:`boolean`,description:`Skip the DMARC setup wizard`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for PATCH /dmarc-reports`})}const l={command:`edit`,describe:`Configure DMARC Reports`,builder:c,handler:async c=>a({command:`email-auth dmarc-reports edit`,classification:{safeFlags:[`enabled`,`skip-wizard`,`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf email-auth dmarc-reports edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/email/auth/dmarc-reports`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({enabled:c.enabled,skip_wizard:c[`skip-wizard`]}):o(c.body)});return}let a=await t(c),l=await e({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body);n(await i(`Updating`,async()=>a.emailAuth.dmarcReports.edit({...e,zone_id:l})),{successLabel:`Updated`});return}let u=s({enabled:c.enabled,skip_wizard:c[`skip-wizard`]});n(await i(`Updating`,async()=>a.emailAuth.dmarcReports.edit({...u,zone_id:l})),{successLabel:`Updated`})})};function u(e){return e.usage(`$0 email-auth dmarc-reports get
3
3
 
4
4
  Retrieves the current DMARC report configuration and status for a zone. Returns the RUA prefix, enabled status, approved sources, and DNS records.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get DMARC Report Status`,builder:u,handler:async o=>a({command:`email-auth dmarc-reports get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf email-auth dmarc-reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/email/auth/dmarc-reports`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.emailAuth.dmarcReports.get({zone_id:s})),{successLabel:`Loaded`})})},f={command:`dmarc-reports`,describe:`Operations for dmarc-reports`,builder:e=>e.command(l).command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function p(e){return e.usage(`$0 email-auth spf inspect
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,i as n,t as r}from"./context-M2Ho8pi3.mjs";import{r as i}from"./auth-BjxUTZWb.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BnIv4lh5.mjs";import{t as c}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,i as m,n as h}from"./prompt-DjRAo2Up.mjs";import{t as g}from"./cli-types-DoVT5q_M.mjs";function _(e){return e.usage(`$0 email-routing addresses create
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,i as n,t as r}from"./context-Cibc7DIM.mjs";import{r as i}from"./auth-C_-fMmUL.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BtNgm5yx.mjs";import{t as c}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,i as m,n as h}from"./prompt-CbKaAX24.mjs";import{t as g}from"./cli-types-DoVT5q_M.mjs";function _(e){return e.usage(`$0 email-routing addresses create
3
3
 
4
4
  Create a destination address to forward your emails to. Destination addresses need to be verified before they can be used.`).option(`email`,{type:`string`,description:`The contact email address of the user.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create a destination address`,builder:_,handler:async n=>c({command:`email-routing addresses create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf email-routing addresses create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/email/routing/addresses`,pathParams:{},bodyKind:`json`,body:n.body===void 0?d({email:f(n.email,`email`,`text`)}):l(n.body)});return}let c=await i(n),u=n.local?e:await r();if(n.accountId=u,n.body){let e=l(n.body);a(await s(`Creating`,async()=>c.emailRouting.addresses.create({...e,account_id:u})),{successLabel:`Created`});return}n.email===void 0&&(n.email=await p(`email`,`The contact email address of the user.`));let m=d({email:f(n.email,`email`,`text`)});a(await s(`Creating`,async()=>c.emailRouting.addresses.create({...m,account_id:u})),{successLabel:`Created`})})};function y(e){return e.usage(`$0 email-routing addresses delete <destination-address-identifier>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p,n as m}from"./prompt-DjRAo2Up.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function ee(e){return e.usage(`$0 email-security allow-policies batch
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{r}from"./auth-C_-fMmUL.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BtNgm5yx.mjs";import{t as s}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p,n as m}from"./prompt-CbKaAX24.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function ee(e){return e.usage(`$0 email-security allow-policies batch
3
3
 
4
4
  Executes multiple allow policy operations atomically: delete, partially update, replace, and create allow policies in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the allow policies to delete. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the policy's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Allow policies to create. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the policy's ID and every field of its new value. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`batch`,describe:`Batch allow policy operations`,builder:ee,handler:async d=>s({command:`email-security allow-policies batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},d,async()=>{if(d.dryRun){a({command:`cf email-security allow-policies batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/email-security/settings/allow_policies/batch`,pathParams:{},bodyKind:`json`,body:d.body===void 0?u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await n();if(d.accountId=f,!await m({force:!!d.force,message:`This operation may delete the selected allow policies and restore normal security scanning and disposition actions for matching emails.`})){process.stderr.write(`Aborted.
5
5
  `);return}if(d.body){let e=c(d.body);i(await o(`Deleting`,async()=>s.emailSecurity.allowPolicies.batch({...e,account_id:f})),{successLabel:`Deleted`});return}if(d.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(d.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(d.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(d.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)});i(await o(`Deleting`,async()=>s.emailSecurity.allowPolicies.batch({...p,account_id:f})),{successLabel:`Deleted`})})};function g(e){return e.usage(`$0 email-security allow-policies create
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,i as n,t as r}from"./context-M2Ho8pi3.mjs";import{r as i}from"./auth-BjxUTZWb.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BnIv4lh5.mjs";import{t as c}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,n as m}from"./prompt-DjRAo2Up.mjs";import{t as ee}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 email-sending get <message-id>
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,i as n,t as r}from"./context-Cibc7DIM.mjs";import{r as i}from"./auth-C_-fMmUL.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BtNgm5yx.mjs";import{t as c}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,n as m}from"./prompt-CbKaAX24.mjs";import{t as ee}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 email-sending get <message-id>
3
3
 
4
4
  Returns the raw RFC 5322 MIME message for the given account and message id.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <message-id>`,describe:`Fetch an email message`,builder:h,handler:async n=>c({command:`email-sending get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf email-sending get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/email/sending/messages/${n[`message-id`]==null?`<message-id>`:encodeURIComponent(String(n[`message-id`]))}`,pathParams:{"message-id":String(n[`message-id`]??``)},bodyKind:`none`});return}let c=await i(n),l=n.local?e:await r();n.accountId=l,a(await s(`Loading`,async()=>c.emailSending.get({account_id:l,message_id:n[`message-id`]})),{successLabel:`Loaded`})})};function _(e){return e.usage(`$0 email-sending limits get
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./sdk-DzVznUuv.mjs";import{at as t}from"./dist-BuCJ_55d.mjs";function n(e){if(typeof e!=`object`||!e)return[];let t=e.errors;return Array.isArray(t)?t.flatMap(e=>{if(typeof e!=`object`||!e)return[];let t=e.code;return typeof t==`number`&&Number.isFinite(t)?[t]:[]}):[]}function r(e){return typeof e==`number`&&Number.isInteger(e)&&e>=100&&e<=599}function i(e){try{return a(e)}catch{return{errorType:`Error`}}}function a(i){if(i instanceof e){let e=n(i.body);return{errorType:`APIError`,...r(i.statusCode)?{httpStatus:i.statusCode}:{},...e.length===0?{}:{errorCodes:e}}}return i instanceof t?{errorType:`APIError`,...r(i.status)?{httpStatus:i.status}:{},...typeof i.code==`number`&&Number.isFinite(i.code)?{errorCodes:[i.code]}:{}}:i instanceof Error?{errorType:`Error`}:{errorType:typeof i}}export{i as t};
2
+ import{r as e}from"./sdk-BCzcRJCi.mjs";import{at as t}from"./dist-BuCJ_55d.mjs";function n(e){if(typeof e!=`object`||!e)return[];let t=e.errors;return Array.isArray(t)?t.flatMap(e=>{if(typeof e!=`object`||!e)return[];let t=e.code;return typeof t==`number`&&Number.isFinite(t)?[t]:[]}):[]}function r(e){return typeof e==`number`&&Number.isInteger(e)&&e>=100&&e<=599}function i(e){try{return a(e)}catch{return{errorType:`Error`}}}function a(i){if(i instanceof e){let e=n(i.body);return{errorType:`APIError`,...r(i.statusCode)?{httpStatus:i.statusCode}:{},...e.length===0?{}:{errorCodes:e}}}return i instanceof t?{errorType:`APIError`,...r(i.status)?{httpStatus:i.status}:{},...typeof i.code==`number`&&Number.isFinite(i.code)?{errorCodes:[i.code]}:{}}:i instanceof Error?{errorType:`Error`}:{errorType:typeof i}}export{i as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./error-sanitization-CJ5OLJrh.mjs";export{e as sanitizeError};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./prompt-DjRAo2Up.mjs";function f(e){return e.usage(`$0 fieldExtractors delete <extractor>
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{r}from"./auth-C_-fMmUL.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BtNgm5yx.mjs";import{t as s}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./prompt-CbKaAX24.mjs";function f(e){return e.usage(`$0 fieldExtractors delete <extractor>
3
3
 
4
4
  Deletes all custom extraction rules for an extractor type.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,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 p={command:`delete <extractor>`,describe:`Delete Field Extractor`,builder:f,handler:async c=>s({command:`fieldExtractors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf fieldExtractors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/field_extractors/${c.extractor==null?`<extractor>`:encodeURIComponent(String(c.extractor))}`,pathParams:{extractor:String(c.extractor??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await d({force:!!c.force})){process.stderr.write(`Aborted.
5
5
  `);return}i(await o(`Deleting`,async()=>s.fieldExtractors.delete({account_id:l,extractor:c.extractor})),{successLabel:`Deleted`})})};function m(e){return e.usage(`$0 fieldExtractors get <extractor>
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,i as n,t as r}from"./context-M2Ho8pi3.mjs";import{r as i}from"./auth-BjxUTZWb.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BnIv4lh5.mjs";import{t as c}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{n as p}from"./prompt-DjRAo2Up.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 firewall access-rules create
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,i as n,t as r}from"./context-Cibc7DIM.mjs";import{r as i}from"./auth-C_-fMmUL.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BtNgm5yx.mjs";import{t as c}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{n as p}from"./prompt-CbKaAX24.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 firewall access-rules create
3
3
 
4
4
  Creates a new IP Access rule for an account or zone. The rule will apply to all zones in the account or zone. Note: To create an IP Access rule that applies to a single zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create an IP Access rule`,builder:h,handler:async u=>c({command:`firewall access-rules create`,classification:{safeFlags:[`configuration-target`,`dry-run`]}},u,async()=>{if(u.dryRun){let e=u.zone===void 0?await t():void 0,n=u.zone===void 0?`accounts`:`zones`,r=u.zone??e??`<account-id>`;o({command:`cf firewall access-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:u.body===void 0?d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)}}):l(u.body)});return}let c=await i(u),p=u.zone===void 0?`accounts`:`zones`,m=p===`zones`?await n({zone:u.zone},c,{quiet:u.quiet}):u.local?e:await r();if(p===`zones`?u.zoneId=m:u.accountId=m,u.body){let e=l(u.body);a(await s(`Creating`,async()=>c.firewall.accessRules.create({...e,account_or_zone:p,account_or_zone_id:m})),{successLabel:`Created`});return}let h=d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)}});a(await s(`Creating`,async()=>c.firewall.accessRules.create({...h,account_or_zone:p,account_or_zone_id:m})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 firewall access-rules delete <rule-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{a as r,r as i}from"./auth-BjxUTZWb.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BnIv4lh5.mjs";import{t as c}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,n as m}from"./prompt-DjRAo2Up.mjs";function h(e){return e.usage(`$0 flagship apps create
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{a as r,r as i}from"./auth-C_-fMmUL.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BtNgm5yx.mjs";import{t as c}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,n as m}from"./prompt-CbKaAX24.mjs";function h(e){return e.usage(`$0 flagship apps create
3
3
 
4
4
  Creates an app. The returned \`id\` is used in all subsequent flag, changelog, and evaluation requests.`).option(`name`,{type:`string`,description:`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create app`,builder:h,handler:async r=>c({command:`flagship apps create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({name:f(r.name,`name`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await n();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.flagship.apps.create({...e,account_id:u})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await p(`name`,`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`));let m=d({name:f(r.name,`name`,`text`)});a(await s(`Creating`,async()=>c.flagship.apps.create({...m,account_id:u})),{successLabel:`Created`})})};function _(e){return e.usage("$0 flagship apps definitions get <app-id>\n\nReturns an app's evaluation-only flag definitions for SDKs that evaluate locally. Send the returned `ETag` in `If-None-Match` to avoid downloading unchanged definitions.").positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`if-none-match`,{type:`string`,description:"Previously returned ETag, or `*`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <app-id>`,describe:`Get flag definitions`,builder:_,handler:async l=>c({command:`flagship apps definitions get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`if-none-match`]!==void 0&&(c[`If-None-Match`]=String(l[`if-none-match`])),l.dryRun){o({command:`cf flagship apps definitions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/flagship/apps/${l[`app-id`]==null?`<app-id>`:encodeURIComponent(String(l[`app-id`]))}/definitions`,pathParams:{"app-id":String(l[`app-id`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();l.accountId=d,a(await s(`Loading`,async()=>r(u,`GET`,`/accounts/${d}/flagship/apps/${encodeURIComponent(String(l[`app-id`]))}/definitions`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Loaded`})})},y={command:`definitions`,describe:`Operations for apps.definitions`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 flagship apps delete <app-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-M2Ho8pi3.mjs";import{r as t}from"./auth-BjxUTZWb.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BnIv4lh5.mjs";import{t as a}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";function l(e){return e.usage(`$0 fraud get
2
+ import{i as e}from"./context-Cibc7DIM.mjs";import{r as t}from"./auth-C_-fMmUL.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BtNgm5yx.mjs";import{t as a}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";function l(e){return e.usage(`$0 fraud get
3
3
 
4
4
  Retrieve Fraud Detection settings for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`Get Fraud Detection Settings`,builder:l,handler:async o=>a({command:`fraud get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf fraud get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/fraud_detection/settings`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.fraud.get({zone_id:s})),{successLabel:`Loaded`})})};function d(e){return e.usage("$0 fraud update\n\nUpdate Fraud Detection settings for a zone. Notes on `username_expressions` behavior: - If omitted or set to null, expressions are not modified. - If provided as an empty array `[]`, all expressions will be cleared.").option(`authentication-settings-failure-criteria-kind`,{type:`string`,description:"The type of criterion. Currently only `status_code` is supported.",choices:[`status_code`]}).option(`authentication-settings-failure-criteria-status-codes`,{type:`string`,array:!0,description:`HTTP status codes to match against the origin response.
5
5
  - Maximum of 10 codes per criterion.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{n as e}from"./generate-CLqGOlOx.mjs";export{e as generateWorkerTypes};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-M2Ho8pi3.mjs";import{r as t}from"./auth-BjxUTZWb.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BnIv4lh5.mjs";import{t as a}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{a as l}from"./prompt-DjRAo2Up.mjs";function u(e){return e.usage(`$0 google-tag-gateway config get
2
+ import{i as e}from"./context-Cibc7DIM.mjs";import{r as t}from"./auth-C_-fMmUL.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BtNgm5yx.mjs";import{t as a}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{a as l}from"./prompt-CbKaAX24.mjs";function u(e){return e.usage(`$0 google-tag-gateway config get
3
3
 
4
4
  Gets the Google Tag Gateway configuration for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get Google Tag Gateway configuration`,builder:u,handler:async o=>a({command:`google-tag-gateway config get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf google-tag-gateway config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/google-tag-gateway/config`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.googleTagGateway.config.get({zone_id:s})),{successLabel:`Loaded`})})};function f(e){return e.usage(`$0 google-tag-gateway config update
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-M2Ho8pi3.mjs";import{r as t}from"./auth-BjxUTZWb.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BnIv4lh5.mjs";import{t as a}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{a as l,n as u}from"./prompt-DjRAo2Up.mjs";function d(e){return e.usage(`$0 healthchecks create
2
+ import{i as e}from"./context-Cibc7DIM.mjs";import{r as t}from"./auth-C_-fMmUL.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BtNgm5yx.mjs";import{t as a}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{a as l,n as u}from"./prompt-CbKaAX24.mjs";function d(e){return e.usage(`$0 healthchecks create
3
3
 
4
4
  Create a new health check.`).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`,default:1}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`,default:1}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).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 f={command:`create`,describe:`Create Health Check`,builder:d,handler:async u=>a({command:`healthchecks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Creating`,async()=>a.healthchecks.create({body:e,zone_id:d})),{successLabel:`Created`});return}u.address===void 0&&(u.address=await l(`address`,`The hostname or IP address of the origin server to run health checks on.`)),u.name===void 0&&(u.name=await l(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)});n(await i(`Creating`,async()=>a.healthchecks.create({body:f,zone_id:d})),{successLabel:`Created`})})};function p(e){return e.usage(`$0 healthchecks delete <healthcheck-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-M2Ho8pi3.mjs";import{a as t,r as n}from"./auth-BjxUTZWb.mjs";import{t as r}from"./output-CvQFJkvi.mjs";import{t as i}from"./dry-run-Bq0JAsbX.mjs";import{t as a}from"./progress-BnIv4lh5.mjs";import{t as o}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./prompt-DjRAo2Up.mjs";function l(e){return e.usage(`$0 hostnames settings tls-single get <hostname>
2
+ import{i as e}from"./context-Cibc7DIM.mjs";import{a as t,r as n}from"./auth-C_-fMmUL.mjs";import{t as r}from"./output-CvQFJkvi.mjs";import{t as i}from"./dry-run-Bq0JAsbX.mjs";import{t as a}from"./progress-BtNgm5yx.mjs";import{t as o}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./prompt-CbKaAX24.mjs";function l(e){return e.usage(`$0 hostnames settings tls-single get <hostname>
3
3
 
4
4
  Get the requested TLS setting for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get <hostname>`,describe:`Get TLS setting for hostname`,builder:l,handler:async t=>o({command:`hostnames settings tls-single get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf hostnames settings tls-single get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/hostnames/settings/${t[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(t[`setting-id`]))}/${t.hostname==null?`<hostname>`:encodeURIComponent(String(t.hostname))}`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),"setting-id":String(t[`setting-id`]??``),hostname:String(t.hostname??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});t.zoneId=s,r(await a(`Loading`,async()=>o.hostnames.settings.tlsSingle.get({zone_id:s,setting_id:t[`setting-id`],hostname:t.hostname})),{successLabel:`Loaded`})})},d={command:`tls-single`,describe:`Operations for settings.tls-single`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function f(e){return e.usage(`$0 hostnames settings tls delete <hostname>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,i as f,n as p}from"./prompt-DjRAo2Up.mjs";function m(e){return e.usage(`$0 hyperdrive create
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{r}from"./auth-C_-fMmUL.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BtNgm5yx.mjs";import{t as s}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,i as f,n as p}from"./prompt-CbKaAX24.mjs";function m(e){return e.usage(`$0 hyperdrive create
3
3
 
4
4
  Creates and returns a new Hyperdrive configuration. For a PlanetScale integration, the Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard.`).option(`mtls-ca-certificate-id`,{type:`string`,description:`Define CA certificate ID obtained after uploading CA cert.`}).option(`mtls-certificate-id`,{type:`string`,description:`Define mTLS certificate ID obtained after uploading client cert.`}).option(`mtls-sslmode`,{type:`string`,description:"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.",choices:[`require`,`verify-ca`,`verify-full`,`REQUIRED`,`VERIFY_CA`,`VERIFY_IDENTITY`]}).option(`name`,{type:`string`,description:`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`}).option(`origin-connection-limit`,{type:`number`,description:`The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,n as p}from"./prompt-DjRAo2Up.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 iam permission-groups get <permission-group-id>
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{r}from"./auth-C_-fMmUL.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BtNgm5yx.mjs";import{t as s}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,n as p}from"./prompt-CbKaAX24.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 iam permission-groups get <permission-group-id>
3
3
 
4
4
  Get information about a specific permission group in an account.`).positional(`permission-group-id`,{type:`string`,description:`Permission Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <permission-group-id>`,describe:`Permission Group Details`,builder:h,handler:async c=>s({command:`iam permission-groups get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf iam permission-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/iam/permission_groups/${c[`permission-group-id`]==null?`<permission-group-id>`:encodeURIComponent(String(c[`permission-group-id`]))}`,pathParams:{"permission-group-id":String(c[`permission-group-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.iam.permissionGroups.get({account_id:l,permission_group_id:c[`permission-group-id`]})),{successLabel:`Loaded`})})};function g(e){return e.usage(`$0 iam permission-groups list
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,i as n,t as r}from"./context-M2Ho8pi3.mjs";import{a as i,r as a}from"./auth-BjxUTZWb.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-BnIv4lh5.mjs";import{t as l}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p,t as m}from"./input-validation-Dk52b0me.mjs";import{a as h,i as g,n as _}from"./prompt-DjRAo2Up.mjs";import{t as ee}from"./cli-types-DoVT5q_M.mjs";import{n as te,t as v}from"./raw-fetch-CuMHmrn0.mjs";function y(e){return e.usage(`$0 images create
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,i as n,t as r}from"./context-Cibc7DIM.mjs";import{a as i,r as a}from"./auth-C_-fMmUL.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-BtNgm5yx.mjs";import{t as l}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p,t as m}from"./input-validation-Dk52b0me.mjs";import{a as h,i as g,n as _}from"./prompt-CbKaAX24.mjs";import{t as ee}from"./cli-types-DoVT5q_M.mjs";import{n as te,t as v}from"./raw-fetch-CAZrlsc6.mjs";function y(e){return e.usage(`$0 images create
3
3
 
4
4
  Upload an image to CF Images. Images up to 10 Megabytes can be uploaded using a single HTTP POST (multipart/form-data) request by sending an image file or passing a URL accessible to the API.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`id`,{type:`string`,description:`An optional custom unique identifier for your image.`}).option(`metadata`,{type:`string`,description:`User modifiable key-value store. Can use used for keeping references to another system of record for managing images.`}).option(`require-signed-urls`,{type:`boolean`,description:`Indicates whether the image requires a signature token for the access.`}).option(`url`,{type:`string`,description:`A URL to fetch an image from origin. Only needed when type is uploading from a URL.`})}const b={command:`create`,describe:`Upload an image`,builder:y,handler:async n=>l({command:`images create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf images create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/images/v1`,pathParams:{},bodyKind:`multipart`,body:{body:n.body,file:n.file,creator:n.creator,id:n.id,metadata:n.metadata,"require-signed-urls":n[`require-signed-urls`],url:n.url}});return}let l=await a(n),u=n.local?e:await r();if(n.accountId=u,n.file!==void 0||n.body!==void 0||n.creator!==void 0||n.id!==void 0||n.metadata!==void 0||n[`require-signed-urls`]!==void 0||n.url!==void 0){let e=new FormData;if(n.file){let t=m(n.file);e.append(`file`,new Blob([t]),n.file.split(/[\\/]/).filter(Boolean).pop())}else n.body!==void 0&&e.append(`file`,n.body);if(n.creator!==void 0&&e.append(`creator`,String(p(n.creator,`creator`,`text`)??``)),n.id!==void 0&&e.append(`id`,String(p(n.id,`id`,`text`)??``)),n.metadata!==void 0){let t=typeof n.metadata==`string`?p(n.metadata,`metadata`,`text`):n.metadata;e.append(`metadata`,typeof t==`string`?t:JSON.stringify(t))}n[`require-signed-urls`]!==void 0&&e.append(`requireSignedURLs`,String(n[`require-signed-urls`])),n.url!==void 0&&e.append(`url`,String(p(n.url,`url`,`text`)??``)),o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/images/v1`,{body:e})),{successLabel:`Created`});return}if(n.body){let e=p(n.body,`body`,`binary`);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/images/v1`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}o(await c(`Creating`,async()=>l.images.create({account_id:u})),{successLabel:`Created`})})};function x(e){return e.usage(`$0 images delete <image-id>
5
5
 
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,r as t,t as n}from"./src-BIRFlqDR.mjs";import{t as r}from"./cli-exit-Dqoo6Jgb.mjs";export{r as CliExit,n as buildCli,e as main,t as runMain};
2
+ import{n as e,r as t,t as n}from"./src-DkO1fDN2.mjs";import{t as r}from"./cli-exit-Dqoo6Jgb.mjs";export{r as CliExit,n as buildCli,e as main,t as runMain};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./src-BIRFlqDR.mjs";import{r as e}from"./theme-BIWQFmZ0.mjs";import{t}from"./cli-exit-Dqoo6Jgb.mjs";import{R as n,n as r}from"./dist-BuCJ_55d.mjs";import{n as i}from"./version-CH8K5y4G.mjs";import{n as a}from"./delegate-B6LetRpZ.mjs";import"./ui-BQxRjahW.mjs";import{t as o}from"./project-settings-DO6njFg_.mjs";import{n as s}from"./dist-DW47TUGh.mjs";import{t as c}from"./progress-BnIv4lh5.mjs";import{n as l}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as u,r as d}from"./dialog-BlUXJKbA.mjs";import{i as f,n as p,t as m}from"./autoconfig-DXXV-Xyz.mjs";import{basename as h,dirname as g,isAbsolute as _,join as v,relative as y,resolve as b}from"node:path";import{mkdir as x,readdir as S,stat as C,writeFile as w}from"node:fs/promises";const T={"@cloudflare/vite-plugin":`beta`,typescript:`^7.0.2`,vite:`^8.3.0`};function ee(e){return{".gitignore":M(),"cloudflare.config.ts":D(e),"package.json":A(e),"src/index.ts":k(),"tsconfig.json":j(),"vite.config.ts":O()}}function E(e){return/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(e)?`^${e}`:`latest`}function D(e){return`import { bindings, defineConfig } from "cf/config";
2
+ import"./src-DkO1fDN2.mjs";import{r as e}from"./theme-BIWQFmZ0.mjs";import{t}from"./cli-exit-Dqoo6Jgb.mjs";import{R as n,n as r}from"./dist-BuCJ_55d.mjs";import{n as i}from"./version-Di2YJMgh.mjs";import{n as a}from"./delegate-B6LetRpZ.mjs";import"./ui-BQxRjahW.mjs";import{t as o}from"./project-settings-DO6njFg_.mjs";import{n as s}from"./dist-DW47TUGh.mjs";import{t as c}from"./progress-BtNgm5yx.mjs";import{n as l}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as u,r as d}from"./dialog-BlUXJKbA.mjs";import{i as f,n as p,t as m}from"./autoconfig-DPUztTL2.mjs";import{basename as h,dirname as g,isAbsolute as _,join as v,relative as y,resolve as b}from"node:path";import{mkdir as x,readdir as S,stat as C,writeFile as w}from"node:fs/promises";const T={"@cloudflare/vite-plugin":`beta`,typescript:`^7.0.2`,vite:`^8.3.0`};function ee(e){return{".gitignore":M(),"cloudflare.config.ts":D(e),"package.json":A(e),"src/index.ts":k(),"tsconfig.json":j(),"vite.config.ts":O()}}function E(e){return/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(e)?`^${e}`:`latest`}function D(e){return`import { bindings, defineConfig } from "cf/config";
3
3
  import * as entrypoint from "./src/index.ts" with { type: "cf-worker" };
4
4
 
5
5
  export default defineConfig({
@@ -35,5 +35,5 @@ dist/
35
35
  !.env.example
36
36
  *.log
37
37
  .DS_Store
38
- `}const N=[`npm`,`pnpm`,`yarn`,`bun`],P=[`install`,`package-manager`],F=new Set([`.git`]);function I(e){return e.positional(`directory`,{type:`string`,describe:`Directory to initialize; created when missing (prompts when omitted; use . for the current directory)`}).option(`install`,{type:`boolean`,default:!0,describe:`Install dependencies after creating a new project (use --no-install to skip)`}).option(`package-manager`,{type:`string`,choices:N,describe:`Package manager for a new project (prompts when interactive)`})}async function L(e){let t=b(e.directory??await R());if(await H(t)===`not-empty`){await K(t,e);return}await U(t,e)}async function R(){return(await u(`Which directory do you want to initialize?`,{defaultValue:`.`,placeholder:`. (the current directory)`,fallbackError:`Pass the directory to initialize, for example ${e.code(`cf init my-worker`)}, or ${e.code(`cf init .`)} for the current directory.`})).trim()||`.`}function z(e){return{directory:e.directory,install:e.install??!0,packageManager:V(e.packageManager),mode:e.mode}}function B(e=process.env.npm_config_user_agent){return V(e?.split(`/`,1)[0])}function V(e){return N.find(t=>t===e)}async function H(e){let t;try{t=(await C(e)).isDirectory()}catch(e){if(te(e)&&e.code===`ENOENT`)return`missing`;throw e}if(!t)throw Error(`Cannot initialize ${Z(e)} because it is not a directory.`);return(await S(e)).every(e=>F.has(e))?`empty`:`not-empty`}async function U(a,o){s.info(`Creating a new Worker in ${e.bold(a)}`,{spacing:0});let c=await G(o),l=n(h(a).toLowerCase().replace(/\s+/g,`-`)).replace(/-+$/,``),u=ee({name:l,compatibilityDate:r,cfVersion:i});for(let[e,t]of Object.entries(u)){let n=v(a,e);await x(g(n),{recursive:!0}),await w(n,t,{flag:`wx`})}if(s.success(`Created the ${e.bold(l)} Worker in ${Z(a)}`,{spacing:0}),o.install){let n=`${c} install`,r=await f(n,a);if(r.exitCode!==0||r.signal)throw s.error(`Dependency installation failed. Run ${e.code(n)} in ${Z(a)} to try again.`,{spacing:0}),new t(r.exitCode,{signal:r.signal});await W(a,o.mode)}Y(a,[...o.install?[]:[{command:`${c} install`,description:`Install dependencies`}],...J()])}async function W(t,n){try{let{generateWorkerTypes:e}=await import(`./generate-t4dFfFRV.mjs`),r=await c(`Generating types`,()=>e({configPath:v(t,o),mode:n,includeRuntime:!0}));s.success(`Generated types in ${Z(r)}`,{spacing:0})}catch(n){let r=n instanceof Error?n.message:String(n);s.warn(`Could not generate types: ${r}\nRun ${e.code(`${q()} workers types`)} in ${Z(t)} to try again.`,{spacing:0})}}async function G(e){if(e.packageManager)return e.packageManager;let t=B()??`npm`;return e.install?d(`Which package manager do you want to use?`,{choices:N.map(e=>({title:e,value:e})),defaultOption:N.indexOf(t)}):t}async function K(t,n){let r=Z(t);s.info(`Setting up the existing project in ${e.bold(t)}`,{spacing:0}),(!n.install||n.packageManager)&&s.warn(`${e.code(`--no-install`)} and ${e.code(`--package-manager`)} only apply when creating a new project. Setting up an existing project uses its own package manager.`,{spacing:0});let i=process.cwd();process.chdir(t);let a=!1;try{let n=await m(t);if(!n)throw Error(`cf could not detect a project to set up in ${r}, and the directory is not empty.\nRun ${e.code(`cf init`)} in an empty directory, or pass a new directory name (for example, ${e.code(`cf init my-worker`)}).`);a=n.configured,a||await p(n)}finally{process.chdir(i)}a?s.info(`Found an existing Cloudflare configuration in ${r}.`,{spacing:0}):s.success(`Set up ${r} for Cloudflare.`,{spacing:0}),Y(t,J())}function q(){return a()?`npx cf`:`cf`}function J(){let e=q();return[{command:`${e} dev`,description:`Start a local development server`},{command:`${e} deploy`,description:`Deploy to Cloudflare`}]}function Y(t,n){let r=[...X(t).map(e=>({command:e})),...n],i=Math.max(...r.filter(e=>e.description).map(e=>e.command.length)),a=r.map(({command:t,description:n})=>n?` ${e.code(t)}${` `.repeat(i-t.length+2)}${e.muted(n)}`:` ${e.code(t)}`);s.message([e.bold(`Next steps`),...a].join(`
38
+ `}const N=[`npm`,`pnpm`,`yarn`,`bun`],P=[`install`,`package-manager`],F=new Set([`.git`]);function I(e){return e.positional(`directory`,{type:`string`,describe:`Directory to initialize; created when missing (prompts when omitted; use . for the current directory)`}).option(`install`,{type:`boolean`,default:!0,describe:`Install dependencies after creating a new project (use --no-install to skip)`}).option(`package-manager`,{type:`string`,choices:N,describe:`Package manager for a new project (prompts when interactive)`})}async function L(e){let t=b(e.directory??await R());if(await H(t)===`not-empty`){await K(t,e);return}await U(t,e)}async function R(){return(await u(`Which directory do you want to initialize?`,{defaultValue:`.`,placeholder:`. (the current directory)`,fallbackError:`Pass the directory to initialize, for example ${e.code(`cf init my-worker`)}, or ${e.code(`cf init .`)} for the current directory.`})).trim()||`.`}function z(e){return{directory:e.directory,install:e.install??!0,packageManager:V(e.packageManager),mode:e.mode}}function B(e=process.env.npm_config_user_agent){return V(e?.split(`/`,1)[0])}function V(e){return N.find(t=>t===e)}async function H(e){let t;try{t=(await C(e)).isDirectory()}catch(e){if(te(e)&&e.code===`ENOENT`)return`missing`;throw e}if(!t)throw Error(`Cannot initialize ${Z(e)} because it is not a directory.`);return(await S(e)).every(e=>F.has(e))?`empty`:`not-empty`}async function U(a,o){s.info(`Creating a new Worker in ${e.bold(a)}`,{spacing:0});let c=await G(o),l=n(h(a).toLowerCase().replace(/\s+/g,`-`)).replace(/-+$/,``),u=ee({name:l,compatibilityDate:r,cfVersion:i});for(let[e,t]of Object.entries(u)){let n=v(a,e);await x(g(n),{recursive:!0}),await w(n,t,{flag:`wx`})}if(s.success(`Created the ${e.bold(l)} Worker in ${Z(a)}`,{spacing:0}),o.install){let n=`${c} install`,r=await f(n,a);if(r.exitCode!==0||r.signal)throw s.error(`Dependency installation failed. Run ${e.code(n)} in ${Z(a)} to try again.`,{spacing:0}),new t(r.exitCode,{signal:r.signal});await W(a,o.mode)}Y(a,[...o.install?[]:[{command:`${c} install`,description:`Install dependencies`}],...J()])}async function W(t,n){try{let{generateWorkerTypes:e}=await import(`./generate-BPqoDbck.mjs`),r=await c(`Generating types`,()=>e({configPath:v(t,o),mode:n,includeRuntime:!0}));s.success(`Generated types in ${Z(r)}`,{spacing:0})}catch(n){let r=n instanceof Error?n.message:String(n);s.warn(`Could not generate types: ${r}\nRun ${e.code(`${q()} workers types`)} in ${Z(t)} to try again.`,{spacing:0})}}async function G(e){if(e.packageManager)return e.packageManager;let t=B()??`npm`;return e.install?d(`Which package manager do you want to use?`,{choices:N.map(e=>({title:e,value:e})),defaultOption:N.indexOf(t)}):t}async function K(t,n){let r=Z(t);s.info(`Setting up the existing project in ${e.bold(t)}`,{spacing:0}),(!n.install||n.packageManager)&&s.warn(`${e.code(`--no-install`)} and ${e.code(`--package-manager`)} only apply when creating a new project. Setting up an existing project uses its own package manager.`,{spacing:0});let i=process.cwd();process.chdir(t);let a=!1;try{let n=await m(t);if(!n)throw Error(`cf could not detect a project to set up in ${r}, and the directory is not empty.\nRun ${e.code(`cf init`)} in an empty directory, or pass a new directory name (for example, ${e.code(`cf init my-worker`)}).`);a=n.configured,a||await p(n)}finally{process.chdir(i)}a?s.info(`Found an existing Cloudflare configuration in ${r}.`,{spacing:0}):s.success(`Set up ${r} for Cloudflare.`,{spacing:0}),Y(t,J())}function q(){return a()?`npx cf`:`cf`}function J(){let e=q();return[{command:`${e} dev`,description:`Start a local development server`},{command:`${e} deploy`,description:`Deploy to Cloudflare`}]}function Y(t,n){let r=[...X(t).map(e=>({command:e})),...n],i=Math.max(...r.filter(e=>e.description).map(e=>e.command.length)),a=r.map(({command:t,description:n})=>n?` ${e.code(t)}${` `.repeat(i-t.length+2)}${e.muted(n)}`:` ${e.code(t)}`);s.message([e.bold(`Next steps`),...a].join(`
39
39
  `),{symbol:e.muted(`├`)})}function X(e){let t=y(process.cwd(),e);if(t===``)return[];let n=Q(t)?e:t;return[`cd ${/\s/.test(n)?JSON.stringify(n):n}`]}function Z(e){let t=y(process.cwd(),e);return t===``?`the current directory`:Q(t)?e:t}function Q(e){return e.startsWith(`..`)||_(e)}function te(e){return e instanceof Error&&`code`in e}const $={command:`workers [directory]`,describe:`Create a new Workers project or set up an existing one`,builder:I,handler:async e=>{await L(z(e))}},ne={command:`init [directory]`,describe:`Create a new Cloudflare project or set up an existing one`,builder:e=>I(e).command(l({...$,describe:`${$.describe} [default]`},{command:`init workers`,classification:{safeFlags:P}})).epilogue(`Running cf init without a subcommand runs cf init workers. An empty directory, or one containing only .git, receives a new hello-world Worker. A directory with other files is set up with autoconfig instead. When no directory is given, cf asks for one; non-interactive runs must pass it. Use ./workers to initialize a directory named workers.`),handler:async e=>{await L(z(e))}};export{ne as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,i as n,t as r}from"./context-M2Ho8pi3.mjs";import{a as i,r as a}from"./auth-BjxUTZWb.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-BnIv4lh5.mjs";import{t as l}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f,t as p}from"./input-validation-Dk52b0me.mjs";import{a as m,n as h}from"./prompt-DjRAo2Up.mjs";import{t as g}from"./cli-types-DoVT5q_M.mjs";import{n as ee,t as te}from"./raw-fetch-CuMHmrn0.mjs";function _(e){return e.usage(`$0 intel asn get <asn>
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,i as n,t as r}from"./context-Cibc7DIM.mjs";import{a as i,r as a}from"./auth-C_-fMmUL.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-BtNgm5yx.mjs";import{t as l}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f,t as p}from"./input-validation-Dk52b0me.mjs";import{a as m,n as h}from"./prompt-CbKaAX24.mjs";import{t as g}from"./cli-types-DoVT5q_M.mjs";import{n as ee,t as te}from"./raw-fetch-CAZrlsc6.mjs";function _(e){return e.usage(`$0 intel asn get <asn>
3
3
 
4
4
  Gets an overview of the Autonomous System Number (ASN) and a list of subnets for it.`).positional(`asn`,{type:`string`,description:`Asn`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <asn>`,describe:`Get ASN Overview.`,builder:_,handler:async n=>l({command:`intel asn get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf intel asn get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/intel/asn/${n.asn==null?`<asn>`:encodeURIComponent(String(n.asn))}`,pathParams:{asn:String(n.asn??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.intel.asn.get({account_id:l,asn:n.asn})),{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 intel asn subnets get <asn>
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./auth-BjxUTZWb.mjs";import{t}from"./output-CvQFJkvi.mjs";import{t as n}from"./dry-run-Bq0JAsbX.mjs";import{t as r}from"./progress-BnIv4lh5.mjs";import{t as i}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";function a(e){return e.usage(`$0 ips list
2
+ import{r as e}from"./auth-C_-fMmUL.mjs";import{t}from"./output-CvQFJkvi.mjs";import{t as n}from"./dry-run-Bq0JAsbX.mjs";import{t as r}from"./progress-BtNgm5yx.mjs";import{t as i}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";function a(e){return e.usage(`$0 ips list
3
3
 
4
4
  Get IPs used on the Cloudflare/JD Cloud network, see https://www.cloudflare.com/ips for Cloudflare IPs or https://developers.cloudflare.com/china-network/reference/infrastructure/ for JD Cloud IPs.`).option(`networks`,{type:`string`,description:"Specified as `jdcloud` to list IPs used by JD Cloud data centers."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const o={command:`list`,describe:`Cloudflare/JD Cloud IP Details`,builder:a,handler:async a=>i({command:`ips list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={networks:a.networks};if(a.dryRun){n({command:`cf ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/ips`,pathParams:{},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.ips.list(i)),{successLabel:`Loaded`})})},s={command:`ips`,describe:`ips`,builder:e=>e.command(o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{s as default};
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{r}from"./auth-C_-fMmUL.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BtNgm5yx.mjs";import{t as s}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,n as f}from"./prompt-CbKaAX24.mjs";function p(e){return e.usage(`$0 k2 streams create
3
+
4
+ Create a new K2 stream.`).option(`http-enabled`,{type:`boolean`,description:`Indicates whether the HTTP endpoint accepts records.`}).option(`http-authentication`,{type:`boolean`,description:`Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false or omitted, the endpoint accepts unauthenticated records.`,default:!1}).option(`name`,{type:`string`,description:`Specifies the name of the K2 stream.`}).option(`retention-seconds`,{type:`number`,description:`Sets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive.`,default:604800}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates whether Workers bindings can produce records to the stream.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`worker-binding-enabled`].some(t=>e[t]!==void 0)){let t=[`worker-binding-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --worker_binding-* flag is set`)}return!0})}const m={command:`create`,describe:`Create K2 stream`,builder:p,handler:async f=>s({command:`k2 streams create`,classification:{safeFlags:[`http-enabled`,`http-authentication`,`worker-binding-enabled`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf k2 streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/k2/streams`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({http:{enabled:f[`http-enabled`],authentication:f[`http-authentication`]},name:u(f.name,`name`,`text`),retention_seconds:f[`retention-seconds`],worker_binding:{enabled:f[`worker-binding-enabled`]}}):c(f.body)});return}let s=await r(f),p=f.local?e:await n();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.k2.streams.create({...e,account_id:p})),{successLabel:`Created`});return}if(f[`http-enabled`]===void 0)throw Error(`--http-enabled is required (or pass --body with this field set).`);f.name===void 0&&(f.name=await d(`name`,`Specifies the name of the K2 stream.`));let m=l({http:{enabled:f[`http-enabled`],authentication:f[`http-authentication`]},name:u(f.name,`name`,`text`),retention_seconds:f[`retention-seconds`],worker_binding:{enabled:f[`worker-binding-enabled`]}});i(await o(`Creating`,async()=>s.k2.streams.create({...m,account_id:p})),{successLabel:`Created`})})};function h(e){return e.usage(`$0 k2 streams delete <stream-id>
5
+
6
+ Delete a K2 stream in an account. Deleting a stream that does not exist also succeeds.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <stream-id>`,describe:`Delete K2 stream`,builder:h,handler:async c=>s({command:`k2 streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf k2 streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/k2/streams/${c[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(c[`stream-id`]))}`,pathParams:{"stream-id":String(c[`stream-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
7
+ `);return}i(await o(`Deleting`,async()=>s.k2.streams.delete({account_id:l,stream_id:c[`stream-id`]})),{successLabel:`Deleted`})})};function _(e){return e.usage(`$0 k2 streams get <stream-id>
8
+
9
+ Get K2 stream details.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <stream-id>`,describe:`Get K2 stream`,builder:_,handler:async c=>s({command:`k2 streams get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf k2 streams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/k2/streams/${c[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(c[`stream-id`]))}`,pathParams:{"stream-id":String(c[`stream-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.k2.streams.get({account_id:l,stream_id:c[`stream-id`]})),{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 k2 streams list
10
+
11
+ List or filter K2 streams in an account.`).option(`name`,{type:`string`,description:`Filters K2 streams by name using a case-insensitive substring.`}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`List K2 streams`,builder:y,handler:async c=>s({command:`k2 streams list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={name:c.name,page:c.page,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf k2 streams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/k2/streams`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.k2.streams.list({account_id:u,...s})),{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 k2 streams subscriptions list
12
+
13
+ Lists every subscription on one stream, oldest first. Lag uses committed positions, not reserved read positions. A failed tail observation preserves subscription metadata and returns unavailable lag.`).option(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List K2 stream subscriptions`,builder:x,handler:async c=>s({command:`k2 streams subscriptions list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf k2 streams subscriptions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/k2/streams/${c[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(c[`stream-id`]))}/subscriptions`,pathParams:{"stream-id":String(c[`stream-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.k2.streams.subscriptions.list({account_id:l,stream_id:c[`stream-id`]})),{successLabel:`Loaded`})})},C={command:`subscriptions`,describe:`Subscriptions that consume a K2 stream, with committed-position lag`,builder:e=>e.command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.usage("$0 k2 streams update <stream-id>\n\nUpdate a K2 stream. Each provided input replaces that input's full configuration, so include every `http` setting to keep, such as `authentication` and `cors`. At least one input must remain enabled.").positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`http-enabled`,{type:`boolean`,description:`Indicates whether the HTTP endpoint accepts records.`}).option(`http-authentication`,{type:`boolean`,description:`Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false or omitted, the endpoint accepts unauthenticated records.`}).option(`retention-seconds`,{type:`number`,description:`Sets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive.`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates whether Workers bindings can produce records to the stream.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`http-enabled`,`http-authentication`].some(t=>e[t]!==void 0)){let t=[`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0}).check(e=>{if([`worker-binding-enabled`].some(t=>e[t]!==void 0)){let t=[`worker-binding-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --worker_binding-* flag is set`)}return!0})}const T={command:`update <stream-id>`,describe:`Update K2 stream`,builder:w,handler:async u=>s({command:`k2 streams update`,classification:{safeFlags:[`http-enabled`,`http-authentication`,`worker-binding-enabled`,`dry-run`]}},u,async()=>{if(u.dryRun){a({command:`cf k2 streams update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/k2/streams/${u[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(u[`stream-id`]))}`,pathParams:{"stream-id":String(u[`stream-id`]??``)},bodyKind:`json`,body:u.body===void 0?l({http:{enabled:u[`http-enabled`],authentication:u[`http-authentication`]},retention_seconds:u[`retention-seconds`],worker_binding:{enabled:u[`worker-binding-enabled`]}}):c(u.body)});return}let s=await r(u),d=u.local?e:await n();if(u.accountId=d,u.body){let e=c(u.body);i(await o(`Updating`,async()=>s.k2.streams.update({...e,account_id:d,stream_id:u[`stream-id`]})),{successLabel:`Updated`});return}let f=l({http:{enabled:u[`http-enabled`],authentication:u[`http-authentication`]},retention_seconds:u[`retention-seconds`],worker_binding:{enabled:u[`worker-binding-enabled`]}});i(await o(`Updating`,async()=>s.k2.streams.update({...f,account_id:d,stream_id:u[`stream-id`]})),{successLabel:`Updated`})})},E={command:`streams`,describe:`K2 streams, their retention, and the HTTP and Workers binding inputs used to produce records`,builder:e=>e.command(m).command(g).command(v).command(b).command(T).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},D={command:`k2`,describe:`Durable, ordered event streams that you produce records to and consume from with subscriptions`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{D as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-M2Ho8pi3.mjs";import{r as t}from"./auth-BjxUTZWb.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BnIv4lh5.mjs";import{t as a}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{a as l,n as u}from"./prompt-DjRAo2Up.mjs";function d(e){return e.usage(`$0 keyless-certificates create
2
+ import{i as e}from"./context-Cibc7DIM.mjs";import{r as t}from"./auth-C_-fMmUL.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BtNgm5yx.mjs";import{t as a}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{a as l,n as u}from"./prompt-CbKaAX24.mjs";function d(e){return e.usage(`$0 keyless-certificates create
3
3
 
4
4
  Creates a Keyless SSL configuration that allows SSL/TLS termination without exposing private keys to Cloudflare. Keys remain on your infrastructure.`).option(`bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`],default:`ubiquitous`}).option(`certificate`,{type:`string`,description:`The zone's SSL certificate or SSL certificate and intermediate(s).`}).option(`host`,{type:`string`,description:`The keyless SSL name.`}).option(`name`,{type:`string`,description:`The keyless SSL name.`}).option(`port`,{type:`number`,description:`The keyless SSL port used to communicate between Cloudflare and the client's Keyless SSL server.`,default:24008}).option(`tunnel-private-ip`,{type:`string`,description:`Private IP of the Key Server Host.`}).option(`tunnel-vnet-id`,{type:`string`,description:`Cloudflare Tunnel Virtual Network ID.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`tunnel-private-ip`,`tunnel-vnet-id`].some(t=>e[t]!==void 0)){let t=[`tunnel-private-ip`,`tunnel-vnet-id`].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 --tunnel-* flag is set`)}return!0})}const f={command:`create`,describe:`Create Keyless SSL Configuration`,builder:d,handler:async u=>a({command:`keyless-certificates create`,classification:{safeFlags:[`bundle-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf keyless-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/keyless_certificates`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({bundle_method:c(u[`bundle-method`],`bundle-method`,`text`),certificate:c(u.certificate,`certificate`,`text`),host:c(u.host,`host`,`text`),name:c(u.name,`name`,`text`),port:u.port,tunnel:{private_ip:c(u[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(u[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Creating`,async()=>a.keylessCertificates.create({...e,zone_id:d})),{successLabel:`Created`});return}if(u.certificate===void 0&&(u.certificate=await l(`certificate`,`The zone's SSL certificate or SSL certificate and intermediate(s).`)),u.host===void 0&&(u.host=await l(`host`,`The keyless SSL name.`)),u.port===void 0)throw Error(`--port is required (or pass --body with this field set).`);let f=s({bundle_method:c(u[`bundle-method`],`bundle-method`,`text`),certificate:c(u.certificate,`certificate`,`text`),host:c(u.host,`host`,`text`),name:c(u.name,`name`,`text`),port:u.port,tunnel:{private_ip:c(u[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(u[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}});n(await i(`Creating`,async()=>a.keylessCertificates.create({...f,zone_id:d})),{successLabel:`Created`})})};function p(e){return e.usage(`$0 keyless-certificates delete <keyless-certificate-id>
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";function c(e){return e.usage(`$0 keys list
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{r}from"./auth-C_-fMmUL.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BtNgm5yx.mjs";import{t as s}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";function c(e){return e.usage(`$0 keys list
3
3
 
4
4
  Lists all distinct tag keys used across resources in an account.`).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`list`,describe:`List tag keys`,builder:c,handler:async c=>s({command:`keys list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={cursor:c.cursor};if(c.dryRun){a({command:`cf keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/tags/keys`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.keys.list({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`keys`,describe:`keys`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{u as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{a as r,r as i}from"./auth-BjxUTZWb.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BnIv4lh5.mjs";import{t as c}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d,t as f}from"./input-validation-Dk52b0me.mjs";import{a as p,n as m}from"./prompt-DjRAo2Up.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";import{n as g,t as _}from"./raw-fetch-CuMHmrn0.mjs";function v(e){return e.usage(`$0 kv bulk delete <namespace-id>
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{a as r,r as i}from"./auth-C_-fMmUL.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BtNgm5yx.mjs";import{t as c}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d,t as f}from"./input-validation-Dk52b0me.mjs";import{a as p,n as m}from"./prompt-CbKaAX24.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";import{n as g,t as _}from"./raw-fetch-CAZrlsc6.mjs";function v(e){return e.usage(`$0 kv bulk delete <namespace-id>
3
3
 
4
4
  Deletes up to 10,000 key-value pairs from the specified Workers KV namespace. Send a JSON array of the key names to delete. The result reports the number of successful deletions and any keys that failed and should be retried.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`delete <namespace-id>`,describe:`Delete multiple key-value pairs`,builder:v,handler:async u=>c({command:`kv bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},u,async()=>{if(u.dryRun){o({command:`cf kv bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/storage/kv/namespaces/${u[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,pathParams:{"namespace-id":String(u[`namespace-id`]??``)},bodyKind:`json`,body:u.body===void 0?void 0:l(u.body)});return}let c=await i(u),d=u.local?e:await n();if(u.accountId=d,!await m({force:!!u.force,message:`This operation deletes the specified keys and their values from the Workers KV namespace.`})){process.stderr.write(`Aborted.
5
5
  `);return}if(u.body){let e=l(u.body);if(Array.isArray(e)&&e.length>1e4){let t=Math.ceil(e.length/1e4),n=null;for(let i=0;i<e.length;i+=1e4){let a=e.slice(i,i+1e4);n=await s(`Deleting: batch ${Math.floor(i/1e4)+1}/${t}`,async()=>r(c,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,{body:a}))}a(n,{successLabel:`Deleted`});return}a(await s(`Deleting`,async()=>r(c,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,{body:e})),{successLabel:`Deleted`});return}if(u.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function b(e){return e.usage("$0 kv bulk get <namespace-id>\n\nRetrieves the text-based values of up to 100 keys from the specified Workers KV namespace. The result maps each requested key to its value. Set `type` to `json` to parse JSON values instead of returning strings, and set `withMetadata` to `true` to include metadata with each value. Binary values are not supported by this operation.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`keys`,{type:`string`,array:!0,description:`Array of keys to retrieve (maximum of 100).`}).option(`type`,{type:`string`,description:"Return values as strings with `text`, or parse stored JSON values with `json`.",choices:[`text`,`json`],default:`text`}).option(`with-metadata`,{type:`boolean`,description:`Whether to include metadata in the response.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`get <namespace-id>`,describe:`Get multiple key-value pairs`,builder:b,handler:async r=>c({command:`kv bulk get`,classification:{safeFlags:[`type`,`with-metadata`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf kv bulk get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/bulk/get`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`json`,body:r.body===void 0?u({keys:r.keys,type:d(r.type,`type`,`text`),withMetadata:r[`with-metadata`]}):l(r.body)});return}let c=await i(r),f=r.local?e:await n();if(r.accountId=f,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.kv.bulk.get({...e,account_id:f,namespace_id:r[`namespace-id`]})),{successLabel:`Created`});return}if(r.keys===void 0)throw Error(`--keys is required (or pass --body with this field set).`);let p=u({keys:r.keys,type:d(r.type,`type`,`text`),withMetadata:r[`with-metadata`]});a(await s(`Creating`,async()=>c.kv.bulk.get({...p,account_id:f,namespace_id:r[`namespace-id`]})),{successLabel:`Created`})})};function S(e){return e.usage("$0 kv bulk put <namespace-id>\n\nWrites up to 10,000 key-value pairs to the specified Workers KV namespace from a JSON array, with optional metadata and expiration settings for each pair. Existing values and expirations are overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will not expire. If both are set, `expiration_ttl` takes precedence. The entire request must be 100 megabytes or less. The result reports the number of successful writes and any keys that failed and should be retried.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`put <namespace-id>`,describe:`Write multiple key-value pairs`,builder:S,handler:async u=>c({command:`kv bulk put`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){o({command:`cf kv bulk put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/storage/kv/namespaces/${u[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(u[`namespace-id`]))}/bulk`,pathParams:{"namespace-id":String(u[`namespace-id`]??``)},bodyKind:`json`,body:u.body===void 0?void 0:l(u.body)});return}let c=await i(u),d=u.local?e:await n();if(u.accountId=d,u.body){let e=l(u.body);if(Array.isArray(e)&&e.length>1e4){let t=Math.ceil(e.length/1e4),n=null;for(let i=0;i<e.length;i+=1e4){let a=e.slice(i,i+1e4);n=await s(`Updating: batch ${Math.floor(i/1e4)+1}/${t}`,async()=>r(c,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk`,{body:a}))}a(n,{successLabel:`Updated`});return}a(await s(`Updating`,async()=>r(c,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk`,{body:e})),{successLabel:`Updated`});return}if(u.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},w={command:`bulk`,describe:`Operations for bulk`,builder:e=>e.command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage("$0 kv keys delete <key-name>\n\nDeletes the specified key and its value from the Workers KV namespace. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,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 <key-name>`,describe:`Delete a key-value pair`,builder:T,handler:async r=>c({command:`kv keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf kv keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/values/${r[`key-name`]==null?`<key-name>`:encodeURIComponent(String(r[`key-name`]))}`,pathParams:{"key-name":String(r[`key-name`]??``),"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await m({force:!!r.force,message:`This operation deletes the selected key-value pair from the Workers KV namespace.`})){process.stderr.write(`Aborted.
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- function e(e,t,n,r){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{let t=await n();if(r===null){await t.default.handler(e);return}let{runWithTelemetry:i}=await import(`./run-Dkcz54xY.mjs`);await i(r,e,()=>t.default.handler(e))}}}export{e as t};
2
+ function e(e,t,n,r){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{let t=await n();if(r===null){await t.default.handler(e);return}let{runWithTelemetry:i}=await import(`./run-DZYLWyvE.mjs`);await i(r,e,()=>t.default.handler(e))}}}export{e as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-M2Ho8pi3.mjs";import{r as t}from"./auth-BjxUTZWb.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BnIv4lh5.mjs";import{t as a}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{n as l}from"./prompt-DjRAo2Up.mjs";function u(e){return e.usage(`$0 leaked-credential-checks detections create
2
+ import{i as e}from"./context-Cibc7DIM.mjs";import{r as t}from"./auth-C_-fMmUL.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-BtNgm5yx.mjs";import{t as a}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{n as l}from"./prompt-CbKaAX24.mjs";function u(e){return e.usage(`$0 leaked-credential-checks detections create
3
3
 
4
4
  Create a detection location for credentials that the default scan locations do not cover, using Rules language expressions such as \`lookup_json_string(http.request.body.raw, "user")\`. Only the username expression is required, and Leaked Credential Checks must be enabled on the zone.`).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const d={command:`create`,describe:`Create a custom detection location for a zone.`,builder:u,handler:async l=>a({command:`leaked-credential-checks detections create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf leaked-credential-checks detections create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({password:c(l.password,`password`,`text`),username:c(l.username,`username`,`text`)}):o(l.body)});return}let a=await t(l),u=await e({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body);n(await i(`Creating`,async()=>a.leakedCredentialChecks.detections.create({body:e,zone_id:u})),{successLabel:`Created`});return}let d=s({password:c(l.password,`password`,`text`),username:c(l.username,`username`,`text`)});n(await i(`Creating`,async()=>a.leakedCredentialChecks.detections.create({body:d,zone_id:u})),{successLabel:`Created`})})};function f(e){return e.usage(`$0 leaked-credential-checks detections delete <detection-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,i as n,t as r}from"./context-M2Ho8pi3.mjs";import{r as i}from"./auth-BjxUTZWb.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BnIv4lh5.mjs";import{t as c}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,n as m}from"./prompt-DjRAo2Up.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function g(e){return e.usage(`$0 load-balancers account create
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,i as n,t as r}from"./context-Cibc7DIM.mjs";import{r as i}from"./auth-C_-fMmUL.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BtNgm5yx.mjs";import{t as c}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p,n as m}from"./prompt-CbKaAX24.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function g(e){return e.usage(`$0 load-balancers account create
3
3
 
4
4
  Create a new account or zone-scoped load balancer.`).option(`adaptive-routing-failover-across-pools`,{type:`boolean`,description:"Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set false (the default) zero-downtime failover will only occur between origins within the same pool. See `session_affinity_attributes` for control over when sessions are broken or reassigned."}).option(`default-pools`,{type:`string`,array:!0,description:`A list of pool IDs ordered by their failover priority. Pools defined here are used by default, or when region_pools are not configured for a given region.`}).option(`description`,{type:`string`,description:`Object description.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable (the default) this load balancer.`,default:!0}).option(`fallback-pool`,{type:`string`,description:`The pool ID to use when all other pools are detected as unhealthy.`}).option(`location-strategy-mode`,{type:`string`,description:'Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.\n- `"pop"`: Use the Cloudflare PoP location.\n- `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, use the Cloudflare PoP location.',choices:[`pop`,`resolver_ip`]}).option(`location-strategy-prefer-ecs`,{type:`string`,description:'Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.\n- `"always"`: Always prefer ECS.\n- `"never"`: Never prefer ECS.\n- `"proximity"`: Prefer ECS only when `steering_policy="proximity"`.\n- `"geo"`: Prefer ECS only when `steering_policy="geo"`.',choices:[`always`,`never`,`proximity`,`geo`]}).option(`name`,{type:`string`,description:`The DNS hostname to associate with your Load Balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer will take precedence and the DNS record will not be used.`}).option(`networks`,{type:`string`,array:!0,description:`List of networks where Load Balancer or Pool is enabled.`}).option(`proxied`,{type:`boolean`,description:`Whether the hostname should be gray clouded (false) or orange clouded (true).`,default:!1}).option(`random-steering-default-weight`,{type:`number`,description:`The default weight for pools in the load balancer that are not specified in the pool_weights map.`}).option(`rules`,{type:`string`,description:`BETA Field Not General Access: A list of rules for this load balancer to execute. Provide as a JSON array of objects or @path/to/file.json.`}).option(`session-affinity`,{type:`string`,description:'Specifies the type of session affinity the load balancer should use unless specified as `"none"`. The supported types are: - `"cookie"`: On the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy, then a new origin server is calculated and used. - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin selection is stable and based on the client\'s ip address. - `"header"`: On the first request to a proxied load balancer, a session key based on the configured HTTP headers (see `session_affinity_attributes.headers`) is generated, encoding the request headers used for storing in the load balancer session state which origin the request will be forwarded to. Subsequent requests to the load balancer with the same headers will be sent to the same origin server, for the duration of the session and as long as the origin server remains healthy. If the session has been idle for the duration of `session_affinity_ttl` seconds or the origin server is unhealthy, then a new origin server is calculated and used. See `headers` in `session_affinity_attributes` for additional required configuration.',choices:[`none`,`cookie`,`ip_cookie`,`header`],default:`none`}).option(`session-affinity-attributes-drain-duration`,{type:`number`,description:`Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.`}).option(`session-affinity-attributes-headers`,{type:`string`,array:!0,description:'Configures the names of HTTP headers to base session affinity on when header `session_affinity` is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: `"cookie:<cookie-name-1>,<cookie-name-2>"` (example) where everything after the colon is a comma-separated list of cookie names. Providing only `"cookie"` will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.'}).option(`session-affinity-attributes-require-all-headers`,{type:`boolean`,description:'When header `session_affinity` is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are: - `"true"`: Load balancing requests must contain *all* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren\'t created. - `"false"`: Load balancing requests must contain *at least one* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren\'t created.'}).option(`session-affinity-attributes-samesite`,{type:`string`,description:`Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "Never".`,choices:[`Auto`,`Lax`,`None`,`Strict`]}).option(`session-affinity-attributes-secure`,{type:`string`,description:`Configures the Secure attribute on session affinity cookie. Value "Always" indicates the Secure attribute will be set in the Set-Cookie header, "Never" indicates the Secure attribute will not be set, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled.`,choices:[`Auto`,`Always`,`Never`]}).option(`session-affinity-attributes-zero-downtime-failover`,{type:`string`,description:'Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are: - `"none"`: No failover takes place for sessions pinned to the origin (default). - `"temporary"`: Traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. - `"sticky"`: The session affinity cookie is updated and subsequent requests are sent to the new origin. Note: Zero-downtime failover with sticky sessions is currently not supported for session affinity by header.',choices:[`none`,`temporary`,`sticky`]}).option(`session-affinity-ttl`,{type:`number`,description:'Time, in seconds, until a client\'s session expires after being created. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. The accepted ranges per `session_affinity` policy are: - `"cookie"` / `"ip_cookie"`: The current default of 23 hours will be used unless explicitly set. The accepted range of values is between [1800, 604800]. - `"header"`: The current default of 1800 seconds will be used unless explicitly set. The accepted range of values is between [30, 3600]. Note: With session affinity by header, sessions only expire after they haven\'t been used for the number of seconds specified.'}).option(`steering-policy`,{type:`string`,description:'Steering Policy for this load balancer.\n- `"off"`: Use `default_pools`.\n- `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied requests, the country for `country_pools` is determined by `location_strategy`.\n- `"random"`: Select a pool randomly.\n- `"dynamic_latency"`: Use round trip time to select the closest pool in default_pools (requires pool health checks).\n- `"proximity"`: Use the pools\' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined by `location_strategy` for non-proxied requests.\n- `"least_outstanding_requests"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool\'s number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others.\n- `"least_connections"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool\'s number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.\n- `""`: Will map to `"geo"` if you use `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.',choices:[`off`,`geo`,`random`,`dynamic_latency`,`proximity`,`least_outstanding_requests`,`least_connections`],default:``}).option(`ttl`,{type:`number`,description:`Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This only applies to gray-clouded (unproxied) load balancers.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Create account or zone Load Balancer`,builder:g,handler:async m=>c({command:`load-balancers account create`,classification:{safeFlags:[`adaptive-routing-failover-across-pools`,`enabled`,`location-strategy-mode`,`location-strategy-prefer-ecs`,`proxied`,`session-affinity`,`session-affinity-attributes-require-all-headers`,`session-affinity-attributes-samesite`,`session-affinity-attributes-secure`,`session-affinity-attributes-zero-downtime-failover`,`steering-policy`,`dry-run`]}},m,async()=>{if(m.dryRun){let e=m.zone===void 0?await t():void 0,n=m.zone===void 0?`accounts`:`zones`,r=m.zone??e??`<account-id>`;o({command:`cf load-balancers account create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/load_balancers`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:m.body===void 0?d({adaptive_routing:{failover_across_pools:m[`adaptive-routing-failover-across-pools`]},default_pools:m[`default-pools`],description:f(m.description,`description`,`text`),enabled:m.enabled,fallback_pool:f(m[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:f(m[`location-strategy-mode`],`location-strategy-mode`,`text`),prefer_ecs:f(m[`location-strategy-prefer-ecs`],`location-strategy-prefer-ecs`,`text`)},name:f(m.name,`name`,`text`),networks:m.networks,proxied:m.proxied,random_steering:{default_weight:m[`random-steering-default-weight`]},rules:u(m.rules,`rules`),session_affinity:f(m[`session-affinity`],`session-affinity`,`text`),session_affinity_attributes:{drain_duration:m[`session-affinity-attributes-drain-duration`],headers:m[`session-affinity-attributes-headers`],require_all_headers:m[`session-affinity-attributes-require-all-headers`],samesite:f(m[`session-affinity-attributes-samesite`],`session-affinity-attributes-samesite`,`text`),secure:f(m[`session-affinity-attributes-secure`],`session-affinity-attributes-secure`,`text`),zero_downtime_failover:f(m[`session-affinity-attributes-zero-downtime-failover`],`session-affinity-attributes-zero-downtime-failover`,`text`)},session_affinity_ttl:m[`session-affinity-ttl`],steering_policy:f(m[`steering-policy`],`steering-policy`,`text`),ttl:m.ttl}):l(m.body)});return}let c=await i(m),h=m.zone===void 0?`accounts`:`zones`,g=h===`zones`?await n({zone:m.zone},c,{quiet:m.quiet}):m.local?e:await r();if(h===`zones`?m.zoneId=g:m.accountId=g,m.body){let e=l(m.body);a(await s(`Creating`,async()=>c.loadBalancers.account.create({...e,account_or_zone:h,account_or_zone_id:g})),{successLabel:`Created`});return}if(m[`default-pools`]===void 0)throw Error(`--default-pools is required (or pass --body with this field set).`);m[`fallback-pool`]===void 0&&(m[`fallback-pool`]=await p(`fallback-pool`,`The pool ID to use when all other pools are detected as unhealthy.`)),m.name===void 0&&(m.name=await p(`name`,`The DNS hostname to associate with your Load Balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer will take precedence and the DNS record will not be used.`));let _=d({adaptive_routing:{failover_across_pools:m[`adaptive-routing-failover-across-pools`]},default_pools:m[`default-pools`],description:f(m.description,`description`,`text`),enabled:m.enabled,fallback_pool:f(m[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:f(m[`location-strategy-mode`],`location-strategy-mode`,`text`),prefer_ecs:f(m[`location-strategy-prefer-ecs`],`location-strategy-prefer-ecs`,`text`)},name:f(m.name,`name`,`text`),networks:m.networks,proxied:m.proxied,random_steering:{default_weight:m[`random-steering-default-weight`]},rules:u(m.rules,`rules`),session_affinity:f(m[`session-affinity`],`session-affinity`,`text`),session_affinity_attributes:{drain_duration:m[`session-affinity-attributes-drain-duration`],headers:m[`session-affinity-attributes-headers`],require_all_headers:m[`session-affinity-attributes-require-all-headers`],samesite:f(m[`session-affinity-attributes-samesite`],`session-affinity-attributes-samesite`,`text`),secure:f(m[`session-affinity-attributes-secure`],`session-affinity-attributes-secure`,`text`),zero_downtime_failover:f(m[`session-affinity-attributes-zero-downtime-failover`],`session-affinity-attributes-zero-downtime-failover`,`text`)},session_affinity_ttl:m[`session-affinity-ttl`],steering_policy:f(m[`steering-policy`],`steering-policy`,`text`),ttl:m.ttl});a(await s(`Creating`,async()=>c.loadBalancers.account.create({..._,account_or_zone:h,account_or_zone_id:g})),{successLabel:`Created`})})};function ee(e){return e.usage(`$0 load-balancers account delete <load-balancer-id>
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const e=`This command has no local equivalent. Re-run without --local to use the Cloudflare API.`;let t;async function n(){let e=t;t=void 0,await e?.()}function r(e={}){return async function(n,r){let{dispatchLocal:i,disposeLocalSession:a}=await import(`./local-runtime-CifOYlPq.mjs`);return t=a,i(new Request(n,r),e.persistTo,e.apiBaseUrl)}}const i=`local`;export{n as i,e as n,r,i as t};
2
+ const e=`This command has no local equivalent. Re-run without --local to use the Cloudflare API.`;let t;async function n(){let e=t;t=void 0,await e?.()}function r(e={}){return async function(n,r){let{dispatchLocal:i,disposeLocalSession:a}=await import(`./local-runtime-CZnegFEM.mjs`);return t=a,i(new Request(n,r),e.persistTo,e.apiBaseUrl)}}const i=`local`;export{n as i,e as n,r,i as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./local-B5oRPTEN.mjs";export{e as createLocalFetch};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./local-CQc36Viv.mjs";import{i as t}from"./cf-Bh_fTFIj.mjs";import{n}from"./registry-DWTPK8_Q.mjs";import{mkdtempSync as r,rmSync as i,statSync as a}from"node:fs";import{join as o,resolve as s}from"node:path";import{tmpdir as c}from"node:os";import{randomUUID as l}from"node:crypto";import{Miniflare as u}from"miniflare";const d=/^\/accounts\/[^/]+/;function f(e){let n=e!==void 0&&e!==``?o(s(process.cwd(),e),`v3`):o(t(),`state`,`v3`);try{if(!a(n).isDirectory())throw Error(`Local persistence path must be a directory: ${n}`)}catch(e){let t=e.code;if(t===`ENOENT`)return n;throw t===`ENOTDIR`?Error(`Local persistence path must be a directory: ${n}`):e}return n}let p;function m(e){let t=n(),a=r(o(c(),`cf-local-isolated-${process.pid}-`));try{return{mf:new u({unsafeLocalExplorer:!0,cf:!1,resourcePersistencePath:e,unsafeEnableSharedStorage:!0,isolatedResourcePersistencePath:a,unsafeDevRegistryPath:t,workers:[{config:{name:`cf-local-${l()}`,compatibilityDate:`2026-08-15`,manifest:{mainModule:`cf-local.mjs`,modules:{"cf-local.mjs":{type:`esm`,contents:`export default { fetch() { return new Response(null, { status: 404 }); } };`}}}}}]}),isolatedPersistRoot:a}}catch(e){throw i(a,{recursive:!0,force:!0}),e}}async function h(t,n,r){let i=new URL(t.url),a=new URL(r??`https://api.cloudflare.com/client/v4`).pathname.replace(/\/+$/,``),o=`http://localhost/cdn-cgi/local/explorer/api${i.pathname.slice(a.length).replace(d,``)||`/`}${i.search}`,s=new Headers(t.headers);s.delete(`Authorization`),s.set(`Host`,`localhost`);let c;try{c=p??=m(f(n))}catch(e){return g(500,`Could not start the local runtime: ${_(e)}`)}let l;try{let e={method:t.method,headers:[...s],redirect:`manual`,signal:t.signal};t.body!==null&&(e.body=t.body,e.duplex=`half`),l=await c.mf.dispatchFetch(o,e)}catch(e){return g(500,`The local runtime failed to answer: ${_(e)}`)}if(l.status===404&&l.headers.get(`content-type`)?.includes(`json`)!==!0){await l.body?.cancel();let n=new URL(o).pathname.replace(/^.*\/explorer\/api/,``);return g(404,`${e} The local explorer API does not implement ${t.method} ${n}.`)}return l}function g(e,t){return new Response(JSON.stringify({success:!1,errors:[{message:t}],messages:[],result:null}),{status:e,headers:{"content-type":`application/json`}})}function _(e){return e instanceof Error?e.message:String(e)}async function v(){let e=p;if(p=void 0,e!==void 0)try{let{mf:t,isolatedPersistRoot:n}=e;await t.dispose().finally(()=>i(n,{recursive:!0,force:!0}))}catch{}}export{h as dispatchLocal,v as disposeLocalSession};
2
+ import{n as e}from"./local-B5oRPTEN.mjs";import{i as t}from"./cf-Bh_fTFIj.mjs";import{n}from"./registry-Cg5lP8oo.mjs";import{mkdtempSync as r,rmSync as i,statSync as a}from"node:fs";import{join as o,resolve as s}from"node:path";import{tmpdir as c}from"node:os";import{randomUUID as l}from"node:crypto";import{Miniflare as u}from"miniflare";const d=/^\/accounts\/[^/]+/;function f(e){let n=e!==void 0&&e!==``?o(s(process.cwd(),e),`v3`):o(t(),`state`,`v3`);try{if(!a(n).isDirectory())throw Error(`Local persistence path must be a directory: ${n}`)}catch(e){let t=e.code;if(t===`ENOENT`)return n;throw t===`ENOTDIR`?Error(`Local persistence path must be a directory: ${n}`):e}return n}let p;function m(e){let t=n(),a=r(o(c(),`cf-local-isolated-${process.pid}-`));try{return{mf:new u({unsafeLocalExplorer:!0,cf:!1,resourcePersistencePath:e,unsafeEnableSharedStorage:!0,isolatedResourcePersistencePath:a,unsafeDevRegistryPath:t,workers:[{config:{name:`cf-local-${l()}`,compatibilityDate:`2026-08-15`,manifest:{mainModule:`cf-local.mjs`,modules:{"cf-local.mjs":{type:`esm`,contents:`export default { fetch() { return new Response(null, { status: 404 }); } };`}}}}}]}),isolatedPersistRoot:a}}catch(e){throw i(a,{recursive:!0,force:!0}),e}}async function h(t,n,r){let i=new URL(t.url),a=new URL(r??`https://api.cloudflare.com/client/v4`).pathname.replace(/\/+$/,``),o=`http://localhost/cdn-cgi/local/explorer/api${i.pathname.slice(a.length).replace(d,``)||`/`}${i.search}`,s=new Headers(t.headers);s.delete(`Authorization`),s.set(`Host`,`localhost`);let c;try{c=p??=m(f(n))}catch(e){return g(500,`Could not start the local runtime: ${_(e)}`)}let l;try{let e={method:t.method,headers:[...s],redirect:`manual`,signal:t.signal};t.body!==null&&(e.body=t.body,e.duplex=`half`),l=await c.mf.dispatchFetch(o,e)}catch(e){return g(500,`The local runtime failed to answer: ${_(e)}`)}if(l.status===404&&l.headers.get(`content-type`)?.includes(`json`)!==!0){await l.body?.cancel();let n=new URL(o).pathname.replace(/^.*\/explorer\/api/,``);return g(404,`${e} The local explorer API does not implement ${t.method} ${n}.`)}return l}function g(e,t){return new Response(JSON.stringify({success:!1,errors:[{message:t}],messages:[],result:null}),{status:e,headers:{"content-type":`application/json`}})}function _(e){return e instanceof Error?e.message:String(e)}async function v(){let e=p;if(p=void 0,e!==void 0)try{let{mf:t,isolatedPersistRoot:n}=e;await t.dispose().finally(()=>i(n,{recursive:!0,force:!0}))}catch{}}export{h as dispatchLocal,v as disposeLocalSession};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BIWQFmZ0.mjs";import{r as t}from"./banner-ClclgnBn.mjs";import"./ui-BQxRjahW.mjs";import{n}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as r,t as i}from"./login-DFZ3DEjI.mjs";var a=n({...i,describe:!1,handler:async n=>{n.quiet||console.error(t(`${e.code(`cf login`)} is an alias for ${e.code(`cf auth login`)}. Authentication commands are under ${e.code(`cf auth`)}.`)),await i.handler(n)}},{command:`login`,classification:r});export{a as default};
2
+ import{r as e}from"./theme-BIWQFmZ0.mjs";import{r as t}from"./banner-ClclgnBn.mjs";import"./ui-BQxRjahW.mjs";import{n}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as r,t as i}from"./login-CStejTNn.mjs";var a=n({...i,describe:!1,handler:async n=>{n.quiet||console.error(t(`${e.code(`cf login`)} is an alias for ${e.code(`cf auth login`)}. Authentication commands are under ${e.code(`cf auth`)}.`)),await i.handler(n)}},{command:`login`,classification:r});export{a as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BIWQFmZ0.mjs";import{m as t,o as n}from"./chunk-FT2NMTJB-1VFYM1Ro.mjs";import{a as r,n as i,r as a}from"./banner-ClclgnBn.mjs";import"./ui-BQxRjahW.mjs";import{c as o,d as s,i as c,l,o as u,p as d,r as f,s as p,u as m}from"./oauth-D6EZEBcY.mjs";import"./auth-BjxUTZWb.mjs";import{t as h}from"./output-CvQFJkvi.mjs";import g from"node:path";function _(e,t,n){if(!e.profile)return;let r=n?` ${n}`:``;throw Error(`The --profile flag cannot be used with \`cf auth ${t}\`.${r}`)}function v(){if(n({allowGlobalAuthKey:!1})!==void 0)throw Error(`Cannot manage auth profiles while CLOUDFLARE_API_TOKEN is set. Unset CLOUDFLARE_API_TOKEN and try again.`)}const y={command:`create <name>`,describe:`Create or re-authenticate a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name for the auth profile`,demandOption:!0}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async n=>{_(n,`create`,"Pass the profile name as the command argument: `cf auth create <name>`."),v(),t(n.name);let r=u().configs.exists(n.name);await l({browser:n.browser,device:n.device,scopes:n.scopes,profile:n.name}),console.log(a(r?`Profile "${n.name}" re-authenticated.`:`Profile "${n.name}" created.`)),console.log(i(`Run ${e.code(`cf auth activate ${n.name}`)} to use this profile in a directory.`))}},b={command:`delete <name>`,describe:`Delete a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to delete`,demandOption:!0}),handler:async n=>{_(n,`delete`),v(),t(n.name);let r=u();if(!r.configs.exists(n.name))throw Error(`Profile "${n.name}" does not exist.`);let o=r.bindings.removeAllBindingsForProfile(n.name);if(o.length>0){console.log(a(`Removed directory bindings:`));for(let e of o)console.log(` ${e}`)}await m(n.name),r.configs.delete(n.name),console.log(a(`Profile "${n.name}" deleted.`));let s=r.bindings.getProfileForDirectory(process.cwd());s?console.log(a(`Active profile for this directory: ${s}.`)):r.configs.exists(`default`)?console.log(a(`This directory now uses the default profile.`)):console.log(i(`No active profile for this directory. Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`))}},x={command:`activate <name> [dir]`,describe:`Bind a named auth profile to a directory`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to activate`,demandOption:!0}).positional(`dir`,{type:`string`,description:`Directory to bind the profile to (defaults to current directory)`}),handler:e=>{_(e,`activate`,"Pass the profile name as the command argument: `cf auth activate <name>`."),v(),t(e.name);let n=u();if(!n.configs.exists(e.name))throw Error(`Profile "${e.name}" does not exist. Run \`cf auth create ${e.name}\` first.`);let r=e.dir??process.cwd();n.bindings.activate(e.name,r),console.log(a(`Profile "${e.name}" activated for "${g.resolve(r)}".`))}},S={command:`deactivate [dir]`,describe:`Remove the auth profile binding from a directory`,builder:e=>e.positional(`dir`,{type:`string`,description:`Directory to unbind (defaults to current directory). Must be the exact directory the profile was bound to.`}),handler:t=>{_(t,`deactivate`),v();let n=u(),r=t.dir??process.cwd(),{removedProfile:o,newResolution:s}=n.bindings.deactivate(r);console.log(a(`Profile "${o}" deactivated from "${g.resolve(r)}".`)),s.profile===void 0?console.log(i(`Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`)):s.profile===`default`?console.log(a(`This directory now uses the default profile.`)):console.log(a(`Now using: ${s.profile} (${s.source}).`))}},C={command:`list`,describe:`List all auth profiles`,handler:e=>{_(e,`list`);let t=u(),n=t.bindings.read(),r={};for(let[e,t]of Object.entries(n))(r[t]??=[]).push(e);h(t.configs.list().map(e=>({name:e,boundDirectories:r[e]??[]})))}},w={safeFlags:[`force`,`browser`,`device`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}},T={command:`login`,describe:`Authenticate with Cloudflare`,builder:e=>e.option(`force`,{type:`boolean`,alias:`f`,description:`Force re-authentication even if already logged in`,default:!1}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async t=>{_(t,`login`,"Run `cf auth create <name>` to authenticate a named profile.");let n=f();if(n!==`default`&&console.log(r(`This directory has profile "${n}" active. \`cf auth login\` updates the default profile, not "${n}".\nTo re-authenticate "${n}", run \`cf auth create ${n}\`.`)),d(`default`),!t.force&&o()){if(await p()){let t=s();console.log(a(`You are already logged in.`)),console.log(`${e.info(`Config file:`)} ${e.muted(c())}`),t?.expiration_time&&console.log(`${e.info(`Token expires:`)} ${new Date(t.expiration_time).toLocaleString()}`),console.log(i(`Run ${e.code(`cf auth login --force`)} to re-authenticate, or ${e.code(`cf auth logout`)} to log out.`));return}console.log(r(`Existing tokens are invalid or expired. Starting fresh login...
2
+ import{r as e}from"./theme-BIWQFmZ0.mjs";import{m as t,o as n}from"./chunk-FT2NMTJB-1VFYM1Ro.mjs";import{a as r,n as i,r as a}from"./banner-ClclgnBn.mjs";import"./ui-BQxRjahW.mjs";import{c as o,d as s,i as c,l,o as u,p as d,r as f,s as p,u as m}from"./oauth-BYkPua5f.mjs";import"./auth-C_-fMmUL.mjs";import{t as h}from"./output-CvQFJkvi.mjs";import g from"node:path";function _(e,t,n){if(!e.profile)return;let r=n?` ${n}`:``;throw Error(`The --profile flag cannot be used with \`cf auth ${t}\`.${r}`)}function v(){if(n({allowGlobalAuthKey:!1})!==void 0)throw Error(`Cannot manage auth profiles while CLOUDFLARE_API_TOKEN is set. Unset CLOUDFLARE_API_TOKEN and try again.`)}const y={command:`create <name>`,describe:`Create or re-authenticate a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name for the auth profile`,demandOption:!0}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async n=>{_(n,`create`,"Pass the profile name as the command argument: `cf auth create <name>`."),v(),t(n.name);let r=u().configs.exists(n.name);await l({browser:n.browser,device:n.device,scopes:n.scopes,profile:n.name}),console.log(a(r?`Profile "${n.name}" re-authenticated.`:`Profile "${n.name}" created.`)),console.log(i(`Run ${e.code(`cf auth activate ${n.name}`)} to use this profile in a directory.`))}},b={command:`delete <name>`,describe:`Delete a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to delete`,demandOption:!0}),handler:async n=>{_(n,`delete`),v(),t(n.name);let r=u();if(!r.configs.exists(n.name))throw Error(`Profile "${n.name}" does not exist.`);let o=r.bindings.removeAllBindingsForProfile(n.name);if(o.length>0){console.log(a(`Removed directory bindings:`));for(let e of o)console.log(` ${e}`)}await m(n.name),r.configs.delete(n.name),console.log(a(`Profile "${n.name}" deleted.`));let s=r.bindings.getProfileForDirectory(process.cwd());s?console.log(a(`Active profile for this directory: ${s}.`)):r.configs.exists(`default`)?console.log(a(`This directory now uses the default profile.`)):console.log(i(`No active profile for this directory. Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`))}},x={command:`activate <name> [dir]`,describe:`Bind a named auth profile to a directory`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to activate`,demandOption:!0}).positional(`dir`,{type:`string`,description:`Directory to bind the profile to (defaults to current directory)`}),handler:e=>{_(e,`activate`,"Pass the profile name as the command argument: `cf auth activate <name>`."),v(),t(e.name);let n=u();if(!n.configs.exists(e.name))throw Error(`Profile "${e.name}" does not exist. Run \`cf auth create ${e.name}\` first.`);let r=e.dir??process.cwd();n.bindings.activate(e.name,r),console.log(a(`Profile "${e.name}" activated for "${g.resolve(r)}".`))}},S={command:`deactivate [dir]`,describe:`Remove the auth profile binding from a directory`,builder:e=>e.positional(`dir`,{type:`string`,description:`Directory to unbind (defaults to current directory). Must be the exact directory the profile was bound to.`}),handler:t=>{_(t,`deactivate`),v();let n=u(),r=t.dir??process.cwd(),{removedProfile:o,newResolution:s}=n.bindings.deactivate(r);console.log(a(`Profile "${o}" deactivated from "${g.resolve(r)}".`)),s.profile===void 0?console.log(i(`Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`)):s.profile===`default`?console.log(a(`This directory now uses the default profile.`)):console.log(a(`Now using: ${s.profile} (${s.source}).`))}},C={command:`list`,describe:`List all auth profiles`,handler:e=>{_(e,`list`);let t=u(),n=t.bindings.read(),r={};for(let[e,t]of Object.entries(n))(r[t]??=[]).push(e);h(t.configs.list().map(e=>({name:e,boundDirectories:r[e]??[]})))}},w={safeFlags:[`force`,`browser`,`device`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}},T={command:`login`,describe:`Authenticate with Cloudflare`,builder:e=>e.option(`force`,{type:`boolean`,alias:`f`,description:`Force re-authentication even if already logged in`,default:!1}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async t=>{_(t,`login`,"Run `cf auth create <name>` to authenticate a named profile.");let n=f();if(n!==`default`&&console.log(r(`This directory has profile "${n}" active. \`cf auth login\` updates the default profile, not "${n}".\nTo re-authenticate "${n}", run \`cf auth create ${n}\`.`)),d(`default`),!t.force&&o()){if(await p()){let t=s();console.log(a(`You are already logged in.`)),console.log(`${e.info(`Config file:`)} ${e.muted(c())}`),t?.expiration_time&&console.log(`${e.info(`Token expires:`)} ${new Date(t.expiration_time).toLocaleString()}`),console.log(i(`Run ${e.code(`cf auth login --force`)} to re-authenticate, or ${e.code(`cf auth logout`)} to log out.`));return}console.log(r(`Existing tokens are invalid or expired. Starting fresh login...
3
3
  `))}else t.force&&o()&&console.log(a(`Re-authenticating...
4
4
  `));if(console.log(a(`Starting OAuth login flow...
5
5
  `)),!await l({browser:t.browser,device:t.device,scopes:t.scopes,profile:`default`})){console.log(r(`CLOUDFLARE_API_TOKEN is set and takes precedence. Unset it to log in via OAuth.`));return}let u=s();console.log(`${e.info(`Config file:`)} ${e.muted(c())}`),u?.scopes&&(u.scopes.length>5?(console.log(`${e.info(`Scopes:`)} ${u.scopes.length} selected`),console.log(i(`Run ${e.code(`cf auth whoami`)} to see the full list.`))):console.log(`${e.info(`Scopes:`)} ${u.scopes.join(`, `)}`)),u?.expiration_time&&console.log(`${e.info(`Token expires:`)} ${new Date(u.expiration_time).toLocaleString()}`)}};export{y as a,C as c,_ as i,w as n,S as o,x as r,b as s,T as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";function c(e){return e.usage(`$0 logo-matches download get
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{r}from"./auth-C_-fMmUL.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BtNgm5yx.mjs";import{t as s}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";function c(e){return e.usage(`$0 logo-matches download get
3
3
 
4
4
  Return matches as CSV for logo queries based on ID`).option(`logo-id`,{type:`string`,description:`Logo ID`}).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Download matches for logo queries by ID`,builder:c,handler:async c=>s({command:`logo-matches download get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={logo_id:c[`logo-id`],offset:c.offset,limit:c.limit};if(c.dryRun){a({command:`cf logo-matches download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/brand-protection/logo-matches/download`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.logoMatches.download.get({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`download`,describe:`Operations for download`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.usage(`$0 logo-matches get
5
5