cf 0.13.0 → 0.15.0

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 (455) hide show
  1. package/dist/_meta/commands.json +6724 -3970
  2. package/dist/_meta/hand-written-commands.json +150 -32
  3. package/dist/_meta/schemas.json +2083 -2159
  4. package/dist/abuse-reports-BAQR1w79.mjs +26 -0
  5. package/dist/access-C8KMplzp.mjs +27 -0
  6. package/dist/account-B-KQSR0L.mjs +12 -0
  7. package/dist/account-tags-EncLJpLc.mjs +15 -0
  8. package/dist/accounts-BA4Mp3A_.mjs +132 -0
  9. package/dist/acm-ByxUJcqF.mjs +15 -0
  10. package/dist/addressing-C-ym0h0G.mjs +93 -0
  11. package/dist/agent-memory-CkPSiZDI.mjs +34 -0
  12. package/dist/ai-DkE_Q64s.mjs +31 -0
  13. package/dist/ai-audit-pPcjYWI5.mjs +6 -0
  14. package/dist/ai-gateway-DtrwF1lQ.mjs +147 -0
  15. package/dist/ai-search-DLD_kDS1.mjs +79 -0
  16. package/dist/ai-security-jyZcBl9g.mjs +10 -0
  17. package/dist/alerting-DOROjm8E.mjs +56 -0
  18. package/dist/analytics-rQ-h-plT.mjs +21 -0
  19. package/dist/analytics_engine-Cg9gCAMt.mjs +4 -0
  20. package/dist/{lifecycle-XswDq0ZB.mjs → ansi-styles-eKEZXVwN.mjs} +1 -1
  21. package/dist/api-security-B8p8vp8u.mjs +154 -0
  22. package/dist/argo-g8SjUb_t.mjs +10 -0
  23. package/dist/artifacts-B1PaeF5h.mjs +43 -0
  24. package/dist/audit-logs-DmU_PHy_.mjs +4 -0
  25. package/dist/auth-CZqics6E.mjs +2 -0
  26. package/dist/auth-Cp7gT-AF.mjs +8 -0
  27. package/dist/billing-CvTbUg-H.mjs +23 -0
  28. package/dist/bot-management-z53tbcbH.mjs +9 -0
  29. package/dist/botnet-feed-CSBbJdr_.mjs +11 -0
  30. package/dist/brand-protection-DzV211IQ.mjs +27 -0
  31. package/dist/browser-extension-C0Hi9CHX.mjs +15 -0
  32. package/dist/browser-run-DYQvMAyo.mjs +46 -0
  33. package/dist/build-BPIp8J5F.mjs +2 -0
  34. package/dist/build-OC77a1zq.mjs +2 -0
  35. package/dist/builds-CwKRqjQ5.mjs +71 -0
  36. package/dist/cache-CugNPPsJ.mjs +45 -0
  37. package/dist/certificate-authorities-DaEnJYge.mjs +6 -0
  38. package/dist/cf-oadujOtC.mjs +18 -0
  39. package/dist/{chunk-6EUZQHAF-B7bSMYLe.mjs → chunk-6EUZQHAF-QVTL_mC-.mjs} +1 -1
  40. package/dist/chunk-DL5FNmn1.mjs +2 -0
  41. package/dist/{chunk-Q72B4Q5Z-CPy_WJKU.mjs → chunk-Q72B4Q5Z-Cr1H_iK6.mjs} +1 -1
  42. package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +2 -0
  43. package/dist/chunk-QBZBEHZB-Byagrlop.mjs +2 -0
  44. package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +374 -0
  45. package/dist/client-certificates-DZUIqBTB.mjs +13 -0
  46. package/dist/client-side-security-Dk6F1ENG.mjs +63 -0
  47. package/dist/cloud-connector-avpf86kG.mjs +6 -0
  48. package/dist/cloudflared-DhItYrCq.mjs +2 -0
  49. package/dist/cloudforce-one-DNRhUD8z.mjs +456 -0
  50. package/dist/command-B2Qe-WUa.mjs +2 -0
  51. package/dist/command-CF0giIIc.mjs +3 -0
  52. package/dist/command-D45NW-R3.mjs +2 -0
  53. package/dist/command-DIvPLK8x.mjs +2 -0
  54. package/dist/{completions-nPO9PdSu.mjs → completions-xPLd1cvL.mjs} +3 -3
  55. package/dist/{config-B8lwPpVl.mjs → config-B4vIa0zp.mjs} +1 -1
  56. package/dist/config.d.mts +1 -1729
  57. package/dist/config.mjs +1 -1
  58. package/dist/connector-interrupts-BSztJ-Ko.mjs +6 -0
  59. package/dist/connector-telemetry-events-_M8CCK6_.mjs +6 -0
  60. package/dist/connector-telemetry-snapshots-DySvmR9a.mjs +6 -0
  61. package/dist/connectors-BSmhzNB7.mjs +15 -0
  62. package/dist/containers-B5vDcFzo.mjs +78 -0
  63. package/dist/{shared-YJtB5KZB.mjs → containers-CFzvhmyz.mjs} +85 -84
  64. package/dist/content-scan-CeLZAcbT.mjs +14 -0
  65. package/dist/cps-BlI_Od72.mjs +6 -0
  66. package/dist/csamScanner-Cn7d0HWS.mjs +10 -0
  67. package/dist/ct-alerting-lhgFPu-y.mjs +5 -0
  68. package/dist/custom-certificates-Ba4Do5qt.mjs +17 -0
  69. package/dist/custom-csrs-MNUIx8yX.mjs +11 -0
  70. package/dist/custom-hostnames-Dj1SBd0J.mjs +27 -0
  71. package/dist/custom-nameservers-C7nzhNzV.mjs +9 -0
  72. package/dist/custom-pages-BgfhGksj.mjs +21 -0
  73. package/dist/d1-P2kWbdID.mjs +45 -0
  74. package/dist/data-security-pBIozmRL.mjs +71 -0
  75. package/dist/dcv-delegation-Bpy9WnKZ.mjs +4 -0
  76. package/dist/delegate-GctF_lrq.mjs +2 -0
  77. package/dist/delegate.mjs +1 -1
  78. package/dist/{deploy-QTGENpOM.mjs → deploy-CVYdt3NK.mjs} +1 -1
  79. package/dist/{deploy-input-C7W1Bsji.mjs → deploy-input-DpOgndz4.mjs} +1 -1
  80. package/dist/dev-PPUBjWcm.mjs +4 -0
  81. package/dist/diagnostics-C62habGQ.mjs +15 -0
  82. package/dist/dialog-C_ccBiZp.mjs +2 -0
  83. package/dist/dist-B4pQ4CXK.mjs +48 -0
  84. package/dist/{dist-DW5BPGFs.mjs → dist-BpadEMNY.mjs} +1 -1
  85. package/dist/dist-dc4E1u01.mjs +272 -0
  86. package/dist/dls-CpkcyQ8C.mjs +17 -0
  87. package/dist/dns-DG1X4Wap.mjs +135 -0
  88. package/dist/dns-firewall-B1gGHEDo.mjs +71 -0
  89. package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-Dj7YOlwR.mjs} +1 -1
  90. package/dist/dry-run-CLX6Pbtq.mjs +2 -0
  91. package/dist/durable-objects-D214VhxH.mjs +8 -0
  92. package/dist/email-auth-Ba4ONan2.mjs +6 -0
  93. package/dist/email-routing-BlqKnqNM.mjs +45 -0
  94. package/dist/email-security-Dl1E1Dko.mjs +160 -0
  95. package/dist/email-sending-DIRSSRIz.mjs +47 -0
  96. package/dist/error-sanitization-BkgUhGVc.mjs +2 -0
  97. package/dist/error-sanitization-DOlqWkNu.mjs +2 -0
  98. package/dist/fieldExtractors-zqYKMCEn.mjs +9 -0
  99. package/dist/firewall-DdsDh8GD.mjs +56 -0
  100. package/dist/flagship-CkUIVW7c.mjs +28 -0
  101. package/dist/fraud-BUpZgvQT.mjs +22 -0
  102. package/dist/google-tag-gateway-Bi1uLnEU.mjs +6 -0
  103. package/dist/healthchecks-DjQWb3EM.mjs +22 -0
  104. package/dist/hostnames-ClBLPbct.mjs +11 -0
  105. package/dist/hyperdrive-U54xZsWU.mjs +37 -0
  106. package/dist/iam-T-wWmOep.mjs +52 -0
  107. package/dist/images-ia5UG1GW.mjs +71 -0
  108. package/dist/index.mjs +1 -1
  109. package/dist/intel-BhswZLMI.mjs +76 -0
  110. package/dist/interactive-B6woOLo-.mjs +32 -0
  111. package/dist/interactive-DnUvQHjc.mjs +2 -0
  112. package/dist/ips-Dad_EvhM.mjs +4 -0
  113. package/dist/keyless-certificates-BhHaxLjM.mjs +13 -0
  114. package/dist/keys-DjIPvqj4.mjs +4 -0
  115. package/dist/kv-DzXVnK94.mjs +21 -0
  116. package/dist/leaked-credential-checks-B9G_ZTNH.mjs +18 -0
  117. package/dist/lifecycle-Ichnb2x1.mjs +2 -0
  118. package/dist/load-balancers-3wGHPsYz.mjs +76 -0
  119. package/dist/local-B6b2OIBW.mjs +2 -0
  120. package/dist/local-BrfySqnx.mjs +2 -0
  121. package/dist/{local-runtime-BUGCbx8r.mjs → local-runtime-DD8DAIlm.mjs} +1 -1
  122. package/dist/login-CEQbOgBM.mjs +5 -0
  123. package/dist/login-DEWvGuaU.mjs +2 -0
  124. package/dist/logo-matches-YGRPstPi.mjs +6 -0
  125. package/dist/logos-BirufUgo.mjs +7 -0
  126. package/dist/logpush-BlNbUHyV.mjs +46 -0
  127. package/dist/logs-DmFlVF9q.mjs +48 -0
  128. package/dist/magic-cloud-networking-B3Wj2dhJ.mjs +71 -0
  129. package/dist/magic-network-monitoring-ry63w2Rw.mjs +36 -0
  130. package/dist/magic-transit-CBVOK2aa.mjs +387 -0
  131. package/dist/managed-defense-BdW6s483.mjs +18 -0
  132. package/dist/managed-transforms-BIeiofIS.mjs +9 -0
  133. package/dist/matches-CAnwci0P.mjs +6 -0
  134. package/dist/mcp-BfhOMGFE.mjs +32 -0
  135. package/dist/mesh-CxUL2Wf-.mjs +26 -0
  136. package/dist/mtls-certificates-CzmTw4zs.mjs +13 -0
  137. package/dist/network-C68psMbz.mjs +50 -0
  138. package/dist/network-interconnects-CLsMrTuk.mjs +73 -0
  139. package/dist/oauth-D4bkeMAw.mjs +14 -0
  140. package/dist/oauth-DouM-qz0.mjs +2 -0
  141. package/dist/oauth-clients-DbUmVE_5.mjs +16 -0
  142. package/dist/oauth-scopes-CQ18rwBg.mjs +4 -0
  143. package/dist/observability-DpYxkFeZ.mjs +80 -0
  144. package/dist/{open-PBXRGS4R-DARSUDEI.mjs → open-PBXRGS4R-C4CKEADM.mjs} +3 -3
  145. package/dist/open-PBXRGS4R-C_-G_4DC.mjs +4 -0
  146. package/dist/organization-Dg55Xfz7.mjs +75 -0
  147. package/dist/organizations-QnyzGjB2.mjs +4 -0
  148. package/dist/origin-ca-certificates-Co5lqIGL.mjs +11 -0
  149. package/dist/origin-post-quantum-encryption-Cz8JZamC.mjs +6 -0
  150. package/dist/origin-tls-client-auth-Dd0T1Kfv.mjs +30 -0
  151. package/dist/{output-COcSQsfn.mjs → output-Bia1u2k5.mjs} +1 -1
  152. package/dist/page-rules--D3eXrCf.mjs +39 -0
  153. package/dist/pages-Ce8DDgNr.mjs +60 -0
  154. package/dist/pay-per-crawl-CpkEbasz.mjs +65 -0
  155. package/dist/pay-per-use-fyM1DWgY.mjs +6 -0
  156. package/dist/pipelines-CAqCgBLh.mjs +44 -0
  157. package/dist/precursor-DBnn4Q35.mjs +4 -0
  158. package/dist/previews-y_nSqWK5.mjs +4 -0
  159. package/dist/progress-Bi02B6v4.mjs +2 -0
  160. package/dist/project-settings-DSXevRvj.mjs +3 -0
  161. package/dist/prompt-Bx2PB-tt.mjs +3 -0
  162. package/dist/queries-dg-CVXjf.mjs +9 -0
  163. package/dist/queues-C_ilLbRI.mjs +63 -0
  164. package/dist/r2-data-catalog-DGv6aROr.mjs +44 -0
  165. package/dist/r2-hZAkra-l.mjs +127 -0
  166. package/dist/radar-BO9b0aZy.mjs +300 -0
  167. package/dist/{raw-fetch-BVYQR6C5.mjs → raw-fetch-DNTQkXbg.mjs} +1 -1
  168. package/dist/realtime-eSavuSeE.mjs +172 -0
  169. package/dist/registrar-Ct30kOXZ.mjs +43 -0
  170. package/dist/registrar-sandbox-Dmn9zGUk.mjs +56 -0
  171. package/dist/{registry-CWUfXloz.mjs → registry-vreNkX6u.mjs} +1 -1
  172. package/dist/reporting-B-F5aWUJ.mjs +14 -0
  173. package/dist/request-headers-Dnbzv6RZ.mjs +2 -0
  174. package/dist/request-tracers-CaubpUFV.mjs +4 -0
  175. package/dist/resolve-BXemCSyA.mjs +2 -0
  176. package/dist/resolve-CUDKxUrW.mjs +2 -0
  177. package/dist/resource-sharing-6Snv-b69.mjs +40 -0
  178. package/dist/resource-tagging-W_LFiX2J.mjs +4 -0
  179. package/dist/rules-C26eyeA5.mjs +18 -0
  180. package/dist/rulesets-BKzIwVtJ.mjs +37 -0
  181. package/dist/rum-Xdw5hyWY.mjs +30 -0
  182. package/dist/run-BBBMrSrs.mjs +2 -0
  183. package/dist/run-BRucX7Rz.mjs +2 -0
  184. package/dist/{schema-C8hU6G9R.mjs → schema-DqtYndhB.mjs} +1 -1
  185. package/dist/{schema-flags-DC4c6dka.mjs → schema-flags-CebDI0f1.mjs} +4 -4
  186. package/dist/scim-odJTXiIe.mjs +18 -0
  187. package/dist/{sdk-C12y5qCN.mjs → sdk-CvIO3tWS.mjs} +1 -1
  188. package/dist/secrets-store-RYpWWzaw.mjs +24 -0
  189. package/dist/security-center-B3D95vCa.mjs +30 -0
  190. package/dist/security-txt-BSytVv-9.mjs +9 -0
  191. package/dist/shared-D67owd9x.mjs +2 -0
  192. package/dist/smart-shield-C83Sfnf4.mjs +24 -0
  193. package/dist/snippets-B6oE9WIa.mjs +20 -0
  194. package/dist/source-BR4_k2ad.mjs +6 -0
  195. package/dist/spawn-CKqJ9J4_.mjs +523 -0
  196. package/dist/spectrum-CfxY--X_.mjs +83 -0
  197. package/dist/speed-DzK-kiWt.mjs +24 -0
  198. package/dist/src-B3h6tKMt.mjs +108 -0
  199. package/dist/ssl-dnjzPcSB.mjs +45 -0
  200. package/dist/startup-profile-CYEokTVe.mjs +2 -0
  201. package/dist/startup-profile-CgWHy4rE.mjs +17 -0
  202. package/dist/state-BxCejn42.mjs +2 -0
  203. package/dist/state-DSzkxXML.mjs +2 -0
  204. package/dist/stream-oFyhS4Wi.mjs +102 -0
  205. package/dist/submit-4f-ravmC.mjs +4 -0
  206. package/dist/tags-DrIP6Uiq.mjs +4 -0
  207. package/dist/{telemetry-DjGNSlkU.mjs → telemetry-Dk1GcQ0u.mjs} +1 -1
  208. package/dist/telemetry-Ds4epd3D.mjs +2 -0
  209. package/dist/telemetry-mKEb8lYB.mjs +2 -0
  210. package/dist/tenant-C-gc3NWv.mjs +12 -0
  211. package/dist/tenant-custom-nameservers-DduTQIwh.mjs +9 -0
  212. package/dist/{tools-D9RZkZRc.mjs → tools-BMKpYraQ.mjs} +1 -1
  213. package/dist/tunnels-D0QYsskp.mjs +29 -0
  214. package/dist/turnstile-C6Q3spRB.mjs +33 -0
  215. package/dist/ui-DH95w1Qk.mjs +5 -0
  216. package/dist/undici-DTSBJHNS.mjs +96 -0
  217. package/dist/update-check-BBS1K1jt.mjs +2 -0
  218. package/dist/update-check-CTLoakFV.mjs +2 -0
  219. package/dist/update-check-worker.mjs +2 -0
  220. package/dist/url-info-Cs0V89qq.mjs +4 -0
  221. package/dist/url-normalization-DaEQYy5h.mjs +9 -0
  222. package/dist/url-scanner-C4YVeQ4v.mjs +16 -0
  223. package/dist/user-BV1VY3Kl.mjs +112 -0
  224. package/dist/values-qDS63E43.mjs +4 -0
  225. package/dist/vectorize-NFzD3mP5.mjs +32 -0
  226. package/dist/version-W6_TN_kN.mjs +2 -0
  227. package/dist/waiting-rooms-Y9YGj3ih.mjs +53 -0
  228. package/dist/web-assets-Gd6z8dbt.mjs +64 -0
  229. package/dist/web3-DCJx4NRp.mjs +28 -0
  230. package/dist/workers-B-j-1ygi.mjs +36 -0
  231. package/dist/workers-builds-DPrNKjZW.mjs +14 -0
  232. package/dist/workers-for-platforms-BjKAhMLA.mjs +25 -0
  233. package/dist/workers-vpc-C5YoCnQK.mjs +13 -0
  234. package/dist/workflows-C2KKIJjl.mjs +43 -0
  235. package/dist/zaraz-CVLCs1IX.mjs +22 -0
  236. package/dist/zero-trust-BtJi4OXF.mjs +795 -0
  237. package/dist/zone-hKgt0WzO.mjs +4 -0
  238. package/dist/zones-CCNyaD3J.mjs +124 -0
  239. package/package.json +15 -12
  240. package/dist/_meta/agent-context.json +0 -193
  241. package/dist/abuse-reports-BbaHw4ST.mjs +0 -8
  242. package/dist/access-D6Xz892p.mjs +0 -11
  243. package/dist/account-DvxcqeaK.mjs +0 -2
  244. package/dist/account-tags-CeqfEWpz.mjs +0 -9
  245. package/dist/accounts-Bx-8BMH9.mjs +0 -30
  246. package/dist/acm--0opdSGE.mjs +0 -3
  247. package/dist/addressing-BS1ynzLA.mjs +0 -13
  248. package/dist/agent-context-BPhyrSns.mjs +0 -8
  249. package/dist/agent-memory-DczzpEw5.mjs +0 -6
  250. package/dist/ai-CDdCTcQl.mjs +0 -5
  251. package/dist/ai-audit-Bx9KMQYh.mjs +0 -2
  252. package/dist/ai-gateway-BSXJEaYS.mjs +0 -13
  253. package/dist/ai-search-DRQj1aMu.mjs +0 -7
  254. package/dist/ai-security-C_Rb0lGT.mjs +0 -4
  255. package/dist/alerting-BAR9eFs2.mjs +0 -6
  256. package/dist/analytics-BaUZwNc5.mjs +0 -4
  257. package/dist/analytics_engine-DkEzlhfT.mjs +0 -2
  258. package/dist/api-security-jA0lOk6a.mjs +0 -50
  259. package/dist/argo-Cz4pDagx.mjs +0 -2
  260. package/dist/artifacts-BcLTGfAv.mjs +0 -5
  261. package/dist/audit-logs-DbIv4n6u.mjs +0 -2
  262. package/dist/auth-rW5d3jtr.mjs +0 -5
  263. package/dist/auth-tvDdC1J-.mjs +0 -8
  264. package/dist/billing-Md87QjqW.mjs +0 -3
  265. package/dist/bot-management-VHMo4hpU.mjs +0 -5
  266. package/dist/botnet-feed-BHqfo3sa.mjs +0 -3
  267. package/dist/brand-protection-HUeR6Pof.mjs +0 -3
  268. package/dist/browser-extension-199oZg3X.mjs +0 -3
  269. package/dist/browser-run-DDasyux-.mjs +0 -4
  270. package/dist/build-0QlYUfFS.mjs +0 -2
  271. package/dist/builds-B-lXn6JR.mjs +0 -9
  272. package/dist/cache-CevKpiTM.mjs +0 -9
  273. package/dist/certificate-authorities-DAg-aO1B.mjs +0 -2
  274. package/dist/cf-C11NGkjx.mjs +0 -18
  275. package/dist/chunk-LQW53VED-CoECHA3R.mjs +0 -119
  276. package/dist/chunk-QBZBEHZB-BuiXJn8j.mjs +0 -2
  277. package/dist/chunk-vbHwaUoU.mjs +0 -2
  278. package/dist/client-certificates-Bay7oPLE.mjs +0 -3
  279. package/dist/client-side-security-CbU9xn0k.mjs +0 -37
  280. package/dist/cloud-connector-AH2ClcSL.mjs +0 -2
  281. package/dist/cloudforce-one-DwOfS75V.mjs +0 -32
  282. package/dist/command-CMzMsll4.mjs +0 -2
  283. package/dist/connector-interrupts-DcLrqM2V.mjs +0 -2
  284. package/dist/connector-telemetry-events-PrJWgNs9.mjs +0 -2
  285. package/dist/connector-telemetry-snapshots-CIjJm5yu.mjs +0 -2
  286. package/dist/connectors-CEAy30E-.mjs +0 -3
  287. package/dist/containers-BsbDqbSn.mjs +0 -58
  288. package/dist/content-scan-BdK936iO.mjs +0 -4
  289. package/dist/cps-oP97-qkm.mjs +0 -2
  290. package/dist/csamScanner-DUNN4INg.mjs +0 -6
  291. package/dist/ct-alerting-dV_gsV2w.mjs +0 -3
  292. package/dist/custom-certificates-DYspvjo4.mjs +0 -5
  293. package/dist/custom-csrs-DjSWLQRu.mjs +0 -3
  294. package/dist/custom-hostnames-df1lH6IY.mjs +0 -5
  295. package/dist/custom-nameservers-CLTbN-9R.mjs +0 -3
  296. package/dist/custom-pages-DzKnSgL3.mjs +0 -3
  297. package/dist/d1-JBEqjJoj.mjs +0 -20
  298. package/dist/data-security-CIktWnXt.mjs +0 -7
  299. package/dist/dcv-delegation-_r6Vc6VL.mjs +0 -2
  300. package/dist/dev-CAubuxCc.mjs +0 -4
  301. package/dist/diagnostics-B0DRh714.mjs +0 -3
  302. package/dist/dist-12KzRsBM.mjs +0 -387
  303. package/dist/dist-BCVqQpg2.mjs +0 -2
  304. package/dist/dist-Cp3uJN1x.mjs +0 -48
  305. package/dist/dist-S9K_8gq9.mjs +0 -9
  306. package/dist/dls-CFzTHcZM.mjs +0 -3
  307. package/dist/dns-Dw6u-NV1.mjs +0 -29
  308. package/dist/dns-firewall-CIPptslp.mjs +0 -57
  309. package/dist/dry-run-DiVy1lVo.mjs +0 -2
  310. package/dist/durable-objects-CCkeqqBq.mjs +0 -2
  311. package/dist/email-auth-kdxO51Oz.mjs +0 -2
  312. package/dist/email-routing-BLggZdQq.mjs +0 -6
  313. package/dist/email-security-DjADlgdM.mjs +0 -18
  314. package/dist/email-sending-Cz7E7GoP.mjs +0 -7
  315. package/dist/error-sanitization-DfLijlBJ.mjs +0 -2
  316. package/dist/fieldExtractors-BWaMi6lD.mjs +0 -3
  317. package/dist/firewall-5t6OBIOl.mjs +0 -8
  318. package/dist/flagship-CzG_VoNR.mjs +0 -4
  319. package/dist/fraud-UOg_69Ob.mjs +0 -20
  320. package/dist/google-tag-gateway-DirkD-Q2.mjs +0 -2
  321. package/dist/healthchecks-BkHZGTp1.mjs +0 -4
  322. package/dist/hostnames-EUYOZm21.mjs +0 -3
  323. package/dist/hyperdrive-ZoLJlJCL.mjs +0 -21
  324. package/dist/iam-BQ2xSgYN.mjs +0 -6
  325. package/dist/images-CkEq6ScP.mjs +0 -8
  326. package/dist/intel-DDWEdGyl.mjs +0 -8
  327. package/dist/interactive-B2E03Fs-.mjs +0 -11
  328. package/dist/interactive-_B-EqD0Y.mjs +0 -23
  329. package/dist/ips-54Qmy-Uw.mjs +0 -2
  330. package/dist/keyless-certificates-CXHLc3Qz.mjs +0 -3
  331. package/dist/keys-rvI4TC3Z.mjs +0 -2
  332. package/dist/kv-CAeN1zBy.mjs +0 -5
  333. package/dist/leaked-credential-checks-CbbwtG-p.mjs +0 -4
  334. package/dist/load-balancers-BFwdwAIU.mjs +0 -6
  335. package/dist/local-C6XsFD_W.mjs +0 -2
  336. package/dist/logexplorer-D8rOPB5I.mjs +0 -17
  337. package/dist/logo-matches-Y3PxVn7t.mjs +0 -2
  338. package/dist/logos-BN8SvJhS.mjs +0 -3
  339. package/dist/logpush-BnLA4WVm.mjs +0 -4
  340. package/dist/logs-CDo7Y5sA.mjs +0 -3
  341. package/dist/magic-cloud-networking-wPuLwu-F.mjs +0 -5
  342. package/dist/magic-network-monitoring-BNERUpxS.mjs +0 -4
  343. package/dist/magic-transit-6tvVOECW.mjs +0 -111
  344. package/dist/managed-defense-AYwBOYIH.mjs +0 -2
  345. package/dist/managed-transforms-HZZNrkC7.mjs +0 -3
  346. package/dist/matches-Dp91L3dL.mjs +0 -2
  347. package/dist/mcp-P7pcieiT.mjs +0 -4
  348. package/dist/mesh-DjFrk6PL.mjs +0 -4
  349. package/dist/mtls-certificates-DZMoef2H.mjs +0 -3
  350. package/dist/network-7cd1U6-I.mjs +0 -6
  351. package/dist/network-interconnects-CQ7cPZjK.mjs +0 -41
  352. package/dist/oauth-DH3kMXSs.mjs +0 -14
  353. package/dist/oauth-clients-P9t-eMnx.mjs +0 -4
  354. package/dist/oauth-scopes-C3r9Qh_y.mjs +0 -2
  355. package/dist/observability-M1DnLhMR.mjs +0 -10
  356. package/dist/organization-cUE7GDCt.mjs +0 -45
  357. package/dist/organizations-C-Hcpd0w.mjs +0 -2
  358. package/dist/origin-ca-certificates-C8cJMyQH.mjs +0 -3
  359. package/dist/origin-post-quantum-encryption-DjZJCk8M.mjs +0 -2
  360. package/dist/origin-tls-client-auth-BsjR5EAV.mjs +0 -4
  361. package/dist/page-rules-B-zq1EUb.mjs +0 -27
  362. package/dist/pages-B6YpkPos.mjs +0 -14
  363. package/dist/pay-per-crawl-B4wx0lUb.mjs +0 -4
  364. package/dist/pipelines-BJc_RylD.mjs +0 -6
  365. package/dist/precursor-CLQu7suY.mjs +0 -4
  366. package/dist/progress-V6SZV3Ux.mjs +0 -2
  367. package/dist/prompt-DjRTpML4.mjs +0 -3
  368. package/dist/public-BMg6-Hxh-BfUOZTDP.mjs +0 -2
  369. package/dist/queries-DSrrket-.mjs +0 -3
  370. package/dist/queues-Tf7kPBpn.mjs +0 -7
  371. package/dist/r2-DmKNnxtC.mjs +0 -25
  372. package/dist/r2-data-catalog-DBxoifOq.mjs +0 -16
  373. package/dist/radar-Csk7Ab-b.mjs +0 -2
  374. package/dist/realtime-CDehZVhV.mjs +0 -20
  375. package/dist/registrar-sandbox-BxVdfnam.mjs +0 -56
  376. package/dist/registrar-vflzeNQ9.mjs +0 -43
  377. package/dist/reporting-BaPZ1PHN.mjs +0 -2
  378. package/dist/request-headers-CC4eHmI2.mjs +0 -3
  379. package/dist/request-tracers-C_UVBexV.mjs +0 -2
  380. package/dist/resolve-B8CyM1mi.mjs +0 -2
  381. package/dist/resource-sharing-CoB4S9j1.mjs +0 -6
  382. package/dist/resource-tagging-CUiUC5g4.mjs +0 -2
  383. package/dist/rules-4O8076_s.mjs +0 -4
  384. package/dist/rulesets-C84MxTYo.mjs +0 -5
  385. package/dist/rum-Bvwkrntx.mjs +0 -4
  386. package/dist/run-CRfinkSe.mjs +0 -2
  387. package/dist/schemas-O_ZNaF8R.mjs +0 -65
  388. package/dist/scim-BvxQmde6.mjs +0 -4
  389. package/dist/secrets-store-DOKWiC-j.mjs +0 -7
  390. package/dist/security-center-Bhy_aC-w.mjs +0 -2
  391. package/dist/security-txt-L7HJ9tq5.mjs +0 -3
  392. package/dist/smart-shield-COMXuQ1S.mjs +0 -4
  393. package/dist/snippets-DffQhlKt.mjs +0 -4
  394. package/dist/spawn-C1AISA2V.mjs +0 -526
  395. package/dist/spectrum-Cmf7SqQE.mjs +0 -63
  396. package/dist/speed-m8cdhLFS.mjs +0 -4
  397. package/dist/src-C8phrg-8.mjs +0 -109
  398. package/dist/ssl-D4ffsdSw.mjs +0 -15
  399. package/dist/startup-profile-Dx95Y5cl.mjs +0 -17
  400. package/dist/state-CHif8Y5I.mjs +0 -2
  401. package/dist/stream-DPF5fojV.mjs +0 -16
  402. package/dist/submit-Br8hfP0_.mjs +0 -2
  403. package/dist/tags-Bnt4JuxQ.mjs +0 -2
  404. package/dist/telemetry-Ch1vCICm.mjs +0 -2
  405. package/dist/tenant-D8u0CxoC.mjs +0 -2
  406. package/dist/tenant-custom-nameservers-BrWMyslZ.mjs +0 -3
  407. package/dist/tunnels-BkNPpTHa.mjs +0 -5
  408. package/dist/turnstile-MgwRECJv.mjs +0 -23
  409. package/dist/ui-DQSZeaG5.mjs +0 -5
  410. package/dist/url-info-Ddp7MgcI.mjs +0 -2
  411. package/dist/url-normalization-3ptK9ntV.mjs +0 -3
  412. package/dist/url-scanner-Psb9ollR.mjs +0 -2
  413. package/dist/user-DWdshcIu.mjs +0 -12
  414. package/dist/values-CDKQL1z2.mjs +0 -2
  415. package/dist/vectorize-CTYYUyQj.mjs +0 -4
  416. package/dist/waiting-rooms-BUdmwXDY.mjs +0 -11
  417. package/dist/web-assets-CpDwDEx8.mjs +0 -8
  418. package/dist/web3-YsjDyAzH.mjs +0 -4
  419. package/dist/workers-BKKxaZcz.mjs +0 -6
  420. package/dist/workers-builds-BWo5vUA9.mjs +0 -2
  421. package/dist/workers-for-platforms-ASJsxYdM.mjs +0 -5
  422. package/dist/workers-vpc-RkTnRvA2.mjs +0 -3
  423. package/dist/workflows-KrIFI9ns.mjs +0 -5
  424. package/dist/zaraz-DglXbVzZ.mjs +0 -2
  425. package/dist/zero-trust-RilTdSjX.mjs +0 -91
  426. package/dist/zone-DsBtVkvT.mjs +0 -2
  427. package/dist/zones-BFxvWFQW.mjs +0 -44
  428. /package/dist/{alerts-B2SJO4nd.mjs → alerts-CstOk8n0.mjs} +0 -0
  429. /package/dist/{autorag-iNjZXw1n.mjs → autorag-PRTwXGgn.mjs} +0 -0
  430. /package/dist/{body-parser-DIlfApuJ.mjs → body-parser-CUWbw_Tq.mjs} +0 -0
  431. /package/dist/{brands-BrVnNrT3.mjs → brands-BHRXlWDm.mjs} +0 -0
  432. /package/dist/{clear-an9o3dJ3.mjs → clear-UvKESVx3.mjs} +0 -0
  433. /package/dist/{cli-types-CrSoSMPF.mjs → cli-types-tt_LZMbn.mjs} +0 -0
  434. /package/dist/{connector-telemetry-events-latest-BqWfopFc.mjs → connector-telemetry-events-latest-DwnFeZg0.mjs} +0 -0
  435. /package/dist/{connector-telemetry-snapshots-latest-C1m9U1En.mjs → connector-telemetry-snapshots-latest-Dv6rZlxs.mjs} +0 -0
  436. /package/dist/{domain-info-B0Ykqv5l.mjs → domain-info-BqTDXNBo.mjs} +0 -0
  437. /package/dist/{health-CIUg1C5o.mjs → health-CwPzzrV6.mjs} +0 -0
  438. /package/dist/{input-validation-BxchZ9jE.mjs → input-validation-Ch4Vllrm.mjs} +0 -0
  439. /package/dist/{internal-DmpATljO.mjs → internal-WLHfxX64.mjs} +0 -0
  440. /package/dist/{live-B66u3_0g.mjs → live-D_k7eHdv.mjs} +0 -0
  441. /package/dist/{metadata-D062SVyy.mjs → metadata-APBiectA.mjs} +0 -0
  442. /package/dist/{rate-limit-analytics-BknoecoM.mjs → rate-limit-analytics-CDTPxSET.mjs} +0 -0
  443. /package/dist/{rate-limits-cdChIg_S.mjs → rate-limits-C3K9smdl.mjs} +0 -0
  444. /package/dist/{ready-C-H2cwp_.mjs → ready-CvwvbdTX.mjs} +0 -0
  445. /package/dist/{recent-submissions-DyuH_n5u.mjs → recent-submissions-CjzcT-iH.mjs} +0 -0
  446. /package/dist/{refute-uSlzkQKq.mjs → refute-CIAFMj00.mjs} +0 -0
  447. /package/dist/{scan-logo-DMk--WT7.mjs → scan-logo-zFkphtQ3.mjs} +0 -0
  448. /package/dist/{scan-page-DEHnAOJo.mjs → scan-page-CLl2MAkZ.mjs} +0 -0
  449. /package/dist/{search-BlKeSfVD.mjs → search-12jA1b4l.mjs} +0 -0
  450. /package/dist/{signed-url-CiGmGkLQ.mjs → signed-url-U0T_PEMR.mjs} +0 -0
  451. /package/dist/{submission-info-DHlTHDrs.mjs → submission-info-CZ84a3Nb.mjs} +0 -0
  452. /package/dist/{theme-CeVf-5qG.mjs → theme-BiIYWOed.mjs} +0 -0
  453. /package/dist/{total-queries-D5WvVfYi.mjs → total-queries-CJTc9Pde.mjs} +0 -0
  454. /package/dist/{tracked-domains-9deBK9bp.mjs → tracked-domains-BKLxnnSv.mjs} +0 -0
  455. /package/dist/{verify-S-TmhUDr.mjs → verify-CZW5Fo1q.mjs} +0 -0
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+ import{_ as e}from"./oauth-D4bkeMAw.mjs";import{a as t,r as n}from"./auth-Cp7gT-AF.mjs";import{t as r}from"./output-Bia1u2k5.mjs";import{t as i}from"./dry-run-CLX6Pbtq.mjs";import{t as a}from"./progress-Bi02B6v4.mjs";import{t as o}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./input-validation-Ch4Vllrm.mjs";import{a as u,i as d,n as f}from"./prompt-Bx2PB-tt.mjs";function p(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 ee={command:`bulk-delete`,describe:`Batch delete origin cloud region mappings`,builder:p,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.
3
+ `);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 m(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 h={command:`bulk-update`,describe:`Batch create or replace origin cloud region mappings`,builder:m,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 g(e){return e.usage(`$0 cache origin-cloud-regions delete <origin-ip>
4
+
5
+ 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 _={command:`delete <origin-ip>`,describe:`Delete an origin cloud region mapping`,builder:g,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.
6
+ `);return}r(await a(`Deleting`,async()=>o.cache.originCloudRegions.delete({zone_id:s,origin_ip:t[`origin-ip`]})),{successLabel:`Deleted`})})};function v(e){return e.usage(`$0 cache origin-cloud-regions get <origin-ip>
7
+
8
+ 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 y={command:`get <origin-ip>`,describe:`Get an origin cloud region mapping`,builder:v,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 b(e){return e.usage(`$0 cache origin-cloud-regions list
9
+
10
+ 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 x={command:`list`,describe:`List origin cloud region mappings`,builder:b,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 S(e){return e.usage(`$0 cache origin-cloud-regions supported-regions
11
+
12
+ 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 C={command:`supported-regions`,describe:`List supported cloud vendors and regions`,builder:S,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 w(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 T={command:`update <origin-ip>`,describe:`Create or replace an origin cloud region mapping`,builder:w,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`})})},E={command:`origin-cloud-regions`,describe:`Manage Origin Cloud Regions routing and failover configurations`,builder:e=>e.command(ee).command(h).command(_).command(y).command(x).command(C).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function D(e){return e.usage(`$0 cache purge-environment <environment-id>
13
+
14
+ Purge cached content scoped to a specific environment. Supports the same purge types as the zone-level endpoint (purge everything, by URL, by tag, host, or prefix). ### Availability and limits Please refer to [purge cache availability and limits documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).`).positional(`environment-id`,{type:`string`,description:`Environment ID`,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 O={command:`purge-environment <environment-id>`,describe:`Purge Cached Content by Environment`,builder:D,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:`Are you sure you want to purge cache for this environment?`})){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 k(e){return e.usage('$0 cache purge\n\n### Purge All Cached Content Removes ALL files from Cloudflare\'s cache. All tiers can purge everything. ``` {"purge_everything": true} ``` ### Purge Cached Content by URL Granularly removes one or more files from Cloudflare\'s cache by specifying URLs. All tiers can purge by URL. To purge files with custom cache keys, include the headers used to compute the cache key as in the example. If you have a device type or geo in your cache key, you will need to include the CF-Device-Type or CF-IPCountry headers. If you have lang in your cache key, you will need to include the Accept-Language header. **NB:** When including the Origin header, be sure to include the **scheme** and **hostname**. The port number can be omitted if it is the default port (80 for http, 443 for https), but must be included otherwise. Single file purge example with files: ``` {"files": ["http://www.example.com/css/styles.css", "http://www.example.com/js/index.js"]} ``` Single file purge example with url and header pairs: ``` {"files": [{"url": "http://www.example.com/cat_picture.jpg", "headers": {"CF-IPCountry": "US", "CF-Device-Type": "desktop", "Accept-Language": "zh-CN"}}, {"url": "http://www.example.com/dog_picture.jpg", "headers": {"CF-IPCountry": "EU", "CF-Device-Type": "mobile", "Accept-Language": "en-US"}}]} ``` ### Purge Cached Content by Tag, Host or Prefix Granularly removes one or more files from Cloudflare\'s cache either by specifying the host, the associated Cache-Tag, or a Prefix. Flex purge with tags: ``` {"tags": ["a-cache-tag", "another-cache-tag"]} ``` Flex purge with hosts: ``` {"hosts": ["www.example.com", "images.example.com"]} ``` Flex purge with prefixes: ``` {"prefixes": ["www.example.com/foo", "images.example.com/bar/baz"]} ``` ### Availability and limits Please refer to [purge cache availability and limits documentation page](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 A={command:`purge`,describe:`Purge Cached Content`,builder:k,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 will delete cached content for the zone.`})){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 j(e){return e.usage(`$0 cache settings regional-tiered-cache edit
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 M={command:`edit`,describe:`Change Regional Tiered Cache setting`,builder:j,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 N(e){return e.usage(`$0 cache settings regional-tiered-cache get
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 P={command:`get`,describe:`Get Regional Tiered Cache setting`,builder:N,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`})})},F={command:`regional-tiered-cache`,describe:`Restrict tiered cache topology to data centers within a specific geographic region`,builder:e=>e.command(M).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function I(e){return e.usage(`$0 cache settings reserve clear
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 L={command:`clear`,describe:`Start Cache Reserve Clear`,builder:I,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.
23
+ `);return}r(await a(`Deleting`,async()=>o.cache.settings.reserve.clear({zone_id:s})),{successLabel:`Deleted`})})};function te(e){return e.usage(`$0 cache settings reserve edit
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 R={command:`edit`,describe:`Change Cache Reserve setting`,builder:te,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 z(e){return e.usage(`$0 cache settings reserve get
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 B={command:`get`,describe:`Get Cache Reserve setting`,builder:z,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 V(e){return e.usage(`$0 cache settings reserve status
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 H={command:`status`,describe:`Get Cache Reserve Clear`,builder:V,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`})})},U={command:`reserve`,describe:`Persistent storage tier that keeps cached assets even after eviction from edge caches`,builder:e=>e.command(L).command(R).command(B).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 cache settings smart-tiered-cache create
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 G={command:`create`,describe:`Create Smart Tiered Cache setting`,builder:W,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 K(e){return e.usage(`$0 cache settings smart-tiered-cache delete
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 q={command:`delete`,describe:`Delete Smart Tiered Cache setting`,builder:K,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.
34
+ `);return}r(await a(`Deleting`,async()=>o.cache.settings.smartTieredCache.delete({zone_id:s})),{successLabel:`Deleted`})})};function J(e){return e.usage(`$0 cache settings smart-tiered-cache edit
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 Y={command:`edit`,describe:`Patch Smart Tiered Cache setting`,builder:J,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 X(e){return e.usage(`$0 cache settings smart-tiered-cache get
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 Z={command:`get`,describe:`Get Smart Tiered Cache setting`,builder:X,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`})})},Q={command:`smart-tiered-cache`,describe:`Automatically determine the best upper-tier data centers for tiered cache topology`,builder:e=>e.command(G).command(q).command(Y).command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(e){return e.usage(`$0 cache settings variants delete
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 re={command:`delete`,describe:`Delete variants setting`,builder:ne,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.
41
+ `);return}r(await a(`Deleting`,async()=>o.cache.settings.variants.delete({zone_id:s})),{successLabel:`Deleted`})})};function ie(e){return e.usage(`$0 cache settings variants edit
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 ae={command:`edit`,describe:`Change variants setting`,builder:ie,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 oe(e){return e.usage(`$0 cache settings variants get
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 $={command:`get`,describe:`Get variants setting`,builder:oe,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`})})},se={command:`variants`,describe:`Serve different cached versions of an image based on the Accept header (WebP, AVIF, etc.)`,builder:e=>e.command(re).command(ae).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ce={command:`settings`,describe:`Configure Cache Reserve, tiered caching, and variant serving`,builder:e=>e.command(F).command(U).command(Q).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},le={command:`cache`,describe:`Purge cached content and configure Cache Reserve, tiered caching, and variant serving`,builder:e=>e.command(A).command(O).command(E).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{le as default};
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import{_ as e}from"./oauth-D4bkeMAw.mjs";import{r as t}from"./auth-Cp7gT-AF.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bi02B6v4.mjs";import{t as a}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";function l(e){return e.usage(`$0 certificate-authorities hostname-associations get
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
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};
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ import{A as e,D as t,E as n,H as r,M as i,N as a,P as o,S as s,T as c,V as l,a as u,c as d,d as f,f as p,i as m,j as h,k as ee,l as g,m as _,n as te,o as ne,p as re,r as v,s as ie,t as ae,u as y,x as oe,z as b}from"./chunk-XLADBZ7F-BXKOjWbx.mjs";import{chmodSync as x,existsSync as S,mkdirSync as C,readFileSync as w,readdirSync as T,rmSync as E,writeFileSync as D}from"node:fs";import O from"node:path";import{URLSearchParams as se}from"node:url";function k(e){function t(){return O.resolve(e(),`preferences.json`)}r(t,`getUserPreferencesPath`);function n(){try{let e=w(t(),`utf8`),n=JSON.parse(e);return typeof n==`object`&&n?n:{}}catch{return{}}}r(n,`readUserPreferences`);function i(e){let r={...n(),...e},i=t();C(O.dirname(i),{recursive:!0}),D(i,JSON.stringify(r,null,` `),{encoding:`utf-8`})}return r(i,`updateUserPreferences`),{readUserPreferences:n,updateUserPreferences:i}}r(k,`createPreferences`);var A=6e4,j=525600,M=43200,N=1440,P=Symbol.for(`constructDateFrom`);function F(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&P in e?e[P](t):e instanceof Date?new e.constructor(t):new Date(t)}r(F,`constructFrom`);function I(e,t){return F(t||e,e)}r(I,`toDate`);var L={};function R(){return L}r(R,`getDefaultOptions`);function z(e){let t=I(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}r(z,`getTimezoneOffsetInMilliseconds`);function B(e,...t){let n=F.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}r(B,`normalizeDates`);function V(e,t){let n=I(e)-+I(t);return n<0?-1:n>0?1:n}r(V,`compareAsc`);function H(e){return F(e,Date.now())}r(H,`constructNow`);function ce(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}r(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=r((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 U(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}r(U,`buildFormatLongFn`);var de={date:U({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:U({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:U({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=r((e,t,n,r)=>fe[e],`formatRelative`);function W(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]}}r(W,`buildLocalizeFn`);var me={ordinalNumber:r((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:W({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:W({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:r(e=>e-1,`argumentCallback`)}),month:W({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:W({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:W({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 G(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}}}r(G,`buildMatchFn`);function he(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}r(he,`findKey`);function ge(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}r(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}}}r(_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:r(e=>parseInt(e,10),`valueCallback`)}),era:G({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:G({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:r(e=>e+1,`valueCallback`)}),month:G({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:G({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:G({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=R(),i=n?.locale??r.locale??ve,a=V(e,t);if(isNaN(a))throw RangeError(`Invalid time value`);let o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[s,c]=B(n?.in,...a>0?[t,e]:[e,t]),l=ce(n?.roundingMethod??`round`),u=c.getTime()-s.getTime(),d=u/A,f=(u-(z(c)-z(s)))/A,p=n?.unit,m;if(m=p||(d<1?`second`:d<60?`minute`:d<N?`hour`:f<M?`day`:f<j?`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/N);return i.formatDistance(`xDays`,e,o)}else if(m===`month`){let e=l(f/M);return e===12&&p!==`month`?i.formatDistance(`xYears`,1,o):i.formatDistance(`xMonths`,e,o)}else{let e=l(f/j);return i.formatDistance(`xYears`,e,o)}}r(ye,`formatDistanceStrict`);function be(e,t){return ye(e,H(e),t)}r(be,`formatDistanceToNowStrict`);function K(e,t){return{read:r(()=>{let n=t();if(!S(n))return;let r=b(n);try{return y(e,r)}catch{return}},`read`),write(n){let r=t();C(O.dirname(r),{recursive:!0}),D(r,p(e,n),{encoding:`utf-8`,mode:384}),x(r,384)},clear(){let e=t(),n=S(e);return E(e,{force:!0}),n},path:t}}r(K,`createFileStorage`);function q(e){let{logger:n,prompt:i}=e;return r(async function(e,r){if(t())return n.log(r),!0;let a=await i(e);return typeof a==`string`&&a.trim().toLowerCase()===`yes`},`ensureTemporaryTermsAccepted`)}r(q,`createTemporaryTermsPrompt`);var xe=[9106,1e4];function J(e){return e?.code}r(J,`getErrorCode`);function Se(e){let t=J(e);return t!==void 0&&xe.includes(t)}r(Se,`isMembershipsInaccessible`);function Ce(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.`}}r(Ce,`notLoggedInErrorBodies`);function we(e,t,n){let r=new Date(t.claim.expiresAt);e.log(m`
3
+ Temporary account ready:
4
+ Account: ${t.account.name} (${n?`reused`:`created`})
5
+ Claim within: ${be(r)}
6
+ Claim URL: ${t.claim.url}
7
+ `)}r(we,`logTemporaryPreviewAccount`);function Te(a,o){let{logger:u}=o,d=a.cliName,f=Ce(a.commands.login),p=`
8
+ Run \`${a.commands.whoami}\` to check your current authentication status.`,m=k(a.getConfigPath),h=oe(u,a.cacheNamespace?{namespace:a.cacheNamespace}:void 0),g=ae({serviceName:a.keyringServiceName,getConfigPath:a.getConfigPath,isKeyringEnabled:r(()=>m.readUserPreferences().keyring_enabled===!0,`isKeyringEnabled`),logger:u,isNonInteractiveOrCI:t,loginCommand:a.commands.login,format:a.fileFormat}),_=a.allowGlobalAuthKey??!0,v=te({logger:u,isNonInteractiveOrCI:t,openInBrowser:r(e=>ee(e,u),`openInBrowser`),hasEnvCredentials:r(()=>ne({allowGlobalAuthKey:_})!==void 0,`hasEnvCredentials`),purgeOnLoginOrLogout:h.purgeConfigCaches,clientId:a.clientId,consent:a.consent,displayName:a.displayName,deviceLoginCommand:a.commands.deviceLogin,redirectUri:a.redirectUri,storageFactory:g.storageFactory,allowGlobalAuthKey:_,temporary:{storage:K(a.fileFormat,a.getTemporaryAccountConfigPath),prompt:q({logger:u,prompt:o.prompt})}});function y(e){v.setProfile(e)}r(y,`setProfile`);function b(){return v.getActiveProfile()}r(b,`getActiveProfile`);function x(){return g.getActiveStore(v.getActiveProfile())}r(x,`getCredentialStore`);function S(e,t){v.setTemporaryAllowed(e,t)}r(S,`setTemporaryAllowed`);function C(){return v.getAPIToken()}r(C,`getAPIToken`);function w(){return v.requireApiToken()}r(w,`requireApiToken`);function T(e,t){return{complianceConfig:e,scopes:t?.scopes??a.getDefaultScopeKeys(),browser:t?.browser??!0,callbackHost:t?.callbackHost,callbackPort:t?.callbackPort,profile:t?.profile,device:t?.device??a.useDeviceFlowByDefault??!1}}r(T,`withLoginDefaults`);async function E(e,t){return v.login(T(e,t))}r(E,`login`);async function D(e){return v.logout(e)}r(D,`logout`);async function O(e,t){return v.getActiveTemporaryAccount()?{loggedIn:!0}:v.loginOrRefreshIfRequired(T(e,t))}r(O,`loginOrRefreshIfRequired`);async function A(){return v.getOAuthTokenFromLocalState()}r(A,`getOAuthTokenFromLocalState`);function j(){return v.getScopes()}r(j,`getScopes`);function M(){return g.storageFactory(b()).read()}r(M,`readAuthCredentials`);function N(e){g.storageFactory(b()).write(e)}r(N,`writeAuthCredentials`);function P(){let e=v.getActiveProfile();return e===`default`?`${a.accountCachePrefix}.json`:`${a.accountCachePrefix}-${e}.json`}r(P,`getAccountCacheFileName`);function F(e){h.saveToConfigCache(P(),{account:e})}r(F,`saveAccountToCache`);function I(){return h.getConfigCache(P()).account}r(I,`getAccountFromCache`);async function L(t,n,r){let i=[],a=!0,l=1,d;for(;a;){d=new se(d),d.set(`page`,String(l));let{response:f,status:p}=await s(t,n,{},o.userAgent,u,d,void 0,r);f.success?(i.push(...f.result),c(f.result_info)?l+=1:a=!1):e(n,f,p)}return i}r(L,`fetchAccountsPaged`);async function R(e,t={}){let{throwOnEmpty:n=!0}=t,r=await O(e);if(!r.loggedIn)throw new l(`Not logged in. ${f[r.reason]}${p}`,{telemetryMessage:`cfetch auth login required`});let i=w(),[o,s]=await Promise.allSettled([L(e,`/accounts`,i),L(e,`/memberships`,i)]);if(o.status===`rejected`)throw o.reason;if(s.status===`rejected`)if(Se(s.reason)){if(o.status===`fulfilled`&&o.value.length>0)return o.value;throw J(s.reason)===9106?new l(`Failed to automatically retrieve account IDs for the logged in user.
9
+ You may have incorrect permissions on your API token, or an environment variable such as CLOUDFLARE_API_TOKEN, CLOUDFLARE_API_KEY, or CLOUDFLARE_EMAIL may be set to an invalid value.
10
+ Check your environment and unset or correct any Cloudflare credential variables, or run \`${a.commands.login}\` to re-authenticate.
11
+ You can also skip this account check by adding an \`account_id\` in your ${a.getConfigFileLabel()} file, or by setting the value of CLOUDFLARE_ACCOUNT_ID`,{telemetryMessage:`user account fetch permission denied`}):new l(`Failed to automatically retrieve account IDs for the logged in user.
12
+ You may have incorrect permissions on your API token, or your authentication may have expired. Try running \`${a.commands.login}\` to re-authenticate. You can also skip this account check by adding an \`account_id\` in your ${a.getConfigFileLabel()} file, or by setting the value of CLOUDFLARE_ACCOUNT_ID`,{telemetryMessage:`user account fetch permission denied`})}else throw s.reason;let c=new Set(s.value.map(e=>e.account.id)),u=o.value.filter(e=>c.has(e.id));if(u.length===0&&n)throw new l(`Failed to automatically retrieve account IDs for the logged in user.
13
+ In a non-interactive environment, it is mandatory to specify an account ID, either by assigning its value to CLOUDFLARE_ACCOUNT_ID, or as \`account_id\` in your ${a.getConfigFileLabel()} file.
14
+ Alternatively, try running \`${a.commands.login}\` to re-authenticate.`,{telemetryMessage:`user account fetch empty`});return u}r(R,`fetchAllAccounts`);function z(e){let t=v.getActiveTemporaryAccount();return t?t.account.id:e.account_id?re(e.account_id,`set as \`account_id\` in your ${a.getConfigFileLabel()} file`):ie()||I()?.id}r(z,`getActiveAccountId`);async function B(e){let t=z(e);if(t)return t;let r=await R(e);if(r.length===1)return F({id:r[0].id,name:r[0].name}),r[0].id;try{let e=await o.select(`Select an account`,{choices:r.map(e=>({title:e.name,value:e.id}))}),t=r.find(t=>t.id===e);if(!t)throw Error(`Selected account not found in accounts list`);return F({id:t.id,name:t.name}),e}catch(e){if(o.isNoDefaultValueProvidedError(e)){let e=n();throw new l(`More than one account available but unable to select one in non-interactive mode.
15
+ Please set the appropriate \`account_id\` in your ${a.getConfigFileLabel()} file or assign it to the \`CLOUDFLARE_ACCOUNT_ID\` environment variable.
16
+ Available accounts are (\`<name>\`: \`<account_id>\`):
17
+ ${r.map(t=>` \`${e?`(redacted)`:t.name}\`: \`${t.id}\``).join(`
18
+ `)}`,{telemetryMessage:`user account selection unavailable`})}throw e}}r(B,`getOrSelectAccountId`);async function V(e){if(v.isTemporaryAllowed()){if(i(e)!==`public`)throw new l(`Temporary accounts aren't available when the compliance region is not set to public.`,{telemetryMessage:`user temporary account unavailable in compliance region`});let t=v.getActiveTemporaryAccount();if(t)return t.account.id;if(C())throw new l("You're already authenticated with Cloudflare, so `--temporary` can't be used. Temporary preview accounts are only for unauthenticated use. Either remove `--temporary` to use your existing account, or log out (and unset CLOUDFLARE_API_TOKEN) first.",{telemetryMessage:`user temporary account already authenticated`});let{account:n,cached:r}=await v.activateTemporaryAccount();return we(u,n,r),n.account.id}let t=await O(e);if(!t.loggedIn)throw t.reason===`no-credentials-non-interactive`||t.reason===`token-expired-non-interactive`?new l(`In a non-interactive environment, it's necessary to set a CLOUDFLARE_API_TOKEN environment variable for ${d} to work. Please go to https://developers.cloudflare.com/fundamentals/api/get-started/create-token/ for instructions on how to create an api token, and assign its value to CLOUDFLARE_API_TOKEN.`,{telemetryMessage:`user auth missing api token non interactive`}):new l(`Did not login, quitting...`,{telemetryMessage:`user login cancelled`});let n=await B(e);if(!n)throw new l(`No account id found, quitting...`,{telemetryMessage:`user auth missing account id`});return n}return r(V,`requireAuth`),{setProfile:y,getActiveProfile:b,getCredentialStore:x,setTemporaryAllowed:S,getAPIToken:C,requireApiToken:w,login:E,logout:D,loginOrRefreshIfRequired:O,getOAuthTokenFromLocalState:A,getScopes:j,readAuthCredentials:M,writeAuthCredentials:N,getActiveAccountId:z,getOrSelectAccountId:B,getAccountFromCache:I,fetchAllAccounts:R,requireAuth:V}}r(Te,`createCloudflareAuth`);var Ee=`profiles/directory-bindings.json`,De=`.enc`;function Y(e){let{logger:t,getConfigPath:n,keyringServiceName:i,format:a}=e,o=`.${a}`;function s(e){return u(n(),e,a)}r(s,`plaintextPath`);function c(e){return g(n(),e)}r(c,`encryptedPath`);function l(){return O.dirname(s(`default`))}r(l,`getProfileConfigDirectory`);let d={exists(e){return S(s(e))||S(c(e))},list(){let e=l();if(!S(e))return[];let t=new Set;for(let n of T(e))n.endsWith(o)?t.add(n.slice(0,-o.length)):n.endsWith(De)&&t.add(n.slice(0,-De.length));return[...t]},delete(e){let{backendAvailable:r,encryptedFileExisted:o}=f({serviceName:i,configPath:n(),profile:e,format:a});K(a,()=>s(e)).clear(),o&&!r&&t.warn(`Removed the credential files for profile "${e}", but the keyring backend was not reachable on this host so its keyring entry could not be cleared. Clear it manually if it persists.`)}};function p(){return O.join(n(),Ee)}return r(p,`getDirectoryBindingsPath`),v({configs:d,bindings:{read(){try{let e=w(p(),`utf-8`);return JSON.parse(e)}catch{return{}}},write(e){let t=p();C(O.dirname(t),{recursive:!0}),D(t,JSON.stringify(e,null,` `),`utf-8`)}}})}r(Y,`createCloudflareProfileStore`);function Oe(e){let{loginCommand:t,createProfileCommand:n,keyringServiceName:i,getConfigPath:a,format:o,preferences:s}=e,{readUserPreferences:c,updateUserPreferences:l}=s;function u(e){return e??`default`}r(u,`describeProfile`);function p(e){let t=[];S(g(a()))&&t.push(void 0);let n=Y({logger:e,getConfigPath:a,keyringServiceName:i,format:o});for(let e of n.configs.list()){try{_(e)}catch{continue}S(g(a(),e))&&t.push(e)}return t}r(p,`listEncryptedProfiles`);function m(e){let r=p(e);if(r.length===0)return;let s=[],c=[];for(let t of r)try{let{backendAvailable:e}=f({serviceName:i,configPath:a(),profile:t,format:o});s.push(u(t)),e||c.push(u(t))}catch(n){e.warn(`Failed to remove encrypted credentials for profile "${u(t)}": ${n instanceof Error?n.message:String(n)}. You may need to clear them manually.`)}if(s.length>0){let r=n?`Re-authenticate with \`${t}\` (default profile) or \`${n} <name>\` (named profiles).`:`Re-authenticate with \`${t}\`.`;e.log(`Removed encrypted credentials for ${s.map(e=>`"${e}"`).join(`, `)}. ${r}`)}c.length>0&&e.warn(`The keyring backend was not reachable on this host, so the keyring entry for ${c.map(e=>`"${e}"`).join(`, `)} could not be cleared. Clear it manually if it persists.`)}r(m,`scrubAllEncryptedProfiles`);function h(e,t){let{logger:n,getCredentialStore:r}=t,i=c().keyring_enabled===!0,a=d();if(a!==void 0&&a!==e&&n.warn(`CLOUDFLARE_AUTH_USE_KEYRING=${a} overrides ${e?`enabling`:`disabling`} keyring storage for this command.`),!e&&a!==!0&&m(n),l({keyring_enabled:e}),e&&a!==!1)try{r().kind!==`encrypted-file`&&(l({keyring_enabled:i}),n.warn(`Keyring storage isn't available on this host (see warning above), so it was not enabled. Try again once the keyring backend is reachable.`))}catch(e){throw l({keyring_enabled:i}),e}return{enabled:c().keyring_enabled===!0}}return r(h,`setKeyringPreference`),{setKeyringPreference:h}}r(Oe,`createKeyringPreference`);function ke(e){let{getConfigPath:t,format:n}=e;function i(e){return u(t(),e,n)}r(i,`getAuthConfigFilePath`);function a(e){return g(t(),e)}r(a,`getEncryptedAuthConfigFilePath`);function o(e){return K(n,()=>i(e))}r(o,`defaultAuthConfigStorage`);function s(e,t){o(t).write(e)}r(s,`writeAuthConfigFile`);function c(e){return o(e).read()}return r(c,`readAuthConfigFile`),{getAuthConfigFilePath:i,getEncryptedAuthConfigFilePath:a,defaultAuthConfigStorage:o,readAuthConfigFile:c,writeAuthConfigFile:s}}r(ke,`createAuthConfigFileHelpers`);var X=`cloudflare`,Ae=`cf`,je=`cf`,Me=`http://localhost:8877/oauth/callback`,Ne={granted:{url:`https://welcome.developers.workers.dev/cf-oauth-consent-granted`},denied:{url:`https://welcome.developers.workers.dev/cf-oauth-consent-denied`,error:"Error: Consent denied. You must grant consent to cf in order to login.\nIf you don't want to do this consider passing an API token via the `CLOUDFLARE_API_TOKEN` environment variable"}},Pe=o({variableName:`CLOUDFLARE_CLIENT_ID`,defaultValue:r(()=>`cbca97e7-c331-4cdd-8fd8-e25a451b98bf`,`defaultValue`)});function Z(){return a({appName:`cloudflare`,leadingDot:!1,useLegacyHomeDir:!1})}r(Z,`getCfConfigPath`);var Fe=`access:read,access:write,account:read,agw:read,agw:run,agw:write,ai:read,ai:write,ai-search:read,ai-search:run,ai-search:write,aiaudit:read,aiaudit:write,aig:read,aig:write,auditlogs:read,billing:read,billing:write,browser:read,browser:write,cfone:read,cfone:write,cloudchamber:write,connectivity:admin,connectivity:bind,connectivity:read,constellation:write,containers:write,d1:write,dex:read,dex:write,dns_analytics:read,dns_records:edit,dns_records:read,dns_settings:read,email_routing:read,email_routing:write,email_sending:read,email_sending:write,firstpartytags:write,images:read,images:write,lb:edit,lb:read,logpush:read,logpush:write,mcp_portals:read,mcp_portals:write,notebook-examples:read,notebook-managed:read,notification:read,notification:write,oauth_account_ssl_and_certificates_write,offline,openid,pages:read,pages:write,pipelines:read,pipelines:setup,pipelines:write,query_cache:write,queues:write,r2_catalog:write,radar:read,rag:read,rag:write,registrar:read,registrar:write,secrets_store:read,secrets_store:write,sso-connector:read,sso-connector:write,ssl_certs:write,teams:pii,teams:read,teams:secure_location,teams:write,url_scanner:read,url_scanner:write,user:read,vectorize:write,workers:read,workers:write,workers_builds:read,workers_builds:write,workers_deployments:read,workers_kv:write,workers_observability:read,workers_observability:write,workers_observability_telemetry:write,workers_routes:write,workers_scripts:write,workers_tail:read,zone:read,account-analytics.read,account-ssl-and-certificates.write,ssl-and-certificates.read,ssl-and-certificates.write,registrar-domains.read,registrar-domains.admin,logs.read,logs.write,websearch.run,snippets.read,snippets.write,access-acct.read,access-acct.revoke,access-acct.write,access-app.read,access-app.revoke,access-app.write,access-audit-log.read,access-certificate.read,access-certificate.write,access-custom-page.read,access-custom-page.write,access-device-posture.read,access-device-posture.write,access-group.read,access-group.write,access-idp.read,access-idp.write,access-key.read,access-key.write,access-org.read,access-org.revoke,access-org.write,access-policy-test.read,access-policy-test.write,access-policy.read,access-policy.write,access-population.read,access-population.write,access-saml-certificate.read,access-saml-certificate.write,access-scim-log.read,access-seats.write,access-service-token.read,access-service-token.write,access-ssh-auditing.read,access-ssh-auditing.write,access-tag.read,access-tag.write,access-users.read,access-users.write,access.read,access.revoke,access.write,account-api-gateway.read,account-api-gateway.write,account-custom-asset.read,account-custom-asset.write,account-custom-error-rules.read,account-custom-error-rules.write,account-custom-pages.read,account-custom-pages.write,account-disable-esc.read,account-disable-esc.write,account-dns-settings.read,account-dns-settings.write,account-firewall-access-rules.read,account-firewall-access-rules.write,account-logs.read,account-logs.write,account-rule-lists.read,account-rule-lists.write,account-rulesets.read,account-rulesets.write,account-security-center-insights.read,account-security-center-insights.write,account-settings.read,account-settings.write,account-ssl-and-certificates.read,account-waf.read,account-waf.write,account-waiting-rooms.read,address-maps.read,address-maps.write,agent-memory.write,agw.read,agw.run,agw.write,ai-search.index,ai-search.metadata_read,ai-search.read,ai-search.run,ai-search.write,ai.read,ai.write,aiaudit.read,aiaudit.write,aig.metadata_read,aig.read,aig.run,aig.write,analytics.read,api-gateway.read,api-gateway.write,apps.write,argotunnel.read,argotunnel.write,artifacts.read,artifacts.write,bot-management-feedback.read,bot-management-feedback.write,bot-management.read,bot-management.write,browser-rendering.read,browser-rendering.write,cache-settings.read,cache-settings.write,cache.purge,calls.read,calls.write,casb.read,casb.write,cf-agents.read,cf-agents.write,challenge-widgets.read,challenge-widgets.write,chinanetwork-steering.read,chinanetwork-steering.write,cloud-connector.read,cloud-connector.write,cloud-email-security.read,cloud-email-security.write,cloudchamber.read,cloudchamber.write,cloudforce-one.read,cloudforce-one.write,config-settings.read,config-settings.write,connectivity-directory.admin,connectivity-directory.bind,connectivity-directory.read,constellation.read,constellation.write,containers.read,containers.write,custom-errors.read,custom-errors.write,custom-pages.read,custom-pages.write,d1.metadata_read,d1.read,d1.write,ddos-botnet-feed.read,ddos-botnet-feed.write,ddos-protection.read,ddos-protection.write,dls.read,dls.write,dns-firewall.read,dns-firewall.write,dns-view.read,dns-view.write,dns.read,dns.write,domain-page-shield.read,domain-page.shield,dynamic-redirect.read,dynamic-redirect.write,email-routing-account-rule.read,email-routing-address.read,email-routing-address.write,email-routing-rule.read,email-routing-rule.write,email-routing-suppression.read,email-routing-suppression.write,email-security-dmarcreports.read,email-security-dmarcreports.write,email-sending.read,email-sending.write,fbm.admin,fbm.read,fbm.write,field-extractor.read,field-extractor.write,firewall-for-ai.read,firewall-for-ai.write,firewall-services.read,firewall-services.write,flagship.evaluate,flagship.read,flagship.write,fraud-detection-pii.read,fraud-detection.read,fraud-detection.write,fraud-events.write,fraud-feedback.read,fraud-feedback.write,healthcheck.read,healthcheck.write,http-applications.read,http-applications.write,http-ddos-managed-ruleset.read,http-ddos-managed-ruleset.write,images.metadata_read,images.read,images.write,integration.write,intel.read,intel.write,iot.read,iot.write,ip-prefix-bgp-on-demand.read,ip-prefix-bgp-on-demand.write,ip-prefix.read,ip-prefix.write,l4-ddos-managed-ruleset.read,l4-ddos-managed-ruleset.write,load-balancers-account.read,load-balancers-account.write,load-balancers.read,load-balancers.write,load-balancing-monitors-and-pools.read,load-balancing-monitors-and-pools.write,magic-firewall.read,magic-firewall.write,magic-transit.read,magic-transit.write,magic-wan.read,magic-wan.write,managed-headers.read,managed-headers.write,mass-url-redirects.read,mass-url-redirects.write,mcp-portals.read,mcp-portals.write,memberships.read,memberships.write,messaging.edit,messaging.metadata_read,messaging.read,moq.read,moq.write,notifications.read,notifications.write,origin.read,origin.write,page-rules.read,page-rules.write,page-shield.read,page.read,page.shield,page.write,pages.metadata_read,payments-gateway.read,payments-gateway.write,pcaps-api.read,pcaps-api.write,pipelines.read,pipelines.send,pipelines.write,precursor.read,precursor.write,pubsub.read,pubsub.write,query-cache.read,query-cache.write,queues.metadata_read,queues.read,queues.write,r2-catalog-sql.read,r2-catalog.read,r2-catalog.write,radar.read,rag.read,rag.run,rag.write,realtime.admin,realtime.read,realtime.write,registrar-sandbox-domains.admin,registrar-sandbox-domains.read,reports-application-security-report.read,request-tracer.read,resource-library.read,resource-library.write,resource-sharing.read,response-compression.read,response-compression.write,sanitize.read,sanitize.write,secrets-store.read,secrets-store.write,select-configuration.read,select-configuration.write,stream.metadata_read,stream.read,stream.write,tag.read,tag.write,teams-cds-compute-account.read,teams-cds-compute-account.write,teams-connector-cloudflared.monitoring,teams-connector-cloudflared.read,teams-connector-cloudflared.write,teams-connector-warp.read,teams-connector-warp.write,teams-connectors.read,teams-connectors.write,teams-dex.read,teams-dex.write,teams-networks.read,teams-networks.write,teams-pii.read,teams-resilience.read,teams-resilience.write,teams-secure.location,teams.read,teams.report,teams.write,transform-rules.read,transform-rules.write,trust-and-safety.read,trust-and-safety.write,url-scanner.read,url-scanner.write,user-details.read,user-details.write,vectorize.read,vectorize.write,waiting-rooms.read,waiting-rooms.write,web3-hostnames.read,web3-hostnames.write,websearch.metadata_read,websearch.read,websearch.write,workers-ci.read,workers-ci.write,workers-kv-storage.metadata_read,workers-kv-storage.read,workers-kv-storage.write,workers-observability-telemetry.write,workers-observability.read,workers-observability.write,workers-r2-bucket-item.read,workers-r2-bucket-item.write,workers-r2.metadata_read,workers-r2.read,workers-r2.write,workers-routes.read,workers-routes.write,workers-scripts.bind,workers-scripts.read,workers-scripts.write,workers-tail.read,workers_ai.metadata_read,zaraz.edit,zaraz.read,zaraz.write,zone-access.read,zone-access.revoke,zone-access.write,zone-custom-asset.read,zone-custom-asset.write,zone-disable-esc.read,zone-disable-esc.write,zone-dns-settings.read,zone-dns-settings.write,zone-security-center-insights.read,zone-security-center-insights.write,zone-settings.read,zone-settings.write,zone-transform-rules.read,zone-transform-rules.write,zone-versioning.read,zone-versioning.write,zone-waf.read,zone-waf.write,zone.read,zone.write`.split(`,`),Ie=new Set([`billing:read`,`billing:write`,`email_routing:read`,`email_sending:read`,`notebook-managed:read`,`oauth_account_ssl_and_certificates_write`]),Le=Fe.filter(e=>!Ie.has(e)),Re=[...Le];function ze(e){Re=e}r(ze,`setLoginScopeKeys`);var Be=new Set(Le);function Ve(e){return e.every(e=>Be.has(e))}r(Ve,`validateScopeKeys`);function He(){let e=h();return e===`production`?`cloudflare-temporary-account.json`:`cloudflare-temporary-account.${e}.json`}r(He,`getTemporaryAccountConfigFile`);function Ue(){return O.join(Z(),He())}r(Ue,`getCfTemporaryAccountConfigPath`);function Q(e){return K(`json`,e)}r(Q,`createJsonFileStorage`);var{getAuthConfigFilePath:We,getEncryptedAuthConfigFilePath:Ge,defaultAuthConfigStorage:Ke,readAuthConfigFile:qe,writeAuthConfigFile:Je}=ke({getConfigPath:Z,format:`json`}),$={cliName:Ae,displayName:je,commands:{login:`cf auth login`,whoami:`cf auth whoami`,createProfile:`cf auth create`,deviceLogin:`cf auth login`},keyringServiceName:X,clientId:Pe,consent:Ne,redirectUri:Me,useDeviceFlowByDefault:!0,allowGlobalAuthKey:!1,getConfigPath:Z,getTemporaryAccountConfigPath:Ue,fileFormat:`json`,accountCachePrefix:`cloudflare-account`,cacheNamespace:`cloudflare`,getConfigFileLabel:r(()=>`cf config`,`getConfigFileLabel`),getDefaultScopeKeys:r(()=>Re,`getDefaultScopeKeys`)},Ye=k(Z),{readUserPreferences:Xe,updateUserPreferences:Ze}=Ye;function Qe(e){return Te($,e)}r(Qe,`createCfAuth`);function $e(e){return Y({logger:e.logger,getConfigPath:Z,keyringServiceName:X,format:`json`})}r($e,`createCfProfileStore`);var et=Oe({loginCommand:$.commands.login,createProfileCommand:$.commands.createProfile,keyringServiceName:X,getConfigPath:Z,format:`json`,preferences:Ye});function tt(e,t){return et.setKeyringPreference(e,t)}r(tt,`setKeyringPreference`);export{Ve as a,Z as i,$e as n,Q as r,Qe as t};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./chunk-vbHwaUoU.mjs";import{createRequire as t}from"node:module";var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>r(e,`name`,{value:t,configurable:!0}),l=e===void 0?t(import.meta.url):e,u=(e,t)=>function(){return e&&(t=(0,e[a(e)[0]])(e=0)),t},d=(e,t)=>function(){return t||(0,e[a(e)[0]])((t={exports:{}}).exports,t),t.exports},f=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},p=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},m=(e,t,i)=>(i=e==null?{}:n(o(e)),p(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),h=e=>p(r({},`__esModule`,{value:!0}),e);export{l as a,c as i,u as n,h as o,f as r,m as s,d as t};
2
+ import{n as e}from"./chunk-DL5FNmn1.mjs";import{createRequire as t}from"node:module";var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>r(e,`name`,{value:t,configurable:!0}),l=e===void 0?t(import.meta.url):e,u=(e,t)=>function(){return e&&(t=(0,e[a(e)[0]])(e=0)),t},d=(e,t)=>function(){return t||(0,e[a(e)[0]])((t={exports:{}}).exports,t),t.exports},f=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},p=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},m=(e,t,i)=>(i=e==null?{}:n(o(e)),p(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),h=e=>p(r({},`__esModule`,{value:!0}),e);export{l as a,c as i,u as n,h as o,f as r,m as s,d as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire as e}from"node:module";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},l=(e,r,i)=>(i=e==null?{}:t(a(e)),c(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e)),u=e(import.meta.url);export{u as n,l as r,s as t};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./chunk-vbHwaUoU.mjs";import{createRequire as t}from"node:module";var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>r(e,`name`,{value:t,configurable:!0}),l=e===void 0?t(import.meta.url):e,u=(e,t)=>function(){return t||(0,e[a(e)[0]])((t={exports:{}}).exports,t),t.exports},d=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},f=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},p=(e,t,i)=>(i=e==null?{}:n(o(e)),f(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e));export{p as a,l as i,d as n,c as r,u as t};
2
+ import{n as e}from"./chunk-DL5FNmn1.mjs";import{createRequire as t}from"node:module";var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>r(e,`name`,{value:t,configurable:!0}),l=e===void 0?t(import.meta.url):e,u=(e,t)=>function(){return t||(0,e[a(e)[0]])((t={exports:{}}).exports,t),t.exports},d=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},f=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},p=(e,t,i)=>(i=e==null?{}:n(o(e)),f(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e));export{p as a,l as i,d as n,c as r,u as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{n as e}from"./chunk-DL5FNmn1.mjs";import{createRequire as t}from"node:module";var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>r(e,`name`,{value:t,configurable:!0}),l=e===void 0?t(import.meta.url):e,u=(e,t)=>function(){return t||(0,e[a(e)[0]])((t={exports:{}}).exports,t),t.exports},d=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},f=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},p=(e,t,i)=>(i=e==null?{}:n(o(e)),f(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e));export{p as a,l as i,d as n,c as r,u as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{n as e,t}from"./chunk-DL5FNmn1.mjs";import{R as n,_ as r,a as i,at as a}from"./dist-dc4E1u01.mjs";import{t as o}from"./undici-DTSBJHNS.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";var p=Object.create,m=Object.defineProperty,h=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,_=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty,y=(e,t)=>m(e,`name`,{value:t,configurable:!0}),b=e===void 0?s(import.meta.url):e,x=(e,t)=>function(){return t||(0,e[g(e)[0]])((t={exports:{}}).exports,t),t.exports},S=(e,t)=>{for(var n in t)m(e,n,{get:t[n],enumerable:!0})},C=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of g(t))!v.call(e,i)&&i!==n&&m(e,i,{get:()=>t[i],enumerable:!(r=h(t,i))||r.enumerable});return e},w=(e,t,n)=>(n=e==null?{}:p(_(e)),C(t||!e||!e.__esModule?m(n,`default`,{value:e,enumerable:!0}):n,e)),T=t(((t,n)=>{var r=e(`child_process`).exec,i=e(`child_process`).execSync,a=e(`fs`),o=e(`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)}})),E=t(((e,t)=>{t.exports=T()})),ee=o(),D=E();function O(e){if(e.compiled_schema)return c(u(e.compiled_schema));let{base_path:t,source_schemas:n}=e,r=(n??[]).map(e=>u(t,e));if(!(0,D.sync)(`capnp`))throw new a(`The capnp compiler is required to upload capnp schemas, but is not present.`,{telemetryMessage:`capnp compiler missing`});let i=f(`capnp`,[`compile`,`-o-`,`--src-prefix=${u(t??`.`)}`,...r],{maxBuffer:3*1024*1024});if(i.error)throw i.error;if(i.stderr.length)throw Error(i.stderr.toString());return i.stdout}y(O,`handleUnsafeCapnp`);var k={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 A(e){let t=k[e];if(t===void 0)throw TypeError(`Unsupported module: `+e);return t}y(A,`toMimeType`);function j(e){let t=Object.keys(k).find(t=>k[t]===e);if(t===void 0)throw TypeError(`Unsupported mime type: `+e);return t}y(j,`fromMimeType`);function M(e,t,o){let s=new ee.FormData,{main:u,sourceMaps:f,migrations:p,exports:m,compatibility_date:h,compatibility_flags:g,keepVars:_,keepSecrets:v,keepBindings:y,logpush:b,placement:x,tail_consumers:S,streaming_tail_consumers:C,limits:w,annotations:T,keep_assets:E,assets:D,observability:k,cache:j,package_dependencies:M}=e,N={html_handling:D?.assetConfig?.html_handling,not_found_handling:D?.assetConfig?.not_found_handling,run_worker_first:D?.run_worker_first,_redirects:D?._redirects,_headers:D?._headers};if(D&&!D.routerConfig.has_user_worker)return s.set(`metadata`,JSON.stringify({assets:{jwt:D.jwt,config:N},...T&&{annotations:T},...h&&{compatibility_date:h},...g&&{compatibility_flags:g}})),s;let{modules:P}=e,F=[],te=i(`plain_text`,t),ne=i(`json`,t),re=i(`secret_text`,t),I=i(`kv_namespace`,t),ie=i(`send_email`,t),ae=i(`durable_object_namespace`,t),oe=i(`workflow`,t),se=i(`queue`,t),ce=i(`r2_bucket`,t),le=i(`d1`,t),ue=i(`vectorize`,t),de=i(`ai_search_namespace`,t),L=i(`ai_search`,t),R=i(`agent_memory`,t),z=i(`hyperdrive`,t),B=i(`secrets_store_secret`,t),V=i(`artifacts`,t),fe=i(`unsafe_hello_world`,t),pe=i(`flagship`,t),me=i(`ratelimit`,t),he=i(`vpc_service`,t),ge=i(`vpc_network`,t),H=i(`service`,t),_e=i(`analytics_engine`,t),ve=i(`dispatch_namespace`,t),ye=i(`mtls_certificate`,t),be=i(`pipeline`,t),xe=i(`worker_loader`,t),Se=i(`logfwdr`,t),Ce=i(`wasm_module`,t),U=i(`browser`,t)[0],W=i(`ai`,t)[0],G=i(`images`,t)[0],K=i(`stream`,t)[0],q=i(`media`,t)[0],J=i(`version_metadata`,t)[0],Y=i(`assets`,t)[0],we=i(`text_blob`,t),Te=i(`data_blob`,t);i(`inherit`,t).forEach(({binding:e})=>{F.push({name:e,type:`inherit`})}),te.forEach(({binding:e,value:t})=>{F.push({name:e,type:`plain_text`,text:t})}),ne.forEach(({binding:e,value:t})=>{F.push({name:e,type:`json`,json:t})}),re.forEach(({binding:e,value:t})=>{F.push({name:e,type:`secret_text`,text:t})}),I.forEach(({id:e,binding:t,raw:r})=>{if(o?.dryRun&&(e??=n),e===void 0)throw new a(`${t} bindings must have an "id" field`,{telemetryMessage:`kv namespace binding missing id`});e===n?F.push({name:t,type:`inherit`}):F.push({name:t,type:`kv_namespace`,namespace_id:e,raw:r})}),ie.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?F.push(t):F.push({...t,allowed_destination_addresses:e.allowed_destination_addresses}):F.push({...t,destination_address:e.destination_address})}),ae.forEach(({name:e,class_name:t,script_name:n,environment:r})=>{F.push({name:e,type:`durable_object_namespace`,class_name:t,...n&&{script_name:n},...r&&{environment:r}})}),oe.forEach(({binding:e,name:t,class_name:n,script_name:r,raw:i})=>{F.push({type:`workflow`,name:e,workflow_name:t,class_name:n,script_name:r,raw:i})}),se.forEach(({binding:e,queue_name:t,delivery_delay:r,raw:i})=>{if(o?.dryRun&&(t??=n),t===void 0)throw new a(`${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===n?F.push({name:e,type:`inherit`}):F.push({type:`queue`,name:e,queue_name:t,delivery_delay:r,raw:i})}),ce.forEach(({binding:e,bucket_name:t,jurisdiction:r,raw:i})=>{if(o?.dryRun&&(t??=n),t===void 0)throw new a(`${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===n?F.push({name:e,type:`inherit`}):F.push({name:e,type:`r2_bucket`,bucket_name:t,jurisdiction:r,raw:i})}),le.forEach(({binding:e,database_id:t,database_internal_env:r,raw:i})=>{if(o?.dryRun&&(t??=n),t===void 0)throw new a(`${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===n?F.push({name:e,type:`inherit`}):F.push({name:e,type:`d1`,id:t,internalEnv:r,raw:i})}),ue.forEach(({binding:e,index_name:t,raw:n})=>{F.push({name:e,type:`vectorize`,index_name:t,raw:n})}),de.forEach(({binding:e,namespace:t})=>{if(o?.dryRun&&(t??=n),t===void 0)throw new a(`${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===n?F.push({name:e,type:`inherit`}):F.push({name:e,type:`ai_search_namespace`,namespace:t})}),L.forEach(({binding:e,instance_name:t})=>{F.push({name:e,type:`ai_search`,instance_name:t})}),R.forEach(({binding:e,namespace:t})=>{if(o?.dryRun&&(t??=n),t===void 0)throw new a(`${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===n?F.push({name:e,type:`inherit`}):F.push({name:e,type:`agent_memory`,namespace:t})}),z.forEach(({binding:e,id:t})=>{F.push({name:e,type:`hyperdrive`,id:t})}),B.forEach(({binding:e,store_id:t,secret_name:n})=>{F.push({name:e,type:`secrets_store_secret`,store_id:t,secret_name:n})}),V.forEach(({binding:e,namespace:t})=>{F.push({name:e,type:`artifacts`,namespace:t})}),fe.forEach(({binding:e,enable_timer:t})=>{F.push({name:e,type:`unsafe_hello_world`,enable_timer:t})}),pe.forEach(({binding:e,app_id:t})=>{if(o?.dryRun&&(t??=n),t===void 0)throw new a(`${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`});F.push(t===n?{name:e,type:`inherit`}:{name:e,type:`flagship`,app_id:t})}),me.forEach(({name:e,namespace_id:t,simple:n})=>{F.push({name:e,type:`ratelimit`,namespace_id:t,simple:n})}),he.forEach(({binding:e,service_id:t})=>{F.push({name:e,type:`vpc_service`,service_id:t})}),ge.forEach(({binding:e,tunnel_id:t,network_id:n})=>{F.push({name:e,type:`vpc_network`,...t===void 0?{network_id:n}:{tunnel_id:t}})}),H.forEach(({binding:e,service:t,environment:n,entrypoint:r,props:i,cross_account_grant:a})=>{F.push({name:e,type:`service`,service:t,cross_account_grant:a,...n&&{environment:n},...r&&{entrypoint:r},...i&&{props:i}})}),_e.forEach(({binding:e,dataset:t})=>{F.push({name:e,type:`analytics_engine`,dataset:t})}),ve.forEach(({binding:e,namespace:t,outbound:r})=>{if(o?.dryRun&&(t??=n),t===void 0)throw new a(`${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===n?F.push({name:e,type:`inherit`}):F.push({name:e,type:`dispatch_namespace`,namespace:t,...r&&{outbound:{worker:{service:r.service,environment:r.environment},params:r.parameters?.map(e=>({name:e}))}}})}),ye.forEach(({binding:e,certificate_id:t})=>{F.push({name:e,type:`mtls_certificate`,certificate_id:t})}),be.forEach(({binding:e,stream:t,pipeline:n})=>{if(t)F.push({name:e,type:`pipelines`,stream:t});else if(n)F.push({name:e,type:`pipelines`,pipeline:n});else throw Error(`Pipeline binding must specify a stream or pipeline`)}),xe.forEach(({binding:e})=>{F.push({name:e,type:`worker_loader`})}),Se.forEach(({name:e,destination:t})=>{F.push({name:e,type:`logfwdr`,destination:t})}),Ce.forEach(({binding:e,source:t})=>{F.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`}))}),U!==void 0&&F.push({name:U.binding,type:`browser`,raw:U.raw}),W!==void 0&&F.push({name:W.binding,staging:W.staging,type:`ai`,raw:W.raw}),G!==void 0&&F.push({name:G.binding,type:`images`,raw:G.raw}),K!==void 0&&F.push({name:K.binding,type:`stream`}),q!==void 0&&F.push({name:q.binding,type:`media`}),J!==void 0&&F.push({name:J.binding,type:`version_metadata`}),Y!==void 0&&F.push({name:Y.binding,type:`assets`}),we.forEach(({binding:e,source:t})=>{F.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`})))}),Te.forEach(({binding:e,source:t})=>{F.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(r(n.type)&&n.type!==`unsafe_hello_world`){let{type:t,...r}=n;F.push({name:e,type:t.slice(7),...r})}let X=`__STATIC_CONTENT_MANIFEST`;if(P?.some(({name:e})=>e===X)&&u.type===`esm`){d(P!==void 0);let e=new Set(P.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);P.push({name:n,filePath:n,content:`export { default } from ${JSON.stringify(e)};`,type:`esm`})}}if(u.type===`commonjs`){for(let e of Object.values([...P||[]]))if(e.name===`__STATIC_CONTENT_MANIFEST`)s.set(e.name,new File([e.content],e.name,{type:`text/plain`})),P=P?.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,`_`);F.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`})),P=P?.filter(t=>t!==e)}}let Z;if(o?.unsafe?.capnp){let e=O(o.unsafe.capnp);Z=`./capnp-${Date.now()}.compiled`,s.set(Z,new File([e],Z,{type:`application/octet-stream`}))}let Q;_&&(Q??=[],Q.push(`plain_text`,`json`)),v&&(Q??=[],Q.push(`secret_text`,`secret_key`)),y&&(Q??=[],Q.push(...y));let $={...u.type===`commonjs`?{body_part:u.name}:{main_module:u.name},bindings:F,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}})),...h&&{compatibility_date:h},...g&&{compatibility_flags:g},...p&&{migrations:p},...m&&Object.keys(m).length>0&&{exports:m},capnp_schema:Z,...Q&&{keep_bindings:Q},...b!==void 0&&{logpush:b},...x&&{placement:x},...S&&{tail_consumers:S},...C&&{streaming_tail_consumers:C},...w&&{limits:w},...T&&{annotations:T},...E!==void 0&&{keep_assets:E},...D&&{assets:{jwt:D.jwt,config:N}},...k&&{observability:k},...j&&{cache_options:j},...M?.length&&{package_dependencies:M}};if(o?.unsafe?.metadata!==void 0)for(let e of Object.keys(o.unsafe.metadata))$[e]=o.unsafe.metadata[e];if(s.set(`metadata`,JSON.stringify($)),u.type===`commonjs`&&P&&P.length>0)throw TypeError(`More than one module can only be specified when type = 'esm'`);for(let e of[u].concat(P||[]))s.set(e.name,new File([e.content],e.name,{type:A(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}y(M,`createWorkerUploadForm`);export{S as a,w as c,x as i,j as n,y as o,k as r,b as s,M as t};