cf 1.0.0-beta.13 → 1.0.0-beta.14

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 (257) hide show
  1. package/dist/_meta/commands.json +1562 -1776
  2. package/dist/_meta/hand-written-commands.json +342 -22
  3. package/dist/_meta/schemas.json +611 -956
  4. package/dist/abuse-reports-CVv52Q2w.mjs +24 -0
  5. package/dist/access-k1QjF5rE.mjs +2 -0
  6. package/dist/{account-tags-CaXDDeZ4.mjs → account-tags-RhvWOkOf.mjs} +4 -4
  7. package/dist/{accounts-BALwxDQY.mjs → accounts--3lrEkmu.mjs} +9 -15
  8. package/dist/{acm-CP9EaXQN.mjs → acm-BJxINEcu.mjs} +2 -2
  9. package/dist/{addressing-DRlaxqrI.mjs → addressing-BqByG9JW.mjs} +55 -43
  10. package/dist/{agent-memory-vGhlfZBx.mjs → agent-memory-D4dQMGbh.mjs} +2 -2
  11. package/dist/{ai-CJtbWfB9.mjs → ai-CRkQ4pjC.mjs} +1 -1
  12. package/dist/{ai-audit-C0BJNqZZ.mjs → ai-audit-fMSn4c5L.mjs} +1 -1
  13. package/dist/{ai-gateway-BQtv3U3x.mjs → ai-gateway-CbhvQK4L.mjs} +4 -4
  14. package/dist/ai-search-CvVSnOA0.mjs +79 -0
  15. package/dist/{ai-security-CFTaYk_X.mjs → ai-security-Z_qpI92I.mjs} +1 -1
  16. package/dist/{alerting-1hun27JC.mjs → alerting-CpbCB8br.mjs} +3 -3
  17. package/dist/{analytics-DXUSjvzT.mjs → analytics-DkY9dOP1.mjs} +3 -3
  18. package/dist/{analytics_engine-CQsnL09C.mjs → analytics_engine-DE_jvlx_.mjs} +1 -1
  19. package/dist/{api-security-BXhrfR6-.mjs → api-security-BHnOU5MM.mjs} +25 -25
  20. package/dist/{argo-LPUCTnee.mjs → argo-DhC5L_aN.mjs} +3 -3
  21. package/dist/{artifacts-Dt6easua.mjs → artifacts-CrIupY7P.mjs} +3 -3
  22. package/dist/{audit-logs-CVznAM2Z.mjs → audit-logs-BjeBxTox.mjs} +1 -1
  23. package/dist/{auth-eQr-kQCH.mjs → auth-BNYfOMl0.mjs} +1 -1
  24. package/dist/{auth-CGLsxbc6.mjs → auth-CAWalgW0.mjs} +1 -1
  25. package/dist/auth-DOwC01PW.mjs +2 -0
  26. package/dist/{auth-token-pNQrX_9O.mjs → auth-token-Dop0wLCw.mjs} +1 -1
  27. package/dist/{autoconfig-sD7Frryg.mjs → autoconfig-RQ3HS4m1.mjs} +1 -1
  28. package/dist/{basin-catalog-ZQICw-zF.mjs → basin-catalog-DZ7QV-_N.mjs} +3 -3
  29. package/dist/{billing-Dy1-dV_B.mjs → billing-BFyte9fL.mjs} +3 -3
  30. package/dist/bot-management-DXcbV3am.mjs +9 -0
  31. package/dist/{botnet-feed-xb98Cj3Y.mjs → botnet-feed-bGGp_cwX.mjs} +1 -1
  32. package/dist/{brand-protection-Ck3okE2k.mjs → brand-protection-DN36XkxH.mjs} +2 -2
  33. package/dist/{browser-run-DJGJSzFX.mjs → browser-run-hHD1RT43.mjs} +3 -3
  34. package/dist/build-BhpWYgNm.mjs +2 -0
  35. package/dist/{build-HmSXqjGn.mjs → build-CCe7IrWT.mjs} +1 -1
  36. package/dist/{builds-CYxcZtkG.mjs → builds-6aO61R9R.mjs} +4 -4
  37. package/dist/{cache-D9tSfovH.mjs → cache-C5YJpMqi.mjs} +6 -6
  38. package/dist/{certificate-authorities-CpiveTFC.mjs → certificate-authorities-CbqDAktQ.mjs} +1 -1
  39. package/dist/{cf-BxsXrVeh.mjs → cf-oRSQKirD.mjs} +1 -1
  40. package/dist/{chunk-DSGVRFIS-C1_SEtRK.mjs → chunk-DSGVRFIS-CPI5cYtB.mjs} +1 -1
  41. package/dist/{chunk-NDZDTP46-Bjx_wtJe.mjs → chunk-NDZDTP46-Civns3WA.mjs} +1 -1
  42. package/dist/{cli-DeJc9U8z.mjs → cli-ht4q6i2y.mjs} +1 -1
  43. package/dist/{client-certificates-CF6YZyvP.mjs → client-certificates-balaN_my.mjs} +1 -1
  44. package/dist/{client-side-security-BLoe9kS5.mjs → client-side-security-3_4Ermmg.mjs} +3 -3
  45. package/dist/{cloud-connector-DXRUHsjt.mjs → cloud-connector-avx27sLw.mjs} +1 -1
  46. package/dist/{cloudflared--1Ws1RJy.mjs → cloudflared-D83U8Yn3.mjs} +1 -1
  47. package/dist/{cloudforce-one-CBLxXi6v.mjs → cloudforce-one-CXdeqJ9l.mjs} +126 -168
  48. package/dist/{command-Dh7RmjFu.mjs → command-9VAc7b30.mjs} +1 -1
  49. package/dist/{command-Cu7dcaHT.mjs → command-B_Ixlz8Q.mjs} +1 -1
  50. package/dist/{command-oNVwyjGB.mjs → command-BtDY_MKv.mjs} +1 -1
  51. package/dist/{command-CG6RvZs0.mjs → command-CUNMrMou.mjs} +1 -1
  52. package/dist/{command-D3fyhdy-.mjs → command-Ckb9FufU.mjs} +1 -1
  53. package/dist/{command-BDe67N_n.mjs → command-CtVUNm__.mjs} +1 -1
  54. package/dist/{command-DUhX8Dcr.mjs → command-CyJQ40fc.mjs} +1 -1
  55. package/dist/{command-UiHLJ8Ji.mjs → command-DPX9sJVi.mjs} +1 -1
  56. package/dist/{command-BlIb6RR2.mjs → command-DXaRn1ls.mjs} +1 -1
  57. package/dist/{command-CcuLC6CJ.mjs → command-DjEJaOwV.mjs} +1 -1
  58. package/dist/{command-_rqD0hXF.mjs → command-DtgJilOK.mjs} +1 -1
  59. package/dist/{command-BvfKhMl7.mjs → command-OHov3PEc.mjs} +1 -1
  60. package/dist/{command-DwXiDOeH.mjs → command-OWe3v69l.mjs} +1 -1
  61. package/dist/{command-83uVfXh9.mjs → command-SmWD-MeI.mjs} +1 -1
  62. package/dist/{completions-D06AO7A8.mjs → completions-CuqAO3N_.mjs} +1 -1
  63. package/dist/{connector-interrupts-DelTmNyw.mjs → connector-interrupts-ftd10Du-.mjs} +1 -1
  64. package/dist/{connector-telemetry-events-BwxR3G8d.mjs → connector-telemetry-events-TwDZYdEM.mjs} +1 -1
  65. package/dist/{connector-telemetry-snapshots-Bqq-hrpJ.mjs → connector-telemetry-snapshots-CZxkOuC3.mjs} +1 -1
  66. package/dist/{connectors-D-m3rEpk.mjs → connectors-6lVSr-fd.mjs} +1 -1
  67. package/dist/containers-Dqs_ZnO2.mjs +78 -0
  68. package/dist/containers-ncw3bd3a.mjs +376 -0
  69. package/dist/{content-scan-W0BNzbQp.mjs → content-scan-BWFbqfQ0.mjs} +3 -3
  70. package/dist/{context-q7UaYK69.mjs → context-BBLtgdR1.mjs} +1 -1
  71. package/dist/{cps-BZ6hqRb5.mjs → cps-C5phNoVU.mjs} +2 -2
  72. package/dist/{csamScanner-Bo1t3CLh.mjs → csamScanner-BwZNZu0A.mjs} +3 -3
  73. package/dist/{ct-alerting-E03faC7p.mjs → ct-alerting-DPp3qLqO.mjs} +1 -1
  74. package/dist/{custom-certificates-CUySSPzi.mjs → custom-certificates-pfpZcr06.mjs} +5 -5
  75. package/dist/{custom-csrs-gNpWkJPQ.mjs → custom-csrs-DrvGRAkl.mjs} +2 -2
  76. package/dist/{custom-hostnames-abGBAbx7.mjs → custom-hostnames-wGtmFbz1.mjs} +3 -3
  77. package/dist/{custom-nameservers-BgNXol1P.mjs → custom-nameservers-HTG6MPKv.mjs} +1 -1
  78. package/dist/{custom-pages-DMKX3aoD.mjs → custom-pages-DqEHBSVt.mjs} +2 -2
  79. package/dist/d1-EQMUlHTJ.mjs +94 -0
  80. package/dist/{dcv-delegation-B5YUEWu0.mjs → dcv-delegation-D6nj0Z5N.mjs} +1 -1
  81. package/dist/{deploy-CWNm1-5v.mjs → deploy-B22sEVHd.mjs} +1 -1
  82. package/dist/{deploy-context-Dr6bxNcB.mjs → deploy-context-DmG9rgPO.mjs} +1 -1
  83. package/dist/{deploy-input-Cc0_2QlW.mjs → deploy-input-BCjcuP6u.mjs} +1 -1
  84. package/dist/{dev-ZA8itQE7.mjs → dev-ClhhXuNU.mjs} +1 -1
  85. package/dist/diagnostics-tqHjq-Pl.mjs +15 -0
  86. package/dist/dist-DmRM6WSZ.mjs +449 -0
  87. package/dist/{dls-DIl16mLp.mjs → dls-BEHj4X9T.mjs} +1 -1
  88. package/dist/{dns-firewall-BZwJXHLj.mjs → dns-firewall-zwbkutyf.mjs} +1 -1
  89. package/dist/{dns-QUpgljRG.mjs → dns-n4mfYBZg.mjs} +3 -3
  90. package/dist/{durable-objects-BCj4ykpU.mjs → durable-objects-CQ2dHhho.mjs} +1 -1
  91. package/dist/{email-auth-DlHIYhCk.mjs → email-auth-DOi6yOt3.mjs} +1 -1
  92. package/dist/{email-routing-UKVS4DYy.mjs → email-routing-WcSPt22u.mjs} +5 -5
  93. package/dist/{email-security-CZjfRIg0.mjs → email-security-BXu3OGay.mjs} +15 -15
  94. package/dist/{email-sending-Dquc880C.mjs → email-sending-B9zTlIjt.mjs} +2 -2
  95. package/dist/{fieldExtractors-BbwDRquU.mjs → fieldExtractors-B37m2lKW.mjs} +1 -1
  96. package/dist/{firewall--mTfDnCJ.mjs → firewall-CRtYO0Ha.mjs} +5 -5
  97. package/dist/{flagship-cfoSwwM9.mjs → flagship-DvTFZSay.mjs} +3 -3
  98. package/dist/{fraud-Dcsq3EYK.mjs → fraud-uSyibsit.mjs} +5 -5
  99. package/dist/{google-tag-gateway-DPKSkZQi.mjs → google-tag-gateway-BFXiiokq.mjs} +1 -1
  100. package/dist/hand-written-dry-run-B82fRl2N.mjs +2 -0
  101. package/dist/{healthchecks-D78hIIBC.mjs → healthchecks-27u7b7Jb.mjs} +5 -5
  102. package/dist/{hostnames-sF999-6H.mjs → hostnames-DvaUSzsj.mjs} +1 -1
  103. package/dist/hyperdrive-BzJvPdu6.mjs +37 -0
  104. package/dist/{iam-Bvg_PayW.mjs → iam-Dl3cU9GI.mjs} +1 -1
  105. package/dist/{images-DI_lEZ4L.mjs → images-C2OkI1j7.mjs} +6 -6
  106. package/dist/index.mjs +1 -1
  107. package/dist/{init-1w_mcgk3.mjs → init-Da8pe296.mjs} +1 -1
  108. package/dist/{intel-BxElBUMP.mjs → intel-DoB1g_K7.mjs} +2 -2
  109. package/dist/{ips-DWoaKxi7.mjs → ips-BRt68epr.mjs} +1 -1
  110. package/dist/{k2-tFjaftl-.mjs → k2-_eq5ZY2t.mjs} +1 -1
  111. package/dist/{keyless-certificates-BrvxHU4J.mjs → keyless-certificates-DaO2yqYu.mjs} +2 -2
  112. package/dist/{keys-DcwTYKRf.mjs → keys-7BQ3Zq6Y.mjs} +1 -1
  113. package/dist/{kv-htXS-7uP.mjs → kv-BTYCXKML.mjs} +4 -4
  114. package/dist/{lazy-command-BDiIwpss.mjs → lazy-command-CDWwCsD2.mjs} +1 -1
  115. package/dist/{leaked-credential-checks-bvGrLOmQ.mjs → leaked-credential-checks-CPHOK_dE.mjs} +1 -1
  116. package/dist/load-balancers-Bu9pd2SV.mjs +76 -0
  117. package/dist/{local-DlT72Xpn.mjs → local-BcPM4I0s.mjs} +1 -1
  118. package/dist/local-BundUuDT.mjs +2 -0
  119. package/dist/{local-runtime-CokO6qaX.mjs → local-runtime-BHKyRlCP.mjs} +1 -1
  120. package/dist/{login-Ccw-mYwT.mjs → login-BBYC_BtH.mjs} +1 -1
  121. package/dist/{login-BGF_I_LT.mjs → login-D2uoWhWh.mjs} +1 -1
  122. package/dist/{logo-matches-tE8LTKgg.mjs → logo-matches-Bc1DQ4-g.mjs} +1 -1
  123. package/dist/{logos-Bj845Mcw.mjs → logos-X5B8z7Iv.mjs} +1 -1
  124. package/dist/{logpush-Cs8JdvKi.mjs → logpush-C2ENi1et.mjs} +3 -3
  125. package/dist/{logs-C92XZvNu.mjs → logs-BKDz7kBW.mjs} +1 -1
  126. package/dist/{magic-cloud-networking-hNp5MMw-.mjs → magic-cloud-networking-B60Gld8A.mjs} +6 -6
  127. package/dist/{magic-network-monitoring-68GuWAnv.mjs → magic-network-monitoring-CxXI3Y-H.mjs} +4 -4
  128. package/dist/{magic-transit-DNd7gu4j.mjs → magic-transit-ZCSaCbl8.mjs} +171 -168
  129. package/dist/{managed-defense-B_wCAuFD.mjs → managed-defense-DrxMb7xi.mjs} +1 -1
  130. package/dist/{managed-transforms-DZdxHPOh.mjs → managed-transforms-AI7KrRU1.mjs} +1 -1
  131. package/dist/{matches-B65CkflD.mjs → matches-rPMLS3Ip.mjs} +1 -1
  132. package/dist/{mcp-DrJW5ayK.mjs → mcp-DXUMvEWt.mjs} +4 -4
  133. package/dist/{mesh-DfVzYTn1.mjs → mesh-MmBCQ37q.mjs} +2 -2
  134. package/dist/{monetization-BGaI8CMO.mjs → monetization-DQE5VtUO.mjs} +2 -2
  135. package/dist/{mtls-certificates-BsU2emDD.mjs → mtls-certificates-DwkEb-Hy.mjs} +1 -1
  136. package/dist/{network-BEMD8P0U.mjs → network-BcfobxQY.mjs} +1 -1
  137. package/dist/{network-interconnects-DMu_fcbo.mjs → network-interconnects-BU3tN_Ab.mjs} +10 -6
  138. package/dist/{o11y-C1a4gDGF.mjs → o11y-BBv7nedp.mjs} +13 -13
  139. package/dist/{oauth-Bj5Ne1o8.mjs → oauth-BUr8bPwo.mjs} +1 -1
  140. package/dist/{oauth-clients-p4Etdqy_.mjs → oauth-clients-qWVImhHE.mjs} +3 -3
  141. package/dist/{oauth-mspHHU5U.mjs → oauth-n8um6MFk.mjs} +1 -1
  142. package/dist/{oauth-scopes-B2IabFza.mjs → oauth-scopes-CdeIgJIx.mjs} +1 -1
  143. package/dist/organization-CJeOVWH7.mjs +71 -0
  144. package/dist/{organizations-5S6xEp7T.mjs → organizations-BpfoqZcG.mjs} +1 -1
  145. package/dist/{origin-ca-certificates-_VJAoK1D.mjs → origin-ca-certificates-Bimf07RF.mjs} +2 -2
  146. package/dist/{origin-post-quantum-encryption-GcldDsT2.mjs → origin-post-quantum-encryption-CM-If38w.mjs} +2 -2
  147. package/dist/{origin-tls-client-auth-DZHld9fA.mjs → origin-tls-client-auth-BPwYPhc9.mjs} +1 -1
  148. package/dist/{page-rules-o1tAMMsD.mjs → page-rules-DOeekMrj.mjs} +4 -4
  149. package/dist/pages-Bn0Sg1ay.mjs +54 -0
  150. package/dist/{pay-per-crawl-BsnOxGYU.mjs → pay-per-crawl-qJpseNNx.mjs} +1 -1
  151. package/dist/{pay-per-use-BXWMCSyE.mjs → pay-per-use-C1MWKJ4O.mjs} +3 -3
  152. package/dist/pipelines-rCwXQw6S.mjs +44 -0
  153. package/dist/{precursor-B6DjBib6.mjs → precursor-Bk8Pp6jT.mjs} +2 -2
  154. package/dist/previews-BEheHO3T.mjs +4 -0
  155. package/dist/{progress-BtkTVcHI.mjs → progress-CQqDtgmF.mjs} +1 -1
  156. package/dist/{prompt-RlgRrmbm.mjs → prompt-C8FyienX.mjs} +1 -1
  157. package/dist/{queries-yLwoJRHV.mjs → queries-DJ8looyq.mjs} +1 -1
  158. package/dist/{queues-CnJRaE1o.mjs → queues-BBH9Q-Tt.mjs} +7 -7
  159. package/dist/{r2-CuC6-zQX.mjs → r2-CdJKpP2w.mjs} +13 -13
  160. package/dist/{radar-DrQLcbkq.mjs → radar-CdvQL4xm.mjs} +1 -1
  161. package/dist/raw-fetch-DbXN3SlE.mjs +2 -0
  162. package/dist/{realtime-CjsnzHxD.mjs → realtime-onrXppzh.mjs} +9 -9
  163. package/dist/{registrar-BgOsxTnX.mjs → registrar-CbEBc5IE.mjs} +2 -2
  164. package/dist/{registrar-sandbox-3ikBD9fB.mjs → registrar-sandbox-BJhn1HFT.mjs} +3 -3
  165. package/dist/{registry-CHowrQsZ.mjs → registry-PI6sO95I.mjs} +1 -1
  166. package/dist/{reporting-hE127s5r.mjs → reporting-bXZY6obP.mjs} +1 -1
  167. package/dist/{request-headers-DiJeDAn1.mjs → request-headers-D8L95bEQ.mjs} +1 -1
  168. package/dist/{request-tracers-BCwLxmPN.mjs → request-tracers-CihskC2A.mjs} +1 -1
  169. package/dist/{resource-sharing-2qvWUuMa.mjs → resource-sharing-DDqcCHVs.mjs} +2 -2
  170. package/dist/{resource-tagging-Dwx7iL3v.mjs → resource-tagging-D63RpBce.mjs} +1 -1
  171. package/dist/{rules-DxVQ6jIg.mjs → rules-CAW0-Wde.mjs} +1 -1
  172. package/dist/{rulesets-Cdh8YjI9.mjs → rulesets-CPir63Qc.mjs} +3 -3
  173. package/dist/{rum-a4CMq4Qu.mjs → rum-BfwTcuup.mjs} +1 -1
  174. package/dist/{run-BvHwWWUX.mjs → run-CW2Cgi0S.mjs} +1 -1
  175. package/dist/run-DEynXvCc.mjs +2 -0
  176. package/dist/{schema-flags-BzoBGPWk.mjs → schema-flags-BTItUu1K.mjs} +1 -1
  177. package/dist/{scim-B8XlXl8v.mjs → scim-CtZ1FeQE.mjs} +1 -1
  178. package/dist/{secrets-store-Cqhedh_i.mjs → secrets-store-BIuBYUJT.mjs} +1 -1
  179. package/dist/{security-insights-le2-DteL.mjs → security-insights-DfUus0bs.mjs} +3 -3
  180. package/dist/{security-txt-cCArWXur.mjs → security-txt-CgZOsAIZ.mjs} +1 -1
  181. package/dist/{session-C1BhT1ZJ.mjs → session-BcM8Vyyx.mjs} +1 -1
  182. package/dist/{shared-BPjcpXuA.mjs → shared-CpS23WwR.mjs} +1 -1
  183. package/dist/{smart-shield-Csyh8hwB.mjs → smart-shield-ClgB7r-9.mjs} +5 -5
  184. package/dist/{snippets-DUWx25q6.mjs → snippets-DLO3iFAg.mjs} +1 -1
  185. package/dist/{spawn-IysxuTNW.mjs → spawn-D07wH-MH.mjs} +1 -1
  186. package/dist/{spectrum-Da3UYSOR.mjs → spectrum-B6qkjR_Z.mjs} +5 -5
  187. package/dist/{speed-NxlMnB2e.mjs → speed-DX5X2EIR.mjs} +1 -1
  188. package/dist/sql-CF044HDW.mjs +4 -0
  189. package/dist/src-BMATTZU_.mjs +125 -0
  190. package/dist/{ssl-BtaX2WEJ.mjs → ssl-CM-rChEC.mjs} +5 -5
  191. package/dist/{startup-profile-CdJWgNjd.mjs → startup-profile-CrtCP-6-.mjs} +1 -1
  192. package/dist/startup-profile-D662WI9s.mjs +2 -0
  193. package/dist/state-D7uNYnoi.mjs +2 -0
  194. package/dist/{state-BDSvdSdP.mjs → state-DIiIGEtR.mjs} +1 -1
  195. package/dist/{stream-C1Ijjzn4.mjs → stream-5EmUOQvy.mjs} +3 -3
  196. package/dist/{submit-MdkuU_Pt.mjs → submit-lEAaRSMR.mjs} +1 -1
  197. package/dist/{tags-CA1xMM96.mjs → tags-CX23P4jg.mjs} +1 -1
  198. package/dist/telemetry-0Y5hAtCX.mjs +2 -0
  199. package/dist/{telemetry-Cm39QJ-M.mjs → telemetry-ZlCi5Xhc.mjs} +1 -1
  200. package/dist/{tenant-BB6Oszcl.mjs → tenant-DnI7QziH.mjs} +1 -1
  201. package/dist/{tenant-custom-nameservers-BsbgYAEo.mjs → tenant-custom-nameservers-MR0dlcGm.mjs} +1 -1
  202. package/dist/{tunnels-CRFtyHWz.mjs → tunnels-NzYpsfi_.mjs} +15 -15
  203. package/dist/{turnstile-DBXWo_Xe.mjs → turnstile-M7sKCEz3.mjs} +11 -11
  204. package/dist/{update-check-CMXSdres.mjs → update-check-HFkPml6x.mjs} +1 -1
  205. package/dist/update-check-aTutXNRd.mjs +2 -0
  206. package/dist/update-check-worker.mjs +1 -1
  207. package/dist/{url-info-t-XAs0Mk.mjs → url-info-Dos9VOXV.mjs} +1 -1
  208. package/dist/{url-normalization-Cs4F8e0a.mjs → url-normalization-CZbFOq_v.mjs} +2 -2
  209. package/dist/{url-scanner-CBIoDbTx.mjs → url-scanner-B7quLPGW.mjs} +2 -2
  210. package/dist/{user-CevdOMoa.mjs → user-rXca0J9M.mjs} +12 -12
  211. package/dist/{values-CjNlkbIh.mjs → values-D-rrZrDa.mjs} +1 -1
  212. package/dist/{vectorize-9d9tPmg5.mjs → vectorize-D2tf_oA8.mjs} +4 -4
  213. package/dist/version-BGnqDvNR.mjs +2 -0
  214. package/dist/waiting-rooms-DrA3-0bw.mjs +53 -0
  215. package/dist/{web-assets-BHot_MU8.mjs → web-assets-DQAfvPT9.mjs} +3 -3
  216. package/dist/{web3-CYfWAF6b.mjs → web3-MI0GQDnu.mjs} +5 -5
  217. package/dist/workers-By6Pf8fv.mjs +40 -0
  218. package/dist/{workers-builds-Dw7ho3So.mjs → workers-builds-6YsWsCmC.mjs} +2 -2
  219. package/dist/{workers-for-platforms-A3yjyLh3.mjs → workers-for-platforms-DL8fC1qR.mjs} +2 -2
  220. package/dist/workers-vpc-BYx6sbgd.mjs +13 -0
  221. package/dist/workflows-ByQLnV0E.mjs +52 -0
  222. package/dist/{zaraz-BsD2dMI3.mjs → zaraz-CgbpmA85.mjs} +1 -1
  223. package/dist/{zero-trust-CA3iGQbG.mjs → zero-trust-CpjTkkWt.mjs} +42 -42
  224. package/dist/{zone-D2M4EZD0.mjs → zone-DnKIe6po.mjs} +1 -1
  225. package/dist/{zones-BoOC_JzC.mjs → zones--5ZzsDmQ.mjs} +15 -15
  226. package/package.json +12 -12
  227. package/dist/abuse-reports-BjU1s8cf.mjs +0 -24
  228. package/dist/access-C_G2MZnA.mjs +0 -2
  229. package/dist/ai-search-DGU1Y5By.mjs +0 -79
  230. package/dist/auth-CrmVwfpJ.mjs +0 -2
  231. package/dist/bot-management-DTgPwL7O.mjs +0 -9
  232. package/dist/build-B1L6xrgC.mjs +0 -2
  233. package/dist/containers-CVNfEjJs.mjs +0 -78
  234. package/dist/containers-DeoZyeQe.mjs +0 -375
  235. package/dist/d1-CE08YqYk.mjs +0 -93
  236. package/dist/diagnostics-UMbG6m4n.mjs +0 -15
  237. package/dist/dist-BHEmAAHr.mjs +0 -487
  238. package/dist/hyperdrive-qWACKfA4.mjs +0 -37
  239. package/dist/load-balancers-BNTUt4yG.mjs +0 -76
  240. package/dist/local-DlDumOSC.mjs +0 -2
  241. package/dist/organization-CdXt7AVZ.mjs +0 -75
  242. package/dist/pages-CmiOhjSl.mjs +0 -54
  243. package/dist/pipelines-DWLQC0F6.mjs +0 -44
  244. package/dist/previews-dUKEBGSM.mjs +0 -4
  245. package/dist/raw-fetch-B4NvWuZD.mjs +0 -2
  246. package/dist/run-CkbrPJPx.mjs +0 -2
  247. package/dist/sql-CNdHAlQ8.mjs +0 -4
  248. package/dist/src-JfLDUxFr.mjs +0 -125
  249. package/dist/startup-profile-B2l0ChVu.mjs +0 -2
  250. package/dist/state-JB4_BU1o.mjs +0 -2
  251. package/dist/telemetry-BsYO3nxG.mjs +0 -2
  252. package/dist/update-check-C2oVEbXx.mjs +0 -2
  253. package/dist/version-BdVUXLnK.mjs +0 -2
  254. package/dist/waiting-rooms--5WmrWb3.mjs +0 -53
  255. package/dist/workers-S17M0n3h.mjs +0 -40
  256. package/dist/workers-vpc-BZ2xXtC3.mjs +0 -13
  257. package/dist/workflows-BgGrVpSR.mjs +0 -43
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,n as t,r as n}from"./source-mXUcrTVw.mjs";import{B as r}from"./dist-BHEmAAHr.mjs";import{N as i}from"./chunk-TAK63GWY-DdMktrgc.mjs";import{n as a,o}from"./chunk-DSGVRFIS-C1_SEtRK.mjs";import{createRequire as s}from"node:module";import{readFile as c}from"node:fs/promises";import{gzipSync as l}from"node:zlib";import{randomUUID as u}from"node:crypto";import{clearTimeout as d,setTimeout as f}from"node:timers";import{Miniflare as p,convertV4MiniflareOptions as m}from"miniflare";var h=/* @__PURE__ */ t(((e,t)=>{let n=[`nodebuffer`,`arraybuffer`,`fragments`],r=typeof Blob<`u`;r&&n.push(`blob`),t.exports={BINARY_TYPES:n,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:`258EAFA5-E914-47DA-95CA-C5AB0DC85B11`,hasBlob:r,kForOnEventAttribute:Symbol(`kIsForOnEventAttribute`),kListener:Symbol(`kListener`),kStatusCode:Symbol(`status-code`),kWebSocket:Symbol(`websocket`),NOOP:()=>{}}})),g=/* @__PURE__ */ t(((e,t)=>{let{EMPTY_BUFFER:r}=h(),i=Buffer[Symbol.species];function a(e,t){if(e.length===0)return r;if(e.length===1)return e[0];let n=Buffer.allocUnsafe(t),a=0;for(let t=0;t<e.length;t++){let r=e[t];n.set(r,a),a+=r.length}return a<t?new i(n.buffer,n.byteOffset,a):n}function o(e,t,n,r,i){for(let a=0;a<i;a++)n[r+a]=e[a]^t[a&3]}function s(e,t){for(let n=0;n<e.length;n++)e[n]^=t[n&3]}function c(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}function l(e){if(l.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=new i(e):ArrayBuffer.isView(e)?t=new i(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),l.readOnly=!1),t}
2
+ import{i as e,n as t,r as n}from"./source-mXUcrTVw.mjs";import{B as r}from"./dist-DmRM6WSZ.mjs";import{N as i}from"./chunk-TAK63GWY-DdMktrgc.mjs";import{n as a,o}from"./chunk-DSGVRFIS-CPI5cYtB.mjs";import{createRequire as s}from"node:module";import{readFile as c}from"node:fs/promises";import{gzipSync as l}from"node:zlib";import{randomUUID as u}from"node:crypto";import{clearTimeout as d,setTimeout as f}from"node:timers";import{Miniflare as p,convertV4MiniflareOptions as m}from"miniflare";var h=/* @__PURE__ */ t(((e,t)=>{let n=[`nodebuffer`,`arraybuffer`,`fragments`],r=typeof Blob<`u`;r&&n.push(`blob`),t.exports={BINARY_TYPES:n,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:`258EAFA5-E914-47DA-95CA-C5AB0DC85B11`,hasBlob:r,kForOnEventAttribute:Symbol(`kIsForOnEventAttribute`),kListener:Symbol(`kListener`),kStatusCode:Symbol(`status-code`),kWebSocket:Symbol(`websocket`),NOOP:()=>{}}})),g=/* @__PURE__ */ t(((e,t)=>{let{EMPTY_BUFFER:r}=h(),i=Buffer[Symbol.species];function a(e,t){if(e.length===0)return r;if(e.length===1)return e[0];let n=Buffer.allocUnsafe(t),a=0;for(let t=0;t<e.length;t++){let r=e[t];n.set(r,a),a+=r.length}return a<t?new i(n.buffer,n.byteOffset,a):n}function o(e,t,n,r,i){for(let a=0;a<i;a++)n[r+a]=e[a]^t[a&3]}function s(e,t){for(let n=0;n<e.length;n++)e[n]^=t[n&3]}function c(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}function l(e){if(l.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=new i(e):ArrayBuffer.isView(e)?t=new i(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),l.readOnly=!1),t}
3
3
  /* istanbul ignore else */
4
4
  if(t.exports={concat:a,mask:o,toArrayBuffer:c,toBuffer:l,unmask:s},!process.env.WS_NO_BUFFER_UTIL)try{let e=n(`bufferutil`);t.exports.mask=function(t,n,r,i,a){a<48?o(t,n,r,i,a):e.mask(t,n,r,i,a)},t.exports.unmask=function(t,n){t.length<32?s(t,n):e.unmask(t,n)}}catch{}})),_=/* @__PURE__ */ t(((e,t)=>{let n=Symbol(`kDone`),r=Symbol(`kRun`);t.exports=class{constructor(e){this[n]=()=>{this.pending--,this[r]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[r]()}[r](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[n])}}}})),v=/* @__PURE__ */ t(((e,t)=>{let r=n(`zlib`),i=g(),a=_(),{kStatusCode:o}=h(),s=Buffer[Symbol.species],c=Buffer.from([0,0,255,255]),l=Symbol(`permessage-deflate`),u=Symbol(`total-length`),d=Symbol(`callback`),f=Symbol(`buffers`),p=Symbol(`error`),m;t.exports=class{constructor(e){if(this._options=e||{},this._threshold=this._options.threshold===void 0?1024:this._options.threshold,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!m){let e=this._options.concurrencyLimit===void 0?10:this._options.concurrencyLimit;m=new a(e)}}static get extensionName(){return`permessage-deflate`}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits??(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&=(this._inflate.close(),null),this._deflate){let e=this._deflate[d];this._deflate.close(),this._deflate=null,e&&e(/* @__PURE__ */ Error(`The deflate stream was closed while data was being processed`))}}acceptAsServer(e){let t=this._options,n=e.find(e=>!(t.serverNoContextTakeover===!1&&e.server_no_context_takeover||e.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits==`number`&&t.serverMaxWindowBits>e.server_max_window_bits)||typeof t.clientMaxWindowBits==`number`&&!e.client_max_window_bits));if(!n)throw Error(`None of the extension offers can be accepted`);return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof t.serverMaxWindowBits==`number`&&(n.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits==`number`?n.client_max_window_bits=t.clientMaxWindowBits:(n.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw Error(`Unexpected parameter "client_no_context_takeover"`);if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits==`number`&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits==`number`&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw Error(`Unexpected or invalid parameter "client_max_window_bits"`);return t}normalizeParams(e){return e.forEach(e=>{Object.keys(e).forEach(t=>{let n=e[t];if(n.length>1)throw Error(`Parameter "${t}" must have only a single value`);if(n=n[0],t===`client_max_window_bits`){if(n!==!0){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else if(t===`server_max_window_bits`){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(t===`client_no_context_takeover`||t===`server_no_context_takeover`){if(n!==!0)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else throw Error(`Unknown parameter "${t}"`);e[t]=n})}),e}decompress(e,t,n){m.add(r=>{this._decompress(e,t,(e,t)=>{r(),n(e,t)})})}compress(e,t,n){m.add(r=>{this._compress(e,t,(e,t)=>{r(),n(e,t)})})}_decompress(e,t,n){let a=this._isServer?`client`:`server`;if(!this._inflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:r.Z_DEFAULT_WINDOWBITS;this._inflate=r.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[l]=this,this._inflate[u]=0,this._inflate[f]=[],this._inflate.on(`error`,b),this._inflate.on(`data`,y)}this._inflate[d]=n,this._inflate.write(e),t&&this._inflate.write(c),this._inflate.flush(()=>{let e=this._inflate[p];if(e){this._inflate.close(),this._inflate=null,n(e);return}let r=i.concat(this._inflate[f],this._inflate[u]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[u]=0,this._inflate[f]=[],t&&this.params[`${a}_no_context_takeover`]&&this._inflate.reset()),n(null,r)})}_compress(e,t,n){let a=this._isServer?`server`:`client`;if(!this._deflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:r.Z_DEFAULT_WINDOWBITS;this._deflate=r.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[u]=0,this._deflate[f]=[],this._deflate.on(`data`,v)}this._deflate[d]=n,this._deflate.write(e),this._deflate.flush(r.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=i.concat(this._deflate[f],this._deflate[u]);t&&(e=new s(e.buffer,e.byteOffset,e.length-4)),this._deflate[d]=null,this._deflate[u]=0,this._deflate[f]=[],t&&this.params[`${a}_no_context_takeover`]&&this._deflate.reset(),n(null,e)})}};function v(e){this[f].push(e),this[u]+=e.length}function y(e){if(this[u]+=e.length,this[l]._maxPayload<1||this[u]<=this[l]._maxPayload){this[f].push(e);return}this[p]=/* @__PURE__ */ RangeError(`Max payload size exceeded`),this[p].code=`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`,this[p][o]=1009,this.removeListener(`data`,y),this.reset()}function b(e){if(this[l]._inflate=null,this[p]){this[d](this[p]);return}e[o]=1007,this[d](e)}})),y=/* @__PURE__ */ t(((e,t)=>{let{isUtf8:r}=n(`buffer`),{hasBlob:i}=h(),a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function o(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}function s(e){let t=e.length,n=0;for(;n<t;)if(!(e[n]&128))n++;else if((e[n]&224)==192){if(n+1===t||(e[n+1]&192)!=128||(e[n]&254)==192)return!1;n+=2}else if((e[n]&240)==224){if(n+2>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||e[n]===224&&(e[n+1]&224)==128||e[n]===237&&(e[n+1]&224)==160)return!1;n+=3}else if((e[n]&248)==240){if(n+3>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||(e[n+3]&192)!=128||e[n]===240&&(e[n+1]&240)==128||e[n]===244&&e[n+1]>143||e[n]>244)return!1;n+=4}else return!1;return!0}function c(e){return i&&typeof e==`object`&&typeof e.arrayBuffer==`function`&&typeof e.type==`string`&&typeof e.stream==`function`&&(e[Symbol.toStringTag]===`Blob`||e[Symbol.toStringTag]===`File`)}if(t.exports={isBlob:c,isValidStatusCode:o,isValidUTF8:s,tokenChars:a},r)t.exports.isValidUTF8=function(e){return e.length<24?s(e):r(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=n(`utf-8-validate`);t.exports.isValidUTF8=function(t){return t.length<32?s(t):e(t)}}catch{}})),b=/* @__PURE__ */ t(((e,t)=>{let{Writable:r}=n(`stream`),i=v(),{BINARY_TYPES:a,EMPTY_BUFFER:o,kStatusCode:s,kWebSocket:c}=h(),{concat:l,toArrayBuffer:u,unmask:d}=g(),{isValidStatusCode:f,isValidUTF8:p}=y(),m=Buffer[Symbol.species];t.exports=class extends r{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents===void 0||e.allowSynchronousEvents,this._binaryType=e.binaryType||a[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[c]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write(e,t,n){if(this._opcode===8&&this._state==0)return n();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){n(this.createError(RangeError,`Too many buffered chunks`,!1,1008,`WS_ERR_TOO_MANY_BUFFERED_PARTS`));return}this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let t=this._buffers[0];return this._buffers[0]=new m(t.buffer,t.byteOffset+e,t.length-e),new m(t.buffer,t.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=new m(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case 0:this.getInfo(e);break;case 1:this.getPayloadLength16(e);break;case 2:this.getPayloadLength64(e);break;case 3:this.getMask();break;case 4:this.getData(e);break;case 5:case 6:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if(t[0]&48){e(this.createError(RangeError,`RSV2 and RSV3 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_2_3`));return}let n=(t[0]&64)==64;if(n&&!this._extensions[i.extensionName]){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(this._fin=(t[0]&128)==128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(!this._fragmented){e(this.createError(RangeError,`invalid opcode 0`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){e(this.createError(RangeError,`FIN must be set`,!0,1002,`WS_ERR_EXPECTED_FIN`));return}if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,`WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH`));return}}else{e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)==128,this._isServer){if(!this._masked){e(this.createError(RangeError,`MASK must be set`,!0,1002,`WS_ERR_EXPECTED_MASK`));return}}else if(this._masked){e(this.createError(RangeError,`MASK must be clear`,!0,1002,`WS_ERR_UNEXPECTED_MASK`));return}this._payloadLength===126?this._state=1:this._payloadLength===127?this._state=2:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),n=t.readUInt32BE(0);if(n>2**21-1){e(this.createError(RangeError,`Unsupported WebSocket frame: payload length > 2^53 - 1`,!1,1009,`WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH`));return}this._payloadLength=n*2**32+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){e(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`));return}this._state=this._masked?3:4}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=4}getData(e){let t=o;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&d(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=5,this.decompress(t,e);return}if(t.length){if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){e(this.createError(RangeError,`Too many message fragments`,!1,1008,`WS_ERR_TOO_MANY_BUFFERED_PARTS`));return}this._messageLength=this._totalPayloadLength,this._fragments.push(t)}this.dataMessage(e)}decompress(e,t){this._extensions[i.extensionName].decompress(e,this._fin,(e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){t(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`));return}if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){t(this.createError(RangeError,`Too many message fragments`,!1,1008,`WS_ERR_TOO_MANY_BUFFERED_PARTS`));return}this._fragments.push(n)}this.dataMessage(t),this._state===0&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=0;return}let t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let r;r=this._binaryType===`nodebuffer`?l(n,t):this._binaryType===`arraybuffer`?u(l(n,t)):this._binaryType===`blob`?new Blob(n):n,this._allowSynchronousEvents?(this.emit(`message`,r,!0),this._state=0):(this._state=6,setImmediate(()=>{this.emit(`message`,r,!0),this._state=0,this.startLoop(e)}))}else{let r=l(n,t);if(!this._skipUTF8Validation&&!p(r)){e(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._state===5||this._allowSynchronousEvents?(this.emit(`message`,r,!1),this._state=0):(this._state=6,setImmediate(()=>{this.emit(`message`,r,!1),this._state=0,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit(`conclude`,1005,o),this.end();else{let n=e.readUInt16BE(0);if(!f(n)){t(this.createError(RangeError,`invalid status code ${n}`,!0,1002,`WS_ERR_INVALID_CLOSE_CODE`));return}let r=new m(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!p(r)){t(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._loop=!1,this.emit(`conclude`,n,r),this.end()}this._state=0;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?`ping`:`pong`,e),this._state=0):(this._state=6,setImmediate(()=>{this.emit(this._opcode===9?`ping`:`pong`,e),this._state=0,this.startLoop(t)}))}createError(e,t,n,r,i){this._loop=!1,this._errored=!0;let a=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(a,this.createError),a.code=i,a[s]=r,a}}})),x=/* @__PURE__ */ t(((e,t)=>{let{Duplex:r}=n(`stream`),{randomFillSync:i}=n(`crypto`),{types:{isUint8Array:a}}=n(`util`),o=v(),{EMPTY_BUFFER:s,kWebSocket:c,NOOP:l}=h(),{isBlob:u,isValidStatusCode:d}=y(),{mask:f,toBuffer:p}=g(),m=Symbol(`kByteLength`),_=Buffer.alloc(4),b=8192,x,S=b;t.exports=class e{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=0,this.onerror=l,this[c]=void 0}static frame(e,t){let n,r=!1,a=2,o=!1;t.mask&&(n=t.maskBuffer||_,t.generateMask?t.generateMask(n):(S===b&&
5
5
  /* istanbul ignore else */
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./startup-profile-CrtCP-6-.mjs";export{e as analyseBundle};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{n as e,t}from"./state-DIiIGEtR.mjs";export{t as readState,e as updateState};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,r as t}from"./cf-BxsXrVeh.mjs";import{join as n}from"node:path";const r=t(()=>n(e(),`state.json`));function i(){return r.read()??{}}function a(e){let t=i();r.write({...t,...e,...e.telemetry===void 0?{}:{telemetry:{...t.telemetry,...e.telemetry}}})}export{a as n,i as t};
2
+ import{i as e,r as t}from"./cf-oRSQKirD.mjs";import{join as n}from"node:path";const r=t(()=>n(e(),`state.json`));function i(){return r.read()??{}}function a(e){let t=i();r.write({...t,...e,...e.telemetry===void 0?{}:{telemetry:{...t.telemetry,...e.telemetry}}})}export{a as n,i as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
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,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-RlgRrmbm.mjs";import{t as _}from"./cli-types-9oYmRTHJ.mjs";import{n as ee,t as te}from"./raw-fetch-B4NvWuZD.mjs";function v(e){return e.usage(`$0 stream keys create
2
+ import{t as e}from"./local-BcPM4I0s.mjs";import{i as t,n}from"./auth-CAWalgW0.mjs";import{a as r,t as i}from"./context-BBLtgdR1.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-CQqDtgmF.mjs";import{t as c}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-C8FyienX.mjs";import{t as _}from"./cli-types-9oYmRTHJ.mjs";import{n as ee,t as te}from"./raw-fetch-DbXN3SlE.mjs";function v(e){return e.usage(`$0 stream keys create
3
3
 
4
4
  Creates an RSA private key in PEM and JWK formats. Key files are only displayed once after creation. Keys are created, used, and deleted independently of videos, and every key can sign any video.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`create`,describe:`Create signing keys`,builder:v,handler:async t=>c({command:`stream keys create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf stream keys create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/keys`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Creating`,async()=>c.stream.keys.create({account_id:l}));a(u,{successLabel:`Created`})})};function b(e){return e.usage(`$0 stream keys delete <identifier>
5
5
 
@@ -8,7 +8,7 @@ Deletes signing keys and revokes all signed URLs generated with the key.`).posit
8
8
 
9
9
  Lists the video ID and creation date and time when a signing key was created.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List signing keys`,builder:S,handler:async t=>c({command:`stream keys list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf stream keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/keys`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.stream.keys.list({account_id:l}));a(u,{successLabel:`Loaded`})})},w={command:`keys`,describe:`Signing keys used to generate short-lived signed URLs for private video playback`,builder:e=>e.command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 stream live-inputs create
10
10
 
11
- Creates a live input, and returns credentials that you or your users can use to stream live video to Cloudflare Stream.`).option(`idempotency-key`,{type:`string`,description:`Prevents duplicate live inputs from being created when retrying this request. The key is scoped to the account, may contain up to 255 bytes, and expires six hours after the live input is created. Reusing a key for a deleted input before expiry returns a 409 Conflict response.`}).option(`default-creator`,{type:`string`,description:`Sets the creator ID asssociated with this live input.`}).option(`delete-recording-after-days`,{type:`number`,description:"Indicates the number of days after which the live inputs recordings will be deleted. When a stream completes and the recording is ready, the value is used to calculate a scheduled deletion date for that recording. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion."}).option(`enabled`,{type:`boolean`,description:`Indicates whether the live input is enabled and can accept streams.`,default:!0}).option(`prefer-low-latency`,{type:`boolean`,description:`When enabled, the live stream is delivered using Low-Latency HLS (LL-HLS), reducing glass-to-glass latency for viewers at the cost of reduced player compatibility.`,default:!1}).option(`recording-allowed-origins`,{type:`string`,array:!0,description:"Lists the origins allowed to display videos created with this input. Enter allowed origin domains in an array and use `*` for wildcard subdomains. An empty array allows videos to be viewed on any origin."}).option(`recording-hide-live-viewer-count`,{type:`boolean`,description:"Disables reporting the number of live viewers when this property is set to `true`."}).option(`recording-mode`,{type:`string`,description:"Specifies the recording behavior for the live input. Set this value to `off` to prevent a recording. Set the value to `automatic` to begin a recording and transition to on-demand after Stream Live stops receiving input.",choices:[`off`,`automatic`]}).option(`recording-require-signed-urls`,{type:`boolean`,description:"Indicates if a video using the live input has the `requireSignedURLs` property set. Also enforces access controls on any video recording of the livestream with the live input."}).option(`recording-timeout-seconds`,{type:`number`,description:"Determines the amount of time a live input configured in `automatic` mode should wait before a recording transitions from live to on-demand. `0` is recommended for most use cases and indicates the platform default should be used."}).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 E={command:`create`,describe:`Create a live input`,builder:T,handler:async d=>c({command:`stream live-inputs create`,classification:{safeFlags:[`enabled`,`prefer-low-latency`,`recording-hide-live-viewer-count`,`recording-mode`,`recording-require-signed-urls`,`dry-run`]}},d,async()=>{let c={};if(d[`idempotency-key`]!==void 0&&(c[`Idempotency-Key`]=String(d[`idempotency-key`])),d.dryRun){let e=await r();o({command:`cf stream live-inputs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/live_inputs`,pathParams:{},bodyKind:`json`,body:d.body===void 0?f({defaultCreator:p(d[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:d[`delete-recording-after-days`],enabled:d.enabled,preferLowLatency:d[`prefer-low-latency`],recording:{allowedOrigins:d[`recording-allowed-origins`],hideLiveViewerCount:d[`recording-hide-live-viewer-count`],mode:p(d[`recording-mode`],`recording-mode`,`text`),requireSignedURLs:d[`recording-require-signed-urls`],timeoutSeconds:d[`recording-timeout-seconds`]}}):u(d.body)});return}let m=await n(d),h=d.local?e:await i();if(d.accountId=h,d.body){let e=u(d.body),n=await s(`Creating`,async()=>t(m,`POST`,`/accounts/${h}/stream/live_inputs`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Created`});return}let g={};d[`default-creator`]!==void 0&&l(g,[`defaultCreator`],p(d[`default-creator`],`default-creator`,`text`)),d[`delete-recording-after-days`]!==void 0&&l(g,[`deleteRecordingAfterDays`],d[`delete-recording-after-days`]),d.enabled!==void 0&&l(g,[`enabled`],d.enabled),d[`prefer-low-latency`]!==void 0&&l(g,[`preferLowLatency`],d[`prefer-low-latency`]),d[`recording-allowed-origins`]!==void 0&&l(g,[`recording`,`allowedOrigins`],d[`recording-allowed-origins`]),d[`recording-hide-live-viewer-count`]!==void 0&&l(g,[`recording`,`hideLiveViewerCount`],d[`recording-hide-live-viewer-count`]),d[`recording-mode`]!==void 0&&l(g,[`recording`,`mode`],p(d[`recording-mode`],`recording-mode`,`text`)),d[`recording-require-signed-urls`]!==void 0&&l(g,[`recording`,`requireSignedURLs`],d[`recording-require-signed-urls`]),d[`recording-timeout-seconds`]!==void 0&&l(g,[`recording`,`timeoutSeconds`],d[`recording-timeout-seconds`]);let _=await s(`Creating`,async()=>t(m,`POST`,`/accounts/${h}/stream/live_inputs`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0}));a(_,{successLabel:`Created`})})};function D(e){return e.usage(`$0 stream live-inputs delete <live-input-identifier>
11
+ Creates a live input, and returns credentials that you or your users can use to stream live video to Cloudflare Stream.`).option(`idempotency-key`,{type:`string`,description:`Prevents duplicate live inputs from being created when retrying this request. The key is scoped to the account, may contain up to 255 bytes, and expires six hours after the live input is created. Reusing a key for a deleted input before expiry returns a 409 Conflict response.`}).option(`default-creator`,{type:`string`,description:`Sets the creator ID asssociated with this live input.`}).option(`delete-recording-after-days`,{type:`number`,description:"Indicates the number of days after which the live inputs recordings will be deleted. When a stream completes and the recording is ready, the value is used to calculate a scheduled deletion date for that recording. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion."}).option(`enabled`,{type:`boolean`,description:`Indicates whether the live input is enabled and can accept streams.`,default:!0}).option(`prefer-low-latency`,{type:`boolean`,description:`When enabled, the live stream is delivered using Low-Latency HLS (LL-HLS), reducing glass-to-glass latency for viewers at the cost of reduced player compatibility.`,default:!1}).option(`recording-allowed-origins`,{type:`string`,array:!0,description:"Lists the origins allowed to display videos created with this input. Enter allowed origin domains in an array and use `*` for wildcard subdomains. An empty array allows videos to be viewed on any origin."}).option(`recording-hide-live-viewer-count`,{type:`boolean`,description:"Disables reporting the number of live viewers when this property is set to `true`."}).option(`recording-mode`,{type:`string`,description:"Specifies the recording behavior for the live input. Set this value to `off` to prevent a recording. Set the value to `automatic` to begin a recording and transition to on-demand after Stream Live stops receiving input.",choices:[`off`,`automatic`]}).coerce(`recording-mode`,e=>p(e,`recording-mode`,`text`)).option(`recording-require-signed-urls`,{type:`boolean`,description:"Indicates if a video using the live input has the `requireSignedURLs` property set. Also enforces access controls on any video recording of the livestream with the live input."}).option(`recording-timeout-seconds`,{type:`number`,description:"Determines the amount of time a live input configured in `automatic` mode should wait before a recording transitions from live to on-demand. `0` is recommended for most use cases and indicates the platform default should be used."}).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 E={command:`create`,describe:`Create a live input`,builder:T,handler:async d=>c({command:`stream live-inputs create`,classification:{safeFlags:[`enabled`,`prefer-low-latency`,`recording-hide-live-viewer-count`,`recording-mode`,`recording-require-signed-urls`,`dry-run`]}},d,async()=>{let c={};if(d[`idempotency-key`]!==void 0&&(c[`Idempotency-Key`]=String(d[`idempotency-key`])),d.dryRun){let e=await r();o({command:`cf stream live-inputs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/live_inputs`,pathParams:{},bodyKind:`json`,body:d.body===void 0?f({defaultCreator:p(d[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:d[`delete-recording-after-days`],enabled:d.enabled,preferLowLatency:d[`prefer-low-latency`],recording:{allowedOrigins:d[`recording-allowed-origins`],hideLiveViewerCount:d[`recording-hide-live-viewer-count`],mode:d[`recording-mode`],requireSignedURLs:d[`recording-require-signed-urls`],timeoutSeconds:d[`recording-timeout-seconds`]}}):u(d.body)});return}let m=await n(d),h=d.local?e:await i();if(d.accountId=h,d.body){let e=u(d.body),n=await s(`Creating`,async()=>t(m,`POST`,`/accounts/${h}/stream/live_inputs`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Created`});return}let g={};d[`default-creator`]!==void 0&&l(g,[`defaultCreator`],p(d[`default-creator`],`default-creator`,`text`)),d[`delete-recording-after-days`]!==void 0&&l(g,[`deleteRecordingAfterDays`],d[`delete-recording-after-days`]),d.enabled!==void 0&&l(g,[`enabled`],d.enabled),d[`prefer-low-latency`]!==void 0&&l(g,[`preferLowLatency`],d[`prefer-low-latency`]),d[`recording-allowed-origins`]!==void 0&&l(g,[`recording`,`allowedOrigins`],d[`recording-allowed-origins`]),d[`recording-hide-live-viewer-count`]!==void 0&&l(g,[`recording`,`hideLiveViewerCount`],d[`recording-hide-live-viewer-count`]),d[`recording-mode`]!==void 0&&l(g,[`recording`,`mode`],d[`recording-mode`]),d[`recording-require-signed-urls`]!==void 0&&l(g,[`recording`,`requireSignedURLs`],d[`recording-require-signed-urls`]),d[`recording-timeout-seconds`]!==void 0&&l(g,[`recording`,`timeoutSeconds`],d[`recording-timeout-seconds`]);let _=await s(`Creating`,async()=>t(m,`POST`,`/accounts/${h}/stream/live_inputs`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0}));a(_,{successLabel:`Created`})})};function D(e){return e.usage(`$0 stream live-inputs delete <live-input-identifier>
12
12
 
13
13
  Permanently delete a live input, making it inaccessible and blocking current and future broadcasts to it. Existing recordings will be retained.`).positional(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const O={command:`delete <live-input-identifier>`,describe:`Delete a live input`,builder:D,handler:async t=>c({command:`stream live-inputs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf stream live-inputs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/live_inputs/${t[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(t[`live-input-identifier`]))}`,pathParams:{"live-input-identifier":String(t[`live-input-identifier`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force,message:`Permanently delete this live input? It cannot be recreated.`})){process.stderr.write(`Aborted.
14
14
  `);return}let u=await s(`Deleting`,async()=>c.stream.liveInputs.delete({account_id:l,live_input_identifier:t[`live-input-identifier`]}));a(u,{successLabel:`Deleted`})})};function k(e){return e.usage(`$0 stream live-inputs disable <live-input-identifier>
@@ -34,7 +34,7 @@ Updates the state of an output.`).positional(`output-identifier`,{type:`string`,
34
34
  Rotates the credentials for a live input without changing its identifier. Old credentials are revoked, broadcasts using stale credentials are automatically disconnected shortly after rotation, and the response returns refreshed credentials.`).positional(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,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 q={command:`rotate-keys <live-input-identifier>`,describe:`Rotate keys for a live input`,builder:K,handler:async t=>c({command:`stream live-inputs rotate-keys`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf stream live-inputs rotate-keys`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/live_inputs/${t[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(t[`live-input-identifier`]))}/rotate_keys`,pathParams:{"live-input-identifier":String(t[`live-input-identifier`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force,message:`Rotate keys for this live input? Active broadcasts will be terminated. New broadcasts cannot start with outdated credentials.`})){process.stderr.write(`Aborted.
35
35
  `);return}let u=await s(`Deleting`,async()=>c.stream.liveInputs.rotateKeys({account_id:l,live_input_identifier:t[`live-input-identifier`]}));a(u,{successLabel:`Deleted`})})};function J(e){return e.usage(`$0 stream live-inputs update <live-input-identifier>
36
36
 
37
- Updates a specified live input.`).positional(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,demandOption:!0}).option(`default-creator`,{type:`string`,description:`Sets the creator ID asssociated with this live input.`}).option(`delete-recording-after-days`,{type:`number`,description:"Indicates the number of days after which the live inputs recordings will be deleted. When a stream completes and the recording is ready, the value is used to calculate a scheduled deletion date for that recording. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion."}).option(`enabled`,{type:`boolean`,description:`Indicates whether the live input is enabled and can accept streams.`}).option(`prefer-low-latency`,{type:`boolean`,description:`When enabled, the live stream is delivered using Low-Latency HLS (LL-HLS), reducing glass-to-glass latency for viewers at the cost of reduced player compatibility.`}).option(`recording-allowed-origins`,{type:`string`,array:!0,description:"Lists the origins allowed to display videos created with this input. Enter allowed origin domains in an array and use `*` for wildcard subdomains. An empty array allows videos to be viewed on any origin."}).option(`recording-hide-live-viewer-count`,{type:`boolean`,description:"Disables reporting the number of live viewers when this property is set to `true`."}).option(`recording-mode`,{type:`string`,description:"Specifies the recording behavior for the live input. Set this value to `off` to prevent a recording. Set the value to `automatic` to begin a recording and transition to on-demand after Stream Live stops receiving input.",choices:[`off`,`automatic`]}).option(`recording-require-signed-urls`,{type:`boolean`,description:"Indicates if a video using the live input has the `requireSignedURLs` property set. Also enforces access controls on any video recording of the livestream with the live input."}).option(`recording-timeout-seconds`,{type:`number`,description:"Determines the amount of time a live input configured in `automatic` mode should wait before a recording transitions from live to on-demand. `0` is recommended for most use cases and indicates the platform default should be used."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Y={command:`update <live-input-identifier>`,describe:`Update a live input`,builder:J,handler:async t=>c({command:`stream live-inputs update`,classification:{safeFlags:[`enabled`,`prefer-low-latency`,`recording-hide-live-viewer-count`,`recording-mode`,`recording-require-signed-urls`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf stream live-inputs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/live_inputs/${t[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(t[`live-input-identifier`]))}`,pathParams:{"live-input-identifier":String(t[`live-input-identifier`]??``)},bodyKind:`json`,body:t.body===void 0?f({defaultCreator:p(t[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:t[`delete-recording-after-days`],enabled:t.enabled,preferLowLatency:t[`prefer-low-latency`],recording:{allowedOrigins:t[`recording-allowed-origins`],hideLiveViewerCount:t[`recording-hide-live-viewer-count`],mode:p(t[`recording-mode`],`recording-mode`,`text`),requireSignedURLs:t[`recording-require-signed-urls`],timeoutSeconds:t[`recording-timeout-seconds`]}}):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(`Updating`,async()=>c.stream.liveInputs.update({...e,account_id:l,live_input_identifier:t[`live-input-identifier`]}));a(n,{successLabel:`Updated`});return}let d=f({defaultCreator:p(t[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:t[`delete-recording-after-days`],enabled:t.enabled,preferLowLatency:t[`prefer-low-latency`],recording:{allowedOrigins:t[`recording-allowed-origins`],hideLiveViewerCount:t[`recording-hide-live-viewer-count`],mode:p(t[`recording-mode`],`recording-mode`,`text`),requireSignedURLs:t[`recording-require-signed-urls`],timeoutSeconds:t[`recording-timeout-seconds`]}}),m=await s(`Updating`,async()=>c.stream.liveInputs.update({...d,account_id:l,live_input_identifier:t[`live-input-identifier`]}));a(m,{successLabel:`Updated`})})},X={command:`live-inputs`,describe:`Enable and disable live input streams`,builder:e=>e.command(E).command(O).command(A).command(M).command(P).command(I).command(q).command(Y).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Z(e){return e.usage(`$0 stream storage-usage
37
+ Updates a specified live input.`).positional(`live-input-identifier`,{type:`string`,description:`A unique identifier for a live input.`,demandOption:!0}).option(`default-creator`,{type:`string`,description:`Sets the creator ID asssociated with this live input.`}).option(`delete-recording-after-days`,{type:`number`,description:"Indicates the number of days after which the live inputs recordings will be deleted. When a stream completes and the recording is ready, the value is used to calculate a scheduled deletion date for that recording. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion."}).option(`enabled`,{type:`boolean`,description:`Indicates whether the live input is enabled and can accept streams.`}).option(`prefer-low-latency`,{type:`boolean`,description:`When enabled, the live stream is delivered using Low-Latency HLS (LL-HLS), reducing glass-to-glass latency for viewers at the cost of reduced player compatibility.`}).option(`recording-allowed-origins`,{type:`string`,array:!0,description:"Lists the origins allowed to display videos created with this input. Enter allowed origin domains in an array and use `*` for wildcard subdomains. An empty array allows videos to be viewed on any origin."}).option(`recording-hide-live-viewer-count`,{type:`boolean`,description:"Disables reporting the number of live viewers when this property is set to `true`."}).option(`recording-mode`,{type:`string`,description:"Specifies the recording behavior for the live input. Set this value to `off` to prevent a recording. Set the value to `automatic` to begin a recording and transition to on-demand after Stream Live stops receiving input.",choices:[`off`,`automatic`]}).coerce(`recording-mode`,e=>p(e,`recording-mode`,`text`)).option(`recording-require-signed-urls`,{type:`boolean`,description:"Indicates if a video using the live input has the `requireSignedURLs` property set. Also enforces access controls on any video recording of the livestream with the live input."}).option(`recording-timeout-seconds`,{type:`number`,description:"Determines the amount of time a live input configured in `automatic` mode should wait before a recording transitions from live to on-demand. `0` is recommended for most use cases and indicates the platform default should be used."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Y={command:`update <live-input-identifier>`,describe:`Update a live input`,builder:J,handler:async t=>c({command:`stream live-inputs update`,classification:{safeFlags:[`enabled`,`prefer-low-latency`,`recording-hide-live-viewer-count`,`recording-mode`,`recording-require-signed-urls`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf stream live-inputs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/live_inputs/${t[`live-input-identifier`]==null?`<live-input-identifier>`:encodeURIComponent(String(t[`live-input-identifier`]))}`,pathParams:{"live-input-identifier":String(t[`live-input-identifier`]??``)},bodyKind:`json`,body:t.body===void 0?f({defaultCreator:p(t[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:t[`delete-recording-after-days`],enabled:t.enabled,preferLowLatency:t[`prefer-low-latency`],recording:{allowedOrigins:t[`recording-allowed-origins`],hideLiveViewerCount:t[`recording-hide-live-viewer-count`],mode:t[`recording-mode`],requireSignedURLs:t[`recording-require-signed-urls`],timeoutSeconds:t[`recording-timeout-seconds`]}}):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(`Updating`,async()=>c.stream.liveInputs.update({...e,account_id:l,live_input_identifier:t[`live-input-identifier`]}));a(n,{successLabel:`Updated`});return}let d=f({defaultCreator:p(t[`default-creator`],`default-creator`,`text`),deleteRecordingAfterDays:t[`delete-recording-after-days`],enabled:t.enabled,preferLowLatency:t[`prefer-low-latency`],recording:{allowedOrigins:t[`recording-allowed-origins`],hideLiveViewerCount:t[`recording-hide-live-viewer-count`],mode:t[`recording-mode`],requireSignedURLs:t[`recording-require-signed-urls`],timeoutSeconds:t[`recording-timeout-seconds`]}}),m=await s(`Updating`,async()=>c.stream.liveInputs.update({...d,account_id:l,live_input_identifier:t[`live-input-identifier`]}));a(m,{successLabel:`Updated`})})},X={command:`live-inputs`,describe:`Enable and disable live input streams`,builder:e=>e.command(E).command(O).command(A).command(M).command(P).command(I).command(q).command(Y).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Z(e){return e.usage(`$0 stream storage-usage
38
38
 
39
39
  Returns information about an account's storage use.`).option(`creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`storage-usage`,describe:`Storage use`,builder:Z,handler:async t=>c({command:`stream storage-usage`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={creator:t.creator};if(t.dryRun){let e=await r();o({command:`cf stream storage-usage`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/stream/storage-usage`,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.stream.storageUsage({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function ne(e){return e.usage(`$0 stream videos audio-tracks copy <identifier>
40
40
 
@@ -1,4 +1,4 @@
1
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,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 submit create
2
+ import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,t as r}from"./context-BBLtgdR1.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-CQqDtgmF.mjs";import{t as s}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";function c(e){return e.usage(`$0 submit create
3
3
 
4
4
  Return new URL submissions`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`create`,describe:`Create new URL submissions`,builder:c,handler:async c=>s({command:`submit create`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf submit create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/brand-protection/submit`,pathParams:{},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Creating`,async()=>s.submit.create({account_id:l}));i(u,{successLabel:`Created`})})},u={command:`submit`,describe:`submit`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{u as default};
@@ -1,4 +1,4 @@
1
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,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{t as c}from"./cli-types-9oYmRTHJ.mjs";function l(e){return e.usage(`$0 tags resources list
2
+ import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,t as r}from"./context-BBLtgdR1.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-CQqDtgmF.mjs";import{t as s}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{t as c}from"./cli-types-9oYmRTHJ.mjs";function l(e){return e.usage(`$0 tags resources list
3
3
 
4
4
  Lists all tagged resources for an account.`).option(`type`,{type:`string`,description:`Filter by resource type. Can be repeated to filter by multiple types (OR logic). Example: ?type=zone&type=worker`}).option(`name`,{type:`string`,description:`Filter by resource name. Performs a case-insensitive substring match. Example: ?name=my-zone`}).option(`id`,{type:`string`,description:`Filter by resource ID. Can be repeated up to 50 times to filter by multiple IDs. Example: ?id=abc&id=def`}).option(`case-insensitive`,{type:`boolean`,description:"Match `tag` keys and values case-insensitively. Stored casing is unchanged. Example: ?tag=environment=production&case_insensitive=true"}).option(`tag`,{type:`string`,description:"Filter resources by tag criteria. This parameter can be repeated multiple times, with AND logic between parameters.\n\nSupported syntax:\n- **Key-only**: `tag=<key>` - Resource must have the tag key (e.g., `tag=production`)\n- **Key-value**: `tag=<key>=<value>` - Resource must have the tag with specific value (e.g., `tag=env=prod`)\n- **Multiple values (OR)**: `tag=<key>=<v1>,<v2>` - Resource must have tag with any of the values (e.g., `tag=env=prod,staging`)\n- **Negate key-only**: `tag=!<key>` - Resource must not have the tag key (e.g., `tag=!archived`)\n- **Negate key-value**: `tag=<key>!=<value>` - Resource must not have the tag with specific value (e.g., `tag=region!=us-west-1`)\n\nMultiple tag parameters are combined with AND logic."}).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 u={command:`list`,describe:`List tagged resources`,builder:c(l),handler:async c=>s({command:`tags resources list`,classification:{safeFlags:[`case-insensitive`,`dry-run`]}},c,async()=>{let s={type:c.type,name:c.name,id:c.id,case_insensitive:c[`case-insensitive`],tag:c.tag,cursor:c.cursor};if(c.dryRun){let e=await n();a({command:`cf tags resources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tags/resources`,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.tags.resources.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})},d={command:`resources`,describe:`Operations for resources`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},f={command:`tags`,describe:`tags`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f as default};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import"./run-CW2Cgi0S.mjs";const e=`unknown command`;export{e as t};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a as e,n as t,r as n,t as r}from"./lifecycle-oud60haK.mjs";import{a as i,c as a,d as o,f as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g}from"./run-BvHwWWUX.mjs";import{t as _}from"./telemetry-BsYO3nxG.mjs";export{i as TELEMETRY_ENV_VAR,f as TELEMETRY_POLICY_DATE,_ as UNKNOWN_COMMAND_EVENT,r as allTelemetryDispatchesSettled,t as beginTelemetryRun,h as getBannerLastShown,a as getDeviceId,c as getTelemetryDispatcher,l as getTelemetryFromEnv,o as isFirstUsage,n as markCommandReported,s as resolveTelemetry,g as runWithTelemetry,m as sanitizeArgs,p as setBannerLastShown,u as setTelemetryPermission,e as wasCommandReported,d as withTelemetry};
2
+ import{a as e,n as t,r as n,t as r}from"./lifecycle-oud60haK.mjs";import{a as i,c as a,d as o,f as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g}from"./run-CW2Cgi0S.mjs";import{t as _}from"./telemetry-0Y5hAtCX.mjs";export{i as TELEMETRY_ENV_VAR,f as TELEMETRY_POLICY_DATE,_ as UNKNOWN_COMMAND_EVENT,r as allTelemetryDispatchesSettled,t as beginTelemetryRun,h as getBannerLastShown,a as getDeviceId,c as getTelemetryDispatcher,l as getTelemetryFromEnv,o as isFirstUsage,n as markCommandReported,s as resolveTelemetry,g as runWithTelemetry,m as sanitizeArgs,p as setBannerLastShown,u as setTelemetryPermission,e as wasCommandReported,d as withTelemetry};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-CGLsxbc6.mjs";import{t}from"./output-BOe-3AQG.mjs";import{t as n}from"./dry-run-DRj2_uV3.mjs";import{t as r}from"./progress-BtkTVcHI.mjs";import{t as i}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";function a(e){return e.usage(`$0 tenant account-type list
2
+ import{n as e}from"./auth-CAWalgW0.mjs";import{t}from"./output-BOe-3AQG.mjs";import{t as n}from"./dry-run-DRj2_uV3.mjs";import{t as r}from"./progress-CQqDtgmF.mjs";import{t as i}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";function a(e){return e.usage(`$0 tenant account-type list
3
3
 
4
4
  Lists the account types this tenant is allowed to provision.`).option(`tenant-id`,{type:`string`,description:`The ID of the tenant whose available account types to list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const o={command:`list`,describe:`List tenant account types`,builder:a,handler:async a=>i({command:`tenant account-type list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf tenant account-type list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${a[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(a[`tenant-id`]))}/account_types`,pathParams:{"tenant-id":String(a[`tenant-id`]??``)},bodyKind:`none`});return}let i=await e(a),o=await r(`Loading`,async()=>i.tenant.accountType.list({tenant_id:a[`tenant-id`]}));t(o,{successLabel:`Loaded`})})},s={command:`account-type`,describe:`Operations for account-type`,builder:e=>e.command(o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function c(e){return e.usage(`$0 tenant account list
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-CGLsxbc6.mjs";import{t}from"./output-BOe-3AQG.mjs";import{t as n}from"./dry-run-DRj2_uV3.mjs";import{t as r}from"./progress-BtkTVcHI.mjs";import{t as i}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as a,t as o}from"./body-parser-DkHKPkJ7.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{a as c,n as l}from"./prompt-RlgRrmbm.mjs";function u(e){return e.usage(`$0 tenant-custom-nameservers create <tenant-tag>
2
+ import{n as e}from"./auth-CAWalgW0.mjs";import{t}from"./output-BOe-3AQG.mjs";import{t as n}from"./dry-run-DRj2_uV3.mjs";import{t as r}from"./progress-CQqDtgmF.mjs";import{t as i}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as a,t as o}from"./body-parser-DkHKPkJ7.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{a as c,n as l}from"./prompt-C8FyienX.mjs";function u(e){return e.usage(`$0 tenant-custom-nameservers create <tenant-tag>
3
3
 
4
4
  Adds a custom nameserver for a tenant.`).positional(`tenant-tag`,{type:`string`,description:`Tenant identifier tag.`,demandOption:!0}).option(`ns-name`,{type:`string`,description:`The FQDN of the name server.`}).option(`ns-set`,{type:`number`,description:`The number of the set that this name server belongs to.`,default:1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const d={command:`create <tenant-tag>`,describe:`Add Tenant Custom Nameserver`,builder:u,handler:async l=>i({command:`tenant-custom-nameservers create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){n({command:`cf tenant-custom-nameservers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/tenants/${l[`tenant-tag`]==null?`<tenant-tag>`:encodeURIComponent(String(l[`tenant-tag`]))}/custom_ns`,pathParams:{"tenant-tag":String(l[`tenant-tag`]??``)},bodyKind:`json`,body:l.body===void 0?o({ns_name:s(l[`ns-name`],`ns-name`,`text`),ns_set:l[`ns-set`]}):a(l.body)});return}let i=await e(l);if(l.body){let e=a(l.body),n=await r(`Creating`,async()=>i.tenantCustomNameservers.create({body:e,tenant_tag:l[`tenant-tag`]}));t(n,{successLabel:`Created`});return}l[`ns-name`]===void 0&&(l[`ns-name`]=await c(`ns-name`,`The FQDN of the name server.`));let u=o({ns_name:s(l[`ns-name`],`ns-name`,`text`),ns_set:l[`ns-set`]}),d=await r(`Creating`,async()=>i.tenantCustomNameservers.create({body:u,tenant_tag:l[`tenant-tag`]}));t(d,{successLabel:`Created`})})};function f(e){return e.usage(`$0 tenant-custom-nameservers delete <custom-ns-id>
5
5
 
@@ -1,29 +1,29 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./lazy-command-BDiIwpss.mjs";import{t}from"./local-DlT72Xpn.mjs";import{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{n 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";import{t as m}from"./cli-types-9oYmRTHJ.mjs";function h(e){return e.usage(`$0 tunnels config get <tunnel-id>
2
+ import{t as e}from"./lazy-command-CDWwCsD2.mjs";import{t}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as n}from"./local-BcPM4I0s.mjs";import{n as r}from"./auth-CAWalgW0.mjs";import{a as i,t as a}from"./context-BBLtgdR1.mjs";import{t as o}from"./output-BOe-3AQG.mjs";import{t as s}from"./dry-run-DRj2_uV3.mjs";import{t as c}from"./progress-CQqDtgmF.mjs";import{t as l}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-C8FyienX.mjs";import{t as h}from"./cli-types-9oYmRTHJ.mjs";function g(e){return e.usage(`$0 tunnels config get <tunnel-id>
3
3
 
4
- Retrieves the configuration for a remotely managed Cloudflare Tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <tunnel-id>`,describe:`Get Tunnel configuration`,builder:h,handler:async e=>c({command:`tunnels config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf tunnels config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.tunnels.config.get({account_id:l,tunnel_id:e[`tunnel-id`]}));a(u,{successLabel:`Loaded`})})};function _(e){return e.usage(`$0 tunnels config update <tunnel-id>
4
+ Retrieves the configuration for a remotely managed Cloudflare Tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get <tunnel-id>`,describe:`Get Tunnel configuration`,builder:g,handler:async e=>l({command:`tunnels config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf tunnels config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await r(e),l=e.local?n:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.tunnels.config.get({account_id:l,tunnel_id:e[`tunnel-id`]}));o(u,{successLabel:`Loaded`})})};function v(e){return e.usage(`$0 tunnels config update <tunnel-id>
5
5
 
6
6
  Replaces the configuration for a remotely managed Cloudflare Tunnel, including its ingress rules and origin request settings.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`config-origin-request-access-aud-tag`,{type:`string`,array:!0,description:`Access applications that are allowed to reach this hostname for this Tunnel. Audience tags can be identified in the dashboard or via the List Access policies API.`}).option(`config-origin-request-access-required`,{type:`boolean`,description:`Deny traffic that has not fulfilled Access authorization.`}).option(`config-origin-request-access-team-name`,{type:`string`,description:`The config.originRequest.access.teamName field`}).option(`config-origin-request-ca-pool`,{type:`string`,description:`Path to the certificate authority (CA) for the certificate of your origin. This option should be used only if your certificate is not signed by Cloudflare.`}).option(`config-origin-request-connect-timeout`,{type:`number`,description:`Timeout for establishing a new TCP connection to your origin server. This excludes the time taken to establish TLS, which is controlled by tlsTimeout.`}).option(`config-origin-request-disable-chunked-encoding`,{type:`boolean`,description:`Disables chunked transfer encoding. Useful if you are running a WSGI server.`}).option(`config-origin-request-http2origin`,{type:`boolean`,description:`Attempt to connect to origin using HTTP2. Origin must be configured as https.`}).option(`config-origin-request-http-host-header`,{type:`string`,description:`Sets the HTTP Host header on requests sent to the local service.`}).option(`config-origin-request-keep-alive-connections`,{type:`number`,description:`Maximum number of idle keepalive connections between Tunnel and your origin. This does not restrict the total number of concurrent connections.`}).option(`config-origin-request-keep-alive-timeout`,{type:`number`,description:`Timeout after which an idle keepalive connection can be discarded.`}).option(`config-origin-request-match-snito-host`,{type:`boolean`,description:`Auto configure the Hostname on the origin server certificate.`}).option(`config-origin-request-no-happy-eyeballs`,{type:`boolean`,description:`Disable the “happy eyeballs” algorithm for IPv4/IPv6 fallback if your local network has misconfigured one of the protocols.`}).option(`config-origin-request-no-tlsverify`,{type:`boolean`,description:`Disables TLS verification of the certificate presented by your origin. Will allow any certificate from the origin to be accepted.`}).option(`config-origin-request-origin-server-name`,{type:`string`,description:`Hostname that cloudflared should expect from your origin server certificate.`}).option(`config-origin-request-proxy-type`,{type:`string`,description:`cloudflared starts a proxy server to translate HTTP traffic into TCP when proxying, for example, SSH or RDP. This configures what type of proxy will be started. Valid options are: "" for the regular proxy and "socks" for a SOCKS5 proxy.
7
- `}).option(`config-origin-request-tcp-keep-alive`,{type:`number`,description:`The timeout after which a TCP keepalive packet is sent on a connection between Tunnel and the origin server.`}).option(`config-origin-request-tls-timeout`,{type:`number`,description:`Timeout for completing a TLS handshake to your origin server, if you have chosen to connect Tunnel to an HTTPS server.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`config-origin-request-access-aud-tag`,`config-origin-request-access-required`,`config-origin-request-access-team-name`,`config-origin-request-ca-pool`,`config-origin-request-connect-timeout`,`config-origin-request-disable-chunked-encoding`,`config-origin-request-http2origin`,`config-origin-request-http-host-header`,`config-origin-request-keep-alive-connections`,`config-origin-request-keep-alive-timeout`,`config-origin-request-match-snito-host`,`config-origin-request-no-happy-eyeballs`,`config-origin-request-no-tlsverify`,`config-origin-request-origin-server-name`,`config-origin-request-proxy-type`,`config-origin-request-tcp-keep-alive`,`config-origin-request-tls-timeout`].some(t=>e[t]!==void 0)){let t=[`config-origin-request-access-aud-tag`,`config-origin-request-access-team-name`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --config-* flag is set`)}return!0})}const v={command:`update <tunnel-id>`,describe:`Update Tunnel configuration`,builder:_,handler:async e=>c({command:`tunnels config update`,classification:{safeFlags:[`config-origin-request-access-required`,`config-origin-request-disable-chunked-encoding`,`config-origin-request-http2origin`,`config-origin-request-match-snito-host`,`config-origin-request-no-happy-eyeballs`,`config-origin-request-no-tlsverify`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf tunnels config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({config:{originRequest:{access:{audTag:e[`config-origin-request-access-aud-tag`],required:e[`config-origin-request-access-required`],teamName:d(e[`config-origin-request-access-team-name`],`config-origin-request-access-team-name`,`text`)},caPool:d(e[`config-origin-request-ca-pool`],`config-origin-request-ca-pool`,`text`),connectTimeout:e[`config-origin-request-connect-timeout`],disableChunkedEncoding:e[`config-origin-request-disable-chunked-encoding`],http2Origin:e[`config-origin-request-http2origin`],httpHostHeader:d(e[`config-origin-request-http-host-header`],`config-origin-request-http-host-header`,`text`),keepAliveConnections:e[`config-origin-request-keep-alive-connections`],keepAliveTimeout:e[`config-origin-request-keep-alive-timeout`],matchSNItoHost:e[`config-origin-request-match-snito-host`],noHappyEyeballs:e[`config-origin-request-no-happy-eyeballs`],noTLSVerify:e[`config-origin-request-no-tlsverify`],originServerName:d(e[`config-origin-request-origin-server-name`],`config-origin-request-origin-server-name`,`text`),proxyType:d(e[`config-origin-request-proxy-type`],`config-origin-request-proxy-type`,`text`),tcpKeepAlive:e[`config-origin-request-tcp-keep-alive`],tlsTimeout:e[`config-origin-request-tls-timeout`]}}}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.tunnels.config.update({...t,account_id:f,tunnel_id:e[`tunnel-id`]}));a(n,{successLabel:`Updated`});return}let p=u({config:{originRequest:{access:{audTag:e[`config-origin-request-access-aud-tag`],required:e[`config-origin-request-access-required`],teamName:d(e[`config-origin-request-access-team-name`],`config-origin-request-access-team-name`,`text`)},caPool:d(e[`config-origin-request-ca-pool`],`config-origin-request-ca-pool`,`text`),connectTimeout:e[`config-origin-request-connect-timeout`],disableChunkedEncoding:e[`config-origin-request-disable-chunked-encoding`],http2Origin:e[`config-origin-request-http2origin`],httpHostHeader:d(e[`config-origin-request-http-host-header`],`config-origin-request-http-host-header`,`text`),keepAliveConnections:e[`config-origin-request-keep-alive-connections`],keepAliveTimeout:e[`config-origin-request-keep-alive-timeout`],matchSNItoHost:e[`config-origin-request-match-snito-host`],noHappyEyeballs:e[`config-origin-request-no-happy-eyeballs`],noTLSVerify:e[`config-origin-request-no-tlsverify`],originServerName:d(e[`config-origin-request-origin-server-name`],`config-origin-request-origin-server-name`,`text`),proxyType:d(e[`config-origin-request-proxy-type`],`config-origin-request-proxy-type`,`text`),tcpKeepAlive:e[`config-origin-request-tcp-keep-alive`],tlsTimeout:e[`config-origin-request-tls-timeout`]}}}),m=await s(`Updating`,async()=>c.tunnels.config.update({...p,account_id:f,tunnel_id:e[`tunnel-id`]}));a(m,{successLabel:`Updated`})})},y={command:`config`,describe:`Operations for config`,builder:e=>e.command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 tunnels connections cleanup <tunnel-id>
7
+ `}).option(`config-origin-request-tcp-keep-alive`,{type:`number`,description:`The timeout after which a TCP keepalive packet is sent on a connection between Tunnel and the origin server.`}).option(`config-origin-request-tls-timeout`,{type:`number`,description:`Timeout for completing a TLS handshake to your origin server, if you have chosen to connect Tunnel to an HTTPS server.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`config-origin-request-access-aud-tag`,`config-origin-request-access-required`,`config-origin-request-access-team-name`,`config-origin-request-ca-pool`,`config-origin-request-connect-timeout`,`config-origin-request-disable-chunked-encoding`,`config-origin-request-http2origin`,`config-origin-request-http-host-header`,`config-origin-request-keep-alive-connections`,`config-origin-request-keep-alive-timeout`,`config-origin-request-match-snito-host`,`config-origin-request-no-happy-eyeballs`,`config-origin-request-no-tlsverify`,`config-origin-request-origin-server-name`,`config-origin-request-proxy-type`,`config-origin-request-tcp-keep-alive`,`config-origin-request-tls-timeout`].some(t=>e[t]!==void 0)){let t=[`config-origin-request-access-aud-tag`,`config-origin-request-access-team-name`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --config-* flag is set`)}return!0})}const y={command:`update <tunnel-id>`,describe:`Update Tunnel configuration`,builder:v,handler:async e=>l({command:`tunnels config update`,classification:{safeFlags:[`config-origin-request-access-required`,`config-origin-request-disable-chunked-encoding`,`config-origin-request-http2origin`,`config-origin-request-match-snito-host`,`config-origin-request-no-happy-eyeballs`,`config-origin-request-no-tlsverify`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf tunnels config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({config:{originRequest:{access:{audTag:e[`config-origin-request-access-aud-tag`],required:e[`config-origin-request-access-required`],teamName:f(e[`config-origin-request-access-team-name`],`config-origin-request-access-team-name`,`text`)},caPool:f(e[`config-origin-request-ca-pool`],`config-origin-request-ca-pool`,`text`),connectTimeout:e[`config-origin-request-connect-timeout`],disableChunkedEncoding:e[`config-origin-request-disable-chunked-encoding`],http2Origin:e[`config-origin-request-http2origin`],httpHostHeader:f(e[`config-origin-request-http-host-header`],`config-origin-request-http-host-header`,`text`),keepAliveConnections:e[`config-origin-request-keep-alive-connections`],keepAliveTimeout:e[`config-origin-request-keep-alive-timeout`],matchSNItoHost:e[`config-origin-request-match-snito-host`],noHappyEyeballs:e[`config-origin-request-no-happy-eyeballs`],noTLSVerify:e[`config-origin-request-no-tlsverify`],originServerName:f(e[`config-origin-request-origin-server-name`],`config-origin-request-origin-server-name`,`text`),proxyType:f(e[`config-origin-request-proxy-type`],`config-origin-request-proxy-type`,`text`),tcpKeepAlive:e[`config-origin-request-tcp-keep-alive`],tlsTimeout:e[`config-origin-request-tls-timeout`]}}}):u(e.body)});return}let t=await r(e),l=e.local?n:await a();if(e.accountId=l,e.body){let n=u(e.body),r=await c(`Updating`,async()=>t.tunnels.config.update({...n,account_id:l,tunnel_id:e[`tunnel-id`]}));o(r,{successLabel:`Updated`});return}let p=d({config:{originRequest:{access:{audTag:e[`config-origin-request-access-aud-tag`],required:e[`config-origin-request-access-required`],teamName:f(e[`config-origin-request-access-team-name`],`config-origin-request-access-team-name`,`text`)},caPool:f(e[`config-origin-request-ca-pool`],`config-origin-request-ca-pool`,`text`),connectTimeout:e[`config-origin-request-connect-timeout`],disableChunkedEncoding:e[`config-origin-request-disable-chunked-encoding`],http2Origin:e[`config-origin-request-http2origin`],httpHostHeader:f(e[`config-origin-request-http-host-header`],`config-origin-request-http-host-header`,`text`),keepAliveConnections:e[`config-origin-request-keep-alive-connections`],keepAliveTimeout:e[`config-origin-request-keep-alive-timeout`],matchSNItoHost:e[`config-origin-request-match-snito-host`],noHappyEyeballs:e[`config-origin-request-no-happy-eyeballs`],noTLSVerify:e[`config-origin-request-no-tlsverify`],originServerName:f(e[`config-origin-request-origin-server-name`],`config-origin-request-origin-server-name`,`text`),proxyType:f(e[`config-origin-request-proxy-type`],`config-origin-request-proxy-type`,`text`),tcpKeepAlive:e[`config-origin-request-tcp-keep-alive`],tlsTimeout:e[`config-origin-request-tls-timeout`]}}}),m=await c(`Updating`,async()=>t.tunnels.config.update({...p,account_id:l,tunnel_id:e[`tunnel-id`]}));o(m,{successLabel:`Updated`})})},b={command:`config`,describe:`Operations for config`,builder:e=>e.command(_).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.usage(`$0 tunnels connections cleanup <tunnel-id>
8
8
 
9
- Removes a connection (aka Cloudflare Tunnel Connector) from a Cloudflare Tunnel independently of its current state. If no connector id (client_id) is provided all connectors will be removed. We recommend running this command after rotating tokens.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`client-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`}).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 x={command:`cleanup <tunnel-id>`,describe:`Clean up Cloudflare Tunnel connections`,builder:b,handler:async e=>c({command:`tunnels connections cleanup`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let c={client_id:e[`client-id`]};if(e.dryRun){let t=await r();o({command:`cf tunnels connections cleanup`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/connections`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();if(e.accountId=u,!await p({force:!!e.force,message:`This operation removes Cloudflare Tunnel connections.`})){process.stderr.write(`Aborted.
10
- `);return}let d=await s(`Deleting`,async()=>l.tunnels.connections.cleanup({account_id:u,tunnel_id:e[`tunnel-id`],...c}));a(d,{successLabel:`Deleted`})})};function S(e){return e.usage(`$0 tunnels connections list
9
+ Removes a connection (aka Cloudflare Tunnel Connector) from a Cloudflare Tunnel independently of its current state. If no connector id (client_id) is provided all connectors will be removed. We recommend running this command after rotating tokens.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`client-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`}).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 S={command:`cleanup <tunnel-id>`,describe:`Clean up Cloudflare Tunnel connections`,builder:x,handler:async e=>l({command:`tunnels connections cleanup`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={client_id:e[`client-id`]};if(e.dryRun){let n=await i();s({command:`cf tunnels connections cleanup`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/connections`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},query:t,bodyKind:`none`});return}let l=await r(e),u=e.local?n:await a();if(e.accountId=u,!await m({force:!!e.force,message:`This operation removes Cloudflare Tunnel connections.`})){process.stderr.write(`Aborted.
10
+ `);return}let d=await c(`Deleting`,async()=>l.tunnels.connections.cleanup({account_id:u,tunnel_id:e[`tunnel-id`],...t}));o(d,{successLabel:`Deleted`})})};function C(e){return e.usage(`$0 tunnels connections list
11
11
 
12
- Lists the connections for a Cloudflare Tunnel, including connector IDs, cloudflared versions, and Cloudflare locations.`).option(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List Cloudflare Tunnel connections`,builder:S,handler:async e=>c({command:`tunnels connections list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf tunnels connections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/connections`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.tunnels.connections.list({account_id:l,tunnel_id:e[`tunnel-id`]}));a(u,{successLabel:`Loaded`})})},w={command:`connections`,describe:`Operations for connections`,builder:e=>e.command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 tunnels connectors get <connector-id>
12
+ Lists the connections for a Cloudflare Tunnel, including connector IDs, cloudflared versions, and Cloudflare locations.`).option(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`list`,describe:`List Cloudflare Tunnel connections`,builder:C,handler:async e=>l({command:`tunnels connections list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf tunnels connections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/connections`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await r(e),l=e.local?n:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.tunnels.connections.list({account_id:l,tunnel_id:e[`tunnel-id`]}));o(u,{successLabel:`Loaded`})})},T={command:`connections`,describe:`Operations for connections`,builder:e=>e.command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 tunnels connectors get <connector-id>
13
13
 
14
- Retrieves a connector and its connection details for a Cloudflare Tunnel, including its cloudflared version, architecture, and connected Cloudflare locations.`).positional(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`,demandOption:!0}).option(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <connector-id>`,describe:`Get Cloudflare Tunnel connector`,builder:T,handler:async e=>c({command:`tunnels connectors get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf tunnels connectors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/connectors/${e[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(e[`connector-id`]))}`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``),"connector-id":String(e[`connector-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.tunnels.connectors.get({account_id:l,tunnel_id:e[`tunnel-id`],connector_id:e[`connector-id`]}));a(u,{successLabel:`Loaded`})})},D={command:`connectors`,describe:`Operations for connectors`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.usage(`$0 tunnels create
14
+ Retrieves a connector and its connection details for a Cloudflare Tunnel, including its cloudflared version, architecture, and connected Cloudflare locations.`).positional(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`,demandOption:!0}).option(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get <connector-id>`,describe:`Get Cloudflare Tunnel connector`,builder:E,handler:async e=>l({command:`tunnels connectors get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf tunnels connectors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/connectors/${e[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(e[`connector-id`]))}`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``),"connector-id":String(e[`connector-id`]??``)},bodyKind:`none`});return}let t=await r(e),l=e.local?n:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.tunnels.connectors.get({account_id:l,tunnel_id:e[`tunnel-id`],connector_id:e[`connector-id`]}));o(u,{successLabel:`Loaded`})})},O={command:`connectors`,describe:`Operations for connectors`,builder:e=>e.command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(e){return e.usage(`$0 tunnels create
15
15
 
16
- Creates a remotely or locally managed Cloudflare Tunnel in an account. After creation, retrieve its token and run cloudflared to establish the connector connection.`).option(`config-source`,{type:`string`,description:"Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.",choices:[`local`,`cloudflare`],default:`local`}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`tunnel-secret`,{type:`string`,description:`Sets the password required to run a locally-managed tunnel. Must be at least 32 bytes and encoded as a base64 string.`}).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`,describe:`Create a Cloudflare Tunnel`,builder:O,handler:async e=>c({command:`tunnels create`,classification:{safeFlags:[`config-source`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({config_src:d(e[`config-source`],`config-source`,`text`),name:d(e.name,`name`,`text`),tunnel_secret:d(e[`tunnel-secret`],`tunnel-secret`,`text`)}):l(e.body),sensitiveBodyPaths:[[`tunnel_secret`]]});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.tunnels.create({...t,account_id:p}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`A user-friendly name for a tunnel.`));let m=u({config_src:d(e[`config-source`],`config-source`,`text`),name:d(e.name,`name`,`text`),tunnel_secret:d(e[`tunnel-secret`],`tunnel-secret`,`text`)}),h=await s(`Creating`,async()=>c.tunnels.create({...m,account_id:p}));a(h,{successLabel:`Created`})})};function A(e){return e.usage(`$0 tunnels delete <tunnel-id>
16
+ Creates a remotely or locally managed Cloudflare Tunnel in an account. After creation, retrieve its token and run cloudflared to establish the connector connection.`).option(`config-source`,{type:`string`,description:"Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.",choices:[`local`,`cloudflare`],default:`local`}).coerce(`config-source`,e=>f(e,`config-source`,`text`)).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`tunnel-secret`,{type:`string`,description:`Sets the password required to run a locally-managed tunnel. Must be at least 32 bytes and encoded as a base64 string.`}).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 A={command:`create`,describe:`Create a Cloudflare Tunnel`,builder:k,handler:async e=>l({command:`tunnels create`,classification:{safeFlags:[`config-source`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({config_src:e[`config-source`],name:f(e.name,`name`,`text`),tunnel_secret:f(e[`tunnel-secret`],`tunnel-secret`,`text`)}):u(e.body),sensitiveBodyPaths:[[`tunnel_secret`]]});return}let t=await r(e),l=e.local?n:await a();if(e.accountId=l,e.body){let n=u(e.body),r=await c(`Creating`,async()=>t.tunnels.create({...n,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`A user-friendly name for a tunnel.`));let m=d({config_src:e[`config-source`],name:f(e.name,`name`,`text`),tunnel_secret:f(e[`tunnel-secret`],`tunnel-secret`,`text`)}),h=await c(`Creating`,async()=>t.tunnels.create({...m,account_id:l}));o(h,{successLabel:`Created`})})};function j(e){return e.usage(`$0 tunnels delete <tunnel-id>
17
17
 
18
- Permanently deletes a Cloudflare Tunnel from an account. The tunnel must have no active connections.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,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 <tunnel-id>`,describe:`Delete a Cloudflare Tunnel`,builder:A,handler:async e=>c({command:`tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force,message:`This operation permanently deletes a Cloudflare Tunnel.`})){process.stderr.write(`Aborted.
19
- `);return}let u=await s(`Deleting`,async()=>c.tunnels.delete({account_id:l,tunnel_id:e[`tunnel-id`]}));a(u,{successLabel:`Deleted`})})};function M(e){return e.usage(`$0 tunnels edit <tunnel-id>
18
+ Permanently deletes a Cloudflare Tunnel from an account. The tunnel must have no active connections.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,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 M={command:`delete <tunnel-id>`,describe:`Delete a Cloudflare Tunnel`,builder:j,handler:async e=>l({command:`tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await r(e),l=e.local?n:await a();if(e.accountId=l,!await m({force:!!e.force,message:`This operation permanently deletes a Cloudflare Tunnel.`})){process.stderr.write(`Aborted.
19
+ `);return}let u=await c(`Deleting`,async()=>t.tunnels.delete({account_id:l,tunnel_id:e[`tunnel-id`]}));o(u,{successLabel:`Deleted`})})};function N(e){return e.usage(`$0 tunnels edit <tunnel-id>
20
20
 
21
- Updates the name or secret of an existing Cloudflare Tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`tunnel-secret`,{type:`string`,description:`Sets the password required to run a locally-managed tunnel. Must be at least 32 bytes and encoded as a base64 string.`}).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 N={command:`edit <tunnel-id>`,describe:`Update a Cloudflare Tunnel`,builder:M,handler:async e=>c({command:`tunnels edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf tunnels edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({name:d(e.name,`name`,`text`),tunnel_secret:d(e[`tunnel-secret`],`tunnel-secret`,`text`)}):l(e.body),sensitiveBodyPaths:[[`tunnel_secret`]]});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.tunnels.edit({...t,account_id:f,tunnel_id:e[`tunnel-id`]}));a(n,{successLabel:`Updated`});return}let p=u({name:d(e.name,`name`,`text`),tunnel_secret:d(e[`tunnel-secret`],`tunnel-secret`,`text`)}),m=await s(`Updating`,async()=>c.tunnels.edit({...p,account_id:f,tunnel_id:e[`tunnel-id`]}));a(m,{successLabel:`Updated`})})};function P(e){return e.usage(`$0 tunnels get <tunnel-id>
21
+ Updates the name or secret of an existing Cloudflare Tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`tunnel-secret`,{type:`string`,description:`Sets the password required to run a locally-managed tunnel. Must be at least 32 bytes and encoded as a base64 string.`}).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:`edit <tunnel-id>`,describe:`Update a Cloudflare Tunnel`,builder:N,handler:async e=>l({command:`tunnels edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf tunnels edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`),tunnel_secret:f(e[`tunnel-secret`],`tunnel-secret`,`text`)}):u(e.body),sensitiveBodyPaths:[[`tunnel_secret`]]});return}let t=await r(e),l=e.local?n:await a();if(e.accountId=l,e.body){let n=u(e.body),r=await c(`Updating`,async()=>t.tunnels.edit({...n,account_id:l,tunnel_id:e[`tunnel-id`]}));o(r,{successLabel:`Updated`});return}let p=d({name:f(e.name,`name`,`text`),tunnel_secret:f(e[`tunnel-secret`],`tunnel-secret`,`text`)}),m=await c(`Updating`,async()=>t.tunnels.edit({...p,account_id:l,tunnel_id:e[`tunnel-id`]}));o(m,{successLabel:`Updated`})})};function F(e){return e.usage(`$0 tunnels get <tunnel-id>
22
22
 
23
- Fetches a single Cloudflare Tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <tunnel-id>`,describe:`Get a Cloudflare Tunnel`,builder:P,handler:async e=>c({command:`tunnels get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf tunnels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.tunnels.get({account_id:l,tunnel_id:e[`tunnel-id`]}));a(u,{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 tunnels list
23
+ Fetches a single Cloudflare Tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get <tunnel-id>`,describe:`Get a Cloudflare Tunnel`,builder:F,handler:async e=>l({command:`tunnels get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf tunnels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await r(e),l=e.local?n:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.tunnels.get({account_id:l,tunnel_id:e[`tunnel-id`]}));o(u,{successLabel:`Loaded`})})};function L(e){return e.usage(`$0 tunnels list
24
24
 
25
- Lists and filters all types of Tunnels in an account.`).option(`name`,{type:`string`,description:`A user-friendly name for the tunnel.`}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only include deleted tunnels. If `false`, exclude deleted tunnels. If empty, all tunnels will be included."}).option(`existed-at`,{type:`string`,description:`If provided, include only resources that were created (and not deleted) before this time. URL encoded.`}).option(`uuid`,{type:`string`,description:`UUID of the tunnel.`}).option(`was-active-at`,{type:`string`,description:`Was active at`}).option(`was-inactive-at`,{type:`string`,description:`Was inactive at`}).option(`include-prefix`,{type:`string`,description:`Include prefix`}).option(`exclude-prefix`,{type:`string`,description:`Exclude prefix`}).option(`tun-types`,{type:`string`,description:`The types of tunnels to filter by, separated by commas.`}).option(`status`,{type:`string`,description:"The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).",choices:[`inactive`,`degraded`,`healthy`,`down`]}).option(`per-page`,{type:`number`,description:`Number of results to display.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List All Tunnels`,builder:m(I),handler:async e=>c({command:`tunnels list`,classification:{safeFlags:[`is-deleted`,`status`,`dry-run`]}},e,async()=>{let c={name:e.name,is_deleted:e[`is-deleted`],existed_at:e[`existed-at`],uuid:e.uuid,was_active_at:e[`was-active-at`],was_inactive_at:e[`was-inactive-at`],include_prefix:e[`include-prefix`],exclude_prefix:e[`exclude-prefix`],tun_types:e[`tun-types`],status:e.status,per_page:e[`per-page`],page:e.page};if(e.dryRun){let e=await r();o({command:`cf tunnels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tunnels`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.tunnels.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 tunnels management-token create <tunnel-id>
25
+ Lists and filters all types of Tunnels in an account.`).option(`name`,{type:`string`,description:`A user-friendly name for the tunnel.`}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only include deleted tunnels. If `false`, exclude deleted tunnels. If empty, all tunnels will be included."}).option(`existed-at`,{type:`string`,description:`If provided, include only resources that were created (and not deleted) before this time. URL encoded.`}).option(`uuid`,{type:`string`,description:`UUID of the tunnel.`}).option(`was-active-at`,{type:`string`,description:`Was active at`}).option(`was-inactive-at`,{type:`string`,description:`Was inactive at`}).option(`include-prefix`,{type:`string`,description:`Include prefix`}).option(`exclude-prefix`,{type:`string`,description:`Exclude prefix`}).option(`tun-types`,{type:`string`,description:`The types of tunnels to filter by, separated by commas.`}).option(`status`,{type:`string`,description:"The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).",choices:[`inactive`,`degraded`,`healthy`,`down`]}).option(`per-page`,{type:`number`,description:`Number of results to display.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`list`,describe:`List All Tunnels`,builder:h(L),handler:async e=>l({command:`tunnels list`,classification:{safeFlags:[`is-deleted`,`status`,`dry-run`]}},e,async()=>{let t={name:e.name,is_deleted:e[`is-deleted`],existed_at:e[`existed-at`],uuid:e.uuid,was_active_at:e[`was-active-at`],was_inactive_at:e[`was-inactive-at`],include_prefix:e[`include-prefix`],exclude_prefix:e[`exclude-prefix`],tun_types:e[`tun-types`],status:e.status,per_page:e[`per-page`],page:e.page};if(e.dryRun){let e=await i();s({command:`cf tunnels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tunnels`,pathParams:{},query:t,bodyKind:`none`});return}let l=await r(e),u=e.local?n:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.tunnels.list({account_id:u,...t}));o(d,{successLabel:`Loaded`})})};function z(e){return e.usage(`$0 tunnels management-token create <tunnel-id>
26
26
 
27
- Creates a short-lived management token for the requested Tunnel management resources, such as streaming logs. Treat the token as a secret.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`resources`,{type:`string`,array:!0,description:`The resources field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`create <tunnel-id>`,describe:`Get a Cloudflare Tunnel management token`,builder:R,handler:async e=>c({command:`tunnels management-token create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf tunnels management-token create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/management`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({resources:e.resources}):l(e.body)});return}let c=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.tunnels.managementToken.create({...t,account_id:d,tunnel_id:e[`tunnel-id`]}));a(n,{successLabel:`Created`});return}if(e.resources===void 0)throw Error(`--resources is required (or pass --body with this field set).`);let f=u({resources:e.resources}),p=await s(`Creating`,async()=>c.tunnels.managementToken.create({...f,account_id:d,tunnel_id:e[`tunnel-id`]}));a(p,{successLabel:`Created`})})},B={command:`management-token`,describe:`Operations for management-token`,builder:e=>e.command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.usage(`$0 tunnels token get <tunnel-id>
27
+ Creates a short-lived management token for the requested Tunnel management resources, such as streaming logs. Treat the token as a secret.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`resources`,{type:`string`,array:!0,description:`The resources field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`create <tunnel-id>`,describe:`Get a Cloudflare Tunnel management token`,builder:z,handler:async e=>l({command:`tunnels management-token create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf tunnels management-token create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/management`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({resources:e.resources}):u(e.body)});return}let t=await r(e),l=e.local?n:await a();if(e.accountId=l,e.body){let n=u(e.body),r=await c(`Creating`,async()=>t.tunnels.managementToken.create({...n,account_id:l,tunnel_id:e[`tunnel-id`]}));o(r,{successLabel:`Created`});return}if(e.resources===void 0)throw Error(`--resources is required (or pass --body with this field set).`);let f=d({resources:e.resources}),p=await c(`Creating`,async()=>t.tunnels.managementToken.create({...f,account_id:l,tunnel_id:e[`tunnel-id`]}));o(p,{successLabel:`Created`})})},V={command:`management-token`,describe:`Operations for management-token`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function H(e){return e.usage(`$0 tunnels token get <tunnel-id>
28
28
 
29
- Retrieves the token used to run cloudflared and associate it with a specific Cloudflare Tunnel. Treat the token as a secret.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <tunnel-id>`,describe:`Get a Cloudflare Tunnel token`,builder:V,handler:async e=>c({command:`tunnels token get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf tunnels token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/token`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.tunnels.token.get({account_id:l,tunnel_id:e[`tunnel-id`]}));a(u,{successLabel:`Loaded`})})},U={command:`token`,describe:`Operations for token`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var W=e(`diag`,`Create a diagnostic report from a local cloudflared instance.`,()=>import(`./command-BDe67N_n.mjs`),{command:`tunnels diag`,recordArgs:!1}),G=e(`login`,`Authorize cloudflared and download an origin certificate for locally managed tunnels.`,()=>import(`./command-D3fyhdy-.mjs`),{command:`tunnels login`,recordArgs:!1}),K=e(`quick-start <url>`,`Expose a local URL with a temporary trycloudflare.com tunnel. The tunnel remains active until cf exits.`,()=>import(`./command-CG6RvZs0.mjs`),{command:`tunnels quick-start`,recordArgs:!1}),q=e(`ready`,`Check the /ready endpoint exposed by a local cloudflared instance.`,()=>import(`./command-_rqD0hXF.mjs`),{command:`tunnels ready`,recordArgs:!1}),J=e(`run [tunnel]`,`Run a named Cloudflare Tunnel using the cf-managed cloudflared binary.`,()=>import(`./command-DwXiDOeH.mjs`),{command:`tunnels run`,recordArgs:!1}),Y=e(`tail [tunnel-id]`,`Stream logs from a remote cloudflared instance.`,()=>import(`./command-UiHLJ8Ji.mjs`),{command:`tunnels tail`,recordArgs:!1});const X={command:`tunnels`,describe:`tunnels`,builder:e=>e.command(k).command(j).command(W).command(N).command(F).command(L).command(G).command(K).command(q).command(J).command(Y).command(y).command(w).command(D).command(B).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{X as default};
29
+ Retrieves the token used to run cloudflared and associate it with a specific Cloudflare Tunnel. Treat the token as a secret.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get <tunnel-id>`,describe:`Get a Cloudflare Tunnel token`,builder:H,handler:async e=>l({command:`tunnels token get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf tunnels token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/token`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await r(e),l=e.local?n:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.tunnels.token.get({account_id:l,tunnel_id:e[`tunnel-id`]}));o(u,{successLabel:`Loaded`})})},W={command:`token`,describe:`Operations for token`,builder:e=>e.command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var G=e(`diag`,`Create a diagnostic report from a local cloudflared instance.`,()=>import(`./command-CtVUNm__.mjs`),{command:`tunnels diag`,recordArgs:!1}),K=e(`login`,`Authorize cloudflared and download an origin certificate for locally managed tunnels.`,()=>import(`./command-Ckb9FufU.mjs`),{command:`tunnels login`,recordArgs:!1}),q=e(`quick-start <url>`,`Expose a local URL with a temporary trycloudflare.com tunnel. The tunnel remains active until cf exits.`,()=>import(`./command-CUNMrMou.mjs`),{command:`tunnels quick-start`,recordArgs:!1}),J=e(`ready`,`Check the /ready endpoint exposed by a local cloudflared instance.`,()=>import(`./command-DtgJilOK.mjs`),{command:`tunnels ready`,recordArgs:!1}),Y=e(`run [tunnel]`,`Run a named Cloudflare Tunnel using the cf-managed cloudflared binary.`,()=>import(`./command-OWe3v69l.mjs`),{command:`tunnels run`,recordArgs:!1}),X=e(`tail [tunnel-id]`,`Stream logs from a remote cloudflared instance.`,()=>import(`./command-DPX9sJVi.mjs`),{command:`tunnels tail`,recordArgs:!1});const Z={command:`tunnels`,describe:`tunnels`,builder:e=>e.command(A).command(M).command(t(G,`preview`)).command(P).command(I).command(R).command(t(K,`preview`)).command(t(q,`preview`)).command(t(J,`preview`)).command(t(Y,`preview`)).command(t(X,`preview`)).command(b).command(T).command(O).command(V).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Z as default};
@@ -1,33 +1,33 @@
1
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,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,n as f}from"./prompt-RlgRrmbm.mjs";import{t as p}from"./cli-types-9oYmRTHJ.mjs";function m(e){return e.usage(`$0 turnstile widgets create
2
+ import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,t as r}from"./context-BBLtgdR1.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-CQqDtgmF.mjs";import{t as s}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.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-C8FyienX.mjs";import{t as m}from"./cli-types-9oYmRTHJ.mjs";function h(e){return e.usage(`$0 turnstile widgets create
3
3
 
4
4
  Creates a Turnstile widget for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`order`,{type:`string`,description:`Field to order widgets by.`,choices:[`id`,`sitekey`,`name`,`created_on`,`modified_on`]}).option(`direction`,{type:`string`,description:`Direction to order widgets.`,choices:[`asc`,`desc`]}).option(`filter`,{type:`string`,description:"Filter widgets by field. The `name` field uses case-insensitive\nsubstring matching; `sitekey` uses exact matching.\nFormat: `field:value`\n\nSupported fields:\n- `name` - Filter by widget name (e.g., `filter=name:login-form`)\n- `sitekey` - Filter by sitekey (e.g., `filter=sitekey:0x4AAA`)\n\nReturns 400 Bad Request if the field is unsupported or format is invalid.\nAn empty filter value returns all results."}).option(`bot-fight-mode`,{type:`boolean`,description:`If bot_fight_mode is set to \`true\`, Cloudflare issues computationally
5
5
  expensive challenges in response to malicious bots (ENT only).
6
6
  `}).option(`clearance-level`,{type:`string`,description:`If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance,
7
7
  this setting can determine the clearance level to be set
8
- `,choices:[`no_clearance`,`jschallenge`,`managed`,`interactive`]}).option(`domains`,{type:`string`,array:!0,description:`The domains field`}).option(`ephemeral-id`,{type:`boolean`,description:`Return the Ephemeral ID in /siteverify (ENT only).
9
- `}).option(`name`,{type:`string`,description:`Human readable widget name. Not unique. Cloudflare suggests that you
8
+ `,choices:[`no_clearance`,`jschallenge`,`managed`,`interactive`]}).coerce(`clearance-level`,e=>u(e,`clearance-level`,`text`)).option(`domains`,{type:`string`,array:!0,description:`The domains field`}).option(`ephemeral-id`,{type:`boolean`,description:`Return the Ephemeral ID in /siteverify (ENT only).
9
+ `}).option(`widget-mode`,{type:`string`,description:`Widget Mode`,choices:[`non-interactive`,`invisible`,`managed`]}).coerce(`widget-mode`,e=>u(e,`widget-mode`,`text`)).option(`name`,{type:`string`,description:`Human readable widget name. Not unique. Cloudflare suggests that you
10
10
  set this to a meaningful string to make it easier to identify your
11
11
  widget, and where it is used.
12
12
  `}).option(`offlabel`,{type:`boolean`,description:`Do not show any Cloudflare branding on the widget (ENT only).
13
13
  `}).option(`region`,{type:`string`,description:`Region where this widget can be used. This cannot be changed after creation.
14
- `,choices:[`world`,`china`],default:`world`}).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 a Turnstile Widget`,builder:p(m),handler:async f=>s({command:`turnstile widgets create`,classification:{safeFlags:[`order`,`direction`,`bot-fight-mode`,`clearance-level`,`ephemeral-id`,`offlabel`,`region`,`dry-run`]}},f,async()=>{let s={page:f.page,per_page:f[`per-page`],order:f.order,direction:f.direction,filter:f.filter};if(f.dryRun){let e=await n();a({command:`cf turnstile widgets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/challenges/widgets`,pathParams:{},query:s,bodyKind:`json`,body:f.body===void 0?l({bot_fight_mode:f[`bot-fight-mode`],clearance_level:u(f[`clearance-level`],`clearance-level`,`text`),domains:f.domains,ephemeral_id:f[`ephemeral-id`],name:u(f.name,`name`,`text`),offlabel:f.offlabel,region:u(f.region,`region`,`text`)}):c(f.body)});return}let p=await t(f),m=f.local?e:await r();if(f.accountId=m,f.body){let e=c(f.body);new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let t=await o(`Creating`,async()=>p.turnstile.widgets.create({...e,account_id:m,...s}));i(t,{successLabel:`Created`});return}if(f.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);f.name===void 0&&(f.name=await d(`name`,`Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. `));let h=l({bot_fight_mode:f[`bot-fight-mode`],clearance_level:u(f[`clearance-level`],`clearance-level`,`text`),domains:f.domains,ephemeral_id:f[`ephemeral-id`],name:u(f.name,`name`,`text`),offlabel:f.offlabel,region:u(f.region,`region`,`text`)});new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let g=await o(`Creating`,async()=>p.turnstile.widgets.create({...h,account_id:m,...s}));i(g,{successLabel:`Created`})})};function g(e){return e.usage(`$0 turnstile widgets delete <sitekey>
14
+ `,choices:[`world`,`china`],default:`world`}).coerce(`region`,e=>u(e,`region`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create a Turnstile Widget`,builder:m(h),handler:async p=>s({command:`turnstile widgets create`,classification:{safeFlags:[`order`,`direction`,`bot-fight-mode`,`clearance-level`,`ephemeral-id`,`widget-mode`,`offlabel`,`region`,`dry-run`]}},p,async()=>{let s={page:p.page,per_page:p[`per-page`],order:p.order,direction:p.direction,filter:p.filter};if(p.dryRun){let e=await n();a({command:`cf turnstile widgets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/challenges/widgets`,pathParams:{},query:s,bodyKind:`json`,body:p.body===void 0?l({bot_fight_mode:p[`bot-fight-mode`],clearance_level:p[`clearance-level`],domains:p.domains,ephemeral_id:p[`ephemeral-id`],mode:p[`widget-mode`],name:u(p.name,`name`,`text`),offlabel:p.offlabel,region:p.region}):c(p.body)});return}let m=await t(p),h=p.local?e:await r();if(p.accountId=h,p.body){let e=c(p.body);new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let t=await o(`Creating`,async()=>m.turnstile.widgets.create({...e,account_id:h,...s}));i(t,{successLabel:`Created`});return}if(p.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);p[`widget-mode`]===void 0&&(p[`widget-mode`]=await f(`widget-mode`,`Widget Mode`,[`non-interactive`,`invisible`,`managed`])),p.name===void 0&&(p.name=await d(`name`,`Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. `));let g=l({bot_fight_mode:p[`bot-fight-mode`],clearance_level:p[`clearance-level`],domains:p.domains,ephemeral_id:p[`ephemeral-id`],mode:p[`widget-mode`],name:u(p.name,`name`,`text`),offlabel:p.offlabel,region:p.region});new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let _=await o(`Creating`,async()=>m.turnstile.widgets.create({...g,account_id:h,...s}));i(_,{successLabel:`Created`})})};function _(e){return e.usage(`$0 turnstile widgets delete <sitekey>
15
15
 
16
- Deletes a Turnstile widget from an account.`).positional(`sitekey`,{type:`string`,description:`Unique identifier for a Turnstile widget.`,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 _={command:`delete <sitekey>`,describe:`Delete a Turnstile Widget`,builder:g,handler:async c=>s({command:`turnstile widgets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf turnstile widgets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/challenges/widgets/${c.sitekey==null?`<sitekey>`:encodeURIComponent(String(c.sitekey))}`,pathParams:{sitekey:String(c.sitekey??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
17
- `);return}let u=await o(`Deleting`,async()=>s.turnstile.widgets.delete({account_id:l,sitekey:c.sitekey}));i(u,{successLabel:`Deleted`})})};function v(e){return e.usage(`$0 turnstile widgets get <sitekey>
16
+ Deletes a Turnstile widget from an account.`).positional(`sitekey`,{type:`string`,description:`Unique identifier for a Turnstile widget.`,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 v={command:`delete <sitekey>`,describe:`Delete a Turnstile Widget`,builder:_,handler:async c=>s({command:`turnstile widgets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf turnstile widgets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/challenges/widgets/${c.sitekey==null?`<sitekey>`:encodeURIComponent(String(c.sitekey))}`,pathParams:{sitekey:String(c.sitekey??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await p({force:!!c.force})){process.stderr.write(`Aborted.
17
+ `);return}let u=await o(`Deleting`,async()=>s.turnstile.widgets.delete({account_id:l,sitekey:c.sitekey}));i(u,{successLabel:`Deleted`})})};function y(e){return e.usage(`$0 turnstile widgets get <sitekey>
18
18
 
19
- Returns the configuration of a Turnstile widget.`).positional(`sitekey`,{type:`string`,description:`Unique identifier for a Turnstile widget.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <sitekey>`,describe:`Turnstile Widget Details`,builder:v,handler:async c=>s({command:`turnstile widgets get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf turnstile widgets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/challenges/widgets/${c.sitekey==null?`<sitekey>`:encodeURIComponent(String(c.sitekey))}`,pathParams:{sitekey:String(c.sitekey??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.turnstile.widgets.get({account_id:l,sitekey:c.sitekey}));i(u,{successLabel:`Loaded`})})};function b(e){return e.usage(`$0 turnstile widgets list
19
+ Returns the configuration of a Turnstile widget.`).positional(`sitekey`,{type:`string`,description:`Unique identifier for a Turnstile widget.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <sitekey>`,describe:`Turnstile Widget Details`,builder:y,handler:async c=>s({command:`turnstile widgets get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf turnstile widgets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/challenges/widgets/${c.sitekey==null?`<sitekey>`:encodeURIComponent(String(c.sitekey))}`,pathParams:{sitekey:String(c.sitekey??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.turnstile.widgets.get({account_id:l,sitekey:c.sitekey}));i(u,{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 turnstile widgets list
20
20
 
21
- Lists Turnstile widgets for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`order`,{type:`string`,description:`Field to order widgets by.`,choices:[`id`,`sitekey`,`name`,`created_on`,`modified_on`]}).option(`direction`,{type:`string`,description:`Direction to order widgets.`,choices:[`asc`,`desc`]}).option(`filter`,{type:`string`,description:"Filter widgets by field. The `name` field uses case-insensitive\nsubstring matching; `sitekey` uses exact matching.\nFormat: `field:value`\n\nSupported fields:\n- `name` - Filter by widget name (e.g., `filter=name:login-form`)\n- `sitekey` - Filter by sitekey (e.g., `filter=sitekey:0x4AAA`)\n\nReturns 400 Bad Request if the field is unsupported or format is invalid.\nAn empty filter value returns all results."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List Turnstile Widgets`,builder:p(b),handler:async c=>s({command:`turnstile widgets list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],order:c.order,direction:c.direction,filter:c.filter};if(c.dryRun){let e=await n();a({command:`cf turnstile widgets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/challenges/widgets`,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.turnstile.widgets.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function S(e){return e.usage("$0 turnstile widgets rotate-secret <sitekey>\n\nGenerates a new secret key for this widget. If `invalidate_immediately` is set to `false`, the previous secret remains valid for 2 hours. Note that secrets cannot be rotated again during the grace period.").positional(`sitekey`,{type:`string`,description:`Unique identifier for a Turnstile widget.`,demandOption:!0}).option(`invalidate-immediately`,{type:`boolean`,description:"If `invalidate_immediately` is set to `false`, the previous secret will\nremain valid for two hours. Otherwise, the secret is immediately\ninvalidated, and requests using it will be rejected.\n",default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`rotate-secret <sitekey>`,describe:`Rotate Secret for a Turnstile Widget`,builder:S,handler:async u=>s({command:`turnstile widgets rotate-secret`,classification:{safeFlags:[`invalidate-immediately`,`dry-run`]}},u,async()=>{if(u.dryRun){let e=await n();a({command:`cf turnstile widgets rotate-secret`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/challenges/widgets/${u.sitekey==null?`<sitekey>`:encodeURIComponent(String(u.sitekey))}/rotate_secret`,pathParams:{sitekey:String(u.sitekey??``)},bodyKind:`json`,body:u.body===void 0?l({invalidate_immediately:u[`invalidate-immediately`]}):c(u.body)});return}let s=await t(u),d=u.local?e:await r();if(u.accountId=d,u.body){let e=c(u.body),t=await o(`Creating`,async()=>s.turnstile.widgets.rotateSecret({...e,account_id:d,sitekey:u.sitekey}));i(t,{successLabel:`Created`});return}let f=l({invalidate_immediately:u[`invalidate-immediately`]}),p=await o(`Creating`,async()=>s.turnstile.widgets.rotateSecret({...f,account_id:d,sitekey:u.sitekey}));i(p,{successLabel:`Created`})})};function w(e){return e.usage(`$0 turnstile widgets update <sitekey>
21
+ Lists Turnstile widgets for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`order`,{type:`string`,description:`Field to order widgets by.`,choices:[`id`,`sitekey`,`name`,`created_on`,`modified_on`]}).option(`direction`,{type:`string`,description:`Direction to order widgets.`,choices:[`asc`,`desc`]}).option(`filter`,{type:`string`,description:"Filter widgets by field. The `name` field uses case-insensitive\nsubstring matching; `sitekey` uses exact matching.\nFormat: `field:value`\n\nSupported fields:\n- `name` - Filter by widget name (e.g., `filter=name:login-form`)\n- `sitekey` - Filter by sitekey (e.g., `filter=sitekey:0x4AAA`)\n\nReturns 400 Bad Request if the field is unsupported or format is invalid.\nAn empty filter value returns all results."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List Turnstile Widgets`,builder:m(x),handler:async c=>s({command:`turnstile widgets list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],order:c.order,direction:c.direction,filter:c.filter};if(c.dryRun){let e=await n();a({command:`cf turnstile widgets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/challenges/widgets`,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.turnstile.widgets.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function C(e){return e.usage("$0 turnstile widgets rotate-secret <sitekey>\n\nGenerates a new secret key for this widget. If `invalidate_immediately` is set to `false`, the previous secret remains valid for 2 hours. Note that secrets cannot be rotated again during the grace period.").positional(`sitekey`,{type:`string`,description:`Unique identifier for a Turnstile widget.`,demandOption:!0}).option(`invalidate-immediately`,{type:`boolean`,description:"If `invalidate_immediately` is set to `false`, the previous secret will\nremain valid for two hours. Otherwise, the secret is immediately\ninvalidated, and requests using it will be rejected.\n",default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`rotate-secret <sitekey>`,describe:`Rotate Secret for a Turnstile Widget`,builder:C,handler:async u=>s({command:`turnstile widgets rotate-secret`,classification:{safeFlags:[`invalidate-immediately`,`dry-run`]}},u,async()=>{if(u.dryRun){let e=await n();a({command:`cf turnstile widgets rotate-secret`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/challenges/widgets/${u.sitekey==null?`<sitekey>`:encodeURIComponent(String(u.sitekey))}/rotate_secret`,pathParams:{sitekey:String(u.sitekey??``)},bodyKind:`json`,body:u.body===void 0?l({invalidate_immediately:u[`invalidate-immediately`]}):c(u.body)});return}let s=await t(u),d=u.local?e:await r();if(u.accountId=d,u.body){let e=c(u.body),t=await o(`Creating`,async()=>s.turnstile.widgets.rotateSecret({...e,account_id:d,sitekey:u.sitekey}));i(t,{successLabel:`Created`});return}let f=l({invalidate_immediately:u[`invalidate-immediately`]}),p=await o(`Creating`,async()=>s.turnstile.widgets.rotateSecret({...f,account_id:d,sitekey:u.sitekey}));i(p,{successLabel:`Created`})})};function T(e){return e.usage(`$0 turnstile widgets update <sitekey>
22
22
 
23
23
  Updates the configuration of a Turnstile widget.`).positional(`sitekey`,{type:`string`,description:`Unique identifier for a Turnstile widget.`,demandOption:!0}).option(`bot-fight-mode`,{type:`boolean`,description:`If bot_fight_mode is set to \`true\`, Cloudflare issues computationally
24
24
  expensive challenges in response to malicious bots (ENT only).
25
25
  `}).option(`clearance-level`,{type:`string`,description:`If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance,
26
26
  this setting can determine the clearance level to be set
27
- `,choices:[`no_clearance`,`jschallenge`,`managed`,`interactive`]}).option(`domains`,{type:`string`,array:!0,description:`The domains field`}).option(`ephemeral-id`,{type:`boolean`,description:`Return the Ephemeral ID in /siteverify (ENT only).
28
- `}).option(`name`,{type:`string`,description:`Human readable widget name. Not unique. Cloudflare suggests that you
27
+ `,choices:[`no_clearance`,`jschallenge`,`managed`,`interactive`]}).coerce(`clearance-level`,e=>u(e,`clearance-level`,`text`)).option(`domains`,{type:`string`,array:!0,description:`The domains field`}).option(`ephemeral-id`,{type:`boolean`,description:`Return the Ephemeral ID in /siteverify (ENT only).
28
+ `}).option(`widget-mode`,{type:`string`,description:`Widget Mode`,choices:[`non-interactive`,`invisible`,`managed`]}).coerce(`widget-mode`,e=>u(e,`widget-mode`,`text`)).option(`name`,{type:`string`,description:`Human readable widget name. Not unique. Cloudflare suggests that you
29
29
  set this to a meaningful string to make it easier to identify your
30
30
  widget, and where it is used.
31
31
  `}).option(`offlabel`,{type:`boolean`,description:`Do not show any Cloudflare branding on the widget (ENT only).
32
32
  `}).option(`region`,{type:`string`,description:`Region where this widget can be used. This cannot be changed after creation.
33
- `,choices:[`world`,`china`]}).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 T={command:`update <sitekey>`,describe:`Update a Turnstile Widget`,builder:w,handler:async f=>s({command:`turnstile widgets update`,classification:{safeFlags:[`bot-fight-mode`,`clearance-level`,`ephemeral-id`,`offlabel`,`region`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=await n();a({command:`cf turnstile widgets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/challenges/widgets/${f.sitekey==null?`<sitekey>`:encodeURIComponent(String(f.sitekey))}`,pathParams:{sitekey:String(f.sitekey??``)},bodyKind:`json`,body:f.body===void 0?l({bot_fight_mode:f[`bot-fight-mode`],clearance_level:u(f[`clearance-level`],`clearance-level`,`text`),domains:f.domains,ephemeral_id:f[`ephemeral-id`],name:u(f.name,`name`,`text`),offlabel:f.offlabel,region:u(f.region,`region`,`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(`Updating`,async()=>s.turnstile.widgets.update({...e,account_id:p,sitekey:f.sitekey}));i(t,{successLabel:`Updated`});return}if(f.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);f.name===void 0&&(f.name=await d(`name`,`Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. `));let m=l({bot_fight_mode:f[`bot-fight-mode`],clearance_level:u(f[`clearance-level`],`clearance-level`,`text`),domains:f.domains,ephemeral_id:f[`ephemeral-id`],name:u(f.name,`name`,`text`),offlabel:f.offlabel,region:u(f.region,`region`,`text`)}),h=await o(`Updating`,async()=>s.turnstile.widgets.update({...m,account_id:p,sitekey:f.sitekey}));i(h,{successLabel:`Updated`})})},E={command:`widgets`,describe:`Turnstile widget configurations — site keys, secret rotation, and challenge mode settings`,builder:e=>e.command(h).command(_).command(y).command(x).command(C).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},D={command:`turnstile`,describe:`CAPTCHA-free bot verification widgets that protect forms and APIs without degrading user experience`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{D as default};
33
+ `,choices:[`world`,`china`]}).coerce(`region`,e=>u(e,`region`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const E={command:`update <sitekey>`,describe:`Update a Turnstile Widget`,builder:T,handler:async p=>s({command:`turnstile widgets update`,classification:{safeFlags:[`bot-fight-mode`,`clearance-level`,`ephemeral-id`,`widget-mode`,`offlabel`,`region`,`dry-run`]}},p,async()=>{if(p.dryRun){let e=await n();a({command:`cf turnstile widgets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/challenges/widgets/${p.sitekey==null?`<sitekey>`:encodeURIComponent(String(p.sitekey))}`,pathParams:{sitekey:String(p.sitekey??``)},bodyKind:`json`,body:p.body===void 0?l({bot_fight_mode:p[`bot-fight-mode`],clearance_level:p[`clearance-level`],domains:p.domains,ephemeral_id:p[`ephemeral-id`],mode:p[`widget-mode`],name:u(p.name,`name`,`text`),offlabel:p.offlabel,region:p.region}):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(`Updating`,async()=>s.turnstile.widgets.update({...e,account_id:m,sitekey:p.sitekey}));i(t,{successLabel:`Updated`});return}if(p.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);p[`widget-mode`]===void 0&&(p[`widget-mode`]=await f(`widget-mode`,`Widget Mode`,[`non-interactive`,`invisible`,`managed`])),p.name===void 0&&(p.name=await d(`name`,`Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. `));let h=l({bot_fight_mode:p[`bot-fight-mode`],clearance_level:p[`clearance-level`],domains:p.domains,ephemeral_id:p[`ephemeral-id`],mode:p[`widget-mode`],name:u(p.name,`name`,`text`),offlabel:p.offlabel,region:p.region}),g=await o(`Updating`,async()=>s.turnstile.widgets.update({...h,account_id:m,sitekey:p.sitekey}));i(g,{successLabel:`Updated`})})},D={command:`widgets`,describe:`Turnstile widget configurations — site keys, secret rotation, and challenge mode settings`,builder:e=>e.command(g).command(v).command(b).command(S).command(w).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},O={command:`turnstile`,describe:`CAPTCHA-free bot verification widgets that protect forms and APIs without degrading user experience`,builder:e=>e.command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{O as default};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,n as t}from"./source-mXUcrTVw.mjs";import{n}from"./version-BdVUXLnK.mjs";import{i as r}from"./cf-BxsXrVeh.mjs";import{r as i,t as a}from"./gt-3bcLGJ7V.mjs";import{closeSync as o,mkdirSync as s,openSync as c,readFileSync as l,renameSync as u,statSync as d,unlinkSync as f,writeFileSync as p}from"node:fs";import{dirname as m,join as h}from"node:path";import{fileURLToPath as g}from"node:url";import{spawn as _}from"node:child_process";var v=/* @__PURE__ */ t(((e,t)=>{let n=i();t.exports=(e,t)=>new n(e,t).major})),y=/* @__PURE__ */ t(((e,t)=>{let n=i();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),b=/* @__PURE__ */ t(((e,t)=>{let n=y();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),x=/* @__PURE__ */ t(((e,t)=>{let n=y();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),S=/* @__PURE__ */ e(a(),1),C=/* @__PURE__ */ e(v(),1),w=/* @__PURE__ */ e(b(),1),T=/* @__PURE__ */ e(x(),1);const E=864e5;function D(e){return(0,w.default)(e)?.includes(`beta`)?`beta`:`latest`}function O(e=n){return h(r(),`cache`,`update-check-${D(e)}.json`)}function k(e=O()){try{let t=JSON.parse(l(e,`utf8`));if(typeof t!=`object`||!t||Array.isArray(t))return{};let n=t;return{lastAttemptedAt:typeof n.lastAttemptedAt==`number`&&Number.isFinite(n.lastAttemptedAt)?n.lastAttemptedAt:void 0,lastSuccessfulAt:typeof n.lastSuccessfulAt==`number`&&Number.isFinite(n.lastSuccessfulAt)?n.lastSuccessfulAt:void 0,latestVersion:typeof n.latestVersion==`string`&&(0,T.default)(n.latestVersion)?n.latestVersion:void 0}}catch{return{}}}function A(e,t=O()){let n=`${t}.${process.pid}.tmp`;try{return s(m(t),{recursive:!0}),p(n,`${JSON.stringify(e)}\n`,{encoding:`utf8`,mode:384}),u(n,t),!0}catch{try{f(n)}catch{}return!1}}function j(e,t,n){let r=`${e}.lock`,i;try{s(m(e),{recursive:!0});try{i=c(r,`wx`,384)}catch{try{if(t-d(r).mtimeMs<=5e3)return;f(r),i=c(r,`wx`,384)}catch{return}}return n()}catch{return}finally{if(i!==void 0)try{o(i),f(r)}catch{}}}function M(e,t){if(!(0,T.default)(e)||!t.latestVersion||!(0,S.default)(t.latestVersion,e))return;let n=(0,C.default)(t.latestVersion)>(0,C.default)(e);return{latestVersion:t.latestVersion,isMajor:n}}function N(e,t=O(e)){return M(e,k(t))}function P(){let e=import.meta.url.endsWith(`.ts`),t=new URL(e?`../update-check-worker.ts`:`./update-check-worker.mjs`,import.meta.url),n=e?[...process.execArgv,g(t)]:[g(t)];_(process.execPath,n,{detached:!0,stdio:`ignore`,windowsHide:!0}).unref()}function F(e={}){let t=e.cachePath??O(e.currentVersion??n),r=e.now??Date.now();if(j(t,r,()=>{let e=k(t);return e.lastAttemptedAt!==void 0&&r-e.lastAttemptedAt<864e5?!1:A({...e,lastAttemptedAt:r},t)}))try{(e.spawnWorker??P)()}catch{}}async function I(e,t,r,i){if(!(0,T.default)(t))return{status:`failed`};let a=await i(`https://registry.npmjs.org/${encodeURIComponent(e)}/${r}`,{headers:{accept:`application/json`,"user-agent":`cf-cli/${n}`},signal:AbortSignal.timeout(3e3)});if(!a.ok)return{status:`failed`};let o=await a.json();if(typeof o!=`object`||!o||Array.isArray(o))return{status:`failed`};let s=o;return s.name!==e||typeof s.version!=`string`||!(0,T.default)(s.version)?{status:`failed`}:(0,S.default)(s.version,t)?{status:`update-available`,latest:s.version}:{status:`up-to-date`}}async function L(e={}){let t=e.currentVersion??n,r=e.cachePath??O(t),i=e.now??Date.now();try{let n=await(e.check??((t,n,r)=>I(t,n,r,e.fetch??globalThis.fetch)))(`cf`,t,`latest`);if(n.status===`failed`)return;let a=n.status===`update-available`?n.latest:t;if(!(0,T.default)(a))return;A({...k(r),latestVersion:a,lastSuccessfulAt:i},r)}catch{}}export{L as i,N as n,F as r,E as t};
2
+ import{i as e,n as t}from"./source-mXUcrTVw.mjs";import{n}from"./version-BGnqDvNR.mjs";import{i as r}from"./cf-oRSQKirD.mjs";import{r as i,t as a}from"./gt-3bcLGJ7V.mjs";import{closeSync as o,mkdirSync as s,openSync as c,readFileSync as l,renameSync as u,statSync as d,unlinkSync as f,writeFileSync as p}from"node:fs";import{dirname as m,join as h}from"node:path";import{fileURLToPath as g}from"node:url";import{spawn as _}from"node:child_process";var v=/* @__PURE__ */ t(((e,t)=>{let n=i();t.exports=(e,t)=>new n(e,t).major})),y=/* @__PURE__ */ t(((e,t)=>{let n=i();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),b=/* @__PURE__ */ t(((e,t)=>{let n=y();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),x=/* @__PURE__ */ t(((e,t)=>{let n=y();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),S=/* @__PURE__ */ e(a(),1),C=/* @__PURE__ */ e(v(),1),w=/* @__PURE__ */ e(b(),1),T=/* @__PURE__ */ e(x(),1);const E=864e5;function D(e){return(0,w.default)(e)?.includes(`beta`)?`beta`:`latest`}function O(e=n){return h(r(),`cache`,`update-check-${D(e)}.json`)}function k(e=O()){try{let t=JSON.parse(l(e,`utf8`));if(typeof t!=`object`||!t||Array.isArray(t))return{};let n=t;return{lastAttemptedAt:typeof n.lastAttemptedAt==`number`&&Number.isFinite(n.lastAttemptedAt)?n.lastAttemptedAt:void 0,lastSuccessfulAt:typeof n.lastSuccessfulAt==`number`&&Number.isFinite(n.lastSuccessfulAt)?n.lastSuccessfulAt:void 0,latestVersion:typeof n.latestVersion==`string`&&(0,T.default)(n.latestVersion)?n.latestVersion:void 0}}catch{return{}}}function A(e,t=O()){let n=`${t}.${process.pid}.tmp`;try{return s(m(t),{recursive:!0}),p(n,`${JSON.stringify(e)}\n`,{encoding:`utf8`,mode:384}),u(n,t),!0}catch{try{f(n)}catch{}return!1}}function j(e,t,n){let r=`${e}.lock`,i;try{s(m(e),{recursive:!0});try{i=c(r,`wx`,384)}catch{try{if(t-d(r).mtimeMs<=5e3)return;f(r),i=c(r,`wx`,384)}catch{return}}return n()}catch{return}finally{if(i!==void 0)try{o(i),f(r)}catch{}}}function M(e,t){if(!(0,T.default)(e)||!t.latestVersion||!(0,S.default)(t.latestVersion,e))return;let n=(0,C.default)(t.latestVersion)>(0,C.default)(e);return{latestVersion:t.latestVersion,isMajor:n}}function N(e,t=O(e)){return M(e,k(t))}function P(){let e=import.meta.url.endsWith(`.ts`),t=new URL(e?`../update-check-worker.ts`:`./update-check-worker.mjs`,import.meta.url),n=e?[...process.execArgv,g(t)]:[g(t)];_(process.execPath,n,{detached:!0,stdio:`ignore`,windowsHide:!0}).unref()}function F(e={}){let t=e.cachePath??O(e.currentVersion??n),r=e.now??Date.now();if(j(t,r,()=>{let e=k(t);return e.lastAttemptedAt!==void 0&&r-e.lastAttemptedAt<864e5?!1:A({...e,lastAttemptedAt:r},t)}))try{(e.spawnWorker??P)()}catch{}}async function I(e,t,r,i){if(!(0,T.default)(t))return{status:`failed`};let a=await i(`https://registry.npmjs.org/${encodeURIComponent(e)}/${r}`,{headers:{accept:`application/json`,"user-agent":`cf-cli/${n}`},signal:AbortSignal.timeout(3e3)});if(!a.ok)return{status:`failed`};let o=await a.json();if(typeof o!=`object`||!o||Array.isArray(o))return{status:`failed`};let s=o;return s.name!==e||typeof s.version!=`string`||!(0,T.default)(s.version)?{status:`failed`}:(0,S.default)(s.version,t)?{status:`update-available`,latest:s.version}:{status:`up-to-date`}}async function L(e={}){let t=e.currentVersion??n,r=e.cachePath??O(t),i=e.now??Date.now();try{let n=await(e.check??((t,n,r)=>I(t,n,r,e.fetch??globalThis.fetch)))(`cf`,t,`latest`);if(n.status===`failed`)return;let a=n.status===`update-available`?n.latest:t;if(!(0,T.default)(a))return;A({...k(r),latestVersion:a,lastSuccessfulAt:i},r)}catch{}}export{L as i,N as n,F as r,E as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{n as e,r as t}from"./update-check-HFkPml6x.mjs";export{e as getUpdateNotice,t as maybeStartBackgroundUpdateCheck};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./update-check-CMXSdres.mjs";await e();export{};
2
+ import{i as e}from"./update-check-HFkPml6x.mjs";await e();export{};
@@ -1,4 +1,4 @@
1
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,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 url-info get
2
+ import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,t as r}from"./context-BBLtgdR1.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-CQqDtgmF.mjs";import{t as s}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";function c(e){return e.usage(`$0 url-info get
3
3
 
4
4
  Return submitted URLs based on ID`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Read submitted URLs by ID`,builder:c,handler:async c=>s({command:`url-info get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf url-info get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/brand-protection/url-info`,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.urlInfo.get({account_id:l}));i(u,{successLabel:`Loaded`})})},u={command:`url-info`,describe:`url-info`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{u as default};
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-CGLsxbc6.mjs";import{i as t}from"./context-q7UaYK69.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-BtkTVcHI.mjs";import{t as a}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{i as l,n as u}from"./prompt-RlgRrmbm.mjs";function d(e){return e.usage(`$0 url-normalization delete
2
+ import{n as e}from"./auth-CAWalgW0.mjs";import{i as t}from"./context-BBLtgdR1.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-CQqDtgmF.mjs";import{t as a}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{i as l,n as u}from"./prompt-C8FyienX.mjs";function d(e){return e.usage(`$0 url-normalization delete
3
3
 
4
4
  Deletes the URL Normalization settings.`).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`,describe:`Delete URL Normalization settings`,builder:d,handler:async o=>a({command:`url-normalization delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf url-normalization delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/url_normalization`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
5
5
  `);return}let c=await i(`Deleting`,async()=>a.urlNormalization.delete({zone_id:s}));n(c,{successLabel:`Deleted`})})};function p(e){return e.usage(`$0 url-normalization get
6
6
 
7
7
  Fetches the current URL Normalization settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`get`,describe:`Get URL Normalization settings`,builder:p,handler:async o=>a({command:`url-normalization get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf url-normalization get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/url_normalization`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.urlNormalization.get({zone_id:s}));n(c,{successLabel:`Loaded`})})};function h(e){return e.usage(`$0 url-normalization update
8
8
 
9
- Updates the URL Normalization settings.`).option(`scope`,{type:`string`,description:`The scope of the URL normalization.`,choices:[`incoming`,`both`,`none`]}).option(`type`,{type:`string`,description:`The type of URL normalization performed by Cloudflare.`,choices:[`cloudflare`,`rfc3986`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A URL Normalization object.`})}const g={command:`update`,describe:`Update URL Normalization settings`,builder:h,handler:async u=>a({command:`url-normalization update`,classification:{safeFlags:[`scope`,`type`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf url-normalization update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/url_normalization`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({scope:c(u.scope,`scope`,`text`),type:c(u.type,`type`,`text`)}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body),t=await i(`Updating`,async()=>a.urlNormalization.update({body:e,zone_id:d}));n(t,{successLabel:`Updated`});return}u.scope===void 0&&(u.scope=await l(`scope`,`The scope of the URL normalization.`,[`incoming`,`both`,`none`])),u.type===void 0&&(u.type=await l(`type`,`The type of URL normalization performed by Cloudflare.`,[`cloudflare`,`rfc3986`]));let f=s({scope:c(u.scope,`scope`,`text`),type:c(u.type,`type`,`text`)}),p=await i(`Updating`,async()=>a.urlNormalization.update({body:f,zone_id:d}));n(p,{successLabel:`Updated`})})},_={command:`url-normalization`,describe:`url-normalization`,builder:e=>e.command(f).command(m).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_ as default};
9
+ Updates the URL Normalization settings.`).option(`scope`,{type:`string`,description:`The scope of the URL normalization.`,choices:[`incoming`,`both`,`none`]}).coerce(`scope`,e=>c(e,`scope`,`text`)).option(`type`,{type:`string`,description:`The type of URL normalization performed by Cloudflare.`,choices:[`cloudflare`,`rfc3986`]}).coerce(`type`,e=>c(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A URL Normalization object.`})}const g={command:`update`,describe:`Update URL Normalization settings`,builder:h,handler:async c=>a({command:`url-normalization update`,classification:{safeFlags:[`scope`,`type`,`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf url-normalization update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/url_normalization`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({scope:c.scope,type:c.type}):o(c.body)});return}let a=await e(c),u=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=u,c.body){let e=o(c.body),t=await i(`Updating`,async()=>a.urlNormalization.update({body:e,zone_id:u}));n(t,{successLabel:`Updated`});return}c.scope===void 0&&(c.scope=await l(`scope`,`The scope of the URL normalization.`,[`incoming`,`both`,`none`])),c.type===void 0&&(c.type=await l(`type`,`The type of URL normalization performed by Cloudflare.`,[`cloudflare`,`rfc3986`]));let d=s({scope:c.scope,type:c.type}),f=await i(`Updating`,async()=>a.urlNormalization.update({body:d,zone_id:u}));n(f,{successLabel:`Updated`})})},_={command:`url-normalization`,describe:`url-normalization`,builder:e=>e.command(f).command(m).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_ as default};