cf 1.0.0-beta.12 → 1.0.0-beta.13

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 (283) hide show
  1. package/dist/_meta/commands.json +3119 -2067
  2. package/dist/_meta/hand-written-commands.json +14 -1
  3. package/dist/_meta/schemas.json +1856 -1132
  4. package/dist/{abuse-reports-Cy9RcWPu.mjs → abuse-reports-BjU1s8cf.mjs} +10 -10
  5. package/dist/{access-DwJm1qet.mjs → access-C_G2MZnA.mjs} +1 -1
  6. package/dist/account-tags-CaXDDeZ4.mjs +15 -0
  7. package/dist/{accounts-BSd4b-1j.mjs → accounts-BALwxDQY.mjs} +70 -77
  8. package/dist/{acm-BfI0p2sX.mjs → acm-CP9EaXQN.mjs} +1 -1
  9. package/dist/{addressing-lfeJf7YB.mjs → addressing-DRlaxqrI.mjs} +1 -1
  10. package/dist/{agent-memory-CP1qpn-y.mjs → agent-memory-vGhlfZBx.mjs} +1 -1
  11. package/dist/{ai-jFzFBANM.mjs → ai-CJtbWfB9.mjs} +18 -16
  12. package/dist/{ai-audit-B_tSl78A.mjs → ai-audit-C0BJNqZZ.mjs} +1 -1
  13. package/dist/ai-gateway-BQtv3U3x.mjs +80 -0
  14. package/dist/ai-search-DGU1Y5By.mjs +79 -0
  15. package/dist/{ai-security-CKGE547U.mjs → ai-security-CFTaYk_X.mjs} +1 -1
  16. package/dist/{alerting-CuxoqG3S.mjs → alerting-1hun27JC.mjs} +3 -3
  17. package/dist/analytics-DXUSjvzT.mjs +17 -0
  18. package/dist/{analytics_engine-BoapM9wd.mjs → analytics_engine-CQsnL09C.mjs} +1 -1
  19. package/dist/{api-security-Nk_bg-Kg.mjs → api-security-BXhrfR6-.mjs} +4 -4
  20. package/dist/argo-LPUCTnee.mjs +14 -0
  21. package/dist/{artifacts-BS6cEqCB.mjs → artifacts-Dt6easua.mjs} +1 -1
  22. package/dist/{audit-logs-x5tLqeX2.mjs → audit-logs-CVznAM2Z.mjs} +1 -1
  23. package/dist/{auth-AobvBmz4.mjs → auth-CGLsxbc6.mjs} +1 -1
  24. package/dist/auth-CrmVwfpJ.mjs +2 -0
  25. package/dist/{auth-CKotxfap.mjs → auth-eQr-kQCH.mjs} +1 -1
  26. package/dist/{auth-token-CtguMdmF.mjs → auth-token-pNQrX_9O.mjs} +1 -1
  27. package/dist/{autoconfig-PfnbLuEO.mjs → autoconfig-sD7Frryg.mjs} +151 -151
  28. package/dist/{basin-catalog-Ddi-t3q9.mjs → basin-catalog-ZQICw-zF.mjs} +1 -1
  29. package/dist/{billing-CDMc4tvX.mjs → billing-Dy1-dV_B.mjs} +2 -2
  30. package/dist/{bot-management-UrCM3P8K.mjs → bot-management-DTgPwL7O.mjs} +1 -1
  31. package/dist/{botnet-feed-CVwRm42k.mjs → botnet-feed-xb98Cj3Y.mjs} +1 -1
  32. package/dist/{brand-protection-DfNf5REj.mjs → brand-protection-Ck3okE2k.mjs} +1 -1
  33. package/dist/browser-run-DJGJSzFX.mjs +42 -0
  34. package/dist/build-B1L6xrgC.mjs +2 -0
  35. package/dist/{build-BKPVP5ip.mjs → build-HmSXqjGn.mjs} +1 -1
  36. package/dist/{builds-BG5DHqU3.mjs → builds-CYxcZtkG.mjs} +3 -3
  37. package/dist/{cache-C05hHXUp.mjs → cache-D9tSfovH.mjs} +1 -1
  38. package/dist/{certificate-authorities-DyCFmZwR.mjs → certificate-authorities-CpiveTFC.mjs} +1 -1
  39. package/dist/cf-BxsXrVeh.mjs +18 -0
  40. package/dist/chunk-DSGVRFIS-C1_SEtRK.mjs +2 -0
  41. package/dist/{chunk-FT2NMTJB-DQ7s3x7Q.mjs → chunk-NDZDTP46-Bjx_wtJe.mjs} +3 -3
  42. package/dist/{chunk-AUSY7DKT-BJX6Fdc4.mjs → chunk-TAK63GWY-DdMktrgc.mjs} +9 -2
  43. package/dist/{cli-D9qlPB-6.mjs → cli-DeJc9U8z.mjs} +1 -1
  44. package/dist/{client-certificates-B-m8rfM9.mjs → client-certificates-CF6YZyvP.mjs} +1 -1
  45. package/dist/{client-side-security-M4oIUqID.mjs → client-side-security-BLoe9kS5.mjs} +1 -1
  46. package/dist/{cloud-connector-B63Dwn6n.mjs → cloud-connector-DXRUHsjt.mjs} +1 -1
  47. package/dist/cloudflared--1Ws1RJy.mjs +2 -0
  48. package/dist/{cloudforce-one-Dlc1GNFy.mjs → cloudforce-one-CBLxXi6v.mjs} +162 -162
  49. package/dist/{command-BQpXcGKV.mjs → command-83uVfXh9.mjs} +1 -1
  50. package/dist/{command-BWlpCtHe.mjs → command-BDe67N_n.mjs} +1 -1
  51. package/dist/{command-CXxh5Hce.mjs → command-BlIb6RR2.mjs} +1 -1
  52. package/dist/{command-ZBQ1WITj.mjs → command-Bpzp8Mz2.mjs} +1 -1
  53. package/dist/{command-CKQlxypn.mjs → command-BvfKhMl7.mjs} +1 -1
  54. package/dist/command-CG6RvZs0.mjs +2 -0
  55. package/dist/{command-CRl00uA2.mjs → command-CcuLC6CJ.mjs} +1 -1
  56. package/dist/{command-CUkXxZsc.mjs → command-Cu7dcaHT.mjs} +1 -1
  57. package/dist/{command-SS1z_t68.mjs → command-D3fyhdy-.mjs} +1 -1
  58. package/dist/{command-DyE8v4sd.mjs → command-DUhX8Dcr.mjs} +1 -1
  59. package/dist/{command-VuxpEvmH.mjs → command-Dh7RmjFu.mjs} +1 -1
  60. package/dist/{command-DEQSv-S1.mjs → command-DwXiDOeH.mjs} +1 -1
  61. package/dist/{command-BlGILcTA.mjs → command-UiHLJ8Ji.mjs} +1 -1
  62. package/dist/{command-Rv2MR-eh.mjs → command-_rqD0hXF.mjs} +1 -1
  63. package/dist/{command-DBaNgfA4.mjs → command-oNVwyjGB.mjs} +1 -1
  64. package/dist/{completions-lf50FBGm.mjs → completions-D06AO7A8.mjs} +11 -11
  65. package/dist/{connector-interrupts-DHN1KtUE.mjs → connector-interrupts-DelTmNyw.mjs} +1 -1
  66. package/dist/{connector-telemetry-events-CHg7FmXh.mjs → connector-telemetry-events-BwxR3G8d.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-CSifYi9r.mjs → connector-telemetry-snapshots-Bqq-hrpJ.mjs} +1 -1
  68. package/dist/{connectors-0UwPUav-.mjs → connectors-D-m3rEpk.mjs} +1 -1
  69. package/dist/{containers-DuIsM7lM.mjs → containers-CVNfEjJs.mjs} +3 -3
  70. package/dist/{containers-DRzgE46U.mjs → containers-DeoZyeQe.mjs} +25 -25
  71. package/dist/{content-scan-COyTz0Wb.mjs → content-scan-W0BNzbQp.mjs} +1 -1
  72. package/dist/{context-Bwkz4Lm_.mjs → context-q7UaYK69.mjs} +2 -2
  73. package/dist/{cps-B7_BJaAU.mjs → cps-BZ6hqRb5.mjs} +1 -1
  74. package/dist/{csamScanner-jez2EYXC.mjs → csamScanner-Bo1t3CLh.mjs} +1 -1
  75. package/dist/{ct-alerting-CACDrY0E.mjs → ct-alerting-E03faC7p.mjs} +1 -1
  76. package/dist/{custom-certificates-BBd92YlF.mjs → custom-certificates-CUySSPzi.mjs} +3 -3
  77. package/dist/{custom-csrs-DTwBiNMX.mjs → custom-csrs-gNpWkJPQ.mjs} +1 -1
  78. package/dist/{custom-hostnames-DIWlqvN9.mjs → custom-hostnames-abGBAbx7.mjs} +4 -4
  79. package/dist/{custom-nameservers-DISy8v8u.mjs → custom-nameservers-BgNXol1P.mjs} +1 -1
  80. package/dist/{custom-pages-BHXO_NFv.mjs → custom-pages-DMKX3aoD.mjs} +1 -1
  81. package/dist/{d1-MvAQMvvo.mjs → d1-CE08YqYk.mjs} +26 -22
  82. package/dist/{dcv-delegation-Buq0hcm_.mjs → dcv-delegation-B5YUEWu0.mjs} +1 -1
  83. package/dist/deploy-CWNm1-5v.mjs +2 -0
  84. package/dist/deploy-context-Dr6bxNcB.mjs +56 -0
  85. package/dist/deploy-input-Cc0_2QlW.mjs +2 -0
  86. package/dist/{dev-D8FGPKRt.mjs → dev-ZA8itQE7.mjs} +1 -1
  87. package/dist/{diagnostics-ChDfJ-Gv.mjs → diagnostics-UMbG6m4n.mjs} +1 -1
  88. package/dist/dialog-D4Y9ocuF.mjs +2 -0
  89. package/dist/{dist-CYFkGHYv.mjs → dist-BHEmAAHr.mjs} +4 -4
  90. package/dist/dist-uRuGmkMB.mjs +60 -0
  91. package/dist/{dls-8D00tqvC.mjs → dls-DIl16mLp.mjs} +1 -1
  92. package/dist/{dns-C-A5pwf3.mjs → dns-QUpgljRG.mjs} +5 -5
  93. package/dist/{dns-firewall-DIiF4pro.mjs → dns-firewall-BZwJXHLj.mjs} +1 -1
  94. package/dist/dry-run-DRj2_uV3.mjs +2 -0
  95. package/dist/{durable-objects-CnIqbj84.mjs → durable-objects-BCj4ykpU.mjs} +1 -1
  96. package/dist/{email-auth-v97Md32E.mjs → email-auth-DlHIYhCk.mjs} +1 -1
  97. package/dist/{email-routing-I29RG4hb.mjs → email-routing-UKVS4DYy.mjs} +1 -1
  98. package/dist/{email-security-BCarmbky.mjs → email-security-CZjfRIg0.mjs} +8 -8
  99. package/dist/{email-sending-CsHk2HAJ.mjs → email-sending-Dquc880C.mjs} +1 -1
  100. package/dist/{error-sanitization-BWnGnB73.mjs → error-sanitization-DE_zSrXw.mjs} +1 -1
  101. package/dist/error-sanitization-DOCQ9Ykh.mjs +2 -0
  102. package/dist/{fieldExtractors-GIVe9jZa.mjs → fieldExtractors-BbwDRquU.mjs} +1 -1
  103. package/dist/{firewall-DpgFqJr3.mjs → firewall--mTfDnCJ.mjs} +3 -3
  104. package/dist/{flagship-BVaXXlsX.mjs → flagship-cfoSwwM9.mjs} +1 -1
  105. package/dist/{fraud-B5GQdEF2.mjs → fraud-Dcsq3EYK.mjs} +1 -1
  106. package/dist/{google-tag-gateway-C4O61lp-.mjs → google-tag-gateway-DPKSkZQi.mjs} +1 -1
  107. package/dist/{healthchecks-BwYMnKSF.mjs → healthchecks-D78hIIBC.mjs} +1 -1
  108. package/dist/{hostnames-DhrGRFeI.mjs → hostnames-sF999-6H.mjs} +1 -1
  109. package/dist/{hyperdrive-DAA8Fazg.mjs → hyperdrive-qWACKfA4.mjs} +2 -2
  110. package/dist/{iam-sRKDU2Z3.mjs → iam-Bvg_PayW.mjs} +1 -1
  111. package/dist/{images-DXdekLVs.mjs → images-DI_lEZ4L.mjs} +1 -1
  112. package/dist/index.mjs +1 -1
  113. package/dist/init-1w_mcgk3.mjs +43 -0
  114. package/dist/{intel-CnVeSjIS.mjs → intel-BxElBUMP.mjs} +1 -1
  115. package/dist/interactive-BW9T1D1q.mjs +48 -0
  116. package/dist/interactive-DGUWZ2Gk.mjs +2 -0
  117. package/dist/{ips-COCUG8mk.mjs → ips-DWoaKxi7.mjs} +1 -1
  118. package/dist/k2-tFjaftl-.mjs +11 -0
  119. package/dist/{keyless-certificates-l2_S__h3.mjs → keyless-certificates-BrvxHU4J.mjs} +1 -1
  120. package/dist/{keys-CDZreums.mjs → keys-DcwTYKRf.mjs} +1 -1
  121. package/dist/{kv-DkpKVimq.mjs → kv-htXS-7uP.mjs} +2 -2
  122. package/dist/{lazy-command-_vZGz6mv.mjs → lazy-command-BDiIwpss.mjs} +1 -1
  123. package/dist/{leaked-credential-checks-edbapECI.mjs → leaked-credential-checks-bvGrLOmQ.mjs} +1 -1
  124. package/dist/{load-balancers-C5YMvhXD.mjs → load-balancers-BNTUt4yG.mjs} +1 -1
  125. package/dist/local-DlDumOSC.mjs +2 -0
  126. package/dist/{local-C0lQ9sTg.mjs → local-DlT72Xpn.mjs} +1 -1
  127. package/dist/{local-runtime-DtnWXN0a.mjs → local-runtime-CokO6qaX.mjs} +1 -1
  128. package/dist/{login-BrjOuHKu.mjs → login-BGF_I_LT.mjs} +1 -1
  129. package/dist/{login-DeOM4v0L.mjs → login-Ccw-mYwT.mjs} +1 -1
  130. package/dist/{logo-matches-CF8321pb.mjs → logo-matches-tE8LTKgg.mjs} +1 -1
  131. package/dist/{logos-Bd8xNRKW.mjs → logos-Bj845Mcw.mjs} +1 -1
  132. package/dist/{logpush-BYk3qqwY.mjs → logpush-Cs8JdvKi.mjs} +7 -7
  133. package/dist/{logs-Jcj2NN8H.mjs → logs-C92XZvNu.mjs} +1 -1
  134. package/dist/{magic-cloud-networking-Dgdb9H0f.mjs → magic-cloud-networking-hNp5MMw-.mjs} +1 -1
  135. package/dist/{magic-network-monitoring-CxVU4MZB.mjs → magic-network-monitoring-68GuWAnv.mjs} +1 -1
  136. package/dist/{magic-transit-KDyfUgTv.mjs → magic-transit-DNd7gu4j.mjs} +6 -6
  137. package/dist/{managed-defense-CxaDeNUd.mjs → managed-defense-B_wCAuFD.mjs} +1 -1
  138. package/dist/{managed-transforms-C7rT5E-x.mjs → managed-transforms-DZdxHPOh.mjs} +1 -1
  139. package/dist/{matches-BtKqG8T9.mjs → matches-B65CkflD.mjs} +1 -1
  140. package/dist/{mcp-QDd1Iyc0.mjs → mcp-DrJW5ayK.mjs} +4 -4
  141. package/dist/mesh-DfVzYTn1.mjs +26 -0
  142. package/dist/{migrate-DHlfR_gZ.mjs → migrate-CZNq63Uj.mjs} +1 -1
  143. package/dist/{monetization-pLalYYMI.mjs → monetization-BGaI8CMO.mjs} +1 -1
  144. package/dist/{mtls-certificates-DYA9Wu-c.mjs → mtls-certificates-BsU2emDD.mjs} +2 -2
  145. package/dist/{network-DrJxPWXQ.mjs → network-BEMD8P0U.mjs} +1 -1
  146. package/dist/{network-interconnects-D73MlYG8.mjs → network-interconnects-DMu_fcbo.mjs} +2 -7
  147. package/dist/o11y-C1a4gDGF.mjs +93 -0
  148. package/dist/{oauth-B08YQ4xq.mjs → oauth-Bj5Ne1o8.mjs} +1 -1
  149. package/dist/{oauth-clients-CkPDLFd-.mjs → oauth-clients-p4Etdqy_.mjs} +1 -1
  150. package/dist/{oauth-TGbM1Q0V.mjs → oauth-mspHHU5U.mjs} +1 -1
  151. package/dist/{oauth-scopes-VgliqcQe.mjs → oauth-scopes-B2IabFza.mjs} +1 -1
  152. package/dist/{organization-DIwqRBBV.mjs → organization-CdXt7AVZ.mjs} +1 -1
  153. package/dist/{organizations-Dk0D9ukm.mjs → organizations-5S6xEp7T.mjs} +1 -1
  154. package/dist/{origin-ca-certificates-BSFqMTn-.mjs → origin-ca-certificates-_VJAoK1D.mjs} +1 -1
  155. package/dist/{origin-post-quantum-encryption-BOKWKDTY.mjs → origin-post-quantum-encryption-GcldDsT2.mjs} +1 -1
  156. package/dist/{origin-tls-client-auth-BzE3WpcN.mjs → origin-tls-client-auth-DZHld9fA.mjs} +3 -3
  157. package/dist/{output-BGqhvqe2.mjs → output-BOe-3AQG.mjs} +1 -1
  158. package/dist/{page-rules-BKaU37cM.mjs → page-rules-o1tAMMsD.mjs} +1 -1
  159. package/dist/{pages-2Xg-lrMf.mjs → pages-CmiOhjSl.mjs} +4 -4
  160. package/dist/pay-per-crawl-BsnOxGYU.mjs +38 -0
  161. package/dist/pay-per-use-BXWMCSyE.mjs +33 -0
  162. package/dist/{pipelines-BM-T7mMK.mjs → pipelines-DWLQC0F6.mjs} +2 -2
  163. package/dist/{precursor-DmQ32-Sp.mjs → precursor-B6DjBib6.mjs} +1 -1
  164. package/dist/{previews-DDQ9ACDJ.mjs → previews-dUKEBGSM.mjs} +1 -1
  165. package/dist/process-2wmDCy17.mjs +2 -0
  166. package/dist/{progress-BYVZuEcG.mjs → progress-BtkTVcHI.mjs} +1 -1
  167. package/dist/prompt-RlgRrmbm.mjs +3 -0
  168. package/dist/{queries-DPBkVynK.mjs → queries-yLwoJRHV.mjs} +1 -1
  169. package/dist/{queues-CCXRs98q.mjs → queues-CnJRaE1o.mjs} +1 -1
  170. package/dist/{r2-BKuBSW8h.mjs → r2-CuC6-zQX.mjs} +48 -45
  171. package/dist/{radar-Gv1yFoRX.mjs → radar-DrQLcbkq.mjs} +1 -1
  172. package/dist/{raw-fetch-DyYWa923.mjs → raw-fetch-B4NvWuZD.mjs} +1 -1
  173. package/dist/{realtime-CVl-rvgx.mjs → realtime-CjsnzHxD.mjs} +1 -1
  174. package/dist/{registrar-swlnh22i.mjs → registrar-BgOsxTnX.mjs} +1 -1
  175. package/dist/{registrar-sandbox-cmOYDnkp.mjs → registrar-sandbox-3ikBD9fB.mjs} +1 -1
  176. package/dist/{registry-C20J1MW0.mjs → registry-CHowrQsZ.mjs} +1 -1
  177. package/dist/{reporting-Bgwsvol1.mjs → reporting-hE127s5r.mjs} +1 -1
  178. package/dist/{request-headers-CUee83pa.mjs → request-headers-DiJeDAn1.mjs} +1 -1
  179. package/dist/{request-tracers-BBiJvVDz.mjs → request-tracers-BCwLxmPN.mjs} +1 -1
  180. package/dist/{resolve-DvxgnWjL.mjs → resolve-CaTBV-c6.mjs} +1 -1
  181. package/dist/resolve-DCGSzUDQ.mjs +2 -0
  182. package/dist/{resource-sharing-C1JiYLbl.mjs → resource-sharing-2qvWUuMa.mjs} +11 -11
  183. package/dist/{resource-tagging-C9VOSlDR.mjs → resource-tagging-Dwx7iL3v.mjs} +1 -1
  184. package/dist/{rules-BDunCGMj.mjs → rules-DxVQ6jIg.mjs} +1 -1
  185. package/dist/rulesets-Cdh8YjI9.mjs +37 -0
  186. package/dist/{rum-B7XiECe9.mjs → rum-a4CMq4Qu.mjs} +1 -1
  187. package/dist/{run-CrZgB8L_.mjs → run-BvHwWWUX.mjs} +1 -1
  188. package/dist/run-CkbrPJPx.mjs +2 -0
  189. package/dist/{schema-DC0kdqgV.mjs → schema-elj12WOx.mjs} +1 -1
  190. package/dist/{schema-flags-BUZR9SLd.mjs → schema-flags-BzoBGPWk.mjs} +1 -1
  191. package/dist/{scim-CORcs2wK.mjs → scim-B8XlXl8v.mjs} +1 -1
  192. package/dist/{secrets-store-BoZQaFey.mjs → secrets-store-Cqhedh_i.mjs} +2 -2
  193. package/dist/{security-insights-DblK_6sg.mjs → security-insights-le2-DteL.mjs} +1 -1
  194. package/dist/{security-txt-Dl7RPnRb.mjs → security-txt-cCArWXur.mjs} +1 -1
  195. package/dist/{session-BWe9et4K.mjs → session-C1BhT1ZJ.mjs} +1 -1
  196. package/dist/shared-BPjcpXuA.mjs +2 -0
  197. package/dist/{smart-shield-DX0-8ruu.mjs → smart-shield-Csyh8hwB.mjs} +1 -1
  198. package/dist/{snippets-BFN-Lg3K.mjs → snippets-DUWx25q6.mjs} +1 -1
  199. package/dist/spawn-IysxuTNW.mjs +10 -0
  200. package/dist/{spectrum-HYWLWB0X.mjs → spectrum-Da3UYSOR.mjs} +1 -1
  201. package/dist/{speed-Dj0YhfRe.mjs → speed-NxlMnB2e.mjs} +1 -1
  202. package/dist/sql-CNdHAlQ8.mjs +4 -0
  203. package/dist/src-JfLDUxFr.mjs +125 -0
  204. package/dist/{ssl-BQL1fNtD.mjs → ssl-BtaX2WEJ.mjs} +1 -1
  205. package/dist/startup-profile-B2l0ChVu.mjs +2 -0
  206. package/dist/{startup-profile-0X5ebbng.mjs → startup-profile-CdJWgNjd.mjs} +1 -1
  207. package/dist/{state-Dy6-rKNd.mjs → state-BDSvdSdP.mjs} +1 -1
  208. package/dist/state-JB4_BU1o.mjs +2 -0
  209. package/dist/{stream-DKv2TtZN.mjs → stream-C1Ijjzn4.mjs} +3 -3
  210. package/dist/{submit-Byt2KBGI.mjs → submit-MdkuU_Pt.mjs} +1 -1
  211. package/dist/{tags-BIBsdG68.mjs → tags-CA1xMM96.mjs} +1 -1
  212. package/dist/telemetry-BsYO3nxG.mjs +2 -0
  213. package/dist/{telemetry-bu3txnIR.mjs → telemetry-Cm39QJ-M.mjs} +1 -1
  214. package/dist/{tenant-Bs4Ac4n3.mjs → tenant-BB6Oszcl.mjs} +1 -1
  215. package/dist/{tenant-custom-nameservers-DcaELeCE.mjs → tenant-custom-nameservers-BsbgYAEo.mjs} +1 -1
  216. package/dist/{tools-BbTX7rlM.mjs → tools-CSc5DmFi.mjs} +1 -1
  217. package/dist/{tunnels-DWcrz9Sf.mjs → tunnels-CRFtyHWz.mjs} +4 -4
  218. package/dist/{turnstile-2MIGp2ce.mjs → turnstile-DBXWo_Xe.mjs} +1 -1
  219. package/dist/update-check-C2oVEbXx.mjs +2 -0
  220. package/dist/{update-check-CfB0PNTY.mjs → update-check-CMXSdres.mjs} +1 -1
  221. package/dist/update-check-worker.mjs +1 -1
  222. package/dist/{url-info-B8udoxlx.mjs → url-info-t-XAs0Mk.mjs} +1 -1
  223. package/dist/{url-normalization-C6AdWtaE.mjs → url-normalization-Cs4F8e0a.mjs} +1 -1
  224. package/dist/{url-scanner-Dg0c_yVb.mjs → url-scanner-CBIoDbTx.mjs} +1 -1
  225. package/dist/{user-BLZ-0Bgv.mjs → user-CevdOMoa.mjs} +3 -3
  226. package/dist/values-CjNlkbIh.mjs +4 -0
  227. package/dist/{vectorize-DEUSEQXY.mjs → vectorize-9d9tPmg5.mjs} +1 -1
  228. package/dist/version-BdVUXLnK.mjs +2 -0
  229. package/dist/{waiting-rooms-BycGk2Y0.mjs → waiting-rooms--5WmrWb3.mjs} +1 -1
  230. package/dist/{web-assets-CLZdWOmN.mjs → web-assets-BHot_MU8.mjs} +1 -1
  231. package/dist/{web3-DjeavuLg.mjs → web3-CYfWAF6b.mjs} +1 -1
  232. package/dist/{workers-C_SfyU-v.mjs → workers-S17M0n3h.mjs} +23 -21
  233. package/dist/{workers-builds-COn5Ne5G.mjs → workers-builds-Dw7ho3So.mjs} +2 -2
  234. package/dist/{workers-for-platforms-tchCXwNF.mjs → workers-for-platforms-A3yjyLh3.mjs} +4 -6
  235. package/dist/{workers-vpc-CKts8Av0.mjs → workers-vpc-BZ2xXtC3.mjs} +1 -1
  236. package/dist/{workflows-BibtWuOx.mjs → workflows-BgGrVpSR.mjs} +1 -1
  237. package/dist/{wrangler-migration-BpJqCFAa.mjs → wrangler-migration-C6FKHER1.mjs} +1 -1
  238. package/dist/{zaraz-BvQZB0YY.mjs → zaraz-BsD2dMI3.mjs} +1 -1
  239. package/dist/{zero-trust-FStq4uhn.mjs → zero-trust-CA3iGQbG.mjs} +413 -397
  240. package/dist/{zone-tymlghWb.mjs → zone-D2M4EZD0.mjs} +1 -1
  241. package/dist/{zones-Bz6dgT9_.mjs → zones-BoOC_JzC.mjs} +1 -1
  242. package/package.json +25 -26
  243. package/dist/account-tags-d0RkEw6s.mjs +0 -15
  244. package/dist/ai-gateway-CJaUlfGc.mjs +0 -82
  245. package/dist/ai-search-PTlpY1T9.mjs +0 -79
  246. package/dist/analytics-NPND7aHB.mjs +0 -20
  247. package/dist/argo-DYfLQhd2.mjs +0 -10
  248. package/dist/auth-CBtzZ3Sw.mjs +0 -2
  249. package/dist/browser-run-DVaiBLYX.mjs +0 -46
  250. package/dist/build-C4giET85.mjs +0 -2
  251. package/dist/cf-B9aqZZKD.mjs +0 -18
  252. package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +0 -2
  253. package/dist/cloudflared-B48cfu95.mjs +0 -2
  254. package/dist/command-CzvlHvov.mjs +0 -2
  255. package/dist/deploy-BS47vZvJ.mjs +0 -2
  256. package/dist/deploy-context-Cfushp8j.mjs +0 -56
  257. package/dist/deploy-input-BAhS5LYx.mjs +0 -2
  258. package/dist/dialog-CL1Zy4pn.mjs +0 -2
  259. package/dist/dist-8rP3V95o.mjs +0 -57
  260. package/dist/dry-run-DmsbOMF1.mjs +0 -2
  261. package/dist/error-sanitization-C_a2LxOK.mjs +0 -2
  262. package/dist/init-j47MT4Qe.mjs +0 -39
  263. package/dist/interactive-Dqv0RWVU.mjs +0 -42
  264. package/dist/interactive-Wpd3FcDc.mjs +0 -2
  265. package/dist/k2-CmHkArHL.mjs +0 -13
  266. package/dist/local-D5L5Bwju.mjs +0 -2
  267. package/dist/mesh-DtrIzl5z.mjs +0 -26
  268. package/dist/observability-CvN9oxAo.mjs +0 -80
  269. package/dist/pay-per-crawl-5-KTQXRr.mjs +0 -65
  270. package/dist/pay-per-use-sGebKzNK.mjs +0 -6
  271. package/dist/prompt-F5wxc8zq.mjs +0 -3
  272. package/dist/resolve-qwL1LmKN.mjs +0 -2
  273. package/dist/rulesets-BMGxrnv9.mjs +0 -37
  274. package/dist/run-nNxXb_Cv.mjs +0 -2
  275. package/dist/shared-0N31BXkY.mjs +0 -2
  276. package/dist/spawn-DZ9A-xXb.mjs +0 -10
  277. package/dist/src-CAiZlihY.mjs +0 -117
  278. package/dist/startup-profile-CXnsF4c7.mjs +0 -2
  279. package/dist/state-BA2CanJ_.mjs +0 -2
  280. package/dist/telemetry-DBXOMuLh.mjs +0 -2
  281. package/dist/update-check-B-CvDAUz.mjs +0 -2
  282. package/dist/values-BUK-m0Jg.mjs +0 -4
  283. package/dist/version-BZNc7Y3t.mjs +0 -2
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,t as r}from"./context-Bwkz4Lm_.mjs";import{t as i}from"./output-BGqhvqe2.mjs";import{t as a}from"./dry-run-DmsbOMF1.mjs";import{t as o}from"./progress-BYVZuEcG.mjs";import{t as s}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-F5wxc8zq.mjs";import{t as m}from"./cli-types-9oYmRTHJ.mjs";function h(e){return e.usage(`$0 realtime kit analytics livestreams daily get <app-id>
2
+ import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-RlgRrmbm.mjs";import{t as m}from"./cli-types-9oYmRTHJ.mjs";function h(e){return e.usage(`$0 realtime kit analytics livestreams daily get <app-id>
3
3
 
4
4
  Returns day-wise livestream analytics for the specified time range.`).positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-time`,{type:`number`,description:`Specify the start time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`end-time`,{type:`number`,description:`Specify the end time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`filters`,{type:`string`,description:`Optional filters for livestream analytics.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <app-id>`,describe:`Fetch day-wise analytics data for your livestreams`,builder:h,handler:async c=>s({command:`realtime kit analytics livestreams daily get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={start_time:c[`start-time`],end_time:c[`end-time`],filters:c.filters};if(c.dryRun){let e=await n();a({command:`cf realtime kit analytics livestreams daily get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/analytics/livestreams/daywise`,pathParams:{"app-id":String(c[`app-id`]??``)},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.realtime.kit.analytics.livestreams.daily.get({account_id:u,app_id:c[`app-id`],...s}));i(d,{successLabel:`Loaded`})})},ee={command:`daily`,describe:`Daily livestream analytics for RealtimeKit applications`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(e){return e.usage(`$0 realtime kit analytics livestreams get <app-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-CQ_TYifs.mjs";import{n as t,t as n}from"./local-C0lQ9sTg.mjs";import{a as r,i,n as a}from"./auth-AobvBmz4.mjs";import{a as o,t as s}from"./context-Bwkz4Lm_.mjs";import{t as c}from"./output-BGqhvqe2.mjs";import{t as l}from"./dry-run-DmsbOMF1.mjs";import{t as u}from"./progress-BYVZuEcG.mjs";import{n as d,t as f}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{i as p,n as m,r as h,t as g}from"./body-parser-DkHKPkJ7.mjs";import{n as _}from"./input-validation-D7z60HJH.mjs";import{a as ee,i as v,n as te,o as y,r as b}from"./prompt-F5wxc8zq.mjs";import{t as x}from"./cli-types-9oYmRTHJ.mjs";import{_ as S,a as C,c as ne,d as w,g as T,h as E,i as D,m as O,o as k,p as A,r as j,s as M,t as N,u as re}from"./schema-flags-BUZR9SLd.mjs";import{domainToASCII as ie}from"node:url";import{isDeepStrictEqual as ae}from"node:util";function oe(e){return e.usage("$0 registrar extensions get <extension>\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on a specific extension (TLD). Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").positional(`extension`,{type:`string`,description:"The extension name (e.g., `com`, `co.uk`).",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get <extension>`,describe:`Get extension`,builder:oe,handler:async e=>f({command:`registrar extensions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf registrar extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar/extensions/${e.extension==null?`<extension>`:encodeURIComponent(String(e.extension))}`,pathParams:{extension:String(e.extension??``)},bodyKind:`none`});return}let t=await a(e),r=e.local?n:await s();e.accountId=r;let i=await u(`Loading`,async()=>t.registrar.extensions.get({account_id:r,extension:e.extension}));c(i,{successLabel:`Loaded`})})};function ce(e){return e.usage("$0 registrar extensions list\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on each supported extension (TLD). This endpoint uses cursor-based pagination. Results are ordered by extension name by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").option(`name`,{type:`string`,description:"Filter extensions by exact name match.\nFor example, `name=com` returns only the `com` extension."}).option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
2
+ import{r as e}from"./theme-CQ_TYifs.mjs";import{n as t,t as n}from"./local-DlT72Xpn.mjs";import{a as r,i,n as a}from"./auth-CGLsxbc6.mjs";import{a as o,t as s}from"./context-q7UaYK69.mjs";import{t as c}from"./output-BOe-3AQG.mjs";import{t as l}from"./dry-run-DRj2_uV3.mjs";import{t as u}from"./progress-BtkTVcHI.mjs";import{n as d,t as f}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{i as p,n as m,r as h,t as g}from"./body-parser-DkHKPkJ7.mjs";import{n as _}from"./input-validation-D7z60HJH.mjs";import{a as ee,i as v,n as te,o as y,r as b}from"./prompt-RlgRrmbm.mjs";import{t as x}from"./cli-types-9oYmRTHJ.mjs";import{_ as S,a as C,c as ne,d as w,g as T,h as E,i as D,m as O,o as k,p as A,r as j,s as M,t as N,u as re}from"./schema-flags-BzoBGPWk.mjs";import{domainToASCII as ie}from"node:url";import{isDeepStrictEqual as ae}from"node:util";function oe(e){return e.usage("$0 registrar extensions get <extension>\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on a specific extension (TLD). Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").positional(`extension`,{type:`string`,description:"The extension name (e.g., `com`, `co.uk`).",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get <extension>`,describe:`Get extension`,builder:oe,handler:async e=>f({command:`registrar extensions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf registrar extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar/extensions/${e.extension==null?`<extension>`:encodeURIComponent(String(e.extension))}`,pathParams:{extension:String(e.extension??``)},bodyKind:`none`});return}let t=await a(e),r=e.local?n:await s();e.accountId=r;let i=await u(`Loading`,async()=>t.registrar.extensions.get({account_id:r,extension:e.extension}));c(i,{successLabel:`Loaded`})})};function ce(e){return e.usage("$0 registrar extensions list\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on each supported extension (TLD). This endpoint uses cursor-based pagination. Results are ordered by extension name by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").option(`name`,{type:`string`,description:"Filter extensions by exact name match.\nFor example, `name=com` returns only the `com` extension."}).option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
3
3
  Pass this value to fetch the next page of results. Omit (or
4
4
  pass an empty string) for the first page.`}).option(`per-page`,{type:`number`,description:`Number of items to return per page.`}).option(`direction`,{type:`string`,description:`Sort direction for results. Defaults to ascending order.`,choices:[`asc`,`desc`]}).option(`sort-by`,{type:`string`,description:"Column to sort results by. Defaults to `name` when omitted.",choices:[`name`,`created_at`,`updated_at`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`list`,describe:`List extensions`,builder:x(ce),handler:async e=>f({command:`registrar extensions list`,classification:{safeFlags:[`direction`,`sort-by`,`dry-run`]}},e,async()=>{let t={name:e.name,cursor:e.cursor,per_page:e[`per-page`],direction:e.direction,sort_by:e[`sort-by`]};if(e.dryRun){let e=await o();l({command:`cf registrar extensions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/registrar/extensions`,pathParams:{},query:t,bodyKind:`none`});return}let r=await a(e),i=e.local?n:await s();e.accountId=i;let d=await u(`Loading`,async()=>r.registrar.extensions.list({account_id:i,...t}));c(d,{successLabel:`Loaded`})})},ue={command:`extensions`,describe:`Operations for extensions`,builder:e=>e.command(se).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function de(e){return e.usage("$0 registrar registrations check <domains...>\n\nPerforms real-time, authoritative availability checks directly against domain registries. Use this endpoint to verify a domain is available before attempting registration via `POST /registrations`. **Important:** Unlike the Search endpoint, these results are authoritative and reflect current registry status. Always check availability immediately before registration as domain status can change rapidly. **Note:** This endpoint uses POST to accept a list of domains in the request body. It is a read-only operation — it does not create, modify, or reserve any domains. ### Extension support Only domains on extensions supported for programmatic registration by this API can be registered. If you check a domain on an unsupported extension, the response will include `registrable: false` with a `reason` field explaining why: - `extension_not_supported_via_api` — Cloudflare Registrar supports this extension in the dashboard, but it is not yet available for programmatic registration via this API. Register via `https://dash.cloudflare.com/{account_id}/domains/registrations` instead. - `extension_not_supported` — This extension is not supported by Cloudflare Registrar. - `extension_disallows_registration` — The extension's registry has temporarily or permanently frozen new registrations. No registrar can register domains on this extension at this time. - `domain_premium` — The domain is premium priced. Premium registration is not currently supported by this API. - `domain_unavailable` — The domain is already registered, reserved, or otherwise not available for registration on a supported extension. The `reason` field is only present when `registrable` is `false`. ### Behavior - Maximum 20 domains per request - Pricing is only returned for domains where `registrable: true` - Results are not cached; each request queries the registry ### Workflow 1. Call this endpoint with domains the user wants to register. 2. For each domain where `registrable: true`, present pricing to the user. 3. If `tier: premium`, note that premium registration is not currently supported by this API and do not proceed to `POST /registrations`. 4. Proceed to `POST /registrations` only for supported non-premium domains.").positional(`domains`,{type:`string`,array:!0,description:"List of fully qualified domain names (FQDNs) to check for availability. Each domain must include the extension. - Minimum: 1 domain. - Maximum: 20 domains per request. - The response returns domains on unsupported extensions with `registrable: false` and a `reason` field. - The response may omit malformed domain names (e.g., names missing an extension). ",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of fully qualified domain names (FQDNs) to check. Each domain must include the extension (e.g., "example.com", not "example").`})}const fe={command:`check <domains...>`,describe:`Check domain availability`,builder:de,handler:async e=>f({command:`registrar registrations check`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf registrar registrations check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar/domain-check`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({domains:e.domains}):m(e.body)});return}let t=await a(e),r=e.local?n:await s();if(e.accountId=r,e.body){let n=m(e.body),i=await u(`Creating`,async()=>t.registrar.registrations.check({...n,account_id:r}));c(i,{successLabel:`Created`});return}let i=g({domains:e.domains}),d=await u(`Creating`,async()=>t.registrar.registrations.check({...i,account_id:r}));c(d,{successLabel:`Created`})})};function pe(e){return e.usage("$0 registrar registrations get-registration-status <domain-name>\n\nReturns the current status of a domain registration workflow. Use this endpoint to poll for completion when the POST response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. **Terminal states:** `succeeded` and `failed` are terminal and always have `completed: true`. **Non-terminal states:** - `action_required` has `completed: false` and will not resolve on its own. The workflow is paused pending user intervention. - `blocked` has `completed: false` and indicates the workflow is waiting on a third party such as the extension registry or losing registrar. Continue polling while informing the user of the delay. Use increasing backoff between polls. When `state: blocked`, use a longer polling interval and do not poll indefinitely. A naive polling loop that only checks `completed` can run indefinitely when `state: action_required`. Break explicitly on `action_required`: ```js let status; do { await new Promise(r => setTimeout(r, 2000)); status = await cloudflare.request({ method: 'GET', path: reg.result.links.self, }); } while ( !status.result.completed && status.result.state !== 'action_required' ); if (status.result.state === 'action_required') { // Surface context.action and context.confirmation_sent_to to the user. // Do not re-submit the registration request. } ```").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`get-registration-status <domain-name>`,describe:`Get Registration Status`,builder:pe,handler:async e=>f({command:`registrar registrations get-registration-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf registrar registrations get-registration-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/registration-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await a(e),r=e.local?n:await s();e.accountId=r;let i=await u(`Loading`,async()=>t.registrar.registrations.getRegistrationStatus({account_id:r,domain_name:e[`domain-name`]}));c(i,{successLabel:`Loaded`})})};function he(e){return e.usage("$0 registrar registrations get-transfer-status <domain-name>\n\nReturns the current status of a domain transfer workflow. Use this endpoint to poll transfer progress after initiating a transfer with `POST /accounts/{account_id}/registrar/registrations/{domain_name}/transfer-in`. The URL is provided in the `links.self` field of the transfer response. ### Transfer timelines Transfers typically take 1–10 days due to ICANN-mandated approval windows. ### Workflow states **Terminal states:** `succeeded` and `failed` are terminal and always have `completed: true`. **Non-terminal states:** - `in_progress`: Transfer has been submitted to the registry and is being processed. Continue polling. - `blocked`: The workflow is waiting on the losing registrar or registry to release the domain. This is the **most common state** for transfers and is entirely normal — it means the ICANN transfer approval window is in effect. The losing registrar has up to 5 days to approve or reject. Continue polling with longer intervals (e.g., every 30–60 minutes). - `action_required`: The user needs to take action (e.g., the FOA email needs to be accepted). See `context` for details on what is needed. - `pending`: Transfer workflow created but not yet started processing. ### Polling guidance Adjust your polling interval based on the current workflow state: - `pending` or `in_progress`: Poll every 30 seconds. - `blocked`: The transfer is waiting on a third party (e.g., losing registrar approval). Poll every 30–60 minutes. - `action_required`: Stop polling. The workflow will not advance until the user takes action. Check `context` for details on what is needed. - `succeeded` or `failed`: Terminal — stop polling.").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`get-transfer-status <domain-name>`,describe:`Get Transfer Status`,builder:he,handler:async e=>f({command:`registrar registrations get-transfer-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf registrar registrations get-transfer-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/transfer-in-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await a(e),r=e.local?n:await s();e.accountId=r;let i=await u(`Loading`,async()=>t.registrar.registrations.getTransferStatus({account_id:r,domain_name:e[`domain-name`]}));c(i,{successLabel:`Loaded`})})};function _e(e){return e.usage("$0 registrar registrations get-update-status <domain-name>\n\nReturns the current status of a domain update workflow. Use this endpoint to poll for completion when the PATCH response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. Use increasing backoff between polls. When the workflow remains blocked on a third party, use a longer polling interval and do not poll indefinitely.").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`get-update-status <domain-name>`,describe:`Get Update Status`,builder:_e,handler:async e=>f({command:`registrar registrations get-update-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf registrar registrations get-update-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/update-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await a(e),r=e.local?n:await s();e.accountId=r;let i=await u(`Loading`,async()=>t.registrar.registrations.getUpdateStatus({account_id:r,domain_name:e[`domain-name`]}));c(i,{successLabel:`Loaded`})})};function ye(e){return e.usage("$0 registrar registrations get <domain-name>\n\nReturns the current state of a domain registration. This is the canonical read endpoint for a domain you own. It returns the full registration resource including current settings and expiration. When the registration resource is ready, both `created_at` and `expires_at` are present in the response.").positional(`domain-name`,{type:`string`,description:`Domain name to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const be={command:`get <domain-name>`,describe:`Get Registration`,builder:ye,handler:async e=>f({command:`registrar registrations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf registrar registrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await a(e),r=e.local?n:await s();e.accountId=r;let i=await u(`Loading`,async()=>t.registrar.registrations.get({account_id:r,domain_name:e[`domain-name`]}));c(i,{successLabel:`Loaded`})})};function xe(e){return e.usage("$0 registrar registrations list\n\nReturns a paginated list of domain registrations owned by the account. This endpoint uses cursor-based pagination. Results are ordered by registration date by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages.").option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
5
5
  Pass this value to fetch the next page of results. Omit (or
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C0lQ9sTg.mjs";import{i as t,n}from"./auth-AobvBmz4.mjs";import{a as r,t as i}from"./context-Bwkz4Lm_.mjs";import{t as a}from"./output-BGqhvqe2.mjs";import{t as o}from"./dry-run-DmsbOMF1.mjs";import{t as s}from"./progress-BYVZuEcG.mjs";import{t as c}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{i as l,n as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p}from"./prompt-F5wxc8zq.mjs";import{t as m}from"./cli-types-9oYmRTHJ.mjs";function h(e){return e.usage("$0 registrar-sandbox extensions get <extension>\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on a specific extension (TLD). Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").positional(`extension`,{type:`string`,description:"The extension name (e.g., `com`, `co.uk`).",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <extension>`,describe:`Get extension`,builder:h,handler:async t=>c({command:`registrar-sandbox extensions get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf registrar-sandbox extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/registrar-sandbox/extensions/${t.extension==null?`<extension>`:encodeURIComponent(String(t.extension))}`,pathParams:{extension:String(t.extension??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.registrarSandbox.extensions.get({account_id:l,extension:t.extension}));a(u,{successLabel:`Loaded`})})};function _(e){return e.usage("$0 registrar-sandbox extensions list\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on each supported extension (TLD). This endpoint uses cursor-based pagination. Results are ordered by extension name by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").option(`name`,{type:`string`,description:"Filter extensions by exact name match.\nFor example, `name=com` returns only the `com` extension."}).option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
2
+ import{t as e}from"./local-DlT72Xpn.mjs";import{i as t,n}from"./auth-CGLsxbc6.mjs";import{a as r,t as i}from"./context-q7UaYK69.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-BtkTVcHI.mjs";import{t as c}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{i as l,n as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p}from"./prompt-RlgRrmbm.mjs";import{t as m}from"./cli-types-9oYmRTHJ.mjs";function h(e){return e.usage("$0 registrar-sandbox extensions get <extension>\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on a specific extension (TLD). Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").positional(`extension`,{type:`string`,description:"The extension name (e.g., `com`, `co.uk`).",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <extension>`,describe:`Get extension`,builder:h,handler:async t=>c({command:`registrar-sandbox extensions get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf registrar-sandbox extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/registrar-sandbox/extensions/${t.extension==null?`<extension>`:encodeURIComponent(String(t.extension))}`,pathParams:{extension:String(t.extension??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.registrarSandbox.extensions.get({account_id:l,extension:t.extension}));a(u,{successLabel:`Loaded`})})};function _(e){return e.usage("$0 registrar-sandbox extensions list\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on each supported extension (TLD). This endpoint uses cursor-based pagination. Results are ordered by extension name by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").option(`name`,{type:`string`,description:"Filter extensions by exact name match.\nFor example, `name=com` returns only the `com` extension."}).option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
3
3
  Pass this value to fetch the next page of results. Omit (or
4
4
  pass an empty string) for the first page.`}).option(`per-page`,{type:`number`,description:`Number of items to return per page.`}).option(`direction`,{type:`string`,description:`Sort direction for results. Defaults to ascending order.`,choices:[`asc`,`desc`]}).option(`sort-by`,{type:`string`,description:"Column to sort results by. Defaults to `name` when omitted.",choices:[`name`,`created_at`,`updated_at`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`list`,describe:`List extensions`,builder:m(_),handler:async t=>c({command:`registrar-sandbox extensions list`,classification:{safeFlags:[`direction`,`sort-by`,`dry-run`]}},t,async()=>{let c={name:t.name,cursor:t.cursor,per_page:t[`per-page`],direction:t.direction,sort_by:t[`sort-by`]};if(t.dryRun){let e=await r();o({command:`cf registrar-sandbox extensions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/registrar-sandbox/extensions`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.registrarSandbox.extensions.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})},y={command:`extensions`,describe:`Operations for extensions`,builder:e=>e.command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage("$0 registrar-sandbox registrations check <domains...>\n\nPerforms real-time, authoritative availability checks directly against domain registries. Use this endpoint to verify a domain is available before attempting registration via `POST /registrations`. **Important:** Unlike the Search endpoint, these results are authoritative and reflect current registry status. Always check availability immediately before registration as domain status can change rapidly. **Note:** This endpoint uses POST to accept a list of domains in the request body. It is a read-only operation — it does not create, modify, or reserve any domains. ### Extension support Only domains on extensions supported for programmatic registration by this API can be registered. If you check a domain on an unsupported extension, the response will include `registrable: false` with a `reason` field explaining why: - `extension_not_supported_via_api` — Cloudflare Registrar supports this extension in the dashboard, but it is not yet available for programmatic registration via this API. Register via `https://dash.cloudflare.com/{account_id}/domains/registrations` instead. - `extension_not_supported` — This extension is not supported by Cloudflare Registrar. - `extension_disallows_registration` — The extension's registry has temporarily or permanently frozen new registrations. No registrar can register domains on this extension at this time. - `domain_premium` — The domain is premium priced. Premium registration is not currently supported by this API. - `domain_unavailable` — The domain is already registered, reserved, or otherwise not available for registration on a supported extension. The `reason` field is only present when `registrable` is `false`. ### Behavior - Maximum 20 domains per request - Pricing is only returned for domains where `registrable: true` - Results are not cached; each request queries the registry ### Workflow 1. Call this endpoint with domains the user wants to register. 2. For each domain where `registrable: true`, present pricing to the user. 3. If `tier: premium`, note that premium registration is not currently supported by this API and do not proceed to `POST /registrations`. 4. Proceed to `POST /registrations` only for supported non-premium domains.").positional(`domains`,{type:`string`,array:!0,description:"List of fully qualified domain names (FQDNs) to check for availability. Each domain must include the extension. - Minimum: 1 domain. - Maximum: 20 domains per request. - The response returns domains on unsupported extensions with `registrable: false` and a `reason` field. - The response may omit malformed domain names (e.g., names missing an extension). ",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of fully qualified domain names (FQDNs) to check. Each domain must include the extension (e.g., "example.com", not "example").`})}const x={command:`check <domains...>`,describe:`Check domain availability`,builder:b,handler:async t=>c({command:`registrar-sandbox registrations check`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf registrar-sandbox registrations check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/registrar-sandbox/domain-check`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({domains:t.domains}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.registrarSandbox.registrations.check({...e,account_id:l}));a(n,{successLabel:`Created`});return}let f=d({domains:t.domains}),p=await s(`Creating`,async()=>c.registrarSandbox.registrations.check({...f,account_id:l}));a(p,{successLabel:`Created`})})};function S(e){return e.usage("$0 registrar-sandbox registrations create\n\nStarts a domain registration workflow. ### Prerequisites - The account must not already be at the maximum supported domain limit. A single account may own up to 500 domains in total across registrations created through either the dashboard or this API. - The domain must be on a supported extension for programmatic registration. - Use `POST /domain-check` immediately before calling this endpoint to confirm real-time availability and pricing. ### Defaults - `years`: defaults to the extension's minimum registration period (1 year for most extensions, but varies — for example, `.ai` (if supported) requires a minimum of 2 years). - `auto_renew`: defaults to `false`. Setting it to `true` is an explicit opt-in authorizing Cloudflare to charge the account's default payment method up to 30 days before domain expiry to renew the registration. Renewal pricing may change over time based on registry pricing. - `privacy_mode`: defaults to `redaction`. ### Premium domains Premium domain registration is not currently supported by this API. If `POST /domain-check` returns `tier: premium`, do not call this endpoint for that domain. ### Response behavior By default, the server holds the connection for a bounded, server-defined amount of time while the registration completes. Most registrations finish within this window and return `201 Created` with a completed workflow status. If the registration is still processing after this synchronous wait window, the server returns `202 Accepted`. Poll the URL in `links.self` to track progress. To skip the wait and receive an immediate `202`, send `Prefer: respond-async`.").option(`prefer`,{type:`string`,description:`Set to \`respond-async\` to receive an immediate \`202 Accepted\` without
5
5
  waiting for the operation to complete (RFC 7240).
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./cf-B9aqZZKD.mjs";import{resolve as t}from"node:path";const n=`CLOUDFLARE_REGISTRY_PATH`;function r(r=process.env){let i=r[n];return i===void 0||i===``?t(e(),`registry`):t(i)}function i(e=process.env){let t=r(e);return{[n]:t,WRANGLER_REGISTRY_PATH:t,MINIFLARE_REGISTRY_PATH:t}}export{r as n,i as t};
2
+ import{i as e}from"./cf-BxsXrVeh.mjs";import{resolve as t}from"node:path";const n=`CLOUDFLARE_REGISTRY_PATH`;function r(r=process.env){let i=r[n];return i===void 0||i===``?t(e(),`registry`):t(i)}function i(e=process.env){let t=r(e);return{[n]:t,WRANGLER_REGISTRY_PATH:t,MINIFLARE_REGISTRY_PATH:t}}export{r as n,i as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,t as r}from"./context-Bwkz4Lm_.mjs";import{t as i}from"./output-BGqhvqe2.mjs";import{t as a}from"./dry-run-DmsbOMF1.mjs";import{t as o}from"./progress-BYVZuEcG.mjs";import{t as s}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as c}from"./body-parser-DkHKPkJ7.mjs";function l(e){return e.usage(`$0 reporting industry get
2
+ import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as c}from"./body-parser-DkHKPkJ7.mjs";function l(e){return e.usage(`$0 reporting industry get
3
3
 
4
4
  Gets the industry classification for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`Get an account industry`,builder:l,handler:async c=>s({command:`reporting industry get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf reporting industry get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/reporting/industry`,pathParams:{},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.reporting.industry.get({account_id:l}));i(u,{successLabel:`Loaded`})})};function d(e){return e.usage(`$0 reporting industry update
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./agent-context-DFEgYjEQ.mjs";import{t}from"./version-BZNc7Y3t.mjs";import{i as n,t as r}from"./interactive-Dqv0RWVU.mjs";function i(){return r?`ci`:n()?`interactive`:`non-interactive`}function a(){let n=e(),r=n.isAgentic&&n.harness!==null?{"X-CF-CLI-Agent":n.harness.id}:{};return{"User-Agent":t,"X-CF-CLI-Mode":i(),...r}}export{a as n,i as t};
2
+ import{t as e}from"./agent-context-DFEgYjEQ.mjs";import{t}from"./version-BdVUXLnK.mjs";import{i as n,t as r}from"./interactive-BW9T1D1q.mjs";function i(){return r?`ci`:n()?`interactive`:`non-interactive`}function a(){let n=e(),r=n.isAgentic&&n.harness!==null?{"X-CF-CLI-Agent":n.harness.id}:{};return{"User-Agent":t,"X-CF-CLI-Mode":i(),...r}}export{a as n,i as t};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,t as r}from"./context-Bwkz4Lm_.mjs";import{t as i}from"./output-BGqhvqe2.mjs";import{t as a}from"./dry-run-DmsbOMF1.mjs";import{t as o}from"./progress-BYVZuEcG.mjs";import{t as s}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d}from"./prompt-F5wxc8zq.mjs";function f(e){return e.usage(`$0 request-tracers traces create
2
+ import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d}from"./prompt-RlgRrmbm.mjs";function f(e){return e.usage(`$0 request-tracers traces create
3
3
 
4
4
  Traces a simulated HTTP request through Cloudflare's edge to analyze how rules, settings, and configurations would process the request. Useful for debugging firewall rules, page rules, and other request transformations without sending actual traffic. Supports custom headers, cookies, body content, and geolocation context.`).option(`body-base64`,{type:`string`,description:`Base64 encoded request body`}).option(`body-plain-text`,{type:`string`,description:`Request body as plain text`}).option(`context-bot-score`,{type:`number`,description:`Bot score used for evaluating tracing request processing`}).option(`context-geoloc-city`,{type:`string`,description:`The context.geoloc.city field`}).option(`context-geoloc-continent`,{type:`string`,description:`The context.geoloc.continent field`}).option(`context-geoloc-is-eu-country`,{type:`boolean`,description:`The context.geoloc.is_eu_country field`}).option(`context-geoloc-iso-code`,{type:`string`,description:`The context.geoloc.iso_code field`}).option(`context-geoloc-latitude`,{type:`number`,description:`The context.geoloc.latitude field`}).option(`context-geoloc-longitude`,{type:`number`,description:`The context.geoloc.longitude field`}).option(`context-geoloc-postal-code`,{type:`string`,description:`The context.geoloc.postal_code field`}).option(`context-geoloc-region-code`,{type:`string`,description:`The context.geoloc.region_code field`}).option(`context-geoloc-subdivision-2-iso-code`,{type:`string`,description:`The context.geoloc.subdivision_2_iso_code field`}).option(`context-geoloc-timezone`,{type:`string`,description:`The context.geoloc.timezone field`}).option(`context-skip-challenge`,{type:`boolean`,description:`Whether to skip any challenges for tracing request (e.g.: captcha)`}).option(`context-threat-score`,{type:`number`,description:`Threat score used for evaluating tracing request processing`}).option(`method`,{type:`string`,description:`HTTP Method of tracing request`}).option(`protocol`,{type:`string`,description:`HTTP Protocol of tracing request`}).option(`skip-response`,{type:`boolean`,description:`Skip sending the request to the Origin server after all rules evaluation`}).option(`url`,{type:`string`,description:`URL to which perform tracing request`}).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 p={command:`create`,describe:`Request Trace`,builder:f,handler:async f=>s({command:`request-tracers traces create`,classification:{safeFlags:[`context-geoloc-is-eu-country`,`context-skip-challenge`,`skip-response`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=await n();a({command:`cf request-tracers traces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/request-tracer/trace`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({body:{base64:u(f[`body-base64`],`body-base64`,`text`),plain_text:u(f[`body-plain-text`],`body-plain-text`,`text`)},context:{bot_score:f[`context-bot-score`],geoloc:{city:u(f[`context-geoloc-city`],`context-geoloc-city`,`text`),continent:u(f[`context-geoloc-continent`],`context-geoloc-continent`,`text`),is_eu_country:f[`context-geoloc-is-eu-country`],iso_code:u(f[`context-geoloc-iso-code`],`context-geoloc-iso-code`,`text`),latitude:f[`context-geoloc-latitude`],longitude:f[`context-geoloc-longitude`],postal_code:u(f[`context-geoloc-postal-code`],`context-geoloc-postal-code`,`text`),region_code:u(f[`context-geoloc-region-code`],`context-geoloc-region-code`,`text`),subdivision_2_iso_code:u(f[`context-geoloc-subdivision-2-iso-code`],`context-geoloc-subdivision-2-iso-code`,`text`),timezone:u(f[`context-geoloc-timezone`],`context-geoloc-timezone`,`text`)},skip_challenge:f[`context-skip-challenge`],threat_score:f[`context-threat-score`]},method:u(f.method,`method`,`text`),protocol:u(f.protocol,`protocol`,`text`),skip_response:f[`skip-response`],url:u(f.url,`url`,`text`)}):c(f.body)});return}let s=await t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body),t=await o(`Creating`,async()=>s.requestTracers.traces.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}f.method===void 0&&(f.method=await d(`method`,`HTTP Method of tracing request`)),f.url===void 0&&(f.url=await d(`url`,`URL to which perform tracing request`));let m=l({body:{base64:u(f[`body-base64`],`body-base64`,`text`),plain_text:u(f[`body-plain-text`],`body-plain-text`,`text`)},context:{bot_score:f[`context-bot-score`],geoloc:{city:u(f[`context-geoloc-city`],`context-geoloc-city`,`text`),continent:u(f[`context-geoloc-continent`],`context-geoloc-continent`,`text`),is_eu_country:f[`context-geoloc-is-eu-country`],iso_code:u(f[`context-geoloc-iso-code`],`context-geoloc-iso-code`,`text`),latitude:f[`context-geoloc-latitude`],longitude:f[`context-geoloc-longitude`],postal_code:u(f[`context-geoloc-postal-code`],`context-geoloc-postal-code`,`text`),region_code:u(f[`context-geoloc-region-code`],`context-geoloc-region-code`,`text`),subdivision_2_iso_code:u(f[`context-geoloc-subdivision-2-iso-code`],`context-geoloc-subdivision-2-iso-code`,`text`),timezone:u(f[`context-geoloc-timezone`],`context-geoloc-timezone`,`text`)},skip_challenge:f[`context-skip-challenge`],threat_score:f[`context-threat-score`]},method:u(f.method,`method`,`text`),protocol:u(f.protocol,`protocol`,`text`),skip_response:f[`skip-response`],url:u(f.url,`url`,`text`)}),h=await o(`Creating`,async()=>s.requestTracers.traces.create({...m,account_id:p}));i(h,{successLabel:`Created`})})},m={command:`traces`,describe:`Simulate request processing to debug rule matches, transforms, and routing decisions`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},h={command:`request-tracers`,describe:`Trace how a request would be processed through Cloudflare's rules and configuration pipeline`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{h as default};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const e=/* @__PURE__ */ new Map;async function t(t,n,r=6e4){let i=e.get(t),a=Date.now();if(i&&i.expires>a)return i.data;let o=await n();return e.set(t,{data:o,expires:a+r}),o}function n(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function r(e){return/^[0-9a-f]{32}$/i.test(e)}function i(e){return n(e)||r(e)}function a(e){if(!e||e.length>253||!e.includes(`.`))return!1;let t=e.split(`.`);for(let e of t)if(e.length===0||e.length>63||!/^[a-zA-Z0-9]/.test(e)||!/[a-zA-Z0-9]$/.test(e)||!/^[a-zA-Z0-9-]+$/.test(e))return!1;return!0}async function o(e,n,r){if(i(r))return r;if(!a(r))throw Error(`Invalid zone identifier: "${r}". Must be a zone ID or valid domain name.`);let o=(await t(`zones:${n}`,async()=>(await e.zones.list({"account.id":n})).result)).find(e=>e.name===r||e.name===r.toLowerCase());if(!o)throw Error(`Zone not found: ${r}`);return o.id}export{o as a,a as i,i as n,n as r,r as t};
2
+ const e=/* @__PURE__ */ new Map;async function t(t,n,r=6e4){let i=e.get(t),a=Date.now();if(i&&i.expires>a)return i.data;let o=await n();return e.set(t,{data:o,expires:a+r}),o}function n(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function r(e){return/^[0-9a-f]{32}$/i.test(e)}function i(e){return n(e)||r(e)}function a(e){if(!e||e.length>253||!e.includes(`.`))return!1;let t=e.split(`.`);for(let e of t)if(e.length===0||e.length>63||!/^[a-zA-Z0-9]/.test(e)||!/[a-zA-Z0-9]$/.test(e)||!/^[a-zA-Z0-9-]+$/.test(e))return!1;return!0}async function o(e,n,r){if(i(r))return r;if(!a(r))throw Error(`Invalid zone identifier: "${r}". Must be a zone ID or valid domain name.`);let o=r.toLowerCase(),s=(await t(`zones:${n}:${o}`,async()=>(await e.zones.list({"account.id":n,name:o})).result)).find(e=>e.name.toLowerCase()===o);if(!s)throw Error(`Zone not found: ${r}`);return s.id}export{o as a,a as i,i as n,n as r,r as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a as e}from"./resolve-CaTBV-c6.mjs";export{e as resolveZoneId};
@@ -1,40 +1,40 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,t as r}from"./context-Bwkz4Lm_.mjs";import{t as i}from"./output-BGqhvqe2.mjs";import{t as a}from"./dry-run-DmsbOMF1.mjs";import{t as o}from"./progress-BYVZuEcG.mjs";import{t as s}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-F5wxc8zq.mjs";import{t as h}from"./cli-types-9oYmRTHJ.mjs";function g(e){return e.usage(`$0 resource-sharing create
2
+ import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-RlgRrmbm.mjs";import{t as h}from"./cli-types-9oYmRTHJ.mjs";function g(e){return e.usage(`$0 resource-sharing create
3
3
 
4
- Creates a new resource share for sharing Cloudflare resources with other accounts or organizations.`).option(`name`,{type:`string`,description:`The name of the share.`}).option(`recipients`,{type:`string`,description:`The recipients field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`resources`,{type:`string`,description:`The resources 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 _={command:`create`,describe:`Create a new share`,builder:g,handler:async p=>s({command:`resource-sharing create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=await n();a({command:`cf resource-sharing create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares`,pathParams:{},bodyKind:`json`,body:p.body===void 0?u({name:d(p.name,`name`,`text`),recipients:l(p.recipients,`recipients`),resources:l(p.resources,`resources`)}):c(p.body)});return}let s=await t(p),m=p.local?e:await r();if(p.accountId=m,p.body){let e=c(p.body),t=await o(`Creating`,async()=>s.resourceSharing.create({...e,account_id:m}));i(t,{successLabel:`Created`});return}if(p.name===void 0&&(p.name=await f(`name`,`The name of the share.`)),p.recipients===void 0)throw Error(`--recipients is required (or pass --body with this field set).`);if(p.resources===void 0)throw Error(`--resources is required (or pass --body with this field set).`);let h=u({name:d(p.name,`name`,`text`),recipients:l(p.recipients,`recipients`),resources:l(p.resources,`resources`)}),g=await o(`Creating`,async()=>s.resourceSharing.create({...h,account_id:m}));i(g,{successLabel:`Created`})})};function v(e){return e.usage(`$0 resource-sharing delete <share-id>
4
+ Creates a new resource share for sharing Cloudflare resources with other accounts or organizations.`).option(`name`,{type:`string`,description:`The name of the share.`}).option(`recipients`,{type:`string`,description:`The recipients field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`resources`,{type:`string`,description:`The resources 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 _={command:`create`,describe:`Trigger a share creation`,builder:g,handler:async p=>s({command:`resource-sharing create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=await n();a({command:`cf resource-sharing create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares`,pathParams:{},bodyKind:`json`,body:p.body===void 0?u({name:d(p.name,`name`,`text`),recipients:l(p.recipients,`recipients`),resources:l(p.resources,`resources`)}):c(p.body)});return}let s=await t(p),m=p.local?e:await r();if(p.accountId=m,p.body){let e=c(p.body),t=await o(`Creating`,async()=>s.resourceSharing.create({...e,account_id:m}));i(t,{successLabel:`Created`});return}if(p.name===void 0&&(p.name=await f(`name`,`The name of the share.`)),p.recipients===void 0)throw Error(`--recipients is required (or pass --body with this field set).`);if(p.resources===void 0)throw Error(`--resources is required (or pass --body with this field set).`);let h=u({name:d(p.name,`name`,`text`),recipients:l(p.recipients,`recipients`),resources:l(p.resources,`resources`)}),g=await o(`Creating`,async()=>s.resourceSharing.create({...h,account_id:m}));i(g,{successLabel:`Created`})})};function v(e){return e.usage(`$0 resource-sharing delete <share-id>
5
5
 
6
- Deletion is not immediate, an updated share object with a new status will be returned.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <share-id>`,describe:`Delete a share`,builder:v,handler:async c=>s({command:`resource-sharing delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf resource-sharing delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
6
+ Deletion is not immediate, an updated share object with a new status will be returned.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <share-id>`,describe:`Trigger a share deletion`,builder:v,handler:async c=>s({command:`resource-sharing delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf resource-sharing delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
7
7
  `);return}let u=await o(`Deleting`,async()=>s.resourceSharing.delete({account_id:l,share_id:c[`share-id`]}));i(u,{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 resource-sharing excluded-recipients create <share-id>
8
8
 
9
- Excludes a single account from an organization-targeted share. The share continues to target the entire organization, but the excluded account is skipped during reconciliation.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,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 x={command:`create <share-id>`,describe:`Create a new share excluded recipient`,builder:b,handler:async e=>s({command:`resource-sharing excluded-recipients create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf resource-sharing excluded-recipients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/excluded-recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let n=await t(e);if(e.body){let t=c(e.body),r=await o(`Creating`,async()=>n.resourceSharing.excludedRecipients.create({body:t,account_id_path:e[`account-id-path`],share_id:e[`share-id`]}));i(r,{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function S(e){return e.usage(`$0 resource-sharing excluded-recipients delete <excluded-recipient-id>
9
+ Excludes a single account from an organization-targeted share. The share continues to target the entire organization, but the excluded account is skipped during reconciliation.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`account-id`,{type:`string`,description:`The account to exclude from the organization-targeted share.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`create <share-id>`,describe:`Trigger an account exclusion from a share`,builder:b,handler:async e=>s({command:`resource-sharing excluded-recipients create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf resource-sharing excluded-recipients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/excluded-recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({account_id:d(e[`account-id`],`account-id`,`text`)}):c(e.body)});return}let n=await t(e);if(e.body){let t=c(e.body),r=await o(`Creating`,async()=>n.resourceSharing.excludedRecipients.create({body:t,account_id_path:e[`account-id-path`],share_id:e[`share-id`]}));i(r,{successLabel:`Created`});return}e[`account-id`]===void 0&&(e[`account-id`]=await f(`account-id`,`The account to exclude from the organization-targeted share.`));let r=u({account_id:d(e[`account-id`],`account-id`,`text`)}),s=await o(`Creating`,async()=>n.resourceSharing.excludedRecipients.create({body:r,account_id_path:e[`account-id-path`],share_id:e[`share-id`]}));i(s,{successLabel:`Created`})})};function S(e){return e.usage(`$0 resource-sharing excluded-recipients delete <excluded-recipient-id>
10
10
 
11
- Removes a single account from a share's excluded-recipient list. The account becomes eligible to receive the share again on the next reconciliation cycle.`).positional(`excluded-recipient-id`,{type:`string`,description:`Share Excluded Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <excluded-recipient-id>`,describe:`Delete a share excluded recipient`,builder:S,handler:async c=>s({command:`resource-sharing excluded-recipients delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf resource-sharing excluded-recipients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/excluded-recipients/${c[`excluded-recipient-id`]==null?`<excluded-recipient-id>`:encodeURIComponent(String(c[`excluded-recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"excluded-recipient-id":String(c[`excluded-recipient-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
11
+ Removes a single account from a share's excluded-recipient list. The account becomes eligible to receive the share again on the next reconciliation cycle.`).positional(`excluded-recipient-id`,{type:`string`,description:`Share Excluded Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <excluded-recipient-id>`,describe:`Trigger an account un-exclusion from a share`,builder:S,handler:async c=>s({command:`resource-sharing excluded-recipients delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf resource-sharing excluded-recipients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/excluded-recipients/${c[`excluded-recipient-id`]==null?`<excluded-recipient-id>`:encodeURIComponent(String(c[`excluded-recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"excluded-recipient-id":String(c[`excluded-recipient-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
12
12
  `);return}let u=await o(`Deleting`,async()=>s.resourceSharing.excludedRecipients.delete({account_id:l,share_id:c[`share-id`],excluded_recipient_id:c[`excluded-recipient-id`]}));i(u,{successLabel:`Deleted`})})};function w(e){return e.usage(`$0 resource-sharing excluded-recipients get <excluded-recipient-id>
13
13
 
14
14
  Gets a single excluded recipient of a share by its identifier tag.`).positional(`excluded-recipient-id`,{type:`string`,description:`Share Excluded Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <excluded-recipient-id>`,describe:`Get share excluded recipient by ID`,builder:w,handler:async c=>s({command:`resource-sharing excluded-recipients get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf resource-sharing excluded-recipients get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/excluded-recipients/${c[`excluded-recipient-id`]==null?`<excluded-recipient-id>`:encodeURIComponent(String(c[`excluded-recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"excluded-recipient-id":String(c[`excluded-recipient-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.resourceSharing.excludedRecipients.get({account_id:l,share_id:c[`share-id`],excluded_recipient_id:c[`excluded-recipient-id`]}));i(u,{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 resource-sharing excluded-recipients list
15
15
 
16
16
  Lists the accounts excluded from an organization-targeted share. Only valid for shares with \`target_type=organization\`.`).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List share excluded recipients by share ID`,builder:E,handler:async e=>s({command:`resource-sharing excluded-recipients list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){a({command:`cf resource-sharing excluded-recipients list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/excluded-recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},query:n,bodyKind:`none`});return}let r=await t(e),s=await o(`Loading`,async()=>r.resourceSharing.excludedRecipients.list({account_id_path:e[`account-id-path`],share_id:e[`share-id`],...n}));i(s,{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 resource-sharing excluded-recipients update <share-id>
17
17
 
18
- Reconciles a share's excluded recipients to match the given list. Only valid for shares with \`target_type=organization\`.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,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 k={command:`update <share-id>`,describe:`Update a share's excluded recipients`,builder:O,handler:async e=>s({command:`resource-sharing excluded-recipients update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf resource-sharing excluded-recipients update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/excluded-recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let n=await t(e);if(e.body){let t=c(e.body),r=await o(`Updating`,async()=>n.resourceSharing.excludedRecipients.update({body:t,account_id_path:e[`account-id-path`],share_id:e[`share-id`]}));i(r,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},A={command:`excluded-recipients`,describe:`Operations for excluded-recipients`,builder:e=>e.command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage(`$0 resource-sharing get <share-id>
18
+ Reconciles a share's excluded recipients to match the given list. Only valid for shares with \`target_type=organization\`.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,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 k={command:`update <share-id>`,describe:`Trigger excluded-account reconciliation on a share`,builder:O,handler:async e=>s({command:`resource-sharing excluded-recipients update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf resource-sharing excluded-recipients update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/excluded-recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let n=await t(e);if(e.body){let t=c(e.body),r=await o(`Updating`,async()=>n.resourceSharing.excludedRecipients.update({body:t,account_id_path:e[`account-id-path`],share_id:e[`share-id`]}));i(r,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},A={command:`excluded-recipients`,describe:`Operations for excluded-recipients`,builder:e=>e.command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage(`$0 resource-sharing get <share-id>
19
19
 
20
20
  Fetches share by ID.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`include-recipient-counts`,{type:`boolean`,description:`Include recipient counts in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get <share-id>`,describe:`Get account share by ID`,builder:j,handler:async c=>s({command:`resource-sharing get`,classification:{safeFlags:[`include-resources`,`include-recipient-counts`,`dry-run`]}},c,async()=>{let s={include_resources:c[`include-resources`],include_recipient_counts:c[`include-recipient-counts`]};if(c.dryRun){let e=await n();a({command:`cf resource-sharing get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``)},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.resourceSharing.get({account_id:u,share_id:c[`share-id`],...s}));i(d,{successLabel:`Loaded`})})};function N(e){return e.usage(`$0 resource-sharing list
21
21
 
22
22
  Lists all account shares.`).option(`status`,{type:`string`,description:`Filter shares by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`kind`,{type:`string`,description:`Filter shares by kind.`,choices:[`sent`,`received`]}).option(`target-type`,{type:`string`,description:`Filter shares by target_type.`,choices:[`account`,`organization`]}).option(`resource-types`,{type:`string`,description:`Filter share resources by resource_types.`}).option(`order`,{type:`string`,description:`Order shares by values in the given field.`,choices:[`name`,`created`]}).option(`direction`,{type:`string`,description:`Direction to sort objects.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`include-recipient-counts`,{type:`boolean`,description:`Include recipient counts in the response.`}).option(`tag`,{type:`string`,description:"Filter shares by tag. Each value is either `key=value` (matches shares whose tags contain that key/value pair) or `key` alone (matches shares that have any value for that key). May be repeated; multiple `tag` parameters are ANDed together. Maximum 20 `tag` parameters per request."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`List account shares`,builder:h(N),handler:async c=>s({command:`resource-sharing list`,classification:{safeFlags:[`status`,`kind`,`target-type`,`order`,`direction`,`include-resources`,`include-recipient-counts`,`dry-run`]}},c,async()=>{let s={status:c.status,kind:c.kind,target_type:c[`target-type`],resource_types:c[`resource-types`],order:c.order,direction:c.direction,page:c.page,per_page:c[`per-page`],include_resources:c[`include-resources`],include_recipient_counts:c[`include-recipient-counts`],tag:c.tag};if(c.dryRun){let e=await n();a({command:`cf resource-sharing list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.resourceSharing.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 resource-sharing recipients create <share-id>
23
23
 
24
- Adds a single recipient to an account-targeted resource share, granting them access to the shared resources. The recipient account must belong to the same organization as the share owner. To replace the entire recipient list in one call, use \`PUT /accounts/{account_id}/shares/{share_id}/recipients\` instead.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization identifier.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Optionally specify `recipient_account_id` to target a specific account, or `organization_id` to target the caller's whole organization. If neither is provided, the caller's organization is used. The legacy field `account_id` is accepted as a synonym for `recipient_account_id` during the deprecation period (see `x-sunset` on that field). "})}const I={command:`create <share-id>`,describe:`Create a new share recipient`,builder:F,handler:async e=>s({command:`resource-sharing recipients create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf resource-sharing recipients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({organization_id:d(e[`organization-id`],`organization-id`,`text`)}):c(e.body)});return}let n=await t(e);if(e.body){let t=c(e.body),r=await o(`Creating`,async()=>n.resourceSharing.recipients.create({body:t,account_id_path:e[`account-id-path`],share_id:e[`share-id`]}));i(r,{successLabel:`Created`});return}let r=u({organization_id:d(e[`organization-id`],`organization-id`,`text`)}),s=await o(`Creating`,async()=>n.resourceSharing.recipients.create({body:r,account_id_path:e[`account-id-path`],share_id:e[`share-id`]}));i(s,{successLabel:`Created`})})};function L(e){return e.usage("$0 resource-sharing recipients delete <recipient-id>\n\nPerforms a **soft delete**: sets the recipient's `desired_association_status` to `disassociated`, which signals the background reconciliation workflow (Temporal) to remove the shared resources from the recipient account. The recipient record remains in the database for audit purposes and is still returned by `GET /accounts/{account_id}/shares/{share_id}/recipients` with its updated status. Resource access is not fully removed until the workflow completes and `current_association_status` transitions to `disassociated`. The recipient record itself is never physically deleted.").positional(`recipient-id`,{type:`string`,description:`Share Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ee={command:`delete <recipient-id>`,describe:`Delete a share recipient`,builder:L,handler:async c=>s({command:`resource-sharing recipients delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf resource-sharing recipients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/recipients/${c[`recipient-id`]==null?`<recipient-id>`:encodeURIComponent(String(c[`recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"recipient-id":String(c[`recipient-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
24
+ Adds a single recipient to an account-targeted resource share, granting them access to the shared resources. The recipient account must belong to the same organization as the share owner. To replace the entire recipient list in one call, use \`PUT /accounts/{account_id}/shares/{share_id}/recipients\` instead.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`account-id`,{type:`string`,description:"Deprecated alias for `recipient_account_id`. Use `recipient_account_id` instead.\nThe body field collided with the URL path parameter of the same name, which prevented SDK generators from distinguishing the source account (in the URL) from the recipient account (in the body). Both names will continue to be accepted until 2027-05-26 (see `x-sunset`).\n"}).option(`organization-id`,{type:`string`,description:`Organization identifier.`}).option(`recipient-account-id`,{type:`string`,description:`The account that will receive the share.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Optionally specify `recipient_account_id` to target a specific account, or `organization_id` to target the caller's whole organization. If neither is provided, the caller's organization is used. The legacy field `account_id` is accepted as a synonym for `recipient_account_id` during the deprecation period (see `x-sunset` on that field). "})}const I={command:`create <share-id>`,describe:`Trigger a recipient addition to a share`,builder:F,handler:async e=>s({command:`resource-sharing recipients create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf resource-sharing recipients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({account_id:d(e[`account-id`],`account-id`,`text`),organization_id:d(e[`organization-id`],`organization-id`,`text`),recipient_account_id:d(e[`recipient-account-id`],`recipient-account-id`,`text`)}):c(e.body)});return}let n=await t(e);if(e.body){let t=c(e.body),r=await o(`Creating`,async()=>n.resourceSharing.recipients.create({body:t,account_id_path:e[`account-id-path`],share_id:e[`share-id`]}));i(r,{successLabel:`Created`});return}let r=u({account_id:d(e[`account-id`],`account-id`,`text`),organization_id:d(e[`organization-id`],`organization-id`,`text`),recipient_account_id:d(e[`recipient-account-id`],`recipient-account-id`,`text`)}),s=await o(`Creating`,async()=>n.resourceSharing.recipients.create({body:r,account_id_path:e[`account-id-path`],share_id:e[`share-id`]}));i(s,{successLabel:`Created`})})};function L(e){return e.usage("$0 resource-sharing recipients delete <recipient-id>\n\nPerforms a **soft delete**: sets the recipient's `desired_association_status` to `disassociated`, which signals the background reconciliation workflow (Temporal) to remove the shared resources from the recipient account. The recipient record remains in the database for audit purposes and is still returned by `GET /accounts/{account_id}/shares/{share_id}/recipients` with its updated status. Resource access is not fully removed until the workflow completes and `current_association_status` transitions to `disassociated`. The recipient record itself is never physically deleted.").positional(`recipient-id`,{type:`string`,description:`Share Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ee={command:`delete <recipient-id>`,describe:`Trigger a recipient removal from a share`,builder:L,handler:async c=>s({command:`resource-sharing recipients delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf resource-sharing recipients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/recipients/${c[`recipient-id`]==null?`<recipient-id>`:encodeURIComponent(String(c[`recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"recipient-id":String(c[`recipient-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
25
25
  `);return}let u=await o(`Deleting`,async()=>s.resourceSharing.recipients.delete({account_id:l,share_id:c[`share-id`],recipient_id:c[`recipient-id`]}));i(u,{successLabel:`Deleted`})})};function R(e){return e.usage(`$0 resource-sharing recipients get <recipient-id>
26
26
 
27
27
  Get share recipient by ID.`).positional(`recipient-id`,{type:`string`,description:`Share Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get <recipient-id>`,describe:`Get share recipient by ID`,builder:R,handler:async c=>s({command:`resource-sharing recipients get`,classification:{safeFlags:[`include-resources`,`dry-run`]}},c,async()=>{let s={include_resources:c[`include-resources`]};if(c.dryRun){let e=await n();a({command:`cf resource-sharing recipients get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/recipients/${c[`recipient-id`]==null?`<recipient-id>`:encodeURIComponent(String(c[`recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"recipient-id":String(c[`recipient-id`]??``)},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.resourceSharing.recipients.get({account_id:u,share_id:c[`share-id`],recipient_id:c[`recipient-id`],...s}));i(d,{successLabel:`Loaded`})})};function B(e){return e.usage('$0 resource-sharing recipients list\n\nList share recipients by share ID. Returns **all** recipients regardless of their `association_status` (associating, associated, disassociating, disassociated). Callers that want only "active" recipients must filter client-side on the `association_status` field.').option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list`,describe:`List share recipients by share ID`,builder:B,handler:async e=>s({command:`resource-sharing recipients list`,classification:{safeFlags:[`include-resources`,`dry-run`]}},e,async()=>{let n={include_resources:e[`include-resources`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){a({command:`cf resource-sharing recipients list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},query:n,bodyKind:`none`});return}let r=await t(e),s=await o(`Loading`,async()=>r.resourceSharing.recipients.list({account_id_path:e[`account-id-path`],share_id:e[`share-id`],...n}));i(s,{successLabel:`Loaded`})})};function H(e){return e.usage(`$0 resource-sharing recipients update <share-id>
28
28
 
29
- Replaces the full recipient list for an account-targeted share. The server computes the diff between the current and desired recipients: new accounts are added, accounts no longer in the list are marked for disassociation, and unchanged accounts are left as-is. Returns an error if the share targets an organization (\`target_type=organization\`); org-targeted shares derive their recipients dynamically from org membership and cannot be modified through this endpoint.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,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 U={command:`update <share-id>`,describe:`Update a share's recipients`,builder:H,handler:async e=>s({command:`resource-sharing recipients update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf resource-sharing recipients update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let n=await t(e);if(e.body){let t=c(e.body),r=await o(`Updating`,async()=>n.resourceSharing.recipients.update({body:t,account_id_path:e[`account-id-path`],share_id:e[`share-id`]}));i(r,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},W={command:`recipients`,describe:`Update share recipients`,builder:e=>e.command(I).command(ee).command(z).command(V).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 resource-sharing resources create <share-id>
29
+ Replaces the full recipient list for an account-targeted share. The server computes the diff between the current and desired recipients: new accounts are added, accounts no longer in the list are marked for disassociation, and unchanged accounts are left as-is. Returns an error if the share targets an organization (\`target_type=organization\`); org-targeted shares derive their recipients dynamically from org membership and cannot be modified through this endpoint.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,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 U={command:`update <share-id>`,describe:`Trigger recipient reconciliation on a share`,builder:H,handler:async e=>s({command:`resource-sharing recipients update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf resource-sharing recipients update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let n=await t(e);if(e.body){let t=c(e.body),r=await o(`Updating`,async()=>n.resourceSharing.recipients.update({body:t,account_id_path:e[`account-id-path`],share_id:e[`share-id`]}));i(r,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},W={command:`recipients`,describe:`Update share recipients`,builder:e=>e.command(I).command(ee).command(z).command(V).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 resource-sharing resources create <share-id>
30
30
 
31
- Adds a resource to an existing share, making it available to share recipients.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`resource-account-id`,{type:`string`,description:`Account identifier.`}).option(`resource-id`,{type:`string`,description:`Share Resource identifier.`}).option(`resource-type`,{type:`string`,description:`Resource Type.`,choices:[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`,`idp-federation-grant`,`trust-grant`]}).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 K={command:`create <share-id>`,describe:`Create a new share resource`,builder:G,handler:async l=>s({command:`resource-sharing resources create`,classification:{safeFlags:[`resource-type`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf resource-sharing resources create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${l[`share-id`]==null?`<share-id>`:encodeURIComponent(String(l[`share-id`]))}/resources`,pathParams:{"share-id":String(l[`share-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({resource_account_id:d(l[`resource-account-id`],`resource-account-id`,`text`),resource_id:d(l[`resource-id`],`resource-id`,`text`),resource_type:d(l[`resource-type`],`resource-type`,`text`)}):c(l.body)});return}let s=await t(l),m=l.local?e:await r();if(l.accountId=m,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.resourceSharing.resources.create({body:e,account_id:m,share_id:l[`share-id`]}));i(t,{successLabel:`Created`});return}l[`resource-account-id`]===void 0&&(l[`resource-account-id`]=await f(`resource-account-id`,`Account identifier.`)),l[`resource-id`]===void 0&&(l[`resource-id`]=await f(`resource-id`,`Share Resource identifier.`)),l[`resource-type`]===void 0&&(l[`resource-type`]=await p(`resource-type`,`Resource Type.`,[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`,`idp-federation-grant`,`trust-grant`]));let h=u({resource_account_id:d(l[`resource-account-id`],`resource-account-id`,`text`),resource_id:d(l[`resource-id`],`resource-id`,`text`),resource_type:d(l[`resource-type`],`resource-type`,`text`)}),g=await o(`Creating`,async()=>s.resourceSharing.resources.create({body:h,account_id:m,share_id:l[`share-id`]}));i(g,{successLabel:`Created`})})};function q(e){return e.usage(`$0 resource-sharing resources delete <share-resource-id>
31
+ Adds a resource to an existing share, making it available to share recipients.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`resource-account-id`,{type:`string`,description:`Account identifier.`}).option(`resource-id`,{type:`string`,description:`Share Resource identifier.`}).option(`resource-type`,{type:`string`,description:`Resource Type.`,choices:[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`,`idp-federation-grant`,`trust-grant`]}).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 K={command:`create <share-id>`,describe:`Trigger a resource addition to a share`,builder:G,handler:async l=>s({command:`resource-sharing resources create`,classification:{safeFlags:[`resource-type`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf resource-sharing resources create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${l[`share-id`]==null?`<share-id>`:encodeURIComponent(String(l[`share-id`]))}/resources`,pathParams:{"share-id":String(l[`share-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({resource_account_id:d(l[`resource-account-id`],`resource-account-id`,`text`),resource_id:d(l[`resource-id`],`resource-id`,`text`),resource_type:d(l[`resource-type`],`resource-type`,`text`)}):c(l.body)});return}let s=await t(l),m=l.local?e:await r();if(l.accountId=m,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.resourceSharing.resources.create({body:e,account_id:m,share_id:l[`share-id`]}));i(t,{successLabel:`Created`});return}l[`resource-account-id`]===void 0&&(l[`resource-account-id`]=await f(`resource-account-id`,`Account identifier.`)),l[`resource-id`]===void 0&&(l[`resource-id`]=await f(`resource-id`,`Share Resource identifier.`)),l[`resource-type`]===void 0&&(l[`resource-type`]=await p(`resource-type`,`Resource Type.`,[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`,`idp-federation-grant`,`trust-grant`]));let h=u({resource_account_id:d(l[`resource-account-id`],`resource-account-id`,`text`),resource_id:d(l[`resource-id`],`resource-id`,`text`),resource_type:d(l[`resource-type`],`resource-type`,`text`)}),g=await o(`Creating`,async()=>s.resourceSharing.resources.create({body:h,account_id:m,share_id:l[`share-id`]}));i(g,{successLabel:`Created`})})};function q(e){return e.usage(`$0 resource-sharing resources delete <share-resource-id>
32
32
 
33
- Deletion is not immediate, an updated share resource object with a new status will be returned.`).positional(`share-resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const J={command:`delete <share-resource-id>`,describe:`Delete a share resource`,builder:q,handler:async c=>s({command:`resource-sharing resources delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf resource-sharing resources delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/resources/${c[`share-resource-id`]==null?`<share-resource-id>`:encodeURIComponent(String(c[`share-resource-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"share-resource-id":String(c[`share-resource-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
33
+ Deletion is not immediate, an updated share resource object with a new status will be returned.`).positional(`share-resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const J={command:`delete <share-resource-id>`,describe:`Trigger a resource deletion from a share`,builder:q,handler:async c=>s({command:`resource-sharing resources delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf resource-sharing resources delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/resources/${c[`share-resource-id`]==null?`<share-resource-id>`:encodeURIComponent(String(c[`share-resource-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"share-resource-id":String(c[`share-resource-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
34
34
  `);return}let u=await o(`Deleting`,async()=>s.resourceSharing.resources.delete({account_id:l,share_id:c[`share-id`],share_resource_id:c[`share-resource-id`]}));i(u,{successLabel:`Deleted`})})};function Y(e){return e.usage(`$0 resource-sharing resources get <share-resource-id>
35
35
 
36
36
  Get share resource by ID.`).positional(`share-resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`get <share-resource-id>`,describe:`Get share resource by ID`,builder:Y,handler:async c=>s({command:`resource-sharing resources get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf resource-sharing resources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/resources/${c[`share-resource-id`]==null?`<share-resource-id>`:encodeURIComponent(String(c[`share-resource-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"share-resource-id":String(c[`share-resource-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.resourceSharing.resources.get({account_id:l,share_id:c[`share-id`],share_resource_id:c[`share-resource-id`]}));i(u,{successLabel:`Loaded`})})};function Z(e){return e.usage(`$0 resource-sharing resources list
37
37
 
38
38
  List share resources by share ID.`).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`status`,{type:`string`,description:`Filter share resources by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`resource-type`,{type:`string`,description:`Filter share resources by resource_type.`,choices:[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`,`idp-federation-grant`,`trust-grant`]}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`list`,describe:`List share resources by share ID`,builder:h(Z),handler:async c=>s({command:`resource-sharing resources list`,classification:{safeFlags:[`status`,`resource-type`,`dry-run`]}},c,async()=>{let s={status:c.status,resource_type:c[`resource-type`],page:c.page,per_page:c[`per-page`]};if(c.dryRun){let e=await n();a({command:`cf resource-sharing resources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/resources`,pathParams:{"share-id":String(c[`share-id`]??``)},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.resourceSharing.resources.list({account_id:u,share_id:c[`share-id`],...s}));i(d,{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 resource-sharing resources update <share-resource-id>
39
39
 
40
- Update is not immediate, an updated share resource object with a new status will be returned.`).positional(`share-resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,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 te={command:`update <share-resource-id>`,describe:`Update a share resource`,builder:$,handler:async l=>s({command:`resource-sharing resources update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf resource-sharing resources update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${l[`share-id`]==null?`<share-id>`:encodeURIComponent(String(l[`share-id`]))}/resources/${l[`share-resource-id`]==null?`<share-resource-id>`:encodeURIComponent(String(l[`share-resource-id`]))}`,pathParams:{"share-id":String(l[`share-id`]??``),"share-resource-id":String(l[`share-resource-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await t(l),u=l.local?e:await r();if(l.accountId=u,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.resourceSharing.resources.update({...e,account_id:u,share_id:l[`share-id`],share_resource_id:l[`share-resource-id`]}));i(t,{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},ne={command:`resources`,describe:`Individual resources (zones, configs) that have been shared with recipients`,builder:e=>e.command(K).command(J).command(X).command(Q).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function re(e){return e.usage("$0 resource-sharing update <share-id>\n\nUpdates the share's display name and tags. This endpoint does **not** modify recipients or resources — those are managed via dedicated subresource endpoints: - **Recipients**: Use `POST /accounts/{account_id}/shares/{share_id}/recipients` to add a single recipient, `PUT /accounts/{account_id}/shares/{share_id}/recipients` to replace the full recipient list, or `DELETE /accounts/{account_id}/shares/{share_id}/recipients/{recipient_id}` to remove a recipient. - **Resources**: Use the share's resource subresource endpoints. Updating is not immediate; an updated share object with a new status will be returned.").positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the share.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request body for `PUT /accounts/{account_id}/shares/{share_id}`. The share's display `name` and `tags` can be updated via this endpoint. To modify recipients, use the `/accounts/{account_id}/shares/{share_id}/recipients` subresource endpoints (POST, PUT, DELETE). "})}const ie={command:`update <share-id>`,describe:`Update a share`,builder:re,handler:async l=>s({command:`resource-sharing update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf resource-sharing update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${l[`share-id`]==null?`<share-id>`:encodeURIComponent(String(l[`share-id`]))}`,pathParams:{"share-id":String(l[`share-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.resourceSharing.update({...e,account_id:p,share_id:l[`share-id`]}));i(t,{successLabel:`Updated`});return}l.name===void 0&&(l.name=await f(`name`,`The name of the share.`));let m=u({name:d(l.name,`name`,`text`)}),h=await o(`Updating`,async()=>s.resourceSharing.update({...m,account_id:p,share_id:l[`share-id`]}));i(h,{successLabel:`Updated`})})},ae={command:`resource-sharing`,describe:`Share Cloudflare resources (zones, accounts) across organizations with granular access controls`,builder:e=>e.command(_).command(y).command(M).command(P).command(ie).command(A).command(W).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ae as default};
40
+ Update is not immediate, an updated share resource object with a new status will be returned.`).positional(`share-resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,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 te={command:`update <share-resource-id>`,describe:`Trigger a resource metadata update in a share`,builder:$,handler:async l=>s({command:`resource-sharing resources update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf resource-sharing resources update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${l[`share-id`]==null?`<share-id>`:encodeURIComponent(String(l[`share-id`]))}/resources/${l[`share-resource-id`]==null?`<share-resource-id>`:encodeURIComponent(String(l[`share-resource-id`]))}`,pathParams:{"share-id":String(l[`share-id`]??``),"share-resource-id":String(l[`share-resource-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await t(l),u=l.local?e:await r();if(l.accountId=u,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.resourceSharing.resources.update({...e,account_id:u,share_id:l[`share-id`],share_resource_id:l[`share-resource-id`]}));i(t,{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},ne={command:`resources`,describe:`Individual resources (zones, configs) that have been shared with recipients`,builder:e=>e.command(K).command(J).command(X).command(Q).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function re(e){return e.usage("$0 resource-sharing update <share-id>\n\nUpdates the share's display name and tags. This endpoint does **not** modify recipients or resources — those are managed via dedicated subresource endpoints: - **Recipients**: Use `POST /accounts/{account_id}/shares/{share_id}/recipients` to add a single recipient, `PUT /accounts/{account_id}/shares/{share_id}/recipients` to replace the full recipient list, or `DELETE /accounts/{account_id}/shares/{share_id}/recipients/{recipient_id}` to remove a recipient. - **Resources**: Use the share's resource subresource endpoints. Updating is not immediate; an updated share object with a new status will be returned.").positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the share.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request body for `PUT /accounts/{account_id}/shares/{share_id}`. The share's display `name` and `tags` can be updated via this endpoint. To modify recipients, use the `/accounts/{account_id}/shares/{share_id}/recipients` subresource endpoints (POST, PUT, DELETE). "})}const ie={command:`update <share-id>`,describe:`Trigger a share rename`,builder:re,handler:async l=>s({command:`resource-sharing update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf resource-sharing update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/shares/${l[`share-id`]==null?`<share-id>`:encodeURIComponent(String(l[`share-id`]))}`,pathParams:{"share-id":String(l[`share-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.resourceSharing.update({...e,account_id:p,share_id:l[`share-id`]}));i(t,{successLabel:`Updated`});return}l.name===void 0&&(l.name=await f(`name`,`The name of the share.`));let m=u({name:d(l.name,`name`,`text`)}),h=await o(`Updating`,async()=>s.resourceSharing.update({...m,account_id:p,share_id:l[`share-id`]}));i(h,{successLabel:`Updated`})})},ae={command:`resource-sharing`,describe:`Share Cloudflare resources (zones, accounts) across organizations with granular access controls`,builder:e=>e.command(_).command(y).command(M).command(P).command(ie).command(A).command(W).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ae as default};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,t as r}from"./context-Bwkz4Lm_.mjs";import{t as i}from"./output-BGqhvqe2.mjs";import{t as a}from"./dry-run-DmsbOMF1.mjs";import{t as o}from"./progress-BYVZuEcG.mjs";import{t as s}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";function c(e){return e.usage(`$0 resource-tagging summary get
2
+ import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";function c(e){return e.usage(`$0 resource-tagging summary get
3
3
 
4
4
  Lists all distinct tag keys and their distinct values across resources in an account.`).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`List tag key summary`,builder:c,handler:async c=>s({command:`resource-tagging summary get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={cursor:c.cursor};if(c.dryRun){let e=await n();a({command:`cf resource-tagging summary get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tags/summary`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.resourceTagging.summary.get({account_id:u,...s}));i(d,{successLabel:`Loaded`})})},u={command:`summary`,describe:`Operations for summary`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},d={command:`resource-tagging`,describe:`resource-tagging`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,t as r}from"./context-Bwkz4Lm_.mjs";import{t as i}from"./output-BGqhvqe2.mjs";import{t as a}from"./dry-run-DmsbOMF1.mjs";import{t as o}from"./progress-BYVZuEcG.mjs";import{t as s}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-F5wxc8zq.mjs";function m(e){return e.usage("$0 rules lists bulk-operations get <operation-id>\n\nGets the current status of an asynchronous operation on a list. The `status` property can have one of the following values: `pending`, `running`, `completed`, or `failed`. If the status is `failed`, the `error` property will contain a message describing the error.").positional(`operation-id`,{type:`string`,description:`The unique operation ID of the asynchronous action.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <operation-id>`,describe:`Get bulk operation status`,builder:m,handler:async c=>s({command:`rules lists bulk-operations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf rules lists bulk-operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/rules/lists/bulk_operations/${c[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(c[`operation-id`]))}`,pathParams:{"operation-id":String(c[`operation-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.rules.lists.bulkOperations.get({account_id:l,operation_id:c[`operation-id`]}));i(u,{successLabel:`Loaded`})})},g={command:`bulk-operations`,describe:`Operations for lists.bulk-operations`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 rules lists create
2
+ import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-RlgRrmbm.mjs";function m(e){return e.usage("$0 rules lists bulk-operations get <operation-id>\n\nGets the current status of an asynchronous operation on a list. The `status` property can have one of the following values: `pending`, `running`, `completed`, or `failed`. If the status is `failed`, the `error` property will contain a message describing the error.").positional(`operation-id`,{type:`string`,description:`The unique operation ID of the asynchronous action.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <operation-id>`,describe:`Get bulk operation status`,builder:m,handler:async c=>s({command:`rules lists bulk-operations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf rules lists bulk-operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/rules/lists/bulk_operations/${c[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(c[`operation-id`]))}`,pathParams:{"operation-id":String(c[`operation-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.rules.lists.bulkOperations.get({account_id:l,operation_id:c[`operation-id`]}));i(u,{successLabel:`Loaded`})})},g={command:`bulk-operations`,describe:`Operations for lists.bulk-operations`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 rules lists create
3
3
 
4
4
  Creates a new list of the specified kind.`).option(`description`,{type:`string`,description:`An informative summary of the list.`}).option(`name`,{type:`string`,description:`An informative name for the list. Use this name in filter and rule expressions.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create a list`,builder:_,handler:async l=>s({command:`rules lists create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf rules lists create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/rules/lists`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({description:d(l.description,`description`,`text`),name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.rules.lists.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`An informative name for the list. Use this name in filter and rule expressions.`));let m=u({description:d(l.description,`description`,`text`),name:d(l.name,`name`,`text`)}),h=await o(`Creating`,async()=>s.rules.lists.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function y(e){return e.usage(`$0 rules lists delete <list-id>
5
5
 
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,i as r,t as i}from"./context-q7UaYK69.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-BtkTVcHI.mjs";import{t as c}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{n as p}from"./prompt-RlgRrmbm.mjs";function m(e){return e.usage(`$0 rulesets create
3
+
4
+ Creates a ruleset.`).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`description`,{type:`string`,description:`An informative description of the ruleset.`,default:``}).option(`name`,{type:`string`,description:`The human-readable name of the ruleset.`}).option(`kind`,{type:`string`,description:`The kind of the ruleset.`,choices:[`managed`,`custom`,`root`,`zone`]}).option(`phase`,{type:`string`,description:`The phase of the ruleset.`,choices:[`ddos_l4`,`ddos_l7`,`http_config_settings`,`http_custom_errors`,`http_log_custom_fields`,`http_ratelimit`,`http_request_cache_settings`,`http_request_dynamic_redirect`,`http_request_firewall_custom`,`http_request_firewall_managed`,`http_request_late_transform`,`http_request_origin`,`http_request_redirect`,`http_request_sanitize`,`http_request_sbfm`,`http_request_transform`,`http_response_cache_settings`,`http_response_compression`,`http_response_firewall_managed`,`http_response_headers_transform`,`magic_transit`,`magic_transit_ids_managed`,`magic_transit_managed`,`magic_transit_ratelimit`]}).option(`rules`,{type:`string`,description:`The list of rules in the ruleset. 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 h={command:`create`,describe:`Create an account or zone ruleset`,builder:m,handler:async p=>c({command:`rulesets create`,classification:{safeFlags:[`validate-only`,`kind`,`phase`,`dry-run`]}},p,async()=>{let c={dry_run:p[`validate-only`]};if(p.dryRun){let e=p.zone===void 0?await n():void 0,t=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf rulesets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/rulesets`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`json`,body:p.body===void 0?d({description:f(p.description,`description`,`text`),name:f(p.name,`name`,`text`),kind:f(p.kind,`kind`,`text`),phase:f(p.phase,`phase`,`text`),rules:u(p.rules,`rules`)}):l(p.body)});return}let m=await t(p),h=p.zone===void 0?`accounts`:`zones`,g=h===`zones`?await r({zone:p.zone},m,{quiet:p.quiet}):p.local?e:await i();if(h===`zones`?p.zoneId=g:p.accountId=g,p.body){let e=l(p.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let t=await s(`Creating`,async()=>m.rulesets.create({...e,account_or_zone:h,account_or_zone_id:g,...c}));a(t,{successLabel:`Created`});return}let _=d({description:f(p.description,`description`,`text`),name:f(p.name,`name`,`text`),kind:f(p.kind,`kind`,`text`),phase:f(p.phase,`phase`,`text`),rules:u(p.rules,`rules`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let v=await s(`Creating`,async()=>m.rulesets.create({..._,account_or_zone:h,account_or_zone_id:g,...c}));a(v,{successLabel:`Created`})})};function g(e){return e.usage(`$0 rulesets delete <id>
5
+
6
+ Deletes all versions of an existing account or zone ruleset.`).positional(`id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).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 _={command:`delete <id>`,describe:`Delete an account or zone ruleset`,builder:g,handler:async l=>c({command:`rulesets delete`,classification:{safeFlags:[`validate-only`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={dry_run:l[`validate-only`]};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/rulesets/${l.id==null?`<id>`:encodeURIComponent(String(l.id))}`,pathParams:{"account-or-zone":String(t),id:String(l.id??``),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();if(d===`zones`?l.zoneId=f:l.accountId=f,!await p({force:!!l.force})){process.stderr.write(`Aborted.
7
+ `);return}let m=await s(`Deleting`,async()=>u.rulesets.delete({account_or_zone:d,account_or_zone_id:f,id:l.id,...c}));a(m,{successLabel:`Deleted`})})};function v(e){return e.usage(`$0 rulesets entrypoint get <phase>
8
+
9
+ Fetches the latest version of the account or zone entry point ruleset for a given phase.`).positional(`phase`,{type:`string`,description:`The phase of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <phase>`,describe:`Get an account or zone entry point ruleset`,builder:v,handler:async l=>c({command:`rulesets entrypoint get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets entrypoint get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/rulesets/phases/${l.phase==null?`<phase>`:encodeURIComponent(String(l.phase))}/entrypoint`,pathParams:{"account-or-zone":String(t),phase:String(l.phase??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.rulesets.entrypoint.get({account_or_zone:u,account_or_zone_id:d,phase:l.phase}));a(f,{successLabel:`Loaded`})})};function b(e){return e.usage(`$0 rulesets entrypoint update <phase>
10
+
11
+ Updates an account or zone entry point ruleset, creating a new version.`).positional(`phase`,{type:`string`,description:`The phase of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`description`,{type:`string`,description:`An informative description of the ruleset.`}).option(`name`,{type:`string`,description:`The human-readable name of the ruleset.`}).option(`rules`,{type:`string`,description:`The list of rules in the ruleset. 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 x={command:`update <phase>`,describe:`Update an account or zone entry point ruleset`,builder:b,handler:async p=>c({command:`rulesets entrypoint update`,classification:{safeFlags:[`validate-only`,`dry-run`]}},p,async()=>{let c={dry_run:p[`validate-only`]};if(p.dryRun){let e=p.zone===void 0?await n():void 0,t=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf rulesets entrypoint update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/rulesets/phases/${p.phase==null?`<phase>`:encodeURIComponent(String(p.phase))}/entrypoint`,pathParams:{"account-or-zone":String(t),phase:String(p.phase??``),"account-or-zone-id":String(r)},query:c,bodyKind:`json`,body:p.body===void 0?d({description:f(p.description,`description`,`text`),name:f(p.name,`name`,`text`),rules:u(p.rules,`rules`)}):l(p.body)});return}let m=await t(p),h=p.zone===void 0?`accounts`:`zones`,g=h===`zones`?await r({zone:p.zone},m,{quiet:p.quiet}):p.local?e:await i();if(h===`zones`?p.zoneId=g:p.accountId=g,p.body){let e=l(p.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let t=await s(`Updating`,async()=>m.rulesets.entrypoint.update({...e,account_or_zone:h,account_or_zone_id:g,phase:p.phase,...c}));a(t,{successLabel:`Updated`});return}let _=d({description:f(p.description,`description`,`text`),name:f(p.name,`name`,`text`),rules:u(p.rules,`rules`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let v=await s(`Updating`,async()=>m.rulesets.entrypoint.update({..._,account_or_zone:h,account_or_zone_id:g,phase:p.phase,...c}));a(v,{successLabel:`Updated`})})};function S(e){return e.usage(`$0 rulesets entrypoint versions get <ruleset-version>
12
+
13
+ Fetches a specific version of an account or zone entry point ruleset.`).positional(`ruleset-version`,{type:`string`,description:`The version of the ruleset.`,demandOption:!0}).option(`phase`,{type:`string`,description:`The phase of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <ruleset-version>`,describe:`Get an account or zone entry point ruleset version`,builder:S,handler:async l=>c({command:`rulesets entrypoint versions get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets entrypoint versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/rulesets/phases/${l.phase==null?`<phase>`:encodeURIComponent(String(l.phase))}/entrypoint/versions/${l[`ruleset-version`]==null?`<ruleset-version>`:encodeURIComponent(String(l[`ruleset-version`]))}`,pathParams:{"account-or-zone":String(t),"ruleset-version":String(l[`ruleset-version`]??``),phase:String(l.phase??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.rulesets.entrypoint.versions.get({account_or_zone:u,account_or_zone_id:d,phase:l.phase,ruleset_version:l[`ruleset-version`]}));a(f,{successLabel:`Loaded`})})};function w(e){return e.usage(`$0 rulesets entrypoint versions list
14
+
15
+ Fetches the versions of an account or zone entry point ruleset.`).option(`phase`,{type:`string`,description:`The phase of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`List an account or zone entry point ruleset's versions`,builder:w,handler:async l=>c({command:`rulesets entrypoint versions list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets entrypoint versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/rulesets/phases/${l.phase==null?`<phase>`:encodeURIComponent(String(l.phase))}/entrypoint/versions`,pathParams:{"account-or-zone":String(t),phase:String(l.phase??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.rulesets.entrypoint.versions.list({account_or_zone:u,account_or_zone_id:d,phase:l.phase}));a(f,{successLabel:`Loaded`})})},E={command:`versions`,describe:`Operations for entrypoint.versions`,builder:e=>e.command(C).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},D={command:`entrypoint`,describe:`Operations for entrypoint`,builder:e=>e.command(y).command(x).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.usage(`$0 rulesets get <id>
16
+
17
+ Fetches the latest version of an account or zone ruleset.`).positional(`id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <id>`,describe:`Get an account or zone ruleset`,builder:O,handler:async l=>c({command:`rulesets get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/rulesets/${l.id==null?`<id>`:encodeURIComponent(String(l.id))}`,pathParams:{"account-or-zone":String(t),id:String(l.id??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.rulesets.get({account_or_zone:u,account_or_zone_id:d,id:l.id}));a(f,{successLabel:`Loaded`})})};function A(e){return e.usage(`$0 rulesets list
18
+
19
+ Fetches all rulesets.`).option(`cursor`,{type:`string`,description:`The cursor to use for the next page.`}).option(`per-page`,{type:`number`,description:`The number of rulesets to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`list`,describe:`List account or zone rulesets`,builder:A,handler:async l=>c({command:`rulesets list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={cursor:l.cursor,per_page:l[`per-page`]};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/rulesets`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f;let p=await s(`Loading`,async()=>u.rulesets.list({account_or_zone:d,account_or_zone_id:f,...c}));a(p,{successLabel:`Loaded`})})};function M(e){return e.usage(`$0 rulesets rules create <ruleset-id>
20
+
21
+ Adds a new rule to an account or zone ruleset. The rule will be added to the end of the existing list of rules in the ruleset by default.`).positional(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`position-before`,{type:`string`,description:`The ID of another rule to place the rule before. An empty value causes the rule to be placed at the top.`}).option(`position-after`,{type:`string`,description:`The ID of another rule to place the rule after. An empty value causes the rule to be placed at the bottom.`}).option(`position-index`,{type:`number`,description:`An index at which to place the rule, where index 1 is the first rule.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`position-before`,[`position-after`,`position-index`]).conflicts(`position-after`,[`position-before`,`position-index`]).conflicts(`position-index`,[`position-before`,`position-after`])}const N={command:`create <ruleset-id>`,describe:`Create an account or zone ruleset rule`,builder:M,handler:async u=>c({command:`rulesets rules create`,classification:{safeFlags:[`validate-only`,`dry-run`]}},u,async()=>{let c={dry_run:u[`validate-only`]};if(u.dryRun){let e=u.zone===void 0?await n():void 0,t=u.zone===void 0?`accounts`:`zones`,r=u.zone??e??`<account-id>`;o({command:`cf rulesets rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/rulesets/${u[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(u[`ruleset-id`]))}/rules`,pathParams:{"account-or-zone":String(t),"ruleset-id":String(u[`ruleset-id`]??``),"account-or-zone-id":String(r)},query:c,bodyKind:`json`,body:u.body===void 0?d({position:{before:f(u[`position-before`],`position-before`,`text`),after:f(u[`position-after`],`position-after`,`text`),index:u[`position-index`]}}):l(u.body)});return}let p=await t(u),m=u.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:u.zone},p,{quiet:u.quiet}):u.local?e:await i();if(m===`zones`?u.zoneId=h:u.accountId=h,u.body){let e=l(u.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let t=await s(`Creating`,async()=>p.rulesets.rules.create({...e,account_or_zone:m,account_or_zone_id:h,ruleset_id:u[`ruleset-id`],...c}));a(t,{successLabel:`Created`});return}let g=d({position:{before:f(u[`position-before`],`position-before`,`text`),after:f(u[`position-after`],`position-after`,`text`),index:u[`position-index`]}});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let _=await s(`Creating`,async()=>p.rulesets.rules.create({...g,account_or_zone:m,account_or_zone_id:h,ruleset_id:u[`ruleset-id`],...c}));a(_,{successLabel:`Created`})})};function P(e){return e.usage(`$0 rulesets rules delete <rule-id>
22
+
23
+ Deletes an existing rule from an account or zone ruleset.`).positional(`rule-id`,{type:`string`,description:`The unique ID of the rule.`,demandOption:!0}).option(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).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 F={command:`delete <rule-id>`,describe:`Delete an account or zone ruleset rule`,builder:P,handler:async l=>c({command:`rulesets rules delete`,classification:{safeFlags:[`validate-only`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={dry_run:l[`validate-only`]};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/rulesets/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}/rules/${l[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(l[`rule-id`]))}`,pathParams:{"account-or-zone":String(t),"rule-id":String(l[`rule-id`]??``),"ruleset-id":String(l[`ruleset-id`]??``),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();if(d===`zones`?l.zoneId=f:l.accountId=f,!await p({force:!!l.force})){process.stderr.write(`Aborted.
24
+ `);return}let m=await s(`Deleting`,async()=>u.rulesets.rules.delete({account_or_zone:d,account_or_zone_id:f,ruleset_id:l[`ruleset-id`],rule_id:l[`rule-id`],...c}));a(m,{successLabel:`Deleted`})})};function I(e){return e.usage(`$0 rulesets rules update <rule-id>
25
+
26
+ Updates an existing rule in an account or zone ruleset.`).positional(`rule-id`,{type:`string`,description:`The unique ID of the rule.`,demandOption:!0}).option(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`position-before`,{type:`string`,description:`The ID of another rule to place the rule before. An empty value causes the rule to be placed at the top.`}).option(`position-after`,{type:`string`,description:`The ID of another rule to place the rule after. An empty value causes the rule to be placed at the bottom.`}).option(`position-index`,{type:`number`,description:`An index at which to place the rule, where index 1 is the first rule.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`position-before`,[`position-after`,`position-index`]).conflicts(`position-after`,[`position-before`,`position-index`]).conflicts(`position-index`,[`position-before`,`position-after`])}const L={command:`update <rule-id>`,describe:`Update an account or zone ruleset rule`,builder:I,handler:async u=>c({command:`rulesets rules update`,classification:{safeFlags:[`validate-only`,`dry-run`]}},u,async()=>{let c={dry_run:u[`validate-only`]};if(u.dryRun){let e=u.zone===void 0?await n():void 0,t=u.zone===void 0?`accounts`:`zones`,r=u.zone??e??`<account-id>`;o({command:`cf rulesets rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/rulesets/${u[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(u[`ruleset-id`]))}/rules/${u[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(u[`rule-id`]))}`,pathParams:{"account-or-zone":String(t),"rule-id":String(u[`rule-id`]??``),"ruleset-id":String(u[`ruleset-id`]??``),"account-or-zone-id":String(r)},query:c,bodyKind:`json`,body:u.body===void 0?d({position:{before:f(u[`position-before`],`position-before`,`text`),after:f(u[`position-after`],`position-after`,`text`),index:u[`position-index`]}}):l(u.body)});return}let p=await t(u),m=u.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:u.zone},p,{quiet:u.quiet}):u.local?e:await i();if(m===`zones`?u.zoneId=h:u.accountId=h,u.body){let e=l(u.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let t=await s(`Updating`,async()=>p.rulesets.rules.update({...e,account_or_zone:m,account_or_zone_id:h,ruleset_id:u[`ruleset-id`],rule_id:u[`rule-id`],...c}));a(t,{successLabel:`Updated`});return}let g=d({position:{before:f(u[`position-before`],`position-before`,`text`),after:f(u[`position-after`],`position-after`,`text`),index:u[`position-index`]}});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let _=await s(`Updating`,async()=>p.rulesets.rules.update({...g,account_or_zone:m,account_or_zone_id:h,ruleset_id:u[`ruleset-id`],rule_id:u[`rule-id`],...c}));a(_,{successLabel:`Updated`})})},R={command:`rules`,describe:`Operations for rules`,builder:e=>e.command(N).command(F).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage(`$0 rulesets update <ruleset-id>
27
+
28
+ Updates an account or zone ruleset, creating a new version.`).positional(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`description`,{type:`string`,description:`An informative description of the ruleset.`}).option(`name`,{type:`string`,description:`The human-readable name of the ruleset.`}).option(`kind`,{type:`string`,description:`The kind of the ruleset.`,choices:[`managed`,`custom`,`root`,`zone`]}).option(`phase`,{type:`string`,description:`The phase of the ruleset.`,choices:[`ddos_l4`,`ddos_l7`,`http_config_settings`,`http_custom_errors`,`http_log_custom_fields`,`http_ratelimit`,`http_request_cache_settings`,`http_request_dynamic_redirect`,`http_request_firewall_custom`,`http_request_firewall_managed`,`http_request_late_transform`,`http_request_origin`,`http_request_redirect`,`http_request_sanitize`,`http_request_sbfm`,`http_request_transform`,`http_response_cache_settings`,`http_response_compression`,`http_response_firewall_managed`,`http_response_headers_transform`,`magic_transit`,`magic_transit_ids_managed`,`magic_transit_managed`,`magic_transit_ratelimit`]}).option(`rules`,{type:`string`,description:`The list of rules in the ruleset. 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 B={command:`update <ruleset-id>`,describe:`Update an account or zone ruleset`,builder:z,handler:async p=>c({command:`rulesets update`,classification:{safeFlags:[`validate-only`,`kind`,`phase`,`dry-run`]}},p,async()=>{let c={dry_run:p[`validate-only`]};if(p.dryRun){let e=p.zone===void 0?await n():void 0,t=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf rulesets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/rulesets/${p[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(p[`ruleset-id`]))}`,pathParams:{"account-or-zone":String(t),"ruleset-id":String(p[`ruleset-id`]??``),"account-or-zone-id":String(r)},query:c,bodyKind:`json`,body:p.body===void 0?d({description:f(p.description,`description`,`text`),name:f(p.name,`name`,`text`),kind:f(p.kind,`kind`,`text`),phase:f(p.phase,`phase`,`text`),rules:u(p.rules,`rules`)}):l(p.body)});return}let m=await t(p),h=p.zone===void 0?`accounts`:`zones`,g=h===`zones`?await r({zone:p.zone},m,{quiet:p.quiet}):p.local?e:await i();if(h===`zones`?p.zoneId=g:p.accountId=g,p.body){let e=l(p.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let t=await s(`Updating`,async()=>m.rulesets.update({...e,account_or_zone:h,account_or_zone_id:g,ruleset_id:p[`ruleset-id`],...c}));a(t,{successLabel:`Updated`});return}let _=d({description:f(p.description,`description`,`text`),name:f(p.name,`name`,`text`),kind:f(p.kind,`kind`,`text`),phase:f(p.phase,`phase`,`text`),rules:u(p.rules,`rules`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let v=await s(`Updating`,async()=>m.rulesets.update({..._,account_or_zone:h,account_or_zone_id:g,ruleset_id:p[`ruleset-id`],...c}));a(v,{successLabel:`Updated`})})};function V(e){return e.usage(`$0 rulesets versions by-tag get <tag>
29
+
30
+ Fetches the rules of a managed account or zone ruleset version for a given tag.`).positional(`tag`,{type:`string`,description:`The category of a rule.`,demandOption:!0}).option(`id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`ruleset-version`,{type:`string`,description:`The version of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <tag>`,describe:`List an account or zone ruleset version's rules by tag`,builder:V,handler:async l=>c({command:`rulesets versions by-tag get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets versions by-tag get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/rulesets/${l.id==null?`<id>`:encodeURIComponent(String(l.id))}/versions/${l[`ruleset-version`]==null?`<ruleset-version>`:encodeURIComponent(String(l[`ruleset-version`]))}/by_tag/${l.tag==null?`<tag>`:encodeURIComponent(String(l.tag))}`,pathParams:{"account-or-zone":String(t),tag:String(l.tag??``),"ruleset-version":String(l[`ruleset-version`]??``),id:String(l.id??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.rulesets.versions.byTag.get({account_or_zone:u,account_or_zone_id:d,id:l.id,ruleset_version:l[`ruleset-version`],tag:l.tag}));a(f,{successLabel:`Loaded`})})},U={command:`by-tag`,describe:`Operations for versions.by-tag`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 rulesets versions delete <ruleset-version>
31
+
32
+ Deletes an existing version of an account or zone ruleset.`).positional(`ruleset-version`,{type:`string`,description:`The version of the ruleset.`,demandOption:!0}).option(`id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const G={command:`delete <ruleset-version>`,describe:`Delete an account or zone ruleset version`,builder:W,handler:async l=>c({command:`rulesets versions delete`,classification:{safeFlags:[`validate-only`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={dry_run:l[`validate-only`]};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets versions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/rulesets/${l.id==null?`<id>`:encodeURIComponent(String(l.id))}/versions/${l[`ruleset-version`]==null?`<ruleset-version>`:encodeURIComponent(String(l[`ruleset-version`]))}`,pathParams:{"account-or-zone":String(t),"ruleset-version":String(l[`ruleset-version`]??``),id:String(l.id??``),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();if(d===`zones`?l.zoneId=f:l.accountId=f,!await p({force:!!l.force})){process.stderr.write(`Aborted.
33
+ `);return}let m=await s(`Deleting`,async()=>u.rulesets.versions.delete({account_or_zone:d,account_or_zone_id:f,id:l.id,ruleset_version:l[`ruleset-version`],...c}));a(m,{successLabel:`Deleted`})})};function K(e){return e.usage(`$0 rulesets versions get <ruleset-version>
34
+
35
+ Fetches a specific version of an account or zone ruleset.`).positional(`ruleset-version`,{type:`string`,description:`The version of the ruleset.`,demandOption:!0}).option(`id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`get <ruleset-version>`,describe:`Get an account or zone ruleset version`,builder:K,handler:async l=>c({command:`rulesets versions get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/rulesets/${l.id==null?`<id>`:encodeURIComponent(String(l.id))}/versions/${l[`ruleset-version`]==null?`<ruleset-version>`:encodeURIComponent(String(l[`ruleset-version`]))}`,pathParams:{"account-or-zone":String(t),"ruleset-version":String(l[`ruleset-version`]??``),id:String(l.id??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.rulesets.versions.get({account_or_zone:u,account_or_zone_id:d,id:l.id,ruleset_version:l[`ruleset-version`]}));a(f,{successLabel:`Loaded`})})};function J(e){return e.usage(`$0 rulesets versions list
36
+
37
+ Fetches the versions of an account or zone ruleset.`).option(`id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`list`,describe:`List an account or zone ruleset's versions`,builder:J,handler:async l=>c({command:`rulesets versions list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/rulesets/${l.id==null?`<id>`:encodeURIComponent(String(l.id))}/versions`,pathParams:{"account-or-zone":String(t),id:String(l.id??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.rulesets.versions.list({account_or_zone:u,account_or_zone_id:d,id:l.id}));a(f,{successLabel:`Loaded`})})},X={command:`versions`,describe:`Operations for versions`,builder:e=>e.command(G).command(q).command(Y).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Z={command:`rulesets`,describe:`rulesets`,builder:e=>e.command(h).command(_).command(k).command(j).command(B).command(D).command(R).command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Z as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,t as r}from"./context-Bwkz4Lm_.mjs";import{t as i}from"./output-BGqhvqe2.mjs";import{t as a}from"./dry-run-DmsbOMF1.mjs";import{t as o}from"./progress-BYVZuEcG.mjs";import{t as s}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{n as f}from"./prompt-F5wxc8zq.mjs";import{t as p}from"./cli-types-9oYmRTHJ.mjs";function m(e){return e.usage(`$0 rum rules bulk-create
2
+ import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{n as f}from"./prompt-RlgRrmbm.mjs";import{t as p}from"./cli-types-9oYmRTHJ.mjs";function m(e){return e.usage(`$0 rum rules bulk-create
3
3
 
4
4
  Modifies one or more rules in a Web Analytics ruleset with a single request.`).option(`ruleset-id`,{type:`string`,description:`The Web Analytics ruleset identifier.`,demandOption:!0}).option(`delete-rules`,{type:`string`,array:!0,description:`A list of rule identifiers to delete.`}).option(`rules`,{type:`string`,description:`A list of rules to create or update. 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 h={command:`bulk-create`,describe:`Update Web Analytics rules`,builder:m,handler:async d=>s({command:`rum rules bulk-create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){let e=await n();a({command:`cf rum rules bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/rum/v2/${d[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(d[`ruleset-id`]))}/rules`,pathParams:{"ruleset-id":String(d[`ruleset-id`]??``)},bodyKind:`json`,body:d.body===void 0?u({delete_rules:d[`delete-rules`],rules:l(d.rules,`rules`)}):c(d.body)});return}let s=await t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Creating`,async()=>s.rum.rules.bulkCreate({...e,account_id:f,ruleset_id:d[`ruleset-id`]}));i(t,{successLabel:`Created`});return}let p=u({delete_rules:d[`delete-rules`],rules:l(d.rules,`rules`)}),m=await o(`Creating`,async()=>s.rum.rules.bulkCreate({...p,account_id:f,ruleset_id:d[`ruleset-id`]}));i(m,{successLabel:`Created`})})};function g(e){return e.usage(`$0 rum rules create <ruleset-id>
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./agent-context-DFEgYjEQ.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{Q as n}from"./dist-CYFkGHYv.mjs";import{n as r}from"./version-BZNc7Y3t.mjs";import{t as i}from"./delegate-Tgfxa-MZ.mjs";import{i as a,r as o}from"./lifecycle-oud60haK.mjs";import{i as s,t as c}from"./interactive-Dqv0RWVU.mjs";import{t as l}from"./request-headers-CUee83pa.mjs";import{n as u,t as d}from"./state-Dy6-rKNd.mjs";import{t as f}from"./error-sanitization-BWnGnB73.mjs";import p from"node:os";import{createHash as m,randomUUID as h}from"node:crypto";const g=/* @__PURE__ */ new Date(`2026-01-01T00:00:00.000Z`),_=`CF_SEND_TELEMETRY`,v=`WRANGLER_SEND_METRICS`,y=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function b(e){if(e===void 0)return;let t=e.trim().toLowerCase();if(t===`true`||t===`1`)return!0;if(t===`false`||t===`0`)return!1}function x(){let e=b(process.env[_]);if(e!==void 0)return{enabled:e,source:`env`};let t=b(process.env[v]);if(t!==void 0)return{enabled:t,source:`wrangler-env`}}function S(){return x()?.enabled}function C(){let e=d();if(typeof e.deviceId==`string`&&y.test(e.deviceId))return e.deviceId;let t=h();return u({deviceId:t}),t}function w(){return d().deviceId===void 0}function T(){if(n())return{enabled:!1,source:`do-not-track`};let e=x();if(e!==void 0)return e;let t=d().telemetry?.preference;return t?.enabled===!1?{enabled:!1,source:`config`}:t?.enabled===!0&&typeof t.date==`string`&&new Date(t.date)>=g?{enabled:!0,source:`config`}:{enabled:!0,source:`default`}}function E(e){switch(e){case`do-not-track`:return`DO_NOT_TRACK`;case`env`:return _;case`wrangler-env`:return v;default:return}}function D(e){u({telemetry:{preference:{enabled:e,date:(/* @__PURE__ */ new Date()).toISOString()}}})}function O(){return d().telemetry?.bannerLastShown}function k(e){u({telemetry:{bannerLastShown:e}})}function A(){switch(process.platform){case`win32`:return`Windows`;case`darwin`:return`Mac OS`;case`linux`:return`Linux`;default:return`Others: ${process.platform}`}}function j(){return p.version()}function M(){return process.arch}function N(){return Number.parseInt(process.versions.node.split(`.`)[0]??`0`,10)}function P(){let e=process.env.npm_config_user_agent??``;return e.startsWith(`pnpm`)?`pnpm`:e.startsWith(`yarn`)?`yarn`:e.startsWith(`bun`)?`bun`:e.startsWith(`npm`)?`npm`:`unknown`}function F(e,t,n){return m(`sha256`).update(`cf-agent-session-v1\0`).update(e).update(`\0`).update(t).update(`\0`).update(n).digest(`hex`).slice(0,32)}function I(){return typeof PACKAGE_PRERELEASE_LABEL==`string`?PACKAGE_PRERELEASE_LABEL:void 0}let L;function R(){if(L)return L;let[t,n,o]=r.split(`.`).map(e=>{let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}),u=Date.now(),d=0,f=w(),{enabled:p}=T(),m=e(),h=m.harness?.id??null,g=m.matches.find(e=>e.sessionId);function _(){let e=I(),a=C();return{product:`cf`,cliVersion:r,cliMajor:t??0,cliMinor:n??0,cliPatch:o??0,...e?{prereleaseLabel:e}:{},osPlatform:A(),osVersion:j(),arch:M(),nodeVersion:N(),packageManager:P(),deviceId:a,amplitude_session_id:u,amplitude_event_id:d++,...g?.sessionId?{agentSessionKey:F(a,g.harness.id,g.sessionId)}:{},isFirstUsage:f,isCI:c,isInteractive:s(),cliMode:l(),agent:h,delegated:!!process.env[i]}}function v(e,t){let n={deviceId:t.deviceId,event:e,timestamp:Date.now(),properties:t};if(process.env.DEBUG&&console.error(`Telemetry ${p?`sending`:`would send`}: ${JSON.stringify(n)}`),p)return fetch(`https://sparrow.cloudflare.com/api/v1/event`,{method:`POST`,signal:AbortSignal.timeout(1e3),headers:{Accept:`*/*`,"Content-Type":`application/json`,"Sparrow-Source-Key":`50598e014ed44c739ec8074fdc16057c`},mode:`cors`,keepalive:!0,body:JSON.stringify(n)}).then(()=>void 0).catch(e=>{process.env.DEBUG&&console.error(`Telemetry failed to send:`,e instanceof Error?e.message:String(e))})}return L={enabled:p,sendCommandEvent(e,t){if(p)try{a(v(e,{..._(),...t}))}catch(e){process.env.DEBUG&&console.error(`Telemetry failed to prepare:`,e)}},sendAdhocEvent(e,t={}){if(p)try{a(v(e,{..._(),...t}))}catch(e){process.env.DEBUG&&console.error(`Telemetry failed to prepare:`,e)}}},L}const z={q:{canonical:`quiet`,type:`boolean`},z:{canonical:`zone`,type:`value`},m:{canonical:`mode`,type:`value`},h:{canonical:`help`,type:`boolean`},v:{canonical:`version`,type:`boolean`}};function B(e){return e.replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase())}function V(e,t){let n=[];for(let r of e){if(r===`--`)break;if(r.startsWith(`--`)){let e=r.slice(2).split(`=`)[0]??``,t=e.startsWith(`no-`)?e.slice(3):e;t&&n.push(t);continue}if(!r.startsWith(`-`)||r===`-`)continue;let e=r.slice(1);for(let r of e){let e=t[r];if(!e||(n.push(e.canonical),e.type===`value`))break}}return n}function H(e,t,n){let r=/* @__PURE__ */ new Set([...n.safeFlags,`quiet`,`local`]),i={...z,...n.shortFlagAliases},a=/* @__PURE__ */ new Set,o={};for(let n of V(t,i)){a.add(n);let t=e[n]??e[B(n)];o[n]=r.has(n)?t:`<REDACTED>`}let s=[...a].sort();return{sanitizedArgs:o,argsUsed:s,argsCombination:s.join(`, `)}}const U=/* @__PURE__ */ new Set([`SIGINT`,`SIGTERM`]),W=1024;function G(e){if(e instanceof t)return e.cancelled||e.signal&&U.has(e.signal)?`cancelled`:e.code===0?`success`:`error`}async function K(e,t,n){let r;try{r=R()}catch{return n()}if(o(),e.sendMetrics===!1||!r.enabled)return n();let i={...e.recordArgs===!1?{sanitizedArgs:{},argsUsed:[],argsCombination:``}:H(t,process.argv.slice(2),e.classification),command:e.command};r.sendCommandEvent(`cf command started`,i);let a=e.searchQuery===void 0?{}:{searchQuery:e.searchQuery.slice(0,W),...e.searchQuery.length>W?{searchQueryTruncated:!0}:{}},s=Date.now();try{let e=await n();return r.sendCommandEvent(`cf command finished`,{...i,...a,outcome:`success`,durationMs:Date.now()-s}),e}catch(e){let t=G(e)??`error`;throw r.sendCommandEvent(`cf command finished`,{...i,...a,outcome:t,durationMs:Date.now()-s,...t===`error`?f(e):{}}),e}}function q(e,t){return{...e,handler:n=>K(t,n,()=>e.handler(n))}}export{_ as a,C as c,w as d,T as f,R as i,S as l,D as m,q as n,g as o,k as p,H as r,O as s,K as t,E as u};
2
+ import{t as e}from"./agent-context-DFEgYjEQ.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{Q as n}from"./dist-BHEmAAHr.mjs";import{n as r}from"./version-BdVUXLnK.mjs";import{t as i}from"./delegate-Tgfxa-MZ.mjs";import{i as a,r as o}from"./lifecycle-oud60haK.mjs";import{i as s,t as c}from"./interactive-BW9T1D1q.mjs";import{t as l}from"./request-headers-DiJeDAn1.mjs";import{n as u,t as d}from"./state-BDSvdSdP.mjs";import{t as f}from"./error-sanitization-DE_zSrXw.mjs";import p from"node:os";import{createHash as m,randomUUID as h}from"node:crypto";const g=/* @__PURE__ */ new Date(`2026-01-01T00:00:00.000Z`),_=`CF_SEND_TELEMETRY`,v=`WRANGLER_SEND_METRICS`,y=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function b(e){if(e===void 0)return;let t=e.trim().toLowerCase();if(t===`true`||t===`1`)return!0;if(t===`false`||t===`0`)return!1}function x(){let e=b(process.env[_]);if(e!==void 0)return{enabled:e,source:`env`};let t=b(process.env[v]);if(t!==void 0)return{enabled:t,source:`wrangler-env`}}function S(){return x()?.enabled}function C(){let e=d();if(typeof e.deviceId==`string`&&y.test(e.deviceId))return e.deviceId;let t=h();return u({deviceId:t}),t}function w(){return d().deviceId===void 0}function T(){if(n())return{enabled:!1,source:`do-not-track`};let e=x();if(e!==void 0)return e;let t=d().telemetry?.preference;return t?.enabled===!1?{enabled:!1,source:`config`}:t?.enabled===!0&&typeof t.date==`string`&&new Date(t.date)>=g?{enabled:!0,source:`config`}:{enabled:!0,source:`default`}}function E(e){switch(e){case`do-not-track`:return`DO_NOT_TRACK`;case`env`:return _;case`wrangler-env`:return v;default:return}}function D(e){u({telemetry:{preference:{enabled:e,date:(/* @__PURE__ */ new Date()).toISOString()}}})}function O(){return d().telemetry?.bannerLastShown}function k(e){u({telemetry:{bannerLastShown:e}})}function A(){switch(process.platform){case`win32`:return`Windows`;case`darwin`:return`Mac OS`;case`linux`:return`Linux`;default:return`Others: ${process.platform}`}}function j(){return p.version()}function M(){return process.arch}function N(){return Number.parseInt(process.versions.node.split(`.`)[0]??`0`,10)}function P(){let e=process.env.npm_config_user_agent??``;return e.startsWith(`pnpm`)?`pnpm`:e.startsWith(`yarn`)?`yarn`:e.startsWith(`bun`)?`bun`:e.startsWith(`npm`)?`npm`:`unknown`}function F(e,t,n){return m(`sha256`).update(`cf-agent-session-v1\0`).update(e).update(`\0`).update(t).update(`\0`).update(n).digest(`hex`).slice(0,32)}function I(){return typeof PACKAGE_PRERELEASE_LABEL==`string`?PACKAGE_PRERELEASE_LABEL:void 0}let L;function R(){if(L)return L;let[t,n,o]=r.split(`.`).map(e=>{let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}),u=Date.now(),d=0,f=w(),{enabled:p}=T(),m=e(),h=m.harness?.id??null,g=m.matches.find(e=>e.sessionId);function _(){let e=I(),a=C();return{product:`cf`,cliVersion:r,cliMajor:t??0,cliMinor:n??0,cliPatch:o??0,...e?{prereleaseLabel:e}:{},osPlatform:A(),osVersion:j(),arch:M(),nodeVersion:N(),packageManager:P(),deviceId:a,amplitude_session_id:u,amplitude_event_id:d++,...g?.sessionId?{agentSessionKey:F(a,g.harness.id,g.sessionId)}:{},isFirstUsage:f,isCI:c,isInteractive:s(),cliMode:l(),agent:h,delegated:!!process.env[i]}}function v(e,t){let n={deviceId:t.deviceId,event:e,timestamp:Date.now(),properties:t};if(process.env.DEBUG&&console.error(`Telemetry ${p?`sending`:`would send`}: ${JSON.stringify(n)}`),p)return fetch(`https://sparrow.cloudflare.com/api/v1/event`,{method:`POST`,signal:AbortSignal.timeout(1e3),headers:{Accept:`*/*`,"Content-Type":`application/json`,"Sparrow-Source-Key":`50598e014ed44c739ec8074fdc16057c`},mode:`cors`,keepalive:!0,body:JSON.stringify(n)}).then(()=>void 0).catch(e=>{process.env.DEBUG&&console.error(`Telemetry failed to send:`,e instanceof Error?e.message:String(e))})}return L={enabled:p,sendCommandEvent(e,t){if(p)try{a(v(e,{..._(),...t}))}catch(e){process.env.DEBUG&&console.error(`Telemetry failed to prepare:`,e)}},sendAdhocEvent(e,t={}){if(p)try{a(v(e,{..._(),...t}))}catch(e){process.env.DEBUG&&console.error(`Telemetry failed to prepare:`,e)}}},L}const z={q:{canonical:`quiet`,type:`boolean`},z:{canonical:`zone`,type:`value`},m:{canonical:`mode`,type:`value`},h:{canonical:`help`,type:`boolean`},v:{canonical:`version`,type:`boolean`}};function B(e){return e.replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase())}function V(e,t){let n=[];for(let r of e){if(r===`--`)break;if(r.startsWith(`--`)){let e=r.slice(2).split(`=`)[0]??``,t=e.startsWith(`no-`)?e.slice(3):e;t&&n.push(t);continue}if(!r.startsWith(`-`)||r===`-`)continue;let e=r.slice(1);for(let r of e){let e=t[r];if(!e||(n.push(e.canonical),e.type===`value`))break}}return n}function H(e,t,n){let r=/* @__PURE__ */ new Set([...n.safeFlags,`quiet`,`local`]),i={...z,...n.shortFlagAliases},a=/* @__PURE__ */ new Set,o={};for(let n of V(t,i)){a.add(n);let t=e[n]??e[B(n)];o[n]=r.has(n)?t:`<REDACTED>`}let s=[...a].sort();return{sanitizedArgs:o,argsUsed:s,argsCombination:s.join(`, `)}}const U=/* @__PURE__ */ new Set([`SIGINT`,`SIGTERM`]),W=1024;function G(e){if(e instanceof t)return e.cancelled||e.signal&&U.has(e.signal)?`cancelled`:e.code===0?`success`:`error`}async function K(e,t,n){let r;try{r=R()}catch{return n()}if(o(),e.sendMetrics===!1||!r.enabled)return n();let i={...e.recordArgs===!1?{sanitizedArgs:{},argsUsed:[],argsCombination:``}:H(t,process.argv.slice(2),e.classification),command:e.command};r.sendCommandEvent(`cf command started`,i);let a=e.searchQuery===void 0?{}:{searchQuery:e.searchQuery.slice(0,W),...e.searchQuery.length>W?{searchQueryTruncated:!0}:{}},s=Date.now();try{let e=await n();return r.sendCommandEvent(`cf command finished`,{...i,...a,outcome:`success`,durationMs:Date.now()-s}),e}catch(e){let t=G(e)??`error`;throw r.sendCommandEvent(`cf command finished`,{...i,...a,outcome:t,durationMs:Date.now()-s,...t===`error`?f(e):{}}),e}}function q(e,t){return{...e,handler:n=>K(t,n,()=>e.handler(n))}}export{_ as a,C as c,w as d,T as f,R as i,S as l,D as m,q as n,g as o,k as p,H as r,O as s,K as t,E as u};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./run-BvHwWWUX.mjs";export{e as runWithTelemetry};