cf 1.0.0-beta.10 → 1.0.0-beta.11

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 (305) hide show
  1. package/dist/{abuse-reports-BhSTEz7h.mjs → abuse-reports-DX5xgeka.mjs} +10 -10
  2. package/dist/{access-D4DN4XZF.mjs → access-DuHs0Mii.mjs} +1 -1
  3. package/dist/{account-tags-BWEIZLID.mjs → account-tags-CiKwgOWd.mjs} +5 -5
  4. package/dist/{accounts-ZQvIqGJz.mjs → accounts-DfXSHrkF.mjs} +62 -62
  5. package/dist/{acm-OQqE8FMc.mjs → acm-BgSr3Ig4.mjs} +7 -7
  6. package/dist/{addressing-DCFm17JQ.mjs → addressing-B70NFnrX.mjs} +49 -49
  7. package/dist/{agent-memory-BtfPt2me.mjs → agent-memory-DJRquHeq.mjs} +15 -15
  8. package/dist/{ai-B0_sZbmy.mjs → ai-CP2oIS-I.mjs} +16 -16
  9. package/dist/{ai-audit-DaubuhYF.mjs → ai-audit-Bn_BfMFS.mjs} +3 -3
  10. package/dist/{ai-gateway-CJ-1Dzzr.mjs → ai-gateway-CrrEtzUP.mjs} +44 -44
  11. package/dist/{ai-search-Dywa1kqX.mjs → ai-search-C4YWVTCa.mjs} +42 -42
  12. package/dist/{ai-security-2wxMPqKS.mjs → ai-security-Bt_fG65f.mjs} +4 -4
  13. package/dist/{alerting-yad9DYRv.mjs → alerting-CRr88fVR.mjs} +26 -26
  14. package/dist/{analytics-DKNw2fVc.mjs → analytics-XqS9OP5B.mjs} +10 -10
  15. package/dist/{analytics_engine-BA3kF46s.mjs → analytics_engine-CzmYem4f.mjs} +2 -2
  16. package/dist/{api-security-CSuYMpMO.mjs → api-security-gB1FHrHq.mjs} +57 -57
  17. package/dist/{argo-DMfNmOV4.mjs → argo-wFCAsYx7.mjs} +5 -5
  18. package/dist/{artifacts-Cb3hwClm.mjs → artifacts-qFjlNRqb.mjs} +20 -20
  19. package/dist/{audit-logs-BrjNuiLx.mjs → audit-logs-CpPUjMUP.mjs} +2 -2
  20. package/dist/auth-7Fk7PVIC.mjs +2 -0
  21. package/dist/auth-BmJ946bE.mjs +2 -0
  22. package/dist/auth-Br-t8vL_.mjs +2 -0
  23. package/dist/auth-token-DeG33BMQ.mjs +8 -0
  24. package/dist/{autoconfig-DPUztTL2.mjs → autoconfig-D-copdZG.mjs} +2 -2
  25. package/dist/{banner-ClclgnBn.mjs → banner-Xk4xBN8U.mjs} +1 -1
  26. package/dist/{basin-catalog-BLsQhJP4.mjs → basin-catalog-CshcpsAH.mjs} +17 -17
  27. package/dist/{billing-CRwD7oQS.mjs → billing-B-xNxxiP.mjs} +11 -11
  28. package/dist/{bot-management-CyW8F8Wm.mjs → bot-management-DhafeA2J.mjs} +4 -4
  29. package/dist/{botnet-feed-BBKsxf3Y.mjs → botnet-feed-D6uCLE_D.mjs} +5 -5
  30. package/dist/{brand-protection-DSeD8LXl.mjs → brand-protection-c3WiHbYn.mjs} +13 -13
  31. package/dist/{browser-run-BAcUTwB4.mjs → browser-run-D9_cwaSD.mjs} +24 -24
  32. package/dist/build-9ihDp-Gy.mjs +2 -0
  33. package/dist/{build-B5UYMEQH.mjs → build-DrG6TqMw.mjs} +1 -1
  34. package/dist/{builds-W1HEG7Bv.mjs → builds-Dl8if-2k.mjs} +32 -32
  35. package/dist/{cache-B7E_PXUp.mjs → cache-CIZokBjd.mjs} +24 -24
  36. package/dist/{certificate-authorities-D_uAJH9B.mjs → certificate-authorities-NUQzCDK8.mjs} +3 -3
  37. package/dist/{cf-Bh_fTFIj.mjs → cf-DfQfIu3q.mjs} +1 -1
  38. package/dist/{chunk-FT2NMTJB-1VFYM1Ro.mjs → chunk-FT2NMTJB-BFqlGcem.mjs} +1 -1
  39. package/dist/{chunk-KKDV4JPS-DdzLLtnl.mjs → chunk-KKDV4JPS-B_t8sDTz.mjs} +1 -1
  40. package/dist/{cli-BeXSqJAj.mjs → cli-aChy8ou_.mjs} +1 -1
  41. package/dist/{client-certificates-DqFcK_s1.mjs → client-certificates-qgLpBn8t.mjs} +6 -6
  42. package/dist/{client-side-security-DJXZ1XAu.mjs → client-side-security-DZO6Xw14.mjs} +14 -14
  43. package/dist/{cloud-connector-Czg1GdQi.mjs → cloud-connector-C7vGDCzX.mjs} +3 -3
  44. package/dist/{cloudflared-DGuau-lC.mjs → cloudflared-CEfZhSQH.mjs} +1 -1
  45. package/dist/{cloudforce-one-B1IhIZcp.mjs → cloudforce-one-CE7y5UkF.mjs} +237 -237
  46. package/dist/{command-xU78ACNA.mjs → command-07vhr56i.mjs} +1 -1
  47. package/dist/{command-DxSJy_ym.mjs → command-B6TpINoN.mjs} +1 -1
  48. package/dist/{command-BCag-xjk.mjs → command-BWC9CbE7.mjs} +1 -1
  49. package/dist/{command-B6DqnUwt.mjs → command-BsmF3J_l.mjs} +1 -1
  50. package/dist/command-C2pNxAeL.mjs +2 -0
  51. package/dist/{command-TCklVvOY.mjs → command-C65Ed0o9.mjs} +1 -1
  52. package/dist/{command-DUafPVUr.mjs → command-Cdx___59.mjs} +1 -1
  53. package/dist/{command-BOLlvEan.mjs → command-CrtDkZNs.mjs} +1 -1
  54. package/dist/{command-C__qB2mo.mjs → command-D0MKPucK.mjs} +1 -1
  55. package/dist/{command-DfffeX-k.mjs → command-DHdWKtqx.mjs} +1 -1
  56. package/dist/{command-DZookrfw.mjs → command-Ds5OVat3.mjs} +1 -1
  57. package/dist/{command-BrHTpaji.mjs → command-Dv6YavZa.mjs} +1 -1
  58. package/dist/{command-DzHL5LKI.mjs → command-dAYWrB5y.mjs} +1 -1
  59. package/dist/{command-K1-DZFJS.mjs → command-eM48o0J6.mjs} +1 -1
  60. package/dist/{command-6YTtWltE.mjs → command-maDJWJgu.mjs} +1 -1
  61. package/dist/{completions-Cm9brGAI.mjs → completions-D0280hul.mjs} +1 -1
  62. package/dist/{connector-interrupts-D93KTMkw.mjs → connector-interrupts-CVjFhU-C.mjs} +3 -3
  63. package/dist/{connector-telemetry-events-D6CmKR14.mjs → connector-telemetry-events-Bu3LKP6T.mjs} +3 -3
  64. package/dist/{connector-telemetry-snapshots-WO9IUk0e.mjs → connector-telemetry-snapshots-BbDTIc06.mjs} +3 -3
  65. package/dist/{connectors-DNT6GTW3.mjs → connectors-DGtx-rPI.mjs} +7 -7
  66. package/dist/{containers-Ce7IO-Ia.mjs → containers-CzNbBrYE.mjs} +2 -2
  67. package/dist/{containers-Btx7vCDP.mjs → containers-DEFrbNgO.mjs} +16 -16
  68. package/dist/{content-scan-C_ROsbTJ.mjs → content-scan-BCtWBCqd.mjs} +6 -6
  69. package/dist/{context-CEOHpZgd.mjs → context-CquYYyS3.mjs} +2 -2
  70. package/dist/{cps-BPQqyL2E.mjs → cps-C8BbnbuD.mjs} +1 -1
  71. package/dist/{csamScanner-D-oO5cxT.mjs → csamScanner-CsJ9H2fA.mjs} +3 -3
  72. package/dist/{ct-alerting-CnTRE1Fb.mjs → ct-alerting-CYsQZO2H.mjs} +3 -3
  73. package/dist/{custom-certificates-DvnFBZdJ.mjs → custom-certificates-CA8HqolM.mjs} +7 -7
  74. package/dist/{custom-csrs-BZ8TXbuQ.mjs → custom-csrs-D0P2vWJE.mjs} +5 -5
  75. package/dist/{custom-hostnames-CTqf-KlT.mjs → custom-hostnames-CzYMChbh.mjs} +12 -12
  76. package/dist/{custom-nameservers-B0CpnUVg.mjs → custom-nameservers-Cet3oF56.mjs} +5 -5
  77. package/dist/{custom-pages-DcoSGN56.mjs → custom-pages-DUkHIaTP.mjs} +10 -10
  78. package/dist/d1-B2duXfH2.mjs +41 -0
  79. package/dist/{dcv-delegation-yOtz90qE.mjs → dcv-delegation-BkdRVEAH.mjs} +2 -2
  80. package/dist/delegate.mjs +1 -1
  81. package/dist/{deploy-C4p6SzLH.mjs → deploy-BdWBEbLj.mjs} +1 -1
  82. package/dist/{deploy-input-DTjBGloL.mjs → deploy-input-LmLfj6kI.mjs} +1 -1
  83. package/dist/{dev-BML-bpNU.mjs → dev-BHkVwAea.mjs} +1 -1
  84. package/dist/{diagnostics-hOvnx5DT.mjs → diagnostics-9Wj5UWBL.mjs} +7 -7
  85. package/dist/{dialog-BlUXJKbA.mjs → dialog-Dpi-UVbz.mjs} +1 -1
  86. package/dist/discover-BYkHr5Ja.mjs +2 -0
  87. package/dist/{dist-DW47TUGh.mjs → dist-Cpb7_h4N.mjs} +1 -1
  88. package/dist/{dist-BuCJ_55d.mjs → dist-D1iG7guo.mjs} +1 -1
  89. package/dist/{dist-C3s9SXTd.mjs → dist-zep5OXGt.mjs} +1 -1
  90. package/dist/{dls-v6DyEWTd.mjs → dls-Caya7FZc.mjs} +8 -8
  91. package/dist/{dns-C9sUPsNt.mjs → dns-BLNa0GrP.mjs} +63 -63
  92. package/dist/{dns-firewall-EDiT-Zli.mjs → dns-firewall-ChCvC5rT.mjs} +8 -8
  93. package/dist/{dot-prop-IITUZ2XW-BilKo4kO.mjs → dot-prop-IITUZ2XW-BsZYdILY.mjs} +1 -1
  94. package/dist/dry-run-p9Q7nMZ5.mjs +2 -0
  95. package/dist/{durable-objects-C01phVwL.mjs → durable-objects-DuRbdp7N.mjs} +3 -3
  96. package/dist/{email-auth-BgvoEHJk.mjs → email-auth-C28s03aI.mjs} +3 -3
  97. package/dist/{email-routing-Bggn219w.mjs → email-routing-Ci-xjXIN.mjs} +24 -24
  98. package/dist/{email-security-_t7rzrzd.mjs → email-security-DPU6xvI9.mjs} +71 -71
  99. package/dist/{email-sending-_dKCs2VF.mjs → email-sending-kTVAlVKO.mjs} +23 -23
  100. package/dist/error-sanitization-BbEw--0B.mjs +2 -0
  101. package/dist/error-sanitization-p5rmb53x.mjs +2 -0
  102. package/dist/errors-cuuW88wR.mjs +3 -0
  103. package/dist/{fieldExtractors-Cm5QnkE0.mjs → fieldExtractors-ceaXu4zD.mjs} +4 -4
  104. package/dist/{firewall-CZEN8iA_.mjs → firewall-BND3qSY2.mjs} +18 -18
  105. package/dist/{flagship-B_SAI_ZL.mjs → flagship-DfxbNzgx.mjs} +15 -15
  106. package/dist/{fraud-9_9hobAh.mjs → fraud-DgyYv_CC.mjs} +3 -3
  107. package/dist/generate-9P8Q_RiO.mjs +2 -0
  108. package/dist/{generate-CLqGOlOx.mjs → generate-VxmGG8BF.mjs} +1 -1
  109. package/dist/{google-tag-gateway-O_N0vHRY.mjs → google-tag-gateway-v3p7murv.mjs} +3 -3
  110. package/dist/{healthchecks-Bt3Gw_JZ.mjs → healthchecks-CByb4qYA.mjs} +10 -10
  111. package/dist/{hostnames-DdOube3R.mjs → hostnames-3CqeMF5g.mjs} +6 -6
  112. package/dist/{hyperdrive-C14NAh9l.mjs → hyperdrive-CmyYTE-K.mjs} +9 -9
  113. package/dist/{iam-DUW7neMx.mjs → iam-CV_M681j.mjs} +24 -24
  114. package/dist/{images-B9dnr1z0.mjs → images-DaLPjskW.mjs} +38 -38
  115. package/dist/index.mjs +1 -1
  116. package/dist/{init-BGcAIvV7.mjs → init-CBKifk5L.mjs} +2 -2
  117. package/dist/{intel-BQpZMck3.mjs → intel-MpftjuPB.mjs} +37 -37
  118. package/dist/interactive-mJQ_IrGd.mjs +2 -0
  119. package/dist/{ips-PT_uQKAf.mjs → ips-WWvPwSBc.mjs} +1 -1
  120. package/dist/{k2-nPYti7Y0.mjs → k2-D0QYUFqT.mjs} +6 -6
  121. package/dist/{keyless-certificates-BHvas2q1.mjs → keyless-certificates-DqILy3t9.mjs} +6 -6
  122. package/dist/{keys-O5kAW9ox.mjs → keys-DhX4AcqF.mjs} +2 -2
  123. package/dist/{kv-BUP_ZLM_.mjs → kv-DLUfUL0_.mjs} +9 -9
  124. package/dist/{lazy-command-glNW3jzf.mjs → lazy-command--5YpWUVY.mjs} +1 -1
  125. package/dist/{leaked-credential-checks-De9hI1rl.mjs → leaked-credential-checks-C0U1oYM5.mjs} +8 -8
  126. package/dist/{load-balancers-Cs6bUHS1.mjs → load-balancers-BJKI9lm7.mjs} +39 -39
  127. package/dist/local-DkYQiSQQ.mjs +2 -0
  128. package/dist/{local-B5oRPTEN.mjs → local-rYpzEQb-.mjs} +1 -1
  129. package/dist/{local-runtime-CZnegFEM.mjs → local-runtime-DZTTIe6x.mjs} +1 -1
  130. package/dist/{login-C5nSIS-T.mjs → login-CnE2Ii_F.mjs} +1 -1
  131. package/dist/login-bnylLTit.mjs +5 -0
  132. package/dist/{logo-matches-BkQKdu4Z.mjs → logo-matches-DFZybI0C.mjs} +3 -3
  133. package/dist/{logos-C_sv-boo.mjs → logos-Da2YtqSN.mjs} +4 -4
  134. package/dist/{logpush-NUcyMKHi.mjs → logpush-Q7WIEHS1.mjs} +23 -23
  135. package/dist/{logs-BZT4PlqZ.mjs → logs-c3b3USyS.mjs} +12 -12
  136. package/dist/{magic-cloud-networking-DQnSdmgA.mjs → magic-cloud-networking-BoyDmFq3.mjs} +37 -37
  137. package/dist/{magic-network-monitoring-pHTU6aS8.mjs → magic-network-monitoring-BkUbpMUp.mjs} +18 -18
  138. package/dist/{magic-transit-5302bQNh.mjs → magic-transit-4-THD45G.mjs} +161 -161
  139. package/dist/{managed-defense-8OEfDzuO.mjs → managed-defense-CTMqSp6z.mjs} +9 -9
  140. package/dist/{managed-transforms-CCpUz4TY.mjs → managed-transforms-DcYAvqTe.mjs} +4 -4
  141. package/dist/{matches-BSiYXs99.mjs → matches-hnU16rSJ.mjs} +3 -3
  142. package/dist/{mcp-CCMiS75R.mjs → mcp-kZX4irfN.mjs} +15 -15
  143. package/dist/{mesh-DKBGTlCD.mjs → mesh-Dxzvvso6.mjs} +12 -12
  144. package/dist/{migrate-BJ9Go_wP.mjs → migrate-BNvUWrjy.mjs} +1 -1
  145. package/dist/{monetization-CFf_lb6x.mjs → monetization-Dsqj9DCA.mjs} +11 -11
  146. package/dist/{mtls-certificates-DsF3NFNs.mjs → mtls-certificates-BSbMwIna.mjs} +6 -6
  147. package/dist/{network-interconnects-YiRUBbjx.mjs → network-interconnects-osO_vAPu.mjs} +17 -17
  148. package/dist/{network-Bm0qYRqY.mjs → network-mEnXTEiG.mjs} +24 -24
  149. package/dist/{oauth-cNZUky3h.mjs → oauth-CeZ3d_dB.mjs} +2 -2
  150. package/dist/{oauth-clients-CP6alY0_.mjs → oauth-clients-CWPHi-Yn.mjs} +7 -7
  151. package/dist/{oauth-scopes-xl-pcWdg.mjs → oauth-scopes-CxpRD6d7.mjs} +1 -1
  152. package/dist/{oauth-DxGgIwFc.mjs → oauth-w0fWmrwU.mjs} +1 -1
  153. package/dist/{observability-Bp71PtlD.mjs → observability-BxL2RqWZ.mjs} +44 -44
  154. package/dist/{organization-Dbom1gTR.mjs → organization-DNieJ1xJ.mjs} +1 -1
  155. package/dist/{organizations-OUMVsuen.mjs → organizations-BIXPmTy5.mjs} +1 -1
  156. package/dist/{origin-ca-certificates-B3-T0-Nn.mjs → origin-ca-certificates-dVJvSIH8.mjs} +1 -1
  157. package/dist/{origin-post-quantum-encryption-CGB6AfPa.mjs → origin-post-quantum-encryption-CO6tDW1t.mjs} +3 -3
  158. package/dist/{origin-tls-client-auth-CgzzfAWr.mjs → origin-tls-client-auth-DeTY8aN2.mjs} +14 -14
  159. package/dist/output-ClYel9WX.mjs +2 -0
  160. package/dist/{page-rules-B9BQKU4_.mjs → page-rules-DA552Ra4.mjs} +7 -7
  161. package/dist/{pages-DZPdyuT4.mjs → pages-B0x7tidm.mjs} +27 -27
  162. package/dist/{pay-per-crawl-CnveMVDi.mjs → pay-per-crawl-DoTg9VP7.mjs} +32 -32
  163. package/dist/{pay-per-use-Bpxe8PHv.mjs → pay-per-use-yRO2QBfe.mjs} +3 -3
  164. package/dist/{pipelines-CHev3o5G.mjs → pipelines-CQxrm9ao.mjs} +20 -20
  165. package/dist/{precursor-C9PK9Bue.mjs → precursor-FiGYDRV9.mjs} +2 -2
  166. package/dist/previews-BthBa50j.mjs +4 -0
  167. package/dist/{progress-A61dRbXl.mjs → progress-TLUEIYE6.mjs} +1 -1
  168. package/dist/{prompt-CGUzvBgY.mjs → prompt-Ck_1PCHm.mjs} +1 -1
  169. package/dist/{queries-f-btyefs.mjs → queries-C0RRdol7.mjs} +4 -4
  170. package/dist/{queues-kLNdeb3q.mjs → queues-sLgvjsRP.mjs} +26 -26
  171. package/dist/{r2-D_awYx2p.mjs → r2-C2PllL6i.mjs} +63 -63
  172. package/dist/{radar-CU4T02Ag.mjs → radar-Bez6k9Dw.mjs} +1 -1
  173. package/dist/raw-fetch-DNxNCoeP.mjs +2 -0
  174. package/dist/{realtime-C0dvcBBM.mjs → realtime-D-HSXznX.mjs} +78 -78
  175. package/dist/{registrar-CHc-4vcf.mjs → registrar-DwHrG9QR.mjs} +9 -9
  176. package/dist/{registrar-sandbox-Dq8LV2AI.mjs → registrar-sandbox-jNukmzQP.mjs} +6 -6
  177. package/dist/{registry-Cg5lP8oo.mjs → registry-CsSLAAOE.mjs} +1 -1
  178. package/dist/{reporting-4u21g6Dk.mjs → reporting-DolhAb10.mjs} +7 -7
  179. package/dist/{request-headers-D31kdxrQ.mjs → request-headers-Lhj314mk.mjs} +1 -1
  180. package/dist/{request-tracers-CupJ_83j.mjs → request-tracers-w72hKc33.mjs} +2 -2
  181. package/dist/resolve-Djf2xgBx.mjs +2 -0
  182. package/dist/{resource-sharing-CO-Lh-u7.mjs → resource-sharing-DTrSkqI4.mjs} +18 -18
  183. package/dist/{resource-tagging-D0R5SzR6.mjs → resource-tagging-aURR4fIJ.mjs} +2 -2
  184. package/dist/{rules-BsmKzB9H.mjs → rules-C8a7cV-W.mjs} +8 -8
  185. package/dist/{rulesets-HOOnxHZZ.mjs → rulesets-RJ6yBefy.mjs} +17 -17
  186. package/dist/{rum-wcLEvVJl.mjs → rum-Bk1dPW4p.mjs} +14 -14
  187. package/dist/run-BJOAPmsz.mjs +2 -0
  188. package/dist/{run-CIJTelJL.mjs → run-iFM5TxtQ.mjs} +1 -1
  189. package/dist/{schema-flags-D8vL2oiF.mjs → schema-flags-PagOq-G2.mjs} +1 -1
  190. package/dist/{schema-GdBsV4P7.mjs → schema-v7mOxMdx.mjs} +1 -1
  191. package/dist/{scim-BkdJmAS8.mjs → scim-C0FmjkkV.mjs} +10 -10
  192. package/dist/{secrets-store-CHs0oYA0.mjs → secrets-store-cG_5RMzK.mjs} +11 -11
  193. package/dist/{security-insights-vsl-4xFa.mjs → security-insights-DVAqroY5.mjs} +20 -20
  194. package/dist/{security-txt-Fnl3LdSn.mjs → security-txt-rfrrdiZV.mjs} +4 -4
  195. package/dist/{session-CZTuHcbm.mjs → session-B6mFkaVZ.mjs} +1 -1
  196. package/dist/shared-BqsWoApw.mjs +2 -0
  197. package/dist/{smart-shield-DB0E7cZI.mjs → smart-shield-_HA814Im.mjs} +11 -11
  198. package/dist/{snippets-CFaF_NyG.mjs → snippets-mRelEw0p.mjs} +10 -10
  199. package/dist/{spawn-B0Sl8lUu.mjs → spawn-BzPhcLJI.mjs} +1 -1
  200. package/dist/{spectrum-DtG0jYjE.mjs → spectrum-BwtOiaDw.mjs} +11 -11
  201. package/dist/{speed-B-RiNHGK.mjs → speed-DmqsZtiJ.mjs} +11 -11
  202. package/dist/{src-CM3XaB4p.mjs → src--KDGqL5N.mjs} +5 -5
  203. package/dist/{ssl-DBVpCZAM.mjs → ssl-DCvfveJB.mjs} +16 -16
  204. package/dist/{startup-profile-CR7GMuLx.mjs → startup-profile-BCe9k9sR.mjs} +1 -1
  205. package/dist/startup-profile-WrwRyMwH.mjs +2 -0
  206. package/dist/{state-BaGRaYow.mjs → state-BPwdiNO_.mjs} +1 -1
  207. package/dist/state-a1tTOGjm.mjs +2 -0
  208. package/dist/{stream-cAdBvpS1.mjs → stream-aroClJeD.mjs} +56 -56
  209. package/dist/{submit-Bkd7l2rK.mjs → submit-BBKhoKT8.mjs} +2 -2
  210. package/dist/{tags--eph7JbN.mjs → tags-Djw0e-4j.mjs} +2 -2
  211. package/dist/telemetry-DoBQOGRk.mjs +2 -0
  212. package/dist/{telemetry-51etasAu.mjs → telemetry-DrFNujdx.mjs} +1 -1
  213. package/dist/{tenant-custom-nameservers-B5IIIwbz.mjs → tenant-custom-nameservers-XCbXryBZ.mjs} +1 -1
  214. package/dist/{tenant-Bj-He2xO.mjs → tenant-tc1wb_ym.mjs} +1 -1
  215. package/dist/{tools-BJZ0DDlL.mjs → tools-CB4NleeJ.mjs} +1 -1
  216. package/dist/{tunnels-CgtuRpcD.mjs → tunnels-C2FTswb6.mjs} +13 -13
  217. package/dist/{turnstile-Bmcnrzw7.mjs → turnstile-BV4Mdd-j.mjs} +6 -6
  218. package/dist/{ui-BQxRjahW.mjs → ui-D1hhIDIs.mjs} +1 -1
  219. package/dist/update-check-CFt6cMOi.mjs +2 -0
  220. package/dist/{update-check-DC0qP_8z.mjs → update-check-Dtj9fzNe.mjs} +1 -1
  221. package/dist/update-check-worker.mjs +1 -1
  222. package/dist/{url-info-DhVehaT8.mjs → url-info-CeegsDK7.mjs} +2 -2
  223. package/dist/{url-normalization-BpGDUUQc.mjs → url-normalization-Dbypc9wz.mjs} +4 -4
  224. package/dist/{url-scanner-DiLdqsQk.mjs → url-scanner-BFXMrpJF.mjs} +8 -8
  225. package/dist/{user-B6P5_OjP.mjs → user-3uwLMH78.mjs} +1 -1
  226. package/dist/{values-Cxx4Lxrd.mjs → values-BTncDc3U.mjs} +2 -2
  227. package/dist/{vectorize-YyxVpql-.mjs → vectorize-CtMAtx8r.mjs} +17 -17
  228. package/dist/version-oN1bmOgM.mjs +2 -0
  229. package/dist/{waiting-rooms-BdahlCdD.mjs → waiting-rooms-1xDvjF13.mjs} +25 -25
  230. package/dist/{web-assets-yaKxN4w_.mjs → web-assets-BfEprX1S.mjs} +29 -29
  231. package/dist/{web3-Bu9c_QAt.mjs → web3-DNbp5sZw.mjs} +13 -13
  232. package/dist/{workers-5GgoGA2e.mjs → workers-DK_JgS4Y.mjs} +18 -18
  233. package/dist/{workers-builds-h-1FJjE1.mjs → workers-builds-CdhwmmsQ.mjs} +7 -7
  234. package/dist/{workers-for-platforms-CV9iRrp9.mjs → workers-for-platforms-CP6IqxrK.mjs} +23 -23
  235. package/dist/{workers-vpc-C1oUHHqk.mjs → workers-vpc-LVfayM2-.mjs} +6 -6
  236. package/dist/{workflows-dtMlkj1-.mjs → workflows-CA5K8FFb.mjs} +23 -23
  237. package/dist/{wrangler-migration-CJEb9hY3.mjs → wrangler-migration-B0mKHqGd.mjs} +1 -1
  238. package/dist/{zaraz-838AbMEX.mjs → zaraz-BY60ZUQ4.mjs} +11 -11
  239. package/dist/{zero-trust-CYt-eELJ.mjs → zero-trust-CQNohO7_.mjs} +416 -416
  240. package/dist/{zone-uJwRLSnn.mjs → zone-BVDW2UGd.mjs} +2 -2
  241. package/dist/{zones-Dpofsnth.mjs → zones-CcZL0YQp.mjs} +44 -44
  242. package/package.json +9 -4
  243. package/dist/auth-BBlAI8HG.mjs +0 -2
  244. package/dist/auth-BIr56Mbx.mjs +0 -8
  245. package/dist/build-DLZ9gBNA.mjs +0 -2
  246. package/dist/command-CAtsHc1V.mjs +0 -2
  247. package/dist/d1-m7UfzBzl.mjs +0 -41
  248. package/dist/discover-DwczTkRX.mjs +0 -2
  249. package/dist/dry-run-Bq0JAsbX.mjs +0 -2
  250. package/dist/error-sanitization-CJ5OLJrh.mjs +0 -2
  251. package/dist/error-sanitization-hmi1CqE5.mjs +0 -2
  252. package/dist/generate-BPqoDbck.mjs +0 -2
  253. package/dist/interactive-SgAjen2z.mjs +0 -2
  254. package/dist/local-Bj-l0TP6.mjs +0 -2
  255. package/dist/login-CUup7w0e.mjs +0 -5
  256. package/dist/output-CvQFJkvi.mjs +0 -2
  257. package/dist/previews-BIMI1dTz.mjs +0 -4
  258. package/dist/raw-fetch-CvkmFO23.mjs +0 -2
  259. package/dist/resolve-PZuJ878-.mjs +0 -2
  260. package/dist/run-quhbAvQi.mjs +0 -2
  261. package/dist/sdk-BCzcRJCi.mjs +0 -3
  262. package/dist/shared-BS30oCf8.mjs +0 -2
  263. package/dist/startup-profile-CLmojOrn.mjs +0 -2
  264. package/dist/state-CpXhcMdX.mjs +0 -2
  265. package/dist/telemetry-Q3_UmwHj.mjs +0 -2
  266. package/dist/update-check-BqSpgzHk.mjs +0 -2
  267. package/dist/version-C0pInAZ9.mjs +0 -2
  268. /package/dist/{Page-CjJht2qT.mjs → Page-DAgOEX17.mjs} +0 -0
  269. /package/dist/{alerts-DY_7Nknx.mjs → alerts-D3iKtzoN.mjs} +0 -0
  270. /package/dist/{autorag-K396-M2S.mjs → autorag-pvRfDwne.mjs} +0 -0
  271. /package/dist/{body-parser-hh2avzkz.mjs → body-parser-NjzJZMOV.mjs} +0 -0
  272. /package/dist/{brands-DeLbFxSt.mjs → brands-DP5Ndir1.mjs} +0 -0
  273. /package/dist/{browser-extension-C1zmKFDG.mjs → browser-extension-Dee2Y1qn.mjs} +0 -0
  274. /package/dist/{chunk-WMOON6TZ-D_ToS88f.mjs → chunk-WMOON6TZ-B8xCqjB1.mjs} +0 -0
  275. /package/dist/{clear-CRfI7WS7.mjs → clear-qLKPlJqb.mjs} +0 -0
  276. /package/dist/{cli-types-DoVT5q_M.mjs → cli-types-_Kmwfpnp.mjs} +0 -0
  277. /package/dist/{connector-telemetry-events-latest-D8p_dR8s.mjs → connector-telemetry-events-latest-_aCmWeZx.mjs} +0 -0
  278. /package/dist/{connector-telemetry-snapshots-latest-COFmzmlk.mjs → connector-telemetry-snapshots-latest-CffEplpV.mjs} +0 -0
  279. /package/dist/{delegate-B6LetRpZ.mjs → delegate-CCGgla7X.mjs} +0 -0
  280. /package/dist/{discover-C5aiI6u0.mjs → discover-t6E9lpf3.mjs} +0 -0
  281. /package/dist/{domain-info-aiwP60Fo.mjs → domain-info-BQh9XapD.mjs} +0 -0
  282. /package/dist/{gt-DmcMNPX6.mjs → gt-KlYHH-UC.mjs} +0 -0
  283. /package/dist/{health-Bz33n-_F.mjs → health--10IShMi.mjs} +0 -0
  284. /package/dist/{input-validation-Dk52b0me.mjs → input-validation-0CeePPHp.mjs} +0 -0
  285. /package/dist/{interactive-C-o16XQs.mjs → interactive-D80kbTap.mjs} +0 -0
  286. /package/dist/{internal-BHrJbbdA.mjs → internal-BUs583vv.mjs} +0 -0
  287. /package/dist/{lifecycle-C7tAC1Mn.mjs → lifecycle-Cyc3fmyN.mjs} +0 -0
  288. /package/dist/{live-MeJQXIei.mjs → live-VCSxA0N9.mjs} +0 -0
  289. /package/dist/{open-PCXX3ZDZ-BKRik1gi.mjs → open-PCXX3ZDZ-C7gpxSsl.mjs} +0 -0
  290. /package/dist/{project-settings-DO6njFg_.mjs → project-settings-Bf6rReo1.mjs} +0 -0
  291. /package/dist/{r2-data-catalog-2jQrdAdo.mjs → r2-data-catalog-Bg7zq1IB.mjs} +0 -0
  292. /package/dist/{rate-limit-analytics-CU55zqCU.mjs → rate-limit-analytics-D3q0mGv2.mjs} +0 -0
  293. /package/dist/{rate-limits-CZ-qHDPK.mjs → rate-limits-BIxlBuMn.mjs} +0 -0
  294. /package/dist/{ready-BOpbZ1pN.mjs → ready-CAgelFmC.mjs} +0 -0
  295. /package/dist/{recent-submissions-KDqD2HyS.mjs → recent-submissions-B3TOjNmk.mjs} +0 -0
  296. /package/dist/{refute-DkF4XIMw.mjs → refute-BZNkFpBB.mjs} +0 -0
  297. /package/dist/{resolve-BCTrtcx7.mjs → resolve-CGKqk7q8.mjs} +0 -0
  298. /package/dist/{scan-logo-DQkf6glG.mjs → scan-logo-StecHiaf.mjs} +0 -0
  299. /package/dist/{scan-page-CMOJ_E0n.mjs → scan-page-B4adr-vD.mjs} +0 -0
  300. /package/dist/{search-Bre1Zwn3.mjs → search-Devngw4M.mjs} +0 -0
  301. /package/dist/{signed-url-24ZbX4yV.mjs → signed-url-ChR5eXXd.mjs} +0 -0
  302. /package/dist/{submission-info-BmkbZVqM.mjs → submission-info-BGb81HZN.mjs} +0 -0
  303. /package/dist/{total-queries-j8OAF_cE.mjs → total-queries-_wa6KxEl.mjs} +0 -0
  304. /package/dist/{tracked-domains-fe3EWYmF.mjs → tracked-domains-BesKGqfI.mjs} +0 -0
  305. /package/dist/{verify-CKgZYvln.mjs → verify-CYM5GlPu.mjs} +0 -0
@@ -1,45 +1,45 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-CEOHpZgd.mjs";import{a as t,r as n}from"./auth-BIr56Mbx.mjs";import{t as r}from"./output-CvQFJkvi.mjs";import{t as i}from"./dry-run-Bq0JAsbX.mjs";import{t as a}from"./progress-A61dRbXl.mjs";import{t as o}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as s,t as c}from"./body-parser-hh2avzkz.mjs";import{n as l}from"./input-validation-Dk52b0me.mjs";import{a as u,i as d,n as f}from"./prompt-CGUzvBgY.mjs";function p(e){return e.usage("$0 cache invalidate-environment <environment-id>\n\nMarks cached content as stale for one environment of the zone. Content cached for the zone's other environments, including production, is not affected. Otherwise this works like `POST /zones/{zone_id}/invalidate_cache`: the next request for invalidated content makes Cloudflare revalidate it with your origin, and the request body takes the same fields. Environments are part of [Version Management](https://developers.cloudflare.com/version-management/). To delete the content instead, use `POST /zones/{zone_id}/environments/{environment_id}/purge_cache`. Invalidating by URL (`files`) does not work for environments that select requests by IP address, country, ASN, or threat score, and fails with error `1136`. Use `tags`, `hosts`, `prefixes`, or `purge_everything` for those environments. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").positional(`environment-id`,{type:`string`,description:`The environment ID, from Version Management.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ee={command:`invalidate-environment <environment-id>`,describe:`Invalidate Cached Content by Environment`,builder:p,handler:async c=>o({command:`cache invalidate-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache invalidate-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/environments/${c[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(c[`environment-id`]))}/invalidate_cache`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"environment-id":String(c[`environment-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c),l=await e({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,!await f({force:!!c.force,message:`This operation marks the selected content in the environment's cache as stale.`})){process.stderr.write(`Aborted.
3
- `);return}if(c.body){let e=s(c.body);r(await a(`Deleting`,async()=>o.cache.invalidateEnvironment({body:e,zone_id:l,environment_id:c[`environment-id`]})),{successLabel:`Deleted`});return}r(await a(`Deleting`,async()=>t(o,`POST`,`/zones/${c.zoneId}/environments/${encodeURIComponent(String(c[`environment-id`]))}/invalidate_cache`)),{successLabel:`Deleted`})})};function m(e){return e.usage("$0 cache invalidate\n\nMarks cached content as stale in every Cloudflare data center and cache tier, including Cache Reserve. The content stays in cache. The next request for it makes Cloudflare revalidate it with your origin, using the `ETag` and `Last-Modified` values it was cached with: - If your origin answers `304 Not Modified`, Cloudflare serves the cached copy without downloading it again, and `CF-Cache-Status` is `REVALIDATED`. - If your origin sends a full response, Cloudflare serves and caches the new content, and `CF-Cache-Status` is `EXPIRED`. With Tiered Cache, each tier revalidates with the tier above it, so a visitor can see `EXPIRED` even when your origin answered `304`. Until content is revalidated, your `stale-while-revalidate` and `stale-if-error` directives still apply, counted from the time you invalidated it. For example, if your origin fails during revalidation, Cloudflare can keep serving the stale copy for the `stale-if-error` window. ### Invalidate or purge? - **Invalidate** when content may not have changed, for example after a deploy. Unchanged content costs your origin a `304` instead of a full response. That saving needs an origin that sends `ETag` or `Last-Modified` and answers conditional requests. Otherwise, every revalidation downloads the full response. - **Purge**, with `POST /zones/{zone_id}/purge_cache`, when content must not be served again, for example content you removed for legal or security reasons. Invalidating takes the same request bodies as purging, needs the same permission, and counts against the same rate limits. After a broad invalidation, such as `purge_everything`, expect more conditional requests to your origin while visitors request the invalidated content again. ### Choose what to invalidate Send one of these fields in the request body: - `files`: specific URLs. If your cache key includes request headers, send each URL with the header values it was cached with. - `tags`: all content whose `Cache-Tag` response header contains one of the tags. - `hosts`: all content cached for the hostnames. - `prefixes`: all content whose URL starts with one of the prefixes. - `purge_everything`: all cached content in the zone. ### Check the result A `200` response with `success: true` means Cloudflare accepted the request. To check, request an invalidated URL and confirm that the `CF-Cache-Status` response header is `REVALIDATED` or `EXPIRED`. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`invalidate`,describe:`Invalidate Cached Content`,builder:m,handler:async c=>o({command:`cache invalidate`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache invalidate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/invalidate_cache`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c),l=await e({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,!await f({force:!!c.force,message:`This operation marks the selected content in the zone's cache as stale.`})){process.stderr.write(`Aborted.
4
- `);return}if(c.body){let e=s(c.body);r(await a(`Deleting`,async()=>o.cache.invalidate({body:e,zone_id:l})),{successLabel:`Deleted`});return}r(await a(`Deleting`,async()=>t(o,`POST`,`/zones/${c.zoneId}/invalidate_cache`)),{successLabel:`Deleted`})})};function g(e){return e.usage("$0 cache origin-cloud-regions bulk-delete\n\nRemoves up to 100 IP-to-cloud-region mappings in a single request. Each IP is validated independently — successfully deleted items are returned in the `succeeded` array and IPs that could not be found or are invalid are returned in the `failed` array.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`bulk-delete`,describe:`Batch delete origin cloud region mappings`,builder:g,handler:async c=>o({command:`cache origin-cloud-regions bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache origin-cloud-regions bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c);if(c.zoneId=await e({zone:c.zone},o,{quiet:c.quiet}),!await f({force:!!c.force,message:`Are you sure you want to delete these Origin Cloud Region configurations?`})){process.stderr.write(`Aborted.
5
- `);return}if(c.body){let e=s(c.body);if(Array.isArray(e)&&e.length>100){let n=Math.ceil(e.length/100),i=null;for(let r=0;r<e.length;r+=100){let s=e.slice(r,r+100);i=await a(`Deleting: batch ${Math.floor(r/100)+1}/${n}`,async()=>t(o,`DELETE`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:s}))}r(i,{successLabel:`Deleted`});return}r(await a(`Deleting`,async()=>t(o,`DELETE`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:e})),{successLabel:`Deleted`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function v(e){return e.usage("$0 cache origin-cloud-regions bulk-update\n\nUpserts up to 100 IP-to-cloud-region mappings in a single request. Items in the request body are created or replaced; mappings not included in the request body are preserved unchanged (this is a merge operation, not a full collection replacement). Each item is validated independently — valid items are applied and invalid items are returned in the `failed` array. The vendor and region for every item are validated against the list from `GET /zones/{zone_id}/origin/cloud_regions/supported_regions`.").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:`bulk-update`,describe:`Batch create or replace origin cloud region mappings`,builder:v,handler:async c=>o({command:`cache origin-cloud-regions bulk-update`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){i({command:`cf cache origin-cloud-regions bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c);if(c.zoneId=await e({zone:c.zone},o,{quiet:c.quiet}),c.body){let e=s(c.body);if(Array.isArray(e)&&e.length>100){let n=Math.ceil(e.length/100),i=null;for(let r=0;r<e.length;r+=100){let s=e.slice(r,r+100);i=await a(`Updating: batch ${Math.floor(r/100)+1}/${n}`,async()=>t(o,`PUT`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:s}))}r(i,{successLabel:`Updated`});return}r(await a(`Updating`,async()=>t(o,`PUT`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:e})),{successLabel:`Updated`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function b(e){return e.usage(`$0 cache origin-cloud-regions delete <origin-ip>
2
+ import{i as e,n as t}from"./auth-Br-t8vL_.mjs";import{i as n}from"./context-CquYYyS3.mjs";import{t as r}from"./output-ClYel9WX.mjs";import{t as i}from"./dry-run-p9Q7nMZ5.mjs";import{t as a}from"./progress-TLUEIYE6.mjs";import{t as o}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{n as s,t as c}from"./body-parser-NjzJZMOV.mjs";import{n as l}from"./input-validation-0CeePPHp.mjs";import{a as u,i as d,n as f}from"./prompt-Ck_1PCHm.mjs";function p(e){return e.usage("$0 cache invalidate-environment <environment-id>\n\nMarks cached content as stale for one environment of the zone. Content cached for the zone's other environments, including production, is not affected. Otherwise this works like `POST /zones/{zone_id}/invalidate_cache`: the next request for invalidated content makes Cloudflare revalidate it with your origin, and the request body takes the same fields. Environments are part of [Version Management](https://developers.cloudflare.com/version-management/). To delete the content instead, use `POST /zones/{zone_id}/environments/{environment_id}/purge_cache`. Invalidating by URL (`files`) does not work for environments that select requests by IP address, country, ASN, or threat score, and fails with error `1136`. Use `tags`, `hosts`, `prefixes`, or `purge_everything` for those environments. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").positional(`environment-id`,{type:`string`,description:`The environment ID, from Version Management.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ee={command:`invalidate-environment <environment-id>`,describe:`Invalidate Cached Content by Environment`,builder:p,handler:async c=>o({command:`cache invalidate-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache invalidate-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/environments/${c[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(c[`environment-id`]))}/invalidate_cache`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"environment-id":String(c[`environment-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await t(c),l=await n({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,!await f({force:!!c.force,message:`This operation marks the selected content in the environment's cache as stale.`})){process.stderr.write(`Aborted.
3
+ `);return}if(c.body){let e=s(c.body);r(await a(`Deleting`,async()=>o.cache.invalidateEnvironment({body:e,zone_id:l,environment_id:c[`environment-id`]})),{successLabel:`Deleted`});return}r(await a(`Deleting`,async()=>e(o,`POST`,`/zones/${c.zoneId}/environments/${encodeURIComponent(String(c[`environment-id`]))}/invalidate_cache`)),{successLabel:`Deleted`})})};function m(e){return e.usage("$0 cache invalidate\n\nMarks cached content as stale in every Cloudflare data center and cache tier, including Cache Reserve. The content stays in cache. The next request for it makes Cloudflare revalidate it with your origin, using the `ETag` and `Last-Modified` values it was cached with: - If your origin answers `304 Not Modified`, Cloudflare serves the cached copy without downloading it again, and `CF-Cache-Status` is `REVALIDATED`. - If your origin sends a full response, Cloudflare serves and caches the new content, and `CF-Cache-Status` is `EXPIRED`. With Tiered Cache, each tier revalidates with the tier above it, so a visitor can see `EXPIRED` even when your origin answered `304`. Until content is revalidated, your `stale-while-revalidate` and `stale-if-error` directives still apply, counted from the time you invalidated it. For example, if your origin fails during revalidation, Cloudflare can keep serving the stale copy for the `stale-if-error` window. ### Invalidate or purge? - **Invalidate** when content may not have changed, for example after a deploy. Unchanged content costs your origin a `304` instead of a full response. That saving needs an origin that sends `ETag` or `Last-Modified` and answers conditional requests. Otherwise, every revalidation downloads the full response. - **Purge**, with `POST /zones/{zone_id}/purge_cache`, when content must not be served again, for example content you removed for legal or security reasons. Invalidating takes the same request bodies as purging, needs the same permission, and counts against the same rate limits. After a broad invalidation, such as `purge_everything`, expect more conditional requests to your origin while visitors request the invalidated content again. ### Choose what to invalidate Send one of these fields in the request body: - `files`: specific URLs. If your cache key includes request headers, send each URL with the header values it was cached with. - `tags`: all content whose `Cache-Tag` response header contains one of the tags. - `hosts`: all content cached for the hostnames. - `prefixes`: all content whose URL starts with one of the prefixes. - `purge_everything`: all cached content in the zone. ### Check the result A `200` response with `success: true` means Cloudflare accepted the request. To check, request an invalidated URL and confirm that the `CF-Cache-Status` response header is `REVALIDATED` or `EXPIRED`. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`invalidate`,describe:`Invalidate Cached Content`,builder:m,handler:async c=>o({command:`cache invalidate`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache invalidate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/invalidate_cache`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await t(c),l=await n({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,!await f({force:!!c.force,message:`This operation marks the selected content in the zone's cache as stale.`})){process.stderr.write(`Aborted.
4
+ `);return}if(c.body){let e=s(c.body);r(await a(`Deleting`,async()=>o.cache.invalidate({body:e,zone_id:l})),{successLabel:`Deleted`});return}r(await a(`Deleting`,async()=>e(o,`POST`,`/zones/${c.zoneId}/invalidate_cache`)),{successLabel:`Deleted`})})};function g(e){return e.usage("$0 cache origin-cloud-regions bulk-delete\n\nRemoves up to 100 IP-to-cloud-region mappings in a single request. Each IP is validated independently — successfully deleted items are returned in the `succeeded` array and IPs that could not be found or are invalid are returned in the `failed` array.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`bulk-delete`,describe:`Batch delete origin cloud region mappings`,builder:g,handler:async c=>o({command:`cache origin-cloud-regions bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache origin-cloud-regions bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await t(c);if(c.zoneId=await n({zone:c.zone},o,{quiet:c.quiet}),!await f({force:!!c.force,message:`Are you sure you want to delete these Origin Cloud Region configurations?`})){process.stderr.write(`Aborted.
5
+ `);return}if(c.body){let t=s(c.body);if(Array.isArray(t)&&t.length>100){let n=Math.ceil(t.length/100),i=null;for(let r=0;r<t.length;r+=100){let s=t.slice(r,r+100);i=await a(`Deleting: batch ${Math.floor(r/100)+1}/${n}`,async()=>e(o,`DELETE`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:s}))}r(i,{successLabel:`Deleted`});return}r(await a(`Deleting`,async()=>e(o,`DELETE`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:t})),{successLabel:`Deleted`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function v(e){return e.usage("$0 cache origin-cloud-regions bulk-update\n\nUpserts up to 100 IP-to-cloud-region mappings in a single request. Items in the request body are created or replaced; mappings not included in the request body are preserved unchanged (this is a merge operation, not a full collection replacement). Each item is validated independently — valid items are applied and invalid items are returned in the `failed` array. The vendor and region for every item are validated against the list from `GET /zones/{zone_id}/origin/cloud_regions/supported_regions`.").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:`bulk-update`,describe:`Batch create or replace origin cloud region mappings`,builder:v,handler:async c=>o({command:`cache origin-cloud-regions bulk-update`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){i({command:`cf cache origin-cloud-regions bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await t(c);if(c.zoneId=await n({zone:c.zone},o,{quiet:c.quiet}),c.body){let t=s(c.body);if(Array.isArray(t)&&t.length>100){let n=Math.ceil(t.length/100),i=null;for(let r=0;r<t.length;r+=100){let s=t.slice(r,r+100);i=await a(`Updating: batch ${Math.floor(r/100)+1}/${n}`,async()=>e(o,`PUT`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:s}))}r(i,{successLabel:`Updated`});return}r(await a(`Updating`,async()=>e(o,`PUT`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:t})),{successLabel:`Updated`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function b(e){return e.usage(`$0 cache origin-cloud-regions delete <origin-ip>
6
6
 
7
- Removes the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup. Returns the deleted IP on success. Returns 404 if no mapping exists for the specified IP. When the last mapping for the zone is removed the underlying rule record is also deleted.`).positional(`origin-ip`,{type:`string`,description:`Origin IP address whose mapping should be deleted.`,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 x={command:`delete <origin-ip>`,describe:`Delete an origin cloud region mapping`,builder:b,handler:async t=>o({command:`cache origin-cloud-regions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){i({command:`cf cache origin-cloud-regions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/origin/cloud_regions/${t[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(t[`origin-ip`]))}`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),"origin-ip":String(t[`origin-ip`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=s,!await f({force:!!t.force,message:`Are you sure you want to delete this Origin Cloud Region configuration?`})){process.stderr.write(`Aborted.
8
- `);return}r(await a(`Deleting`,async()=>o.cache.originCloudRegions.delete({zone_id:s,origin_ip:t[`origin-ip`]})),{successLabel:`Deleted`})})};function S(e){return e.usage(`$0 cache origin-cloud-regions get <origin-ip>
7
+ Removes the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup. Returns the deleted IP on success. Returns 404 if no mapping exists for the specified IP. When the last mapping for the zone is removed the underlying rule record is also deleted.`).positional(`origin-ip`,{type:`string`,description:`Origin IP address whose mapping should be deleted.`,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 x={command:`delete <origin-ip>`,describe:`Delete an origin cloud region mapping`,builder:b,handler:async e=>o({command:`cache origin-cloud-regions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf cache origin-cloud-regions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/${e[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(e[`origin-ip`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"origin-ip":String(e[`origin-ip`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force,message:`Are you sure you want to delete this Origin Cloud Region configuration?`})){process.stderr.write(`Aborted.
8
+ `);return}r(await a(`Deleting`,async()=>o.cache.originCloudRegions.delete({zone_id:s,origin_ip:e[`origin-ip`]})),{successLabel:`Deleted`})})};function S(e){return e.usage(`$0 cache origin-cloud-regions get <origin-ip>
9
9
 
10
- Returns the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup (RFC 5952 for IPv6). Returns 404 if the zone has no mappings or if the specified IP has no mapping.`).positional(`origin-ip`,{type:`string`,description:`Origin IP address to look up. IPv4 and IPv6 are supported.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <origin-ip>`,describe:`Get an origin cloud region mapping`,builder:S,handler:async t=>o({command:`cache origin-cloud-regions get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf cache origin-cloud-regions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/origin/cloud_regions/${t[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(t[`origin-ip`]))}`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),"origin-ip":String(t[`origin-ip`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});t.zoneId=s,r(await a(`Loading`,async()=>o.cache.originCloudRegions.get({zone_id:s,origin_ip:t[`origin-ip`]})),{successLabel:`Loaded`})})};function w(e){return e.usage(`$0 cache origin-cloud-regions list
10
+ Returns the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup (RFC 5952 for IPv6). Returns 404 if the zone has no mappings or if the specified IP has no mapping.`).positional(`origin-ip`,{type:`string`,description:`Origin IP address to look up. IPv4 and IPv6 are supported.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <origin-ip>`,describe:`Get an origin cloud region mapping`,builder:S,handler:async e=>o({command:`cache origin-cloud-regions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf cache origin-cloud-regions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/${e[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(e[`origin-ip`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"origin-ip":String(e[`origin-ip`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s,r(await a(`Loading`,async()=>o.cache.originCloudRegions.get({zone_id:s,origin_ip:e[`origin-ip`]})),{successLabel:`Loaded`})})};function w(e){return e.usage(`$0 cache origin-cloud-regions list
11
11
 
12
- Returns all IP-to-cloud-region mappings configured for the zone with pagination support. Each mapping tells Cloudflare which cloud vendor and region hosts the origin at that IP, enabling the edge to route via the nearest Tiered Cache upper-tier co-located with that cloud provider. Returns an empty array when no mappings exist.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`List origin cloud region mappings`,builder:w,handler:async t=>o({command:`cache origin-cloud-regions list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let o={page:t.page,per_page:t[`per-page`]};if(t.dryRun){i({command:`cf cache origin-cloud-regions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/origin/cloud_regions`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await n(t),c=await e({zone:t.zone},s,{quiet:t.quiet});t.zoneId=c,r(await a(`Loading`,async()=>s.cache.originCloudRegions.list({zone_id:c,...o})),{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 cache origin-cloud-regions supported-regions
12
+ Returns all IP-to-cloud-region mappings configured for the zone with pagination support. Each mapping tells Cloudflare which cloud vendor and region hosts the origin at that IP, enabling the edge to route via the nearest Tiered Cache upper-tier co-located with that cloud provider. Returns an empty array when no mappings exist.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`List origin cloud region mappings`,builder:w,handler:async e=>o({command:`cache origin-cloud-regions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`]};if(e.dryRun){i({command:`cf cache origin-cloud-regions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c,r(await a(`Loading`,async()=>s.cache.originCloudRegions.list({zone_id:c,...o})),{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 cache origin-cloud-regions supported-regions
13
13
 
14
- Returns the cloud vendors and regions that are valid values for origin cloud region mappings. Each region includes the Tiered Cache upper-tier colocation codes that will be used for cache routing when a mapping targeting that region is active. Requires the zone to have Tiered Cache enabled.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`supported-regions`,describe:`List supported cloud vendors and regions`,builder:E,handler:async t=>o({command:`cache origin-cloud-regions supported-regions`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf cache origin-cloud-regions supported-regions`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/origin/cloud_regions/supported_regions`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});t.zoneId=s,r(await a(`Loading`,async()=>o.cache.originCloudRegions.supportedRegions({zone_id:s})),{successLabel:`Loaded`})})};function O(e){return e.usage("$0 cache origin-cloud-regions update <origin-ip>\n\nCreates a new IP-to-cloud-region mapping or replaces the existing mapping for the specified IP. PUT is idempotent — calling it repeatedly with the same body produces the same result. The IP path parameter is normalized to canonical form (RFC 5952 for IPv6) before storage. The vendor and region are validated against the list from `GET /zones/{zone_id}/origin/cloud_regions/supported_regions`. Returns 400 if the `origin_ip` in the body does not match the URL path parameter. Returns 403 (code 1164) when the zone has reached the limit of 3,500 IP mappings.").positional(`origin-ip`,{type:`string`,description:`Origin IP address to create or replace.`,demandOption:!0}).option(`region`,{type:`string`,description:`Cloud vendor region identifier. Must be a valid region for the specified vendor as returned by the supported_regions endpoint.`}).option(`vendor`,{type:`string`,description:`Cloud vendor hosting the origin. Must be one of the supported vendors.`,choices:[`aws`,`azure`,`gcp`,`oci`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or replacing an origin cloud region mapping.`})}const k={command:`update <origin-ip>`,describe:`Create or replace an origin cloud region mapping`,builder:O,handler:async t=>o({command:`cache origin-cloud-regions update`,classification:{safeFlags:[`vendor`,`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf cache origin-cloud-regions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/origin/cloud_regions/${t[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(t[`origin-ip`]))}`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),"origin-ip":String(t[`origin-ip`]??``)},bodyKind:`json`,body:t.body===void 0?c({region:l(t.region,`region`,`text`),vendor:l(t.vendor,`vendor`,`text`)}):s(t.body)});return}let o=await n(t),f=await e({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=f,t.body){let e=s(t.body);r(await a(`Updating`,async()=>o.cache.originCloudRegions.update({body:e,zone_id:f,origin_ip:t[`origin-ip`]})),{successLabel:`Updated`});return}t.region===void 0&&(t.region=await u(`region`,`Cloud vendor region identifier. Must be a valid region for the specified vendor as returned by the supported_regions endpoint.`)),t.vendor===void 0&&(t.vendor=await d(`vendor`,`Cloud vendor hosting the origin. Must be one of the supported vendors.`,[`aws`,`azure`,`gcp`,`oci`]));let p=c({region:l(t.region,`region`,`text`),vendor:l(t.vendor,`vendor`,`text`)});r(await a(`Updating`,async()=>o.cache.originCloudRegions.update({body:p,zone_id:f,origin_ip:t[`origin-ip`]})),{successLabel:`Updated`})})},A={command:`origin-cloud-regions`,describe:`Manage Origin Cloud Regions routing and failover configurations`,builder:e=>e.command(_).command(y).command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage("$0 cache purge-environment <environment-id>\n\nDeletes cached content for one environment of the zone. Content cached for the zone's other environments, including production, is not affected. Otherwise this works like `POST /zones/{zone_id}/purge_cache`: the next request for purged content is a cache `MISS`, and the request body takes the same fields. Environments are part of [Version Management](https://developers.cloudflare.com/version-management/). To keep content cached and have Cloudflare revalidate it instead, use `POST /zones/{zone_id}/environments/{environment_id}/invalidate_cache`. Purging by URL (`files`) does not work for environments that select requests by IP address, country, ASN, or threat score, and fails with error `1136`. Use `tags`, `hosts`, `prefixes`, or `purge_everything` for those environments. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").positional(`environment-id`,{type:`string`,description:`The environment ID, from Version Management.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`purge-environment <environment-id>`,describe:`Purge Cached Content by Environment`,builder:j,handler:async c=>o({command:`cache purge-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache purge-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/environments/${c[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(c[`environment-id`]))}/purge_cache`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"environment-id":String(c[`environment-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c),l=await e({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,!await f({force:!!c.force,message:`This operation deletes the selected content from the environment's cache.`})){process.stderr.write(`Aborted.
15
- `);return}if(c.body){let e=s(c.body);r(await a(`Deleting`,async()=>o.cache.purgeEnvironment({body:e,zone_id:l,environment_id:c[`environment-id`]})),{successLabel:`Deleted`});return}r(await a(`Deleting`,async()=>t(o,`POST`,`/zones/${c.zoneId}/environments/${encodeURIComponent(String(c[`environment-id`]))}/purge_cache`)),{successLabel:`Deleted`})})};function N(e){return e.usage("$0 cache purge\n\nDeletes cached content in every Cloudflare data center and cache tier, including Cache Reserve. The next request for purged content is a cache `MISS`: Cloudflare fetches the full response from your origin and caches it again. Cloudflare does not serve purged content from cache again, even if your origin is unavailable. To keep content cached and have Cloudflare revalidate it with your origin instead, use `POST /zones/{zone_id}/invalidate_cache`. ### Choose what to purge Send one of these fields in the request body: - `files`: specific URLs. If your cache key includes request headers, send each URL with the header values it was cached with. - `tags`: all content whose `Cache-Tag` response header contains one of the tags. - `hosts`: all content cached for the hostnames. - `prefixes`: all content whose URL starts with one of the prefixes. - `purge_everything`: all cached content in the zone. ### Check the result A `200` response with `success: true` means Cloudflare accepted the request. It does not confirm that any content was cached or removed. To check, request a purged URL and confirm that the `CF-Cache-Status` response header is `MISS`. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const P={command:`purge`,describe:`Purge Cached Content`,builder:N,handler:async c=>o({command:`cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/purge_cache`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c),l=await e({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,!await f({force:!!c.force,message:`This operation deletes the selected content from the zone's cache.`})){process.stderr.write(`Aborted.
16
- `);return}if(c.body){let e=s(c.body);r(await a(`Deleting`,async()=>o.cache.purge({body:e,zone_id:l})),{successLabel:`Deleted`});return}r(await a(`Deleting`,async()=>t(o,`POST`,`/zones/${c.zoneId}/purge_cache`)),{successLabel:`Deleted`})})};function F(e){return e.usage(`$0 cache settings regional-tiered-cache edit
14
+ Returns the cloud vendors and regions that are valid values for origin cloud region mappings. Each region includes the Tiered Cache upper-tier colocation codes that will be used for cache routing when a mapping targeting that region is active. Requires the zone to have Tiered Cache enabled.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`supported-regions`,describe:`List supported cloud vendors and regions`,builder:E,handler:async e=>o({command:`cache origin-cloud-regions supported-regions`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf cache origin-cloud-regions supported-regions`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/supported_regions`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s,r(await a(`Loading`,async()=>o.cache.originCloudRegions.supportedRegions({zone_id:s})),{successLabel:`Loaded`})})};function O(e){return e.usage("$0 cache origin-cloud-regions update <origin-ip>\n\nCreates a new IP-to-cloud-region mapping or replaces the existing mapping for the specified IP. PUT is idempotent — calling it repeatedly with the same body produces the same result. The IP path parameter is normalized to canonical form (RFC 5952 for IPv6) before storage. The vendor and region are validated against the list from `GET /zones/{zone_id}/origin/cloud_regions/supported_regions`. Returns 400 if the `origin_ip` in the body does not match the URL path parameter. Returns 403 (code 1164) when the zone has reached the limit of 3,500 IP mappings.").positional(`origin-ip`,{type:`string`,description:`Origin IP address to create or replace.`,demandOption:!0}).option(`region`,{type:`string`,description:`Cloud vendor region identifier. Must be a valid region for the specified vendor as returned by the supported_regions endpoint.`}).option(`vendor`,{type:`string`,description:`Cloud vendor hosting the origin. Must be one of the supported vendors.`,choices:[`aws`,`azure`,`gcp`,`oci`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or replacing an origin cloud region mapping.`})}const k={command:`update <origin-ip>`,describe:`Create or replace an origin cloud region mapping`,builder:O,handler:async e=>o({command:`cache origin-cloud-regions update`,classification:{safeFlags:[`vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf cache origin-cloud-regions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/${e[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(e[`origin-ip`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"origin-ip":String(e[`origin-ip`]??``)},bodyKind:`json`,body:e.body===void 0?c({region:l(e.region,`region`,`text`),vendor:l(e.vendor,`vendor`,`text`)}):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body);r(await a(`Updating`,async()=>o.cache.originCloudRegions.update({body:t,zone_id:f,origin_ip:e[`origin-ip`]})),{successLabel:`Updated`});return}e.region===void 0&&(e.region=await u(`region`,`Cloud vendor region identifier. Must be a valid region for the specified vendor as returned by the supported_regions endpoint.`)),e.vendor===void 0&&(e.vendor=await d(`vendor`,`Cloud vendor hosting the origin. Must be one of the supported vendors.`,[`aws`,`azure`,`gcp`,`oci`]));let p=c({region:l(e.region,`region`,`text`),vendor:l(e.vendor,`vendor`,`text`)});r(await a(`Updating`,async()=>o.cache.originCloudRegions.update({body:p,zone_id:f,origin_ip:e[`origin-ip`]})),{successLabel:`Updated`})})},A={command:`origin-cloud-regions`,describe:`Manage Origin Cloud Regions routing and failover configurations`,builder:e=>e.command(_).command(y).command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage("$0 cache purge-environment <environment-id>\n\nDeletes cached content for one environment of the zone. Content cached for the zone's other environments, including production, is not affected. Otherwise this works like `POST /zones/{zone_id}/purge_cache`: the next request for purged content is a cache `MISS`, and the request body takes the same fields. Environments are part of [Version Management](https://developers.cloudflare.com/version-management/). To keep content cached and have Cloudflare revalidate it instead, use `POST /zones/{zone_id}/environments/{environment_id}/invalidate_cache`. Purging by URL (`files`) does not work for environments that select requests by IP address, country, ASN, or threat score, and fails with error `1136`. Use `tags`, `hosts`, `prefixes`, or `purge_everything` for those environments. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").positional(`environment-id`,{type:`string`,description:`The environment ID, from Version Management.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`purge-environment <environment-id>`,describe:`Purge Cached Content by Environment`,builder:j,handler:async c=>o({command:`cache purge-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache purge-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/environments/${c[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(c[`environment-id`]))}/purge_cache`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"environment-id":String(c[`environment-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await t(c),l=await n({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,!await f({force:!!c.force,message:`This operation deletes the selected content from the environment's cache.`})){process.stderr.write(`Aborted.
15
+ `);return}if(c.body){let e=s(c.body);r(await a(`Deleting`,async()=>o.cache.purgeEnvironment({body:e,zone_id:l,environment_id:c[`environment-id`]})),{successLabel:`Deleted`});return}r(await a(`Deleting`,async()=>e(o,`POST`,`/zones/${c.zoneId}/environments/${encodeURIComponent(String(c[`environment-id`]))}/purge_cache`)),{successLabel:`Deleted`})})};function N(e){return e.usage("$0 cache purge\n\nDeletes cached content in every Cloudflare data center and cache tier, including Cache Reserve. The next request for purged content is a cache `MISS`: Cloudflare fetches the full response from your origin and caches it again. Cloudflare does not serve purged content from cache again, even if your origin is unavailable. To keep content cached and have Cloudflare revalidate it with your origin instead, use `POST /zones/{zone_id}/invalidate_cache`. ### Choose what to purge Send one of these fields in the request body: - `files`: specific URLs. If your cache key includes request headers, send each URL with the header values it was cached with. - `tags`: all content whose `Cache-Tag` response header contains one of the tags. - `hosts`: all content cached for the hostnames. - `prefixes`: all content whose URL starts with one of the prefixes. - `purge_everything`: all cached content in the zone. ### Check the result A `200` response with `success: true` means Cloudflare accepted the request. It does not confirm that any content was cached or removed. To check, request a purged URL and confirm that the `CF-Cache-Status` response header is `MISS`. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const P={command:`purge`,describe:`Purge Cached Content`,builder:N,handler:async c=>o({command:`cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/purge_cache`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await t(c),l=await n({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,!await f({force:!!c.force,message:`This operation deletes the selected content from the zone's cache.`})){process.stderr.write(`Aborted.
16
+ `);return}if(c.body){let e=s(c.body);r(await a(`Deleting`,async()=>o.cache.purge({body:e,zone_id:l})),{successLabel:`Deleted`});return}r(await a(`Deleting`,async()=>e(o,`POST`,`/zones/${c.zoneId}/purge_cache`)),{successLabel:`Deleted`})})};function F(e){return e.usage(`$0 cache settings regional-tiered-cache edit
17
17
 
18
- Instructs Cloudflare to check a regional hub data center on the way to your upper tier. This can help improve performance for smart and custom tiered cache topologies.`).option(`value`,{type:`string`,description:`Value of the Regional Tiered Cache zone setting.`,choices:[`on`,`off`]}).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 I={command:`edit`,describe:`Change Regional Tiered Cache setting`,builder:F,handler:async t=>o({command:`cache settings regional-tiered-cache edit`,classification:{safeFlags:[`value`,`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf cache settings regional-tiered-cache edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/cache/regional_tiered_cache`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`json`,body:t.body===void 0?c({value:l(t.value,`value`,`text`)}):s(t.body)});return}let o=await n(t),u=await e({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=u,t.body){let e=s(t.body);r(await a(`Updating`,async()=>o.cache.settings.regionalTieredCache.edit({...e,zone_id:u})),{successLabel:`Updated`});return}t.value===void 0&&(t.value=await d(`value`,`Value of the Regional Tiered Cache zone setting.`,[`on`,`off`]));let f=c({value:l(t.value,`value`,`text`)});r(await a(`Updating`,async()=>o.cache.settings.regionalTieredCache.edit({...f,zone_id:u})),{successLabel:`Updated`})})};function L(e){return e.usage(`$0 cache settings regional-tiered-cache get
18
+ Instructs Cloudflare to check a regional hub data center on the way to your upper tier. This can help improve performance for smart and custom tiered cache topologies.`).option(`value`,{type:`string`,description:`Value of the Regional Tiered Cache zone setting.`,choices:[`on`,`off`]}).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 I={command:`edit`,describe:`Change Regional Tiered Cache setting`,builder:F,handler:async e=>o({command:`cache settings regional-tiered-cache edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf cache settings regional-tiered-cache edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/regional_tiered_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({value:l(e.value,`value`,`text`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body);r(await a(`Updating`,async()=>o.cache.settings.regionalTieredCache.edit({...t,zone_id:u})),{successLabel:`Updated`});return}e.value===void 0&&(e.value=await d(`value`,`Value of the Regional Tiered Cache zone setting.`,[`on`,`off`]));let f=c({value:l(e.value,`value`,`text`)});r(await a(`Updating`,async()=>o.cache.settings.regionalTieredCache.edit({...f,zone_id:u})),{successLabel:`Updated`})})};function L(e){return e.usage(`$0 cache settings regional-tiered-cache get
19
19
 
20
- Instructs Cloudflare to check a regional hub data center on the way to your upper tier. This can help improve performance for smart and custom tiered cache topologies.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`get`,describe:`Get Regional Tiered Cache setting`,builder:L,handler:async t=>o({command:`cache settings regional-tiered-cache get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf cache settings regional-tiered-cache get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/cache/regional_tiered_cache`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});t.zoneId=s,r(await a(`Loading`,async()=>o.cache.settings.regionalTieredCache.get({zone_id:s})),{successLabel:`Loaded`})})},R={command:`regional-tiered-cache`,describe:`Restrict tiered cache topology to data centers within a specific geographic region`,builder:e=>e.command(I).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage(`$0 cache settings reserve clear
20
+ Instructs Cloudflare to check a regional hub data center on the way to your upper tier. This can help improve performance for smart and custom tiered cache topologies.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`get`,describe:`Get Regional Tiered Cache setting`,builder:L,handler:async e=>o({command:`cache settings regional-tiered-cache get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf cache settings regional-tiered-cache get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/regional_tiered_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s,r(await a(`Loading`,async()=>o.cache.settings.regionalTieredCache.get({zone_id:s})),{successLabel:`Loaded`})})},R={command:`regional-tiered-cache`,describe:`Restrict tiered cache topology to data centers within a specific geographic region`,builder:e=>e.command(I).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage(`$0 cache settings reserve clear
21
21
 
22
- You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).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 B={command:`clear`,describe:`Start Cache Reserve Clear`,builder:z,handler:async t=>o({command:`cache settings reserve clear`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){i({command:`cf cache settings reserve clear`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/cache/cache_reserve_clear`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=s,!await f({force:!!t.force,message:`This operation permanently clears Cache Reserve for this zone and cannot be undone.`})){process.stderr.write(`Aborted.
22
+ You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).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 B={command:`clear`,describe:`Start Cache Reserve Clear`,builder:z,handler:async e=>o({command:`cache settings reserve clear`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf cache settings reserve clear`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/cache_reserve_clear`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force,message:`This operation permanently clears Cache Reserve for this zone and cannot be undone.`})){process.stderr.write(`Aborted.
23
23
  `);return}r(await a(`Deleting`,async()=>o.cache.settings.reserve.clear({zone_id:s})),{successLabel:`Deleted`})})};function V(e){return e.usage(`$0 cache settings reserve edit
24
24
 
25
- Increase cache lifetimes by automatically storing all cacheable files into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve) for more information.`).option(`value`,{type:`string`,description:`Value of the Cache Reserve zone setting.`,choices:[`on`,`off`]}).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:`edit`,describe:`Change Cache Reserve setting`,builder:V,handler:async t=>o({command:`cache settings reserve edit`,classification:{safeFlags:[`value`,`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf cache settings reserve edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/cache/cache_reserve`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`json`,body:t.body===void 0?c({value:l(t.value,`value`,`text`)}):s(t.body)});return}let o=await n(t),u=await e({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=u,t.body){let e=s(t.body);r(await a(`Updating`,async()=>o.cache.settings.reserve.edit({...e,zone_id:u})),{successLabel:`Updated`});return}t.value===void 0&&(t.value=await d(`value`,`Value of the Cache Reserve zone setting.`,[`on`,`off`]));let f=c({value:l(t.value,`value`,`text`)});r(await a(`Updating`,async()=>o.cache.settings.reserve.edit({...f,zone_id:u})),{successLabel:`Updated`})})};function U(e){return e.usage(`$0 cache settings reserve get
25
+ Increase cache lifetimes by automatically storing all cacheable files into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve) for more information.`).option(`value`,{type:`string`,description:`Value of the Cache Reserve zone setting.`,choices:[`on`,`off`]}).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:`edit`,describe:`Change Cache Reserve setting`,builder:V,handler:async e=>o({command:`cache settings reserve edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf cache settings reserve edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/cache_reserve`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({value:l(e.value,`value`,`text`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body);r(await a(`Updating`,async()=>o.cache.settings.reserve.edit({...t,zone_id:u})),{successLabel:`Updated`});return}e.value===void 0&&(e.value=await d(`value`,`Value of the Cache Reserve zone setting.`,[`on`,`off`]));let f=c({value:l(e.value,`value`,`text`)});r(await a(`Updating`,async()=>o.cache.settings.reserve.edit({...f,zone_id:u})),{successLabel:`Updated`})})};function U(e){return e.usage(`$0 cache settings reserve get
26
26
 
27
- Increase cache lifetimes by automatically storing all cacheable files into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve) for more information.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get`,describe:`Get Cache Reserve setting`,builder:U,handler:async t=>o({command:`cache settings reserve get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf cache settings reserve get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/cache/cache_reserve`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});t.zoneId=s,r(await a(`Loading`,async()=>o.cache.settings.reserve.get({zone_id:s})),{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 cache settings reserve status
27
+ Increase cache lifetimes by automatically storing all cacheable files into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve) for more information.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get`,describe:`Get Cache Reserve setting`,builder:U,handler:async e=>o({command:`cache settings reserve get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf cache settings reserve get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/cache_reserve`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s,r(await a(`Loading`,async()=>o.cache.settings.reserve.get({zone_id:s})),{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 cache settings reserve status
28
28
 
29
- You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`status`,describe:`Get Cache Reserve Clear`,builder:G,handler:async t=>o({command:`cache settings reserve status`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf cache settings reserve status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/cache/cache_reserve_clear`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});t.zoneId=s,r(await a(`Loading`,async()=>o.cache.settings.reserve.status({zone_id:s})),{successLabel:`Loaded`})})},q={command:`reserve`,describe:`Persistent storage tier that keeps cached assets even after eviction from edge caches`,builder:e=>e.command(B).command(H).command(W).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function J(e){return e.usage(`$0 cache settings smart-tiered-cache create
29
+ You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`status`,describe:`Get Cache Reserve Clear`,builder:G,handler:async e=>o({command:`cache settings reserve status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf cache settings reserve status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/cache_reserve_clear`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s,r(await a(`Loading`,async()=>o.cache.settings.reserve.status({zone_id:s})),{successLabel:`Loaded`})})},q={command:`reserve`,describe:`Persistent storage tier that keeps cached assets even after eviction from edge caches`,builder:e=>e.command(B).command(H).command(W).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function J(e){return e.usage(`$0 cache settings smart-tiered-cache create
30
30
 
31
- Smart Tiered Cache dynamically selects the single closest upper tier for each of your website's origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`value`,{type:`string`,description:`Enable or disable the Smart Tiered Cache.`,choices:[`on`,`off`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update enablement of Smart Tiered Cache.`})}const Y={command:`create`,describe:`Create Smart Tiered Cache setting`,builder:J,handler:async t=>o({command:`cache settings smart-tiered-cache create`,classification:{safeFlags:[`value`,`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf cache settings smart-tiered-cache create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`json`,body:t.body===void 0?c({value:l(t.value,`value`,`text`)}):s(t.body)});return}let o=await n(t),u=await e({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=u,t.body){let e=s(t.body);r(await a(`Creating`,async()=>o.cache.settings.smartTieredCache.create({body:e,zone_id:u})),{successLabel:`Created`});return}t.value===void 0&&(t.value=await d(`value`,`Enable or disable the Smart Tiered Cache.`,[`on`,`off`]));let f=c({value:l(t.value,`value`,`text`)});r(await a(`Creating`,async()=>o.cache.settings.smartTieredCache.create({body:f,zone_id:u})),{successLabel:`Created`})})};function X(e){return e.usage(`$0 cache settings smart-tiered-cache delete
31
+ Smart Tiered Cache dynamically selects the single closest upper tier for each of your website's origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`value`,{type:`string`,description:`Enable or disable the Smart Tiered Cache.`,choices:[`on`,`off`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update enablement of Smart Tiered Cache.`})}const Y={command:`create`,describe:`Create Smart Tiered Cache setting`,builder:J,handler:async e=>o({command:`cache settings smart-tiered-cache create`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf cache settings smart-tiered-cache create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({value:l(e.value,`value`,`text`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body);r(await a(`Creating`,async()=>o.cache.settings.smartTieredCache.create({body:t,zone_id:u})),{successLabel:`Created`});return}e.value===void 0&&(e.value=await d(`value`,`Enable or disable the Smart Tiered Cache.`,[`on`,`off`]));let f=c({value:l(e.value,`value`,`text`)});r(await a(`Creating`,async()=>o.cache.settings.smartTieredCache.create({body:f,zone_id:u})),{successLabel:`Created`})})};function X(e){return e.usage(`$0 cache settings smart-tiered-cache delete
32
32
 
33
- Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).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 Z={command:`delete`,describe:`Delete Smart Tiered Cache setting`,builder:X,handler:async t=>o({command:`cache settings smart-tiered-cache delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){i({command:`cf cache settings smart-tiered-cache delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=s,!await f({force:!!t.force})){process.stderr.write(`Aborted.
33
+ Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).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 Z={command:`delete`,describe:`Delete Smart Tiered Cache setting`,builder:X,handler:async e=>o({command:`cache settings smart-tiered-cache delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf cache settings smart-tiered-cache delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force})){process.stderr.write(`Aborted.
34
34
  `);return}r(await a(`Deleting`,async()=>o.cache.settings.smartTieredCache.delete({zone_id:s})),{successLabel:`Deleted`})})};function Q(e){return e.usage(`$0 cache settings smart-tiered-cache edit
35
35
 
36
- Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`value`,{type:`string`,description:`Enable or disable the Smart Tiered Cache.`,choices:[`on`,`off`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update enablement of Smart Tiered Cache.`})}const ne={command:`edit`,describe:`Patch Smart Tiered Cache setting`,builder:Q,handler:async t=>o({command:`cache settings smart-tiered-cache edit`,classification:{safeFlags:[`value`,`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf cache settings smart-tiered-cache edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`json`,body:t.body===void 0?c({value:l(t.value,`value`,`text`)}):s(t.body)});return}let o=await n(t),u=await e({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=u,t.body){let e=s(t.body);r(await a(`Updating`,async()=>o.cache.settings.smartTieredCache.edit({body:e,zone_id:u})),{successLabel:`Updated`});return}t.value===void 0&&(t.value=await d(`value`,`Enable or disable the Smart Tiered Cache.`,[`on`,`off`]));let f=c({value:l(t.value,`value`,`text`)});r(await a(`Updating`,async()=>o.cache.settings.smartTieredCache.edit({body:f,zone_id:u})),{successLabel:`Updated`})})};function re(e){return e.usage(`$0 cache settings smart-tiered-cache get
36
+ Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`value`,{type:`string`,description:`Enable or disable the Smart Tiered Cache.`,choices:[`on`,`off`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update enablement of Smart Tiered Cache.`})}const ne={command:`edit`,describe:`Patch Smart Tiered Cache setting`,builder:Q,handler:async e=>o({command:`cache settings smart-tiered-cache edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf cache settings smart-tiered-cache edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({value:l(e.value,`value`,`text`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body);r(await a(`Updating`,async()=>o.cache.settings.smartTieredCache.edit({body:t,zone_id:u})),{successLabel:`Updated`});return}e.value===void 0&&(e.value=await d(`value`,`Enable or disable the Smart Tiered Cache.`,[`on`,`off`]));let f=c({value:l(e.value,`value`,`text`)});r(await a(`Updating`,async()=>o.cache.settings.smartTieredCache.edit({body:f,zone_id:u})),{successLabel:`Updated`})})};function re(e){return e.usage(`$0 cache settings smart-tiered-cache get
37
37
 
38
- Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get`,describe:`Get Smart Tiered Cache setting`,builder:re,handler:async t=>o({command:`cache settings smart-tiered-cache get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf cache settings smart-tiered-cache get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});t.zoneId=s,r(await a(`Loading`,async()=>o.cache.settings.smartTieredCache.get({zone_id:s})),{successLabel:`Loaded`})})},ae={command:`smart-tiered-cache`,describe:`Automatically determine the best upper-tier data centers for tiered cache topology`,builder:e=>e.command(Y).command(Z).command(ne).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oe(e){return e.usage(`$0 cache settings variants delete
38
+ Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get`,describe:`Get Smart Tiered Cache setting`,builder:re,handler:async e=>o({command:`cache settings smart-tiered-cache get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf cache settings smart-tiered-cache get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s,r(await a(`Loading`,async()=>o.cache.settings.smartTieredCache.get({zone_id:s})),{successLabel:`Loaded`})})},ae={command:`smart-tiered-cache`,describe:`Automatically determine the best upper-tier data centers for tiered cache topology`,builder:e=>e.command(Y).command(Z).command(ne).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oe(e){return e.usage(`$0 cache settings variants delete
39
39
 
40
- Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).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`,describe:`Delete variants setting`,builder:oe,handler:async t=>o({command:`cache settings variants delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){i({command:`cf cache settings variants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/cache/variants`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=s,!await f({force:!!t.force})){process.stderr.write(`Aborted.
40
+ Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).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`,describe:`Delete variants setting`,builder:oe,handler:async e=>o({command:`cache settings variants delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf cache settings variants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/variants`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force})){process.stderr.write(`Aborted.
41
41
  `);return}r(await a(`Deleting`,async()=>o.cache.settings.variants.delete({zone_id:s})),{successLabel:`Deleted`})})};function se(e){return e.usage(`$0 cache settings variants edit
42
42
 
43
- Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).option(`value-avif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for avif.`}).option(`value-bmp`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for bmp.`}).option(`value-gif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for gif.`}).option(`value-jp2`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jp2.`}).option(`value-jpeg`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpeg.`}).option(`value-jpg`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpg.`}).option(`value-jpg2`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpg2.`}).option(`value-png`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for png.`}).option(`value-tif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for tif.`}).option(`value-tiff`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for tiff.`}).option(`value-webp`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for webp.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ce={command:`edit`,describe:`Change variants setting`,builder:se,handler:async t=>o({command:`cache settings variants edit`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf cache settings variants edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/cache/variants`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`json`,body:t.body===void 0?c({value:{avif:t[`value-avif`],bmp:t[`value-bmp`],gif:t[`value-gif`],jp2:t[`value-jp2`],jpeg:t[`value-jpeg`],jpg:t[`value-jpg`],jpg2:t[`value-jpg2`],png:t[`value-png`],tif:t[`value-tif`],tiff:t[`value-tiff`],webp:t[`value-webp`]}}):s(t.body)});return}let o=await n(t),l=await e({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=l,t.body){let e=s(t.body);r(await a(`Updating`,async()=>o.cache.settings.variants.edit({...e,zone_id:l})),{successLabel:`Updated`});return}let u=c({value:{avif:t[`value-avif`],bmp:t[`value-bmp`],gif:t[`value-gif`],jp2:t[`value-jp2`],jpeg:t[`value-jpeg`],jpg:t[`value-jpg`],jpg2:t[`value-jpg2`],png:t[`value-png`],tif:t[`value-tif`],tiff:t[`value-tiff`],webp:t[`value-webp`]}});r(await a(`Updating`,async()=>o.cache.settings.variants.edit({...u,zone_id:l})),{successLabel:`Updated`})})};function le(e){return e.usage(`$0 cache settings variants get
43
+ Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).option(`value-avif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for avif.`}).option(`value-bmp`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for bmp.`}).option(`value-gif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for gif.`}).option(`value-jp2`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jp2.`}).option(`value-jpeg`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpeg.`}).option(`value-jpg`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpg.`}).option(`value-jpg2`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpg2.`}).option(`value-png`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for png.`}).option(`value-tif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for tif.`}).option(`value-tiff`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for tiff.`}).option(`value-webp`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for webp.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ce={command:`edit`,describe:`Change variants setting`,builder:se,handler:async e=>o({command:`cache settings variants edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf cache settings variants edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/variants`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({value:{avif:e[`value-avif`],bmp:e[`value-bmp`],gif:e[`value-gif`],jp2:e[`value-jp2`],jpeg:e[`value-jpeg`],jpg:e[`value-jpg`],jpg2:e[`value-jpg2`],png:e[`value-png`],tif:e[`value-tif`],tiff:e[`value-tiff`],webp:e[`value-webp`]}}):s(e.body)});return}let o=await t(e),l=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=l,e.body){let t=s(e.body);r(await a(`Updating`,async()=>o.cache.settings.variants.edit({...t,zone_id:l})),{successLabel:`Updated`});return}let u=c({value:{avif:e[`value-avif`],bmp:e[`value-bmp`],gif:e[`value-gif`],jp2:e[`value-jp2`],jpeg:e[`value-jpeg`],jpg:e[`value-jpg`],jpg2:e[`value-jpg2`],png:e[`value-png`],tif:e[`value-tif`],tiff:e[`value-tiff`],webp:e[`value-webp`]}});r(await a(`Updating`,async()=>o.cache.settings.variants.edit({...u,zone_id:l})),{successLabel:`Updated`})})};function le(e){return e.usage(`$0 cache settings variants get
44
44
 
45
- Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get`,describe:`Get variants setting`,builder:le,handler:async t=>o({command:`cache settings variants get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf cache settings variants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/cache/variants`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});t.zoneId=s,r(await a(`Loading`,async()=>o.cache.settings.variants.get({zone_id:s})),{successLabel:`Loaded`})})},de={command:`variants`,describe:`Serve different cached versions of an image based on the Accept header (WebP, AVIF, etc.)`,builder:e=>e.command($).command(ce).command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fe={command:`settings`,describe:`Configure Cache Reserve, tiered caching, and variant serving`,builder:e=>e.command(R).command(q).command(ae).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},pe={command:`cache`,describe:`Purge cached content and configure Cache Reserve, tiered caching, and variant serving`,builder:e=>e.command(h).command(ee).command(P).command(M).command(A).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{pe as default};
45
+ Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get`,describe:`Get variants setting`,builder:le,handler:async e=>o({command:`cache settings variants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf cache settings variants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/variants`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s,r(await a(`Loading`,async()=>o.cache.settings.variants.get({zone_id:s})),{successLabel:`Loaded`})})},de={command:`variants`,describe:`Serve different cached versions of an image based on the Accept header (WebP, AVIF, etc.)`,builder:e=>e.command($).command(ce).command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fe={command:`settings`,describe:`Configure Cache Reserve, tiered caching, and variant serving`,builder:e=>e.command(R).command(q).command(ae).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},pe={command:`cache`,describe:`Purge cached content and configure Cache Reserve, tiered caching, and variant serving`,builder:e=>e.command(h).command(ee).command(P).command(M).command(A).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{pe as default};
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-CEOHpZgd.mjs";import{r as t}from"./auth-BIr56Mbx.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-A61dRbXl.mjs";import{t as a}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";function l(e){return e.usage(`$0 certificate-authorities hostname-associations get
2
+ import{n as e}from"./auth-Br-t8vL_.mjs";import{i as t}from"./context-CquYYyS3.mjs";import{t as n}from"./output-ClYel9WX.mjs";import{t as r}from"./dry-run-p9Q7nMZ5.mjs";import{t as i}from"./progress-TLUEIYE6.mjs";import{t as a}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{n as o,t as s}from"./body-parser-NjzJZMOV.mjs";import{n as c}from"./input-validation-0CeePPHp.mjs";function l(e){return e.usage(`$0 certificate-authorities hostname-associations get
3
3
 
4
- List Hostname Associations.`).option(`mtls-certificate-id`,{type:`string`,description:`The UUID to match against for a certificate that was uploaded to the mTLS Certificate Management endpoint. If no mtls_certificate_id is given, the results will be the hostnames associated to your active Cloudflare Managed CA.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`List Hostname Associations`,builder:l,handler:async o=>a({command:`certificate-authorities hostname-associations get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let a={mtls_certificate_id:o[`mtls-certificate-id`]};if(o.dryRun){r({command:`cf certificate-authorities hostname-associations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/certificate_authorities/hostname_associations`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.certificateAuthorities.hostnameAssociations.get({zone_id:c,...a})),{successLabel:`Loaded`})})};function d(e){return e.usage(`$0 certificate-authorities hostname-associations update
4
+ List Hostname Associations.`).option(`mtls-certificate-id`,{type:`string`,description:`The UUID to match against for a certificate that was uploaded to the mTLS Certificate Management endpoint. If no mtls_certificate_id is given, the results will be the hostnames associated to your active Cloudflare Managed CA.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`List Hostname Associations`,builder:l,handler:async o=>a({command:`certificate-authorities hostname-associations get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let a={mtls_certificate_id:o[`mtls-certificate-id`]};if(o.dryRun){r({command:`cf certificate-authorities hostname-associations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/certificate_authorities/hostname_associations`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.certificateAuthorities.hostnameAssociations.get({zone_id:c,...a})),{successLabel:`Loaded`})})};function d(e){return e.usage(`$0 certificate-authorities hostname-associations update
5
5
 
6
- Replace Hostname Associations.`).option(`hostnames`,{type:`string`,array:!0,description:`The hostnames field`}).option(`mtls-certificate-id`,{type:`string`,description:`The UUID for a certificate that was uploaded to the mTLS Certificate Management endpoint. If no mtls_certificate_id is given, the hostnames will be associated to your active Cloudflare Managed CA.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const f={command:`update`,describe:`Replace Hostname Associations`,builder:d,handler:async l=>a({command:`certificate-authorities hostname-associations update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf certificate-authorities hostname-associations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/certificate_authorities/hostname_associations`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({hostnames:l.hostnames,mtls_certificate_id:c(l[`mtls-certificate-id`],`mtls-certificate-id`,`text`)}):o(l.body)});return}let a=await t(l),u=await e({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body);n(await i(`Updating`,async()=>a.certificateAuthorities.hostnameAssociations.update({...e,zone_id:u})),{successLabel:`Updated`});return}let d=s({hostnames:l.hostnames,mtls_certificate_id:c(l[`mtls-certificate-id`],`mtls-certificate-id`,`text`)});n(await i(`Updating`,async()=>a.certificateAuthorities.hostnameAssociations.update({...d,zone_id:u})),{successLabel:`Updated`})})},p={command:`hostname-associations`,describe:`Operations for hostname-associations`,builder:e=>e.command(u).command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},m={command:`certificate-authorities`,describe:`certificate-authorities`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
6
+ Replace Hostname Associations.`).option(`hostnames`,{type:`string`,array:!0,description:`The hostnames field`}).option(`mtls-certificate-id`,{type:`string`,description:`The UUID for a certificate that was uploaded to the mTLS Certificate Management endpoint. If no mtls_certificate_id is given, the hostnames will be associated to your active Cloudflare Managed CA.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const f={command:`update`,describe:`Replace Hostname Associations`,builder:d,handler:async l=>a({command:`certificate-authorities hostname-associations update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf certificate-authorities hostname-associations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/certificate_authorities/hostname_associations`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({hostnames:l.hostnames,mtls_certificate_id:c(l[`mtls-certificate-id`],`mtls-certificate-id`,`text`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body);n(await i(`Updating`,async()=>a.certificateAuthorities.hostnameAssociations.update({...e,zone_id:u})),{successLabel:`Updated`});return}let d=s({hostnames:l.hostnames,mtls_certificate_id:c(l[`mtls-certificate-id`],`mtls-certificate-id`,`text`)});n(await i(`Updating`,async()=>a.certificateAuthorities.hostnameAssociations.update({...d,zone_id:u})),{successLabel:`Updated`})})},p={command:`hostname-associations`,describe:`Operations for hostname-associations`,builder:e=>e.command(u).command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},m={command:`certificate-authorities`,describe:`certificate-authorities`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{$ as e,At as t,D as n,E as r,Et as i,K as a,L as o,N as s,d as c,h as l,k as u,q as d,rt as f}from"./dist-BuCJ_55d.mjs";import{a as p,c as m,d as h,f as g,h as _,i as v,l as y,m as b,n as ee,o as te,p as ne,r as x,s as re,t as ie,u as S}from"./chunk-FT2NMTJB-1VFYM1Ro.mjs";import{createRequire as C}from"node:module";import{chmodSync as w,existsSync as T,mkdirSync as E,readFileSync as D,readdirSync as O,rmSync as k,writeFileSync as A}from"node:fs";import j from"node:path";import{URLSearchParams as ae}from"node:url";C(import.meta.url||(typeof __filename==`string`?__filename:`/`));function M(e){function t(){return j.resolve(e(),`preferences.json`)}_(t,`getUserPreferencesPath`);function n(){try{let e=D(t(),`utf8`),n=JSON.parse(e);return typeof n==`object`&&n?n:{}}catch{return{}}}_(n,`readUserPreferences`);function r(e){let r={...n(),...e},i=t();E(j.dirname(i),{recursive:!0}),A(i,JSON.stringify(r,null,` `),{encoding:`utf-8`})}return _(r,`updateUserPreferences`),{readUserPreferences:n,updateUserPreferences:r}}_(M,`createPreferences`);var N=6e4,P=525600,F=43200,I=1440,L=Symbol.for(`constructDateFrom`);function R(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&L in e?e[L](t):e instanceof Date?new e.constructor(t):new Date(t)}_(R,`constructFrom`);function z(e,t){return R(t||e,e)}_(z,`toDate`);var B={};function V(){return B}_(V,`getDefaultOptions`);function H(e){let t=z(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}_(H,`getTimezoneOffsetInMilliseconds`);function U(e,...t){let n=R.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}_(U,`normalizeDates`);function oe(e,t){let n=z(e)-+z(t);return n<0?-1:n>0?1:n}_(oe,`compareAsc`);function se(e){return R(e,Date.now())}_(se,`constructNow`);function ce(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}_(ce,`getRoundingMethod`);var le={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},ue=_((e,t,n)=>{let r,i=le[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r},`formatDistance`);function W(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}_(W,`buildFormatLongFn`);var de={date:W({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:W({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:W({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},fe={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},pe=_((e,t,n,r)=>fe[e],`formatRelative`);function G(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}_(G,`buildLocalizeFn`);var me={ordinalNumber:_((e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},`ordinalNumber`),era:G({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:G({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:_(e=>e-1,`argumentCallback`)}),month:G({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:G({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:G({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function K(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?ge(s,e=>e.test(o)):he(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}_(K,`buildMatchFn`);function he(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}_(he,`findKey`);function ge(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}_(ge,`findIndex`);function _e(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}_(_e,`buildMatchPatternFn`);var ve={code:`en-US`,formatDistance:ue,formatLong:de,formatRelative:pe,localize:me,match:{ordinalNumber:_e({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:_(e=>parseInt(e,10),`valueCallback`)}),era:K({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:K({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:_(e=>e+1,`valueCallback`)}),month:K({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:K({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:K({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function ye(e,t,n){let r=V(),i=n?.locale??r.locale??ve,a=oe(e,t);if(isNaN(a))throw RangeError(`Invalid time value`);let o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[s,c]=U(n?.in,...a>0?[t,e]:[e,t]),l=ce(n?.roundingMethod??`round`),u=c.getTime()-s.getTime(),d=u/N,f=(u-(H(c)-H(s)))/N,p=n?.unit,m;if(m=p||(d<1?`second`:d<60?`minute`:d<I?`hour`:f<F?`day`:f<P?`month`:`year`),m===`second`){let e=l(u/1e3);return i.formatDistance(`xSeconds`,e,o)}else if(m===`minute`){let e=l(d);return i.formatDistance(`xMinutes`,e,o)}else if(m===`hour`){let e=l(d/60);return i.formatDistance(`xHours`,e,o)}else if(m===`day`){let e=l(f/I);return i.formatDistance(`xDays`,e,o)}else if(m===`month`){let e=l(f/F);return e===12&&p!==`month`?i.formatDistance(`xYears`,1,o):i.formatDistance(`xMonths`,e,o)}else{let e=l(f/P);return i.formatDistance(`xYears`,e,o)}}_(ye,`formatDistanceStrict`);function be(e,t){return ye(e,se(e),t)}_(be,`formatDistanceToNowStrict`);function q(e,t){return{read:_(()=>{let n=t();if(!T(n))return;let r=i(n);try{return S(e,r)}catch{return}},`read`),write(n){let r=t();E(j.dirname(r),{recursive:!0}),A(r,g(e,n),{encoding:`utf-8`,mode:384}),w(r,384)},clear(){let e=t(),n=T(e);return k(e,{force:!0}),n},path:t}}_(q,`createFileStorage`);function xe(e){let{logger:t,prompt:n}=e;return _(async function(e,r){if(u())return t.log(r),!0;let i=await n(e);return typeof i==`string`&&i.trim().toLowerCase()===`yes`},`ensureTemporaryTermsAccepted`)}_(xe,`createTemporaryTermsPrompt`);var Se=[9106,1e4];function J(e){return e?.code}_(J,`getErrorCode`);function Ce(e){let t=J(e);return t!==void 0&&Se.includes(t)}_(Ce,`isMembershipsInaccessible`);function we(e){return{"no-credentials-non-interactive":`Could not authenticate because no credentials were found and the environment is non-interactive. Set a CLOUDFLARE_API_TOKEN environment variable or run \`${e}\` in an interactive terminal first.`,"no-credentials-login-failed":`No credentials were found and the login attempt was unsuccessful. Run \`${e}\` to try again.`,"token-expired-non-interactive":`Your auth token has expired and could not be refreshed, and the environment is non-interactive. Run \`${e}\` in an interactive terminal or set a CLOUDFLARE_API_TOKEN.`,"token-expired-login-failed":`Your auth token has expired and could not be refreshed, and the login attempt was unsuccessful. Run \`${e}\` to try again.`,"token-refresh-unreachable":`Your auth token has expired and could not be refreshed because the Cloudflare auth server could not be reached. This is usually a network problem (connectivity, proxy, or IPv6), not an invalid login: your stored credentials were left unchanged. Check your connection and try again.`}}_(we,`notLoggedInErrorBodies`);function Te(e,t,n){let r=new Date(t.claim.expiresAt);e.log(v`
2
+ import{$ as e,At as t,D as n,E as r,Et as i,K as a,L as o,N as s,d as c,h as l,k as u,q as d,rt as f}from"./dist-D1iG7guo.mjs";import{a as p,c as m,d as h,f as g,h as _,i as v,l as y,m as b,n as ee,o as te,p as ne,r as x,s as re,t as ie,u as S}from"./chunk-FT2NMTJB-BFqlGcem.mjs";import{createRequire as C}from"node:module";import{chmodSync as w,existsSync as T,mkdirSync as E,readFileSync as D,readdirSync as O,rmSync as k,writeFileSync as A}from"node:fs";import j from"node:path";import{URLSearchParams as ae}from"node:url";C(import.meta.url||(typeof __filename==`string`?__filename:`/`));function M(e){function t(){return j.resolve(e(),`preferences.json`)}_(t,`getUserPreferencesPath`);function n(){try{let e=D(t(),`utf8`),n=JSON.parse(e);return typeof n==`object`&&n?n:{}}catch{return{}}}_(n,`readUserPreferences`);function r(e){let r={...n(),...e},i=t();E(j.dirname(i),{recursive:!0}),A(i,JSON.stringify(r,null,` `),{encoding:`utf-8`})}return _(r,`updateUserPreferences`),{readUserPreferences:n,updateUserPreferences:r}}_(M,`createPreferences`);var N=6e4,P=525600,F=43200,I=1440,L=Symbol.for(`constructDateFrom`);function R(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&L in e?e[L](t):e instanceof Date?new e.constructor(t):new Date(t)}_(R,`constructFrom`);function z(e,t){return R(t||e,e)}_(z,`toDate`);var B={};function V(){return B}_(V,`getDefaultOptions`);function H(e){let t=z(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}_(H,`getTimezoneOffsetInMilliseconds`);function U(e,...t){let n=R.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}_(U,`normalizeDates`);function oe(e,t){let n=z(e)-+z(t);return n<0?-1:n>0?1:n}_(oe,`compareAsc`);function se(e){return R(e,Date.now())}_(se,`constructNow`);function ce(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}_(ce,`getRoundingMethod`);var le={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},ue=_((e,t,n)=>{let r,i=le[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r},`formatDistance`);function W(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}_(W,`buildFormatLongFn`);var de={date:W({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:W({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:W({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},fe={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},pe=_((e,t,n,r)=>fe[e],`formatRelative`);function G(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}_(G,`buildLocalizeFn`);var me={ordinalNumber:_((e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},`ordinalNumber`),era:G({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:G({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:_(e=>e-1,`argumentCallback`)}),month:G({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:G({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:G({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function K(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?ge(s,e=>e.test(o)):he(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}_(K,`buildMatchFn`);function he(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}_(he,`findKey`);function ge(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}_(ge,`findIndex`);function _e(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}_(_e,`buildMatchPatternFn`);var ve={code:`en-US`,formatDistance:ue,formatLong:de,formatRelative:pe,localize:me,match:{ordinalNumber:_e({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:_(e=>parseInt(e,10),`valueCallback`)}),era:K({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:K({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:_(e=>e+1,`valueCallback`)}),month:K({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:K({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:K({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function ye(e,t,n){let r=V(),i=n?.locale??r.locale??ve,a=oe(e,t);if(isNaN(a))throw RangeError(`Invalid time value`);let o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[s,c]=U(n?.in,...a>0?[t,e]:[e,t]),l=ce(n?.roundingMethod??`round`),u=c.getTime()-s.getTime(),d=u/N,f=(u-(H(c)-H(s)))/N,p=n?.unit,m;if(m=p||(d<1?`second`:d<60?`minute`:d<I?`hour`:f<F?`day`:f<P?`month`:`year`),m===`second`){let e=l(u/1e3);return i.formatDistance(`xSeconds`,e,o)}else if(m===`minute`){let e=l(d);return i.formatDistance(`xMinutes`,e,o)}else if(m===`hour`){let e=l(d/60);return i.formatDistance(`xHours`,e,o)}else if(m===`day`){let e=l(f/I);return i.formatDistance(`xDays`,e,o)}else if(m===`month`){let e=l(f/F);return e===12&&p!==`month`?i.formatDistance(`xYears`,1,o):i.formatDistance(`xMonths`,e,o)}else{let e=l(f/P);return i.formatDistance(`xYears`,e,o)}}_(ye,`formatDistanceStrict`);function be(e,t){return ye(e,se(e),t)}_(be,`formatDistanceToNowStrict`);function q(e,t){return{read:_(()=>{let n=t();if(!T(n))return;let r=i(n);try{return S(e,r)}catch{return}},`read`),write(n){let r=t();E(j.dirname(r),{recursive:!0}),A(r,g(e,n),{encoding:`utf-8`,mode:384}),w(r,384)},clear(){let e=t(),n=T(e);return k(e,{force:!0}),n},path:t}}_(q,`createFileStorage`);function xe(e){let{logger:t,prompt:n}=e;return _(async function(e,r){if(u())return t.log(r),!0;let i=await n(e);return typeof i==`string`&&i.trim().toLowerCase()===`yes`},`ensureTemporaryTermsAccepted`)}_(xe,`createTemporaryTermsPrompt`);var Se=[9106,1e4];function J(e){return e?.code}_(J,`getErrorCode`);function Ce(e){let t=J(e);return t!==void 0&&Se.includes(t)}_(Ce,`isMembershipsInaccessible`);function we(e){return{"no-credentials-non-interactive":`Could not authenticate because no credentials were found and the environment is non-interactive. Set a CLOUDFLARE_API_TOKEN environment variable or run \`${e}\` in an interactive terminal first.`,"no-credentials-login-failed":`No credentials were found and the login attempt was unsuccessful. Run \`${e}\` to try again.`,"token-expired-non-interactive":`Your auth token has expired and could not be refreshed, and the environment is non-interactive. Run \`${e}\` in an interactive terminal or set a CLOUDFLARE_API_TOKEN.`,"token-expired-login-failed":`Your auth token has expired and could not be refreshed, and the login attempt was unsuccessful. Run \`${e}\` to try again.`,"token-refresh-unreachable":`Your auth token has expired and could not be refreshed because the Cloudflare auth server could not be reached. This is usually a network problem (connectivity, proxy, or IPv6), not an invalid login: your stored credentials were left unchanged. Check your connection and try again.`}}_(we,`notLoggedInErrorBodies`);function Te(e,t,n){let r=new Date(t.claim.expiresAt);e.log(v`
3
3
  Temporary account ready:
4
4
  Account: ${t.account.name} (${n?`reused`:`created`})
5
5
  Claim within: ${be(r)}
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{At as e,B as t,Et as n,G as r,K as i,V as a,k as o,kt as s,q as c,rt as l,tt as u,wt as d}from"./dist-BuCJ_55d.mjs";import{createRequire as f}from"node:module";import{chmodSync as p,existsSync as m,mkdirSync as h,rmSync as g,writeFileSync as _}from"node:fs";import v from"node:path";import ee from"node:url";import y from"node:assert";import{TextEncoder as te}from"node:util";import ne from"node:http";import{createCipheriv as re,createDecipheriv as ie,createHash as b,randomBytes as x,webcrypto as S}from"node:crypto";import{spawn as ae,spawnSync as C}from"node:child_process";f(import.meta.url||(typeof __filename==`string`?__filename:`/`));var oe=Object.defineProperty,w=(e,t)=>oe(e,`name`,{value:t,configurable:!0}),T=t();f(import.meta.url||(typeof __filename==`string`?__filename:`/`));var se=!1;function E(e){let{configOverride:t,warningLogger:n,storage:r}=e,{oauth_token:i,refresh_token:a,expiration_time:o,scopes:s,api_token:c}=t??r.read()??{};return i?{accessToken:{value:i,expiry:o??`2000-01-01:00:00:00+00:00`},refreshToken:{value:a??``},scopes:s}:c?(!se&&n&&(se=!0,n.warn(`It looks like you have used Wrangler v1's \`config\` command to login with an API token
2
+ import{At as e,B as t,Et as n,G as r,K as i,V as a,k as o,kt as s,q as c,rt as l,tt as u,wt as d}from"./dist-D1iG7guo.mjs";import{createRequire as f}from"node:module";import{chmodSync as p,existsSync as m,mkdirSync as h,rmSync as g,writeFileSync as _}from"node:fs";import v from"node:path";import ee from"node:url";import y from"node:assert";import{TextEncoder as te}from"node:util";import ne from"node:http";import{createCipheriv as re,createDecipheriv as ie,createHash as b,randomBytes as x,webcrypto as S}from"node:crypto";import{spawn as ae,spawnSync as C}from"node:child_process";f(import.meta.url||(typeof __filename==`string`?__filename:`/`));var oe=Object.defineProperty,w=(e,t)=>oe(e,`name`,{value:t,configurable:!0}),T=t();f(import.meta.url||(typeof __filename==`string`?__filename:`/`));var se=!1;function E(e){let{configOverride:t,warningLogger:n,storage:r}=e,{oauth_token:i,refresh_token:a,expiration_time:o,scopes:s,api_token:c}=t??r.read()??{};return i?{accessToken:{value:i,expiry:o??`2000-01-01:00:00:00+00:00`},refreshToken:{value:a??``},scopes:s}:c?(!se&&n&&(se=!0,n.warn(`It looks like you have used Wrangler v1's \`config\` command to login with an API token
3
3
  from ${t===void 0?r.path():`in-memory config`}.
4
4
  This is no longer supported in the current version of Wrangler.
5
5
  If you wish to authenticate via an API token then please set the \`CLOUDFLARE_API_TOKEN\` environment variable.`)),{deprecatedApiToken:c}):{}}w(E,`readStoredAuthState`);var ce=l({variableName:`CLOUDFLARE_API_TOKEN`,deprecatedName:`CF_API_TOKEN`}),le=l({variableName:`CLOUDFLARE_API_KEY`,deprecatedName:`CF_API_KEY`}),ue=l({variableName:`CLOUDFLARE_EMAIL`,deprecatedName:`CF_EMAIL`});function de(e){if(e?.allowGlobalAuthKey??!0){let e=le(),t=ue();if(e&&t)return{authKey:e,authEmail:t}}let t=ce();if(t)return{apiToken:t}}w(de,`getAuthFromEnv`);function fe(e){let t=de(e);if(t)return t;let n=E({storage:e.storage,warningLogger:e.warningLogger});if(n.deprecatedApiToken)return{apiToken:n.deprecatedApiToken};if(n.accessToken?.value)return{apiToken:n.accessToken.value}}w(fe,`getAPIToken`);function pe(t){let n=fe(t);if(!n)throw new e(`No API token found.`,{telemetryMessage:`user auth missing api token`});return n}w(pe,`requireApiToken`);var me=/^[A-Za-z0-9_-]+$/;function he(t,n){if(!me.test(t))throw new e(`Invalid account ID "${t}" ${n}. Account IDs may only contain alphanumeric characters, hyphens, and underscores.`,{telemetryMessage:`user account id invalid characters`});return t}w(he,`validateAccountId`);var D=l({variableName:`WRANGLER_AUTH_DOMAIN`,defaultValue:w(()=>i()===`staging`?`dash.staging.cloudflare.com`:`dash.cloudflare.com`,`defaultValue`)}),ge=l({variableName:`WRANGLER_AUTH_URL`,defaultValue:w(()=>`https://${D()}/oauth2/auth`,`defaultValue`)}),_e=l({variableName:`WRANGLER_TOKEN_URL`,defaultValue:w(()=>`https://${D()}/oauth2/token`,`defaultValue`)}),ve=l({variableName:`WRANGLER_REVOKE_URL`,defaultValue:w(()=>`https://${D()}/oauth2/revoke`,`defaultValue`)}),ye=l({variableName:`CLOUDFLARE_ACCOUNT_ID`,deprecatedName:`CF_ACCOUNT_ID`});function be(){let e=ye();if(e)return he(e,"set in the `CLOUDFLARE_ACCOUNT_ID` environment variable")}w(be,`getCloudflareAccountIdFromEnv`);var xe=`/oauth2/device/auth`;function Se(){return`https://${D()}${xe}`}w(Se,`getDeviceAuthUrl`);var Ce=l({variableName:`CLOUDFLARE_ACCESS_CLIENT_ID`}),we=l({variableName:`CLOUDFLARE_ACCESS_CLIENT_SECRET`}),Te=l({variableName:`WRANGLER_CF_AUTHORIZATION_TOKEN`}),Ee=u({variableName:`CLOUDFLARE_AUTH_USE_KEYRING`}),O={},k=new Map;function De(e,t){let n=new URL(`https://${e}`);return t&&n.searchParams.set(`cf_workers_preview_token`,t),n.toString()}w(De,`buildProbeUrl`);function Oe(){for(let e of Object.keys(O))delete O[e];k.clear()}w(Oe,`clearAccessCaches`);async function ke(e,t,n){t.debug(`Checking if domain has Access enabled:`,e);let r=JSON.stringify([e,!!n]);if(k.has(r))return t.debug(`Using cached Access switch for:`,e,k.get(r)),k.get(r)??!1;t.debug(`Access switch not cached for:`,e);try{let i=new AbortController,a=setTimeout(()=>{i.abort()},1e3),o=await(0,T.fetch)(De(e,n),{redirect:`manual`,signal:i.signal});clearTimeout(a);let s=!!(o.status===302&&o.headers.get(`location`)?.includes(`cloudflareaccess.com`));return(s||!n)&&(t.debug(`Caching access switch for:`,e),k.set(r,s)),s}catch{return t.debug(`Access probe failed for:`,e),!1}}w(ke,`domainUsesAccess`);async function Ae(t,n){let r=n.logger,i=Ce(),a=we();if(i&&a)return r.debug(`Using Access Service Token headers for domain:`,t),{"CF-Access-Client-Id":i,"CF-Access-Client-Secret":a};if((i!==void 0||a!==void 0)&&r.warn(`Both CLOUDFLARE_ACCESS_CLIENT_ID and CLOUDFLARE_ACCESS_CLIENT_SECRET must be set to use Access Service Token authentication. Only ${i===void 0?`CLOUDFLARE_ACCESS_CLIENT_SECRET`:`CLOUDFLARE_ACCESS_CLIENT_ID`} was found.`),!await ke(t,r,n.previewToken))return{};if(r.debug(`Getting Access headers for domain:`,t),O[t])return r.debug(`Using cached Access headers for domain:`,t),O[t];if((n.isNonInteractiveOrCI??o)())throw new e(`The domain "${t}" is behind Cloudflare Access, but no Access Service Token credentials were found and the current environment is non-interactive.
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,r as t}from"./source-38bULAR8.mjs";import{At as n,B as r,j as i,m as a,st as o}from"./dist-BuCJ_55d.mjs";import{createRequire as s}from"node:module";import{readFileSync as c}from"node:fs";import l,{resolve as u}from"node:path";import d from"node:assert";import{spawnSync as f}from"node:child_process";const p=s(import.meta.url||(typeof __filename==`string`?__filename:`/`));var m=Object.create,h=Object.defineProperty,g=Object.getOwnPropertyDescriptor,_=Object.getOwnPropertyNames,v=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty,b=(e,t)=>h(e,`name`,{value:t,configurable:!0}),x=(e=>p===void 0?typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(p===void 0?e:p)[t]}):e:p)(function(e){if(p!==void 0)return p.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)}),S=(e,t)=>function(){return t||(0,e[_(e)[0]])((t={exports:{}}).exports,t),t.exports},C=(e,t)=>{for(var n in t)h(e,n,{get:t[n],enumerable:!0})},w=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of _(t))!y.call(e,i)&&i!==n&&h(e,i,{get:()=>t[i],enumerable:!(r=g(t,i))||r.enumerable});return e},T=(e,t,n)=>(n=e==null?{}:m(v(e)),w(t||!e||!e.__esModule?h(n,`default`,{value:e,enumerable:!0}):n,e)),E=e(((e,n)=>{var r=t(`child_process`).exec,i=t(`child_process`).execSync,a=t(`fs`),o=t(`path`),s=a.access,c=a.accessSync,l=a.constants||a,u=process.platform==`win32`,d=function(e,t){s(e,l.F_OK,function(e){t(!e)})},f=function(e){try{return c(e,l.F_OK),!1}catch{return!0}},p=function(e,t){s(e,l.F_OK|l.X_OK,function(e){t(null,!e)})},m=function(e){try{return c(e,l.F_OK|l.X_OK),!0}catch{return!1}},h=function(e,t,n){d(e,function(i){if(!i){r(`command -v `+t+` 2>/dev/null && { echo >&1 `+t+`; exit 0; }`,function(e,t,r){n(null,!!t)});return}p(e,n)})},g=function(e,t,n){if(!/^(?!(?:.*\s|.*\.|\W+)$)(?:[a-zA-Z]:)?(?:(?:[^<>:"\|\?\*\n])+(?:\/\/|\/|\\\\|\\)?)+$/m.test(e)){n(null,!1);return}r(`where `+t,function(e){e===null?n(null,!0):n(null,!1)})},_=function(e,t){if(f(e))try{return!!i(`command -v `+t+` 2>/dev/null && { echo >&1 `+t+`; exit 0; }`)}catch{return!1}return m(e)},v=function(e,t,n){if(!/^(?!(?:.*\s|.*\.|\W+)$)(?:[a-zA-Z]:)?(?:(?:[^<>:"\|\?\*\n])+(?:\/\/|\/|\\\\|\\)?)+$/m.test(e))return!1;try{return!!i(`where `+t,{stdio:[]})}catch{return!1}},y=function(e){return/[^A-Za-z0-9_\/:=-]/.test(e)&&(e=`'`+e.replace(/'/g,`'\\''`)+`'`,e=e.replace(/^(?:'')+/g,``).replace(/\\'''/g,`\\'`)),e};u&&(y=function(e){if(/[\\]/.test(e)){var t=`"`+o.dirname(e)+`"`,n=`"`+o.basename(e)+`"`;return t+`:`+n}return`"`+e+`"`}),n.exports=function e(t,n){var r=y(t);if(!n&&typeof Promise<`u`)return new Promise(function(n,r){e(t,function(e,i){i?n(t):r(e)})});u?g(t,r,n):h(t,r,n)},n.exports.sync=function(e){var t=y(e);return u?v(e,t):_(e,t)}})),D=e(((e,t)=>{t.exports=E()})),ee=r(),O=D();s(import.meta.url||(typeof __filename==`string`?__filename:`/`));function k(e){if(e.compiled_schema)return c(u(e.compiled_schema));let{base_path:t,source_schemas:r}=e,i=(r??[]).map(e=>u(t,e));if(!(0,O.sync)(`capnp`))throw new n(`The capnp compiler is required to upload capnp schemas, but is not present.`,{telemetryMessage:`capnp compiler missing`});let a=f(`capnp`,[`compile`,`-o-`,`--src-prefix=${u(t??`.`)}`,...i],{maxBuffer:3*1024*1024});if(a.error)throw a.error;if(a.stderr.length)throw Error(a.stderr.toString());return a.stdout}b(k,`handleUnsafeCapnp`);var A={esm:`application/javascript+module`,commonjs:`application/javascript`,"compiled-wasm":`application/wasm`,buffer:`application/octet-stream`,text:`text/plain`,python:`text/x-python`,"python-requirement":`text/x-python-requirement`};function j(e){let t=A[e];if(t===void 0)throw TypeError(`Unsupported module: `+e);return t}b(j,`toMimeType`);function M(e){let t=Object.keys(A).find(t=>A[t]===e);if(t===void 0)throw TypeError(`Unsupported mime type: `+e);return t}b(M,`fromMimeType`);function N(e,t,r){let s=new ee.FormData,{main:u,sourceMaps:f,migrations:p,code_update_strategy:m,exports:h,compatibility_date:g,compatibility_flags:_,keepVars:v,keepSecrets:y,keepBindings:b,logpush:x,placement:S,tail_consumers:C,streaming_tail_consumers:w,limits:T,annotations:E,keep_assets:D,assets:O,observability:A,cache:M,package_dependencies:N}=e,P={html_handling:O?.assetConfig?.html_handling,not_found_handling:O?.assetConfig?.not_found_handling,run_worker_first:O?.run_worker_first,_redirects:O?._redirects,_headers:O?._headers};if(O&&!O.routerConfig.has_user_worker)return s.set(`metadata`,JSON.stringify({assets:{jwt:O.jwt,config:P},...E&&{annotations:E},...g&&{compatibility_date:g},..._&&{compatibility_flags:_}})),s;let{modules:F}=e,I=[],te=a(`plain_text`,t),ne=a(`json`,t),re=a(`secret_text`,t),ie=a(`kv_namespace`,t),ae=a(`send_email`,t),oe=a(`durable_object_namespace`,t),se=a(`workflow`,t),ce=a(`queue`,t),le=a(`r2_bucket`,t),ue=a(`d1`,t),de=a(`vectorize`,t),fe=a(`ai_search_namespace`,t),pe=a(`ai_search`,t),L=a(`agent_memory`,t),R=a(`hyperdrive`,t),z=a(`secrets_store_secret`,t),B=a(`artifacts`,t),me=a(`unsafe_hello_world`,t),he=a(`flagship`,t),ge=a(`ratelimit`,t),_e=a(`vpc_service`,t),ve=a(`vpc_network`,t),V=a(`service`,t),ye=a(`analytics_engine`,t),be=a(`dispatch_namespace`,t),xe=a(`mtls_certificate`,t),Se=a(`pipeline`,t),Ce=a(`k2`,t),we=a(`worker_loader`,t),Te=a(`logfwdr`,t),Ee=a(`wasm_module`,t),H=a(`browser`,t)[0],U=a(`analytics`,t)[0],W=a(`ai`,t)[0],G=a(`images`,t)[0],K=a(`stream`,t)[0],q=a(`media`,t)[0],J=a(`version_metadata`,t)[0],Y=a(`assets`,t)[0],De=a(`text_blob`,t),Oe=a(`data_blob`,t);a(`inherit`,t).forEach(({binding:e})=>{I.push({name:e,type:`inherit`})}),te.forEach(({binding:e,value:t})=>{I.push({name:e,type:`plain_text`,text:t})}),ne.forEach(({binding:e,value:t})=>{I.push({name:e,type:`json`,json:t})}),re.forEach(({binding:e,value:t})=>{I.push({name:e,type:`secret_text`,text:t})}),ie.forEach(({id:e,binding:t,raw:i})=>{if(r?.dryRun&&(e??=o),e===void 0)throw new n(`${t} bindings must have an "id" field`,{telemetryMessage:`kv namespace binding missing id`});e===o?I.push({name:t,type:`inherit`}):I.push({name:t,type:`kv_namespace`,namespace_id:e,raw:i})}),ae.forEach(e=>{let t={name:e.name,type:`send_email`,allowed_sender_addresses:e.allowed_sender_addresses};e.destination_address===void 0?e.allowed_destination_addresses===void 0?I.push(t):I.push({...t,allowed_destination_addresses:e.allowed_destination_addresses}):I.push({...t,destination_address:e.destination_address})}),oe.forEach(({name:e,class_name:t,script_name:n,environment:r})=>{I.push({name:e,type:`durable_object_namespace`,class_name:t,...n&&{script_name:n},...r&&{environment:r}})}),se.forEach(({binding:e,name:t,class_name:n,script_name:r,raw:i})=>{I.push({type:`workflow`,name:e,workflow_name:t,class_name:n,script_name:r,raw:i})}),ce.forEach(({binding:e,queue_name:t,delivery_delay:i,raw:a})=>{if(r?.dryRun&&(t??=o),t===void 0)throw new n(`${e} bindings must have a "queue" field. Add a "queue" field to the producer in your Worker configuration specifying the name of the Queue to bind to.`,{telemetryMessage:`queue binding missing name`});t===o?I.push({name:e,type:`inherit`}):I.push({type:`queue`,name:e,queue_name:t,delivery_delay:i,raw:a})}),le.forEach(({binding:e,bucket_name:t,jurisdiction:i,raw:a})=>{if(r?.dryRun&&(t??=o),t===void 0)throw new n(`${e} bindings must have a "bucket_name" field. Add a "bucket_name" field to the binding in your Worker configuration specifying the name of the R2 bucket to bind to.`,{telemetryMessage:`r2 bucket binding missing bucket_name`});t===o?I.push({name:e,type:`inherit`}):I.push({name:e,type:`r2_bucket`,bucket_name:t,jurisdiction:i,raw:a})}),ue.forEach(({binding:e,database_id:t,database_internal_env:i,raw:a})=>{if(r?.dryRun&&(t??=o),t===void 0)throw new n(`${e} bindings must have a "database_id" field. Add a "database_id" field to the binding in your Worker configuration specifying the ID of the D1 database to bind to.`,{telemetryMessage:`d1 database binding missing database_id`});t===o?I.push({name:e,type:`inherit`}):I.push({name:e,type:`d1`,id:t,internalEnv:i,raw:a})}),de.forEach(({binding:e,index_name:t,raw:n})=>{I.push({name:e,type:`vectorize`,index_name:t,raw:n})}),fe.forEach(({binding:e,namespace:t})=>{if(r?.dryRun&&(t??=o),t===void 0)throw new n(`${e} bindings must have a "namespace" field. Add a "namespace" field to the binding in your Worker configuration specifying the AI Search namespace to bind to.`,{telemetryMessage:`ai search namespace binding missing namespace`});t===o?I.push({name:e,type:`inherit`}):I.push({name:e,type:`ai_search_namespace`,namespace:t})}),pe.forEach(({binding:e,instance_name:t})=>{I.push({name:e,type:`ai_search`,instance_name:t})}),L.forEach(({binding:e,namespace:t})=>{if(r?.dryRun&&(t??=o),t===void 0)throw new n(`${e} bindings must have a "namespace" field. Add a "namespace" field to the binding in your Worker configuration specifying the namespace to bind to.`,{telemetryMessage:!1});t===o?I.push({name:e,type:`inherit`}):I.push({name:e,type:`agent_memory`,namespace:t})}),R.forEach(({binding:e,id:t})=>{I.push({name:e,type:`hyperdrive`,id:t})}),z.forEach(({binding:e,store_id:t,secret_name:n})=>{I.push({name:e,type:`secrets_store_secret`,store_id:t,secret_name:n})}),B.forEach(({binding:e,namespace:t})=>{I.push({name:e,type:`artifacts`,namespace:t})}),me.forEach(({binding:e,enable_timer:t})=>{I.push({name:e,type:`unsafe_hello_world`,enable_timer:t})}),he.forEach(({binding:e,app_id:t})=>{if(r?.dryRun&&(t??=o),t===void 0)throw new n(`${e} bindings must have an "app_id" field. Add an "app_id" field to the binding in your Worker configuration specifying the Flagship app to bind to.`,{telemetryMessage:`flagship binding missing app id`});I.push(t===o?{name:e,type:`inherit`}:{name:e,type:`flagship`,app_id:t})}),ge.forEach(({name:e,namespace_id:t,simple:n})=>{I.push({name:e,type:`ratelimit`,namespace_id:t,simple:n})}),_e.forEach(({binding:e,service_id:t})=>{I.push({name:e,type:`vpc_service`,service_id:t})}),ve.forEach(({binding:e,tunnel_id:t,network_id:n})=>{I.push({name:e,type:`vpc_network`,...t===void 0?{network_id:n}:{tunnel_id:t}})}),V.forEach(({binding:e,service:t,environment:n,entrypoint:r,props:i,cross_account_grant:a})=>{I.push({name:e,type:`service`,service:t,cross_account_grant:a,...n&&{environment:n},...r&&{entrypoint:r},...i&&{props:i}})}),ye.forEach(({binding:e,dataset:t})=>{I.push({name:e,type:`analytics_engine`,dataset:t})}),be.forEach(({binding:e,namespace:t,outbound:i})=>{if(r?.dryRun&&(t??=o),t===void 0)throw new n(`${e} bindings must have a "namespace" field. Add a "namespace" field to the binding in your Worker configuration specifying the dispatch namespace to bind to.`,{telemetryMessage:`dispatch namespace binding missing namespace`});t===o?I.push({name:e,type:`inherit`}):I.push({name:e,type:`dispatch_namespace`,namespace:t,...i&&{outbound:{worker:{service:i.service,environment:i.environment},params:i.parameters?.map(e=>({name:e}))}}})}),xe.forEach(({binding:e,certificate_id:t})=>{I.push({name:e,type:`mtls_certificate`,certificate_id:t})}),Se.forEach(({binding:e,stream:t,pipeline:n})=>{if(t)I.push({name:e,type:`pipelines`,stream:t});else if(n)I.push({name:e,type:`pipelines`,pipeline:n});else throw Error(`Pipeline binding must specify a stream or pipeline`)}),Ce.forEach(({binding:e,stream:t})=>{I.push({name:e,type:`k2`,stream:t})}),we.forEach(({binding:e})=>{I.push({name:e,type:`worker_loader`})}),Te.forEach(({name:e,destination:t})=>{I.push({name:e,type:`logfwdr`,destination:t})}),Ee.forEach(({binding:e,source:t})=>{I.push({name:e,type:`wasm_module`,part:e}),s.set(e,new File([`contents`in t?t.contents:c(t.path)],`path`in t?t.path??e:e,{type:`application/wasm`}))}),H!==void 0&&I.push({name:H.binding,type:`browser`,raw:H.raw}),U!==void 0&&I.push({name:U.binding,type:`analytics`}),W!==void 0&&I.push({name:W.binding,staging:W.staging,type:`ai`,raw:W.raw}),G!==void 0&&I.push({name:G.binding,type:`images`,raw:G.raw}),K!==void 0&&I.push({name:K.binding,type:`stream`}),q!==void 0&&I.push({name:q.binding,type:`media`}),J!==void 0&&I.push({name:J.binding,type:`version_metadata`}),Y!==void 0&&I.push({name:Y.binding,type:`assets`}),De.forEach(({binding:e,source:t})=>{I.push({name:e,type:`text_blob`,part:e}),e!==`__STATIC_CONTENT_MANIFEST`&&(`contents`in t?s.set(e,new File([t.contents],t.path??e,{type:`text/plain`})):s.set(e,new File([c(t.path)],t.path,{type:`text/plain`})))}),Oe.forEach(({binding:e,source:t})=>{I.push({name:e,type:`data_blob`,part:e}),s.set(e,new File([`contents`in t?t.contents:c(t.path)],`path`in t?t.path??e:e,{type:`application/octet-stream`}))});for(let[e,n]of Object.entries(t??{}))if(i(n.type)&&n.type!==`unsafe_hello_world`){let{type:t,...r}=n;I.push({name:e,type:t.slice(7),...r})}let X=`__STATIC_CONTENT_MANIFEST`;if(F?.some(({name:e})=>e===X)&&u.type===`esm`){d(F!==void 0);let e=new Set(F.map(e=>l.posix.dirname(e.name)));for(let t of e){if(t===`.`)continue;let e=l.posix.relative(t,X),n=l.posix.join(t,X);F.push({name:n,filePath:n,content:`export { default } from ${JSON.stringify(e)};`,type:`esm`})}}if(u.type===`commonjs`){for(let e of Object.values([...F||[]]))if(e.name===`__STATIC_CONTENT_MANIFEST`)s.set(e.name,new File([e.content],e.name,{type:`text/plain`})),F=F?.filter(t=>t!==e);else if(e.type===`compiled-wasm`||e.type===`text`||e.type===`buffer`){let t=e.name.replace(/[^a-zA-Z0-9_$]/g,`_`);I.push({name:t,type:e.type===`compiled-wasm`?`wasm_module`:e.type===`text`?`text_blob`:`data_blob`,part:t}),s.set(t,new File([e.content],e.name,{type:e.type===`compiled-wasm`?`application/wasm`:e.type===`text`?`text/plain`:`application/octet-stream`})),F=F?.filter(t=>t!==e)}}let Z;if(r?.unsafe?.capnp){let e=k(r.unsafe.capnp);Z=`./capnp-${Date.now()}.compiled`,s.set(Z,new File([e],Z,{type:`application/octet-stream`}))}let Q;v&&(Q??=[],Q.push(`plain_text`,`json`)),y&&(Q??=[],Q.push(`secret_text`,`secret_key`)),b&&(Q??=[],Q.push(...b));let $={...u.type===`commonjs`?{body_part:u.name}:{main_module:u.name},bindings:I,containers:e.containers===void 0?void 0:e.containers.map(e=>({...e.name!==void 0&&{name:e.name},...e.class_name!==void 0&&{class_name:e.class_name},...e.images!==void 0&&{images:e.images}})),...g&&{compatibility_date:g},..._&&{compatibility_flags:_},...p&&{migrations:p},...m&&{code_update_strategy:m},...h&&Object.keys(h).length>0&&{exports:h},capnp_schema:Z,...Q&&{keep_bindings:Q},...x!==void 0&&{logpush:x},...S&&{placement:S},...C&&{tail_consumers:C},...w&&{streaming_tail_consumers:w},...T&&{limits:T},...E&&{annotations:E},...D!==void 0&&{keep_assets:D},...O&&{assets:{jwt:O.jwt,config:P}},...A&&{observability:A},...M&&{cache_options:M},...N?.length&&{package_dependencies:N}};if(r?.unsafe?.metadata!==void 0)for(let e of Object.keys(r.unsafe.metadata))$[e]=r.unsafe.metadata[e];if(s.set(`metadata`,JSON.stringify($)),u.type===`commonjs`&&F&&F.length>0)throw TypeError(`More than one module can only be specified when type = 'esm'`);for(let e of[u].concat(F||[]))s.set(e.name,new File([e.content],e.name,{type:j(e.type??u.type??`esm`)}));for(let e of f||[])s.set(e.name,new File([e.content],e.name,{type:`application/source-map`}));return s}b(N,`createWorkerUploadForm`);export{C as a,T as c,S as i,M as n,b as o,A as r,x as s,N as t};
2
+ import{n as e,r as t}from"./source-38bULAR8.mjs";import{At as n,B as r,j as i,m as a,st as o}from"./dist-D1iG7guo.mjs";import{createRequire as s}from"node:module";import{readFileSync as c}from"node:fs";import l,{resolve as u}from"node:path";import d from"node:assert";import{spawnSync as f}from"node:child_process";const p=s(import.meta.url||(typeof __filename==`string`?__filename:`/`));var m=Object.create,h=Object.defineProperty,g=Object.getOwnPropertyDescriptor,_=Object.getOwnPropertyNames,v=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty,b=(e,t)=>h(e,`name`,{value:t,configurable:!0}),x=(e=>p===void 0?typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(p===void 0?e:p)[t]}):e:p)(function(e){if(p!==void 0)return p.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)}),S=(e,t)=>function(){return t||(0,e[_(e)[0]])((t={exports:{}}).exports,t),t.exports},C=(e,t)=>{for(var n in t)h(e,n,{get:t[n],enumerable:!0})},w=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of _(t))!y.call(e,i)&&i!==n&&h(e,i,{get:()=>t[i],enumerable:!(r=g(t,i))||r.enumerable});return e},T=(e,t,n)=>(n=e==null?{}:m(v(e)),w(t||!e||!e.__esModule?h(n,`default`,{value:e,enumerable:!0}):n,e)),E=e(((e,n)=>{var r=t(`child_process`).exec,i=t(`child_process`).execSync,a=t(`fs`),o=t(`path`),s=a.access,c=a.accessSync,l=a.constants||a,u=process.platform==`win32`,d=function(e,t){s(e,l.F_OK,function(e){t(!e)})},f=function(e){try{return c(e,l.F_OK),!1}catch{return!0}},p=function(e,t){s(e,l.F_OK|l.X_OK,function(e){t(null,!e)})},m=function(e){try{return c(e,l.F_OK|l.X_OK),!0}catch{return!1}},h=function(e,t,n){d(e,function(i){if(!i){r(`command -v `+t+` 2>/dev/null && { echo >&1 `+t+`; exit 0; }`,function(e,t,r){n(null,!!t)});return}p(e,n)})},g=function(e,t,n){if(!/^(?!(?:.*\s|.*\.|\W+)$)(?:[a-zA-Z]:)?(?:(?:[^<>:"\|\?\*\n])+(?:\/\/|\/|\\\\|\\)?)+$/m.test(e)){n(null,!1);return}r(`where `+t,function(e){e===null?n(null,!0):n(null,!1)})},_=function(e,t){if(f(e))try{return!!i(`command -v `+t+` 2>/dev/null && { echo >&1 `+t+`; exit 0; }`)}catch{return!1}return m(e)},v=function(e,t,n){if(!/^(?!(?:.*\s|.*\.|\W+)$)(?:[a-zA-Z]:)?(?:(?:[^<>:"\|\?\*\n])+(?:\/\/|\/|\\\\|\\)?)+$/m.test(e))return!1;try{return!!i(`where `+t,{stdio:[]})}catch{return!1}},y=function(e){return/[^A-Za-z0-9_\/:=-]/.test(e)&&(e=`'`+e.replace(/'/g,`'\\''`)+`'`,e=e.replace(/^(?:'')+/g,``).replace(/\\'''/g,`\\'`)),e};u&&(y=function(e){if(/[\\]/.test(e)){var t=`"`+o.dirname(e)+`"`,n=`"`+o.basename(e)+`"`;return t+`:`+n}return`"`+e+`"`}),n.exports=function e(t,n){var r=y(t);if(!n&&typeof Promise<`u`)return new Promise(function(n,r){e(t,function(e,i){i?n(t):r(e)})});u?g(t,r,n):h(t,r,n)},n.exports.sync=function(e){var t=y(e);return u?v(e,t):_(e,t)}})),D=e(((e,t)=>{t.exports=E()})),ee=r(),O=D();s(import.meta.url||(typeof __filename==`string`?__filename:`/`));function k(e){if(e.compiled_schema)return c(u(e.compiled_schema));let{base_path:t,source_schemas:r}=e,i=(r??[]).map(e=>u(t,e));if(!(0,O.sync)(`capnp`))throw new n(`The capnp compiler is required to upload capnp schemas, but is not present.`,{telemetryMessage:`capnp compiler missing`});let a=f(`capnp`,[`compile`,`-o-`,`--src-prefix=${u(t??`.`)}`,...i],{maxBuffer:3*1024*1024});if(a.error)throw a.error;if(a.stderr.length)throw Error(a.stderr.toString());return a.stdout}b(k,`handleUnsafeCapnp`);var A={esm:`application/javascript+module`,commonjs:`application/javascript`,"compiled-wasm":`application/wasm`,buffer:`application/octet-stream`,text:`text/plain`,python:`text/x-python`,"python-requirement":`text/x-python-requirement`};function j(e){let t=A[e];if(t===void 0)throw TypeError(`Unsupported module: `+e);return t}b(j,`toMimeType`);function M(e){let t=Object.keys(A).find(t=>A[t]===e);if(t===void 0)throw TypeError(`Unsupported mime type: `+e);return t}b(M,`fromMimeType`);function N(e,t,r){let s=new ee.FormData,{main:u,sourceMaps:f,migrations:p,code_update_strategy:m,exports:h,compatibility_date:g,compatibility_flags:_,keepVars:v,keepSecrets:y,keepBindings:b,logpush:x,placement:S,tail_consumers:C,streaming_tail_consumers:w,limits:T,annotations:E,keep_assets:D,assets:O,observability:A,cache:M,package_dependencies:N}=e,P={html_handling:O?.assetConfig?.html_handling,not_found_handling:O?.assetConfig?.not_found_handling,run_worker_first:O?.run_worker_first,_redirects:O?._redirects,_headers:O?._headers};if(O&&!O.routerConfig.has_user_worker)return s.set(`metadata`,JSON.stringify({assets:{jwt:O.jwt,config:P},...E&&{annotations:E},...g&&{compatibility_date:g},..._&&{compatibility_flags:_}})),s;let{modules:F}=e,I=[],te=a(`plain_text`,t),ne=a(`json`,t),re=a(`secret_text`,t),ie=a(`kv_namespace`,t),ae=a(`send_email`,t),oe=a(`durable_object_namespace`,t),se=a(`workflow`,t),ce=a(`queue`,t),le=a(`r2_bucket`,t),ue=a(`d1`,t),de=a(`vectorize`,t),fe=a(`ai_search_namespace`,t),pe=a(`ai_search`,t),L=a(`agent_memory`,t),R=a(`hyperdrive`,t),z=a(`secrets_store_secret`,t),B=a(`artifacts`,t),me=a(`unsafe_hello_world`,t),he=a(`flagship`,t),ge=a(`ratelimit`,t),_e=a(`vpc_service`,t),ve=a(`vpc_network`,t),V=a(`service`,t),ye=a(`analytics_engine`,t),be=a(`dispatch_namespace`,t),xe=a(`mtls_certificate`,t),Se=a(`pipeline`,t),Ce=a(`k2`,t),we=a(`worker_loader`,t),Te=a(`logfwdr`,t),Ee=a(`wasm_module`,t),H=a(`browser`,t)[0],U=a(`analytics`,t)[0],W=a(`ai`,t)[0],G=a(`images`,t)[0],K=a(`stream`,t)[0],q=a(`media`,t)[0],J=a(`version_metadata`,t)[0],Y=a(`assets`,t)[0],De=a(`text_blob`,t),Oe=a(`data_blob`,t);a(`inherit`,t).forEach(({binding:e})=>{I.push({name:e,type:`inherit`})}),te.forEach(({binding:e,value:t})=>{I.push({name:e,type:`plain_text`,text:t})}),ne.forEach(({binding:e,value:t})=>{I.push({name:e,type:`json`,json:t})}),re.forEach(({binding:e,value:t})=>{I.push({name:e,type:`secret_text`,text:t})}),ie.forEach(({id:e,binding:t,raw:i})=>{if(r?.dryRun&&(e??=o),e===void 0)throw new n(`${t} bindings must have an "id" field`,{telemetryMessage:`kv namespace binding missing id`});e===o?I.push({name:t,type:`inherit`}):I.push({name:t,type:`kv_namespace`,namespace_id:e,raw:i})}),ae.forEach(e=>{let t={name:e.name,type:`send_email`,allowed_sender_addresses:e.allowed_sender_addresses};e.destination_address===void 0?e.allowed_destination_addresses===void 0?I.push(t):I.push({...t,allowed_destination_addresses:e.allowed_destination_addresses}):I.push({...t,destination_address:e.destination_address})}),oe.forEach(({name:e,class_name:t,script_name:n,environment:r})=>{I.push({name:e,type:`durable_object_namespace`,class_name:t,...n&&{script_name:n},...r&&{environment:r}})}),se.forEach(({binding:e,name:t,class_name:n,script_name:r,raw:i})=>{I.push({type:`workflow`,name:e,workflow_name:t,class_name:n,script_name:r,raw:i})}),ce.forEach(({binding:e,queue_name:t,delivery_delay:i,raw:a})=>{if(r?.dryRun&&(t??=o),t===void 0)throw new n(`${e} bindings must have a "queue" field. Add a "queue" field to the producer in your Worker configuration specifying the name of the Queue to bind to.`,{telemetryMessage:`queue binding missing name`});t===o?I.push({name:e,type:`inherit`}):I.push({type:`queue`,name:e,queue_name:t,delivery_delay:i,raw:a})}),le.forEach(({binding:e,bucket_name:t,jurisdiction:i,raw:a})=>{if(r?.dryRun&&(t??=o),t===void 0)throw new n(`${e} bindings must have a "bucket_name" field. Add a "bucket_name" field to the binding in your Worker configuration specifying the name of the R2 bucket to bind to.`,{telemetryMessage:`r2 bucket binding missing bucket_name`});t===o?I.push({name:e,type:`inherit`}):I.push({name:e,type:`r2_bucket`,bucket_name:t,jurisdiction:i,raw:a})}),ue.forEach(({binding:e,database_id:t,database_internal_env:i,raw:a})=>{if(r?.dryRun&&(t??=o),t===void 0)throw new n(`${e} bindings must have a "database_id" field. Add a "database_id" field to the binding in your Worker configuration specifying the ID of the D1 database to bind to.`,{telemetryMessage:`d1 database binding missing database_id`});t===o?I.push({name:e,type:`inherit`}):I.push({name:e,type:`d1`,id:t,internalEnv:i,raw:a})}),de.forEach(({binding:e,index_name:t,raw:n})=>{I.push({name:e,type:`vectorize`,index_name:t,raw:n})}),fe.forEach(({binding:e,namespace:t})=>{if(r?.dryRun&&(t??=o),t===void 0)throw new n(`${e} bindings must have a "namespace" field. Add a "namespace" field to the binding in your Worker configuration specifying the AI Search namespace to bind to.`,{telemetryMessage:`ai search namespace binding missing namespace`});t===o?I.push({name:e,type:`inherit`}):I.push({name:e,type:`ai_search_namespace`,namespace:t})}),pe.forEach(({binding:e,instance_name:t})=>{I.push({name:e,type:`ai_search`,instance_name:t})}),L.forEach(({binding:e,namespace:t})=>{if(r?.dryRun&&(t??=o),t===void 0)throw new n(`${e} bindings must have a "namespace" field. Add a "namespace" field to the binding in your Worker configuration specifying the namespace to bind to.`,{telemetryMessage:!1});t===o?I.push({name:e,type:`inherit`}):I.push({name:e,type:`agent_memory`,namespace:t})}),R.forEach(({binding:e,id:t})=>{I.push({name:e,type:`hyperdrive`,id:t})}),z.forEach(({binding:e,store_id:t,secret_name:n})=>{I.push({name:e,type:`secrets_store_secret`,store_id:t,secret_name:n})}),B.forEach(({binding:e,namespace:t})=>{I.push({name:e,type:`artifacts`,namespace:t})}),me.forEach(({binding:e,enable_timer:t})=>{I.push({name:e,type:`unsafe_hello_world`,enable_timer:t})}),he.forEach(({binding:e,app_id:t})=>{if(r?.dryRun&&(t??=o),t===void 0)throw new n(`${e} bindings must have an "app_id" field. Add an "app_id" field to the binding in your Worker configuration specifying the Flagship app to bind to.`,{telemetryMessage:`flagship binding missing app id`});I.push(t===o?{name:e,type:`inherit`}:{name:e,type:`flagship`,app_id:t})}),ge.forEach(({name:e,namespace_id:t,simple:n})=>{I.push({name:e,type:`ratelimit`,namespace_id:t,simple:n})}),_e.forEach(({binding:e,service_id:t})=>{I.push({name:e,type:`vpc_service`,service_id:t})}),ve.forEach(({binding:e,tunnel_id:t,network_id:n})=>{I.push({name:e,type:`vpc_network`,...t===void 0?{network_id:n}:{tunnel_id:t}})}),V.forEach(({binding:e,service:t,environment:n,entrypoint:r,props:i,cross_account_grant:a})=>{I.push({name:e,type:`service`,service:t,cross_account_grant:a,...n&&{environment:n},...r&&{entrypoint:r},...i&&{props:i}})}),ye.forEach(({binding:e,dataset:t})=>{I.push({name:e,type:`analytics_engine`,dataset:t})}),be.forEach(({binding:e,namespace:t,outbound:i})=>{if(r?.dryRun&&(t??=o),t===void 0)throw new n(`${e} bindings must have a "namespace" field. Add a "namespace" field to the binding in your Worker configuration specifying the dispatch namespace to bind to.`,{telemetryMessage:`dispatch namespace binding missing namespace`});t===o?I.push({name:e,type:`inherit`}):I.push({name:e,type:`dispatch_namespace`,namespace:t,...i&&{outbound:{worker:{service:i.service,environment:i.environment},params:i.parameters?.map(e=>({name:e}))}}})}),xe.forEach(({binding:e,certificate_id:t})=>{I.push({name:e,type:`mtls_certificate`,certificate_id:t})}),Se.forEach(({binding:e,stream:t,pipeline:n})=>{if(t)I.push({name:e,type:`pipelines`,stream:t});else if(n)I.push({name:e,type:`pipelines`,pipeline:n});else throw Error(`Pipeline binding must specify a stream or pipeline`)}),Ce.forEach(({binding:e,stream:t})=>{I.push({name:e,type:`k2`,stream:t})}),we.forEach(({binding:e})=>{I.push({name:e,type:`worker_loader`})}),Te.forEach(({name:e,destination:t})=>{I.push({name:e,type:`logfwdr`,destination:t})}),Ee.forEach(({binding:e,source:t})=>{I.push({name:e,type:`wasm_module`,part:e}),s.set(e,new File([`contents`in t?t.contents:c(t.path)],`path`in t?t.path??e:e,{type:`application/wasm`}))}),H!==void 0&&I.push({name:H.binding,type:`browser`,raw:H.raw}),U!==void 0&&I.push({name:U.binding,type:`analytics`}),W!==void 0&&I.push({name:W.binding,staging:W.staging,type:`ai`,raw:W.raw}),G!==void 0&&I.push({name:G.binding,type:`images`,raw:G.raw}),K!==void 0&&I.push({name:K.binding,type:`stream`}),q!==void 0&&I.push({name:q.binding,type:`media`}),J!==void 0&&I.push({name:J.binding,type:`version_metadata`}),Y!==void 0&&I.push({name:Y.binding,type:`assets`}),De.forEach(({binding:e,source:t})=>{I.push({name:e,type:`text_blob`,part:e}),e!==`__STATIC_CONTENT_MANIFEST`&&(`contents`in t?s.set(e,new File([t.contents],t.path??e,{type:`text/plain`})):s.set(e,new File([c(t.path)],t.path,{type:`text/plain`})))}),Oe.forEach(({binding:e,source:t})=>{I.push({name:e,type:`data_blob`,part:e}),s.set(e,new File([`contents`in t?t.contents:c(t.path)],`path`in t?t.path??e:e,{type:`application/octet-stream`}))});for(let[e,n]of Object.entries(t??{}))if(i(n.type)&&n.type!==`unsafe_hello_world`){let{type:t,...r}=n;I.push({name:e,type:t.slice(7),...r})}let X=`__STATIC_CONTENT_MANIFEST`;if(F?.some(({name:e})=>e===X)&&u.type===`esm`){d(F!==void 0);let e=new Set(F.map(e=>l.posix.dirname(e.name)));for(let t of e){if(t===`.`)continue;let e=l.posix.relative(t,X),n=l.posix.join(t,X);F.push({name:n,filePath:n,content:`export { default } from ${JSON.stringify(e)};`,type:`esm`})}}if(u.type===`commonjs`){for(let e of Object.values([...F||[]]))if(e.name===`__STATIC_CONTENT_MANIFEST`)s.set(e.name,new File([e.content],e.name,{type:`text/plain`})),F=F?.filter(t=>t!==e);else if(e.type===`compiled-wasm`||e.type===`text`||e.type===`buffer`){let t=e.name.replace(/[^a-zA-Z0-9_$]/g,`_`);I.push({name:t,type:e.type===`compiled-wasm`?`wasm_module`:e.type===`text`?`text_blob`:`data_blob`,part:t}),s.set(t,new File([e.content],e.name,{type:e.type===`compiled-wasm`?`application/wasm`:e.type===`text`?`text/plain`:`application/octet-stream`})),F=F?.filter(t=>t!==e)}}let Z;if(r?.unsafe?.capnp){let e=k(r.unsafe.capnp);Z=`./capnp-${Date.now()}.compiled`,s.set(Z,new File([e],Z,{type:`application/octet-stream`}))}let Q;v&&(Q??=[],Q.push(`plain_text`,`json`)),y&&(Q??=[],Q.push(`secret_text`,`secret_key`)),b&&(Q??=[],Q.push(...b));let $={...u.type===`commonjs`?{body_part:u.name}:{main_module:u.name},bindings:I,containers:e.containers===void 0?void 0:e.containers.map(e=>({...e.name!==void 0&&{name:e.name},...e.class_name!==void 0&&{class_name:e.class_name},...e.images!==void 0&&{images:e.images}})),...g&&{compatibility_date:g},..._&&{compatibility_flags:_},...p&&{migrations:p},...m&&{code_update_strategy:m},...h&&Object.keys(h).length>0&&{exports:h},capnp_schema:Z,...Q&&{keep_bindings:Q},...x!==void 0&&{logpush:x},...S&&{placement:S},...C&&{tail_consumers:C},...w&&{streaming_tail_consumers:w},...T&&{limits:T},...E&&{annotations:E},...D!==void 0&&{keep_assets:D},...O&&{assets:{jwt:O.jwt,config:P}},...A&&{observability:A},...M&&{cache_options:M},...N?.length&&{package_dependencies:N}};if(r?.unsafe?.metadata!==void 0)for(let e of Object.keys(r.unsafe.metadata))$[e]=r.unsafe.metadata[e];if(s.set(`metadata`,JSON.stringify($)),u.type===`commonjs`&&F&&F.length>0)throw TypeError(`More than one module can only be specified when type = 'esm'`);for(let e of[u].concat(F||[]))s.set(e.name,new File([e.content],e.name,{type:j(e.type??u.type??`esm`)}));for(let e of f||[])s.set(e.name,new File([e.content],e.name,{type:`application/source-map`}));return s}b(N,`createWorkerUploadForm`);export{C as a,T as c,S as i,M as n,b as o,A as r,x as s,N as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,t}from"./metadata-C33s4rc-.mjs";import{r as n}from"./theme-BIWQFmZ0.mjs";import{t as r}from"./cli-exit-Dqoo6Jgb.mjs";import"./ui-BQxRjahW.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{a,f as o,m as s,t as c,u as l}from"./run-CIJTelJL.mjs";import u from"minisearch";function d({enabled:e,source:t}){let r=e?n.success(`Enabled`):n.error(`Disabled`),i=l(t);return`Status: ${r}${i?` (set by ${i})`:``}\n`}const f={command:`disable`,describe:`Disable cf telemetry collection`,handler:()=>{s(!1);let{enabled:e,source:t}=o();console.log(d({enabled:e,source:t})),console.log(e?`cf is collecting usage telemetry because ${l(t)}=true overrides this setting.\n`:`cf is no longer collecting usage telemetry.
2
+ import{n as e,t}from"./metadata-C33s4rc-.mjs";import{r as n}from"./theme-BIWQFmZ0.mjs";import{t as r}from"./cli-exit-Dqoo6Jgb.mjs";import"./ui-D1hhIDIs.mjs";import{t as i}from"./output-ClYel9WX.mjs";import{a,f as o,m as s,t as c,u as l}from"./run-iFM5TxtQ.mjs";import u from"minisearch";function d({enabled:e,source:t}){let r=e?n.success(`Enabled`):n.error(`Disabled`),i=l(t);return`Status: ${r}${i?` (set by ${i})`:``}\n`}const f={command:`disable`,describe:`Disable cf telemetry collection`,handler:()=>{s(!1);let{enabled:e,source:t}=o();console.log(d({enabled:e,source:t})),console.log(e?`cf is collecting usage telemetry because ${l(t)}=true overrides this setting.\n`:`cf is no longer collecting usage telemetry.
3
3
  `)}},p={command:`enable`,describe:`Enable cf telemetry collection`,handler:()=>{s(!0);let{enabled:e,source:t}=o();console.log(d({enabled:e,source:t})),console.log(e?`cf is now collecting anonymous usage telemetry. Thank you for helping make cf better.
4
4
  `:`cf is not collecting usage telemetry because ${l(t)}${t===`env`||t===`wrangler-env`?`=false`:``} overrides this setting.\n`)}},m={command:`status`,describe:`Check whether cf telemetry collection is enabled`,handler:()=>{console.log(d(o())),console.log(n.muted(`Configure on this machine: \`cf cli telemetry enable\` / \`cf cli telemetry disable\`.
5
5
  Override per invocation with ${a}=true/false. DO_NOT_TRACK is also honored.\nLearn more: https://github.com/cloudflare/cf/blob/main/packages/cli/telemetry.md`))}},h={command:`telemetry`,describe:`Configure whether cf collects anonymous usage telemetry`,builder:e=>e.command(m).command(p).command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e,t){let n=e.fullPath.slice(0,-1).map((t,n)=>e.fullPath.slice(0,n+1).join(` `));return{command:e.command,summary:e.summary||e.description.split(`
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-CEOHpZgd.mjs";import{r as t}from"./auth-BIr56Mbx.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-A61dRbXl.mjs";import{t as a}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{a as l,n as u}from"./prompt-CGUzvBgY.mjs";import{t as d}from"./cli-types-DoVT5q_M.mjs";function f(e){return e.usage(`$0 client-certificates create
2
+ import{n as e}from"./auth-Br-t8vL_.mjs";import{i as t}from"./context-CquYYyS3.mjs";import{t as n}from"./output-ClYel9WX.mjs";import{t as r}from"./dry-run-p9Q7nMZ5.mjs";import{t as i}from"./progress-TLUEIYE6.mjs";import{t as a}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{n as o,t as s}from"./body-parser-NjzJZMOV.mjs";import{n as c}from"./input-validation-0CeePPHp.mjs";import{a as l,n as u}from"./prompt-Ck_1PCHm.mjs";import{t as d}from"./cli-types-_Kmwfpnp.mjs";function f(e){return e.usage(`$0 client-certificates create
3
3
 
4
- Create a new API Shield mTLS Client Certificate.`).option(`csr`,{type:`string`,description:`The Certificate Signing Request (CSR). Must be newline-encoded.`}).option(`validity-days`,{type:`number`,description:`The number of days the Client Certificate will be valid after the issued_on date.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`create`,describe:`Create Client Certificate`,builder:f,handler:async u=>a({command:`client-certificates create`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf client-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/client_certificates`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({csr:c(u.csr,`csr`,`text`),validity_days:u[`validity-days`]}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Creating`,async()=>a.clientCertificates.create({...e,zone_id:d})),{successLabel:`Created`});return}if(u.csr===void 0&&(u.csr=await l(`csr`,`The Certificate Signing Request (CSR). Must be newline-encoded.`)),u[`validity-days`]===void 0)throw Error(`--validity-days is required (or pass --body with this field set).`);let f=s({csr:c(u.csr,`csr`,`text`),validity_days:u[`validity-days`]});n(await i(`Creating`,async()=>a.clientCertificates.create({...f,zone_id:d})),{successLabel:`Created`})})};function m(e){return e.usage(`$0 client-certificates delete <client-certificate-id>
4
+ Create a new API Shield mTLS Client Certificate.`).option(`csr`,{type:`string`,description:`The Certificate Signing Request (CSR). Must be newline-encoded.`}).option(`validity-days`,{type:`number`,description:`The number of days the Client Certificate will be valid after the issued_on date.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`create`,describe:`Create Client Certificate`,builder:f,handler:async u=>a({command:`client-certificates create`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf client-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/client_certificates`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({csr:c(u.csr,`csr`,`text`),validity_days:u[`validity-days`]}):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);n(await i(`Creating`,async()=>a.clientCertificates.create({...e,zone_id:d})),{successLabel:`Created`});return}if(u.csr===void 0&&(u.csr=await l(`csr`,`The Certificate Signing Request (CSR). Must be newline-encoded.`)),u[`validity-days`]===void 0)throw Error(`--validity-days is required (or pass --body with this field set).`);let f=s({csr:c(u.csr,`csr`,`text`),validity_days:u[`validity-days`]});n(await i(`Creating`,async()=>a.clientCertificates.create({...f,zone_id:d})),{successLabel:`Created`})})};function m(e){return e.usage(`$0 client-certificates delete <client-certificate-id>
5
5
 
6
- Set a API Shield mTLS Client Certificate to pending_revocation status for processing to revoked status.`).positional(`client-certificate-id`,{type:`string`,description:`Client Certificate Tag`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const h={command:`delete <client-certificate-id>`,describe:`Revoke Client Certificate`,builder:m,handler:async o=>a({command:`client-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf client-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/client_certificates/${o[`client-certificate-id`]==null?`<client-certificate-id>`:encodeURIComponent(String(o[`client-certificate-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"client-certificate-id":String(o[`client-certificate-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
6
+ Set a API Shield mTLS Client Certificate to pending_revocation status for processing to revoked status.`).positional(`client-certificate-id`,{type:`string`,description:`Client Certificate Tag`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const h={command:`delete <client-certificate-id>`,describe:`Revoke Client Certificate`,builder:m,handler:async o=>a({command:`client-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf client-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/client_certificates/${o[`client-certificate-id`]==null?`<client-certificate-id>`:encodeURIComponent(String(o[`client-certificate-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"client-certificate-id":String(o[`client-certificate-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.
7
7
  `);return}n(await i(`Deleting`,async()=>a.clientCertificates.delete({zone_id:s,client_certificate_id:o[`client-certificate-id`]})),{successLabel:`Deleted`})})};function g(e){return e.usage(`$0 client-certificates edit <client-certificate-id>
8
8
 
9
- If a API Shield mTLS Client Certificate is in a pending_revocation state, you may reactivate it with this endpoint.`).positional(`client-certificate-id`,{type:`string`,description:`Client Certificate Tag`,demandOption:!0}).option(`reactivate`,{type:`boolean`,description:`The reactivate 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 _={command:`edit <client-certificate-id>`,describe:`Reactivate Client Certificate`,builder:g,handler:async c=>a({command:`client-certificates edit`,classification:{safeFlags:[`reactivate`,`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf client-certificates edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/client_certificates/${c[`client-certificate-id`]==null?`<client-certificate-id>`:encodeURIComponent(String(c[`client-certificate-id`]))}`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"client-certificate-id":String(c[`client-certificate-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({reactivate:c.reactivate}):o(c.body)});return}let a=await t(c),l=await e({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body);n(await i(`Updating`,async()=>a.clientCertificates.edit({...e,zone_id:l,client_certificate_id:c[`client-certificate-id`]})),{successLabel:`Updated`});return}let u=s({reactivate:c.reactivate});n(await i(`Updating`,async()=>a.clientCertificates.edit({...u,zone_id:l,client_certificate_id:c[`client-certificate-id`]})),{successLabel:`Updated`})})};function v(e){return e.usage(`$0 client-certificates get <client-certificate-id>
9
+ If a API Shield mTLS Client Certificate is in a pending_revocation state, you may reactivate it with this endpoint.`).positional(`client-certificate-id`,{type:`string`,description:`Client Certificate Tag`,demandOption:!0}).option(`reactivate`,{type:`boolean`,description:`The reactivate 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 _={command:`edit <client-certificate-id>`,describe:`Reactivate Client Certificate`,builder:g,handler:async c=>a({command:`client-certificates edit`,classification:{safeFlags:[`reactivate`,`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf client-certificates edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/client_certificates/${c[`client-certificate-id`]==null?`<client-certificate-id>`:encodeURIComponent(String(c[`client-certificate-id`]))}`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"client-certificate-id":String(c[`client-certificate-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({reactivate:c.reactivate}):o(c.body)});return}let a=await e(c),l=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body);n(await i(`Updating`,async()=>a.clientCertificates.edit({...e,zone_id:l,client_certificate_id:c[`client-certificate-id`]})),{successLabel:`Updated`});return}let u=s({reactivate:c.reactivate});n(await i(`Updating`,async()=>a.clientCertificates.edit({...u,zone_id:l,client_certificate_id:c[`client-certificate-id`]})),{successLabel:`Updated`})})};function v(e){return e.usage(`$0 client-certificates get <client-certificate-id>
10
10
 
11
- Get Details for a single mTLS API Shield Client Certificate.`).positional(`client-certificate-id`,{type:`string`,description:`Client Certificate Tag`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <client-certificate-id>`,describe:`Client Certificate Details`,builder:v,handler:async o=>a({command:`client-certificates get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf client-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/client_certificates/${o[`client-certificate-id`]==null?`<client-certificate-id>`:encodeURIComponent(String(o[`client-certificate-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"client-certificate-id":String(o[`client-certificate-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.clientCertificates.get({zone_id:s,client_certificate_id:o[`client-certificate-id`]})),{successLabel:`Loaded`})})};function b(e){return e.usage(`$0 client-certificates list
11
+ Get Details for a single mTLS API Shield Client Certificate.`).positional(`client-certificate-id`,{type:`string`,description:`Client Certificate Tag`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <client-certificate-id>`,describe:`Client Certificate Details`,builder:v,handler:async o=>a({command:`client-certificates get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf client-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/client_certificates/${o[`client-certificate-id`]==null?`<client-certificate-id>`:encodeURIComponent(String(o[`client-certificate-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"client-certificate-id":String(o[`client-certificate-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.clientCertificates.get({zone_id:s,client_certificate_id:o[`client-certificate-id`]})),{successLabel:`Loaded`})})};function b(e){return e.usage(`$0 client-certificates list
12
12
 
13
- List all of your Zone's API Shield mTLS Client Certificates by Status and/or using Pagination.`).option(`status`,{type:`string`,description:`Client Certitifcate Status to filter results by.`,choices:[`all`,`active`,`pending_reactivation`,`pending_revocation`,`revoked`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of records per page.`}).option(`limit`,{type:`number`,description:`Limit to the number of records returned.`}).option(`offset`,{type:`number`,description:`Offset the results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List Client Certificates`,builder:d(b),handler:async o=>a({command:`client-certificates list`,classification:{safeFlags:[`status`,`dry-run`]}},o,async()=>{let a={status:o.status,page:o.page,per_page:o[`per-page`],limit:o.limit,offset:o.offset};if(o.dryRun){r({command:`cf client-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/client_certificates`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.clientCertificates.list({zone_id:c,...a})),{successLabel:`Loaded`})})},S={command:`client-certificates`,describe:`client-certificates`,builder:e=>e.command(p).command(h).command(_).command(y).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{S as default};
13
+ List all of your Zone's API Shield mTLS Client Certificates by Status and/or using Pagination.`).option(`status`,{type:`string`,description:`Client Certitifcate Status to filter results by.`,choices:[`all`,`active`,`pending_reactivation`,`pending_revocation`,`revoked`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of records per page.`}).option(`limit`,{type:`number`,description:`Limit to the number of records returned.`}).option(`offset`,{type:`number`,description:`Offset the results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List Client Certificates`,builder:d(b),handler:async o=>a({command:`client-certificates list`,classification:{safeFlags:[`status`,`dry-run`]}},o,async()=>{let a={status:o.status,page:o.page,per_page:o[`per-page`],limit:o.limit,offset:o.offset};if(o.dryRun){r({command:`cf client-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/client_certificates`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.clientCertificates.list({zone_id:c,...a})),{successLabel:`Loaded`})})},S={command:`client-certificates`,describe:`client-certificates`,builder:e=>e.command(p).command(h).command(_).command(y).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{S as default};