cf 1.0.0-beta.21 → 1.0.0-beta.22

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 (222) hide show
  1. package/dist/_meta/commands.json +5080 -4931
  2. package/dist/_meta/schemas.json +3051 -3055
  3. package/dist/{abuse-reports-CbUAnJxd.mjs → abuse-reports-GF9V-_qH.mjs} +1 -1
  4. package/dist/{access-C-78DlxL.mjs → access-dWdATy_5.mjs} +1 -1
  5. package/dist/{accounts-DEqQPxCz.mjs → accounts-CNpiDgQ-.mjs} +50 -52
  6. package/dist/{acm-jmhCq3Yh.mjs → acm-BXOuZNqO.mjs} +1 -1
  7. package/dist/{addressing-BeYFpQvC.mjs → addressing-BE4KpVHp.mjs} +1 -1
  8. package/dist/agent-context-Dtyy4aKL.mjs +2 -0
  9. package/dist/{agent-memory-Chlovb7j.mjs → agent-memory-WOFBlqfc.mjs} +1 -1
  10. package/dist/{ai-BndH3HYN.mjs → ai-2syYes5a.mjs} +1 -1
  11. package/dist/{ai-audit-BUJ-70O_.mjs → ai-audit-DBZnZtSH.mjs} +1 -1
  12. package/dist/{ai-gateway-CCk7VKhL.mjs → ai-gateway-BL8uRjav.mjs} +1 -1
  13. package/dist/{ai-search-BexET_wp.mjs → ai-search-xKyrECHJ.mjs} +1 -1
  14. package/dist/{ai-security-D4MxRlxX.mjs → ai-security-D-o76TBI.mjs} +1 -1
  15. package/dist/{alerting-rw8Oi3x7.mjs → alerting-D0Hh3IxQ.mjs} +1 -1
  16. package/dist/{analytics-q-guNEOK.mjs → analytics-BS_HDYYE.mjs} +1 -1
  17. package/dist/{analytics-engine-Bk7dQLcm.mjs → analytics-engine-B8J0AASh.mjs} +1 -1
  18. package/dist/api-X3wKppsT.mjs +3 -0
  19. package/dist/{api-security-BDc6gkf1.mjs → api-security-Dm-_J64v.mjs} +1 -1
  20. package/dist/{argo-CnLIqm0i.mjs → argo-DLLQUUEp.mjs} +1 -1
  21. package/dist/{artifacts-Cil33dzV.mjs → artifacts-B-ILiKwb.mjs} +1 -1
  22. package/dist/{audit-logs--E2Eclb7.mjs → audit-logs-B6f7Yyqb.mjs} +1 -1
  23. package/dist/{auth-BcNLQji1.mjs → auth-BlWCu-YH.mjs} +1 -1
  24. package/dist/auth-C0-WtqBw.mjs +2 -0
  25. package/dist/{auth-BtZmY6sE.mjs → auth-CENmPoCB.mjs} +1 -1
  26. package/dist/{auth-token-aF5AVLlH.mjs → auth-token-7Gn0n5N_.mjs} +1 -1
  27. package/dist/{autoconfig-Dbp6J25P.mjs → autoconfig-Bjb97Onj.mjs} +1 -1
  28. package/dist/{basin-catalog-dnVyzopm.mjs → basin-catalog-C61jbxPf.mjs} +1 -1
  29. package/dist/{billing-Fqp3jB2V.mjs → billing-CpbtioM3.mjs} +1 -1
  30. package/dist/blocks-DDNRRYxu.mjs +5 -0
  31. package/dist/{bot-management-SEDgo1Xg.mjs → bot-management-iYrqBG7K.mjs} +1 -1
  32. package/dist/{botnet-feed-DPqR4M0Y.mjs → botnet-feed-CiCwJ6Oe.mjs} +1 -1
  33. package/dist/{brand-protection-B8vwKfM9.mjs → brand-protection-D25yQ6cQ.mjs} +1 -1
  34. package/dist/{browser-run-BybYDq3I.mjs → browser-run-CC3fAKEB.mjs} +1 -1
  35. package/dist/build-CovoviZW.mjs +2 -0
  36. package/dist/{build-CWlpWVBf.mjs → build-DKFvtSB_.mjs} +1 -1
  37. package/dist/{builds-CvtOG-Gk.mjs → builds-AFdd5qia.mjs} +1 -1
  38. package/dist/{cache-Bme_d2Wx.mjs → cache-BI3Oyz-Z.mjs} +1 -1
  39. package/dist/{cli-CIKDqm-u.mjs → cli-Dji5-s1V.mjs} +1 -1
  40. package/dist/{client-side-security-ZQeRoo1t.mjs → client-side-security-rknn53xw.mjs} +1 -1
  41. package/dist/{cloud-connector-BeunZlNV.mjs → cloud-connector-BTc3qgHz.mjs} +1 -1
  42. package/dist/cloudforce-one-BoFYTYsT.mjs +316 -0
  43. package/dist/{command-CkZkTjIj.mjs → command-6vX_Ie2o.mjs} +1 -1
  44. package/dist/{command-DWWuXQV8.mjs → command-BDFf54JB.mjs} +1 -1
  45. package/dist/{command-C9CNvZi_.mjs → command-B_C1I0aq.mjs} +1 -1
  46. package/dist/{command-CzWWQv8j.mjs → command-BpmbvQqK.mjs} +1 -1
  47. package/dist/{command-BGRucANI.mjs → command-CKEmPXtc.mjs} +1 -1
  48. package/dist/{command-CQ5qHE7n.mjs → command-CiBygnsK.mjs} +1 -1
  49. package/dist/{command-B3uWlw57.mjs → command-KuJJ2WEe.mjs} +1 -1
  50. package/dist/{command-prWMAJbg.mjs → command-WlIhTGN6.mjs} +1 -1
  51. package/dist/{command-DkwmylF2.mjs → command-leDr72L4.mjs} +1 -1
  52. package/dist/{command-CtlD6MEi.mjs → command-ukMoR-tT.mjs} +1 -1
  53. package/dist/{completions-2Otv0HMd.mjs → completions-DGe2alry.mjs} +1 -1
  54. package/dist/{connector-interrupts-Dfhxupmg.mjs → connector-interrupts-DZyCZta-.mjs} +1 -1
  55. package/dist/{connector-telemetry-events-CLVpDTIa.mjs → connector-telemetry-events-BP5GTJuQ.mjs} +1 -1
  56. package/dist/{connector-telemetry-snapshots-E_1tmNmQ.mjs → connector-telemetry-snapshots-Q9y68rU7.mjs} +1 -1
  57. package/dist/{connectors-ChJpQFSl.mjs → connectors-C6wEHhyM.mjs} +1 -1
  58. package/dist/{containers-Cj5-9nUg.mjs → containers-DcR44W-a.mjs} +2 -2
  59. package/dist/{containers-CzAZfmnj.mjs → containers-f3DbMCIO.mjs} +1 -1
  60. package/dist/{content-scan-CIA_9PV8.mjs → content-scan-cQbQH1Ko.mjs} +1 -1
  61. package/dist/{context-DVh8Wyfs.mjs → context-CSjTAJ8s.mjs} +1 -1
  62. package/dist/{cps-hJkqdsHx.mjs → cps-aDZte41c.mjs} +1 -1
  63. package/dist/create-BtmuVqVL.mjs +2 -0
  64. package/dist/{csam-scanner-cCVO3lNF.mjs → csam-scanner-cRaGDmR_.mjs} +1 -1
  65. package/dist/{custom-csrs-BrTWUZ0c.mjs → custom-csrs-DoAFlLRn.mjs} +1 -1
  66. package/dist/{custom-hostnames-C4ft77oC.mjs → custom-hostnames-5vHNAJo7.mjs} +1 -1
  67. package/dist/{custom-nameservers-BWfrZhD1.mjs → custom-nameservers-B7dTZfCW.mjs} +1 -1
  68. package/dist/{custom-pages-DqTMKtRc.mjs → custom-pages-DsXlaGqQ.mjs} +1 -1
  69. package/dist/{d1-B58AA9PA.mjs → d1-DZ2JyfdZ.mjs} +3 -3
  70. package/dist/{delegate-D7yYckA4.mjs → delegate-DzeuzE99.mjs} +1 -1
  71. package/dist/delegate.mjs +1 -1
  72. package/dist/{deploy-CEROLAdh.mjs → deploy-CPFnQQOk.mjs} +1 -1
  73. package/dist/{deploy-context-Do89WayB.mjs → deploy-context-C_YUdUN-.mjs} +1 -1
  74. package/dist/{deploy-input-DyMuMsi5.mjs → deploy-input-CKQOolPd.mjs} +1 -1
  75. package/dist/{dev-BaFS7kOM.mjs → dev-rRWAGDV_.mjs} +1 -1
  76. package/dist/{diagnostics-4gfYj7Pf.mjs → diagnostics-BIuJQRjU.mjs} +1 -1
  77. package/dist/{dls-ClWVxTBg.mjs → dls-BurMhzEE.mjs} +1 -1
  78. package/dist/{dns-CML-wxIt.mjs → dns-Dl1VSmFf.mjs} +1 -1
  79. package/dist/{dns-firewall-CL0b3dJ1.mjs → dns-firewall-BykvgGT1.mjs} +1 -1
  80. package/dist/{docs-BeYBHwUN.mjs → docs-FllOac9a.mjs} +1 -1
  81. package/dist/{durable-objects-uZECeq_f.mjs → durable-objects-BNCJA3NE.mjs} +1 -1
  82. package/dist/{email-auth-CCNW798I.mjs → email-auth-BYvR29qP.mjs} +1 -1
  83. package/dist/{email-domains-1rD1d84O.mjs → email-domains-C3jG7o39.mjs} +1 -1
  84. package/dist/{email-routing-CYv-LrbV.mjs → email-routing-BQ7b2KAy.mjs} +1 -1
  85. package/dist/{email-security-CWEUYPYo.mjs → email-security-CsoNcUfp.mjs} +1 -1
  86. package/dist/{email-sending-DHSzCfJx.mjs → email-sending-d_b9vyge.mjs} +3 -3
  87. package/dist/{error-sanitization-DWJ5ka7h.mjs → error-sanitization-ahuAGEjT.mjs} +1 -1
  88. package/dist/error-sanitization-rodO1WCL.mjs +2 -0
  89. package/dist/{errors-ol9sMqSe.mjs → errors-DFSWbpd6.mjs} +5 -5
  90. package/dist/{field-extractors-CuBM_uO4.mjs → field-extractors-Be4UTSz-.mjs} +1 -1
  91. package/dist/{firewall-SMIUSypF.mjs → firewall-DYGPUErP.mjs} +1 -1
  92. package/dist/{flagship-D3v6iDdw.mjs → flagship-HIikhoYo.mjs} +1 -1
  93. package/dist/{fraud-B2f7O15X.mjs → fraud-DNAOkNU5.mjs} +1 -1
  94. package/dist/get-Be821dio.mjs +2 -0
  95. package/dist/{google-tag-gateway-BwOc62Gy.mjs → google-tag-gateway-DHvhuTYu.mjs} +1 -1
  96. package/dist/{healthchecks-BQXHnihB.mjs → healthchecks-BKtoWgF2.mjs} +1 -1
  97. package/dist/{hyperdrive-Bd6Yfje3.mjs → hyperdrive-DQrmkuSh.mjs} +1 -1
  98. package/dist/{iam-qJPI1_aZ.mjs → iam-BEs1Geob.mjs} +1 -1
  99. package/dist/{images-goHZJOxy.mjs → images-D55kUS0m.mjs} +1 -1
  100. package/dist/index.mjs +1 -1
  101. package/dist/{init-CVx0Ya1E.mjs → init-BTXSeUaj.mjs} +1 -1
  102. package/dist/{intel-CwiqwJI9.mjs → intel-BDbanlya.mjs} +1 -1
  103. package/dist/{internal-5cnlw9mH.mjs → internal-Cj_Wo6sr.mjs} +1 -1
  104. package/dist/{ips-KBxmXhvO.mjs → ips-CHrG3mwW.mjs} +1 -1
  105. package/dist/{k2-KhIP5NFT.mjs → k2-CJzI3dVt.mjs} +1 -1
  106. package/dist/{kv-CCem2sEY.mjs → kv-BjfDMxOg.mjs} +1 -1
  107. package/dist/{lazy-command-BMhD5ffF.mjs → lazy-command-DkI_21Dt.mjs} +1 -1
  108. package/dist/{leaked-credential-checks-BkPZiwE2.mjs → leaked-credential-checks-BHe-erAg.mjs} +1 -1
  109. package/dist/{live-BhHzxFna.mjs → live-DSwOLngp.mjs} +1 -1
  110. package/dist/{load-balancers-17GBXdju.mjs → load-balancers-CWNEVfum.mjs} +1 -1
  111. package/dist/{login-Buhvx6Fi.mjs → login-CJYJE6Ae.mjs} +1 -1
  112. package/dist/login-D2Bf_HMY.mjs +2 -0
  113. package/dist/{logpush-BCCUxa4J.mjs → logpush-BQhzhkBY.mjs} +1 -1
  114. package/dist/{logs-4CwupKRG.mjs → logs-DndNcbrR.mjs} +1 -1
  115. package/dist/{magic-cloud-networking-Xy6SC-V-.mjs → magic-cloud-networking-XmIKU6F1.mjs} +1 -1
  116. package/dist/{magic-network-monitoring-B8pRZp2g.mjs → magic-network-monitoring-BgPLcQzT.mjs} +1 -1
  117. package/dist/{magic-transit-CwfO3OOX.mjs → magic-transit-C2kLj1Hd.mjs} +1 -1
  118. package/dist/{managed-defense-CtFLuvuB.mjs → managed-defense-Bq63Exyv.mjs} +1 -1
  119. package/dist/{managed-transforms-Hto8OCBS.mjs → managed-transforms-Bz3Q6vSk.mjs} +1 -1
  120. package/dist/{mcp-SQ0MAVUJ.mjs → mcp-IiegTI5c.mjs} +1 -1
  121. package/dist/{mesh-C8A6tVqA.mjs → mesh-C7sj3FL4.mjs} +1 -1
  122. package/dist/{migrate-Dufxsb_F.mjs → migrate-D7pH9_Y8.mjs} +1 -1
  123. package/dist/{monetization-CYVaCAe9.mjs → monetization-DvfqZhGk.mjs} +1 -1
  124. package/dist/{network-CJBTdEM3.mjs → network-CnqNYoOf.mjs} +1 -1
  125. package/dist/{network-interconnects-CKlNFj3i.mjs → network-interconnects-BXftLikd.mjs} +1 -1
  126. package/dist/{o11y-5x2Q8CWm.mjs → o11y-1Qku543b.mjs} +1 -1
  127. package/dist/{oauth-BN6_FpYp.mjs → oauth-B-SYl8nR.mjs} +1 -1
  128. package/dist/{oauth-D_A8AcIS.mjs → oauth-C6uYSFM5.mjs} +1 -1
  129. package/dist/{oauth-clients-qKXg8ZH3.mjs → oauth-clients-DXNO-K_e.mjs} +1 -1
  130. package/dist/{oauth-scopes-Ct1jDyC5.mjs → oauth-scopes-WxoyDblU.mjs} +1 -1
  131. package/dist/{organization-lBQSeqS1.mjs → organization-HBQnzh8z.mjs} +1 -1
  132. package/dist/{organizations-DEX8Er3g.mjs → organizations-DvS-ENN2.mjs} +1 -1
  133. package/dist/{origin-post-quantum-encryption-DUsxVGCs.mjs → origin-post-quantum-encryption-BnjX0dCp.mjs} +1 -1
  134. package/dist/package-DAB8HAGn.mjs +2 -0
  135. package/dist/{page-rules-BMt6nt03.mjs → page-rules-CypVq1Wb.mjs} +1 -1
  136. package/dist/{pages-Jxa92ECz.mjs → pages-BxLbPYIf.mjs} +1 -1
  137. package/dist/{pay-per-crawl-Cv0044CZ.mjs → pay-per-crawl-KidGhWnn.mjs} +1 -1
  138. package/dist/{pay-per-use-DGEeG-dC.mjs → pay-per-use-DcsdwXr7.mjs} +1 -1
  139. package/dist/{pipelines-CEC78A3w.mjs → pipelines-CX7esgh3.mjs} +1 -1
  140. package/dist/{precursor-Ba0Ejhzt.mjs → precursor-BzDcAmUT.mjs} +1 -1
  141. package/dist/{previews-DnZbUTym.mjs → previews-B7MZKZK6.mjs} +1 -1
  142. package/dist/{progress-CtGsPOpV.mjs → progress-BcjUdm_B.mjs} +1 -1
  143. package/dist/{prompt-YrI7ltMa.mjs → prompt-BFRinxR0.mjs} +1 -1
  144. package/dist/{queues-Chq997uj.mjs → queues-mSjNdJNl.mjs} +1 -1
  145. package/dist/{r2-BFgZDs-F.mjs → r2-ClBc0jT0.mjs} +1 -1
  146. package/dist/{radar-DJdDzLJw.mjs → radar-C9GwykGn.mjs} +1 -1
  147. package/dist/{raw-fetch-BE3QgdTE.mjs → raw-fetch-BO0VqOVx.mjs} +1 -1
  148. package/dist/{ready-Cok0aqke.mjs → ready-DhdeN4ga.mjs} +1 -1
  149. package/dist/{realtime-BHWWCiKp.mjs → realtime-9V5zWcij.mjs} +73 -71
  150. package/dist/{registrar-9Y-1IQ0n.mjs → registrar-DsI2A62h.mjs} +1 -1
  151. package/dist/{registrar-sandbox-DTS1kRnb.mjs → registrar-sandbox-DcjFW26g.mjs} +1 -1
  152. package/dist/{reporting-D5RbKQJf.mjs → reporting-pAQ3jvEO.mjs} +1 -1
  153. package/dist/{request-headers-KhW_hy36.mjs → request-headers-DFPlTFRf.mjs} +1 -1
  154. package/dist/{request-tracers-wxWCjmHo.mjs → request-tracers-CQqdbHj8.mjs} +1 -1
  155. package/dist/{resource-sharing-BGoaVvJa.mjs → resource-sharing-BJraifhD.mjs} +1 -1
  156. package/dist/{rules-Cd3EjhdF.mjs → rules-B_Mopjel.mjs} +1 -1
  157. package/dist/{rulesets-Bnz3rSBT.mjs → rulesets-DRV0HtYz.mjs} +1 -1
  158. package/dist/{rum-CK9HEe3O.mjs → rum-D5dYq2Uy.mjs} +1 -1
  159. package/dist/{run-DnZGQbq_.mjs → run--9dxcon4.mjs} +1 -1
  160. package/dist/run-BUebYPOn.mjs +2 -0
  161. package/dist/{schema-flags-BrDlFwLv.mjs → schema-flags-blYVIAUK.mjs} +1 -1
  162. package/dist/{scim-UdqaWnOu.mjs → scim-C91WGj_g.mjs} +1 -1
  163. package/dist/{secrets-store-Bf5v96LC.mjs → secrets-store-D4Zr-fuz.mjs} +3 -3
  164. package/dist/{security-insights-BAGySlGu.mjs → security-insights-DJWdVax5.mjs} +1 -1
  165. package/dist/{security-txt-D0fMmjHs.mjs → security-txt-B0NLFJNk.mjs} +1 -1
  166. package/dist/{session-6xqrJWXy.mjs → session-Bafy81hj.mjs} +1 -1
  167. package/dist/{shared-DYRRG9A-.mjs → shared-rCcn7D66.mjs} +1 -1
  168. package/dist/{signed-url-Ce0muRem.mjs → signed-url-DBf_p7Wf.mjs} +1 -1
  169. package/dist/{smart-shield-CCy7_M3j.mjs → smart-shield-BufLvdU3.mjs} +1 -1
  170. package/dist/{snippets-Bc8m3HSV.mjs → snippets-DA2Gk50m.mjs} +1 -1
  171. package/dist/{spawn-BAEdy9kS.mjs → spawn-hrdbxnm1.mjs} +1 -1
  172. package/dist/{spectrum-DtNX8WBX.mjs → spectrum-DlI8qtVo.mjs} +1 -1
  173. package/dist/{speed-TbkeWV_x.mjs → speed-DNwm5gYl.mjs} +1 -1
  174. package/dist/{sql-DI319y25.mjs → sql-aBDdRWdd.mjs} +1 -1
  175. package/dist/{src-Dc6ojwUW.mjs → src-4-uZcDN_.mjs} +5 -5
  176. package/dist/{ssl-D0MIzFl2.mjs → ssl-DEDucWlo.mjs} +1 -1
  177. package/dist/{stream-4Mrb8HEo.mjs → stream-DGv9Bssl.mjs} +1 -1
  178. package/dist/{tags-BP25qydR.mjs → tags-CNBA4Pf1.mjs} +1 -1
  179. package/dist/telemetry-THz8wtoW.mjs +2 -0
  180. package/dist/{telemetry-DKSJSLtq.mjs → telemetry-klBrZrC7.mjs} +1 -1
  181. package/dist/{tenant-jmfZqEZ4.mjs → tenant-DVtqafWB.mjs} +1 -1
  182. package/dist/{tenant-custom-nameservers-BzVP85Tq.mjs → tenant-custom-nameservers-CtrqQc_i.mjs} +1 -1
  183. package/dist/{tunnels-BNswR1Dj.mjs → tunnels-Bc_r--ln.mjs} +2 -2
  184. package/dist/{turnstile-BgsTP2fz.mjs → turnstile-Cr2cTE0C.mjs} +1 -1
  185. package/dist/ui-DvC7Qa0H.mjs +2 -0
  186. package/dist/{update-check-BOF1hn_I.mjs → update-check-B5V9BBM7.mjs} +1 -1
  187. package/dist/{update-check-C7mfEeQ7.mjs → update-check-C5bJ4-Ef.mjs} +1 -1
  188. package/dist/update-check-worker.mjs +1 -1
  189. package/dist/{url-normalization-Bqrs4-2F.mjs → url-normalization-D6r0sLRj.mjs} +1 -1
  190. package/dist/{url-scanner-Dm4Fps5T.mjs → url-scanner-D4u7jbzf.mjs} +1 -1
  191. package/dist/{user-u_LxzLM4.mjs → user-DhWPKWo0.mjs} +1 -1
  192. package/dist/{vectorize-DLGiOyd4.mjs → vectorize-CB9IjpC3.mjs} +1 -1
  193. package/dist/version-Dp7G_dM6.mjs +2 -0
  194. package/dist/{waiting-rooms-DmgJgJXb.mjs → waiting-rooms-BYlwhzgD.mjs} +1 -1
  195. package/dist/{web-assets-rNhZWP-6.mjs → web-assets-Nn2HArqh.mjs} +1 -1
  196. package/dist/{web3-BVBdFt8E.mjs → web3-DpJNkFNQ.mjs} +1 -1
  197. package/dist/{workers-CjUKJvH8.mjs → workers-BkNt1wSN.mjs} +2 -2
  198. package/dist/{workers-builds-D3Q97l7X.mjs → workers-builds-BL3dK2R3.mjs} +1 -1
  199. package/dist/{workers-for-platforms-C_fcw30y.mjs → workers-for-platforms-CAQLG6dE.mjs} +1 -1
  200. package/dist/{workers-vpc-CnRO3Stc.mjs → workers-vpc-WnRec8oo.mjs} +1 -1
  201. package/dist/{workflows-cpHFe5v6.mjs → workflows-DpXBMizW.mjs} +1 -1
  202. package/dist/{wrangler-migration-DQehjmoh.mjs → wrangler-migration-__jrVjrp.mjs} +1 -1
  203. package/dist/{zaraz-BRj0J7vK.mjs → zaraz-hWisKRaN.mjs} +1 -1
  204. package/dist/{zero-trust-CVZKDLCB.mjs → zero-trust-DiZhiSa4.mjs} +37 -37
  205. package/dist/{zone-N6ccK70C.mjs → zone-D7b949er.mjs} +1 -1
  206. package/dist/{zones-C4S_kpGz.mjs → zones-giCZ0LO8.mjs} +1 -1
  207. package/package.json +1 -1
  208. package/dist/agent-context-DFEgYjEQ.mjs +0 -2
  209. package/dist/api-eMuS5GI1.mjs +0 -3
  210. package/dist/auth-B0lEsD_1.mjs +0 -2
  211. package/dist/blocks-BOQH-Won.mjs +0 -5
  212. package/dist/build-BqGmiORA.mjs +0 -2
  213. package/dist/cloudforce-one-D20t9ojD.mjs +0 -370
  214. package/dist/create-OXylMu6m.mjs +0 -2
  215. package/dist/error-sanitization-Byb-_IS9.mjs +0 -2
  216. package/dist/get-iPUHxD1r.mjs +0 -2
  217. package/dist/login-BTiflOun.mjs +0 -2
  218. package/dist/package-BqSbnt6u.mjs +0 -2
  219. package/dist/run-Be6Js7D6.mjs +0 -2
  220. package/dist/telemetry-CvZean4s.mjs +0 -2
  221. package/dist/ui-Bo6DCvbS.mjs +0 -2
  222. package/dist/version-DmTuWNZ5.mjs +0 -2
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./chunk-2HLTAS5V-B92NbX1j.mjs";import{n}from"./version-DmTuWNZ5.mjs";import{i as r,t as i}from"./blocks-BOQH-Won.mjs";import{t as a}from"./session-6xqrJWXy.mjs";import{n as o}from"./api-eMuS5GI1.mjs";var s=class extends Error{};function c(e){return e instanceof s||`telemetryMessage`in e&&e.telemetryMessage===`cfetch auth login required`&&`reason`in e&&e.reason===`no-credentials-non-interactive`}function l(e){try{let t=new URL(e);return`${t.pathname.replace(/^\/client\/v\d+/,``)}${t.search}`}catch{return e}}function u(s){if(a(n),s instanceof o){let t=s.statusCode,n=s.body,a=t===void 0?`Envelope Error`:f(t),o=[];if(n){let e=n;Array.isArray(e.errors)&&(o=e.errors)}let c=s.rawResponse?.url?`HTTP ${l(s.rawResponse.url)}`:void 0,u=t===void 0?a:`${t} ${a}`,d=c?`${u} · ${c}`:u,p=e.muted(d),m=``;return o.length>0?m=o.map((t,n)=>{let r=typeof t.code==`number`?e.error(e.bold(`[${t.code}]`)):e.error(e.bold(`[error]`)),i=e.bold(t.message??``);return n===o.length-1?`${r} ${i}\n${p}`:`${r} ${i}`}).join(`
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./chunk-2HLTAS5V-B92NbX1j.mjs";import{n}from"./version-Dp7G_dM6.mjs";import{i as r,t as i}from"./blocks-DDNRRYxu.mjs";import{t as a}from"./session-Bafy81hj.mjs";import{n as o}from"./api-X3wKppsT.mjs";var s=class extends Error{};function c(e){return e instanceof s||`telemetryMessage`in e&&e.telemetryMessage===`cfetch auth login required`&&`reason`in e&&e.reason===`no-credentials-non-interactive`}function l(e){try{let t=new URL(e);return`${t.pathname.replace(/^\/client\/v\d+/,``)}${t.search}`}catch{return e}}function u(e){return Array.isArray(e)?e.flatMap(e=>{if(typeof e==`string`)return[{message:e}];if(typeof e!=`object`||!e)return[];let t=e,n=typeof t.code==`number`?t.code:void 0,r=typeof t.message==`string`?t.message:void 0;return n!==void 0||r!==void 0?[{code:n,message:r}]:[]}):[]}function d(s){if(a(n),s instanceof o){let t=s.statusCode,n=s.body,a=t===void 0?`Envelope Error`:p(t),o=typeof n==`object`&&n?n:void 0,c=[...u(o?.errors).map(e=>({...e,isError:!0})),...u(o?.messages).map(e=>({...e,isError:!1}))],d=s.rawResponse?.url?`HTTP ${l(s.rawResponse.url)}`:void 0,f=t===void 0?a:`${t} ${a}`,m=d?`${f} · ${d}`:f,h=e.muted(m),g=``;return c.length>0?g=c.map((t,n)=>{let r=typeof t.code==`number`?e.error(e.bold(`[${t.code}]`)):t.isError?e.error(e.bold(`[error]`)):void 0,i=e.bold(t.message??``),a=r?`${r} ${i}`:i;return n===c.length-1?`${a}\n${h}`:a}).join(`
3
3
 
4
- `):(m=e.error(e.bold(s.message||d)),s.message&&d&&(m+=`\n${p}`)),console.error(i(m,void 0,{title:`APIError`,rawMessage:!0})),t===401?console.error(`
4
+ `):(g=e.error(e.bold(s.message||m)),s.message&&m&&(g+=`\n${h}`)),console.error(i(g,void 0,{title:`APIError`,rawMessage:!0})),t===401?console.error(`
5
5
  `+r(`Try running: cf auth login`)):t===403&&console.error(`
6
- `+r(`Check your API token permissions`)),s}if(s instanceof t){let t=s.status===void 0?``:`${s.status} ${f(s.status)}`.trim(),n=t?e.muted(t):``,a=s.notes??[],o;if(a.length>0){let t=typeof s.code==`number`?e.error(e.bold(`[${s.code}]`)):e.error(e.bold(`[error]`));o=a.map((r,i)=>{let o=e.bold(r.text),s=i===0?`${t} ${o}`:o;return i===a.length-1&&n?`${s}\n${n}`:s}).join(`
6
+ `+r(`Check your API token permissions`)),s}if(s instanceof t){let t=s.status===void 0?``:`${s.status} ${p(s.status)}`.trim(),n=t?e.muted(t):``,a=s.notes??[],o;if(a.length>0){let t=typeof s.code==`number`?e.error(e.bold(`[${s.code}]`)):e.error(e.bold(`[error]`));o=a.map((r,i)=>{let o=e.bold(r.text),s=i===0?`${t} ${o}`:o;return i===a.length-1&&n?`${s}\n${n}`:s}).join(`
7
7
 
8
8
  `)}else{let t=e.error(e.bold(s.message));o=n?`${t}\n${n}`:t}return console.error(i(o,void 0,{title:`APIError`,rawMessage:!0})),s.status===401?console.error(`
9
9
  `+r(`Try running: cf auth login`)):s.status===403&&console.error(`
10
- `+r(`Check your API token permissions`)),s}if(s instanceof Error){let e=process.env.DEBUG&&s.stack?d(s.stack):void 0;return console.error(i(s.message,e)),c(s)&&console.error(`
11
- `+r("To continue without logging in, rerun this command with `--temporary-account`. cf will use a temporary account and print a claim URL.")),s}return console.error(i(`An unexpected error occurred`,String(s))),s}function d(e){return e.replace(/[A-Za-z0-9_-]{40,}/g,`[REDACTED]`)}function f(e){return{400:`Bad Request`,401:`Unauthorized`,403:`Forbidden`,404:`Not Found`,405:`Method Not Allowed`,409:`Conflict`,422:`Unprocessable Entity`,429:`Too Many Requests`,500:`Internal Server Error`,502:`Bad Gateway`,503:`Service Unavailable`,504:`Gateway Timeout`}[e]??``}export{u as n,s as t};
10
+ `+r(`Check your API token permissions`)),s}if(s instanceof Error){let e=process.env.DEBUG&&s.stack?f(s.stack):void 0;return console.error(i(s.message,e)),c(s)&&console.error(`
11
+ `+r("To continue without logging in, rerun this command with `--temporary-account`. cf will use a temporary account and print a claim URL.")),s}return console.error(i(`An unexpected error occurred`,String(s))),s}function f(e){return e.replace(/[A-Za-z0-9_-]{40,}/g,`[REDACTED]`)}function p(e){return{400:`Bad Request`,401:`Unauthorized`,403:`Forbidden`,404:`Not Found`,405:`Method Not Allowed`,409:`Conflict`,422:`Unprocessable Entity`,429:`Too Many Requests`,500:`Internal Server Error`,502:`Bad Gateway`,503:`Service Unavailable`,504:`Gateway Timeout`}[e]??``}export{d as n,s as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,t as i}from"./context-DVh8Wyfs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-CtGsPOpV.mjs";import{t as c}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as l,n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./prompt-YrI7ltMa.mjs";var p={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/field_extractors/${t.extractor}`,errors:{404:`NotFoundError`}};function m(e){return e.usage(`$0 field-extractors delete <extractor>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BlWCu-YH.mjs";import{a as r,t as i}from"./context-CSjTAJ8s.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-BcjUdm_B.mjs";import{t as c}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as l,n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./prompt-BFRinxR0.mjs";var p={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/field_extractors/${t.extractor}`,errors:{404:`NotFoundError`}};function m(e){return e.usage(`$0 field-extractors 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 h={command:`delete <extractor>`,describe:`Delete Field Extractor`,builder:m,handler:async e=>c({command:`field-extractors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf field-extractors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/field_extractors/${e.extractor==null?`<extractor>`:encodeURIComponent(String(e.extractor))}`,pathParams:{extractor:String(e.extractor??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(p,{account_id:l,extractor:e.extractor}));a(u,{successLabel:`Deleted`})})};var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/field_extractors/${t.extractor}`,errors:{404:`NotFoundError`}};function _(e){return e.usage(`$0 field-extractors get <extractor>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as u,n as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{i as m,n as h}from"./prompt-YrI7ltMa.mjs";var g={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules`,body:`json`};function _(e){return e.usage(`$0 firewall access-rules create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BlWCu-YH.mjs";import{a as r,i,t as a}from"./context-CSjTAJ8s.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-BcjUdm_B.mjs";import{t as l}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as u,n as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{i as m,n as h}from"./prompt-BFRinxR0.mjs";var g={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules`,body:`json`};function _(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`]}).coerce(`configuration-target`,e=>p(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).coerce(`access-rule-mode`,e=>p(e,`access-rule-mode`,`text`)).option(`notes`,{type:`string`,description:`An informative summary of the rule, typically used as a reminder or explanation.`,default:``}).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 an IP Access rule`,builder:_,handler:async e=>l({command:`firewall access-rules create`,classification:{safeFlags:[`configuration-target`,`access-rule-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf firewall access-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?f({configuration:{target:e[`configuration-target`],value:p(e[`configuration-value`],`configuration-value`,`text`)},mode:e[`access-rule-mode`],notes:p(e.notes,`notes`,`text`)}):d(e.body)});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,h=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=d(e.body),n=await c(`Creating`,async()=>l.send(g,{body:t,account_or_zone:u,account_or_zone_id:h}));o(n,{successLabel:`Created`});return}e[`access-rule-mode`]===void 0&&(e[`access-rule-mode`]=await m(`access-rule-mode`,`The action to apply to a matched request.`,[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]));let _=f({configuration:{target:e[`configuration-target`],value:p(e[`configuration-value`],`configuration-value`,`text`)},mode:e[`access-rule-mode`],notes:p(e.notes,`notes`,`text`)}),v=await c(`Creating`,async()=>l.send(g,{body:_,account_or_zone:u,account_or_zone_id:h}));o(v,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules/${t.rule_id}`};function b(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"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-YrI7ltMa.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 flagship apps create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BlWCu-YH.mjs";import{a as i,t as a}from"./context-CSjTAJ8s.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-BcjUdm_B.mjs";import{t as l}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-BFRinxR0.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function v(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 y={command:`create`,describe:`Create app`,builder:v,handler:async e=>l({command:`flagship apps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(_,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`));let u=p({name:m(e.name,`name`,`text`)}),f=await c(`Creating`,async()=>n.send(_,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};function b(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 x={command:`get <app-id>`,describe:`Get flag definitions`,builder:b,handler:async e=>l({command:`flagship apps definitions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`if-none-match`]!==void 0&&(l[`If-None-Match`]=String(e[`if-none-match`])),e.dryRun){let t=await i();s({command:`cf flagship apps definitions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/definitions`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/flagship/apps/${encodeURIComponent(String(e[`app-id`]))}/definitions`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})},ee={command:`definitions`,describe:`Operations for apps.definitions`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var te={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function S(e){return e.usage(`$0 flagship apps delete <app-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BcNLQji1.mjs";import{i as n}from"./context-DVh8Wyfs.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-CtGsPOpV.mjs";import{t as o}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";var u={method:`GET`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`};function d(e){return e.usage(`$0 fraud get
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BlWCu-YH.mjs";import{i as n}from"./context-CSjTAJ8s.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-BcjUdm_B.mjs";import{t as o}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";var u={method:`GET`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`};function d(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 f={command:`get`,describe:`Get Fraud Detection Settings`,builder:d,handler:async e=>o({command:`fraud get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf fraud get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/fraud_detection/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(u,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var p={method:`PUT`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`,body:`json`};function m(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`]}).coerce(`authentication-settings-failure-criteria-kind`,e=>l(e,`authentication-settings-failure-criteria-kind`,`text`)).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"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";var t={method:`GET`,path:t=>e`/accounts/${t.account_id}/cfd_tunnel/${t.tunnel_id}/token`};export{t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BcNLQji1.mjs";import{i as n}from"./context-DVh8Wyfs.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-CtGsPOpV.mjs";import{t as o}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u}from"./prompt-YrI7ltMa.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/settings/google-tag-gateway/config`};function f(e){return e.usage(`$0 google-tag-gateway config get
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BlWCu-YH.mjs";import{i as n}from"./context-CSjTAJ8s.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-BcjUdm_B.mjs";import{t as o}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u}from"./prompt-BFRinxR0.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/settings/google-tag-gateway/config`};function f(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 p={command:`get`,describe:`Get Google Tag Gateway configuration`,builder:f,handler:async e=>o({command:`google-tag-gateway config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf google-tag-gateway config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/google-tag-gateway/config`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var m={method:`PUT`,path:t=>e`/zones/${t.zone_id}/settings/google-tag-gateway/config`,body:`json`};function h(e){return e.usage(`$0 google-tag-gateway config update
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BcNLQji1.mjs";import{i as n}from"./context-DVh8Wyfs.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-CtGsPOpV.mjs";import{t as o}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as s,r as c,t as l}from"./body-parser-ChnyBsfm.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-YrI7ltMa.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/healthchecks`,body:`json`};function m(e){return e.usage(`$0 healthchecks create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BlWCu-YH.mjs";import{i as n}from"./context-CSjTAJ8s.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-BcjUdm_B.mjs";import{t as o}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{n as s,r as c,t as l}from"./body-parser-ChnyBsfm.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-BFRinxR0.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/healthchecks`,body:`json`};function m(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-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>u(e,`http-config-method`,`text`)).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`]}).coerce(`tcp-config-method`,e=>u(e,`tcp-config-method`,`text`)).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 h={command:`create`,describe:`Create Health Check`,builder:m,handler:async e=>o({command:`healthchecks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(p,{body:t,zone_id:f}));r(n,{successLabel:`Created`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let m=l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]),h=await a(`Creating`,async()=>o.send(p,{body:m,zone_id:f}));r(h,{successLabel:`Created`})})};var g={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/healthchecks/${t.healthcheck_id}`};function _(e){return e.usage(`$0 healthchecks delete <healthcheck-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,t as i}from"./context-DVh8Wyfs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-CtGsPOpV.mjs";import{t as c}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-YrI7ltMa.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs`,body:`json`};function g(e){return e.usage(`$0 hyperdrive create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BlWCu-YH.mjs";import{a as r,t as i}from"./context-CSjTAJ8s.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-BcjUdm_B.mjs";import{t as c}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-BFRinxR0.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs`,body:`json`};function g(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`]}).coerce(`mtls-sslmode`,e=>d(e,`mtls-sslmode`,`text`)).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"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,t as i}from"./context-DVh8Wyfs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-CtGsPOpV.mjs";import{t as c}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as l,n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-YrI7ltMa.mjs";var h={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/permission_groups/${t.permission_group_id}`};function g(e){return e.usage(`$0 iam permission-groups get <permission-group-id>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BlWCu-YH.mjs";import{a as r,t as i}from"./context-CSjTAJ8s.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-BcjUdm_B.mjs";import{t as c}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as l,n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-BFRinxR0.mjs";var h={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/permission_groups/${t.permission_group_id}`};function g(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:g,handler:async e=>c({command:`iam permission-groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam permission-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/permission_groups/${e[`permission-group-id`]==null?`<permission-group-id>`:encodeURIComponent(String(e[`permission-group-id`]))}`,pathParams:{"permission-group-id":String(e[`permission-group-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(h,{account_id:l,permission_group_id:e[`permission-group-id`]}));a(u,{successLabel:`Loaded`})})};var _={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/permission_groups`,query:[`id`,`name`,`label`,`page`,`per_page`]};function v(e){return e.usage(`$0 iam permission-groups list
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,i as a,t as o}from"./context-DVh8Wyfs.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-CtGsPOpV.mjs";import{t as u}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as d,n as f,r as p,t as m}from"./body-parser-ChnyBsfm.mjs";import{n as h,t as g}from"./input-validation-D7z60HJH.mjs";import{a as _,i as v,n as y}from"./prompt-YrI7ltMa.mjs";import{n as b,t as x}from"./raw-fetch-BE3QgdTE.mjs";var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v1`,pathParams:[`account_id`],body:`form`};function ee(e){return e.usage(`$0 images create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BlWCu-YH.mjs";import{a as i,i as a,t as o}from"./context-CSjTAJ8s.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-BcjUdm_B.mjs";import{t as u}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as d,n as f,r as p,t as m}from"./body-parser-ChnyBsfm.mjs";import{n as h,t as g}from"./input-validation-D7z60HJH.mjs";import{a as _,i as v,n as y}from"./prompt-BFRinxR0.mjs";import{n as b,t as x}from"./raw-fetch-BO0VqOVx.mjs";var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v1`,pathParams:[`account_id`],body:`form`};function ee(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 te={command:`create`,describe:`Upload an image`,builder:ee,handler:async e=>u({command:`images create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file,creator:e.creator,id:e.id,metadata:e.metadata,"require-signed-urls":e[`require-signed-urls`],url:e.url}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.creator!==void 0||e.id!==void 0||e.metadata!==void 0||e[`require-signed-urls`]!==void 0||e.url!==void 0){let t=new FormData;if(e.file){let n=g(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);if(e.creator!==void 0&&t.append(`creator`,String(h(e.creator,`creator`,`text`)??``)),e.id!==void 0&&t.append(`id`,String(h(e.id,`id`,`text`)??``)),e.metadata!==void 0){let n=typeof e.metadata==`string`?h(e.metadata,`metadata`,`text`):e.metadata;t.append(`metadata`,typeof n==`string`?n:JSON.stringify(n))}e[`require-signed-urls`]!==void 0&&t.append(`requireSignedURLs`,String(e[`require-signed-urls`])),e.url!==void 0&&t.append(`url`,String(h(e.url,`url`,`text`)??``));let r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v1`,{body:t}));s(r,{successLabel:`Created`});return}if(e.body){let t=h(e.body,`body`,`binary`),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v1`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));s(r,{successLabel:`Created`});return}let d=await l(`Creating`,async()=>a.send(S,{account_id:u}));s(d,{successLabel:`Created`})})};var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v1/${t.image_id}`};function re(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-Dc6ojwUW.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.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-4-uZcDN_.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.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-Dc6ojwUW.mjs";import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{R as n,n as r}from"./dist-BtzWfAjU.mjs";import{i,n as a,t as o}from"./autoconfig-Dbp6J25P.mjs";import{n as s}from"./version-DmTuWNZ5.mjs";import{i as c}from"./delegate-D7yYckA4.mjs";import{t as l}from"./project-settings-nBMEx1f-.mjs";import"./ui-Bo6DCvbS.mjs";import{t as u}from"./log-BWdaOGOW.mjs";import{n as d,r as f}from"./dialog-D5lus4M4.mjs";import{t as p}from"./progress-CtGsPOpV.mjs";import{n as m}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.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),...e.packageManager===`pnpm`?{"pnpm-workspace.yaml":te()}:{},"src/index.ts":k(),"tsconfig.json":j(),"vite.config.ts":O()}}function te(){return`# Approve build scripts needed by the generated Worker's dependencies.
2
+ import"./src-4-uZcDN_.mjs";import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{R as n,n as r}from"./dist-BtzWfAjU.mjs";import{i,n as a,t as o}from"./autoconfig-Bjb97Onj.mjs";import{n as s}from"./version-Dp7G_dM6.mjs";import{i as c}from"./delegate-DzeuzE99.mjs";import{t as l}from"./project-settings-nBMEx1f-.mjs";import"./ui-DvC7Qa0H.mjs";import{t as u}from"./log-BWdaOGOW.mjs";import{n as d,r as f}from"./dialog-D5lus4M4.mjs";import{t as p}from"./progress-BcjUdm_B.mjs";import{n as m}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.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),...e.packageManager===`pnpm`?{"pnpm-workspace.yaml":te()}:{},"src/index.ts":k(),"tsconfig.json":j(),"vite.config.ts":O()}}function te(){return`# Approve build scripts needed by the generated Worker's dependencies.
3
3
  allowBuilds:
4
4
  esbuild: true
5
5
  workerd: true
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,i as a,t as o}from"./context-DVh8Wyfs.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-CtGsPOpV.mjs";import{t as u}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-YrI7ltMa.mjs";import{n as _,t as ee}from"./raw-fetch-BE3QgdTE.mjs";var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}`};function ne(e){return e.usage(`$0 intel asn get <asn>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BlWCu-YH.mjs";import{a as i,i as a,t as o}from"./context-CSjTAJ8s.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-BcjUdm_B.mjs";import{t as u}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{n as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-BFRinxR0.mjs";import{n as _,t as ee}from"./raw-fetch-BO0VqOVx.mjs";var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}`};function ne(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 re={command:`get <asn>`,describe:`Get ASN Overview.`,builder:ne,handler:async e=>u({command:`intel asn get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel asn get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/asn/${e.asn==null?`<asn>`:encodeURIComponent(String(e.asn))}`,pathParams:{asn:String(e.asn??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(te,{account_id:a,asn:e.asn}));s(u,{successLabel:`Loaded`})})};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}/subnets`};function ae(e){return e.usage(`$0 intel asn subnets get <asn>
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-BcNLQji1.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./dry-run-gy0Hl9xo.mjs";import{t as r}from"./progress-CtGsPOpV.mjs";import{t as i}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";var a={method:`POST`,path:()=>`/internal/submit`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function o(e){return e.usage(`$0 internal submit create
2
+ import{n as e}from"./auth-BlWCu-YH.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./dry-run-gy0Hl9xo.mjs";import{t as r}from"./progress-BcjUdm_B.mjs";import{t as i}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";var a={method:`POST`,path:()=>`/internal/submit`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function o(e){return e.usage(`$0 internal submit create
3
3
 
4
4
  Internal route for testing URL submissions.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`create`,describe:`Internal route for testing URL submissions`,builder:o,handler:async o=>i({command:`internal submit create`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf internal submit create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/internal/submit`,pathParams:{},bodyKind:`none`});return}let i=await e(o),s=await r(`Creating`,async()=>i.send(a));t(s,{successLabel:`Created`})})},c={command:`submit`,describe:`Operations for submit`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},l={command:`internal`,describe:`internal`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{l as default};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-BcNLQji1.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./dry-run-gy0Hl9xo.mjs";import{t as r}from"./progress-CtGsPOpV.mjs";import{t as i}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";var a={method:`GET`,path:()=>`/ips`,query:[`networks`]};function o(e){return e.usage(`$0 ips list
2
+ import{n as e}from"./auth-BlWCu-YH.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./dry-run-gy0Hl9xo.mjs";import{t as r}from"./progress-BcjUdm_B.mjs";import{t as i}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";var a={method:`GET`,path:()=>`/ips`,query:[`networks`]};function o(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 s={command:`list`,describe:`Cloudflare/JD Cloud IP Details`,builder:o,handler:async o=>i({command:`ips list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let i={networks:o.networks};if(o.dryRun){n({command:`cf ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/ips`,pathParams:{},query:i,bodyKind:`none`});return}let s=await e(o),c=await r(`Loading`,async()=>s.send(a,i));t(c,{successLabel:`Loaded`})})},c={command:`ips`,describe:`ips`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,t as i}from"./context-DVh8Wyfs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-CtGsPOpV.mjs";import{t as c}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-YrI7ltMa.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/k2/streams`,body:`json`};function h(e){return e.usage("$0 k2 streams create\n\nCreate a new K2 stream. HTTP is disabled when `http` is omitted. Enabled HTTP requires authentication and allows all origins unless `authentication` or `cors` say otherwise. At least one input must be enabled.").option(`http-authentication`,{type:`boolean`,description:`Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false, the endpoint accepts unauthenticated records. Defaults to true when HTTP is enabled without a stored value.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:"Allows browser requests from these HTTP or HTTPS origins. Use a wildcard only as the sole origin. An empty list blocks cross-origin browser requests. Defaults to `['*']` when HTTP is enabled without stored origins."}).option(`http-enabled`,{type:`boolean`,description:`Indicates whether the HTTP endpoint accepts records.`}).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([`http-authentication`,`http-cors-origins`,`http-enabled`].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 g={command:`create`,describe:`Create K2 stream`,builder:h,handler:async e=>c({command:`k2 streams create`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:d(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`Specifies the name of the K2 stream.`));let h=u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:d(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}),g=await s(`Creating`,async()=>c.send(m,{body:h,account_id:p}));a(g,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`};function v(e){return e.usage(`$0 k2 streams delete <stream-id>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BlWCu-YH.mjs";import{a as r,t as i}from"./context-CSjTAJ8s.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-BcjUdm_B.mjs";import{t as c}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-BFRinxR0.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/k2/streams`,body:`json`};function h(e){return e.usage("$0 k2 streams create\n\nCreate a new K2 stream. HTTP is disabled when `http` is omitted. Enabled HTTP requires authentication and allows all origins unless `authentication` or `cors` say otherwise. At least one input must be enabled.").option(`http-authentication`,{type:`boolean`,description:`Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false, the endpoint accepts unauthenticated records. Defaults to true when HTTP is enabled without a stored value.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:"Allows browser requests from these HTTP or HTTPS origins. Use a wildcard only as the sole origin. An empty list blocks cross-origin browser requests. Defaults to `['*']` when HTTP is enabled without stored origins."}).option(`http-enabled`,{type:`boolean`,description:`Indicates whether the HTTP endpoint accepts records.`}).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([`http-authentication`,`http-cors-origins`,`http-enabled`].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 g={command:`create`,describe:`Create K2 stream`,builder:h,handler:async e=>c({command:`k2 streams create`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:d(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`Specifies the name of the K2 stream.`));let h=u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:d(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}),g=await s(`Creating`,async()=>c.send(m,{body:h,account_id:p}));a(g,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`};function v(e){return e.usage(`$0 k2 streams delete <stream-id>
3
3
 
4
4
  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 y={command:`delete <stream-id>`,describe:`Delete K2 stream`,builder:v,handler:async e=>c({command:`k2 streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(_,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Deleted`})})};var b={method:`GET`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`};function x(e){return e.usage(`$0 k2 streams get <stream-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f,t as p}from"./input-validation-D7z60HJH.mjs";import{a as m,n as h}from"./prompt-YrI7ltMa.mjs";import{n as g,t as _}from"./raw-fetch-BE3QgdTE.mjs";function v(e){return e.usage(`$0 kv bulk delete <namespace-id>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BlWCu-YH.mjs";import{a as i,t as a}from"./context-CSjTAJ8s.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-BcjUdm_B.mjs";import{t as l}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f,t as p}from"./input-validation-D7z60HJH.mjs";import{a as m,n as h}from"./prompt-BFRinxR0.mjs";import{n as g,t as _}from"./raw-fetch-BO0VqOVx.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 e=>l({command:`kv bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk/delete`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}let l=await r(e),d=e.local?t:await a();if(e.accountId=d,await h({force:!!e.force,message:`This operation deletes the specified keys and their values from the Workers KV namespace.`})){if(e.body){let t=u(e.body);if(Array.isArray(t)&&t.length>1e4){let r=Math.ceil(t.length/1e4),i=null;for(let a=0;a<t.length;a+=1e4){let o=t.slice(a,a+1e4),s=Math.floor(a/1e4)+1;i=await c(`Deleting: batch ${s}/${r}`,async()=>n(l,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/bulk/delete`,{body:o}))}o(i,{successLabel:`Deleted`});return}let r=await c(`Deleting`,async()=>n(l,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/bulk/delete`,{body:t}));o(r,{successLabel:`Deleted`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}})};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/bulk/get`,body:`json`};function x(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`}).coerce(`type`,e=>f(e,`type`,`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 S={command:`get <namespace-id>`,describe:`Get multiple key-value pairs`,builder:x,handler:async e=>l({command:`kv bulk get`,classification:{safeFlags:[`type`,`with-metadata`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv bulk get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk/get`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({keys:e.keys,type:e.type,withMetadata:e[`with-metadata`]}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.send(b,{body:t,account_id:l,namespace_id:e[`namespace-id`]}));o(r,{successLabel:`Created`});return}if(e.keys===void 0)throw Error(`--keys is required (or pass --body with this field set).`);let f=d({keys:e.keys,type:e.type,withMetadata:e[`with-metadata`]}),p=await c(`Creating`,async()=>n.send(b,{body:f,account_id:l,namespace_id:e[`namespace-id`]}));o(p,{successLabel:`Created`})})};function C(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 w={command:`put <namespace-id>`,describe:`Write multiple key-value pairs`,builder:C,handler:async e=>l({command:`kv bulk put`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv bulk put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}let l=await r(e),d=e.local?t:await a();if(e.accountId=d,e.body){let t=u(e.body);if(Array.isArray(t)&&t.length>1e4){let r=Math.ceil(t.length/1e4),i=null;for(let a=0;a<t.length;a+=1e4){let o=t.slice(a,a+1e4),s=Math.floor(a/1e4)+1;i=await c(`Updating: batch ${s}/${r}`,async()=>n(l,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/bulk`,{body:o}))}o(i,{successLabel:`Updated`});return}let r=await c(`Updating`,async()=>n(l,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/bulk`,{body:t}));o(r,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},T={command:`bulk`,describe:`Operations for bulk`,builder:e=>e.command(y).command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var E={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/values/${t.key_name}`};function D(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 O={command:`delete <key-name>`,describe:`Delete a key-value pair`,builder:D,handler:async e=>l({command:`kv keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/values/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``),"key-name":String(e[`key-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the selected key-value pair from the Workers KV namespace.`}))return;let u=await c(`Deleting`,async()=>n.send(E,{account_id:l,namespace_id:e[`namespace-id`],key_name:e[`key-name`]}));o(u,{successLabel:`Deleted`})})};function k(e){return e.usage("$0 kv keys get <key-name>\n\nReturns the value stored under the specified key in the Workers KV namespace as raw bytes. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL. If the key-value pair expires, the `expiration` response header contains its expiration time in seconds since the UNIX epoch.").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(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const A={command:`get <key-name>`,describe:`Get a key's value`,builder:k,handler:async e=>l({command:`kv keys get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv keys get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/values/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``),"key-name":String(e[`key-name`]??``)},bodyKind:`none`});return}await r(e);let n=e.local?t:await a();e.accountId=n;let o=await c(`Loading`,async()=>_(`/accounts/${n}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));g(e.text===!0?o.toString(`utf-8`):o)})};var j={method:`GET`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/keys`,query:[`limit`,`prefix`,`cursor`]};function M(e){return e.usage("$0 kv keys list\n\nLists key names in the specified Workers KV namespace, with expiration times and metadata when present. Use `prefix` to filter names and `cursor` to request the next page. Values are not included.").option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`limit`,{type:`number`,description:"Maximum number of keys to return in one response. Pass `result_info.cursor` from the response as `cursor` to request the next page."}).option(`prefix`,{type:`string`,description:`Filters returned keys by a name prefix. Exact matches and any key names that begin with the prefix will be returned.`}).option(`cursor`,{type:`string`,description:"Opaque pagination token from `result_info.cursor` in the previous response. Pass it unchanged to request the next page of keys."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:`List keys in a namespace`,builder:M,handler:async e=>l({command:`kv keys list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,prefix:e.prefix,cursor:e.cursor};if(e.dryRun){let t=await i();s({command:`cf kv keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/keys`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(j,{account_id:u,namespace_id:e[`namespace-id`],...n}));o(d,{successLabel:`Loaded`})})};function P(e){return e.usage("$0 kv keys put <key-name>\n\nWrites a value under the specified key in the Workers KV namespace, creating the key-value pair or replacing its existing value, expiration, and metadata. Send the value as an `application/octet-stream` request body, or use `multipart/form-data` with a `value` part and an optional JSON `metadata` part. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will not expire. If both are set, `expiration_ttl` takes precedence.").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(`expiration`,{type:`number`,description:`Expires the key at a certain time, measured in number of seconds since the UNIX epoch.`}).option(`expiration-ttl`,{type:`number`,description:"Number of seconds until the key expires. Must be at least 60. Takes precedence over `expiration` when both are specified."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A byte sequence to be stored, up to 25 MiB in length.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`metadata`,{type:`string`,description:`Associates arbitrary JSON data with a key/value pair.`})}const F={command:`put <key-name>`,describe:`Write a key-value pair with optional metadata`,builder:P,handler:async e=>l({command:`kv keys put`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={expiration:e.expiration,expiration_ttl:e[`expiration-ttl`]};if(e.dryRun){let t=await i();s({command:`cf kv keys put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/values/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``),"key-name":String(e[`key-name`]??``)},query:l,bodyKind:e.metadata===void 0?`octet-stream`:`multipart`,body:e.metadata===void 0?e.body:{body:e.body,file:e.file,metadata:e.metadata}});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,e.metadata!==void 0){let t=new FormData;if(e.file){let n=p(e.file);t.append(`value`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`value`,e.body);e.metadata!==void 0&&t.append(`metadata`,String(f(e.metadata,`metadata`,`text`)??``));let r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}`,{body:t}));o(r,{successLabel:`Updated`})}else if(e.file){let t=p(e.file),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}`,{body:t,headers:{"Content-Type":`application/octet-stream`}}));o(r,{successLabel:`Updated`})}else if(e.body){let t=f(e.body,`body`,`binary`),r=new URLSearchParams(Object.entries(l).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),i=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}${r?`?`+r:``}`,{body:t,headers:{"Content-Type":`application/octet-stream`}}));o(i,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},ee={command:`keys`,describe:`Operations for keys`,builder:e=>e.command(O).command(A).command(N).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/metadata/${t.key_name}`};function L(e){return e.usage("$0 kv metadata get <key-name>\n\nReturns the JSON metadata associated with the specified key in the Workers KV namespace, without retrieving its value. 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})}const R={command:`get <key-name>`,describe:`Get a key's metadata`,builder:L,handler:async e=>l({command:`kv metadata get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv metadata get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/metadata/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``),"key-name":String(e[`key-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(I,{account_id:l,namespace_id:e[`namespace-id`],key_name:e[`key-name`]}));o(u,{successLabel:`Loaded`})})},z={command:`metadata`,describe:`Operations for metadata`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`POST`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces`,body:`json`};function V(e){return e.usage(`$0 kv namespaces create
5
5
 
@@ -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-Be6Js7D6.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-BUebYPOn.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"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BcNLQji1.mjs";import{i as n}from"./context-DVh8Wyfs.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-CtGsPOpV.mjs";import{t as o}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{n as u}from"./prompt-YrI7ltMa.mjs";var d={method:`POST`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections`,body:`json`};function f(e){return e.usage(`$0 leaked-credential-checks detections create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BlWCu-YH.mjs";import{i as n}from"./context-CSjTAJ8s.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-BcjUdm_B.mjs";import{t as o}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{n as u}from"./prompt-BFRinxR0.mjs";var d={method:`POST`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections`,body:`json`};function f(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(`id`,{type:`string`,description:`Defines the unique ID for this custom detection.`}).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 p={command:`create`,describe:`Create a custom detection location for a zone.`,builder:f,handler:async e=>o({command:`leaked-credential-checks detections create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks detections create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({id:l(e.id,`id`,`text`),password:l(e.password,`password`,`text`),username:l(e.username,`username`,`text`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(d,{body:t,zone_id:u}));r(n,{successLabel:`Created`});return}let f=c({id:l(e.id,`id`,`text`),password:l(e.password,`password`,`text`),username:l(e.username,`username`,`text`)}),p=await a(`Creating`,async()=>o.send(d,{body:f,zone_id:u}));r(p,{successLabel:`Created`})})};var m={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections/${t.detection_id}`};function h(e){return e.usage(`$0 leaked-credential-checks detections delete <detection-id>
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-BcNLQji1.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./dry-run-gy0Hl9xo.mjs";import{t as r}from"./progress-CtGsPOpV.mjs";import{t as i}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";var a={method:`GET`,path:()=>`/live`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function o(e){return e.usage(`$0 live get
2
+ import{n as e}from"./auth-BlWCu-YH.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./dry-run-gy0Hl9xo.mjs";import{t as r}from"./progress-BcjUdm_B.mjs";import{t as i}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";var a={method:`GET`,path:()=>`/live`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function o(e){return e.usage(`$0 live get
3
3
 
4
4
  Return a success message after running liveness checks.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get`,describe:`Run liveness checks`,builder:o,handler:async o=>i({command:`live get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf live get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/live`,pathParams:{},bodyKind:`none`});return}let i=await e(o),s=await r(`Loading`,async()=>i.send(a));t(s,{successLabel:`Loaded`})})},c={command:`live`,describe:`live`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-YrI7ltMa.mjs";var _={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers`,body:`json`};function v(e){return e.usage(`$0 load-balancers account create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BlWCu-YH.mjs";import{a as r,i,t as a}from"./context-CSjTAJ8s.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-BcjUdm_B.mjs";import{t as l}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-BFRinxR0.mjs";var _={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers`,body:`json`};function v(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(`country-pools`,{type:`string`,description:`A mapping of country codes to a list of pool IDs (ordered by their failover priority) for the given country. Any country not explicitly defined will fall back to using the corresponding region_pool mapping if it exists else to default_pools. Provide as a JSON object or @path/to/file.json.`}).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`]}).coerce(`location-strategy-mode`,e=>m(e,`location-strategy-mode`,`text`)).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`]}).coerce(`location-strategy-prefer-ecs`,e=>m(e,`location-strategy-prefer-ecs`,`text`)).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(`pop-pools`,{type:`string`,description:`Enterprise only: A mapping of Cloudflare PoP identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). Any PoPs not explicitly defined will fall back to using the corresponding country_pool, then region_pool mapping if it exists else to default_pools. Provide as a JSON object or @path/to/file.json.`}).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(`random-steering-pool-weights`,{type:`string`,description:`A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer. Provide as a JSON object or @path/to/file.json.`}).option(`region-pools`,{type:`string`,description:`A mapping of region codes to a list of pool IDs (ordered by their failover priority) for the given region. Any regions not explicitly defined will fall back to using default_pools. Provide as a JSON object or @path/to/file.json.`}).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`}).coerce(`session-affinity`,e=>m(e,`session-affinity`,`text`)).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`]}).coerce(`session-affinity-attributes-samesite`,e=>m(e,`session-affinity-attributes-samesite`,`text`)).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`]}).coerce(`session-affinity-attributes-secure`,e=>m(e,`session-affinity-attributes-secure`,`text`)).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`]}).coerce(`session-affinity-attributes-zero-downtime-failover`,e=>m(e,`session-affinity-attributes-zero-downtime-failover`,`text`)).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:``}).coerce(`steering-policy`,e=>m(e,`steering-policy`,`text`)).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 y={command:`create`,describe:`Create account or zone Load Balancer`,builder:v,handler:async e=>l({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`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf load-balancers account create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/load_balancers`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?p({adaptive_routing:{failover_across_pools:e[`adaptive-routing-failover-across-pools`]},country_pools:f(e[`country-pools`],`country-pools`),default_pools:e[`default-pools`],description:m(e.description,`description`,`text`),enabled:e.enabled,fallback_pool:m(e[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:e[`location-strategy-mode`],prefer_ecs:e[`location-strategy-prefer-ecs`]},name:m(e.name,`name`,`text`),networks:e.networks,pop_pools:f(e[`pop-pools`],`pop-pools`),proxied:e.proxied,random_steering:{default_weight:e[`random-steering-default-weight`],pool_weights:f(e[`random-steering-pool-weights`],`random-steering-pool-weights`)},region_pools:f(e[`region-pools`],`region-pools`),rules:u(e.rules,`rules`),session_affinity:e[`session-affinity`],session_affinity_attributes:{drain_duration:e[`session-affinity-attributes-drain-duration`],headers:e[`session-affinity-attributes-headers`],require_all_headers:e[`session-affinity-attributes-require-all-headers`],samesite:e[`session-affinity-attributes-samesite`],secure:e[`session-affinity-attributes-secure`],zero_downtime_failover:e[`session-affinity-attributes-zero-downtime-failover`]},session_affinity_ttl:e[`session-affinity-ttl`],steering_policy:e[`steering-policy`],ttl:e.ttl},[[`country_pools`],[`pop_pools`],[`random_steering`,`pool_weights`],[`region_pools`]]):d(e.body)});return}let l=await n(e),g=e.zone===void 0?`accounts`:`zones`,v=g===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(g===`zones`?e.zoneId=v:e.accountId=v,e.body){let t=d(e.body),n=await c(`Creating`,async()=>l.send(_,{body:t,account_or_zone:g,account_or_zone_id:v}));o(n,{successLabel:`Created`});return}if(e[`default-pools`]===void 0)throw Error(`--default-pools is required (or pass --body with this field set).`);e[`fallback-pool`]===void 0&&(e[`fallback-pool`]=await h(`fallback-pool`,`The pool ID to use when all other pools are detected as unhealthy.`)),e.name===void 0&&(e.name=await h(`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 y=p({adaptive_routing:{failover_across_pools:e[`adaptive-routing-failover-across-pools`]},country_pools:f(e[`country-pools`],`country-pools`),default_pools:e[`default-pools`],description:m(e.description,`description`,`text`),enabled:e.enabled,fallback_pool:m(e[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:e[`location-strategy-mode`],prefer_ecs:e[`location-strategy-prefer-ecs`]},name:m(e.name,`name`,`text`),networks:e.networks,pop_pools:f(e[`pop-pools`],`pop-pools`),proxied:e.proxied,random_steering:{default_weight:e[`random-steering-default-weight`],pool_weights:f(e[`random-steering-pool-weights`],`random-steering-pool-weights`)},region_pools:f(e[`region-pools`],`region-pools`),rules:u(e.rules,`rules`),session_affinity:e[`session-affinity`],session_affinity_attributes:{drain_duration:e[`session-affinity-attributes-drain-duration`],headers:e[`session-affinity-attributes-headers`],require_all_headers:e[`session-affinity-attributes-require-all-headers`],samesite:e[`session-affinity-attributes-samesite`],secure:e[`session-affinity-attributes-secure`],zero_downtime_failover:e[`session-affinity-attributes-zero-downtime-failover`]},session_affinity_ttl:e[`session-affinity-ttl`],steering_policy:e[`steering-policy`],ttl:e.ttl},[[`country_pools`],[`pop_pools`],[`random_steering`,`pool_weights`],[`region_pools`]]),b=await c(`Creating`,async()=>l.send(_,{body:y,account_or_zone:g,account_or_zone_id:v}));o(b,{successLabel:`Created`})})};var b={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers/${t.load_balancer_id}`};function x(e){return e.usage(`$0 load-balancers account delete <load-balancer-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BGHWSKCw.mjs";import{c as t,g as n}from"./chunk-XVBBSNW2-DfMyGS-l.mjs";import"./ui-Bo6DCvbS.mjs";import{t as r}from"./log-BWdaOGOW.mjs";import{c as i,d as a,f as o,g as s,h as c,i as l,o as u,r as d,s as f,u as p}from"./oauth-D_A8AcIS.mjs";import{n as m,t as h}from"./output-BJEgbI0G.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(t({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 e=>{_(e,`create`,"Pass the profile name as the command argument: `cf auth create <name>`."),v(),n(e.name);let t=u().configs.exists(e.name);await p({browser:e.browser,device:e.device,scopes:e.scopes,profile:e.name}),m(t?`Profile "${e.name}" re-authenticated.`:`Profile "${e.name}" created.`),r.info(`To use this profile in a directory, run:`,`cf auth activate ${e.name}`)}},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 t=>{_(t,`delete`),v(),n(t.name);let i=u();if(!i.configs.exists(t.name))throw Error(`Profile "${t.name}" does not exist.`);let o=i.bindings.removeAllBindingsForProfile(t.name);o.length>0&&r.info([`Removed directory bindings:`,...o.map(e=>` ${e}`)].join(`
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import{c as t,g as n}from"./chunk-XVBBSNW2-DfMyGS-l.mjs";import"./ui-DvC7Qa0H.mjs";import{t as r}from"./log-BWdaOGOW.mjs";import{c as i,d as a,f as o,g as s,h as c,i as l,o as u,r as d,s as f,u as p}from"./oauth-C6uYSFM5.mjs";import{n as m,t as h}from"./output-BJEgbI0G.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(t({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 e=>{_(e,`create`,"Pass the profile name as the command argument: `cf auth create <name>`."),v(),n(e.name);let t=u().configs.exists(e.name);await p({browser:e.browser,device:e.device,scopes:e.scopes,profile:e.name}),m(t?`Profile "${e.name}" re-authenticated.`:`Profile "${e.name}" created.`),r.info(`To use this profile in a directory, run:`,`cf auth activate ${e.name}`)}},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 t=>{_(t,`delete`),v(),n(t.name);let i=u();if(!i.configs.exists(t.name))throw Error(`Profile "${t.name}" does not exist.`);let o=i.bindings.removeAllBindingsForProfile(t.name);o.length>0&&r.info([`Removed directory bindings:`,...o.map(e=>` ${e}`)].join(`
3
3
  `)),await a(t.name),i.configs.delete(t.name),m(`Profile "${t.name}" deleted.`);let s=i.bindings.getProfileForDirectory(process.cwd());s?r.info(`Active profile for this directory: ${s}.`):i.configs.exists(`default`)?r.info(`This directory now uses the default profile.`):r.info(`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(),n(e.name);let t=u();if(!t.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();t.bindings.activate(e.name,r),m(`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(),i=t.dir??process.cwd(),{removedProfile:a,newResolution:o}=n.bindings.deactivate(i);m(`Profile "${a}" deactivated from "${g.resolve(i)}".`),o.profile===void 0?r.info(`Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`):o.profile==="default"?r.info(`This directory now uses the default profile.`):r.info(`Now using: ${o.profile} (${o.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`,`use-keyring`,`useKeyring`],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`}).option(`use-keyring`,{type:`boolean`,description:`Encrypt OAuth credentials using the OS keychain (persisted across invocations; use --no-use-keyring to disable)`}),handler:async n=>{_(n,`login`,"Run `cf auth create <name>` to authenticate a named profile.");let a=d();if(a!=="default"&&r.warn(`This directory has profile "${a}" active. ${e.code(`cf auth login`)} updates the default profile, not "${a}". To re-authenticate "${a}", run:`,`cf auth create ${a}`),s(`default`),n.useKeyring!==void 0&&c(n.useKeyring),t({allowGlobalAuthKey:!1})!==void 0){r.warn(`${e.code(`CLOUDFLARE_API_TOKEN`)} is set and takes precedence. Unset it to log in via OAuth.`);return}if(!n.force&&i()){if(await f()){let t=o(),n=[`You are already logged in.`,`${e.info(`Config file:`)} ${e.muted(l())}`];t?.expiration_time&&n.push(`${e.info(`Token expires:`)} ${new Date(t.expiration_time).toLocaleString()}`),n.push(`Run ${e.code(`cf auth login --force`)} to re-authenticate, or ${e.code(`cf auth logout`)} to log out.`),r.info(n.join(`
4
4
  `));return}r.warn(`Existing tokens are invalid or expired. Starting fresh login...`)}else n.force&&i()&&r.info(`Re-authenticating...`);if(r.info(`Starting OAuth login flow...`),!await p({browser:n.browser,device:n.device,scopes:n.scopes,profile:`default`}))return;let u=o(),m=[`${e.info(`Config file:`)} ${e.muted(l())}`];u?.scopes&&m.push(u.scopes.length>5?`${e.info(`Scopes:`)} ${u.scopes.length} selected. Run ${e.code(`cf auth whoami`)} to see the full list.`:`${e.info(`Scopes:`)} ${u.scopes.join(`, `)}`),u?.expiration_time&&m.push(`${e.info(`Token expires:`)} ${new Date(u.expiration_time).toLocaleString()}`),r.info(m.join(`
5
5
  `))}};export{y as a,C as c,_ as i,w as n,S as o,x as r,b as s,T as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import"./ui-DvC7Qa0H.mjs";import{t}from"./log-BWdaOGOW.mjs";import{n}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{n as r,t as i}from"./login-CJYJE6Ae.mjs";const a={...i,describe:!1,handler:async n=>{n.quiet||t.info(`${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)}};var o=n(a,{command:`login`,classification:r});export{o as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as u,r as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,n as h}from"./prompt-YrI7ltMa.mjs";var g={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/datasets/${t.dataset_id}/fields`};function _(e){return e.usage(`$0 logpush account-datasets fields get <dataset-id>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BlWCu-YH.mjs";import{a as r,i,t as a}from"./context-CSjTAJ8s.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-BcjUdm_B.mjs";import{t as l}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{n as u,r as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,n as h}from"./prompt-BFRinxR0.mjs";var g={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/datasets/${t.dataset_id}/fields`};function _(e){return e.usage(`$0 logpush account-datasets fields get <dataset-id>
3
3
 
4
4
  Lists all fields available for a dataset. The response result is. an object with key-value pairs, where keys are field names, and values are descriptions.`).positional(`dataset-id`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <dataset-id>`,describe:`List fields`,builder:_,handler:async e=>l({command:`logpush account-datasets fields get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf logpush account-datasets fields get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/fields`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(g,{account_or_zone:u,account_or_zone_id:d,dataset_id:e[`dataset-id`]}));o(f,{successLabel:`Loaded`})})},v={command:`fields`,describe:`Operations for account-datasets.fields`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/datasets/${t.dataset_id}/jobs`};function b(e){return e.usage(`$0 logpush account-datasets jobs get <dataset-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,i as a,t as o}from"./context-DVh8Wyfs.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-CtGsPOpV.mjs";import{t as u}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as d,n as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,n as _}from"./prompt-YrI7ltMa.mjs";var v={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/available`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function y(e){return e.usage(`$0 logs datasets available
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BlWCu-YH.mjs";import{a as i,i as a,t as o}from"./context-CSjTAJ8s.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-BcjUdm_B.mjs";import{t as u}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as d,n as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,n as _}from"./prompt-BFRinxR0.mjs";var v={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/available`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function y(e){return e.usage(`$0 logs datasets available
3
3
 
4
4
  Returns all dataset types that this account or zone can create. Each entry includes the dataset schema and timestamp field. The schema shows all possible fields for a dataset. However, not all fields may be available for your account or zone. When creating or updating a dataset, only fields available to your account or zone can be enabled. If you request a field that is not available, you will receive an error.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`available`,describe:`List available account or zone datasets`,builder:y,handler:async e=>u({command:`logs datasets available`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs datasets available`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/available`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(v,{account_or_zone:u,account_or_zone_id:d}));s(f,{successLabel:`Loaded`})})};var x={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function S(e){return e.usage(`$0 logs datasets create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as u,s as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-YrI7ltMa.mjs";import{n as _,t as v}from"./raw-fetch-BE3QgdTE.mjs";function y(e){return e.usage(`$0 magic-cloud-networking catalog-syncs create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BlWCu-YH.mjs";import{a as i,t as a}from"./context-CSjTAJ8s.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-BcjUdm_B.mjs";import{t as l}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{n as u,s as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-BFRinxR0.mjs";import{n as _,t as v}from"./raw-fetch-BO0VqOVx.mjs";function y(e){return e.usage(`$0 magic-cloud-networking catalog-syncs create
3
3
 
4
4
  Create a new Catalog Sync (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`description`,{type:`string`,description:`The description field`}).option(`destination-type`,{type:`string`,description:`The destination_type field`,choices:[`NONE`,`ZERO_TRUST_LIST`]}).coerce(`destination-type`,e=>p(e,`destination-type`,`text`)).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).coerce(`update-mode`,e=>p(e,`update-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ee={command:`create`,describe:`Create Catalog Sync`,builder:y,handler:async e=>l({command:`magic-cloud-networking catalog-syncs create`,classification:{safeFlags:[`destination-type`,`update-mode`,`dry-run`]}},e,async()=>{let l={};if(e.forwarded!==void 0&&(l.forwarded=String(e.forwarded)),e.dryRun){let t=await i();s({command:`cf magic-cloud-networking catalog-syncs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/catalog-syncs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({description:p(e.description,`description`,`text`),destination_type:e[`destination-type`],name:p(e.name,`name`,`text`),policy:p(e.policy,`policy`,`text`),update_mode:e[`update-mode`]}):u(e.body)});return}let g=await r(e),_=e.local?t:await a();if(e.accountId=_,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n(g,`POST`,`/accounts/${_}/magic/cloud/catalog-syncs`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e[`destination-type`]===void 0&&(e[`destination-type`]=await h(`destination-type`,`The destination_type field`,[`NONE`,`ZERO_TRUST_LIST`])),e.name===void 0&&(e.name=await m(`name`,`The name field`)),e[`update-mode`]===void 0&&(e[`update-mode`]=await h(`update-mode`,`The update_mode field`,[`AUTO`,`MANUAL`]));let v={};e.description!==void 0&&d(v,[`description`],p(e.description,`description`,`text`)),e[`destination-type`]!==void 0&&d(v,[`destination_type`],e[`destination-type`]),e.name!==void 0&&d(v,[`name`],p(e.name,`name`,`text`)),e.policy!==void 0&&d(v,[`policy`],p(e.policy,`policy`,`text`)),e[`update-mode`]!==void 0&&d(v,[`update_mode`],e[`update-mode`]);let y=await c(`Creating`,async()=>n(g,`POST`,`/accounts/${_}/magic/cloud/catalog-syncs`,{body:v,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Created`})})};var b={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/cloud/catalog-syncs/${t.sync_id}`,query:[`delete_destination`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function te(e){return e.usage(`$0 magic-cloud-networking catalog-syncs delete <sync-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as u,n as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-YrI7ltMa.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/mnm/config`,body:`json`};function ee(e){return e.usage(`$0 magic-network-monitoring configs create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BlWCu-YH.mjs";import{a as i,t as a}from"./context-CSjTAJ8s.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-BcjUdm_B.mjs";import{t as l}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as u,n as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-BFRinxR0.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/mnm/config`,body:`json`};function ee(e){return e.usage(`$0 magic-network-monitoring configs create
3
3
 
4
4
  Create a new network monitoring configuration.`).option(`default-sampling`,{type:`number`,description:`Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.`,default:1}).option(`name`,{type:`string`,description:`The account name.`}).option(`router-ips`,{type:`string`,array:!0,description:`The router_ips field`}).option(`warp-devices`,{type:`string`,description:`The warp_devices field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create account configuration`,builder:ee,handler:async e=>l({command:`magic-network-monitoring configs create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-network-monitoring configs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({default_sampling:e[`default-sampling`],name:p(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:u(e[`warp-devices`],`warp-devices`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(_,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e[`default-sampling`]===void 0)throw Error(`--default-sampling is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await m(`name`,`The account name.`));let h=f({default_sampling:e[`default-sampling`],name:p(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:u(e[`warp-devices`],`warp-devices`)}),g=await c(`Creating`,async()=>n.send(_,{body:h,account_id:l}));o(g,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/mnm/config`};function b(e){return e.usage(`$0 magic-network-monitoring configs delete
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as u,n as d,r as f,s as p,t as m}from"./body-parser-ChnyBsfm.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-YrI7ltMa.mjs";import{n as ee,t as te}from"./raw-fetch-BE3QgdTE.mjs";var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`};function re(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules bulk-delete
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BlWCu-YH.mjs";import{a as i,t as a}from"./context-CSjTAJ8s.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-BcjUdm_B.mjs";import{t as l}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as u,n as d,r as f,s as p,t as m}from"./body-parser-ChnyBsfm.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-BFRinxR0.mjs";import{n as ee,t as te}from"./raw-fetch-BO0VqOVx.mjs";var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`};function re(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules bulk-delete
3
3
 
4
4
  Delete all DNS Protection rules for an account.`).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 ie={command:`bulk-delete`,describe:`Delete all DNS Protection rules.`,builder:re,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(ne,{account_id:l}));o(u,{successLabel:`Deleted`})})};var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`,body:`json`};function ae(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as u,n as d,s as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h}from"./prompt-YrI7ltMa.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`,409:`ConflictError`,410:`GoneError`}};function _(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BlWCu-YH.mjs";import{a as i,t as a}from"./context-CSjTAJ8s.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-BcjUdm_B.mjs";import{t as l}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as u,n as d,s as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h}from"./prompt-BFRinxR0.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`,409:`ConflictError`,410:`GoneError`}};function _(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
3
3
 
4
4
  Gets the repository projection of the active operator-reviewed scan report. \`scan_id\` is the customer scan's stable request ID.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <scan-id>`,describe:`Get reviewed vulnerability report`,builder:_,handler:async e=>l({command:`managed-defense vulnerability-discovery reports get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}/report`,pathParams:{"repo-id":String(e[`repo-id`]??``),"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(g,{account_id:l,repo_id:e[`repo-id`],scan_id:e[`scan-id`]}));o(u,{successLabel:`Loaded`})})},y={command:`reports`,describe:`Operations for vulnerability-discovery.reports`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/token`,errors:{404:`NotFoundError`}};function x(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories create-token <repo-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BcNLQji1.mjs";import{i as n}from"./context-DVh8Wyfs.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-CtGsPOpV.mjs";import{t as o}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as s,n as c,t as l}from"./body-parser-ChnyBsfm.mjs";import{n as u}from"./prompt-YrI7ltMa.mjs";var d={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/managed_headers`,response:!1};function f(e){return e.usage(`$0 managed-transforms delete
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BlWCu-YH.mjs";import{i as n}from"./context-CSjTAJ8s.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-BcjUdm_B.mjs";import{t as o}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as s,n as c,t as l}from"./body-parser-ChnyBsfm.mjs";import{n as u}from"./prompt-BFRinxR0.mjs";var d={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/managed_headers`,response:!1};function f(e){return e.usage(`$0 managed-transforms delete
3
3
 
4
4
  Disables all Managed Transforms.`).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`,describe:`Delete Managed Transforms`,builder:f,handler:async e=>o({command:`managed-transforms delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf managed-transforms delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await u({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Deleted`})})};var m={method:`GET`,path:t=>e`/zones/${t.zone_id}/managed_headers`};function h(e){return e.usage(`$0 managed-transforms list
5
5