cf 1.0.0-beta.16 → 1.0.0-beta.18

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 (239) hide show
  1. package/dist/_meta/commands.json +6117 -4540
  2. package/dist/_meta/schemas.json +5016 -3257
  3. package/dist/{abuse-reports-17K-TRhO.mjs → abuse-reports-Ce-g5uZP.mjs} +6 -6
  4. package/dist/{access-BwB7sg1D.mjs → access-BtsMwesh.mjs} +1 -1
  5. package/dist/{accounts-BnIGu_ac.mjs → accounts-X5QVzEUW.mjs} +27 -21
  6. package/dist/{acm-CQRcu_zw.mjs → acm-C_NepMi6.mjs} +1 -1
  7. package/dist/{addressing-Qcm9jd3C.mjs → addressing-BkQY1hoA.mjs} +18 -18
  8. package/dist/{agent-memory-B3xN9I6-.mjs → agent-memory-1OPgC3lK.mjs} +6 -6
  9. package/dist/{ai-BRKOCckA.mjs → ai-Bb0_Zknm.mjs} +1 -1
  10. package/dist/{ai-audit-Cd9Rc2Fc.mjs → ai-audit-DuEjVdML.mjs} +1 -1
  11. package/dist/{ai-gateway-BWU5064V.mjs → ai-gateway-Cm2vWMSI.mjs} +42 -42
  12. package/dist/ai-search-DDRpxyOM.mjs +79 -0
  13. package/dist/{ai-security-Dn0Ee6QS.mjs → ai-security-A2STvE1b.mjs} +5 -5
  14. package/dist/{alerting-BXTiMfXo.mjs → alerting-CIwSk-Ks.mjs} +1 -1
  15. package/dist/{analytics-Jyd04TRW.mjs → analytics-H--uM3DA.mjs} +7 -7
  16. package/dist/{analytics-engine-CzrNfUeh.mjs → analytics-engine-Alu7cllT.mjs} +1 -1
  17. package/dist/{api-security-DRBHZaf_.mjs → api-security-D-pcnhUL.mjs} +26 -26
  18. package/dist/{argo-DiQt0pSb.mjs → argo-Lvmcx3am.mjs} +1 -1
  19. package/dist/{artifacts-eBZ4YN53.mjs → artifacts-xT5S-mVa.mjs} +1 -1
  20. package/dist/{audit-logs-Bb4HTZay.mjs → audit-logs-DEoRBLkU.mjs} +1 -1
  21. package/dist/{auth-C6My1gI6.mjs → auth-B73lQS2h.mjs} +1 -1
  22. package/dist/auth-DMzEmOhG.mjs +2 -0
  23. package/dist/{auth-eVI_UEt8.mjs → auth-Db1KT0vm.mjs} +1 -1
  24. package/dist/{auth-token-Cfj2yehs.mjs → auth-token-D9XIPlwf.mjs} +1 -1
  25. package/dist/{autoconfig-B0ESZ8DJ.mjs → autoconfig-9po_tqsS.mjs} +1 -1
  26. package/dist/{basin-catalog-Cwk1RSMX.mjs → basin-catalog-DFHt3cWi.mjs} +1 -1
  27. package/dist/{billing-CfV8oi6A.mjs → billing-Bm2JNSGa.mjs} +6 -6
  28. package/dist/body-parser-DnBfDdx3.mjs +2 -0
  29. package/dist/{bot-management-CH4_Kewx.mjs → bot-management-CSr38g-O.mjs} +4 -4
  30. package/dist/{botnet-feed-Cg_Wp8ei.mjs → botnet-feed-ebeWWSJj.mjs} +1 -1
  31. package/dist/{brand-protection-Cp2ckWou.mjs → brand-protection-BCn9Mv-d.mjs} +5 -5
  32. package/dist/browser-run-BcWxzhAn.mjs +42 -0
  33. package/dist/build-BRJnyeu8.mjs +2 -0
  34. package/dist/{build-sBpqm9ga.mjs → build-i8l2qGVZ.mjs} +1 -1
  35. package/dist/{builds-B2RBgVL9.mjs → builds-BMwDzi7G.mjs} +39 -39
  36. package/dist/{cache-yvrYPvRI.mjs → cache-_VaTLC5T.mjs} +1 -1
  37. package/dist/chunk-JP6R7L72-C0kFUelb.mjs +2 -0
  38. package/dist/cli-P3q5DG3W.mjs +6 -0
  39. package/dist/{client-side-security-D50iZjd_.mjs → client-side-security-CjSXrpa9.mjs} +1 -1
  40. package/dist/{cloud-connector-wvSGdxWT.mjs → cloud-connector-BPJBeP06.mjs} +1 -1
  41. package/dist/{cloudforce-one-j6vlmaMB.mjs → cloudforce-one-DXX31GMi.mjs} +189 -189
  42. package/dist/{command-CM_f48gs.mjs → command-BXiA79DP.mjs} +1 -1
  43. package/dist/{command-CmUtmu5j.mjs → command-BbsPxJBT.mjs} +1 -1
  44. package/dist/{command-BDpm-U8z.mjs → command-Bkc04OyY.mjs} +1 -1
  45. package/dist/{command-BSbhJRmu.mjs → command-BtTc28ql.mjs} +1 -1
  46. package/dist/{command-DFRsim8q.mjs → command-CBZhxmKD.mjs} +1 -1
  47. package/dist/{command-BbO3sBQ2.mjs → command-CL7LLXM7.mjs} +1 -1
  48. package/dist/{command-DQojhTEQ.mjs → command-CYyfigfC.mjs} +1 -1
  49. package/dist/{command-DiqRELHF.mjs → command-CxWLFv5Y.mjs} +1 -1
  50. package/dist/{command-74P4_CTx.mjs → command-DDcBC4px.mjs} +1 -1
  51. package/dist/{command-Dr4PEvB2.mjs → command-NoxvOARP.mjs} +1 -1
  52. package/dist/{completions-oD1EcuHk.mjs → completions-CrDmwKnK.mjs} +1 -1
  53. package/dist/{connector-interrupts-DP4rbOe8.mjs → connector-interrupts-V4HGULCM.mjs} +1 -1
  54. package/dist/{connector-telemetry-events-BQGBQwzR.mjs → connector-telemetry-events-D9mTcfbJ.mjs} +1 -1
  55. package/dist/{connector-telemetry-snapshots-DBO0Mdcj.mjs → connector-telemetry-snapshots-COrPVKol.mjs} +1 -1
  56. package/dist/{connectors-BSVr3Kz1.mjs → connectors-DvVlxGDx.mjs} +1 -1
  57. package/dist/{containers-BTqAeVV2.mjs → containers-Bt2zFsFd.mjs} +8 -8
  58. package/dist/{containers-BOpKpipz.mjs → containers-BtcOgwm5.mjs} +2 -2
  59. package/dist/{content-scan-B9Keyxe-.mjs → content-scan-DldLmTjy.mjs} +1 -1
  60. package/dist/{context-B-vEsyrK.mjs → context-C_a8oSY9.mjs} +1 -1
  61. package/dist/cps-REo1OWP1.mjs +6 -0
  62. package/dist/csam-scanner-CIbbdoJK.mjs +10 -0
  63. package/dist/{custom-csrs-DM5X-K6H.mjs → custom-csrs-iGNc3rSZ.mjs} +1 -1
  64. package/dist/{custom-hostnames-BBjqaiFF.mjs → custom-hostnames-BNxYbTyu.mjs} +15 -15
  65. package/dist/{custom-nameservers-C0NDMLPJ.mjs → custom-nameservers-BMJoTSlQ.mjs} +1 -1
  66. package/dist/custom-pages-Qdemt1Fm.mjs +21 -0
  67. package/dist/{d1-hin5PmxW.mjs → d1-DvCiQibO.mjs} +8 -8
  68. package/dist/{deploy-Bo7FtE44.mjs → deploy-K664XPOb.mjs} +1 -1
  69. package/dist/{deploy-context-ClvBD87y.mjs → deploy-context-ClNVJYlR.mjs} +13 -13
  70. package/dist/{deploy-input-BqJ7GVZ-.mjs → deploy-input-KK6yyBN_.mjs} +1 -1
  71. package/dist/{dev-EtnMYA7K.mjs → dev-CnoMHxf4.mjs} +1 -1
  72. package/dist/{diagnostics-LZuMrGjK.mjs → diagnostics-Cw0mtcep.mjs} +2 -2
  73. package/dist/{dls-Bq8k3iy-.mjs → dls-DoqfqutH.mjs} +1 -1
  74. package/dist/{dns-ry5E2Bsa.mjs → dns-DC6WcO3m.mjs} +21 -21
  75. package/dist/{dns-firewall-zavP5Qxj.mjs → dns-firewall-DpQH9BCE.mjs} +9 -9
  76. package/dist/{docs-B08YtL0U.mjs → docs-CqNRBHab.mjs} +1 -1
  77. package/dist/{durable-objects-B9fo41B1.mjs → durable-objects-CJDDy3CC.mjs} +1 -1
  78. package/dist/{email-auth-D9LGjFlh.mjs → email-auth--NHg1TjG.mjs} +1 -1
  79. package/dist/{email-routing-6iDnNPhY.mjs → email-routing-COjENK55.mjs} +13 -13
  80. package/dist/{email-security-ty4ufRnJ.mjs → email-security-rdjH95T2.mjs} +38 -38
  81. package/dist/{email-sending-d7LO_Cz_.mjs → email-sending-26VJhR6Q.mjs} +18 -18
  82. package/dist/{field-extractors-DkgQ7PSw.mjs → field-extractors-DBOvGOwz.mjs} +2 -2
  83. package/dist/{firewall-Q88YyEwD.mjs → firewall-D8K93ffF.mjs} +20 -20
  84. package/dist/{flagship-CzI8zhd6.mjs → flagship-CHdmCmvQ.mjs} +11 -11
  85. package/dist/{fraud-CvFXTR0w.mjs → fraud-CY4TV5Vc.mjs} +1 -1
  86. package/dist/{google-tag-gateway-Y2zbyey8.mjs → google-tag-gateway-DzSt4wlz.mjs} +1 -1
  87. package/dist/healthchecks-B52Mf3uL.mjs +22 -0
  88. package/dist/{hostnames-B3k7fIUL.mjs → hostnames-BMITIM8P.mjs} +1 -1
  89. package/dist/{hyperdrive-BWGYz95H.mjs → hyperdrive-CHsW0r6Z.mjs} +1 -1
  90. package/dist/{iam-AXco_qmt.mjs → iam-o1n9eUXf.mjs} +9 -9
  91. package/dist/{images-BzYh8y0u.mjs → images-CJHAGxX6.mjs} +37 -37
  92. package/dist/index.mjs +1 -1
  93. package/dist/{init-DlenHBtS.mjs → init-CqQDL6i3.mjs} +1 -1
  94. package/dist/{intel-BBi3i_GU.mjs → intel-B3S1gxUg.mjs} +1 -1
  95. package/dist/{ips-CWG2b7AM.mjs → ips-q_UJMiy8.mjs} +1 -1
  96. package/dist/{k2-DXdMe3Cb.mjs → k2-BNqVZnDN.mjs} +2 -2
  97. package/dist/{kv-FUd7UdDu.mjs → kv-B0nXSOcW.mjs} +1 -1
  98. package/dist/{lazy-command-BC8rIlHu.mjs → lazy-command-4ccdBqrc.mjs} +1 -1
  99. package/dist/{leaked-credential-checks-BufVA9vL.mjs → leaked-credential-checks-BXwIjlTs.mjs} +1 -1
  100. package/dist/load-balancers-DJtMztJ0.mjs +76 -0
  101. package/dist/{login-DVbXZ_Tv.mjs → login-D-1FiBNv.mjs} +1 -1
  102. package/dist/{login-BJr2PBaJ.mjs → login-chQP8825.mjs} +1 -1
  103. package/dist/{logo-matches-BluaPvMa.mjs → logo-matches-qVYq8tWL.mjs} +1 -1
  104. package/dist/{logos-CXtmYWEJ.mjs → logos-tnIahhcu.mjs} +1 -1
  105. package/dist/{logpush-DCYgrqz0.mjs → logpush-D4s3pJRw.mjs} +24 -24
  106. package/dist/{logs-as60IP29.mjs → logs-cw7UL5V2.mjs} +3 -3
  107. package/dist/{magic-cloud-networking-0RsHugUF.mjs → magic-cloud-networking-CLEHztNY.mjs} +1 -1
  108. package/dist/{magic-network-monitoring-CPqvZdcb.mjs → magic-network-monitoring-DRwygeVq.mjs} +9 -9
  109. package/dist/{magic-transit-ClPyGzOE.mjs → magic-transit-BFopRdPs.mjs} +170 -170
  110. package/dist/{managed-defense-P4_QWSbK.mjs → managed-defense-D5kpmq0T.mjs} +9 -9
  111. package/dist/{managed-transforms-CUwQXMij.mjs → managed-transforms-CT4jjnzJ.mjs} +2 -2
  112. package/dist/{matches-BjckDBW1.mjs → matches-ClJ_24EY.mjs} +1 -1
  113. package/dist/{mcp-C2EG2c7L.mjs → mcp-50os3IRG.mjs} +10 -10
  114. package/dist/{mesh-CpMZA7Xt.mjs → mesh-jxtQP8sS.mjs} +2 -2
  115. package/dist/{migrate-6e5mJ79R.mjs → migrate-DerOyuv2.mjs} +1 -1
  116. package/dist/{monetization-DypuCZmU.mjs → monetization-D6cCDi-h.mjs} +4 -4
  117. package/dist/{network-DQ5Ridgy.mjs → network-dnWHB2uY.mjs} +27 -25
  118. package/dist/{network-interconnects-ifU4JhGE.mjs → network-interconnects-Cf8qSVdt.mjs} +1 -1
  119. package/dist/{o11y-CzssfRHt.mjs → o11y-oMSg1pG4.mjs} +49 -49
  120. package/dist/{oauth-BNTiErBG.mjs → oauth-BfBdHhPS.mjs} +1 -1
  121. package/dist/{oauth-BDdhqasa.mjs → oauth-DDOiiH7h.mjs} +1 -1
  122. package/dist/{oauth-clients-gknNcBdV.mjs → oauth-clients-XDmoe-b4.mjs} +1 -1
  123. package/dist/{oauth-scopes-BJeSanuF.mjs → oauth-scopes-D9VYGuTs.mjs} +1 -1
  124. package/dist/open-PCXX3ZDZ-5J5IU2MX-CKla-jDt.mjs +4 -0
  125. package/dist/organization-94lHeeOs.mjs +75 -0
  126. package/dist/{organizations-kfFFW4uO.mjs → organizations-BJf3UTFi.mjs} +1 -1
  127. package/dist/{origin-post-quantum-encryption-DfrnptJ1.mjs → origin-post-quantum-encryption-DMytVSUZ.mjs} +1 -1
  128. package/dist/{page-rules-ByrDMDBZ.mjs → page-rules-BUI-50oz.mjs} +4 -4
  129. package/dist/pages-CcdpCzHs.mjs +54 -0
  130. package/dist/pay-per-crawl-B1uHZn9j.mjs +38 -0
  131. package/dist/{pay-per-use-49EXt75f.mjs → pay-per-use-t066I5wm.mjs} +7 -7
  132. package/dist/{pipelines-Bvgh1BQZ.mjs → pipelines-Co6S044l.mjs} +8 -8
  133. package/dist/precursor-BftyvS86.mjs +4 -0
  134. package/dist/previews-BLhnhElx.mjs +7 -0
  135. package/dist/{progress-R-1tIuep.mjs → progress-Q5w9PNTT.mjs} +1 -1
  136. package/dist/{prompt-dgLm0iFJ.mjs → prompt-C0hKSr-R.mjs} +1 -1
  137. package/dist/{queries-EbIadtC5.mjs → queries-4MubO6Sz.mjs} +3 -3
  138. package/dist/{queues-C4GZ-O3f.mjs → queues-CteS5M92.mjs} +17 -17
  139. package/dist/{r2-DEuFfWBR.mjs → r2-2QpT_Gso.mjs} +24 -24
  140. package/dist/{radar-CDOERVcR.mjs → radar-ODKaK4FJ.mjs} +1 -1
  141. package/dist/{raw-fetch-BapeoreV.mjs → raw-fetch-CEOuoKl9.mjs} +1 -1
  142. package/dist/{realtime-D_A9Qgly.mjs → realtime-DkfU8uEX.mjs} +84 -84
  143. package/dist/registrar-DM6JTVPS.mjs +43 -0
  144. package/dist/{registrar-sandbox-BF3cYO3n.mjs → registrar-sandbox-BPNGf65G.mjs} +11 -9
  145. package/dist/{reporting-BWm9jIF8.mjs → reporting-5yFNXbJg.mjs} +1 -1
  146. package/dist/{request-headers-BRxv6NkA.mjs → request-headers-DXvswze2.mjs} +1 -1
  147. package/dist/request-tracers-BarLZY95.mjs +4 -0
  148. package/dist/{resource-sharing-C186jZv0.mjs → resource-sharing-BVEwBPs8.mjs} +19 -19
  149. package/dist/{rules-DYnGIU_0.mjs → rules-_C31X4Jz.mjs} +6 -6
  150. package/dist/{rulesets-BcNrbVcq.mjs → rulesets-8RwxoFhG.mjs} +6 -6
  151. package/dist/{rum-BDyRecfp.mjs → rum-CAUcpXpM.mjs} +6 -6
  152. package/dist/{run-BvDCuZ8q.mjs → run-DtFLvOHB.mjs} +1 -1
  153. package/dist/run-LcOb9rhI.mjs +2 -0
  154. package/dist/{schema-flags-DcKjAxI1.mjs → schema-flags-DibfxEF6.mjs} +1 -1
  155. package/dist/{scim-zn-CNCsc.mjs → scim-DX5XrQ4w.mjs} +1 -1
  156. package/dist/{secrets-store-CFhyQUV6.mjs → secrets-store-DSqqrr25.mjs} +1 -1
  157. package/dist/{security-insights-D8XgtCed.mjs → security-insights-FSktO04S.mjs} +1 -1
  158. package/dist/{security-txt-CCM-Vro0.mjs → security-txt-D2g3lQdg.mjs} +1 -1
  159. package/dist/{shared-ouAF7o4S.mjs → shared-eefMO8R4.mjs} +1 -1
  160. package/dist/smart-shield-IVb2sR0C.mjs +24 -0
  161. package/dist/{snippets-B2jBY0m_.mjs → snippets-cWwWficN.mjs} +2 -2
  162. package/dist/{spawn-DQttFH05.mjs → spawn-BW2bJmKO.mjs} +1 -1
  163. package/dist/{spectrum-Cf_4cGE8.mjs → spectrum-DYiIBYRB.mjs} +1 -1
  164. package/dist/{speed-DoXdyIYK.mjs → speed-C7uiW2Wf.mjs} +1 -1
  165. package/dist/{sql-Bze4h80q.mjs → sql-TGV8qQMj.mjs} +1 -1
  166. package/dist/{src-BguQDHjS.mjs → src-BUH-P_zd.mjs} +5 -5
  167. package/dist/ssl-xQP_HbWN.mjs +139 -0
  168. package/dist/{stream-BcReYIHJ.mjs → stream-CfWgj8Cr.mjs} +55 -55
  169. package/dist/{submit-ldFVNfNC.mjs → submit-DxGr1T40.mjs} +1 -1
  170. package/dist/tags-LEJ2VYhQ.mjs +23 -0
  171. package/dist/{telemetry-Cojgz4Sv.mjs → telemetry-BHne10Yy.mjs} +1 -1
  172. package/dist/telemetry-BavSU4ku.mjs +2 -0
  173. package/dist/{tenant-AZ0EAsmT.mjs → tenant-7d5vwc6K.mjs} +1 -1
  174. package/dist/{tenant-custom-nameservers-aozjaasc.mjs → tenant-custom-nameservers-BkxlPr5O.mjs} +1 -1
  175. package/dist/{tunnels-CXez5LPB.mjs → tunnels-DlGODvwT.mjs} +4 -4
  176. package/dist/{turnstile-B2NQ8Nsk.mjs → turnstile-DhLkdhij.mjs} +5 -5
  177. package/dist/update-check-nLfkSfdz.mjs +2 -0
  178. package/dist/update-check-worker.mjs +1 -1
  179. package/dist/{update-check-BlyKN8m0.mjs → update-check-wvjOsnGK.mjs} +1 -1
  180. package/dist/{url-info-D_UqGiWD.mjs → url-info-CeoV5dBc.mjs} +1 -1
  181. package/dist/{url-normalization-CF1YHpIN.mjs → url-normalization-9NoaoRNh.mjs} +1 -1
  182. package/dist/{url-scanner-ChF3GO2U.mjs → url-scanner-w_-Sumz-.mjs} +8 -8
  183. package/dist/{user-BfWRsdJh.mjs → user-D33B3alX.mjs} +59 -59
  184. package/dist/{vectorize-CRYbWKg5.mjs → vectorize-Wp9De13y.mjs} +17 -17
  185. package/dist/version-B2RUUqGT.mjs +2 -0
  186. package/dist/{waiting-rooms-Crp7MVd9.mjs → waiting-rooms-BE8FloRd.mjs} +13 -13
  187. package/dist/{web-assets-CgyrPnT-.mjs → web-assets-ew0iaP7c.mjs} +35 -35
  188. package/dist/{web3-Cd0Yd0eQ.mjs → web3-BUyXBaqq.mjs} +6 -6
  189. package/dist/{workers-builds-f2nVw7EZ.mjs → workers-builds-DzU9NGno.mjs} +7 -7
  190. package/dist/{workers-for-platforms-DjeKp2uy.mjs → workers-for-platforms-B4xzFNxJ.mjs} +25 -22
  191. package/dist/{workers-CTwJpTfJ.mjs → workers-pP5tsDbD.mjs} +25 -22
  192. package/dist/{workers-vpc-B_L3TEg2.mjs → workers-vpc-Bre_t9Al.mjs} +1 -1
  193. package/dist/{workflows-CBPGf65x.mjs → workflows-DXYGKtqq.mjs} +1 -1
  194. package/dist/wrangler-migration-R9TQ_4Qd.mjs +946 -0
  195. package/dist/zaraz-DoH4QD0u.mjs +22 -0
  196. package/dist/{zero-trust-B9xY8zcn.mjs → zero-trust-DKt20rzE.mjs} +461 -458
  197. package/dist/{zone-CmwVqTI2.mjs → zone-BXM3p0JR.mjs} +1 -1
  198. package/dist/{zones-Bf0VVpMf.mjs → zones-CJdtqEBx.mjs} +21 -21
  199. package/package.json +11 -11
  200. package/dist/account-tags-povXTDAu.mjs +0 -15
  201. package/dist/ai-search-CJ3b8eot.mjs +0 -79
  202. package/dist/auth-OFqV2M4q.mjs +0 -2
  203. package/dist/body-parser-DkHKPkJ7.mjs +0 -2
  204. package/dist/browser-run-CfQ30dB6.mjs +0 -42
  205. package/dist/build-Bm6kGyzo.mjs +0 -2
  206. package/dist/certificate-authorities-BdMRaOnD.mjs +0 -6
  207. package/dist/cli-CsnoQloF.mjs +0 -6
  208. package/dist/client-certificates-CuWGvZSr.mjs +0 -13
  209. package/dist/cps-VRP794c5.mjs +0 -6
  210. package/dist/csam-scanner-C1jOgXVu.mjs +0 -10
  211. package/dist/ct-alerting-Y9vfa6Fo.mjs +0 -5
  212. package/dist/custom-certificates-CojTEC0E.mjs +0 -17
  213. package/dist/custom-pages-M4RUxcn6.mjs +0 -21
  214. package/dist/dcv-delegation-KOO8syyQ.mjs +0 -4
  215. package/dist/healthchecks-4Hz-6xYi.mjs +0 -22
  216. package/dist/keyless-certificates-B4ta_OGS.mjs +0 -13
  217. package/dist/keys-B9zvFzrf.mjs +0 -4
  218. package/dist/load-balancers-CWd9mSWM.mjs +0 -76
  219. package/dist/mtls-certificates-B5AWTU6u.mjs +0 -13
  220. package/dist/organization-CXAM41sd.mjs +0 -71
  221. package/dist/origin-ca-certificates-DwhYV3m_.mjs +0 -11
  222. package/dist/origin-tls-client-auth-COSxTc2q.mjs +0 -30
  223. package/dist/pages-DuGcBC6k.mjs +0 -54
  224. package/dist/pay-per-crawl-B3_Gn9Cj.mjs +0 -38
  225. package/dist/precursor-VobQf--m.mjs +0 -4
  226. package/dist/previews-DkwFHNRx.mjs +0 -7
  227. package/dist/registrar-X1YLlnmg.mjs +0 -43
  228. package/dist/request-tracers-CHWpiejG.mjs +0 -4
  229. package/dist/resource-tagging-BTagOZli.mjs +0 -4
  230. package/dist/run-roYb_Odh.mjs +0 -2
  231. package/dist/smart-shield-DwW7N92r.mjs +0 -24
  232. package/dist/ssl-u_0gUhPA.mjs +0 -45
  233. package/dist/tags-D_Hc_A-r.mjs +0 -4
  234. package/dist/telemetry-Ct_2AaO4.mjs +0 -2
  235. package/dist/update-check-BnGDxswi.mjs +0 -2
  236. package/dist/values-CLfxkAUJ.mjs +0 -4
  237. package/dist/version-CVlh2Zaq.mjs +0 -2
  238. package/dist/wrangler-migration-DxTB5yPT.mjs +0 -2
  239. package/dist/zaraz-3VDxl0gF.mjs +0 -22
@@ -1,40 +1,43 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-eVI_UEt8.mjs";import{a as i,t as a}from"./context-B-vEsyrK.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-R-1tIuep.mjs";import{t as l}from"./run-BvDCuZ8q.mjs";import"./telemetry-Ct_2AaO4.mjs";import{n as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f,t as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-dgLm0iFJ.mjs";var _={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-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-Db1KT0vm.mjs";import{a as i,t as a}from"./context-C_a8oSY9.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-Q5w9PNTT.mjs";import{t as l}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-DnBfDdx3.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-C0hKSr-R.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
- 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 v={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?d({name:f(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(_,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}let p=d({name:f(e.name,`name`,`text`)}),m=await c(`Creating`,async()=>n.send(_,{body:p,account_id:l}));o(m,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}`};function b(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces delete <dispatch-namespace>
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`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(y,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}let u=p({name:m(e.name,`name`,`text`)}),f=await c(`Creating`,async()=>n.send(y,{body:u,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
 
6
- Delete a Workers for Platforms dispatch namespace.`).positional(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const x={command:`delete <dispatch-namespace>`,describe:`Delete Workers for Platforms Dispatch Namespace`,builder:b,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`This will permanently delete the Workers for Platforms dispatch namespace.`})){process.stderr.write(`Aborted.
7
- `);return}let u=await c(`Deleting`,async()=>n.send(y,{account_id:l,dispatch_namespace:e[`dispatch-namespace`]}));o(u,{successLabel:`Deleted`})})};var S={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}`};function C(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces get <dispatch-namespace>
6
+ Delete a Workers for Platforms dispatch namespace.`).positional(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,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 S={command:`delete <dispatch-namespace>`,describe:`Delete Workers for Platforms Dispatch Namespace`,builder:x,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`This will permanently delete the Workers for Platforms dispatch namespace.`})){process.stderr.write(`Aborted.
7
+ `);return}let u=await c(`Deleting`,async()=>n.send(b,{account_id:l,dispatch_namespace:e[`dispatch-namespace`]}));o(u,{successLabel:`Deleted`})})};var C={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}`};function w(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces get <dispatch-namespace>
8
8
 
9
- Get a Workers for Platforms dispatch namespace.`).positional(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <dispatch-namespace>`,describe:`Get Workers for Platforms Dispatch Namespace`,builder:C,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(S,{account_id:l,dispatch_namespace:e[`dispatch-namespace`]}));o(u,{successLabel:`Loaded`})})};var T={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces`};function E(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces list
9
+ Get a Workers for Platforms dispatch namespace.`).positional(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <dispatch-namespace>`,describe:`Get Workers for Platforms Dispatch Namespace`,builder:w,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(C,{account_id:l,dispatch_namespace:e[`dispatch-namespace`]}));o(u,{successLabel:`Loaded`})})};var E={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces`};function D(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces list
10
10
 
11
- Fetch a list of Workers for Platforms dispatch namespaces.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List Workers for Platforms Dispatch Namespaces`,builder:E,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf workers-for-platforms dispatch-namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/dispatch/namespaces`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(T,{account_id:l}));o(u,{successLabel:`Loaded`})})};var O={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/bindings`};function k(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts bindings get <script-name>
11
+ Fetch a list of Workers for Platforms dispatch namespaces.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List Workers for Platforms Dispatch Namespaces`,builder:D,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf workers-for-platforms dispatch-namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/dispatch/namespaces`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(E,{account_id:l}));o(u,{successLabel:`Loaded`})})};var k={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/bindings`};function A(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts bindings get <script-name>
12
12
 
13
- Fetch bindings from a script uploaded to a Workers for Platforms dispatch namespace.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`get <script-name>`,describe:`Get Workers for Platforms Script Bindings`,builder:k,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts bindings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts bindings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/bindings`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(O,{account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(u,{successLabel:`Loaded`})})},j={command:`bindings`,describe:`Operations for dispatch-namespaces.scripts.bindings`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}`,query:[`force`]};function N(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts delete <script-name>
13
+ Fetch bindings from a script uploaded to a Workers for Platforms dispatch namespace.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get <script-name>`,describe:`Get Workers for Platforms Script Bindings`,builder:A,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts bindings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts bindings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/bindings`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(k,{account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(u,{successLabel:`Loaded`})})},M={command:`bindings`,describe:`Operations for dispatch-namespaces.scripts.bindings`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var N={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}`,query:[`force`]};function P(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts delete <script-name>
14
14
 
15
- Delete a script from a Workers for Platforms dispatch namespace. This call has no response body on a successful delete.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`delete-with-references`,{type:`boolean`,description:`If true, delete the script even when other Workers still reference it. Service bindings in those Workers may be left broken. Durable Object namespaces implemented by the deleted script 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 P={command:`delete <script-name>`,describe:`Delete Workers for Platforms Script`,builder:N,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts delete`,classification:{safeFlags:[`delete-with-references`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={force:e[`delete-with-references`]};if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await g({force:!!e.force,message:`This will permanently delete the Workers for Platforms script.`})){process.stderr.write(`Aborted.
16
- `);return}let d=await c(`Deleting`,async()=>l.send(M,{account_id:u,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`],...n}));o(d,{successLabel:`Deleted`})})};var F={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}`};function I(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts get <script-name>
15
+ Delete a script from a Workers for Platforms dispatch namespace. This call has no response body on a successful delete.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`delete-with-references`,{type:`boolean`,description:`If true, delete the script even when other Workers still reference it. Service bindings in those Workers may be left broken. Durable Object namespaces implemented by the deleted script 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 F={command:`delete <script-name>`,describe:`Delete Workers for Platforms Script`,builder:P,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts delete`,classification:{safeFlags:[`delete-with-references`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={force:e[`delete-with-references`]};if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await v({force:!!e.force,message:`This will permanently delete the Workers for Platforms script.`})){process.stderr.write(`Aborted.
16
+ `);return}let d=await c(`Deleting`,async()=>l.send(N,{account_id:u,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`],...n}));o(d,{successLabel:`Deleted`})})};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}`};function L(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts get <script-name>
17
17
 
18
- Fetch information about a script uploaded to a Workers for Platforms dispatch namespace.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <script-name>`,describe:`Get Workers for Platforms Script details`,builder:I,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(F,{account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(u,{successLabel:`Loaded`})})};var R={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts`,query:[`tags`]};function z(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts list
18
+ Fetch information about a script uploaded to a Workers for Platforms dispatch namespace.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`get <script-name>`,describe:`Get Workers for Platforms Script details`,builder:L,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(I,{account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(u,{successLabel:`Loaded`})})};var z={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts`,query:[`tags`]};function B(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts list
19
19
 
20
- Fetch a list of scripts uploaded to a Workers for Platforms dispatch namespace.`).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`tags`,{type:`string`,description:`Filter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`list`,describe:`List Workers for Platforms Scripts`,builder:z,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={tags:e.tags};if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(R,{account_id:u,dispatch_namespace:e[`dispatch-namespace`],...n}));o(d,{successLabel:`Loaded`})})};function V(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets bulk
20
+ Fetch a list of scripts uploaded to a Workers for Platforms dispatch namespace.`).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`tags`,{type:`string`,description:`Filter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list`,describe:`List Workers for Platforms Scripts`,builder:B,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={tags:e.tags};if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(z,{account_id:u,dispatch_namespace:e[`dispatch-namespace`],...n}));o(d,{successLabel:`Loaded`})})};function H(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets bulk
21
21
 
22
- Create, update, or delete multiple secrets on a Workers for Platforms 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(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).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 H={command:`bulk`,describe:`Patch multiple Workers for Platforms script secrets`,builder:V,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets bulk`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets bulk`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?void 0:u(e.body):{file:e.file}});return}let l=await r(e),d=e.local?t:await a();if(e.accountId=d,e.file){let t=p(e.file),r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${d}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,{body:t,headers:{"Content-Type":`application/merge-patch+json`}}));o(r,{successLabel:`Updated`});return}if(e.body){let t=u(e.body),r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${d}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,{body:t}));o(r,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var U={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/secrets/${t.secret_name}`,query:[`url_encoded`]};function W(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets delete <secret-name>
22
+ Create, update, or delete multiple secrets on a Workers for Platforms 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(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`secrets`,{type:`string`,description:`Map of secret names to secret values:
23
+ - Set to a secret object to create or update.
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 U={command:`bulk`,describe:`Patch multiple Workers for Platforms script secrets`,builder:H,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts 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 i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets bulk`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?p({secrets:f(e.secrets,`secrets`),version_tags:f(e[`version-tags`],`version-tags`)},[[`secrets`],[`version_tags`]]):d(e.body):{file:e.file}});return}let l=await r(e),m=e.local?t:await a();if(e.accountId=m,e.file){let t=h(e.file),r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${m}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,{body:t,headers:{"Content-Type":`application/merge-patch+json`}}));o(r,{successLabel:`Updated`});return}if(e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${m}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,{body:t}));o(r,{successLabel:`Updated`});return}let g={};e.secrets!==void 0&&u(g,[`secrets`],f(e.secrets,`secrets`)),e[`version-tags`]!==void 0&&u(g,[`version_tags`],f(e[`version-tags`],`version-tags`));let _=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${m}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,{body:g}));o(_,{successLabel:`Updated`})})};var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/secrets/${t.secret_name}`,query:[`url_encoded`]};function W(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets delete <secret-name>
23
26
 
24
- Remove a secret from a Workers for Platforms 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(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).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 G={command:`delete <secret-name>`,describe:`Delete Workers for Platforms script secret`,builder:W,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets delete`,classification:{safeFlags:[`url-encoded`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={url_encoded:e[`url-encoded`]};if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await g({force:!!e.force,message:`This will permanently delete the Workers for Platforms script secret.`})){process.stderr.write(`Aborted.
25
- `);return}let d=await c(`Deleting`,async()=>l.send(U,{account_id:u,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`],secret_name:e[`secret-name`],...n}));o(d,{successLabel:`Deleted`})})};var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/secrets/${t.secret_name}`,query:[`url_encoded`]};function K(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets get <secret-name>
27
+ Remove a secret from a Workers for Platforms 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(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).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 G={command:`delete <secret-name>`,describe:`Delete Workers for Platforms script secret`,builder:W,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets delete`,classification:{safeFlags:[`url-encoded`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={url_encoded:e[`url-encoded`]};if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await v({force:!!e.force,message:`This will permanently delete the Workers for Platforms script secret.`})){process.stderr.write(`Aborted.
28
+ `);return}let d=await c(`Deleting`,async()=>l.send(ne,{account_id:u,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`],secret_name:e[`secret-name`],...n}));o(d,{successLabel:`Deleted`})})};var K={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/secrets/${t.secret_name}`,query:[`url_encoded`]};function q(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets get <secret-name>
26
29
 
27
- Get a given secret binding (value omitted) on a script uploaded to a Workers for Platforms dispatch namespace.`).positional(`secret-name`,{type:`string`,description:`A JavaScript variable name for the secret binding.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).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 q={command:`get <secret-name>`,describe:`Get Workers for Platforms Script Secret`,builder:K,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets get`,classification:{safeFlags:[`url-encoded`,`dry-run`]}},e,async()=>{let n={url_encoded:e[`url-encoded`]};if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(te,{account_id:u,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`],secret_name:e[`secret-name`],...n}));o(d,{successLabel:`Loaded`})})};var J={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/secrets`};function Y(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets list
30
+ Get a given secret binding (value omitted) on a script uploaded to a Workers for Platforms dispatch namespace.`).positional(`secret-name`,{type:`string`,description:`A JavaScript variable name for the secret binding.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).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 J={command:`get <secret-name>`,describe:`Get Workers for Platforms Script Secret`,builder:q,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets get`,classification:{safeFlags:[`url-encoded`,`dry-run`]}},e,async()=>{let n={url_encoded:e[`url-encoded`]};if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(K,{account_id:u,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`],secret_name:e[`secret-name`],...n}));o(d,{successLabel:`Loaded`})})};var Y={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/secrets`};function X(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets list
28
31
 
29
- List secrets bound to a script uploaded to a Workers for Platforms dispatch namespace.`).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`list`,describe:`List Workers for Platforms Script Secrets`,builder:Y,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(J,{account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(u,{successLabel:`Loaded`})})};var Z={method:`PUT`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/secrets`,body:`json`,errors:{429:`TooManyRequestsError`}};function Q(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets update <script-name>
32
+ List secrets bound to a script uploaded to a Workers for Platforms dispatch namespace.`).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`List Workers for Platforms Script Secrets`,builder:X,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Y,{account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(u,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/secrets`,body:`json`,errors:{429:`TooManyRequestsError`}};function re(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets update <script-name>
30
33
 
31
- Add a secret to a Workers for Platforms 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(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`name`,{type:`string`,description:`A JavaScript variable name for the binding.`}).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=>f(e,`type`,`text`)).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=>f(e,`format`,`text`)).option(`key-base64`,{type:`string`,description:'Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki".'}).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`,[`format`,`key-base64`,`usages`]).conflicts(`format`,[`text`]).implies(`format`,[`usages`]).conflicts(`key-base64`,[`text`]).conflicts(`usages`,[`text`]).implies(`usages`,[`format`])}const ne={command:`update <script-name>`,describe:`Add a secret to a Workers for Platforms script`,builder:Q,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets update`,classification:{safeFlags:[`type`,`format`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`),text:f(e.text,`text`,`text`),type:e.type,format:e.format,key_base64:f(e[`key-base64`],`key-base64`,`text`),usages:e.usages}):u(e.body),sensitiveBodyPaths:[[`text`],[`key_base64`]]});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(`Updating`,async()=>n.send(Z,{body:t,account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(r,{successLabel:`Updated`});return}if(e.name===void 0&&(e.name=await m(`name`,`A JavaScript variable name for the binding.`)),e.type===void 0&&(e.type=await h(`type`,`The kind of resource that the binding provides.`,[`secret_text`,`secret_key`])),e.type===`secret_text`&&e.text===void 0&&(e.text=await m(`text`,`The secret value to use.`,{kind:`secret`,question:`Enter value for --text`})),e.type===`secret_key`)throw Error(`The secret_key variant requires algorithm, which cannot be supplied as flags. Pass --body with a complete request body.`);let p=d({name:f(e.name,`name`,`text`),text:f(e.text,`text`,`text`),type:e.type,format:e.format,key_base64:f(e[`key-base64`],`key-base64`,`text`),usages:e.usages}),g=await c(`Updating`,async()=>n.send(Z,{body:p,account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(g,{successLabel:`Updated`})})},re={command:`secrets`,describe:`Operations for dispatch-namespaces.scripts.secrets`,builder:e=>e.command(H).command(G).command(q).command(X).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ie={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/settings`,pathParams:[`account_id`,`dispatch_namespace`,`script_name`],body:`form`};function ae(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts settings edit <script-name>
34
+ Add a secret to a Workers for Platforms 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(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`name`,{type:`string`,description:`A JavaScript variable name for the binding.`}).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=>m(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=>m(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 ie={command:`update <script-name>`,describe:`Add a secret to a Workers for Platforms script`,builder:re,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets update`,classification:{safeFlags:[`type`,`format`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),text:m(e.text,`text`,`text`),type:e.type,algorithm:f(e.algorithm,`algorithm`),format:e.format,key_base64:m(e[`key-base64`],`key-base64`,`text`),key_jwk:f(e[`key-jwk`],`key-jwk`),usages:e.usages},[[`algorithm`],[`key_jwk`]]):d(e.body),sensitiveBodyPaths:[[`text`],[`key_base64`],[`key_jwk`]]});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(Q,{body:t,account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(r,{successLabel:`Updated`});return}if(e.name===void 0&&(e.name=await g(`name`,`A JavaScript variable name for the binding.`)),e.type===void 0&&(e.type=await _(`type`,`The kind of resource that the binding provides.`,[`secret_text`,`secret_key`])),e.type===`secret_text`&&e.text===void 0&&(e.text=await g(`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 g(`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 u=p({name:m(e.name,`name`,`text`),text:m(e.text,`text`,`text`),type:e.type,algorithm:f(e.algorithm,`algorithm`),format:e.format,key_base64:m(e[`key-base64`],`key-base64`,`text`),key_jwk:f(e[`key-jwk`],`key-jwk`),usages:e.usages},[[`algorithm`],[`key_jwk`]]),h=await c(`Updating`,async()=>n.send(Q,{body:u,account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(h,{successLabel:`Updated`})})},ae={command:`secrets`,describe:`Operations for dispatch-namespaces.scripts.secrets`,builder:e=>e.command(U).command(G).command(J).command(Z).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oe={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/settings`,pathParams:[`account_id`,`dispatch_namespace`,`script_name`],body:`form`};function se(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts settings edit <script-name>
32
35
 
33
- Patch metadata for a script uploaded to a Workers for Platforms dispatch namespace, such as bindings.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`settings`,{type:`string`,description:`Script and version settings for Workers for Platforms namespace scripts. Same as script-and-version-settings-item but without annotations, which are not supported for namespace scripts. `})}const oe={command:`edit <script-name>`,describe:`Patch Workers for Platforms Script Settings`,builder:ae,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts settings edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts settings edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/settings`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,settings:e.settings}});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.settings!==void 0){let t=new FormData;if(e.file){let n=p(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);if(e.settings!==void 0){let n=typeof e.settings==`string`?f(e.settings,`settings`,`text`):e.settings;t.append(`settings`,typeof n==`string`?n:JSON.stringify(n))}let r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${u}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/settings`,{body:t}));o(r,{successLabel:`Updated`});return}if(e.body){let t=f(e.body,`body`,`binary`),r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${u}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/settings`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));o(r,{successLabel:`Updated`});return}let d=await c(`Updating`,async()=>l.send(ie,{account_id:u,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(d,{successLabel:`Updated`})})};var se={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/settings`};function ce(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts settings get <script-name>
36
+ Patch metadata for a script uploaded to a Workers for Platforms dispatch namespace, such as bindings.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`settings`,{type:`string`,description:`Script and version settings for Workers for Platforms namespace scripts. Same as script-and-version-settings-item but without annotations, which are not supported for namespace scripts. `})}const ce={command:`edit <script-name>`,describe:`Patch Workers for Platforms Script Settings`,builder:se,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts settings edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts settings edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/settings`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,settings:e.settings}});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.settings!==void 0){let t=new FormData;if(e.file){let n=h(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);if(e.settings!==void 0){let n=typeof e.settings==`string`?m(e.settings,`settings`,`text`):e.settings;t.append(`settings`,typeof n==`string`?n:JSON.stringify(n))}let r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${u}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/settings`,{body:t}));o(r,{successLabel:`Updated`});return}if(e.body){let t=m(e.body,`body`,`binary`),r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${u}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/settings`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));o(r,{successLabel:`Updated`});return}let d=await c(`Updating`,async()=>l.send(oe,{account_id:u,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(d,{successLabel:`Updated`})})};var le={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/settings`};function ue(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts settings get <script-name>
34
37
 
35
- Get settings for a script uploaded to a Workers for Platforms dispatch namespace.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`get <script-name>`,describe:`Get Workers for Platforms Script Settings`,builder:ce,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/settings`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(se,{account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(u,{successLabel:`Loaded`})})},ue={command:`settings`,describe:`Operations for dispatch-namespaces.scripts.settings`,builder:e=>e.command(oe).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function de(e){return e.usage("$0 workers-for-platforms dispatch-namespaces scripts tags delete <tag>\n\nDelete a tag from a script uploaded to a Workers for Platforms dispatch namespace. On `api-version` dates on or after `2026-10-01`, `tag` identifies a key and the operation returns the complete updated tag map. Deleting a missing key succeeds. Earlier versions retain the legacy string-tag behavior and return a null result.").positional(`tag`,{type:`string`,description:`Tag`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`api-version`,{type:`string`,description:"Requested API compatibility date in `YYYY-MM-DD[.release]` format (UTC). The optional release suffix contains lowercase letters; for example, `2026-10-01.epoch`.\n\nTyped Worker tag operations require a date on or after `2026-10-01`."}).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 fe={command:`delete <tag>`,describe:`Delete Workers for Platforms Script Tag`,builder:de,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts tags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`api-version`]!==void 0&&(l[`api-version`]=String(e[`api-version`])),e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/tags/${e.tag==null?`<tag>`:encodeURIComponent(String(e.tag))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``),tag:String(e.tag??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await g({force:!!e.force,message:`This will delete the tag from the Workers for Platforms script.`})){process.stderr.write(`Aborted.
36
- `);return}let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/tags/${encodeURIComponent(String(e.tag))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};var pe={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/tags`};function $(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts tags list
38
+ Get settings for a script uploaded to a Workers for Platforms dispatch namespace.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`get <script-name>`,describe:`Get Workers for Platforms Script Settings`,builder:ue,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/settings`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(le,{account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(u,{successLabel:`Loaded`})})},fe={command:`settings`,describe:`Operations for dispatch-namespaces.scripts.settings`,builder:e=>e.command(ce).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pe(e){return e.usage("$0 workers-for-platforms dispatch-namespaces scripts tags delete <tag>\n\nDelete a tag from a script uploaded to a Workers for Platforms dispatch namespace. On `api-version` dates on or after `2026-10-01`, `tag` identifies a key and the operation returns the complete updated tag map. Deleting a missing key succeeds. Earlier versions retain the legacy string-tag behavior and return a null result.").positional(`tag`,{type:`string`,description:`Tag`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`api-version`,{type:`string`,description:"Requested API compatibility date in `YYYY-MM-DD[.release]` format (UTC). The optional release suffix contains lowercase letters; for example, `2026-10-01.epoch`.\n\nTyped Worker tag operations require a date on or after `2026-10-01`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const $={command:`delete <tag>`,describe:`Delete Workers for Platforms Script Tag`,builder:pe,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts tags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`api-version`]!==void 0&&(l[`api-version`]=String(e[`api-version`])),e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/tags/${e.tag==null?`<tag>`:encodeURIComponent(String(e.tag))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``),tag:String(e.tag??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force,message:`This will delete the tag from the Workers for Platforms script.`})){process.stderr.write(`Aborted.
39
+ `);return}let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/tags/${encodeURIComponent(String(e.tag))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};var me={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/tags`};function he(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts tags list
37
40
 
38
- Fetch tags from a script uploaded to a Workers for Platforms dispatch namespace.`).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`list`,describe:`List Workers for Platforms Script Tags`,builder:$,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts tags list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts tags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/tags`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(pe,{account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(u,{successLabel:`Loaded`})})};function he(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts tags update <script-name>
41
+ Fetch tags from a script uploaded to a Workers for Platforms dispatch namespace.`).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`list`,describe:`List Workers for Platforms Script Tags`,builder:he,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts tags list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts tags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/tags`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(me,{account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(u,{successLabel:`Loaded`})})};function _e(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts tags update <script-name>
39
42
 
40
- Replace tags for a script uploaded to a Workers for Platforms dispatch namespace.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Tags associated with the Worker.`})}const ge={command:`update <script-name>`,describe:`Replace Workers for Platforms Script Tags`,builder:he,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts tags update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts tags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/tags`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}let l=await r(e),d=e.local?t:await a();if(e.accountId=d,e.body){let t=u(e.body);if(Array.isArray(t)&&t.length>10){let r=Math.ceil(t.length/10),i=null;for(let a=0;a<t.length;a+=10){let o=t.slice(a,a+10),s=Math.floor(a/10)+1;i=await c(`Updating: batch ${s}/${r}`,async()=>n(l,`PUT`,`/accounts/${d}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/tags`,{body:o}))}o(i,{successLabel:`Updated`});return}let r=await c(`Updating`,async()=>n(l,`PUT`,`/accounts/${d}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/tags`,{body:t}));o(r,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},_e={command:`tags`,describe:`Operations for dispatch-namespaces.scripts.tags`,builder:e=>e.command(fe).command(me).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ve={command:`scripts`,describe:`Operations for dispatch-namespaces.scripts`,builder:e=>e.command(P).command(L).command(B).command(j).command(re).command(ue).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ye={command:`dispatch-namespaces`,describe:`Operations for dispatch-namespaces`,builder:e=>e.command(v).command(x).command(w).command(D).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},be={command:`workers-for-platforms`,describe:`workers-for-platforms`,builder:e=>e.command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{be as default};
43
+ Replace tags for a script uploaded to a Workers for Platforms dispatch namespace.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Tags associated with the Worker.`})}const ve={command:`update <script-name>`,describe:`Replace Workers for Platforms Script Tags`,builder:_e,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts tags update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts tags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/tags`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=d(e.body);if(Array.isArray(t)&&t.length>10){let r=Math.ceil(t.length/10),i=null;for(let a=0;a<t.length;a+=10){let o=t.slice(a,a+10),s=Math.floor(a/10)+1;i=await c(`Updating: batch ${s}/${r}`,async()=>n(l,`PUT`,`/accounts/${u}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/tags`,{body:o}))}o(i,{successLabel:`Updated`});return}let r=await c(`Updating`,async()=>n(l,`PUT`,`/accounts/${u}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/tags`,{body:t}));o(r,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},ye={command:`tags`,describe:`Operations for dispatch-namespaces.scripts.tags`,builder:e=>e.command($).command(ge).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},be={command:`scripts`,describe:`Operations for dispatch-namespaces.scripts`,builder:e=>e.command(F).command(R).command(V).command(M).command(ae).command(fe).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`dispatch-namespaces`,describe:`Operations for dispatch-namespaces`,builder:e=>e.command(te).command(S).command(T).command(O).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Se={command:`workers-for-platforms`,describe:`workers-for-platforms`,builder:e=>e.command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Se as default};
@@ -1,40 +1,43 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./lazy-command-BC8rIlHu.mjs";import{r as t}from"./theme-BGHWSKCw.mjs";import{r as n}from"./dotenv-usOKkeW7.mjs";import{J as r}from"./dist-DZRTPMMA.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-Dil4fTWX.mjs";import"./ui-BtIBQeaG.mjs";import{i as s,n as c}from"./auth-eVI_UEt8.mjs";import{n as l}from"./dist-uRuGmkMB.mjs";import{a as u,r as d,t as f}from"./context-B-vEsyrK.mjs";import{t as p}from"./deploy-context-ClvBD87y.mjs";import{t as ee}from"./auth-token-Cfj2yehs.mjs";import{t as m}from"./output-Co4xdFf6.mjs";import{t as h}from"./dry-run-C2KjGX10.mjs";import{t as g}from"./progress-R-1tIuep.mjs";import{n as _,t as v}from"./run-BvDCuZ8q.mjs";import"./telemetry-Ct_2AaO4.mjs";import{i as y,n as b,r as x,t as S}from"./body-parser-DkHKPkJ7.mjs";import{n as C,t as te}from"./input-validation-D7z60HJH.mjs";import{a as ne,i as w,n as T}from"./prompt-dgLm0iFJ.mjs";import{n as E,t as D}from"./raw-fetch-BapeoreV.mjs";import{l as O,s as k}from"./containers-BOpKpipz.mjs";import{a as A,i as j,n as M,o as N,r as P}from"./build-sBpqm9ga.mjs";import{r as F}from"./deploy-input-BqJ7GVZ-.mjs";import{n as I,t as L}from"./shared-ouAF7o4S.mjs";import{readBuildOutput as R}from"@cloudflare/build-output-utils";var z={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 B(e){return e.usage(`$0 workers delete <worker-id>
2
+ import{t as e}from"./lazy-command-4ccdBqrc.mjs";import{r as t}from"./theme-BGHWSKCw.mjs";import{r as n}from"./dotenv-usOKkeW7.mjs";import{J as r}from"./dist-DZRTPMMA.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-Dil4fTWX.mjs";import"./ui-BtIBQeaG.mjs";import{i as s,n as c}from"./auth-Db1KT0vm.mjs";import{n as l}from"./dist-uRuGmkMB.mjs";import{a as u,r as d,t as f}from"./context-C_a8oSY9.mjs";import{t as ee}from"./deploy-context-ClNVJYlR.mjs";import{t as te}from"./auth-token-D9XIPlwf.mjs";import{t as p}from"./output-Co4xdFf6.mjs";import{t as m}from"./dry-run-C2KjGX10.mjs";import{t as h}from"./progress-Q5w9PNTT.mjs";import{n as g,t as _}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{a as v,i as y,n as b,r as x,t as S}from"./body-parser-DnBfDdx3.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-C0hKSr-R.mjs";import{n as O,t as k}from"./raw-fetch-CEOuoKl9.mjs";import{l as ne,s as A}from"./containers-BtcOgwm5.mjs";import{a as j,i as M,n as N,o as P,r as F}from"./build-i8l2qGVZ.mjs";import{r as I}from"./deploy-input-KK6yyBN_.mjs";import{n as L,t as R}from"./shared-eefMO8R4.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>
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 V={command:`delete <worker-id>`,describe:`Delete Worker`,builder:B,handler:async e=>v({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();h({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 T({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 g(`Deleting`,async()=>n.send(z,{account_id:r,worker_id:e[`worker-id`],...t}));m(i,{successLabel:`Deleted`})})};var H={method:`POST`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments`,query:[`force`],body:`json`,constants:{strategy:`percentage`}};function U(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 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
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 W={command:`create`,describe:`Create Worker Deployment`,builder:U,handler:async e=>v({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();h({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:x(e.versions,`versions`)}):b(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=b(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let o=await g(`Creating`,async()=>n.send(H,{body:a,account_id:r,script_name:i,...t}));m(o,{successLabel:`Created`});return}if(e.strategy===void 0&&(e.strategy=await w(`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:x(e.versions,`versions`)});new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let s=await g(`Creating`,async()=>n.send(H,{body:a,account_id:r,script_name:i,...t}));m(s,{successLabel:`Created`})})};var G={method:`DELETE`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments/${e.deployment_id}`};function K(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 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:y(e.versions,`versions`)}):b(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=b(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:y(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>
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 q={command:`delete <deployment-id>`,describe:`Delete Worker Deployment`,builder:K,handler:async e=>v({command:`workers deployments delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await u();h({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 T({force:!!e.force,message:`This will permanently delete the Worker deployment.`})){process.stderr.write(`Aborted.
10
- `);return}let i=await g(`Deleting`,async()=>t.send(G,{account_id:n,script_name:r,deployment_id:e[`deployment-id`]}));m(i,{successLabel:`Deleted`})})};var J={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments/${e.deployment_id}`};function Y(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 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>
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 X={command:`get <deployment-id>`,describe:`Get Worker Deployment`,builder:Y,handler:async e=>v({command:`workers deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await u();h({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 g(`Loading`,async()=>t.send(J,{account_id:n,script_name:r,deployment_id:e[`deployment-id`]}));m(i,{successLabel:`Loaded`})})};var Z={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments`,query:[`since`,`until`,`page`,`per_page`]};function re(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 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
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 ie={command:`list`,describe:`List Worker Deployments`,builder:re,handler:async e=>v({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();h({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 g(`Loading`,async()=>n.send(Z,{account_id:r,script_name:i,...t}));m(a,{successLabel:`Loaded`})})},ae={command:`deployments`,describe:`Operations for deployments`,builder:e=>e.command(W).command(q).command(X).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oe={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function se(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 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>
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 ce={command:`get <worker-id>`,describe:`Get Worker`,builder:se,handler:async e=>v({command:`workers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await u();h({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 g(`Loading`,async()=>t.send(oe,{account_id:n,worker_id:e[`worker-id`]}));m(r,{successLabel:`Loaded`})})};var le={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/workers`,query:[`page`,`per_page`,`order_by`,`order`],errors:{401:`UnauthorizedError`,500:`InternalServerError`}};function ue(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 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
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 de={command:`list`,describe:`List Workers`,builder:ue,handler:async e=>v({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();h({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 g(`Loading`,async()=>n.send(le,{account_id:r,...t}));m(i,{successLabel:`Loaded`})})};var fe={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts-search`,query:[`name`,`id`,`order_by`,`page`,`per_page`]};function pe(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 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
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 me={command:`search`,describe:`Search Worker Scripts`,builder:pe,handler:async e=>v({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();h({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 g(`Loading`,async()=>n.send(fe,{account_id:r,...t}));m(i,{successLabel:`Loaded`})})},he={command:`scripts`,describe:`Operations for scripts`,builder:e=>e.command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ge(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 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
21
21
 
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(`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 _e={command:`bulk`,describe:`Patch multiple Worker script secrets`,builder:ge,handler:async e=>v({command:`workers secrets bulk`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await u();h({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?void 0:b(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=te(e.file),a=await g(`Updating`,async()=>s(t,`PATCH`,`/accounts/${n}/workers/scripts/${r}/secrets-bulk`,{body:i,headers:{"Content-Type":`application/merge-patch+json`}}));m(a,{successLabel:`Updated`});return}if(e.body){let i=b(e.body),a=await g(`Updating`,async()=>s(t,`PATCH`,`/accounts/${n}/workers/scripts/${r}/secrets-bulk`,{body:i}));m(a,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var ve={method:`DELETE`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets/${e.secret_name}`,query:[`url_encoded`]};function ye(e){return e.usage(`$0 workers secrets delete <secret-name>
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
+ - Set to a secret object to create or update.
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:x(e.secrets,`secrets`),version_tags:x(e[`version-tags`],`version-tags`)},[[`secrets`],[`version_tags`]]):b(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=b(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&&v(i,[`secrets`],x(e.secrets,`secrets`)),e[`version-tags`]!==void 0&&v(i,[`version_tags`],x(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>
23
26
 
24
- 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 be={command:`delete <secret-name>`,describe:`Delete Worker script secret`,builder:ye,handler:async e=>v({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();h({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 T({force:!!e.force,message:`This will permanently delete the Worker script secret.`})){process.stderr.write(`Aborted.
25
- `);return}let a=await g(`Deleting`,async()=>n.send(ve,{account_id:r,script_name:i,secret_name:e[`secret-name`],...t}));m(a,{successLabel:`Deleted`})})};var xe={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets/${e.secret_name}`,query:[`url_encoded`]};function Se(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 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>
26
29
 
27
- 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 Ce={command:`get <secret-name>`,describe:`Get a secret binding`,builder:Se,handler:async e=>v({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();h({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 g(`Loading`,async()=>n.send(xe,{account_id:r,script_name:i,secret_name:e[`secret-name`],...t}));m(a,{successLabel:`Loaded`})})};var we={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets`};function Te(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 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
28
31
 
29
- 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 Ee={command:`list`,describe:`List secrets bound to a Worker script`,builder:Te,handler:async e=>v({command:`workers secrets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await u();h({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 g(`Loading`,async()=>t.send(we,{account_id:n,script_name:r}));m(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 De(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 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>
30
33
 
31
- 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(`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(`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`,[`format`,`key-base64`,`usages`]).conflicts(`format`,[`text`]).implies(`format`,[`usages`]).conflicts(`key-base64`,[`text`]).conflicts(`usages`,[`text`]).implies(`usages`,[`format`])}const Oe={command:`update <name>`,describe:`Add a secret to a Worker script`,builder:De,handler:async e=>v({command:`workers secrets update`,classification:{safeFlags:[`type`,`format`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await u();h({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,format:e.format,key_base64:C(e[`key-base64`],`key-base64`,`text`),usages:e.usages,name:e.name}):b(e.body),sensitiveBodyPaths:[[`text`],[`key_base64`]]});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=b(e.body),a=await g(`Updating`,async()=>t.send(Q,{body:i,account_id:n,script_name:r}));m(a,{successLabel:`Updated`});return}if(e.type===void 0&&(e.type=await w(`type`,`The kind of resource that the binding provides.`,[`secret_text`,`secret_key`])),e.type===`secret_text`&&e.text===void 0&&(e.text=await ne(`text`,`The secret value to use.`,{kind:`secret`,question:`Enter value for --text`})),e.type===`secret_key`)throw Error(`The secret_key variant requires algorithm, which cannot be supplied as flags. Pass --body with a complete request body.`);let i=S({text:C(e.text,`text`,`text`),type:e.type,format:e.format,key_base64:C(e[`key-base64`],`key-base64`,`text`),usages:e.usages,name:e.name}),a=await g(`Updating`,async()=>t.send(Q,{body:i,account_id:n,script_name:r}));m(a,{successLabel:`Updated`})})},ke={command:`secrets`,describe:`Operations for secrets`,builder:e=>e.command(_e).command(be).command(Ce).command(Ee).command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ae={method:`DELETE`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions/${e.version_id}`};function je(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 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:x(e.algorithm,`algorithm`),format:e.format,key_base64:C(e[`key-base64`],`key-base64`,`text`),key_jwk:x(e[`key-jwk`],`key-jwk`),usages:e.usages,name:e.name},[[`algorithm`],[`key_jwk`]]):b(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=b(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:x(e.algorithm,`algorithm`),format:e.format,key_base64:C(e[`key-base64`],`key-base64`,`text`),key_jwk:x(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>
32
35
 
33
- 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 Me={command:`delete <version-id>`,describe:`Delete Worker Version`,builder:je,handler:async e=>v({command:`workers versions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await u();h({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 T({force:!!e.force,message:`This will permanently delete the Worker version.`})){process.stderr.write(`Aborted.
34
- `);return}let r=await g(`Deleting`,async()=>t.send(Ae,{account_id:n,worker_id:e[`worker-id`],version_id:e[`version-id`]}));m(r,{successLabel:`Deleted`})})};var Ne={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions/${e.version_id}`,query:[`include`]};function Pe(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 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>
35
38
 
36
- 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 Fe={command:`get <version-id>`,describe:`Get Worker Version`,builder:Pe,handler:async e=>v({command:`workers versions get`,classification:{safeFlags:[`include`,`dry-run`]}},e,async()=>{let t={include:e.include};if(e.dryRun){let n=await u();h({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 g(`Loading`,async()=>n.send(Ne,{account_id:r,worker_id:e[`worker-id`],version_id:e[`version-id`],...t}));m(i,{successLabel:`Loaded`})})};var Ie={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions`,query:[`page`,`per_page`]};function Le(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 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
37
40
 
38
- 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 Re={command:`list`,describe:`List Worker Versions`,builder:Le,handler:async e=>v({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();h({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 g(`Loading`,async()=>n.send(Ie,{account_id:r,worker_id:e[`worker-id`],...t}));m(i,{successLabel:`Loaded`})})};function ze(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 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>
39
42
 
40
- 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.`,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 Be={command:`profile <version-id>`,describe:`Profile Worker Version`,builder:ze,handler:async e=>v({command:`workers versions profile`,classification:{safeFlags:[`profile-type`,`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await u();h({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`]}):b(e.body)});return}await c(e);let t=e.local?o:await f();if(e.accountId=t,e.body){let n=b(e.body),r=await g(`Creating`,async()=>D(`/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`}));E(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&&y(n,[`actor_id`],C(e[`actor-id`],`actor-id`,`text`)),e[`duration-ms`]!==void 0&&y(n,[`duration_ms`],e[`duration-ms`]),e[`namespace-id`]!==void 0&&y(n,[`namespace_id`],C(e[`namespace-id`],`namespace-id`,`text`)),e[`profile-type`]!==void 0&&y(n,[`profile_type`],e[`profile-type`]);let r=await g(`Creating`,async()=>D(`/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}));E(e.text===!0?r.toString(`utf-8`):r)})};function Ve(e){return I(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 $=_({command:`create`,describe:`Upload a new Worker Version without deploying it`,builder:Ve,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf workers versions create.`);await L(e,{command:`Version upload`})}},{command:`workers versions create`,classification:{safeFlags:[`dry-run`,`prebuilt`]}});const He={command:`versions`,describe:`Operations for versions`,builder:e=>e.command(a($,`native`)).command(Me).command(Fe).command(Re).command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ue=e(`check`,`Profile a Worker's startup performance`,()=>import(`./command-BSbhJRmu.mjs`),{command:`workers check`,classification:{safeFlags:[`prebuilt`]}});function We(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`,P)}const Ge={command:`deploy`,describe:`Apply triggers (Routes, Workflows, Cron triggers etc.)`,builder:We,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf workers triggers deploy.`);if(!e.prebuilt){if(await M(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,()=>Ke(e))}};async function Ke(e){let{workers:n,rootConfig:i}=await R(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.`)}N(e.mode,i.buildContext.mode);let a=A(n,e.worker),{wranglerConfig:o}=j(a,i),s=e[`dry-run`]?``:await ee(),c=e[`dry-run`]?void 0:i.accountId??await f({skipProjectSettings:!0,complianceRegion:r(o)});O(p(s)),l.message(t.bold(`Deploy triggers`),{symbol:t.muted(`├`),spacing:0}),await k(F(a,o,c,e)),e[`dry-run`]||l.success(`Trigger deploy complete`)}const qe={command:`triggers`,describe:`Manage triggers (Routes, Workflows, Cron triggers etc.)`,builder:e=>e.command(_(Ge,{command:`workers triggers deploy`,classification:{safeFlags:[`dry-run`,`prebuilt`]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Je=e(`types`,`Generate types from cloudflare.config.ts`,()=>import(`./command-DCQgsd2U.mjs`),{command:`workers types`,classification:{safeFlags:[`include-runtime`]}});const Ye={command:`workers`,describe:`workers`,builder:e=>e.command(a(Ue,`preview`)).command(V).command(ce).command(de).command(a(Je,`preview`)).command(ae).command(he).command(ke).command(a(qe,`native`)).command(He).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ye 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.`,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`]}):b(e.body)});return}await c(e);let t=e.local?o:await f();if(e.accountId=t,e.body){let n=b(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&&v(n,[`actor_id`],C(e[`actor-id`],`actor-id`,`text`)),e[`duration-ms`]!==void 0&&v(n,[`duration_ms`],e[`duration-ms`]),e[`namespace-id`]!==void 0&&v(n,[`namespace_id`],C(e[`namespace-id`],`namespace-id`,`text`)),e[`profile-type`]!==void 0&&v(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-BtTc28ql.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)),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-DCQgsd2U.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};
@@ -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-Dil4fTWX.mjs";import{n}from"./auth-eVI_UEt8.mjs";import{a as r,t as i}from"./context-B-vEsyrK.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-R-1tIuep.mjs";import{t as c}from"./run-BvDCuZ8q.mjs";import"./telemetry-Ct_2AaO4.mjs";import{n as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-dgLm0iFJ.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-Dil4fTWX.mjs";import{n}from"./auth-Db1KT0vm.mjs";import{a as r,t as i}from"./context-C_a8oSY9.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-Q5w9PNTT.mjs";import{t as c}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as l,t as u}from"./body-parser-DnBfDdx3.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-C0hKSr-R.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-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-eVI_UEt8.mjs";import{a as i,t as a}from"./context-B-vEsyrK.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-R-1tIuep.mjs";import{t as l}from"./run-BvDCuZ8q.mjs";import"./telemetry-Ct_2AaO4.mjs";import{n as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-dgLm0iFJ.mjs";import{n as g,t as ee}from"./raw-fetch-BapeoreV.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/workflows/concurrency`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,409:`ConflictError`}};function v(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-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-Db1KT0vm.mjs";import{a as i,t as a}from"./context-C_a8oSY9.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-Q5w9PNTT.mjs";import{t as l}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as u,t as d}from"./body-parser-DnBfDdx3.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-C0hKSr-R.mjs";import{n as g,t as ee}from"./raw-fetch-CEOuoKl9.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/workflows/concurrency`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,409:`ConflictError`}};function v(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 te={command:`create`,describe:`Create a concurrency key`,builder:v,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?d({limit:e.limit,name:f(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(_,{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 p(`name`,`Unique (per account) name of the concurrency key. Referenced by workflow steps via step config.`));let m=d({limit:e.limit,name:f(e.name,`name`,`text`)}),h=await c(`Creating`,async()=>n.send(_,{body:m,account_id:l}));o(h,{successLabel:`Created`})})};var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workflows/concurrency/${t.key_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function re(e){return e.usage(`$0 workflows concurrency delete <key-id>
5
5