cf 1.0.0-beta.19 → 1.0.0-beta.20

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 (246) hide show
  1. package/README.md +2 -1
  2. package/dist/_meta/commands.json +47 -13
  3. package/dist/_meta/schemas.json +29 -3
  4. package/dist/{abuse-reports-DhgunVFo.mjs → abuse-reports-mKv00yPh.mjs} +1 -1
  5. package/dist/{access-BDoDq_WZ.mjs → access-CyRjTbhh.mjs} +1 -1
  6. package/dist/{accounts-DLTCzZJg.mjs → accounts-BmF_YKvG.mjs} +1 -1
  7. package/dist/{acm-DS1CosYq.mjs → acm-BcIFiAb8.mjs} +1 -1
  8. package/dist/{addressing-DFeYj8TY.mjs → addressing-D6xVD7MM.mjs} +1 -1
  9. package/dist/{agent-memory-DXjQ8N0g.mjs → agent-memory-Blldunhv.mjs} +1 -1
  10. package/dist/{ai-V5YopMkS.mjs → ai-CU8tdTfC.mjs} +1 -1
  11. package/dist/{ai-audit-yg8D0azz.mjs → ai-audit-Id3hq5pV.mjs} +1 -1
  12. package/dist/{ai-gateway--dkH9qGz.mjs → ai-gateway-BKeZ28CQ.mjs} +1 -1
  13. package/dist/{ai-search-BRtsUaUI.mjs → ai-search-DOiZEmn7.mjs} +1 -1
  14. package/dist/{ai-security-DRJCcLpF.mjs → ai-security-CioADDZi.mjs} +1 -1
  15. package/dist/{alerting-8DsyMKGG.mjs → alerting-BzN1N3Se.mjs} +1 -1
  16. package/dist/{analytics-BpYUZTtQ.mjs → analytics-Cte-DrzH.mjs} +1 -1
  17. package/dist/{analytics-engine-CT2E0Dkw.mjs → analytics-engine-CugCQfDe.mjs} +1 -1
  18. package/dist/{api-security-CBhWZE8z.mjs → api-security-CCs0g510.mjs} +1 -1
  19. package/dist/{argo-B0u2N3Dh.mjs → argo-BHBFZnmO.mjs} +1 -1
  20. package/dist/{artifacts-B6XzjMiM.mjs → artifacts-BzAwvrCD.mjs} +1 -1
  21. package/dist/{audit-logs-59fCc1aw.mjs → audit-logs-jWivEKCy.mjs} +1 -1
  22. package/dist/auth-BUQscD5b.mjs +2 -0
  23. package/dist/auth-CdEGiJ5Y.mjs +2 -0
  24. package/dist/auth-DF_ml7rE.mjs +2 -0
  25. package/dist/auth-token-T0aqYgl9.mjs +8 -0
  26. package/dist/{autoconfig-Cdm2IFLM.mjs → autoconfig-CBdcYYf4.mjs} +1 -1
  27. package/dist/{basin-catalog-CV05WlA4.mjs → basin-catalog-_8w_4599.mjs} +1 -1
  28. package/dist/{billing-Ad-rK-JH.mjs → billing-Ce0WN0yw.mjs} +1 -1
  29. package/dist/blocks-CFAm0Ma3.mjs +5 -0
  30. package/dist/{bot-management-CGpfjQ4w.mjs → bot-management-DskcSr4B.mjs} +1 -1
  31. package/dist/{botnet-feed-CMrF6ZGq.mjs → botnet-feed-CmBm13-D.mjs} +1 -1
  32. package/dist/{brand-protection-CP73_yX8.mjs → brand-protection-DTuFrsN0.mjs} +1 -1
  33. package/dist/{browser-run-OpUfawh_.mjs → browser-run-CXdzSOHa.mjs} +1 -1
  34. package/dist/build-BJHRK6qE.mjs +2 -0
  35. package/dist/build-D7s3a8zW.mjs +2 -0
  36. package/dist/{builds-DsRNlILV.mjs → builds-_1u5Nx6f.mjs} +1 -1
  37. package/dist/{cache-RppXjxXA.mjs → cache-CDPUUv_O.mjs} +1 -1
  38. package/dist/{cf-PISMdEje.mjs → cf-3vj8dGYz.mjs} +1 -1
  39. package/dist/{chunk-2K52M2W5-c__08AOB.mjs → chunk-2K52M2W5-iYNzknM1.mjs} +1 -1
  40. package/dist/{chunk-DSGVRFIS-DfQO1boa.mjs → chunk-DSGVRFIS-RUG6Dtqz.mjs} +1 -1
  41. package/dist/{cli-Dd1n2YAJ.mjs → cli-DyhOdzMo.mjs} +3 -5
  42. package/dist/{client-side-security-BYfwOkUo.mjs → client-side-security-DnnYaRsd.mjs} +1 -1
  43. package/dist/{cloud-connector-CQZUqAMQ.mjs → cloud-connector-Ct6b6pz8.mjs} +1 -1
  44. package/dist/{cloudflared-C1SdXpYv.mjs → cloudflared-CHLpWU35.mjs} +1 -1
  45. package/dist/{cloudforce-one-C1xdpspb.mjs → cloudforce-one-Rl6nCCm0.mjs} +1 -1
  46. package/dist/{command-D5BUzDX8.mjs → command-0WS5I_JW.mjs} +1 -1
  47. package/dist/{command-C8DV-x_C.mjs → command-BMYi_gS-.mjs} +1 -1
  48. package/dist/{command-DlB10kIb.mjs → command-BONLLcyz.mjs} +1 -1
  49. package/dist/{command-FOQNhNqP.mjs → command-BRXOUAGD.mjs} +1 -1
  50. package/dist/command-BRpBIju7.mjs +2 -0
  51. package/dist/{command-F0jlqvKr.mjs → command-BVO9UOuU.mjs} +1 -1
  52. package/dist/{command-DWE7YdeC.mjs → command-BwgvUpNx.mjs} +1 -1
  53. package/dist/{command-BioiZMm9.mjs → command-BwlIi3Bv.mjs} +1 -1
  54. package/dist/{command-DmPQXNRg.mjs → command-CHGc-KZ7.mjs} +1 -1
  55. package/dist/{command-D203VrTG.mjs → command-CMa807gY.mjs} +1 -1
  56. package/dist/{command-yAXk5NXh.mjs → command-CPDQPdss.mjs} +1 -1
  57. package/dist/{command-C7NIRU-u.mjs → command-CVoDyQnL.mjs} +1 -1
  58. package/dist/{command-C5ARgURy.mjs → command-CXzje7qc.mjs} +1 -1
  59. package/dist/{command-C0nJ2LRd.mjs → command-DOpykk8X.mjs} +1 -1
  60. package/dist/{command-ChQXv0jP.mjs → command-DuLxEkGq.mjs} +1 -1
  61. package/dist/{completions-Bh0Hz-hA.mjs → completions-DMwrvK_S.mjs} +1 -1
  62. package/dist/{connector-interrupts-Bd949WX0.mjs → connector-interrupts-DyWilINb.mjs} +1 -1
  63. package/dist/{connector-telemetry-events-Dw8iIg5Q.mjs → connector-telemetry-events-BUW9qTOs.mjs} +1 -1
  64. package/dist/{connector-telemetry-snapshots-DqEIaz99.mjs → connector-telemetry-snapshots-Djs5QssR.mjs} +1 -1
  65. package/dist/{connectors-RUEU1QDB.mjs → connectors-e_cpzDEm.mjs} +1 -1
  66. package/dist/{containers-xU-0EhLO.mjs → containers-CEH15JUu.mjs} +2 -2
  67. package/dist/{containers-yUOvm-4V.mjs → containers-CcZHRM9g.mjs} +204 -204
  68. package/dist/{content-scan-Cm2-Xhqo.mjs → content-scan-B6Ahw9JA.mjs} +1 -1
  69. package/dist/{context-BQ6KeMgq.mjs → context-Sgba0fZP.mjs} +1 -1
  70. package/dist/{cps-CgPduy0H.mjs → cps-uDD0SSJ-.mjs} +1 -1
  71. package/dist/{csam-scanner-B0Ra6fXL.mjs → csam-scanner-BSUl7jGn.mjs} +1 -1
  72. package/dist/{custom-csrs-6lfu1-RR.mjs → custom-csrs-BDcXggph.mjs} +1 -1
  73. package/dist/{custom-hostnames-Dzov_CPw.mjs → custom-hostnames-UmIlwkwt.mjs} +1 -1
  74. package/dist/{custom-nameservers-Bfhv_9_k.mjs → custom-nameservers-D7kU6d--.mjs} +1 -1
  75. package/dist/{custom-pages-DxVD_f10.mjs → custom-pages-CkhIQCfM.mjs} +1 -1
  76. package/dist/{d1-D7p4uJ-e.mjs → d1-myRLEAGs.mjs} +1 -1
  77. package/dist/{deploy-BjWvVZol.mjs → deploy-BJqCpycz.mjs} +1 -1
  78. package/dist/{deploy-context-C-ZdGP0Z.mjs → deploy-context-DIAl408H.mjs} +1 -1
  79. package/dist/{deploy-input-B8Nq6Eh6.mjs → deploy-input-v2DryyLP.mjs} +1 -1
  80. package/dist/{dev-D20UkcYT.mjs → dev-S1PJi83q.mjs} +1 -1
  81. package/dist/{diagnostics-DdhTemYB.mjs → diagnostics-q65rcNIk.mjs} +1 -1
  82. package/dist/{dist-CnKd5XoR.mjs → dist-CX6dDtzj.mjs} +4 -4
  83. package/dist/{dls-BBODA9Rk.mjs → dls-CMTrCDjZ.mjs} +1 -1
  84. package/dist/{dns-CK_hyn5q.mjs → dns-DhARjFQs.mjs} +1 -1
  85. package/dist/{dns-firewall-DbvX9R-7.mjs → dns-firewall-BP6r9QG6.mjs} +1 -1
  86. package/dist/{docs-BDTijwM3.mjs → docs-CReGWDrw.mjs} +1 -1
  87. package/dist/{dry-run-DQmFkNK_.mjs → dry-run-BBjUQUhR.mjs} +1 -1
  88. package/dist/{durable-objects-DcFbd1Ka.mjs → durable-objects-tOJy-5te.mjs} +1 -1
  89. package/dist/{email-auth-BEgDxU-g.mjs → email-auth-Bq9sq_2j.mjs} +1 -1
  90. package/dist/{email-routing-DKWmPOVo.mjs → email-routing-CYo4dp50.mjs} +1 -1
  91. package/dist/{email-security-RWbAp8qa.mjs → email-security-CNtWET2d.mjs} +1 -1
  92. package/dist/{email-sending-BbJy_vl8.mjs → email-sending-BvagNLRr.mjs} +1 -1
  93. package/dist/errors-DpbAQQv8.mjs +11 -0
  94. package/dist/{field-extractors-Bob6udAc.mjs → field-extractors-C9R3Qivh.mjs} +1 -1
  95. package/dist/{firewall-DziiEsR8.mjs → firewall-DsgUY-Qv.mjs} +1 -1
  96. package/dist/{flagship-xOtgddUK.mjs → flagship-geGDHp9H.mjs} +1 -1
  97. package/dist/{fraud-BUS7i5Yh.mjs → fraud-24l8dKyk.mjs} +1 -1
  98. package/dist/{google-tag-gateway-DgSzyeK-.mjs → google-tag-gateway-CAkudP5W.mjs} +1 -1
  99. package/dist/{healthchecks-CbD2PsnM.mjs → healthchecks-CEGMe3lO.mjs} +1 -1
  100. package/dist/{hyperdrive-Cs_cfSXU.mjs → hyperdrive-DLDaOU2O.mjs} +1 -1
  101. package/dist/{iam-DvsCztqU.mjs → iam-ChldOMSL.mjs} +1 -1
  102. package/dist/{images-BipVjHNw.mjs → images-Ba9tS5wT.mjs} +1 -1
  103. package/dist/index.mjs +1 -1
  104. package/dist/{init-LvFgCsNX.mjs → init-C08hBFYn.mjs} +1 -1
  105. package/dist/{intel-D1LPkkBM.mjs → intel-DbLRah4Y.mjs} +1 -1
  106. package/dist/{ips-2iUGs8ws.mjs → ips-BGyzyQLL.mjs} +1 -1
  107. package/dist/{k2-DGzRm3NJ.mjs → k2-BVQ3MqEl.mjs} +1 -1
  108. package/dist/{kv-BW-s9MJY.mjs → kv-Cd8vbPWK.mjs} +1 -1
  109. package/dist/{lazy-command-Bq-rWPQe.mjs → lazy-command-D0I6itZs.mjs} +1 -1
  110. package/dist/{leaked-credential-checks-CnY6ih6p.mjs → leaked-credential-checks-Dga83Qy3.mjs} +1 -1
  111. package/dist/{load-balancers-CtnusAzP.mjs → load-balancers-D9cB6of8.mjs} +1 -1
  112. package/dist/{local-B4sZZTRA.mjs → local-B7ZJ78al.mjs} +1 -1
  113. package/dist/local-CFZtOOxg.mjs +2 -0
  114. package/dist/{local-runtime-DoBuyriC.mjs → local-runtime-DB545Gqq.mjs} +1 -1
  115. package/dist/log-CRbgNbDp.mjs +3 -0
  116. package/dist/login-C3Bahro9.mjs +5 -0
  117. package/dist/login-DvsRxI3E.mjs +2 -0
  118. package/dist/{logo-matches-C1-6KOkZ.mjs → logo-matches-jeNkUxAq.mjs} +1 -1
  119. package/dist/{logos-Yzhd-VKb.mjs → logos-pxN5aumY.mjs} +1 -1
  120. package/dist/{logpush-JYG4gXZ-.mjs → logpush-Ccmr0Y_I.mjs} +1 -1
  121. package/dist/{logs-DLblEjK0.mjs → logs-CZBMuuBC.mjs} +1 -1
  122. package/dist/{magic-cloud-networking-CblQwsQr.mjs → magic-cloud-networking-BwOxZVql.mjs} +1 -1
  123. package/dist/{magic-network-monitoring-D2px4Ep4.mjs → magic-network-monitoring-Cx5kKdbk.mjs} +1 -1
  124. package/dist/{magic-transit-Bnwsi0UQ.mjs → magic-transit-BJwg3sVK.mjs} +1 -1
  125. package/dist/{managed-defense-CTtNoxzW.mjs → managed-defense-C_KLy4oB.mjs} +1 -1
  126. package/dist/{managed-transforms-B92mJi5i.mjs → managed-transforms-C-HMtesC.mjs} +1 -1
  127. package/dist/{matches-CzbL1XD-.mjs → matches-DnjBnG-Y.mjs} +1 -1
  128. package/dist/{mcp-Cic_aMer.mjs → mcp-bGKgzz6F.mjs} +1 -1
  129. package/dist/{mesh-DZTgD16C.mjs → mesh-DeQIll19.mjs} +1 -1
  130. package/dist/migrate-B6HsPeFh.mjs +2 -0
  131. package/dist/{monetization-DCQ2_niU.mjs → monetization-B-TIrpA5.mjs} +1 -1
  132. package/dist/{network-BqMqD2qn.mjs → network-BrjykU-I.mjs} +1 -1
  133. package/dist/{network-interconnects-BFQ1yARl.mjs → network-interconnects-I06kbxIl.mjs} +1 -1
  134. package/dist/{o11y-CS5q1vSh.mjs → o11y-Ba0Fa98_.mjs} +3 -3
  135. package/dist/oauth-BH-uQd3C.mjs +2 -0
  136. package/dist/oauth-Cf3-g-kk.mjs +4 -0
  137. package/dist/{oauth-clients-9BPswYm_.mjs → oauth-clients-Dd5gvDqf.mjs} +1 -1
  138. package/dist/{oauth-scopes-CLOKfQi2.mjs → oauth-scopes-CXpH3Syj.mjs} +1 -1
  139. package/dist/{organization-DFRN2g6z.mjs → organization-DKPqwe3j.mjs} +1 -1
  140. package/dist/{organizations-yiGopnKf.mjs → organizations-Cq4iy-Yr.mjs} +1 -1
  141. package/dist/{origin-post-quantum-encryption-n9gsxikn.mjs → origin-post-quantum-encryption-DSB1sbYV.mjs} +1 -1
  142. package/dist/output-CpiIVa7Q.mjs +2 -0
  143. package/dist/{page-rules-F1Jdxx6A.mjs → page-rules-CDWTYaf7.mjs} +1 -1
  144. package/dist/{pages-CezC0YrR.mjs → pages-Dgtm51Uj.mjs} +2 -2
  145. package/dist/{pay-per-crawl-fZ-kTBbN.mjs → pay-per-crawl-CHenxdhv.mjs} +1 -1
  146. package/dist/{pay-per-use-B14BTKVI.mjs → pay-per-use-Bd5l0hBi.mjs} +1 -1
  147. package/dist/{pipelines-BN7ydBHl.mjs → pipelines-GsyD6nUM.mjs} +5 -5
  148. package/dist/{precursor-B88RDDZT.mjs → precursor-mO-Zua09.mjs} +1 -1
  149. package/dist/{previews-CiqRIq_k.mjs → previews-oHUiD54J.mjs} +4 -4
  150. package/dist/{progress-CdlDthXA.mjs → progress-B1dpmxCT.mjs} +1 -1
  151. package/dist/{prompt-1AC-qwxS.mjs → prompt-Y5OBwDVE.mjs} +1 -1
  152. package/dist/{queries-C2sgUI9j.mjs → queries-CS0sYfte.mjs} +1 -1
  153. package/dist/{queues-DCP5x-PZ.mjs → queues-D8cAr2lB.mjs} +1 -1
  154. package/dist/{r2-D7UhzWR7.mjs → r2-CJiJbG6b.mjs} +1 -1
  155. package/dist/{radar-osOiFeY_.mjs → radar-PUZ_PCZ8.mjs} +1 -1
  156. package/dist/{raw-fetch-1VlXDwwX.mjs → raw-fetch-DSdFjojI.mjs} +1 -1
  157. package/dist/{realtime-DCnqxiWo.mjs → realtime-X6uQsldp.mjs} +1 -1
  158. package/dist/{registrar-DAFYjjRa.mjs → registrar-BqZdUTss.mjs} +1 -1
  159. package/dist/{registrar-sandbox-zeNHABZ0.mjs → registrar-sandbox-CmM3e1QN.mjs} +1 -1
  160. package/dist/{registry-DG4ZiuN9.mjs → registry-D0tMkLv6.mjs} +1 -1
  161. package/dist/{reporting-KehV_PXm.mjs → reporting-DFVz98Xg.mjs} +1 -1
  162. package/dist/{request-headers-ojAw3pQO.mjs → request-headers-Bg8_Idw3.mjs} +1 -1
  163. package/dist/{request-tracers-BStCgh6m.mjs → request-tracers-BC1u2WDU.mjs} +1 -1
  164. package/dist/{resource-sharing-3xtSgWG7.mjs → resource-sharing-CdEn5Iex.mjs} +1 -1
  165. package/dist/{rules-7F-G2Bg_.mjs → rules-B663VetJ.mjs} +1 -1
  166. package/dist/{rulesets-B0YtS2br.mjs → rulesets-p4EijVr6.mjs} +1 -1
  167. package/dist/{rum-B3V6tqS-.mjs → rum-CHHXe4KK.mjs} +1 -1
  168. package/dist/{run-B_07PrkW.mjs → run-0EozpORq.mjs} +1 -1
  169. package/dist/run-DKg70Sqf.mjs +2 -0
  170. package/dist/{schema-C-tyhSnb.mjs → schema-B38ojvsS.mjs} +1 -1
  171. package/dist/{schema-flags-DY3OKCvr.mjs → schema-flags-z7yn0JZ_.mjs} +3 -3
  172. package/dist/{scim-CQ9TdajH.mjs → scim-BMnUa4Oz.mjs} +1 -1
  173. package/dist/{secrets-store-Dl2hDxXu.mjs → secrets-store-EYrhEzVG.mjs} +1 -1
  174. package/dist/{security-insights-BsLMdo1r.mjs → security-insights-C-AwDwXb.mjs} +1 -1
  175. package/dist/{security-txt-pCAiHvys.mjs → security-txt-CQMe8TD3.mjs} +1 -1
  176. package/dist/{session-BsNzFtPi.mjs → session-3DgztoAI.mjs} +1 -1
  177. package/dist/shared-o8saqcSK.mjs +2 -0
  178. package/dist/{smart-shield-BTXQsVxz.mjs → smart-shield-CHSuitaH.mjs} +1 -1
  179. package/dist/{snippets-CYVieyc3.mjs → snippets-DGSBz4lg.mjs} +1 -1
  180. package/dist/{spawn-Bdznd0EB.mjs → spawn-BZd__5sj.mjs} +1 -1
  181. package/dist/{spectrum-DLRr4Q03.mjs → spectrum-59LhYG1t.mjs} +1 -1
  182. package/dist/{speed-BJfaDYxz.mjs → speed-CMCfoG3s.mjs} +1 -1
  183. package/dist/{sql-DQ4xrdc2.mjs → sql-MxWaTDdj.mjs} +1 -1
  184. package/dist/src-J3Yss3VM.mjs +117 -0
  185. package/dist/{ssl-CL1B69Pw.mjs → ssl-DTTFZR9x.mjs} +1 -1
  186. package/dist/startup-profile-DJsOtbVN.mjs +2 -0
  187. package/dist/{startup-profile-HMblAiBi.mjs → startup-profile-bp348qmf.mjs} +1 -1
  188. package/dist/{state-DN9yfd2C.mjs → state-CqAtTENS.mjs} +1 -1
  189. package/dist/state-Dvzl3aSj.mjs +2 -0
  190. package/dist/{stream-DrMZOO5u.mjs → stream-gVG_7si-.mjs} +1 -1
  191. package/dist/{submit-DjlLoVk2.mjs → submit-wJYcQB8d.mjs} +1 -1
  192. package/dist/{tags-DY7Ur1k-.mjs → tags-BwFKjaOr.mjs} +1 -1
  193. package/dist/telemetry-BczXOpQn.mjs +2 -0
  194. package/dist/{telemetry-BG3kcYsV.mjs → telemetry-CE15pfOU.mjs} +1 -1
  195. package/dist/{tenant-BEMfNMjO.mjs → tenant-Qv_PC8gW.mjs} +1 -1
  196. package/dist/{tenant-custom-nameservers-CCRbb0ch.mjs → tenant-custom-nameservers-DBmmUcxn.mjs} +1 -1
  197. package/dist/{tools-ZffhHUDd.mjs → tools-B1ajcUAF.mjs} +1 -1
  198. package/dist/{tunnels-_JXe-UgM.mjs → tunnels-CHNKPYRV.mjs} +2 -2
  199. package/dist/{turnstile-DXEfneQq.mjs → turnstile-C60RxPo2.mjs} +1 -1
  200. package/dist/ui-CBhKUPys.mjs +2 -0
  201. package/dist/{update-check-DfbYVefm.mjs → update-check-BHarE3V9.mjs} +1 -1
  202. package/dist/{update-check-atcehhBC.mjs → update-check-C3RhhXja.mjs} +1 -1
  203. package/dist/update-check-worker.mjs +1 -1
  204. package/dist/{url-info-B1kL9asc.mjs → url-info-By6VD20A.mjs} +1 -1
  205. package/dist/{url-normalization-CUHKRKJh.mjs → url-normalization-3t6Xpafi.mjs} +1 -1
  206. package/dist/{url-scanner-OnZP_-jm.mjs → url-scanner-DNG__DiK.mjs} +1 -1
  207. package/dist/{user-BBBuFNj4.mjs → user-B4i7OIFK.mjs} +1 -1
  208. package/dist/{vectorize-DcctB8bw.mjs → vectorize-y3PCQDDf.mjs} +1 -1
  209. package/dist/version-izjB0Yrl.mjs +2 -0
  210. package/dist/{waiting-rooms-JaFE5wP1.mjs → waiting-rooms-xkZLvPkT.mjs} +1 -1
  211. package/dist/{web-assets-Cu0swUPe.mjs → web-assets-BlqHZywy.mjs} +1 -1
  212. package/dist/{web3-C67z4OtQ.mjs → web3-DGAJMcLv.mjs} +1 -1
  213. package/dist/{workers-builds-C5wKhvKe.mjs → workers-builds-COKp3NfU.mjs} +1 -1
  214. package/dist/{workers-ClTP0Ysl.mjs → workers-cCNBx0Bc.mjs} +22 -22
  215. package/dist/{workers-for-platforms-rxwkYyb3.mjs → workers-for-platforms-CAtiWI_G.mjs} +1 -1
  216. package/dist/{workers-vpc-B4vyvr1W.mjs → workers-vpc-ChBfXwPy.mjs} +1 -1
  217. package/dist/{workflows-COJ5jwvk.mjs → workflows-BYhgJvyR.mjs} +1 -1
  218. package/dist/{wrangler-migration-Cp546RDG.mjs → wrangler-migration-B12OR2bu.mjs} +1 -1
  219. package/dist/{zaraz-BkZ7yW05.mjs → zaraz-BW0kvRCK.mjs} +1 -1
  220. package/dist/{zero-trust-lUFLYuL1.mjs → zero-trust-DSeWXkNV.mjs} +1 -1
  221. package/dist/{zone-CC1_qxt-.mjs → zone-B-YJG2UA.mjs} +1 -1
  222. package/dist/{zones-BRiLlTmW.mjs → zones-B8pqPHu8.mjs} +1 -1
  223. package/package.json +12 -12
  224. package/dist/auth-5cgi8ePZ.mjs +0 -2
  225. package/dist/auth-BaUNb1Ed.mjs +0 -2
  226. package/dist/auth-ChYOc_rS.mjs +0 -2
  227. package/dist/auth-token-B1pP2jaK.mjs +0 -8
  228. package/dist/blocks-CKb_aLWN.mjs +0 -5
  229. package/dist/build-CMPlf8mh.mjs +0 -2
  230. package/dist/build-DQZ2w_dQ.mjs +0 -2
  231. package/dist/command-CFV1cqfR.mjs +0 -2
  232. package/dist/local-DCnFIgLJ.mjs +0 -2
  233. package/dist/login-CqZJgUF1.mjs +0 -5
  234. package/dist/login-DR60WiAY.mjs +0 -2
  235. package/dist/migrate-DtNDRcAI.mjs +0 -2
  236. package/dist/oauth-DPLYUvRl.mjs +0 -2
  237. package/dist/oauth-DdYSPYoE.mjs +0 -4
  238. package/dist/output-O6b9MR9R.mjs +0 -2
  239. package/dist/run-D6AJfZT-.mjs +0 -2
  240. package/dist/shared-CWBjMZDR.mjs +0 -2
  241. package/dist/src-BnMvFE3q.mjs +0 -125
  242. package/dist/startup-profile-DuaJFX1y.mjs +0 -2
  243. package/dist/state-DePlO0Kv.mjs +0 -2
  244. package/dist/telemetry-Dpm6GfZD.mjs +0 -2
  245. package/dist/ui-CY79jlGZ.mjs +0 -2
  246. package/dist/version-CLgSHoNm.mjs +0 -2
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BaUNb1Ed.mjs";import{t as n}from"./output-O6b9MR9R.mjs";import{t as r}from"./dry-run-DQmFkNK_.mjs";import{t as i}from"./progress-CdlDthXA.mjs";import{t as a}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as o,t as s}from"./body-parser-ChnyBsfm.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l,n as u}from"./prompt-1AC-qwxS.mjs";var d={method:`POST`,path:t=>e`/tenants/${t.tenant_tag}/custom_ns`,body:`json`};function f(e){return e.usage(`$0 tenant-custom-nameservers create <tenant-tag>
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BUQscD5b.mjs";import{t as n}from"./output-CpiIVa7Q.mjs";import{t as r}from"./dry-run-BBjUQUhR.mjs";import{t as i}from"./progress-B1dpmxCT.mjs";import{t as a}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{n as o,t as s}from"./body-parser-ChnyBsfm.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l,n as u}from"./prompt-Y5OBwDVE.mjs";var d={method:`POST`,path:t=>e`/tenants/${t.tenant_tag}/custom_ns`,body:`json`};function f(e){return e.usage(`$0 tenant-custom-nameservers create <tenant-tag>
3
3
 
4
4
  Adds a custom nameserver for a tenant.`).positional(`tenant-tag`,{type:`string`,description:`Tenant identifier tag.`,demandOption:!0}).option(`ns-name`,{type:`string`,description:`The FQDN of the name server.`}).option(`ns-set`,{type:`number`,description:`The number of the set that this name server belongs to.`,default:1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`create <tenant-tag>`,describe:`Add Tenant Custom Nameserver`,builder:f,handler:async e=>a({command:`tenant-custom-nameservers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf tenant-custom-nameservers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/tenants/${e[`tenant-tag`]==null?`<tenant-tag>`:encodeURIComponent(String(e[`tenant-tag`]))}/custom_ns`,pathParams:{"tenant-tag":String(e[`tenant-tag`]??``)},bodyKind:`json`,body:e.body===void 0?s({ns_name:c(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}):o(e.body)});return}let a=await t(e);if(e.body){let t=o(e.body),r=await i(`Creating`,async()=>a.send(d,{body:t,tenant_tag:e[`tenant-tag`]}));n(r,{successLabel:`Created`});return}e[`ns-name`]===void 0&&(e[`ns-name`]=await l(`ns-name`,`The FQDN of the name server.`));let u=s({ns_name:c(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}),f=await i(`Creating`,async()=>a.send(d,{body:u,tenant_tag:e[`tenant-tag`]}));n(f,{successLabel:`Created`})})};var m={method:`DELETE`,path:t=>e`/tenants/${t.tenant_tag}/custom_ns/${t.custom_ns_id}`};function h(e){return e.usage(`$0 tenant-custom-nameservers delete <custom-ns-id>
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,t}from"./metadata-Df5kCWJv.mjs";import{t as n}from"./output-O6b9MR9R.mjs";function r(e){return e.replace(/[\s-]+/g,`_`)}function i(e){let t={type:e.type,description:e.description};return`default`in e&&e.default!==void 0&&(t.default=e.default),e.enum&&e.enum.length>0&&(t.enum=e.enum),t}function a(e){let t={},n=[];for(let r of e.arguments)t[r.name]=i(r),r.required&&n.push(r.name);for(let r of e.options)t[r.name]=i(r),r.required&&n.push(r.name);return{name:r(e.command),description:e.description,inputSchema:{type:`object`,properties:t,required:n}}}const o={command:`tools`,describe:!1,builder:e=>e,handler:async r=>{let i=e(import.meta.url,`commands.json`,t)?.commands??null;if(i===null){console.error(`Warning: Command metadata file not found. Run the build to generate it.`),n({version:`1.0`,tools:[]});return}let o={version:`1.0`,tools:i.map(a)};n(o)}};export{o as default};
2
+ import{n as e,t}from"./metadata-Df5kCWJv.mjs";import{t as n}from"./output-CpiIVa7Q.mjs";function r(e){return e.replace(/[\s-]+/g,`_`)}function i(e){let t={type:e.type,description:e.description};return`default`in e&&e.default!==void 0&&(t.default=e.default),e.enum&&e.enum.length>0&&(t.enum=e.enum),t}function a(e){let t={},n=[];for(let r of e.arguments)t[r.name]=i(r),r.required&&n.push(r.name);for(let r of e.options)t[r.name]=i(r),r.required&&n.push(r.name);return{name:r(e.command),description:e.description,inputSchema:{type:`object`,properties:t,required:n}}}const o={command:`tools`,describe:!1,builder:e=>e,handler:async r=>{let i=e(import.meta.url,`commands.json`,t)?.commands??null;if(i===null){console.error(`Warning: Command metadata file not found. Run the build to generate it.`),n({version:`1.0`,tools:[]});return}let o={version:`1.0`,tools:i.map(a)};n(o)}};export{o as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./lazy-command-Bq-rWPQe.mjs";import"./api-eMuS5GI1.mjs";import{t}from"./path-DRw6Y-nd.mjs";import{t as n}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as r}from"./local-B4sZZTRA.mjs";import{n as i}from"./auth-BaUNb1Ed.mjs";import{a,t as o}from"./context-BQ6KeMgq.mjs";import{t as s}from"./output-O6b9MR9R.mjs";import{t as c}from"./dry-run-DQmFkNK_.mjs";import{t as l}from"./progress-CdlDthXA.mjs";import{t as u}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as d,n as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-1AC-qwxS.mjs";import{t as _}from"./create-OXylMu6m.mjs";import{t as v}from"./get-iPUHxD1r.mjs";var y={method:`GET`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/configurations`};function b(e){return e.usage(`$0 tunnels config get <tunnel-id>
2
+ import{t as e}from"./lazy-command-D0I6itZs.mjs";import"./api-eMuS5GI1.mjs";import{t}from"./path-DRw6Y-nd.mjs";import{t as n}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as r}from"./local-B7ZJ78al.mjs";import{n as i}from"./auth-BUQscD5b.mjs";import{a,t as o}from"./context-Sgba0fZP.mjs";import{t as s}from"./output-CpiIVa7Q.mjs";import{t as c}from"./dry-run-BBjUQUhR.mjs";import{t as l}from"./progress-B1dpmxCT.mjs";import{t as u}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{a as d,n as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-Y5OBwDVE.mjs";import{t as _}from"./create-OXylMu6m.mjs";import{t as v}from"./get-iPUHxD1r.mjs";var y={method:`GET`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/configurations`};function b(e){return e.usage(`$0 tunnels config get <tunnel-id>
3
3
 
4
4
  Retrieves the configuration for a remotely managed Cloudflare Tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <tunnel-id>`,describe:`Get Tunnel configuration`,builder:b,handler:async e=>u({command:`tunnels config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();e.accountId=n;let u=await l(`Loading`,async()=>t.send(y,{account_id:n,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Loaded`})})};var x={method:`PUT`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/configurations`,body:`json`};function S(e){return e.usage(`$0 tunnels config update <tunnel-id>
5
5
 
@@ -26,4 +26,4 @@ Lists and filters all types of Tunnels in an account.`).option(`name`,{type:`str
26
26
 
27
27
  Creates a short-lived management token for the requested Tunnel management resources, such as streaming logs. Treat the token as a secret.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`resources`,{type:`string`,array:!0,description:`The resources field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Z={command:`create <tunnel-id>`,describe:`Get a Cloudflare Tunnel management token`,builder:X,handler:async e=>u({command:`tunnels management-token create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels management-token create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/management`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({resources:e.resources}):f(e.body)});return}let t=await i(e),n=e.local?r:await o();if(e.accountId=n,e.body){let r=f(e.body),i=await l(`Creating`,async()=>t.send(_,{body:r,account_id:n,tunnel_id:e[`tunnel-id`]}));s(i,{successLabel:`Created`});return}if(e.resources===void 0)throw Error(`--resources is required (or pass --body with this field set).`);let u=p({resources:e.resources}),d=await l(`Creating`,async()=>t.send(_,{body:u,account_id:n,tunnel_id:e[`tunnel-id`]}));s(d,{successLabel:`Created`})})},Q={command:`management-token`,describe:`Operations for management-token`,builder:e=>e.command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(e){return e.usage(`$0 tunnels token get <tunnel-id>
28
28
 
29
- Retrieves the token used to run cloudflared and associate it with a specific Cloudflare Tunnel. Treat the token as a secret.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <tunnel-id>`,describe:`Get a Cloudflare Tunnel token`,builder:ne,handler:async e=>u({command:`tunnels token get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/token`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();e.accountId=n;let u=await l(`Loading`,async()=>t.send(v,{account_id:n,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Loaded`})})},ie={command:`token`,describe:`Operations for token`,builder:e=>e.command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ae=e(`diag`,`Create a diagnostic report from a local cloudflared instance.`,()=>import(`./command-F0jlqvKr.mjs`),{command:`tunnels diag`,recordArgs:!1}),oe=e(`login`,`Authorize cloudflared and download an origin certificate for locally managed tunnels.`,()=>import(`./command-ChQXv0jP.mjs`),{command:`tunnels login`,recordArgs:!1}),$=e(`quick-start <url>`,`Expose a local URL with a temporary trycloudflare.com tunnel. The tunnel remains active until cf exits.`,()=>import(`./command-D5BUzDX8.mjs`),{command:`tunnels quick-start`,recordArgs:!1}),se=e(`ready`,`Check the /ready endpoint exposed by a local cloudflared instance.`,()=>import(`./command-DlB10kIb.mjs`),{command:`tunnels ready`,recordArgs:!1}),ce=e(`run [tunnel]`,`Run a named Cloudflare Tunnel using the cf-managed cloudflared binary.`,()=>import(`./command-C0nJ2LRd.mjs`),{command:`tunnels run`,recordArgs:!1}),le=e(`tail [tunnel-id]`,`Stream logs from a remote cloudflared instance.`,()=>import(`./command-yAXk5NXh.mjs`),{command:`tunnels tail`,recordArgs:!1});const ue={command:`tunnels`,describe:`tunnels`,builder:e=>e.command(R).command(te).command(n(ae,`preview`)).command(U).command(K).command(Y).command(n(oe,`preview`)).command(n($,`preview`)).command(n(se,`preview`)).command(n(ce,`preview`)).command(n(le,`preview`)).command(w).command(j).command(F).command(Q).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ue as default};
29
+ Retrieves the token used to run cloudflared and associate it with a specific Cloudflare Tunnel. Treat the token as a secret.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <tunnel-id>`,describe:`Get a Cloudflare Tunnel token`,builder:ne,handler:async e=>u({command:`tunnels token get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/token`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();e.accountId=n;let u=await l(`Loading`,async()=>t.send(v,{account_id:n,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Loaded`})})},ie={command:`token`,describe:`Operations for token`,builder:e=>e.command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ae=e(`diag`,`Create a diagnostic report from a local cloudflared instance.`,()=>import(`./command-BVO9UOuU.mjs`),{command:`tunnels diag`,recordArgs:!1}),oe=e(`login`,`Authorize cloudflared and download an origin certificate for locally managed tunnels.`,()=>import(`./command-DuLxEkGq.mjs`),{command:`tunnels login`,recordArgs:!1}),$=e(`quick-start <url>`,`Expose a local URL with a temporary trycloudflare.com tunnel. The tunnel remains active until cf exits.`,()=>import(`./command-0WS5I_JW.mjs`),{command:`tunnels quick-start`,recordArgs:!1}),se=e(`ready`,`Check the /ready endpoint exposed by a local cloudflared instance.`,()=>import(`./command-BONLLcyz.mjs`),{command:`tunnels ready`,recordArgs:!1}),ce=e(`run [tunnel]`,`Run a named Cloudflare Tunnel using the cf-managed cloudflared binary.`,()=>import(`./command-DOpykk8X.mjs`),{command:`tunnels run`,recordArgs:!1}),le=e(`tail [tunnel-id]`,`Stream logs from a remote cloudflared instance.`,()=>import(`./command-CPDQPdss.mjs`),{command:`tunnels tail`,recordArgs:!1});const ue={command:`tunnels`,describe:`tunnels`,builder:e=>e.command(R).command(te).command(n(ae,`preview`)).command(U).command(K).command(Y).command(n(oe,`preview`)).command(n($,`preview`)).command(n(se,`preview`)).command(n(ce,`preview`)).command(n(le,`preview`)).command(w).command(j).command(F).command(Q).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ue as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-1AC-qwxS.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/challenges/widgets`,query:[`page`,`per_page`,`order`,`direction`,`filter`],body:`json`};function g(e){return e.usage(`$0 turnstile widgets create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B7ZJ78al.mjs";import{n}from"./auth-BUQscD5b.mjs";import{a as r,t as i}from"./context-Sgba0fZP.mjs";import{t as a}from"./output-CpiIVa7Q.mjs";import{t as o}from"./dry-run-BBjUQUhR.mjs";import{t as s}from"./progress-B1dpmxCT.mjs";import{t as c}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-Y5OBwDVE.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/challenges/widgets`,query:[`page`,`per_page`,`order`,`direction`,`filter`],body:`json`};function g(e){return e.usage(`$0 turnstile widgets create
3
3
 
4
4
  Creates a Turnstile widget for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`order`,{type:`string`,description:`Field to order widgets by.`,choices:[`id`,`sitekey`,`name`,`created_on`,`modified_on`]}).option(`direction`,{type:`string`,description:`Direction to order widgets.`,choices:[`asc`,`desc`]}).option(`filter`,{type:`string`,description:"Filter widgets by field. The `name` field uses case-insensitive\nsubstring matching; `sitekey` uses exact matching.\nFormat: `field:value`\n\nSupported fields:\n- `name` - Filter by widget name (e.g., `filter=name:login-form`)\n- `sitekey` - Filter by sitekey (e.g., `filter=sitekey:0x4AAA`)\n\nReturns 400 Bad Request if the field is unsupported or format is invalid.\nAn empty filter value returns all results."}).option(`bot-fight-mode`,{type:`boolean`,description:`If bot_fight_mode is set to \`true\`, Cloudflare issues computationally
5
5
  expensive challenges in response to malicious bots (ENT only).
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import"./theme-BGHWSKCw.mjs";import"./blocks-CFAm0Ma3.mjs";export{};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export{n as getUpdateNotice,r as maybeStartBackgroundUpdateCheck}from"./update-check-atcehhBC.mjs";
2
+ export{n as getUpdateNotice,r as maybeStartBackgroundUpdateCheck}from"./update-check-C3RhhXja.mjs";
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,n as t}from"./source-AlTrHNem.mjs";import{n}from"./version-CLgSHoNm.mjs";import{i as r}from"./cf-PISMdEje.mjs";import{r as i,t as a}from"./gt-D6YemCLh.mjs";import{closeSync as o,mkdirSync as s,openSync as c,readFileSync as l,renameSync as u,statSync as d,unlinkSync as f,writeFileSync as p}from"node:fs";import{dirname as m,join as h}from"node:path";import{fileURLToPath as g}from"node:url";import{spawn as _}from"node:child_process";var v=/* @__PURE__ */ t(((e,t)=>{let n=i();t.exports=(e,t)=>new n(e,t).major})),y=/* @__PURE__ */ t(((e,t)=>{let n=i();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),b=/* @__PURE__ */ t(((e,t)=>{let n=y();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),x=/* @__PURE__ */ t(((e,t)=>{let n=y();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),S=/* @__PURE__ */ e(a(),1),C=/* @__PURE__ */ e(v(),1),w=/* @__PURE__ */ e(b(),1),T=/* @__PURE__ */ e(x(),1);const E=864e5;function D(e){return(0,w.default)(e)?.includes(`beta`)?`beta`:`latest`}function O(e=n){return h(r(),`cache`,`update-check-${D(e)}.json`)}function k(e=O()){try{let t=JSON.parse(l(e,`utf8`));if(typeof t!=`object`||!t||Array.isArray(t))return{};let n=t;return{lastAttemptedAt:typeof n.lastAttemptedAt==`number`&&Number.isFinite(n.lastAttemptedAt)?n.lastAttemptedAt:void 0,lastSuccessfulAt:typeof n.lastSuccessfulAt==`number`&&Number.isFinite(n.lastSuccessfulAt)?n.lastSuccessfulAt:void 0,latestVersion:typeof n.latestVersion==`string`&&(0,T.default)(n.latestVersion)?n.latestVersion:void 0}}catch{return{}}}function A(e,t=O()){let n=`${t}.${process.pid}.tmp`;try{return s(m(t),{recursive:!0}),p(n,`${JSON.stringify(e)}\n`,{encoding:`utf8`,mode:384}),u(n,t),!0}catch{try{f(n)}catch{}return!1}}function j(e,t,n){let r=`${e}.lock`,i;try{s(m(e),{recursive:!0});try{i=c(r,`wx`,384)}catch{try{if(t-d(r).mtimeMs<=5e3)return;f(r),i=c(r,`wx`,384)}catch{return}}return n()}catch{return}finally{if(i!==void 0)try{o(i),f(r)}catch{}}}function M(e,t){if(!(0,T.default)(e)||!t.latestVersion||!(0,S.default)(t.latestVersion,e))return;let n=(0,C.default)(t.latestVersion)>(0,C.default)(e);return{latestVersion:t.latestVersion,isMajor:n}}function N(e,t=O(e)){return M(e,k(t))}function P(){let e=import.meta.url.endsWith(`.ts`),t=new URL(e?`../update-check-worker.ts`:`./update-check-worker.mjs`,import.meta.url),n=e?[...process.execArgv,g(t)]:[g(t)];_(process.execPath,n,{detached:!0,stdio:`ignore`,windowsHide:!0}).unref()}function F(e={}){let t=e.cachePath??O(e.currentVersion??n),r=e.now??Date.now();if(j(t,r,()=>{let e=k(t);return e.lastAttemptedAt!==void 0&&r-e.lastAttemptedAt<864e5?!1:A({...e,lastAttemptedAt:r},t)}))try{(e.spawnWorker??P)()}catch{}}async function I(e,t,r,i){if(!(0,T.default)(t))return{status:`failed`};let a=await i(`https://registry.npmjs.org/${encodeURIComponent(e)}/${r}`,{headers:{accept:`application/json`,"user-agent":`cf-cli/${n}`},signal:AbortSignal.timeout(3e3)});if(!a.ok)return{status:`failed`};let o=await a.json();if(typeof o!=`object`||!o||Array.isArray(o))return{status:`failed`};let s=o;return s.name!==e||typeof s.version!=`string`||!(0,T.default)(s.version)?{status:`failed`}:(0,S.default)(s.version,t)?{status:`update-available`,latest:s.version}:{status:`up-to-date`}}async function L(e={}){let t=e.currentVersion??n,r=e.cachePath??O(t),i=e.now??Date.now();try{let n=await(e.check??((t,n,r)=>I(t,n,r,e.fetch??globalThis.fetch)))(`cf`,t,`latest`);if(n.status===`failed`)return;let a=n.status===`update-available`?n.latest:t;if(!(0,T.default)(a))return;A({...k(r),latestVersion:a,lastSuccessfulAt:i},r)}catch{}}export{L as i,N as n,F as r,E as t};
2
+ import{i as e,n as t}from"./source-AlTrHNem.mjs";import{n}from"./version-izjB0Yrl.mjs";import{i as r}from"./cf-3vj8dGYz.mjs";import{r as i,t as a}from"./gt-D6YemCLh.mjs";import{closeSync as o,mkdirSync as s,openSync as c,readFileSync as l,renameSync as u,statSync as d,unlinkSync as f,writeFileSync as p}from"node:fs";import{dirname as m,join as h}from"node:path";import{fileURLToPath as g}from"node:url";import{spawn as _}from"node:child_process";var v=/* @__PURE__ */ t(((e,t)=>{let n=i();t.exports=(e,t)=>new n(e,t).major})),y=/* @__PURE__ */ t(((e,t)=>{let n=i();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),b=/* @__PURE__ */ t(((e,t)=>{let n=y();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),x=/* @__PURE__ */ t(((e,t)=>{let n=y();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),S=/* @__PURE__ */ e(a(),1),C=/* @__PURE__ */ e(v(),1),w=/* @__PURE__ */ e(b(),1),T=/* @__PURE__ */ e(x(),1);const E=864e5;function D(e){return(0,w.default)(e)?.includes(`beta`)?`beta`:`latest`}function O(e=n){return h(r(),`cache`,`update-check-${D(e)}.json`)}function k(e=O()){try{let t=JSON.parse(l(e,`utf8`));if(typeof t!=`object`||!t||Array.isArray(t))return{};let n=t;return{lastAttemptedAt:typeof n.lastAttemptedAt==`number`&&Number.isFinite(n.lastAttemptedAt)?n.lastAttemptedAt:void 0,lastSuccessfulAt:typeof n.lastSuccessfulAt==`number`&&Number.isFinite(n.lastSuccessfulAt)?n.lastSuccessfulAt:void 0,latestVersion:typeof n.latestVersion==`string`&&(0,T.default)(n.latestVersion)?n.latestVersion:void 0}}catch{return{}}}function A(e,t=O()){let n=`${t}.${process.pid}.tmp`;try{return s(m(t),{recursive:!0}),p(n,`${JSON.stringify(e)}\n`,{encoding:`utf8`,mode:384}),u(n,t),!0}catch{try{f(n)}catch{}return!1}}function j(e,t,n){let r=`${e}.lock`,i;try{s(m(e),{recursive:!0});try{i=c(r,`wx`,384)}catch{try{if(t-d(r).mtimeMs<=5e3)return;f(r),i=c(r,`wx`,384)}catch{return}}return n()}catch{return}finally{if(i!==void 0)try{o(i),f(r)}catch{}}}function M(e,t){if(!(0,T.default)(e)||!t.latestVersion||!(0,S.default)(t.latestVersion,e))return;let n=(0,C.default)(t.latestVersion)>(0,C.default)(e);return{latestVersion:t.latestVersion,isMajor:n}}function N(e,t=O(e)){return M(e,k(t))}function P(){let e=import.meta.url.endsWith(`.ts`),t=new URL(e?`../update-check-worker.ts`:`./update-check-worker.mjs`,import.meta.url),n=e?[...process.execArgv,g(t)]:[g(t)];_(process.execPath,n,{detached:!0,stdio:`ignore`,windowsHide:!0}).unref()}function F(e={}){let t=e.cachePath??O(e.currentVersion??n),r=e.now??Date.now();if(j(t,r,()=>{let e=k(t);return e.lastAttemptedAt!==void 0&&r-e.lastAttemptedAt<864e5?!1:A({...e,lastAttemptedAt:r},t)}))try{(e.spawnWorker??P)()}catch{}}async function I(e,t,r,i){if(!(0,T.default)(t))return{status:`failed`};let a=await i(`https://registry.npmjs.org/${encodeURIComponent(e)}/${r}`,{headers:{accept:`application/json`,"user-agent":`cf-cli/${n}`},signal:AbortSignal.timeout(3e3)});if(!a.ok)return{status:`failed`};let o=await a.json();if(typeof o!=`object`||!o||Array.isArray(o))return{status:`failed`};let s=o;return s.name!==e||typeof s.version!=`string`||!(0,T.default)(s.version)?{status:`failed`}:(0,S.default)(s.version,t)?{status:`update-available`,latest:s.version}:{status:`up-to-date`}}async function L(e={}){let t=e.currentVersion??n,r=e.cachePath??O(t),i=e.now??Date.now();try{let n=await(e.check??((t,n,r)=>I(t,n,r,e.fetch??globalThis.fetch)))(`cf`,t,`latest`);if(n.status===`failed`)return;let a=n.status===`update-available`?n.latest:t;if(!(0,T.default)(a))return;A({...k(r),latestVersion:a,lastSuccessfulAt:i},r)}catch{}}export{L as i,N as n,F as r,E as t};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./update-check-atcehhBC.mjs";await e();export{};
2
+ import{i as e}from"./update-check-C3RhhXja.mjs";await e();export{};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/brand-protection/url-info`};function u(e){return e.usage(`$0 url-info get
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B7ZJ78al.mjs";import{n}from"./auth-BUQscD5b.mjs";import{a as r,t as i}from"./context-Sgba0fZP.mjs";import{t as a}from"./output-CpiIVa7Q.mjs";import{t as o}from"./dry-run-BBjUQUhR.mjs";import{t as s}from"./progress-B1dpmxCT.mjs";import{t as c}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/brand-protection/url-info`};function u(e){return e.usage(`$0 url-info get
3
3
 
4
4
  Return submitted URLs based on ID`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Read submitted URLs by ID`,builder:u,handler:async e=>c({command:`url-info get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf url-info get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/brand-protection/url-info`,pathParams:{},bodyKind:`none`});return}let c=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>c.send(l,{account_id:u}));a(d,{successLabel:`Loaded`})})},f={command:`url-info`,describe:`url-info`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BaUNb1Ed.mjs";import{i as n}from"./context-BQ6KeMgq.mjs";import{t as r}from"./output-O6b9MR9R.mjs";import{t as i}from"./dry-run-DQmFkNK_.mjs";import{t as a}from"./progress-CdlDthXA.mjs";import{t as o}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{i as u,n as d}from"./prompt-1AC-qwxS.mjs";var f={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/url_normalization`,response:!1};function p(e){return e.usage(`$0 url-normalization delete
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BUQscD5b.mjs";import{i as n}from"./context-Sgba0fZP.mjs";import{t as r}from"./output-CpiIVa7Q.mjs";import{t as i}from"./dry-run-BBjUQUhR.mjs";import{t as a}from"./progress-B1dpmxCT.mjs";import{t as o}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{i as u,n as d}from"./prompt-Y5OBwDVE.mjs";var f={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/url_normalization`,response:!1};function p(e){return e.usage(`$0 url-normalization delete
3
3
 
4
4
  Deletes the URL Normalization settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const m={command:`delete`,describe:`Delete URL Normalization settings`,builder:p,handler:async e=>o({command:`url-normalization delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf url-normalization delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/url_normalization`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await d({force:!!e.force})){process.stderr.write(`Aborted.
5
5
  `);return}let c=await a(`Deleting`,async()=>o.send(f,{zone_id:s}));r(c,{successLabel:`Deleted`})})};var h={method:`GET`,path:t=>e`/zones/${t.zone_id}/url_normalization`};function g(e){return e.usage(`$0 url-normalization get
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as l,r as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p}from"./prompt-1AC-qwxS.mjs";import{n as m,t as h}from"./raw-fetch-1VlXDwwX.mjs";function g(e){return e.usage("$0 url-scanner responses get <response-id>\n\nReturns the raw response of the network request. Find the `response_id` in the `data.requests.response.hash`.").positional(`response-id`,{type:`string`,description:`Response hash.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get <response-id>`,describe:`Get raw response`,builder:g,handler:async e=>c({command:`url-scanner responses get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf url-scanner responses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/urlscanner/v2/responses/${e[`response-id`]==null?`<response-id>`:encodeURIComponent(String(e[`response-id`]))}`,pathParams:{"response-id":String(e[`response-id`]??``)},bodyKind:`none`});return}await n(e);let a=e.local?t:await i();e.accountId=a;let c=await s(`Loading`,async()=>h(`/accounts/${a}/urlscanner/v2/responses/${encodeURIComponent(String(e[`response-id`]))}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));m(c.toString(`utf-8`))})},v={command:`responses`,describe:`Raw HTTP response data captured during URL scans`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/urlscanner/v2/bulk`,body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function b(e){return e.usage(`$0 url-scanner scans bulk-create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B7ZJ78al.mjs";import{n}from"./auth-BUQscD5b.mjs";import{a as r,t as i}from"./context-Sgba0fZP.mjs";import{t as a}from"./output-CpiIVa7Q.mjs";import{t as o}from"./dry-run-BBjUQUhR.mjs";import{t as s}from"./progress-B1dpmxCT.mjs";import{t as c}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{n as l,r as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p}from"./prompt-Y5OBwDVE.mjs";import{n as m,t as h}from"./raw-fetch-DSdFjojI.mjs";function g(e){return e.usage("$0 url-scanner responses get <response-id>\n\nReturns the raw response of the network request. Find the `response_id` in the `data.requests.response.hash`.").positional(`response-id`,{type:`string`,description:`Response hash.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get <response-id>`,describe:`Get raw response`,builder:g,handler:async e=>c({command:`url-scanner responses get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf url-scanner responses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/urlscanner/v2/responses/${e[`response-id`]==null?`<response-id>`:encodeURIComponent(String(e[`response-id`]))}`,pathParams:{"response-id":String(e[`response-id`]??``)},bodyKind:`none`});return}await n(e);let a=e.local?t:await i();e.accountId=a;let c=await s(`Loading`,async()=>h(`/accounts/${a}/urlscanner/v2/responses/${encodeURIComponent(String(e[`response-id`]))}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));m(c.toString(`utf-8`))})},v={command:`responses`,describe:`Raw HTTP response data captured during URL scans`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/urlscanner/v2/bulk`,body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function b(e){return e.usage(`$0 url-scanner scans bulk-create
3
3
 
4
4
  Submit URLs to scan. Check limits at https://developers.cloudflare.com/security-center/investigate/scan-limits/ and take into account scans submitted in bulk have lower priority and may take longer to finish.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of urls to scan (up to a 100).`})}const x={command:`bulk-create`,describe:`Bulk create URL Scans`,builder:b,handler:async e=>c({command:`url-scanner scans bulk-create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf url-scanner scans bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/urlscanner/v2/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(y,{body:t,account_id:u}));a(n,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/urlscanner/v2/scan`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`,429:`TooManyRequestsError`}};function C(e){return e.usage(`$0 url-scanner scans create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./get-CRKvqCu6.mjs";import{n,o as r}from"./auth-BaUNb1Ed.mjs";import{t as i}from"./output-O6b9MR9R.mjs";import{t as a}from"./dry-run-DQmFkNK_.mjs";import{t as o}from"./progress-CdlDthXA.mjs";import{t as s}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as c,n as l,r as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-1AC-qwxS.mjs";var ee={method:`GET`,path:()=>`/user/audit_logs`,query:[`id`,`export`,`action.type`,`actor.ip`,`actor.email`,`since`,`before`,`zone.name`,`direction`,`per_page`,`page`,`hide_user_logs`]};function te(e){return e.usage(`$0 user audit-logs list
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./get-CRKvqCu6.mjs";import{n,o as r}from"./auth-BUQscD5b.mjs";import{t as i}from"./output-CpiIVa7Q.mjs";import{t as a}from"./dry-run-BBjUQUhR.mjs";import{t as o}from"./progress-B1dpmxCT.mjs";import{t as s}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{a as c,n as l,r as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-Y5OBwDVE.mjs";var ee={method:`GET`,path:()=>`/user/audit_logs`,query:[`id`,`export`,`action.type`,`actor.ip`,`actor.email`,`since`,`before`,`zone.name`,`direction`,`per_page`,`page`,`hide_user_logs`]};function te(e){return e.usage(`$0 user audit-logs list
3
3
 
4
4
  Gets a list of audit logs for a user account. Can be filtered by who made the change, on which zone, and the timeframe of the change.`).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`export`,{type:`boolean`,description:`Indicates that this request is an export of logs in CSV format.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-ip`,{type:`string`,description:`Filters by the IP address of the request that made the change by specific IP address or valid CIDR Range.`}).option(`actor-email`,{type:`string`,description:`Filters by the email address of the actor that made the change.`}).option(`since`,{type:`string`,description:`Since`}).option(`before`,{type:`string`,description:`Before`}).option(`zone-name`,{type:`string`,description:`Filters by the name of the zone associated to the change.`}).option(`direction`,{type:`string`,description:`Changes the direction of the chronological sorting.`,choices:[`desc`,`asc`]}).option(`per-page`,{type:`number`,description:`Sets the number of results to return per page.`}).option(`page`,{type:`number`,description:`Defines which page of results to return.`}).option(`hide-user-logs`,{type:`boolean`,description:`Indicates whether or not to hide user level audit logs.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`Get user audit logs`,builder:te,handler:async e=>s({command:`user audit-logs list`,classification:{safeFlags:[`export`,`direction`,`hide-user-logs`,`dry-run`]}},e,async()=>{let t={id:e.id,export:e.export,"action.type":e[`action-type`],"actor.ip":e[`actor-ip`],"actor.email":e[`actor-email`],since:e.since,before:e.before,"zone.name":e[`zone-name`],direction:e.direction,per_page:e[`per-page`],page:e.page,hide_user_logs:e[`hide-user-logs`]};if(e.dryRun){a({command:`cf user audit-logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/audit_logs`,pathParams:{},query:t,bodyKind:`none`});return}let r=await n(e),s=await o(`Loading`,async()=>r.send(ee,t));i(s,{successLabel:`Loaded`})})},ne={command:`audit-logs`,describe:`Operations for audit-logs`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var re={method:`GET`,path:()=>`/user/billing/history`,query:[`page`,`per_page`,`order`,`occurred_at`,`type`,`action`]};function ie(e){return e.usage(`$0 user billing history list
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{i as n,n as r}from"./auth-BaUNb1Ed.mjs";import{a as i,t as a}from"./context-BQ6KeMgq.mjs";import{t as o}from"./output-O6b9MR9R.mjs";import{t as s}from"./dry-run-DQmFkNK_.mjs";import{t as c}from"./progress-CdlDthXA.mjs";import{t as l}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as u,r as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-1AC-qwxS.mjs";var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/vectorize/v2/indexes`,body:`json`};function y(e){return e.usage(`$0 vectorize create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B7ZJ78al.mjs";import{i as n,n as r}from"./auth-BUQscD5b.mjs";import{a as i,t as a}from"./context-Sgba0fZP.mjs";import{t as o}from"./output-CpiIVa7Q.mjs";import{t as s}from"./dry-run-BBjUQUhR.mjs";import{t as c}from"./progress-B1dpmxCT.mjs";import{t as l}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{n as u,r as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-Y5OBwDVE.mjs";var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/vectorize/v2/indexes`,body:`json`};function y(e){return e.usage(`$0 vectorize create
3
3
 
4
4
  Creates and returns a new Vectorize Index.`).option(`index-config-dimensions`,{type:`number`,description:`Specifies the number of dimensions for the index`}).option(`index-config-metric`,{type:`string`,description:`Specifies the type of metric to use calculating distance.`,choices:[`cosine`,`euclidean`,`dot-product`]}).coerce(`index-config-metric`,e=>p(e,`index-config-metric`,`text`)).option(`index-config-preset`,{type:`string`,description:`Specifies the preset to use for the index.`,choices:[`@cf/baai/bge-small-en-v1.5`,`@cf/baai/bge-base-en-v1.5`,`@cf/baai/bge-large-en-v1.5`,`openai/text-embedding-ada-002`,`cohere/embed-multilingual-v2.0`]}).coerce(`index-config-preset`,e=>p(e,`index-config-preset`,`text`)).option(`description`,{type:`string`,description:`Specifies the description of the index.`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`index-config-dimensions`,[`index-config-preset`]).implies(`index-config-dimensions`,[`index-config-metric`]).conflicts(`index-config-metric`,[`index-config-preset`]).implies(`index-config-metric`,[`index-config-dimensions`]).conflicts(`index-config-preset`,[`index-config-dimensions`,`index-config-metric`])}const b={command:`create`,describe:`Create Vectorize Index`,builder:y,handler:async e=>l({command:`vectorize create`,classification:{safeFlags:[`index-config-metric`,`index-config-preset`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf vectorize create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vectorize/v2/indexes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({config:{dimensions:e[`index-config-dimensions`],metric:e[`index-config-metric`],preset:e[`index-config-preset`]},description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.send(v,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`The name field`));let d=f({config:{dimensions:e[`index-config-dimensions`],metric:e[`index-config-metric`],preset:e[`index-config-preset`]},description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`)}),m=await c(`Creating`,async()=>n.send(v,{body:d,account_id:l}));o(m,{successLabel:`Created`})})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/vectorize/v2/indexes/${t.index_name}/delete_by_ids`,body:`json`};function S(e){return e.usage(`$0 vectorize delete-by-ids <index-name>
5
5
 
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ const e=process.env.CLI_VERSION??`1.0.0-beta.20`,t=`cf-cli/${e}`;export{e as n,t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,i,t as a}from"./context-BQ6KeMgq.mjs";import{t as o}from"./output-O6b9MR9R.mjs";import{t as s}from"./dry-run-DQmFkNK_.mjs";import{t as c}from"./progress-CdlDthXA.mjs";import{t as l}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as u,n as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-1AC-qwxS.mjs";var _={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/waiting_rooms`,query:[`page`,`per_page`]};function ee(e){return e.usage(`$0 waiting-rooms account-waiting-rooms list
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B7ZJ78al.mjs";import{n}from"./auth-BUQscD5b.mjs";import{a as r,i,t as a}from"./context-Sgba0fZP.mjs";import{t as o}from"./output-CpiIVa7Q.mjs";import{t as s}from"./dry-run-BBjUQUhR.mjs";import{t as c}from"./progress-B1dpmxCT.mjs";import{t as l}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{a as u,n as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-Y5OBwDVE.mjs";var _={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/waiting_rooms`,query:[`page`,`per_page`]};function ee(e){return e.usage(`$0 waiting-rooms account-waiting-rooms list
3
3
 
4
4
  Lists waiting rooms for account or zone.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page. Must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`list`,describe:`List waiting rooms for account or zone`,builder:ee,handler:async e=>l({command:`waiting-rooms account-waiting-rooms list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf waiting-rooms account-waiting-rooms list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/waiting_rooms`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(_,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})},y={command:`account-waiting-rooms`,describe:`Account-scoped waiting room listing`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:t=>e`/zones/${t.zone_id}/waiting_rooms`,body:`json`};function te(e){return e.usage(`$0 waiting-rooms create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BaUNb1Ed.mjs";import{i as n}from"./context-BQ6KeMgq.mjs";import{t as r}from"./output-O6b9MR9R.mjs";import{t as i}from"./dry-run-DQmFkNK_.mjs";import{t as a}from"./progress-CdlDthXA.mjs";import{t as o}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as s,r as c,t as l}from"./body-parser-ChnyBsfm.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-1AC-qwxS.mjs";var m={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/discovery`};function ee(e){return e.usage(`$0 web-assets discovery get
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BUQscD5b.mjs";import{i as n}from"./context-Sgba0fZP.mjs";import{t as r}from"./output-CpiIVa7Q.mjs";import{t as i}from"./dry-run-BBjUQUhR.mjs";import{t as a}from"./progress-B1dpmxCT.mjs";import{t as o}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{n as s,r as c,t as l}from"./body-parser-ChnyBsfm.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-Y5OBwDVE.mjs";var m={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/discovery`};function ee(e){return e.usage(`$0 web-assets discovery get
3
3
 
4
4
  Returns the latest API operations discovered from zone traffic, rendered as OpenAPI schemas.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get`,describe:`Export discovered API operations as OpenAPI schemas`,builder:ee,handler:async e=>o({command:`web-assets discovery get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets discovery get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/discovery`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(m,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var te={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/api_gateway/discovery/operations`,body:`json`};function ne(e){return e.usage(`$0 web-assets discovery operations bulk-edit
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BaUNb1Ed.mjs";import{i as n}from"./context-BQ6KeMgq.mjs";import{t as r}from"./output-O6b9MR9R.mjs";import{t as i}from"./dry-run-DQmFkNK_.mjs";import{t as a}from"./progress-CdlDthXA.mjs";import{t as o}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as s,n as c,t as l}from"./body-parser-ChnyBsfm.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-1AC-qwxS.mjs";var m={method:`POST`,path:t=>e`/zones/${t.zone_id}/web3/hostnames`,body:`json`};function h(e){return e.usage(`$0 web3 hostnames create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BUQscD5b.mjs";import{i as n}from"./context-Sgba0fZP.mjs";import{t as r}from"./output-CpiIVa7Q.mjs";import{t as i}from"./dry-run-BBjUQUhR.mjs";import{t as a}from"./progress-B1dpmxCT.mjs";import{t as o}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{a as s,n as c,t as l}from"./body-parser-ChnyBsfm.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-Y5OBwDVE.mjs";var m={method:`POST`,path:t=>e`/zones/${t.zone_id}/web3/hostnames`,body:`json`};function h(e){return e.usage(`$0 web3 hostnames create
3
3
 
4
4
  Create Web3 Hostname`).option(`description`,{type:`string`,description:`Specify an optional description of the hostname.`}).option(`dnslink`,{type:`string`,description:`Specify the DNSLink value used if the target is ipfs.`}).option(`name`,{type:`string`,description:`Specify the hostname that points to the target gateway via CNAME.`}).option(`target`,{type:`string`,description:`Specify the target gateway of the hostname.`,choices:[`ethereum`,`ipfs`,`ipfs_universal_path`]}).coerce(`target`,e=>u(e,`target`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create Web3 Hostname`,builder:h,handler:async e=>o({command:`web3 hostnames create`,classification:{safeFlags:[`target`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),dnslink:u(e.dnslink,`dnslink`,`text`),name:u(e.name,`name`,`text`),target:e.target}):c(e.body)});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,e.body){let t=c(e.body),n=await a(`Creating`,async()=>o.send(m,{body:t,zone_id:s}));r(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await d(`name`,`Specify the hostname that points to the target gateway via CNAME.`)),e.target===void 0&&(e.target=await f(`target`,`Specify the target gateway of the hostname.`,[`ethereum`,`ipfs`,`ipfs_universal_path`]));let p=l({description:u(e.description,`description`,`text`),dnslink:u(e.dnslink,`dnslink`,`text`),name:u(e.name,`name`,`text`),target:e.target}),h=await a(`Creating`,async()=>o.send(m,{body:p,zone_id:s}));r(h,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}`};function v(e){return e.usage(`$0 web3 hostnames delete <identifier>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as l,n as u,r as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}/migrate_to_previews`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`}};function h(e){return e.usage(`$0 workers-builds workers migrate-to-previews <script-tag>
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B7ZJ78al.mjs";import{n}from"./auth-BUQscD5b.mjs";import{a as r,t as i}from"./context-Sgba0fZP.mjs";import{t as a}from"./output-CpiIVa7Q.mjs";import{t as o}from"./dry-run-BBjUQUhR.mjs";import{t as s}from"./progress-B1dpmxCT.mjs";import{t as c}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{a as l,n as u,r as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}/migrate_to_previews`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`}};function h(e){return e.usage(`$0 workers-builds workers migrate-to-previews <script-tag>
3
3
 
4
4
  Migrate a Worker's legacy non-production trigger to Previews. The legacy build settings become the Previews base config and the legacy trigger is removed.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`deploy-command`,{type:`string`,description:`Deploy command for the migrated Preview settings. Omit it to have the existing 'wrangler versions upload' command rewritten to 'wrangler preview' automatically, which fails with 400 when the existing command cannot be rewritten.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for migrating a Worker's legacy non-production trigger to Previews.`})}const g={command:`migrate-to-previews <script-tag>`,describe:`Migrate worker to previews`,builder:h,handler:async e=>c({command:`workers-builds workers migrate-to-previews`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-builds workers migrate-to-previews`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}/migrate_to_previews`,pathParams:{"script-tag":String(e[`script-tag`]??``)},bodyKind:`json`,body:e.body===void 0?f({deploy_command:p(e[`deploy-command`],`deploy-command`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:l,script_tag:e[`script-tag`]}));a(n,{successLabel:`Created`});return}let d=f({deploy_command:p(e[`deploy-command`],`deploy-command`,`text`)}),h=await s(`Creating`,async()=>c.send(m,{body:d,account_id:l,script_tag:e[`script-tag`]}));a(h,{successLabel:`Created`})})};var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}/previews/${t.preview_id}/builds`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`}};function v(e){return e.usage(`$0 workers-builds workers previews create-build <preview-id>
5
5
 
@@ -1,43 +1,43 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./lazy-command-Bq-rWPQe.mjs";import{r as t}from"./theme-BGHWSKCw.mjs";import{r as n}from"./dotenv-Ck-6V1hm.mjs";import{q as r}from"./dist-CnKd5XoR.mjs";import"./api-eMuS5GI1.mjs";import{t as i}from"./path-DRw6Y-nd.mjs";import{t as a}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as o}from"./local-B4sZZTRA.mjs";import"./ui-CY79jlGZ.mjs";import{i as s,n as c}from"./auth-BaUNb1Ed.mjs";import{n as l}from"./dist-DAeCUX-u.mjs";import{a as u,r as d,t as f}from"./context-BQ6KeMgq.mjs";import{t as ee}from"./deploy-context-C-ZdGP0Z.mjs";import{t as te}from"./auth-token-B1pP2jaK.mjs";import{t as p}from"./output-O6b9MR9R.mjs";import{t as m}from"./dry-run-DQmFkNK_.mjs";import{t as h}from"./progress-CdlDthXA.mjs";import{n as g,t as _}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as v,n as y,r as b,s as x,t as S}from"./body-parser-ChnyBsfm.mjs";import{n as C,t as w}from"./input-validation-D7z60HJH.mjs";import{a as T,i as E,n as D}from"./prompt-1AC-qwxS.mjs";import{n as O,t as k}from"./raw-fetch-1VlXDwwX.mjs";import{l as ne,s as A}from"./containers-yUOvm-4V.mjs";import{a as j,i as M,n as N,o as P,r as F}from"./build-CMPlf8mh.mjs";import{r as I}from"./deploy-input-B8Nq6Eh6.mjs";import{n as L,t as R}from"./shared-CWBjMZDR.mjs";import{readBuildOutput as z}from"@cloudflare/build-output-utils";var B={method:`DELETE`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}`,query:[`force`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function V(e){return e.usage(`$0 workers delete <worker-id>
2
+ import{t as e}from"./lazy-command-D0I6itZs.mjs";import{r as t}from"./theme-BGHWSKCw.mjs";import{r as n}from"./dotenv-Ck-6V1hm.mjs";import{q as r}from"./dist-CX6dDtzj.mjs";import"./api-eMuS5GI1.mjs";import{t as i}from"./path-DRw6Y-nd.mjs";import{t as a}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as o}from"./local-B7ZJ78al.mjs";import"./ui-CBhKUPys.mjs";import{i as s,n as c}from"./auth-BUQscD5b.mjs";import{n as l}from"./dist-DAeCUX-u.mjs";import{a as u,r as d,t as f}from"./context-Sgba0fZP.mjs";import{t as ee}from"./deploy-context-DIAl408H.mjs";import{t as p}from"./output-CpiIVa7Q.mjs";import{t as m}from"./dry-run-BBjUQUhR.mjs";import{t as h}from"./progress-B1dpmxCT.mjs";import{n as g,t as _}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{a as v,n as y,r as b,s as x,t as S}from"./body-parser-ChnyBsfm.mjs";import{n as C,t as w}from"./input-validation-D7z60HJH.mjs";import{a as T,i as E,n as D}from"./prompt-Y5OBwDVE.mjs";import{n as O,t as k}from"./raw-fetch-DSdFjojI.mjs";import{c as te,r as ne,u as A}from"./containers-CcZHRM9g.mjs";import{a as j,i as M,n as N,o as P,r as F,s as I}from"./build-BJHRK6qE.mjs";import{r as L}from"./deploy-input-v2DryyLP.mjs";import{n as R,t as z}from"./shared-o8saqcSK.mjs";import{readBuildOutput as B}from"@cloudflare/build-output-utils";var V={method:`DELETE`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}`,query:[`force`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function H(e){return e.usage(`$0 workers delete <worker-id>
3
3
 
4
- Delete a Worker and all its associated resources (versions, deployments, etc.).`).positional(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`delete-with-references`,{type:`boolean`,description:`If true, delete the Worker even when other Workers still reference it. Service bindings in those Workers may be left broken. Durable Object namespaces implemented by the deleted Worker are deleted even if other Workers reference them.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const H={command:`delete <worker-id>`,describe:`Delete Worker`,builder:V,handler:async e=>_({command:`workers delete`,classification:{safeFlags:[`delete-with-references`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={force:e[`delete-with-references`]};if(e.dryRun){let n=await u();m({command:`cf workers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``)},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();if(e.accountId=r,!await D({force:!!e.force,message:`This will permanently delete the Worker and its associated versions and deployments.`})){process.stderr.write(`Aborted.
5
- `);return}let i=await h(`Deleting`,async()=>n.send(B,{account_id:r,worker_id:e[`worker-id`],...t}));p(i,{successLabel:`Deleted`})})};var U={method:`POST`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments`,query:[`force`],body:`json`,constants:{strategy:`percentage`}};function W(e){return e.usage(`$0 workers deployments create
4
+ Delete a Worker and all its associated resources (versions, deployments, etc.).`).positional(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`delete-with-references`,{type:`boolean`,description:`If true, delete the Worker even when other Workers still reference it. Service bindings in those Workers may be left broken. Durable Object namespaces implemented by the deleted Worker are deleted even if other Workers reference them.`}).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 U={command:`delete <worker-id>`,describe:`Delete Worker`,builder:H,handler:async e=>_({command:`workers delete`,classification:{safeFlags:[`delete-with-references`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={force:e[`delete-with-references`]};if(e.dryRun){let n=await u();m({command:`cf workers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``)},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();if(e.accountId=r,!await D({force:!!e.force,message:`This will permanently delete the Worker and its associated versions and deployments.`})){process.stderr.write(`Aborted.
5
+ `);return}let i=await h(`Deleting`,async()=>n.send(V,{account_id:r,worker_id:e[`worker-id`],...t}));p(i,{successLabel:`Deleted`})})};var W={method:`POST`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments`,query:[`force`],body:`json`,constants:{strategy:`percentage`}};function G(e){return e.usage(`$0 workers deployments create
6
6
 
7
- Deployments configure how [Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions) are deployed to traffic. A deployment can consist of multiple versions of a Worker.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`bypass-deployment-checks`,{type:`boolean`,description:`If set to true, the deployment will be created even if normally blocked by something such rolling back to an older version when a secret has changed.`}).option(`strategy`,{type:`string`,description:`The strategy field`,choices:[`percentage`]}).coerce(`strategy`,e=>C(e,`strategy`,`text`)).option(`versions`,{type:`string`,description:'Worker versions included in this deployment. Each object must contain a `version_id` UUID and a `percentage`; percentages across all objects must total 100. In the `cf` CLI, pass the entire array as one JSON value to `--versions`, either inline, for example `--versions \'[{"version_id":"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f","percentage":100}]\'`, or from a JSON file with `--versions @versions.json`. Provide as a JSON array of objects or @path/to/file.json.'}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const G={command:`create`,describe:`Create Worker Deployment`,builder:W,handler:async e=>_({command:`workers deployments create`,classification:{safeFlags:[`bypass-deployment-checks`,`strategy`,`dry-run`]}},e,async()=>{let t={force:e[`bypass-deployment-checks`]};if(e.dryRun){let n=await u();m({command:`cf workers deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments`,pathParams:{"script-name":String(e[`script-name`]??``)},query:t,bodyKind:`json`,body:e.body===void 0?S({strategy:e.strategy,versions:v(e.versions,`versions`)}):y(e.body)});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=d({scriptName:e.worker});if(e.worker=i,e.body){let a=y(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let o=await h(`Creating`,async()=>n.send(U,{body:a,account_id:r,script_name:i,...t}));p(o,{successLabel:`Created`});return}if(e.strategy===void 0&&(e.strategy=await E(`strategy`,`The strategy field`,[`percentage`])),e.versions===void 0)throw Error(`--versions is required (or pass --body with this field set).`);let a=S({strategy:e.strategy,versions:v(e.versions,`versions`)});new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let s=await h(`Creating`,async()=>n.send(U,{body:a,account_id:r,script_name:i,...t}));p(s,{successLabel:`Created`})})};var K={method:`DELETE`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments/${e.deployment_id}`};function q(e){return e.usage(`$0 workers deployments delete <deployment-id>
7
+ Deployments configure how [Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions) are deployed to traffic. A deployment can consist of multiple versions of a Worker.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`bypass-deployment-checks`,{type:`boolean`,description:`If set to true, the deployment will be created even if normally blocked by something such rolling back to an older version when a secret has changed.`}).option(`strategy`,{type:`string`,description:`The strategy field`,choices:[`percentage`]}).coerce(`strategy`,e=>C(e,`strategy`,`text`)).option(`versions`,{type:`string`,description:'Worker versions included in this deployment. Each object must contain a `version_id` UUID and a `percentage`; percentages across all objects must total 100. In the `cf` CLI, pass the entire array as one JSON value to `--versions`, either inline, for example `--versions \'[{"version_id":"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f","percentage":100}]\'`, or from a JSON file with `--versions @versions.json`. Provide as a JSON array of objects or @path/to/file.json.'}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const K={command:`create`,describe:`Create Worker Deployment`,builder:G,handler:async e=>_({command:`workers deployments create`,classification:{safeFlags:[`bypass-deployment-checks`,`strategy`,`dry-run`]}},e,async()=>{let t={force:e[`bypass-deployment-checks`]};if(e.dryRun){let n=await u();m({command:`cf workers deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments`,pathParams:{"script-name":String(e[`script-name`]??``)},query:t,bodyKind:`json`,body:e.body===void 0?S({strategy:e.strategy,versions:v(e.versions,`versions`)}):y(e.body)});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=d({scriptName:e.worker});if(e.worker=i,e.body){let a=y(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let o=await h(`Creating`,async()=>n.send(W,{body:a,account_id:r,script_name:i,...t}));p(o,{successLabel:`Created`});return}if(e.strategy===void 0&&(e.strategy=await E(`strategy`,`The strategy field`,[`percentage`])),e.versions===void 0)throw Error(`--versions is required (or pass --body with this field set).`);let a=S({strategy:e.strategy,versions:v(e.versions,`versions`)});new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let s=await h(`Creating`,async()=>n.send(W,{body:a,account_id:r,script_name:i,...t}));p(s,{successLabel:`Created`})})};var q={method:`DELETE`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments/${e.deployment_id}`};function J(e){return e.usage(`$0 workers deployments delete <deployment-id>
8
8
 
9
- Delete a Worker Deployment. The latest deployment, which is actively serving traffic, cannot be deleted. All other deployments can be deleted.`).positional(`deployment-id`,{type:`string`,description:`Deployment ID`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const J={command:`delete <deployment-id>`,describe:`Delete Worker Deployment`,builder:q,handler:async e=>_({command:`workers deployments delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await c(e),n=e.local?o:await f();e.accountId=n;let r=d({scriptName:e.worker});if(e.worker=r,!await D({force:!!e.force,message:`This will permanently delete the Worker deployment.`})){process.stderr.write(`Aborted.
10
- `);return}let i=await h(`Deleting`,async()=>t.send(K,{account_id:n,script_name:r,deployment_id:e[`deployment-id`]}));p(i,{successLabel:`Deleted`})})};var Y={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments/${e.deployment_id}`};function X(e){return e.usage(`$0 workers deployments get <deployment-id>
9
+ Delete a Worker Deployment. The latest deployment, which is actively serving traffic, cannot be deleted. All other deployments can be deleted.`).positional(`deployment-id`,{type:`string`,description:`Deployment ID`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Y={command:`delete <deployment-id>`,describe:`Delete Worker Deployment`,builder:J,handler:async e=>_({command:`workers deployments delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await c(e),n=e.local?o:await f();e.accountId=n;let r=d({scriptName:e.worker});if(e.worker=r,!await D({force:!!e.force,message:`This will permanently delete the Worker deployment.`})){process.stderr.write(`Aborted.
10
+ `);return}let i=await h(`Deleting`,async()=>t.send(q,{account_id:n,script_name:r,deployment_id:e[`deployment-id`]}));p(i,{successLabel:`Deleted`})})};var X={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments/${e.deployment_id}`};function Z(e){return e.usage(`$0 workers deployments get <deployment-id>
11
11
 
12
- Get information about a Worker Deployment.`).positional(`deployment-id`,{type:`string`,description:`Deployment ID`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`get <deployment-id>`,describe:`Get Worker Deployment`,builder:X,handler:async e=>_({command:`workers deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers deployments get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await c(e),n=e.local?o:await f();e.accountId=n;let r=d({scriptName:e.worker});e.worker=r;let i=await h(`Loading`,async()=>t.send(Y,{account_id:n,script_name:r,deployment_id:e[`deployment-id`]}));p(i,{successLabel:`Loaded`})})};var re={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments`,query:[`since`,`until`,`page`,`per_page`]};function ie(e){return e.usage(`$0 workers deployments list
12
+ Get information about a Worker Deployment.`).positional(`deployment-id`,{type:`string`,description:`Deployment ID`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <deployment-id>`,describe:`Get Worker Deployment`,builder:Z,handler:async e=>_({command:`workers deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers deployments get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await c(e),n=e.local?o:await f();e.accountId=n;let r=d({scriptName:e.worker});e.worker=r;let i=await h(`Loading`,async()=>t.send(X,{account_id:n,script_name:r,deployment_id:e[`deployment-id`]}));p(i,{successLabel:`Loaded`})})};var ie={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments`,query:[`since`,`until`,`page`,`per_page`]};function ae(e){return e.usage(`$0 workers deployments list
13
13
 
14
- List Worker deployments. The first deployment in the list is the latest deployment actively serving traffic.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`since`,{type:`string`,description:`Start of the deployment creation time range, inclusive.`}).option(`until`,{type:`string`,description:`End of the deployment creation time range, inclusive.`}).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`list`,describe:`List Worker Deployments`,builder:ie,handler:async e=>_({command:`workers deployments list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={since:e.since,until:e.until,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let n=await u();m({command:`cf workers deployments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments`,pathParams:{"script-name":String(e[`script-name`]??``)},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=d({scriptName:e.worker});e.worker=i;let a=await h(`Loading`,async()=>n.send(re,{account_id:r,script_name:i,...t}));p(a,{successLabel:`Loaded`})})},oe={command:`deployments`,describe:`Operations for deployments`,builder:e=>e.command(G).command(J).command(Z).command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var se={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function ce(e){return e.usage(`$0 workers get <worker-id>
14
+ List Worker deployments. The first deployment in the list is the latest deployment actively serving traffic.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`since`,{type:`string`,description:`Start of the deployment creation time range, inclusive.`}).option(`until`,{type:`string`,description:`End of the deployment creation time range, inclusive.`}).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`list`,describe:`List Worker Deployments`,builder:ae,handler:async e=>_({command:`workers deployments list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={since:e.since,until:e.until,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let n=await u();m({command:`cf workers deployments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments`,pathParams:{"script-name":String(e[`script-name`]??``)},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=d({scriptName:e.worker});e.worker=i;let a=await h(`Loading`,async()=>n.send(ie,{account_id:r,script_name:i,...t}));p(a,{successLabel:`Loaded`})})},se={command:`deployments`,describe:`Operations for deployments`,builder:e=>e.command(K).command(Y).command(re).command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ce={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function le(e){return e.usage(`$0 workers get <worker-id>
15
15
 
16
- Get details about a specific Worker.`).positional(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`get <worker-id>`,describe:`Get Worker`,builder:ce,handler:async e=>_({command:`workers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``)},bodyKind:`none`});return}let t=await c(e),n=e.local?o:await f();e.accountId=n;let r=await h(`Loading`,async()=>t.send(se,{account_id:n,worker_id:e[`worker-id`]}));p(r,{successLabel:`Loaded`})})};var ue={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/workers`,query:[`page`,`per_page`,`order_by`,`order`],errors:{401:`UnauthorizedError`,500:`InternalServerError`}};function de(e){return e.usage(`$0 workers list
16
+ Get details about a specific Worker.`).positional(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get <worker-id>`,describe:`Get Worker`,builder:le,handler:async e=>_({command:`workers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``)},bodyKind:`none`});return}let t=await c(e),n=e.local?o:await f();e.accountId=n;let r=await h(`Loading`,async()=>t.send(ce,{account_id:n,worker_id:e[`worker-id`]}));p(r,{successLabel:`Loaded`})})};var de={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/workers`,query:[`page`,`per_page`,`order_by`,`order`],errors:{401:`UnauthorizedError`,500:`InternalServerError`}};function fe(e){return e.usage(`$0 workers list
17
17
 
18
- List all Workers for an account.`).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`order-by`,{type:`string`,description:`Property to sort results by.`,choices:[`deployed_on`,`updated_on`,`created_on`,`name`]}).option(`order`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`list`,describe:`List Workers`,builder:de,handler:async e=>_({command:`workers list`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`],order_by:e[`order-by`],order:e.order};if(e.dryRun){let e=await u();m({command:`cf workers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/workers`,pathParams:{},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=await h(`Loading`,async()=>n.send(ue,{account_id:r,...t}));p(i,{successLabel:`Loaded`})})};var pe={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts-search`,query:[`name`,`id`,`order_by`,`page`,`per_page`]};function me(e){return e.usage(`$0 workers scripts search
18
+ List all Workers for an account.`).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`order-by`,{type:`string`,description:`Property to sort results by.`,choices:[`deployed_on`,`updated_on`,`created_on`,`name`]}).option(`order`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`list`,describe:`List Workers`,builder:fe,handler:async e=>_({command:`workers list`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`],order_by:e[`order-by`],order:e.order};if(e.dryRun){let e=await u();m({command:`cf workers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/workers`,pathParams:{},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=await h(`Loading`,async()=>n.send(de,{account_id:r,...t}));p(i,{successLabel:`Loaded`})})};var me={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts-search`,query:[`name`,`id`,`order_by`,`page`,`per_page`]};function he(e){return e.usage(`$0 workers scripts search
19
19
 
20
- Search for Worker scripts in an account.`).option(`name`,{type:`string`,description:`Worker name to search for. Both exact and partial matches are returned.`}).option(`id`,{type:`string`,description:`Worker ID (also called tag) to search for. Only exact matches are returned.`}).option(`order-by`,{type:`string`,description:`Property to sort results by. Results are sorted in ascending order.`,choices:[`created_on`,`modified_on`,`name`]}).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`search`,describe:`Search Worker Scripts`,builder:me,handler:async e=>_({command:`workers scripts search`,classification:{safeFlags:[`order-by`,`dry-run`]}},e,async()=>{let t={name:e.name,id:e.id,order_by:e[`order-by`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await u();m({command:`cf workers scripts search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/scripts-search`,pathParams:{},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=await h(`Loading`,async()=>n.send(pe,{account_id:r,...t}));p(i,{successLabel:`Loaded`})})},ge={command:`scripts`,describe:`Operations for scripts`,builder:e=>e.command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _e(e){return e.usage(`$0 workers secrets bulk
20
+ Search for Worker scripts in an account.`).option(`name`,{type:`string`,description:`Worker name to search for. Both exact and partial matches are returned.`}).option(`id`,{type:`string`,description:`Worker ID (also called tag) to search for. Only exact matches are returned.`}).option(`order-by`,{type:`string`,description:`Property to sort results by. Results are sorted in ascending order.`,choices:[`created_on`,`modified_on`,`name`]}).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`search`,describe:`Search Worker Scripts`,builder:he,handler:async e=>_({command:`workers scripts search`,classification:{safeFlags:[`order-by`,`dry-run`]}},e,async()=>{let t={name:e.name,id:e.id,order_by:e[`order-by`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await u();m({command:`cf workers scripts search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/scripts-search`,pathParams:{},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=await h(`Loading`,async()=>n.send(me,{account_id:r,...t}));p(i,{successLabel:`Loaded`})})},_e={command:`scripts`,describe:`Operations for scripts`,builder:e=>e.command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ve(e){return e.usage(`$0 workers secrets bulk
21
21
 
22
22
  Create, update, or delete multiple secrets on a Worker script in a single operation using JSON Merge Patch (RFC 7396). This operation creates a single version with all changes included. Prefer this API instead of changing many secrets individually. Usage: - To create or update a secret, set its value to a secret object. - To delete a secret, set its value to \`null\`. - Secrets not included in the request are left unchanged.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`secrets`,{type:`string`,description:`Map of secret names to secret values:
23
23
  - Set to a secret object to create or update.
24
24
  - Set to \`null\` to delete.
25
- - Omit to leave unchanged. Provide as a JSON object or @path/to/file.json.`}).option(`version-tags`,{type:`string`,description:`Optional version tags to apply to the new script version. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`JSON Merge Patch (RFC 7396) request body for bulk secret changes. `}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const ve={command:`bulk`,describe:`Patch multiple Worker script secrets`,builder:_e,handler:async e=>_({command:`workers secrets bulk`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.body===void 0&&e.file===void 0&&e.secrets===void 0&&e[`version-tags`]===void 0)throw Error(`--body is required unless at least one JSON map flag is provided (--secrets, --version-tags).`);if(e.dryRun){let t=await u();m({command:`cf workers secrets bulk`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets-bulk`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?S({secrets:b(e.secrets,`secrets`),version_tags:b(e[`version-tags`],`version-tags`)},[[`secrets`],[`version_tags`]]):y(e.body):{file:e.file}});return}let t=await c(e),n=e.local?o:await f();e.accountId=n;let r=d({scriptName:e.worker});if(e.worker=r,e.file){let i=w(e.file),a=await h(`Updating`,async()=>s(t,`PATCH`,`/accounts/${n}/workers/scripts/${r}/secrets-bulk`,{body:i,headers:{"Content-Type":`application/merge-patch+json`}}));p(a,{successLabel:`Updated`});return}if(e.body){let i=y(e.body),a=await h(`Updating`,async()=>s(t,`PATCH`,`/accounts/${n}/workers/scripts/${r}/secrets-bulk`,{body:i}));p(a,{successLabel:`Updated`});return}let i={};e.secrets!==void 0&&x(i,[`secrets`],b(e.secrets,`secrets`)),e[`version-tags`]!==void 0&&x(i,[`version_tags`],b(e[`version-tags`],`version-tags`));let a=await h(`Updating`,async()=>s(t,`PATCH`,`/accounts/${n}/workers/scripts/${r}/secrets-bulk`,{body:i}));p(a,{successLabel:`Updated`})})};var ye={method:`DELETE`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets/${e.secret_name}`,query:[`url_encoded`]};function be(e){return e.usage(`$0 workers secrets delete <secret-name>
25
+ - Omit to leave unchanged. Provide as a JSON object or @path/to/file.json.`}).option(`version-tags`,{type:`string`,description:`Optional version tags to apply to the new script version. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`JSON Merge Patch (RFC 7396) request body for bulk secret changes. `}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const ye={command:`bulk`,describe:`Patch multiple Worker script secrets`,builder:ve,handler:async e=>_({command:`workers secrets bulk`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.body===void 0&&e.file===void 0&&e.secrets===void 0&&e[`version-tags`]===void 0)throw Error(`--body is required unless at least one JSON map flag is provided (--secrets, --version-tags).`);if(e.dryRun){let t=await u();m({command:`cf workers secrets bulk`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets-bulk`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?S({secrets:b(e.secrets,`secrets`),version_tags:b(e[`version-tags`],`version-tags`)},[[`secrets`],[`version_tags`]]):y(e.body):{file:e.file}});return}let t=await c(e),n=e.local?o:await f();e.accountId=n;let r=d({scriptName:e.worker});if(e.worker=r,e.file){let i=w(e.file),a=await h(`Updating`,async()=>s(t,`PATCH`,`/accounts/${n}/workers/scripts/${r}/secrets-bulk`,{body:i,headers:{"Content-Type":`application/merge-patch+json`}}));p(a,{successLabel:`Updated`});return}if(e.body){let i=y(e.body),a=await h(`Updating`,async()=>s(t,`PATCH`,`/accounts/${n}/workers/scripts/${r}/secrets-bulk`,{body:i}));p(a,{successLabel:`Updated`});return}let i={};e.secrets!==void 0&&x(i,[`secrets`],b(e.secrets,`secrets`)),e[`version-tags`]!==void 0&&x(i,[`version_tags`],b(e[`version-tags`],`version-tags`));let a=await h(`Updating`,async()=>s(t,`PATCH`,`/accounts/${n}/workers/scripts/${r}/secrets-bulk`,{body:i}));p(a,{successLabel:`Updated`})})};var be={method:`DELETE`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets/${e.secret_name}`,query:[`url_encoded`]};function xe(e){return e.usage(`$0 workers secrets delete <secret-name>
26
26
 
27
- Remove a secret from a Worker script by creating a new version without that secret. When changing more than one secret at a time, prefer the "Patch multiple script secrets" API instead of changing many secrets individually.`).positional(`secret-name`,{type:`string`,description:`A JavaScript variable name for the secret binding.`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`url-encoded`,{type:`boolean`,description:`Flag that indicates whether the secret name is URL encoded.`}).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 xe={command:`delete <secret-name>`,describe:`Delete Worker script secret`,builder:be,handler:async e=>_({command:`workers secrets delete`,classification:{safeFlags:[`url-encoded`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={url_encoded:e[`url-encoded`]};if(e.dryRun){let n=await u();m({command:`cf workers secrets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=d({scriptName:e.worker});if(e.worker=i,!await D({force:!!e.force,message:`This will permanently delete the Worker script secret.`})){process.stderr.write(`Aborted.
28
- `);return}let a=await h(`Deleting`,async()=>n.send(ye,{account_id:r,script_name:i,secret_name:e[`secret-name`],...t}));p(a,{successLabel:`Deleted`})})};var Se={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets/${e.secret_name}`,query:[`url_encoded`]};function Ce(e){return e.usage(`$0 workers secrets get <secret-name>
27
+ Remove a secret from a Worker script by creating a new version without that secret. When changing more than one secret at a time, prefer the "Patch multiple script secrets" API instead of changing many secrets individually.`).positional(`secret-name`,{type:`string`,description:`A JavaScript variable name for the secret binding.`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`url-encoded`,{type:`boolean`,description:`Flag that indicates whether the secret name is URL encoded.`}).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 Se={command:`delete <secret-name>`,describe:`Delete Worker script secret`,builder:xe,handler:async e=>_({command:`workers secrets delete`,classification:{safeFlags:[`url-encoded`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={url_encoded:e[`url-encoded`]};if(e.dryRun){let n=await u();m({command:`cf workers secrets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=d({scriptName:e.worker});if(e.worker=i,!await D({force:!!e.force,message:`This will permanently delete the Worker script secret.`})){process.stderr.write(`Aborted.
28
+ `);return}let a=await h(`Deleting`,async()=>n.send(be,{account_id:r,script_name:i,secret_name:e[`secret-name`],...t}));p(a,{successLabel:`Deleted`})})};var Ce={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets/${e.secret_name}`,query:[`url_encoded`]};function we(e){return e.usage(`$0 workers secrets get <secret-name>
29
29
 
30
- Get a given secret binding (value omitted) on a Worker script.`).positional(`secret-name`,{type:`string`,description:`A JavaScript variable name for the secret binding.`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`url-encoded`,{type:`boolean`,description:`Flag that indicates whether the secret name is URL encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const we={command:`get <secret-name>`,describe:`Get a secret binding`,builder:Ce,handler:async e=>_({command:`workers secrets get`,classification:{safeFlags:[`url-encoded`,`dry-run`]}},e,async()=>{let t={url_encoded:e[`url-encoded`]};if(e.dryRun){let n=await u();m({command:`cf workers secrets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=d({scriptName:e.worker});e.worker=i;let a=await h(`Loading`,async()=>n.send(Se,{account_id:r,script_name:i,secret_name:e[`secret-name`],...t}));p(a,{successLabel:`Loaded`})})};var Te={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets`};function Ee(e){return e.usage(`$0 workers secrets list
30
+ Get a given secret binding (value omitted) on a Worker script.`).positional(`secret-name`,{type:`string`,description:`A JavaScript variable name for the secret binding.`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`url-encoded`,{type:`boolean`,description:`Flag that indicates whether the secret name is URL encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`get <secret-name>`,describe:`Get a secret binding`,builder:we,handler:async e=>_({command:`workers secrets get`,classification:{safeFlags:[`url-encoded`,`dry-run`]}},e,async()=>{let t={url_encoded:e[`url-encoded`]};if(e.dryRun){let n=await u();m({command:`cf workers secrets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=d({scriptName:e.worker});e.worker=i;let a=await h(`Loading`,async()=>n.send(Ce,{account_id:r,script_name:i,secret_name:e[`secret-name`],...t}));p(a,{successLabel:`Loaded`})})};var Ee={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets`};function De(e){return e.usage(`$0 workers secrets list
31
31
 
32
- List the names of secrets bound to a Worker script.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`list`,describe:`List secrets bound to a Worker script`,builder:Ee,handler:async e=>_({command:`workers secrets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers secrets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let t=await c(e),n=e.local?o:await f();e.accountId=n;let r=d({scriptName:e.worker});e.worker=r;let i=await h(`Loading`,async()=>t.send(Te,{account_id:n,script_name:r}));p(i,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets`,body:`json`,errors:{429:`TooManyRequestsError`}};function Oe(e){return e.usage(`$0 workers secrets update <name>
32
+ List the names of secrets bound to a Worker script.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oe={command:`list`,describe:`List secrets bound to a Worker script`,builder:De,handler:async e=>_({command:`workers secrets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers secrets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let t=await c(e),n=e.local?o:await f();e.accountId=n;let r=d({scriptName:e.worker});e.worker=r;let i=await h(`Loading`,async()=>t.send(Ee,{account_id:n,script_name:r}));p(i,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets`,body:`json`,errors:{429:`TooManyRequestsError`}};function ke(e){return e.usage(`$0 workers secrets update <name>
33
33
 
34
- Add a secret to a Worker script by creating a new version with that secret. When changing more than one secret at a time, prefer the "Patch multiple script secrets" API instead of changing many secrets individually.`).positional(`name`,{type:`string`,description:`A JavaScript variable name for the binding.`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`text`,{type:`string`,description:`The secret value to use.`}).option(`type`,{type:`string`,description:`The kind of resource that the binding provides.`,choices:[`secret_text`,`secret_key`]}).coerce(`type`,e=>C(e,`type`,`text`)).option(`algorithm`,{type:`string`,description:`Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). Provide as a JSON object or @path/to/file.json.`}).option(`format`,{type:`string`,description:`Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).`,choices:[`raw`,`pkcs8`,`spki`,`jwk`]}).coerce(`format`,e=>C(e,`format`,`text`)).option(`key-base64`,{type:`string`,description:'Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki".'}).option(`key-jwk`,{type:`string`,description:'Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". Provide as a JSON object or @path/to/file.json.'}).option(`usages`,{type:`string`,array:!0,description:`Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A secret value accessible through a binding.`}).conflicts(`text`,[`algorithm`,`format`,`key-base64`,`key-jwk`,`usages`]).conflicts(`algorithm`,[`text`]).implies(`algorithm`,[`format`,`usages`]).conflicts(`format`,[`text`]).implies(`format`,[`algorithm`,`usages`]).conflicts(`key-base64`,[`text`]).conflicts(`key-jwk`,[`text`]).conflicts(`usages`,[`text`]).implies(`usages`,[`algorithm`,`format`])}const ke={command:`update <name>`,describe:`Add a secret to a Worker script`,builder:Oe,handler:async e=>_({command:`workers secrets update`,classification:{safeFlags:[`type`,`format`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers secrets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?S({text:C(e.text,`text`,`text`),type:e.type,algorithm:b(e.algorithm,`algorithm`),format:e.format,key_base64:C(e[`key-base64`],`key-base64`,`text`),key_jwk:b(e[`key-jwk`],`key-jwk`),usages:e.usages,name:e.name},[[`algorithm`],[`key_jwk`]]):y(e.body),sensitiveBodyPaths:[[`text`],[`key_base64`],[`key_jwk`]]});return}let t=await c(e),n=e.local?o:await f();e.accountId=n;let r=d({scriptName:e.worker});if(e.worker=r,e.body){let i=y(e.body),a=await h(`Updating`,async()=>t.send(Q,{body:i,account_id:n,script_name:r}));p(a,{successLabel:`Updated`});return}if(e.type===void 0&&(e.type=await E(`type`,`The kind of resource that the binding provides.`,[`secret_text`,`secret_key`])),e.type===`secret_text`&&e.text===void 0&&(e.text=await T(`text`,`The secret value to use.`,{kind:`secret`,question:`Enter value for --text`})),e.type===`secret_key`&&e.algorithm===void 0)throw Error(`--algorithm is required (or pass --body with this field set).`);if(e.type===`secret_key`&&e.format===void 0&&(e.format=await T(`format`,`Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).`,{question:`Enter value for --format`})),e.type===`secret_key`&&e.usages===void 0)throw Error(`--usages is required (or pass --body with this field set).`);let i=S({text:C(e.text,`text`,`text`),type:e.type,algorithm:b(e.algorithm,`algorithm`),format:e.format,key_base64:C(e[`key-base64`],`key-base64`,`text`),key_jwk:b(e[`key-jwk`],`key-jwk`),usages:e.usages,name:e.name},[[`algorithm`],[`key_jwk`]]),a=await h(`Updating`,async()=>t.send(Q,{body:i,account_id:n,script_name:r}));p(a,{successLabel:`Updated`})})},Ae={command:`secrets`,describe:`Operations for secrets`,builder:e=>e.command(ve).command(xe).command(we).command(De).command(ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var je={method:`DELETE`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions/${e.version_id}`};function Me(e){return e.usage(`$0 workers versions delete <version-id>
34
+ Add a secret to a Worker script by creating a new version with that secret. When changing more than one secret at a time, prefer the "Patch multiple script secrets" API instead of changing many secrets individually.`).positional(`name`,{type:`string`,description:`A JavaScript variable name for the binding.`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`text`,{type:`string`,description:`The secret value to use.`}).option(`type`,{type:`string`,description:`The kind of resource that the binding provides.`,choices:[`secret_text`,`secret_key`]}).coerce(`type`,e=>C(e,`type`,`text`)).option(`algorithm`,{type:`string`,description:`Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). Provide as a JSON object or @path/to/file.json.`}).option(`format`,{type:`string`,description:`Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).`,choices:[`raw`,`pkcs8`,`spki`,`jwk`]}).coerce(`format`,e=>C(e,`format`,`text`)).option(`key-base64`,{type:`string`,description:'Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki".'}).option(`key-jwk`,{type:`string`,description:'Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". Provide as a JSON object or @path/to/file.json.'}).option(`usages`,{type:`string`,array:!0,description:`Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A secret value accessible through a binding.`}).conflicts(`text`,[`algorithm`,`format`,`key-base64`,`key-jwk`,`usages`]).conflicts(`algorithm`,[`text`]).implies(`algorithm`,[`format`,`usages`]).conflicts(`format`,[`text`]).implies(`format`,[`algorithm`,`usages`]).conflicts(`key-base64`,[`text`]).conflicts(`key-jwk`,[`text`]).conflicts(`usages`,[`text`]).implies(`usages`,[`algorithm`,`format`])}const Ae={command:`update <name>`,describe:`Add a secret to a Worker script`,builder:ke,handler:async e=>_({command:`workers secrets update`,classification:{safeFlags:[`type`,`format`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers secrets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?S({text:C(e.text,`text`,`text`),type:e.type,algorithm:b(e.algorithm,`algorithm`),format:e.format,key_base64:C(e[`key-base64`],`key-base64`,`text`),key_jwk:b(e[`key-jwk`],`key-jwk`),usages:e.usages,name:e.name},[[`algorithm`],[`key_jwk`]]):y(e.body),sensitiveBodyPaths:[[`text`],[`key_base64`],[`key_jwk`]]});return}let t=await c(e),n=e.local?o:await f();e.accountId=n;let r=d({scriptName:e.worker});if(e.worker=r,e.body){let i=y(e.body),a=await h(`Updating`,async()=>t.send(Q,{body:i,account_id:n,script_name:r}));p(a,{successLabel:`Updated`});return}if(e.type===void 0&&(e.type=await E(`type`,`The kind of resource that the binding provides.`,[`secret_text`,`secret_key`])),e.type===`secret_text`&&e.text===void 0&&(e.text=await T(`text`,`The secret value to use.`,{kind:`secret`,question:`Enter value for --text`})),e.type===`secret_key`&&e.algorithm===void 0)throw Error(`--algorithm is required (or pass --body with this field set).`);if(e.type===`secret_key`&&e.format===void 0&&(e.format=await T(`format`,`Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).`,{question:`Enter value for --format`})),e.type===`secret_key`&&e.usages===void 0)throw Error(`--usages is required (or pass --body with this field set).`);let i=S({text:C(e.text,`text`,`text`),type:e.type,algorithm:b(e.algorithm,`algorithm`),format:e.format,key_base64:C(e[`key-base64`],`key-base64`,`text`),key_jwk:b(e[`key-jwk`],`key-jwk`),usages:e.usages,name:e.name},[[`algorithm`],[`key_jwk`]]),a=await h(`Updating`,async()=>t.send(Q,{body:i,account_id:n,script_name:r}));p(a,{successLabel:`Updated`})})},je={command:`secrets`,describe:`Operations for secrets`,builder:e=>e.command(ye).command(Se).command(Te).command(Oe).command(Ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Me={method:`DELETE`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions/${e.version_id}`};function Ne(e){return e.usage(`$0 workers versions delete <version-id>
35
35
 
36
- Delete a Worker version.`).positional(`version-id`,{type:`string`,description:`Identifier for the version, which can be a UUID, a UUID prefix (minimum length 8), or the literal "latest" to operate on the most recently created version.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,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 Ne={command:`delete <version-id>`,describe:`Delete Worker Version`,builder:Me,handler:async e=>_({command:`workers versions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers versions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},bodyKind:`none`});return}let t=await c(e),n=e.local?o:await f();if(e.accountId=n,!await D({force:!!e.force,message:`This will permanently delete the Worker version.`})){process.stderr.write(`Aborted.
37
- `);return}let r=await h(`Deleting`,async()=>t.send(je,{account_id:n,worker_id:e[`worker-id`],version_id:e[`version-id`]}));p(r,{successLabel:`Deleted`})})};var Pe={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions/${e.version_id}`,query:[`include`]};function Fe(e){return e.usage(`$0 workers versions get <version-id>
36
+ Delete a Worker version.`).positional(`version-id`,{type:`string`,description:`Identifier for the version, which can be a UUID, a UUID prefix (minimum length 8), or the literal "latest" to operate on the most recently created version.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,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 Pe={command:`delete <version-id>`,describe:`Delete Worker Version`,builder:Ne,handler:async e=>_({command:`workers versions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers versions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},bodyKind:`none`});return}let t=await c(e),n=e.local?o:await f();if(e.accountId=n,!await D({force:!!e.force,message:`This will permanently delete the Worker version.`})){process.stderr.write(`Aborted.
37
+ `);return}let r=await h(`Deleting`,async()=>t.send(Me,{account_id:n,worker_id:e[`worker-id`],version_id:e[`version-id`]}));p(r,{successLabel:`Deleted`})})};var Fe={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions/${e.version_id}`,query:[`include`]};function Ie(e){return e.usage(`$0 workers versions get <version-id>
38
38
 
39
- Get details about a specific Worker version.`).positional(`version-id`,{type:`string`,description:`Identifier for the version, which can be a UUID, a UUID prefix (minimum length 8), or the literal "latest" to operate on the most recently created version.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`include`,{type:`string`,description:"Whether to include the `modules` property of the version in the response, which contains code and sourcemap content and may add several megabytes to the response size.",choices:[`modules`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ie={command:`get <version-id>`,describe:`Get Worker Version`,builder:Fe,handler:async e=>_({command:`workers versions get`,classification:{safeFlags:[`include`,`dry-run`]}},e,async()=>{let t={include:e.include};if(e.dryRun){let n=await u();m({command:`cf workers versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=await h(`Loading`,async()=>n.send(Pe,{account_id:r,worker_id:e[`worker-id`],version_id:e[`version-id`],...t}));p(i,{successLabel:`Loaded`})})};var Le={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions`,query:[`page`,`per_page`]};function Re(e){return e.usage(`$0 workers versions list
39
+ Get details about a specific Worker version.`).positional(`version-id`,{type:`string`,description:`Identifier for the version, which can be a UUID, a UUID prefix (minimum length 8), or the literal "latest" to operate on the most recently created version.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`include`,{type:`string`,description:"Whether to include the `modules` property of the version in the response, which contains code and sourcemap content and may add several megabytes to the response size.",choices:[`modules`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`get <version-id>`,describe:`Get Worker Version`,builder:Ie,handler:async e=>_({command:`workers versions get`,classification:{safeFlags:[`include`,`dry-run`]}},e,async()=>{let t={include:e.include};if(e.dryRun){let n=await u();m({command:`cf workers versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=await h(`Loading`,async()=>n.send(Fe,{account_id:r,worker_id:e[`worker-id`],version_id:e[`version-id`],...t}));p(i,{successLabel:`Loaded`})})};var Re={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions`,query:[`page`,`per_page`]};function ze(e){return e.usage(`$0 workers versions list
40
40
 
41
- List all versions for a Worker.`).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ze={command:`list`,describe:`List Worker Versions`,builder:Re,handler:async e=>_({command:`workers versions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let n=await u();m({command:`cf workers versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions`,pathParams:{"worker-id":String(e[`worker-id`]??``)},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=await h(`Loading`,async()=>n.send(Le,{account_id:r,worker_id:e[`worker-id`],...t}));p(i,{successLabel:`Loaded`})})};function Be(e){return e.usage(`$0 workers versions profile <version-id>
41
+ List all versions for a Worker.`).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Be={command:`list`,describe:`List Worker Versions`,builder:ze,handler:async e=>_({command:`workers versions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let n=await u();m({command:`cf workers versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions`,pathParams:{"worker-id":String(e[`worker-id`]??``)},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=await h(`Loading`,async()=>n.send(Re,{account_id:r,worker_id:e[`worker-id`],...t}));p(i,{successLabel:`Loaded`})})};function Ve(e){return e.usage(`$0 workers versions profile <version-id>
42
42
 
43
- Captures a CPU or heap profile from a recently active isolate running the specified Worker version. This endpoint requires the Worker profiling feature to be enabled for the account.`).positional(`version-id`,{type:`string`,description:`Identifies the version by UUID or UUID prefix with a minimum length of eight characters. Use "latest" to select the most recently created version, which may not be deployed. Use "latest-deployed" to profile a version in the active deployment. Versions are tried in order of traffic share until one has a loaded isolate.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifies the Worker by ID or name.`,demandOption:!0}).option(`actor-id`,{type:`string`,description:`Identifies the exact Durable Object actor to profile. Must be specified together with namespace_id. The actor must currently be active and running the requested Worker version.`}).option(`duration-ms`,{type:`number`,description:`Profile duration in milliseconds.`}).option(`namespace-id`,{type:`string`,description:`Identifies the Durable Object namespace containing the actor to profile. Must be specified together with actor_id.`}).option(`profile-type`,{type:`string`,description:`The profile_type field`,choices:[`cpu`,`heap`],default:`cpu`}).coerce(`profile-type`,e=>C(e,`profile-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const Ve={command:`profile <version-id>`,describe:`Profile Worker Version`,builder:Be,handler:async e=>_({command:`workers versions profile`,classification:{safeFlags:[`profile-type`,`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers versions profile`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}/profile`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},bodyKind:`json`,body:e.body===void 0?S({actor_id:C(e[`actor-id`],`actor-id`,`text`),duration_ms:e[`duration-ms`],namespace_id:C(e[`namespace-id`],`namespace-id`,`text`),profile_type:e[`profile-type`]}):y(e.body)});return}await c(e);let t=e.local?o:await f();if(e.accountId=t,e.body){let n=y(e.body),r=await h(`Creating`,async()=>k(`/accounts/${t}/workers/workers/${encodeURIComponent(String(e[`worker-id`]))}/versions/${encodeURIComponent(String(e[`version-id`]))}/profile`,{method:`POST`,local:e.local===!0,persistTo:e.persistTo,body:JSON.stringify(n),contentType:`application/json`}));O(e.text===!0?r.toString(`utf-8`):r);return}if(e[`duration-ms`]===void 0)throw Error(`--duration-ms is required (or pass --body with this field set).`);let n={};e[`actor-id`]!==void 0&&x(n,[`actor_id`],C(e[`actor-id`],`actor-id`,`text`)),e[`duration-ms`]!==void 0&&x(n,[`duration_ms`],e[`duration-ms`]),e[`namespace-id`]!==void 0&&x(n,[`namespace_id`],C(e[`namespace-id`],`namespace-id`,`text`)),e[`profile-type`]!==void 0&&x(n,[`profile_type`],e[`profile-type`]);let r=await h(`Creating`,async()=>k(`/accounts/${t}/workers/workers/${encodeURIComponent(String(e[`worker-id`]))}/versions/${encodeURIComponent(String(e[`version-id`]))}/profile`,{method:`POST`,local:e.local===!0,persistTo:e.persistTo,body:Object.keys(n).length>0?n:void 0}));O(e.text===!0?r.toString(`utf-8`):r)})};function $(e){return L(e).hide(`local`).hide(`persist-to`).epilogue(`Local simulation (--local) is not supported by this command.`).option(`preview-alias`,{type:`string`,description:`Preview alias for this Worker Version`,requiresArg:!0})}var He=g({command:`create`,describe:`Upload a new Worker Version without deploying it`,builder:$,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf workers versions create.`);await R(e,{command:`Version upload`})}},{command:`workers versions create`,classification:{safeFlags:[`dry-run`,`prebuilt`]}});const Ue={command:`versions`,describe:`Operations for versions`,builder:e=>e.command(a(He,`native`)).command(Ne).command(Ie).command(ze).command(Ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var We=e(`check`,`Profile a Worker's startup performance`,()=>import(`./command-CFV1cqfR.mjs`),{command:`workers check`,classification:{safeFlags:[`prebuilt`]}});function Ge(e){return e.hide(`local`).hide(`persist-to`).epilogue(`Local simulation (--local) is not supported by this command.`).option(`prebuilt`,{type:`boolean`,description:`Use existing Build Output Specification files without building`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Run checks without applying triggers`,default:!1}).option(`worker`,F)}const Ke={command:`deploy`,describe:`Apply triggers (Routes, Workflows, Cron triggers etc.)`,builder:Ge,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf workers triggers deploy.`);if(!e.prebuilt){if(await N(e.mode,{worker:e.worker,dryRun:e[`dry-run`]})===`setup-needed`){l.success(`--dry-run: exiting now.`);return}l.message(``,{spacing:0})}await n(e,()=>qe(e))}};async function qe(e){let{workers:n,rootConfig:i}=await z(process.cwd());if(i.buildContext.isPreview){let e=[`cf previews deploy`,`--prebuilt`,...i.buildContext.mode===void 0?[]:[`--mode`,i.buildContext.mode]].join(` `);throw Error(`The Build Output was created for a Preview, but this command deploys production triggers. To use the existing Build Output and deploy the Preview, run "${e}". To deploy production triggers, rebuild without Preview settings before deploying.`)}P(e.mode,i.buildContext.mode);let a=j(n,e.worker),{wranglerConfig:o}=M(a,i),s=e[`dry-run`]?``:await te(),c=e[`dry-run`]?void 0:i.accountId??await f({skipProjectSettings:!0,complianceRegion:r(o)});ne(ee(s)),l.message(t.bold(`Deploy triggers`),{symbol:t.muted(`├`),spacing:0}),await A({...I(a,o,c,e),queueCreateCommand:e=>`cf queues create --queue-name ${e}`,workersDevConfigFieldName:`workersDev`,workersDevConfigAssignment:e=>`workersDev: ${e}`,previewUrlsConfigFieldName:`previewUrls`,previewUrlsConfigAssignment:e=>`previewUrls: ${e}`}),e[`dry-run`]||l.success(`Trigger deploy complete`)}const Je={command:`triggers`,describe:`Manage triggers (Routes, Workflows, Cron triggers etc.)`,builder:e=>e.command(g(Ke,{command:`workers triggers deploy`,classification:{safeFlags:[`dry-run`,`prebuilt`]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ye=e(`types`,`Generate types from cloudflare.config.ts`,()=>import(`./command-D203VrTG.mjs`),{command:`workers types`,classification:{safeFlags:[`include-runtime`]}});const Xe={command:`workers`,describe:`workers`,builder:e=>e.command(a(We,`preview`)).command(H).command(le).command(fe).command(a(Ye,`preview`)).command(oe).command(ge).command(Ae).command(a(Je,`native`)).command(Ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Xe as default};
43
+ Captures a CPU or heap profile from a recently active isolate running the specified Worker version. This endpoint requires the Worker profiling feature to be enabled for the account.`).positional(`version-id`,{type:`string`,description:`Identifies the version by UUID or UUID prefix with a minimum length of eight characters. Use "latest" to select the most recently created version, which may not be deployed. Use "latest-deployed" to profile a version in the active deployment. Versions are tried in order of traffic share until one has a loaded isolate.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifies the Worker by ID or name.`,demandOption:!0}).option(`actor-id`,{type:`string`,description:`Identifies the exact Durable Object actor to profile. Must be specified together with namespace_id. The actor must currently be active and running the requested Worker version.`}).option(`duration-ms`,{type:`number`,description:`Profile duration in milliseconds.`}).option(`namespace-id`,{type:`string`,description:`Identifies the Durable Object namespace containing the actor to profile. Must be specified together with actor_id.`}).option(`profile-type`,{type:`string`,description:`The profile_type field`,choices:[`cpu`,`heap`],default:`cpu`}).coerce(`profile-type`,e=>C(e,`profile-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const $={command:`profile <version-id>`,describe:`Profile Worker Version`,builder:Ve,handler:async e=>_({command:`workers versions profile`,classification:{safeFlags:[`profile-type`,`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers versions profile`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}/profile`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},bodyKind:`json`,body:e.body===void 0?S({actor_id:C(e[`actor-id`],`actor-id`,`text`),duration_ms:e[`duration-ms`],namespace_id:C(e[`namespace-id`],`namespace-id`,`text`),profile_type:e[`profile-type`]}):y(e.body)});return}await c(e);let t=e.local?o:await f();if(e.accountId=t,e.body){let n=y(e.body),r=await h(`Creating`,async()=>k(`/accounts/${t}/workers/workers/${encodeURIComponent(String(e[`worker-id`]))}/versions/${encodeURIComponent(String(e[`version-id`]))}/profile`,{method:`POST`,local:e.local===!0,persistTo:e.persistTo,body:JSON.stringify(n),contentType:`application/json`}));O(e.text===!0?r.toString(`utf-8`):r);return}if(e[`duration-ms`]===void 0)throw Error(`--duration-ms is required (or pass --body with this field set).`);let n={};e[`actor-id`]!==void 0&&x(n,[`actor_id`],C(e[`actor-id`],`actor-id`,`text`)),e[`duration-ms`]!==void 0&&x(n,[`duration_ms`],e[`duration-ms`]),e[`namespace-id`]!==void 0&&x(n,[`namespace_id`],C(e[`namespace-id`],`namespace-id`,`text`)),e[`profile-type`]!==void 0&&x(n,[`profile_type`],e[`profile-type`]);let r=await h(`Creating`,async()=>k(`/accounts/${t}/workers/workers/${encodeURIComponent(String(e[`worker-id`]))}/versions/${encodeURIComponent(String(e[`version-id`]))}/profile`,{method:`POST`,local:e.local===!0,persistTo:e.persistTo,body:Object.keys(n).length>0?n:void 0}));O(e.text===!0?r.toString(`utf-8`):r)})};function He(e){return R(e).hide(`local`).hide(`persist-to`).epilogue(`Local simulation (--local) is not supported by this command.`).option(`preview-alias`,{type:`string`,description:`Preview alias for this Worker Version`,requiresArg:!0})}var Ue=g({command:`create`,describe:`Upload a new Worker Version without deploying it`,builder:He,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf workers versions create.`);await z(e,{command:`Version upload`})}},{command:`workers versions create`,classification:{safeFlags:[`dry-run`,`prebuilt`]}});const We={command:`versions`,describe:`Operations for versions`,builder:e=>e.command(a(Ue,`native`)).command(Pe).command(Le).command(Be).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ge=e(`check`,`Profile a Worker's startup performance`,()=>import(`./command-BRpBIju7.mjs`),{command:`workers check`,classification:{safeFlags:[`prebuilt`]}});function Ke(e){return e.hide(`local`).hide(`persist-to`).epilogue(`Local simulation (--local) is not supported by this command.`).option(`prebuilt`,{type:`boolean`,description:`Use existing Build Output Specification files without building`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Run checks without applying triggers`,default:!1}).option(`worker`,F)}const qe={command:`deploy`,describe:`Apply triggers (Routes, Workflows, Cron triggers etc.)`,builder:Ke,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf workers triggers deploy.`);if(!e.prebuilt){if(await N(e.mode,{worker:e.worker,dryRun:e[`dry-run`]})===`setup-needed`){l.success(`--dry-run: exiting now.`);return}l.message(``,{spacing:0})}await n(e,()=>Je(e))}};async function Je(e){let{workers:n,rootConfig:i}=await B(process.cwd());if(i.buildContext.isPreview){let e=[`cf previews deploy`,`--prebuilt`,...i.buildContext.mode===void 0?[]:[`--mode`,i.buildContext.mode]].join(` `);throw Error(`The Build Output was created for a Preview, but this command deploys production triggers. To use the existing Build Output and deploy the Preview, run "${e}". To deploy production triggers, rebuild without Preview settings before deploying.`)}I(e.mode,i.buildContext.mode),P(i.accountId,e[`temporary-account`]===!0);let a=j(n,e.worker),{wranglerConfig:o}=M(a,i),s=r(o),{authToken:c,accountId:u}=await ne({accountId:i.accountId,complianceRegion:s,dryRun:e[`dry-run`]});A(ee(c)),l.message(t.bold(`Deploy triggers`),{symbol:t.muted(`├`),spacing:0}),await te({...L(a,o,u,e),queueCreateCommand:e=>`cf queues create --queue-name ${e}`,workersDevConfigFieldName:`workersDev`,workersDevConfigAssignment:e=>`workersDev: ${e}`,previewUrlsConfigFieldName:`previewUrls`,previewUrlsConfigAssignment:e=>`previewUrls: ${e}`}),e[`dry-run`]||l.success(`Trigger deploy complete`)}const Ye={command:`triggers`,describe:`Manage triggers (Routes, Workflows, Cron triggers etc.)`,builder:e=>e.command(g(qe,{command:`workers triggers deploy`,classification:{safeFlags:[`dry-run`,`prebuilt`]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Xe=e(`types`,`Generate types from cloudflare.config.ts`,()=>import(`./command-CMa807gY.mjs`),{command:`workers types`,classification:{safeFlags:[`include-runtime`]}});const Ze={command:`workers`,describe:`workers`,builder:e=>e.command(a(Ge,`preview`)).command(U).command(ue).command(pe).command(a(Xe,`preview`)).command(se).command(_e).command(je).command(a(Ye,`native`)).command(We).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ze as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{i as n,n as r}from"./auth-BaUNb1Ed.mjs";import{a as i,t as a}from"./context-BQ6KeMgq.mjs";import{t as o}from"./output-O6b9MR9R.mjs";import{t as s}from"./dry-run-DQmFkNK_.mjs";import{t as c}from"./progress-CdlDthXA.mjs";import{t as l}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as u,r as d,s as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-1AC-qwxS.mjs";var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces`,body:`json`};function ee(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B7ZJ78al.mjs";import{i as n,n as r}from"./auth-BUQscD5b.mjs";import{a as i,t as a}from"./context-Sgba0fZP.mjs";import{t as o}from"./output-CpiIVa7Q.mjs";import{t as s}from"./dry-run-BBjUQUhR.mjs";import{t as c}from"./progress-B1dpmxCT.mjs";import{t as l}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{n as u,r as d,s as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-Y5OBwDVE.mjs";var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces`,body:`json`};function ee(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces create
3
3
 
4
4
  Create a new Workers for Platforms dispatch namespace.`).option(`name`,{type:`string`,description:`The name of the dispatch namespace.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`create`,describe:`Create Workers for Platforms Dispatch Namespace`,builder:ee,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.send(y,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}let d=p({name:m(e.name,`name`,`text`)}),f=await c(`Creating`,async()=>n.send(y,{body:d,account_id:l}));o(f,{successLabel:`Created`})})};var b={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}`};function x(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces delete <dispatch-namespace>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-1AC-qwxS.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/connectivity/directory/services`,body:`json`};function g(e){return e.usage(`$0 workers-vpc services create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B7ZJ78al.mjs";import{n}from"./auth-BUQscD5b.mjs";import{a as r,t as i}from"./context-Sgba0fZP.mjs";import{t as a}from"./output-CpiIVa7Q.mjs";import{t as o}from"./dry-run-BBjUQUhR.mjs";import{t as s}from"./progress-B1dpmxCT.mjs";import{t as c}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-Y5OBwDVE.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/connectivity/directory/services`,body:`json`};function g(e){return e.usage(`$0 workers-vpc services create
3
3
 
4
4
  Creates a new Workers VPC connectivity service in the account.`).option(`host-ipv4`,{type:`string`,description:`The host.ipv4 field`}).option(`host-network-tunnel-id`,{type:`string`,description:`The host.network.tunnel_id field`}).option(`host-ipv6`,{type:`string`,description:`The host.ipv6 field`}).option(`host-hostname`,{type:`string`,description:`The host.hostname field`}).option(`host-resolver-network-resolver-ips`,{type:`string`,array:!0,description:`The host.resolver_network.resolver_ips field`}).option(`host-resolver-network-tunnel-id`,{type:`string`,description:`The host.resolver_network.tunnel_id field`}).option(`name`,{type:`string`,description:`The name field`}).option(`tls-settings-cert-verification-mode`,{type:`string`,description:'TLS certificate verification mode for the connection to the origin.\n\n- `"verify_full"` — verify certificate chain and hostname (default)\n- `"verify_ca"` — verify certificate chain only, skip hostname check\n- `"disabled"` — do not verify the server certificate at all'}).option(`type`,{type:`string`,description:`The type field`,choices:[`tcp`,`http`]}).coerce(`type`,e=>d(e,`type`,`text`)).option(`http-port`,{type:`number`,description:`The http_port field`}).option(`https-port`,{type:`number`,description:`The https_port field`}).option(`app-protocol`,{type:`string`,description:`The app_protocol field`,choices:[`postgresql`,`mysql`]}).coerce(`app-protocol`,e=>d(e,`app-protocol`,`text`)).option(`tcp-port`,{type:`number`,description:`The tcp_port field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`host-ipv4`,[`host-ipv6`,`host-hostname`,`host-resolver-network-resolver-ips`]).conflicts(`host-ipv6`,[`host-ipv4`,`host-hostname`,`host-resolver-network-resolver-ips`]).conflicts(`host-hostname`,[`host-ipv4`,`host-ipv6`]).conflicts(`host-resolver-network-resolver-ips`,[`host-ipv4`,`host-ipv6`]).conflicts(`http-port`,[`app-protocol`,`tcp-port`]).conflicts(`https-port`,[`app-protocol`,`tcp-port`]).conflicts(`app-protocol`,[`http-port`,`https-port`]).conflicts(`tcp-port`,[`http-port`,`https-port`]).check(e=>{if([`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`,`host-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`].some(t=>e[t]!==void 0)){let t=[`host-network-tunnel-id`,`host-resolver-network-tunnel-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --host-* flag is set`)}return!0}).check(e=>{if([`tls-settings-cert-verification-mode`].some(t=>e[t]!==void 0)){let t=[`tls-settings-cert-verification-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --tls_settings-* flag is set`)}return!0})}const _={command:`create`,describe:`Create Workers VPC connectivity service`,builder:g,handler:async e=>c({command:`workers-vpc services create`,classification:{safeFlags:[`type`,`app-protocol`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-vpc services create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/connectivity/directory/services`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({host:{ipv4:d(e[`host-ipv4`],`host-ipv4`,`text`),network:{tunnel_id:d(e[`host-network-tunnel-id`],`host-network-tunnel-id`,`text`)},ipv6:d(e[`host-ipv6`],`host-ipv6`,`text`),hostname:d(e[`host-hostname`],`host-hostname`,`text`),resolver_network:{resolver_ips:e[`host-resolver-network-resolver-ips`],tunnel_id:d(e[`host-resolver-network-tunnel-id`],`host-resolver-network-tunnel-id`,`text`)}},name:d(e.name,`name`,`text`),tls_settings:{cert_verification_mode:d(e[`tls-settings-cert-verification-mode`],`tls-settings-cert-verification-mode`,`text`)},type:e.type,http_port:e[`http-port`],https_port:e[`https-port`],app_protocol:e[`app-protocol`],tcp_port:e[`tcp-port`]}):l(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(h,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`The name field`)),e.type===void 0&&(e.type=await p(`type`,`The type field`,[`tcp`,`http`]));let g=u({host:{ipv4:d(e[`host-ipv4`],`host-ipv4`,`text`),network:{tunnel_id:d(e[`host-network-tunnel-id`],`host-network-tunnel-id`,`text`)},ipv6:d(e[`host-ipv6`],`host-ipv6`,`text`),hostname:d(e[`host-hostname`],`host-hostname`,`text`),resolver_network:{resolver_ips:e[`host-resolver-network-resolver-ips`],tunnel_id:d(e[`host-resolver-network-tunnel-id`],`host-resolver-network-tunnel-id`,`text`)}},name:d(e.name,`name`,`text`),tls_settings:{cert_verification_mode:d(e[`tls-settings-cert-verification-mode`],`tls-settings-cert-verification-mode`,`text`)},type:e.type,http_port:e[`http-port`],https_port:e[`https-port`],app_protocol:e[`app-protocol`],tcp_port:e[`tcp-port`]}),_=await s(`Creating`,async()=>c.send(h,{body:g,account_id:m}));a(_,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/connectivity/directory/services/${t.service_id}`,response:!1};function y(e){return e.usage(`$0 workers-vpc services delete <service-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{i as n,n as r}from"./auth-BaUNb1Ed.mjs";import{a as i,t as a}from"./context-BQ6KeMgq.mjs";import{t as o}from"./output-O6b9MR9R.mjs";import{t as s}from"./dry-run-DQmFkNK_.mjs";import{t as c}from"./progress-CdlDthXA.mjs";import{t as l}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as u,o as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-1AC-qwxS.mjs";import{n as _,t as ee}from"./raw-fetch-1VlXDwwX.mjs";var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/workflows/concurrency`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,409:`ConflictError`}};function te(e){return e.usage(`$0 workflows concurrency create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B7ZJ78al.mjs";import{i as n,n as r}from"./auth-BUQscD5b.mjs";import{a as i,t as a}from"./context-Sgba0fZP.mjs";import{t as o}from"./output-CpiIVa7Q.mjs";import{t as s}from"./dry-run-BBjUQUhR.mjs";import{t as c}from"./progress-B1dpmxCT.mjs";import{t as l}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{n as u,o as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-Y5OBwDVE.mjs";import{n as _,t as ee}from"./raw-fetch-DSdFjojI.mjs";var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/workflows/concurrency`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,409:`ConflictError`}};function te(e){return e.usage(`$0 workflows concurrency create
3
3
 
4
4
  Creates an account-scoped concurrency key. Limits count steps still in flight from a previously deleted key of the same name.`).option(`limit`,{type:`number`,description:`Maximum number of steps that may concurrently hold this key.`}).option(`name`,{type:`string`,description:`Unique (per account) name of the concurrency key. Referenced by workflow steps via step config.`}).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 ne={command:`create`,describe:`Create a concurrency key`,builder:te,handler:async e=>l({command:`workflows concurrency create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workflows concurrency create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workflows/concurrency`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({limit:e.limit,name:p(e.name,`name`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.send(v,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.limit===void 0)throw Error(`--limit is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await m(`name`,`Unique (per account) name of the concurrency key. Referenced by workflow steps via step config.`));let d=f({limit:e.limit,name:p(e.name,`name`,`text`)}),h=await c(`Creating`,async()=>n.send(v,{body:d,account_id:l}));o(h,{successLabel:`Created`})})};var re={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workflows/concurrency/${t.key_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function ie(e){return e.usage(`$0 workflows concurrency delete <key-id>
5
5