cf 1.0.0-beta.28 → 1.0.0-beta.29

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 (328) hide show
  1. package/README.md +10 -3
  2. package/dist/_meta/commands.json +2240 -3181
  3. package/dist/_meta/hand-written-commands.json +38 -8
  4. package/dist/_meta/schemas.json +1683 -2505
  5. package/dist/{abuse-reports-D9edOyag.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
  6. package/dist/{access-CKCCSrrU.mjs → access-Cte4yyIz.mjs} +1 -1
  7. package/dist/{accounts-CNb9U9bK.mjs → accounts-G-x-_cEx.mjs} +58 -57
  8. package/dist/{acm-CdKTAToZ.mjs → acm-Bg3HqMGG.mjs} +7 -7
  9. package/dist/{addressing-eZI_C-b0.mjs → addressing-BwEofGEm.mjs} +46 -46
  10. package/dist/{agent-memory-BBHCEE7h.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
  11. package/dist/{ai-Csl_QNwv.mjs → ai-DWWRIQIt.mjs} +16 -16
  12. package/dist/{ai-audit-DlqWsQi-.mjs → ai-audit-CMEBz6ZP.mjs} +3 -3
  13. package/dist/ai-gateway-D2s0isU-.mjs +76 -0
  14. package/dist/ai-search-a0uqr9yJ.mjs +74 -0
  15. package/dist/{ai-security-DvU2iYkY.mjs → ai-security-H_RqjRoL.mjs} +4 -4
  16. package/dist/alerting-Bgp9rE4I.mjs +52 -0
  17. package/dist/analytics-CFYM82FD.mjs +17 -0
  18. package/dist/{analytics-engine-BlIecoOe.mjs → analytics-engine-BLiEaLxb.mjs} +2 -2
  19. package/dist/{api-security-DZ7GWOqD.mjs → api-security-B0YtHglt.mjs} +63 -63
  20. package/dist/{argo-Bh0_cj49.mjs → argo-BPwbzHY7.mjs} +7 -7
  21. package/dist/{artifacts-VZJWVq_6.mjs → artifacts-B6UwC2PH.mjs} +20 -20
  22. package/dist/{audit-logs-B8cGL4B9.mjs → audit-logs-kG97iEnI.mjs} +2 -2
  23. package/dist/auth-Czr8ChBB.mjs +2 -0
  24. package/dist/auth-DA1PHaHi.mjs +2 -0
  25. package/dist/auth-Dwfa4S3h.mjs +7 -0
  26. package/dist/{auth-token-DW4dJVdj.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
  27. package/dist/{autoconfig-C0ynlGHf.mjs → autoconfig-B4tFR6ua.mjs} +120 -116
  28. package/dist/{basin-catalog-TehR1sKZ.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
  29. package/dist/{billing-B2KusU6g.mjs → billing-TERxOuLR.mjs} +11 -11
  30. package/dist/{blocks-BFulF68V.mjs → blocks-C3Im7AT0.mjs} +1 -1
  31. package/dist/body-parser-HN91kAf0.mjs +2 -0
  32. package/dist/{body-unions-DNs981Ia.mjs → body-unions-D9OSaf4M.mjs} +1 -1
  33. package/dist/{bot-management-CXHXgrQC.mjs → bot-management-SZw9jTOC.mjs} +4 -4
  34. package/dist/{botnet-feed-UyK7Rfp6.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
  35. package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
  36. package/dist/browser-run-BvjfMK3f.mjs +40 -0
  37. package/dist/build-CCwo_ydV.mjs +2 -0
  38. package/dist/{build-FFxzigo4.mjs → build-yQOzZg6Z.mjs} +1 -1
  39. package/dist/builds-tMa3sbQU.mjs +62 -0
  40. package/dist/{cache-BacNNtLu.mjs → cache-b_EPh6Is.mjs} +18 -18
  41. package/dist/cf-DmvZ2L51.mjs +18 -0
  42. package/dist/{chunk-DSGVRFIS-BaNZNW-M.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
  43. package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
  44. package/dist/cli-Cc7ujzAy.mjs +4 -0
  45. package/dist/{client-side-security-bzB9JosR.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
  46. package/dist/{cloud-connector-BHtf37R5.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
  47. package/dist/{cloudflared-QDdHMUEY.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
  48. package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
  49. package/dist/{command-D895kdlh.mjs → command-BQbZw4Kx.mjs} +1 -1
  50. package/dist/command-BVct0Dvr.mjs +2 -0
  51. package/dist/{command-DeutqL1n.mjs → command-C4_lMRkw.mjs} +1 -1
  52. package/dist/command-CJ3ldWrA.mjs +2 -0
  53. package/dist/command-CyOdBNur.mjs +2 -0
  54. package/dist/command-D2XkyO1e.mjs +2 -0
  55. package/dist/command-DHODgfFZ.mjs +2 -0
  56. package/dist/command-DIIaZx_f.mjs +2 -0
  57. package/dist/command-DONwHpqZ.mjs +2 -0
  58. package/dist/command-DdYnSf-8.mjs +2 -0
  59. package/dist/command-DqOU7Ql2.mjs +2 -0
  60. package/dist/{command-CbxXc5IW.mjs → command-HW7k43qu.mjs} +1 -1
  61. package/dist/command-NqM0lo4a.mjs +2 -0
  62. package/dist/command-bwVDyMv4.mjs +2 -0
  63. package/dist/command-yzqs4m83.mjs +2 -0
  64. package/dist/{completions-BvdKtzsX.mjs → completions-0YKvIyBT.mjs} +2 -2
  65. package/dist/{connector-interrupts-dUPW6Ya_.mjs → connector-interrupts-CsunbRsr.mjs} +3 -3
  66. package/dist/{connector-telemetry-events-DWVCqnhn.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
  67. package/dist/{connector-telemetry-snapshots-CeMP3qeI.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
  68. package/dist/{connectors-DZFGNw3i.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
  69. package/dist/{containers-DCzQCo79.mjs → containers-BiA_bpPR.mjs} +22 -21
  70. package/dist/{content-scan-XhnNJqXf.mjs → content-scan-4SA2nacB.mjs} +6 -6
  71. package/dist/{context-BY1Eh_Qe.mjs → context-BGm5_wTT.mjs} +1 -1
  72. package/dist/{cps-CohlxvuN.mjs → cps-WDmD3V5I.mjs} +3 -3
  73. package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
  74. package/dist/{custom-csrs-BVdMQjYq.mjs → custom-csrs-D-lvkyRV.mjs} +5 -5
  75. package/dist/{custom-hostnames-r-CxhSa1.mjs → custom-hostnames-B5BQX5m6.mjs} +12 -12
  76. package/dist/{custom-nameservers-CapMDyly.mjs → custom-nameservers-CZrRjcjx.mjs} +4 -4
  77. package/dist/{custom-pages-BVIniWfq.mjs → custom-pages-CWwjtfbj.mjs} +10 -10
  78. package/dist/d1-N81q-FAr.mjs +50 -0
  79. package/dist/{delegate-CcL6RoGw.mjs → delegate-livNdiwK.mjs} +1 -1
  80. package/dist/delegate.mjs +1 -1
  81. package/dist/deploy-Ok4ncy06.mjs +2 -0
  82. package/dist/deploy-context-B_lLfxt7.mjs +55 -0
  83. package/dist/deploy-input-JZlEJwKB.mjs +2 -0
  84. package/dist/dev-DxbkJkzc.mjs +4 -0
  85. package/dist/{diagnostics-C3nqxsAO.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
  86. package/dist/dialog-CD94-Kzw.mjs +2 -0
  87. package/dist/discover-D9FNaCDK.mjs +2 -0
  88. package/dist/discover-DGsMj9ZN.mjs +2 -0
  89. package/dist/{dist-D-ihn_mV.mjs → dist-BxhwE-W1.mjs} +193 -193
  90. package/dist/{dls-N1x8sAK3.mjs → dls-5OXuxLAB.mjs} +8 -8
  91. package/dist/{dns-DATWP-PF.mjs → dns-Burep9O7.mjs} +59 -69
  92. package/dist/{dns-firewall-n3Y2ui6W.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
  93. package/dist/docs-BFVK88kB.mjs +3 -0
  94. package/dist/{dry-run-kJbjn4kG.mjs → dry-run-qsnRlRk6.mjs} +1 -1
  95. package/dist/{durable-objects-DHK9w-vO.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
  96. package/dist/email-auth--2KCzZNA.mjs +6 -0
  97. package/dist/email-routing-DzaExfVf.mjs +44 -0
  98. package/dist/{email-security-DK_SJ0yi.mjs → email-security-DwQJszzy.mjs} +71 -71
  99. package/dist/{email-sending-CTQafGec.mjs → email-sending-mQd2qB-o.mjs} +21 -21
  100. package/dist/errors-C_bGcR0X.mjs +11 -0
  101. package/dist/field-extractors-MVOizTlB.mjs +8 -0
  102. package/dist/{firewall-CW-fAI9m.mjs → firewall-DtSIlkfL.mjs} +19 -19
  103. package/dist/{flagship-RiLnDwfJ.mjs → flagship-9E5gwNki.mjs} +12 -12
  104. package/dist/{fraud-DvfBBTe8.mjs → fraud-DjqhVJdf.mjs} +3 -3
  105. package/dist/generate-BzOnRBij.mjs +2 -0
  106. package/dist/generate-DfxZtpn9.mjs +2 -0
  107. package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
  108. package/dist/{google-tag-gateway-C5WYsSXv.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
  109. package/dist/gt-BV-jij5q.mjs +4 -0
  110. package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
  111. package/dist/{hyperdrive-Ch6klUp3.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
  112. package/dist/{iam-LlGEzRCq.mjs → iam-BK6N7NdQ.mjs} +31 -31
  113. package/dist/{images-C5WqUXkK.mjs → images-3bCWE6Ml.mjs} +33 -33
  114. package/dist/index.mjs +1 -1
  115. package/dist/init-BgCF9K8h.mjs +43 -0
  116. package/dist/{intel-vcWyslaX.mjs → intel-BQ58CJLt.mjs} +30 -30
  117. package/dist/{interactive-BCDFSPtq.mjs → interactive-JBA3qOUa.mjs} +9 -9
  118. package/dist/{internal-BhV9WjLp.mjs → internal-CWPz0sBF.mjs} +2 -2
  119. package/dist/{ips-CqHjVsqd.mjs → ips-3WYegiVW.mjs} +2 -2
  120. package/dist/{k2-CZT2Pd5J.mjs → k2-Bc_hjmiv.mjs} +5 -5
  121. package/dist/{kv-Ipa7dnvF.mjs → kv-DbShBhhg.mjs} +6 -6
  122. package/dist/{lazy-command-DbKVgdGT.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
  123. package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
  124. package/dist/{live-C9L1bNuE.mjs → live-BTtMv1a6.mjs} +2 -2
  125. package/dist/load-balancers-C2hg52WA.mjs +84 -0
  126. package/dist/{local-DIJ7SIKC.mjs → local-B3zt9PXR.mjs} +1 -1
  127. package/dist/local-DRxctCh9.mjs +2 -0
  128. package/dist/local-runtime-BOnDiMDc.mjs +2 -0
  129. package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
  130. package/dist/log-DBAHla_W.mjs +2 -0
  131. package/dist/login-CK3nn9a5.mjs +2 -0
  132. package/dist/{login-DG5ebyab.mjs → login-DiR-buzS.mjs} +3 -3
  133. package/dist/{logpush-C5Gw7F_9.mjs → logpush-CitvUX-J.mjs} +22 -22
  134. package/dist/{logs-y3REfHbb.mjs → logs-CfWHu4Ir.mjs} +14 -16
  135. package/dist/{magic-network-monitoring-BZBGZB6M.mjs → magic-network-monitoring-gU6yzzML.mjs} +17 -17
  136. package/dist/{magic-transit-BPV_POf5.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
  137. package/dist/{managed-defense-BaUBSUcz.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
  138. package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
  139. package/dist/{mcp-RPtrISTy.mjs → mcp-DqhQJVaz.mjs} +15 -15
  140. package/dist/{mesh-DZ4QHBPE.mjs → mesh-DXVZBNDC.mjs} +12 -12
  141. package/dist/{migrate-CRIUqGi2.mjs → migrate-CmXyk9vX.mjs} +1 -1
  142. package/dist/{monetization-CVZqM8Xo.mjs → monetization-CWg-mySr.mjs} +9 -9
  143. package/dist/{network-interconnects-9nS5jL__.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
  144. package/dist/{network-DLt2JUo1.mjs → network-jtgq5eb4.mjs} +24 -24
  145. package/dist/o11y-eYYs59X9.mjs +88 -0
  146. package/dist/oauth-BgDZMd72.mjs +5 -0
  147. package/dist/{oauth-Cidoyxfp.mjs → oauth-V37G-PaV.mjs} +1 -1
  148. package/dist/{observability-C-KNh__y.mjs → observability-CB72eC4T.mjs} +2 -2
  149. package/dist/{ohttp-gateway-B5nCl4s3.mjs → ohttp-gateway-K9ToEft8.mjs} +4 -4
  150. package/dist/{organizations-DbeeWUL4.mjs → organizations-BllV7l_c.mjs} +18 -19
  151. package/dist/output-hFMAotFl.mjs +2 -0
  152. package/dist/package-oNVeacC9.mjs +2 -0
  153. package/dist/page-rules-BVmi-ZFW.mjs +35 -0
  154. package/dist/pages-5spcBpX1.mjs +48 -0
  155. package/dist/{pay-per-crawl-EHYtSKxX.mjs → pay-per-crawl-BgsdGcBi.mjs} +18 -18
  156. package/dist/{pay-per-use-wdEhl8k4.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
  157. package/dist/pipelines-CbtmLRxt.mjs +40 -0
  158. package/dist/{precursor-Dx8lN4UJ.mjs → precursor-Dk8YOKf_.mjs} +2 -2
  159. package/dist/previews-Bv1HMMtO.mjs +6 -0
  160. package/dist/progress-DE_G09u2.mjs +2 -0
  161. package/dist/project-settings-D_S-UC8I.mjs +3 -0
  162. package/dist/prompt-D274Im1O.mjs +4 -0
  163. package/dist/{queues-DgMc7Z6A.mjs → queues-DGCYUr4g.mjs} +26 -26
  164. package/dist/{r2-BpTVicIq.mjs → r2-DtCk-Nfi.mjs} +51 -51
  165. package/dist/{radar-DW-S1VUh.mjs → radar-1CwqOsMZ.mjs} +150 -150
  166. package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
  167. package/dist/{ready-d0li0X6r.mjs → ready-CcoEA7M7.mjs} +2 -2
  168. package/dist/{realtime-DMKHLYF4.mjs → realtime-DFUxwIG5.mjs} +80 -81
  169. package/dist/registrar-Cl1snz8z.mjs +43 -0
  170. package/dist/{registrar-sandbox-lVLB1-mC.mjs → registrar-sandbox-Cne9BVCZ.mjs} +9 -9
  171. package/dist/{reporting-WX8P3Y0k.mjs → reporting-D9FC-Z-3.mjs} +7 -7
  172. package/dist/request-headers-Bopp5lH_.mjs +2 -0
  173. package/dist/request-tracers-CSSB9_aW.mjs +4 -0
  174. package/dist/{resource-sharing-B2ZSt_cA.mjs → resource-sharing-D8yuzJm7.mjs} +18 -18
  175. package/dist/{rules-CB0QQTB3.mjs → rules-DzmOQ3MB.mjs} +8 -8
  176. package/dist/rulesets-DsTGcgbc.mjs +42 -0
  177. package/dist/{rum-BZ_24qZU.mjs → rum-DrJLI93T.mjs} +14 -14
  178. package/dist/run-C5yPsiO2.mjs +2 -0
  179. package/dist/run-CXWkMU3x.mjs +2 -0
  180. package/dist/schema-CfZOW8Zw.mjs +2 -0
  181. package/dist/{schema-cache-5NkOj7Y3.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
  182. package/dist/schema-flags-DO3kLYBu.mjs +4 -0
  183. package/dist/{scim-DchxaJfE.mjs → scim-0OufLKru.mjs} +8 -8
  184. package/dist/{secrets-store-oAft1cFE.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
  185. package/dist/{security-insights-DMm0qg_m.mjs → security-insights-D2pj8-O-.mjs} +20 -20
  186. package/dist/{security-txt-CIt0494b.mjs → security-txt-SKtgW4n-.mjs} +4 -4
  187. package/dist/session-COdP8BXD.mjs +2 -0
  188. package/dist/shared-D_2KLpP3.mjs +2 -0
  189. package/dist/{signed-url-gNangfwc.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
  190. package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
  191. package/dist/snippets-DrrdpLnS.mjs +18 -0
  192. package/dist/spawn-DNf-Ge8d.mjs +5 -0
  193. package/dist/{spectrum-DLYIHelC.mjs → spectrum-CHBGZbZF.mjs} +11 -11
  194. package/dist/{speed-DugG9Tm9.mjs → speed-vOlHyG3v.mjs} +11 -11
  195. package/dist/sql-BCuLxGSf.mjs +4 -0
  196. package/dist/src-ByCoEqOw.mjs +133 -0
  197. package/dist/{ssl-Bg4X3WGk.mjs → ssl-BA_dcVwF.mjs} +60 -62
  198. package/dist/startup-profile-CyQk_f_L.mjs +2 -0
  199. package/dist/{startup-profile-DZL2DC44.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
  200. package/dist/state-B6r-b_-d.mjs +2 -0
  201. package/dist/{state-mr5ux1Nb.mjs → state-CTLznbVs.mjs} +1 -1
  202. package/dist/static-assets-DGDoaJf1.mjs +386 -0
  203. package/dist/stream-CzlqY8hq.mjs +89 -0
  204. package/dist/{tags-SKz2odE_.mjs → tags-BLeaslAb.mjs} +8 -8
  205. package/dist/telemetry-COlodX5Z.mjs +2 -0
  206. package/dist/{telemetry-B4zmCpT0.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
  207. package/dist/{tenant-custom-nameservers-BhkhBerL.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
  208. package/dist/{tenants-DD-GMq0K.mjs → tenants-CRirmhxS.mjs} +3 -3
  209. package/dist/{tools-KW_4hvzY.mjs → tools-BRjRgZnj.mjs} +1 -1
  210. package/dist/tunnels-nLfIWPYT.mjs +27 -0
  211. package/dist/{turnstile-DhSU_Xar.mjs → turnstile-CZjXtBCr.mjs} +10 -10
  212. package/dist/ui-dWsVmFCG.mjs +2 -0
  213. package/dist/{update-check-HltjTMDE.mjs → update-check-CXMdVBhW.mjs} +1 -1
  214. package/dist/{update-check-CRttabfu.mjs → update-check-D_Oky9-u.mjs} +1 -1
  215. package/dist/update-check-worker.mjs +1 -1
  216. package/dist/{url-normalization-K7gkmPvG.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
  217. package/dist/url-scanner-9XW3zLaU.mjs +16 -0
  218. package/dist/user-Bk1BIqZ5.mjs +103 -0
  219. package/dist/{vectorize-BTBerJME.mjs → vectorize-CgOfmWYq.mjs} +15 -15
  220. package/dist/version-CcuBNjqg.mjs +2 -0
  221. package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
  222. package/dist/{web-assets-LHPQsrnY.mjs → web-assets-CWU3jrit.mjs} +29 -29
  223. package/dist/{web3-BsOio0Ae.mjs → web3-CRpQ5sl4.mjs} +13 -13
  224. package/dist/workers-BZMvamn0.mjs +39 -0
  225. package/dist/{workers-for-platforms-BGp6yr6P.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
  226. package/dist/{workers-vpc-D8lefWDo.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
  227. package/dist/{workflows-B-ZIG3y7.mjs → workflows-Dd88_Nqc.mjs} +24 -24
  228. package/dist/{wrangler-migration-6E6wT_LZ.mjs → wrangler-migration-BzMTJPdI.mjs} +294 -294
  229. package/dist/zaraz-BFK0p28R.mjs +22 -0
  230. package/dist/{zero-trust-BZDXM5r6.mjs → zero-trust-Cdjfp0Ie.mjs} +441 -455
  231. package/dist/{zones-B-UV_DGE.mjs → zones-DDn5jk6I.mjs} +51 -51
  232. package/package.json +19 -19
  233. package/dist/ai-gateway-Lj4On37s.mjs +0 -74
  234. package/dist/ai-search-BxyhS3X7.mjs +0 -74
  235. package/dist/alerting-r0G2X9y9.mjs +0 -52
  236. package/dist/analytics-C6bfqm-W.mjs +0 -17
  237. package/dist/auth-B-h0BHg7.mjs +0 -2
  238. package/dist/auth-B6tswVxH.mjs +0 -2
  239. package/dist/auth-clmqFEWU.mjs +0 -7
  240. package/dist/body-parser-DoewLePl.mjs +0 -2
  241. package/dist/brand-protection-kv1ba80i.mjs +0 -14
  242. package/dist/browser-run-D-vRoZmf.mjs +0 -40
  243. package/dist/build-BzJGqb2o.mjs +0 -2
  244. package/dist/builds-BbxINHRP.mjs +0 -64
  245. package/dist/cf-BQ_LRiut.mjs +0 -18
  246. package/dist/chunk-SOBRPAPT-QTjnHSNs.mjs +0 -363
  247. package/dist/cli-B7vslRfu.mjs +0 -4
  248. package/dist/cloudforce-one-DWBPQDA3.mjs +0 -318
  249. package/dist/command-AVwd7XjE.mjs +0 -2
  250. package/dist/command-B87T_f2f.mjs +0 -2
  251. package/dist/command-CEHhi3t0.mjs +0 -2
  252. package/dist/command-CYmQE79n.mjs +0 -2
  253. package/dist/command-Ce8CVLth.mjs +0 -2
  254. package/dist/command-CqDudQZs.mjs +0 -2
  255. package/dist/command-D4YcwpVp.mjs +0 -2
  256. package/dist/command-D9Qyi1B0.mjs +0 -2
  257. package/dist/command-Dl9ICrRK.mjs +0 -2
  258. package/dist/command-DtCSe8Hy.mjs +0 -2
  259. package/dist/command-DwzVtmb3.mjs +0 -2
  260. package/dist/command-wtBubtZ4.mjs +0 -2
  261. package/dist/containers-B06OGOEB.mjs +0 -380
  262. package/dist/csam-scanner-BV4bHq8v.mjs +0 -8
  263. package/dist/d1-nJCOJZb8.mjs +0 -50
  264. package/dist/deploy-DJMnWFNk.mjs +0 -2
  265. package/dist/deploy-context-YCW3eqP1.mjs +0 -56
  266. package/dist/deploy-input-CQLBXFEB.mjs +0 -2
  267. package/dist/dev-GsYHvMah.mjs +0 -4
  268. package/dist/dialog-D5lus4M4.mjs +0 -2
  269. package/dist/discover-6kAmVMPp.mjs +0 -2
  270. package/dist/discover-C06Syc2B.mjs +0 -2
  271. package/dist/docs-CRc_WOXh.mjs +0 -3
  272. package/dist/email-auth-ptdqNSTZ.mjs +0 -6
  273. package/dist/email-domains-uL22-zRY.mjs +0 -14
  274. package/dist/email-routing-CV43rMJC.mjs +0 -44
  275. package/dist/errors-VG1mgwJl.mjs +0 -11
  276. package/dist/field-extractors-jcZ_bAGc.mjs +0 -8
  277. package/dist/generate-CeeWW3eX.mjs +0 -3
  278. package/dist/generate-D6V4Q58z.mjs +0 -2
  279. package/dist/gt-BQkaDQDq.mjs +0 -3
  280. package/dist/healthchecks-BA1fmzTm.mjs +0 -20
  281. package/dist/init-EVsjBrOz.mjs +0 -43
  282. package/dist/leaked-credential-checks-EzT4TTjO.mjs +0 -16
  283. package/dist/load-balancers-Cb3VkSfc.mjs +0 -84
  284. package/dist/local-D5Vq6ooZ.mjs +0 -2
  285. package/dist/local-runtime-BZjgkacr.mjs +0 -2
  286. package/dist/log-DZfik9Jk.mjs +0 -2
  287. package/dist/login-DRJugxya.mjs +0 -2
  288. package/dist/managed-transforms-CjkjLzMC.mjs +0 -8
  289. package/dist/o11y-ySxrnP1Z.mjs +0 -88
  290. package/dist/oauth-CFVUl-Wv.mjs +0 -4
  291. package/dist/output-BZQEl3mK.mjs +0 -2
  292. package/dist/package-B7RgwuFR.mjs +0 -2
  293. package/dist/page-rules-DRw763O1.mjs +0 -38
  294. package/dist/pages-DfQnxiTk.mjs +0 -48
  295. package/dist/pipelines-DbyrI6F4.mjs +0 -40
  296. package/dist/previews-DEVNSip2.mjs +0 -6
  297. package/dist/progress-yvPscjYg.mjs +0 -2
  298. package/dist/project-settings-nBMEx1f-.mjs +0 -3
  299. package/dist/prompt-CEpZ-lQZ.mjs +0 -4
  300. package/dist/raw-fetch-Cl5spWC3.mjs +0 -2
  301. package/dist/registrar-D23gfKBi.mjs +0 -43
  302. package/dist/request-headers-C0FpeBhz.mjs +0 -2
  303. package/dist/request-tracers-qd7XOAka.mjs +0 -4
  304. package/dist/rulesets-DmqwixUC.mjs +0 -42
  305. package/dist/run-BOKI1uWa.mjs +0 -2
  306. package/dist/run-DBqOjD1P.mjs +0 -2
  307. package/dist/schema-Dj9STsWI.mjs +0 -2
  308. package/dist/schema-flags-CXm9iIv6.mjs +0 -4
  309. package/dist/session-vzNfUhPl.mjs +0 -2
  310. package/dist/shared-MK-_lkbn.mjs +0 -2
  311. package/dist/smart-shield-Boy_qbqd.mjs +0 -22
  312. package/dist/snippets-DdoDYXW-.mjs +0 -18
  313. package/dist/spawn-B5F4OIHG.mjs +0 -5
  314. package/dist/sql-Bb56llsb.mjs +0 -4
  315. package/dist/src-BoSDeQ9m.mjs +0 -133
  316. package/dist/startup-profile-DQVkZZpb.mjs +0 -2
  317. package/dist/state-DW3QZtfh.mjs +0 -2
  318. package/dist/stream-BuZYDbNR.mjs +0 -89
  319. package/dist/telemetry-DkDUr4KK.mjs +0 -2
  320. package/dist/tunnels-D90ztENM.mjs +0 -27
  321. package/dist/ui-xjCox-gU.mjs +0 -2
  322. package/dist/url-scanner-BRdWwka4.mjs +0 -16
  323. package/dist/user-Cmb1_Wu5.mjs +0 -103
  324. package/dist/version-6Bpy6Bgt.mjs +0 -2
  325. package/dist/waiting-rooms-LymmKIGr.mjs +0 -52
  326. package/dist/workers-BnLiOjZf.mjs +0 -39
  327. package/dist/workers-builds-sKpITeRk.mjs +0 -14
  328. package/dist/zaraz-BBKki5WS.mjs +0 -22
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+ import"./api-Dnt6lRJG.mjs";import{i as e,n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./dry-run-qsnRlRk6.mjs";import{t as r}from"./local-B3zt9PXR.mjs";import{t as i}from"./output-hFMAotFl.mjs";import{t as a}from"./progress-DE_G09u2.mjs";import{t as o}from"./path-DRw6Y-nd.mjs";import{a as s,i as c,n as l}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";import{r as u}from"./theme-BGHWSKCw.mjs";import{c as d,i as f,n as p,o as m,r as h,t as g}from"./body-parser-HN91kAf0.mjs";import{a as _,r as v,t as y}from"./context-BGm5_wTT.mjs";import{t as b}from"./body-unions-D9OSaf4M.mjs";import{n as x,t as S}from"./input-validation-D7z60HJH.mjs";import{n as C,t as w}from"./raw-fetch-DhlyWQtk.mjs";import{n as T,t as E}from"./shared-D_2KLpP3.mjs";import{n as D,t as O}from"./run-CXWkMU3x.mjs";import{a as k,f as A,n as ee,t as te,u as ne}from"./static-assets-DGDoaJf1.mjs";import{t as j}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as M}from"./lazy-command-CbGyEqFK.mjs";import{X as N}from"./dist-BxhwE-W1.mjs";import{a as P,i as F,n as I,o as L,r as R,s as z}from"./build-yQOzZg6Z.mjs";import{t as B}from"./deploy-context-B_lLfxt7.mjs";import{r as V}from"./deploy-input-JZlEJwKB.mjs";import{r as H}from"./dotenv-DKRemNCH.mjs";import{t as U}from"./log-Brx-wjJW.mjs";import{readBuildOutput as W}from"@cloudflare/build-output-utils";var G={method:`DELETE`,path:e=>o`/accounts/${e.account_id}/workers/workers/${e.worker_id}`,query:[`force`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function K(e){return e.usage(`$0 workers delete [worker]
3
+
4
+ Delete a Worker and all its associated resources (versions, deployments, etc.).`).positional(`worker`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`}).option(`worker`,{type:`string`,alias:[`script-name`,`worker-id`],description:`Identifier for the Worker, which can be ID or name.`}).group(`worker`,u.brand(`Options`)).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 q={command:`delete [worker]`,describe:`Delete Worker`,builder:K,handler:async e=>O({command:`workers delete`,classification:{safeFlags:[`delete-with-references`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let o=v({scriptName:e.worker});e.worker=o;let s={force:e[`delete-with-references`]};if(e.dryRun){let t=await _();n({command:`cf workers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${encodeURIComponent(o)}`,pathParams:{worker:String(e.worker??``)},query:s,bodyKind:`none`});return}let c=await t(e),u=e.local?r:await y();if(e.accountId=u,!await l({force:!!e.force,message:`This will permanently delete the Worker and its associated versions and deployments.`}))return;let d=await a(`Deleting`,async()=>c.send(G,{account_id:u,worker_id:o,...s}));i(d,{successLabel:`Deleted`})})};var J={method:`POST`,path:e=>o`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments`,query:[`force`],body:`json`,constants:{strategy:`percentage`}};function Y(e){return e.usage(`$0 workers deployments create
5
+
6
+ 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`,`worker-id`],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(`code-update-strategy-mode`,{type:`string`,description:`Apply Durable Object code updates immediately.`,choices:[`immediate`,`deferred`]}).coerce(`code-update-strategy-mode`,e=>x(e,`code-update-strategy-mode`,`text`)).option(`code-update-strategy-max-delay`,{type:`number`,description:`Set the maximum number of seconds to wait before forcing the update. When omitted, the default maximum delay applies.`}).option(`strategy`,{type:`string`,description:"Strategy for routing traffic across the listed versions. `percentage` splits traffic according to each version's `percentage`.",choices:[`percentage`]}).coerce(`strategy`,e=>x(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. Shape: [{"percentage": number, "version_id": string}].'}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`code-update-strategy-mode`,`code-update-strategy-max-delay`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`code-update-strategy-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 --code-update-strategy-* flag is set`)}return!0})}const X=[{path:[`code_update_strategy`],selector:`mode`,variants:[{values:[`immediate`],schema:{type:`object`,properties:{mode:{enum:[`immediate`]}},required:[`mode`],additionalProperties:!1}},{values:[`deferred`],schema:{type:`object`,properties:{max_delay:{anyOf:[{type:`number`},{type:`null`}]},mode:{enum:[`deferred`]}},required:[`mode`],additionalProperties:!1}}]}],Z={command:`create`,describe:`Create Worker Deployment`,builder:Y,handler:async e=>O({command:`workers deployments create`,classification:{safeFlags:[`bypass-deployment-checks`,`code-update-strategy-mode`,`strategy`,`dry-run`]}},e,async()=>{let o=v({scriptName:e.worker});e.worker=o;let s={force:e[`bypass-deployment-checks`]};if(e.dryRun){let t=await _();n({command:`cf workers deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${encodeURIComponent(o)}/deployments`,pathParams:{worker:String(e.worker??``)},query:s,bodyKind:`json`,body:e.body===void 0?b(g({code_update_strategy:{mode:e[`code-update-strategy-mode`],max_delay:e[`code-update-strategy-max-delay`]},strategy:e.strategy,versions:m(e.versions,`versions`)}),X):h(e.body)});return}let l=e.body===void 0?void 0:h(e.body),u=await t(e),d=e.local?r:await y();if(e.accountId=d,e.body!==void 0){let e=l;new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let t=await a(`Creating`,async()=>u.send(J,{body:e,account_id:d,script_name:o,...s}));i(t,{successLabel:`Created`});return}if(e.strategy===void 0&&(e.strategy=await c(`strategy`,"Strategy for routing traffic across the listed versions. `percentage` splits traffic according to each version's `percentage`.",[`percentage`])),e.versions===void 0)throw Error(`--versions is required (or pass --body with this field set).`);let f=g({code_update_strategy:{mode:e[`code-update-strategy-mode`],max_delay:e[`code-update-strategy-max-delay`]},strategy:e.strategy,versions:m(e.versions,`versions`)});b(f,X),new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let p=await a(`Creating`,async()=>u.send(J,{body:f,account_id:d,script_name:o,...s}));i(p,{successLabel:`Created`})})};var re={method:`DELETE`,path:e=>o`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments/${e.deployment_id}`};function ie(e){return e.usage(`$0 workers deployments delete <deployment-id>
7
+
8
+ 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:`Identifier of the Worker Deployment.`,demandOption:!0}).option(`worker`,{type:`string`,alias:[`script-name`,`worker-id`],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 ae={command:`delete <deployment-id>`,describe:`Delete Worker Deployment`,builder:ie,handler:async e=>O({command:`workers deployments delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let o=v({scriptName:e.worker});if(e.worker=o,e.dryRun){let t=await _();n({command:`cf workers deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${encodeURIComponent(o)}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{worker:String(e.worker??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let s=await t(e),c=e.local?r:await y();if(e.accountId=c,!await l({force:!!e.force,message:`This will permanently delete the Worker deployment.`}))return;let u=await a(`Deleting`,async()=>s.send(re,{account_id:c,script_name:o,deployment_id:e[`deployment-id`]}));i(u,{successLabel:`Deleted`})})};var oe={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments/${e.deployment_id}`};function se(e){return e.usage(`$0 workers deployments get <deployment-id>
9
+
10
+ Get information about a Worker Deployment.`).positional(`deployment-id`,{type:`string`,description:`Identifier of the Worker Deployment.`,demandOption:!0}).option(`worker`,{type:`string`,alias:[`script-name`,`worker-id`],description:`Name of the script.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`get <deployment-id>`,describe:`Get Worker Deployment`,builder:se,handler:async e=>O({command:`workers deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o=v({scriptName:e.worker});if(e.worker=o,e.dryRun){let t=await _();n({command:`cf workers deployments get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${encodeURIComponent(o)}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{worker:String(e.worker??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let s=await t(e),c=e.local?r:await y();e.accountId=c;let l=await a(`Loading`,async()=>s.send(oe,{account_id:c,script_name:o,deployment_id:e[`deployment-id`]}));i(l,{successLabel:`Loaded`})})};var le={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments`,query:[`since`,`until`,`page`,`per_page`]};function ue(e){return e.usage(`$0 workers deployments list
11
+
12
+ List Worker deployments. The first deployment in the list is the latest deployment actively serving traffic.`).option(`worker`,{type:`string`,alias:[`script-name`,`worker-id`],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 de={command:`list`,describe:`List Worker Deployments`,builder:ue,handler:async e=>O({command:`workers deployments list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o=v({scriptName:e.worker});e.worker=o;let s={since:e.since,until:e.until,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await _();n({command:`cf workers deployments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${encodeURIComponent(o)}/deployments`,pathParams:{worker:String(e.worker??``)},query:s,bodyKind:`none`});return}let c=await t(e),l=e.local?r:await y();e.accountId=l;let u=await a(`Loading`,async()=>c.send(le,{account_id:l,script_name:o,...s}));i(u,{successLabel:`Loaded`})})},fe={command:`deployments`,describe:`Manage Worker deployments and traffic versions`,builder:e=>e.command(Z).command(ae).command(ce).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var pe={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/workers/${e.worker_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function me(e){return e.usage(`$0 workers get [worker]
13
+
14
+ Get details about a specific Worker.`).positional(`worker`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`}).option(`worker`,{type:`string`,alias:[`script-name`,`worker-id`],description:`Identifier for the Worker, which can be ID or name.`}).group(`worker`,u.brand(`Options`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`get [worker]`,describe:`Get Worker`,builder:me,handler:async e=>O({command:`workers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o=v({scriptName:e.worker});if(e.worker=o,e.dryRun){let t=await _();n({command:`cf workers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${encodeURIComponent(o)}`,pathParams:{worker:String(e.worker??``)},bodyKind:`none`});return}let s=await t(e),c=e.local?r:await y();e.accountId=c;let l=await a(`Loading`,async()=>s.send(pe,{account_id:c,worker_id:o}));i(l,{successLabel:`Loaded`})})};var ge={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/workers`,query:[`page`,`per_page`,`order_by`,`order`],errors:{401:`UnauthorizedError`,500:`InternalServerError`}};function _e(e){return e.usage(`$0 workers list
15
+
16
+ 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 ve={command:`list`,describe:`List Workers`,builder:_e,handler:async e=>O({command:`workers list`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`],order_by:e[`order-by`],order:e.order};if(e.dryRun){let e=await _();n({command:`cf workers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/workers`,pathParams:{},query:o,bodyKind:`none`});return}let s=await t(e),c=e.local?r:await y();e.accountId=c;let l=await a(`Loading`,async()=>s.send(ge,{account_id:c,...o}));i(l,{successLabel:`Loaded`})})};var ye={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/scripts-search`,query:[`name`,`id`,`order_by`,`page`,`per_page`]};function be(e){return e.usage(`$0 workers scripts search
17
+
18
+ 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 xe={command:`search`,describe:`Search Worker Scripts`,builder:be,handler:async e=>O({command:`workers scripts search`,classification:{safeFlags:[`order-by`,`dry-run`]}},e,async()=>{let o={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 _();n({command:`cf workers scripts search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/scripts-search`,pathParams:{},query:o,bodyKind:`none`});return}let s=await t(e),c=e.local?r:await y();e.accountId=c;let l=await a(`Loading`,async()=>s.send(ye,{account_id:c,...o}));i(l,{successLabel:`Loaded`})})},Se={command:`scripts`,describe:`Worker script operations including usage model, settings, content, tags, schedules, subdomains, and queue consumers`,builder:e=>e.command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ce(e){return e.usage(`$0 workers secrets bulk
19
+
20
+ 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`,`worker-id`],description:`Name of the script.`}).option(`secrets`,{type:`string`,description:`Map of secret names to secret values:
21
+ - Set to a secret object to create or update.
22
+ - Set to \`null\` to delete.
23
+ - Omit to leave unchanged. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": ({...} | null)}.`}).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. Shape: {"<key>": unknown}.`}).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 we={command:`bulk`,describe:`Patch multiple Worker script secrets`,builder:Ce,handler:async o=>O({command:`workers secrets bulk`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let s=v({scriptName:o.worker});if(o.worker=s,o.body===void 0&&o.file===void 0&&o.secrets===void 0&&o[`version-tags`]===void 0)throw Error(`--body is required unless at least one JSON map flag is provided (--secrets, --version-tags).`);if(o.dryRun){let e=await _();n({command:`cf workers secrets bulk`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/scripts/${encodeURIComponent(s)}/secrets-bulk`,pathParams:{worker:String(o.worker??``)},bodyKind:o.file===void 0?`json`:`octet-stream`,body:o.file===void 0?o.body===void 0?g({secrets:f(o.secrets,`secrets`),version_tags:f(o[`version-tags`],`version-tags`)},[[`secrets`],[`version_tags`]]):h(o.body):{file:o.file}});return}let c=o.file===void 0?o.body===void 0?void 0:h(o.body):void 0,l=await t(o),u=o.local?r:await y();if(o.accountId=u,o.file!==void 0){let t=S(o.file),n=await a(`Updating`,async()=>e(l,`PATCH`,`/accounts/${u}/workers/scripts/${encodeURIComponent(s)}/secrets-bulk`,{body:t,headers:{"Content-Type":`application/merge-patch+json`}}));i(n,{successLabel:`Updated`});return}if(o.body!==void 0){let t=c,n=await a(`Updating`,async()=>e(l,`PATCH`,`/accounts/${u}/workers/scripts/${encodeURIComponent(s)}/secrets-bulk`,{body:t}));i(n,{successLabel:`Updated`});return}let p={};o.secrets!==void 0&&d(p,[`secrets`],f(o.secrets,`secrets`)),o[`version-tags`]!==void 0&&d(p,[`version_tags`],f(o[`version-tags`],`version-tags`));let m=await a(`Updating`,async()=>e(l,`PATCH`,`/accounts/${u}/workers/scripts/${encodeURIComponent(s)}/secrets-bulk`,{body:p}));i(m,{successLabel:`Updated`})})};var Te={method:`DELETE`,path:e=>o`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets/${e.secret_name}`,query:[`url_encoded`]};function Ee(e){return e.usage(`$0 workers secrets delete <secret-name>
24
+
25
+ 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`,`worker-id`],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 De={command:`delete <secret-name>`,describe:`Delete Worker script secret`,builder:Ee,handler:async e=>O({command:`workers secrets delete`,classification:{safeFlags:[`url-encoded`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let o=v({scriptName:e.worker});e.worker=o;let s={url_encoded:e[`url-encoded`]};if(e.dryRun){let t=await _();n({command:`cf workers secrets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${encodeURIComponent(o)}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{worker:String(e.worker??``),"secret-name":String(e[`secret-name`]??``)},query:s,bodyKind:`none`});return}let c=await t(e),u=e.local?r:await y();if(e.accountId=u,!await l({force:!!e.force,message:`This will permanently delete the Worker script secret.`}))return;let d=await a(`Deleting`,async()=>c.send(Te,{account_id:u,script_name:o,secret_name:e[`secret-name`],...s}));i(d,{successLabel:`Deleted`})})};var Oe={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets/${e.secret_name}`,query:[`url_encoded`]};function ke(e){return e.usage(`$0 workers secrets get <secret-name>
26
+
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`,`worker-id`],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 Ae={command:`get <secret-name>`,describe:`Get a secret binding`,builder:ke,handler:async e=>O({command:`workers secrets get`,classification:{safeFlags:[`url-encoded`,`dry-run`]}},e,async()=>{let o=v({scriptName:e.worker});e.worker=o;let s={url_encoded:e[`url-encoded`]};if(e.dryRun){let t=await _();n({command:`cf workers secrets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${encodeURIComponent(o)}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{worker:String(e.worker??``),"secret-name":String(e[`secret-name`]??``)},query:s,bodyKind:`none`});return}let c=await t(e),l=e.local?r:await y();e.accountId=l;let u=await a(`Loading`,async()=>c.send(Oe,{account_id:l,script_name:o,secret_name:e[`secret-name`],...s}));i(u,{successLabel:`Loaded`})})};var je={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets`};function Me(e){return e.usage(`$0 workers secrets list
28
+
29
+ List the names of secrets bound to a Worker script.`).option(`worker`,{type:`string`,alias:[`script-name`,`worker-id`],description:`Name of the script.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ne={command:`list`,describe:`List secrets bound to a Worker script`,builder:Me,handler:async e=>O({command:`workers secrets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o=v({scriptName:e.worker});if(e.worker=o,e.dryRun){let t=await _();n({command:`cf workers secrets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${encodeURIComponent(o)}/secrets`,pathParams:{worker:String(e.worker??``)},bodyKind:`none`});return}let s=await t(e),c=e.local?r:await y();e.accountId=c;let l=await a(`Loading`,async()=>s.send(je,{account_id:c,script_name:o}));i(l,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:e=>o`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets`,body:`json`,errors:{429:`TooManyRequestsError`}};function Pe(e){return e.usage(`$0 workers secrets update <name>
30
+
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`,`worker-id`],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=>x(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. Shape: {"<key>": unknown}.`}).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=>x(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. Shape: {"<key>": unknown}.'}).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`]).implies(`key-base64`,[`algorithm`,`format`,`usages`]).conflicts(`key-jwk`,[`text`]).implies(`key-jwk`,[`algorithm`,`format`,`usages`]).conflicts(`usages`,[`text`]).implies(`usages`,[`algorithm`,`format`])}const Fe={command:`update <name>`,describe:`Add a secret to a Worker script`,builder:Pe,handler:async e=>O({command:`workers secrets update`,classification:{safeFlags:[`type`,`format`,`dry-run`]}},e,async()=>{let o=v({scriptName:e.worker});if(e.worker=o,e.dryRun){let t=await _();n({command:`cf workers secrets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${encodeURIComponent(o)}/secrets`,pathParams:{worker:String(e.worker??``)},bodyKind:`json`,body:e.body===void 0?g({text:x(e.text,`text`,`text`),type:e.type,algorithm:f(e.algorithm,`algorithm`),format:e.format,key_base64:x(e[`key-base64`],`key-base64`,`text`),key_jwk:f(e[`key-jwk`],`key-jwk`),usages:e.usages,name:e.name},[[`algorithm`],[`key_jwk`]]):p(h(e.body),[{name:`name`,field:`name`,value:e.name}]),sensitiveBodyPaths:[[`text`],[`key_base64`],[`key_jwk`]]});return}let l=e.body===void 0?void 0:p(h(e.body),[{name:`name`,field:`name`,value:e.name}]),u=await t(e),d=e.local?r:await y();if(e.accountId=d,e.body!==void 0){let e=l,t=await a(`Updating`,async()=>u.send(Q,{body:e,account_id:d,script_name:o}));i(t,{successLabel:`Updated`});return}if(e.type===void 0&&(e.type=await c(`type`,`The kind of resource that the binding provides.`,[`secret_text`,`secret_key`])),e.type===`secret_text`&&e.text===void 0&&(e.text=await s(`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 s(`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 m=g({text:x(e.text,`text`,`text`),type:e.type,algorithm:f(e.algorithm,`algorithm`),format:e.format,key_base64:x(e[`key-base64`],`key-base64`,`text`),key_jwk:f(e[`key-jwk`],`key-jwk`),usages:e.usages,name:e.name},[[`algorithm`],[`key_jwk`]]),b=await a(`Updating`,async()=>u.send(Q,{body:m,account_id:d,script_name:o}));i(b,{successLabel:`Updated`})})},Ie={command:`secrets`,describe:`Manage secrets bound to Worker scripts`,builder:e=>e.command(we).command(De).command(Ae).command(Ne).command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Le={method:`DELETE`,path:e=>o`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions/${e.version_id}`};function Re(e){return e.usage(`$0 workers versions delete <version-id>
32
+
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`,{type:`string`,alias:[`script-name`,`worker-id`],description:`Identifier for the Worker, which can be ID or name.`}).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 ze={command:`delete <version-id>`,describe:`Delete Worker Version`,builder:Re,handler:async e=>O({command:`workers versions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let o=v({scriptName:e.worker});if(e.worker=o,e.dryRun){let t=await _();n({command:`cf workers versions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${encodeURIComponent(o)}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}`,pathParams:{worker:String(e.worker??``),"version-id":String(e[`version-id`]??``)},bodyKind:`none`});return}let s=await t(e),c=e.local?r:await y();if(e.accountId=c,!await l({force:!!e.force,message:`This will permanently delete the Worker version.`}))return;let u=await a(`Deleting`,async()=>s.send(Le,{account_id:c,worker_id:o,version_id:e[`version-id`]}));i(u,{successLabel:`Deleted`})})};var Be={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions/${e.version_id}`,query:[`include`]};function Ve(e){return e.usage(`$0 workers versions get <version-id>
34
+
35
+ 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`,{type:`string`,alias:[`script-name`,`worker-id`],description:`Identifier for the Worker, which can be ID or name.`}).option(`include`,{type:`string`,description:"Optional properties to include in the response. `modules` includes the `modules` property, which contains code and may add several megabytes to the response size. `modules,sourcemaps` also includes the version's source maps in `modules`.",choices:[`modules`,`modules,sourcemaps`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $={command:`get <version-id>`,describe:`Get Worker Version`,builder:Ve,handler:async e=>O({command:`workers versions get`,classification:{safeFlags:[`include`,`dry-run`]}},e,async()=>{let o=v({scriptName:e.worker});e.worker=o;let s={include:e.include};if(e.dryRun){let t=await _();n({command:`cf workers versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${encodeURIComponent(o)}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}`,pathParams:{worker:String(e.worker??``),"version-id":String(e[`version-id`]??``)},query:s,bodyKind:`none`});return}let c=await t(e),l=e.local?r:await y();e.accountId=l;let u=await a(`Loading`,async()=>c.send(Be,{account_id:l,worker_id:o,version_id:e[`version-id`],...s}));i(u,{successLabel:`Loaded`})})};var He={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions`,query:[`page`,`per_page`]};function Ue(e){return e.usage(`$0 workers versions list
36
+
37
+ List all versions for a Worker.`).option(`worker`,{type:`string`,alias:[`script-name`,`worker-id`],description:`Identifier for the Worker, which can be ID or 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 We={command:`list`,describe:`List Worker Versions`,builder:Ue,handler:async e=>O({command:`workers versions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o=v({scriptName:e.worker});e.worker=o;let s={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await _();n({command:`cf workers versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${encodeURIComponent(o)}/versions`,pathParams:{worker:String(e.worker??``)},query:s,bodyKind:`none`});return}let c=await t(e),l=e.local?r:await y();e.accountId=l;let u=await a(`Loading`,async()=>c.send(He,{account_id:l,worker_id:o,...s}));i(u,{successLabel:`Loaded`})})};function Ge(e){return e.usage(`$0 workers versions profile <version-id>
38
+
39
+ Captures a CPU or heap profile from a recently active isolate running the specified Worker version. This endpoint requires the Worker profiling feature to be enabled for the account.`).positional(`version-id`,{type:`string`,description:`Identifies the version by UUID or UUID prefix with a minimum length of eight characters. Use "latest" to select the most recently created version, which may not be deployed. Use "latest-deployed" to profile a version in the active deployment. Versions are tried in order of traffic share until one has a loaded isolate.`,demandOption:!0}).option(`worker`,{type:`string`,alias:[`script-name`,`worker-id`],description:`Identifies the Worker by ID or name.`}).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 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=>x(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 Ke={command:`profile <version-id>`,describe:`Profile Worker Version`,builder:Ge,handler:async e=>O({command:`workers versions profile`,classification:{safeFlags:[`profile-type`,`dry-run`,`text`]}},e,async()=>{let i=v({scriptName:e.worker});if(e.worker=i,e.dryRun){let t=await _();n({command:`cf workers versions profile`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${encodeURIComponent(i)}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}/profile`,pathParams:{worker:String(e.worker??``),"version-id":String(e[`version-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({actor_id:x(e[`actor-id`],`actor-id`,`text`),duration_ms:e[`duration-ms`],namespace_id:x(e[`namespace-id`],`namespace-id`,`text`),profile_type:e[`profile-type`]}):h(e.body)});return}let o=e.body===void 0?void 0:h(e.body);await t(e);let s=e.local?r:await y();if(e.accountId=s,e.body!==void 0){let t=o,n=await a(`Creating`,async()=>w(`/accounts/${s}/workers/workers/${encodeURIComponent(i)}/versions/${encodeURIComponent(String(e[`version-id`]))}/profile`,{method:`POST`,local:e.local===!0,persistTo:e.persistTo,body:JSON.stringify(t),contentType:`application/json`}));C(e.text===!0?n.toString(`utf-8`):n);return}if(e[`duration-ms`]===void 0)throw Error(`--duration-ms is required (or pass --body with this field set).`);let c={};e[`actor-id`]!==void 0&&d(c,[`actor_id`],x(e[`actor-id`],`actor-id`,`text`)),e[`duration-ms`]!==void 0&&d(c,[`duration_ms`],e[`duration-ms`]),e[`namespace-id`]!==void 0&&d(c,[`namespace_id`],x(e[`namespace-id`],`namespace-id`,`text`)),e[`profile-type`]!==void 0&&d(c,[`profile_type`],e[`profile-type`]);let l=await a(`Creating`,async()=>w(`/accounts/${s}/workers/workers/${encodeURIComponent(i)}/versions/${encodeURIComponent(String(e[`version-id`]))}/profile`,{method:`POST`,local:e.local===!0,persistTo:e.persistTo,body:Object.keys(c).length>0?c:void 0}));C(e.text===!0?l.toString(`utf-8`):l)})};function qe(e){return T(e).positional(`directory`,ee).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 Je=D({command:`create [directory]`,describe:`Upload a new Worker Version without deploying it`,builder:qe,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf workers versions create.`);let t=await te(e,{isPreview:!1});await E(t?{...e,prebuilt:!0}:e,{command:`Version upload`})}},{command:`workers versions create`,classification:{safeFlags:[`dry-run`,`prebuilt`]}});const Ye={command:`versions`,describe:`Create, list, inspect, and manage Worker versions`,builder:e=>e.command(j(Je,`native`)).command(ze).command($).command(We).command(Ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Xe=M(`check`,`Profile a Worker's startup performance`,()=>import(`./command-CyOdBNur.mjs`),{command:`workers check`,classification:{safeFlags:[`prebuilt`]}});function Ze(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`,R)}const Qe={command:`deploy`,describe:`Apply triggers (Routes, Workflows, Cron triggers etc.)`,builder:Ze,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf workers triggers deploy.`);if(!e.prebuilt){if(await I(e.mode,{worker:e.worker,dryRun:e[`dry-run`]})===`setup-needed`){U.success(`--dry-run: exiting now.`);return}U.message(``)}await H(e,()=>$e(e))}};async function $e(e){let{workers:t,rootConfig:n}=await W(process.cwd());if(n.buildContext.isPreview){let e=[`cf previews deploy`,`--prebuilt`,...n.buildContext.mode===void 0?[]:[`--mode`,n.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.`)}z(e.mode,n.buildContext.mode),L(n.accountId,e[`temporary-account`]===!0);let r=P(t,e.worker),{wranglerConfig:i}=F(r,n),a=N(i),{authToken:o,accountId:s}=await k({accountId:n.accountId,complianceRegion:a,dryRun:e[`dry-run`]});A(B(o)),U.section(`Deploy triggers`),await ne({...V(r,i,s,e),queueCreateCommand:e=>`cf queues create --queue-name ${e}`,workersDevConfigFieldName:`workersDev`,workersDevConfigAssignment:e=>`workersDev: ${e}`,previewUrlsConfigFieldName:`previewUrls`,previewUrlsConfigAssignment:e=>`previewUrls: ${e}`}),e[`dry-run`]||U.success(`Trigger deploy complete`)}const et={command:`triggers`,describe:`Manage triggers (Routes, Workflows, Cron triggers etc.)`,builder:e=>e.command(D(Qe,{command:`workers triggers deploy`,classification:{safeFlags:[`dry-run`,`prebuilt`]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var tt=M(`types`,`Generate types from cloudflare.config.ts`,()=>import(`./command-yzqs4m83.mjs`),{command:`workers types`,classification:{safeFlags:[`include-runtime`]}});const nt={command:`workers`,describe:`Deploy and manage serverless JavaScript/WASM applications on Cloudflare's global network`,builder:e=>e.command(j(Xe,`preview`)).command(q).command(he).command(ve).command(j(tt,`preview`)).command(fe).command(Se).command(Ie).command(j(et,`native`)).command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{nt as default};
@@ -1,39 +1,39 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{i as n,n as r}from"./auth-B-h0BHg7.mjs";import{a as i,t as a}from"./context-BY1Eh_Qe.mjs";import{t as o}from"./output-BZQEl3mK.mjs";import{t as s}from"./dry-run-kJbjn4kG.mjs";import{t as c}from"./progress-yvPscjYg.mjs";import{t as l}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as u,r as d,s as f,t as p}from"./body-parser-DoewLePl.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-CEpZ-lQZ.mjs";var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces`,body:`json`};function ee(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-DA1PHaHi.mjs";import{c as r,i,r as a,t as o}from"./body-parser-HN91kAf0.mjs";import{a as s,t as c}from"./context-BGm5_wTT.mjs";import{t as l}from"./dry-run-qsnRlRk6.mjs";import{n as u,t as d}from"./input-validation-D7z60HJH.mjs";import{t as f}from"./local-B3zt9PXR.mjs";import{t as p}from"./run-CXWkMU3x.mjs";import{t as m}from"./output-hFMAotFl.mjs";import{t as h}from"./progress-DE_G09u2.mjs";import"./telemetry-COlodX5Z.mjs";import{a as g,i as _,n as v}from"./prompt-D274Im1O.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 te={command:`create`,describe:`Create Workers for Platforms Dispatch Namespace`,builder:ee,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):u(e.body)});return}let n=e.body===void 0?void 0:u(e.body),l=await r(e),d=e.local?t:await a();if(e.accountId=d,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(y,{body:e,account_id:d}));o(t,{successLabel:`Created`});return}let f=p({name:m(e.name,`name`,`text`)}),h=await c(`Creating`,async()=>l.send(y,{body:f,account_id:d}));o(h,{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>
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=>p({command:`workers-for-platforms dispatch-namespaces create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({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?o({name:u(e.name,`name`,`text`)}):a(e.body)});return}let t=e.body===void 0?void 0:a(e.body),r=await n(e),i=e.local?f:await c();if(e.accountId=i,e.body!==void 0){let e=t,n=await h(`Creating`,async()=>r.send(y,{body:e,account_id:i}));m(n,{successLabel:`Created`});return}let d=o({name:u(e.name,`name`,`text`)}),p=await h(`Creating`,async()=>r.send(y,{body:d,account_id:i}));m(p,{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 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.`}))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>
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=>p({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 s();l({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 t=await n(e),r=e.local?f:await c();if(e.accountId=r,!await v({force:!!e.force,message:`This will permanently delete the Workers for Platforms dispatch namespace.`}))return;let i=await h(`Deleting`,async()=>t.send(b,{account_id:r,dispatch_namespace:e[`dispatch-namespace`]}));m(i,{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>
7
7
 
8
- 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
8
+ 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=>p({command:`workers-for-platforms dispatch-namespaces get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({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 t=await n(e),r=e.local?f:await c();e.accountId=r;let i=await h(`Loading`,async()=>t.send(C,{account_id:r,dispatch_namespace:e[`dispatch-namespace`]}));m(i,{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
9
9
 
10
- 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>
10
+ 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=>p({command:`workers-for-platforms dispatch-namespaces list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await s();l({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 t=await n(e),r=e.local?f:await c();e.accountId=r;let i=await h(`Loading`,async()=>t.send(E,{account_id:r}));m(i,{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>
11
11
 
12
- 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>
12
+ 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=>p({command:`workers-for-platforms dispatch-namespaces scripts bindings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({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 t=await n(e),r=e.local?f:await c();e.accountId=r;let i=await h(`Loading`,async()=>t.send(k,{account_id:r,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));m(i,{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>
13
13
 
14
- 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.`}))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>
14
+ 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=>p({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 t={force:e[`delete-with-references`]};if(e.dryRun){let n=await s();l({command:`cf workers-for-platforms dispatch-namespaces scripts delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<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:t,bodyKind:`none`});return}let r=await n(e),i=e.local?f:await c();if(e.accountId=i,!await v({force:!!e.force,message:`This will permanently delete the Workers for Platforms script.`}))return;let a=await h(`Deleting`,async()=>r.send(N,{account_id:i,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`],...t}));m(a,{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>
15
15
 
16
- 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
16
+ 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=>p({command:`workers-for-platforms dispatch-namespaces scripts get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({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 t=await n(e),r=e.local?f:await c();e.accountId=r;let i=await h(`Loading`,async()=>t.send(I,{account_id:r,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));m(i,{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
17
17
 
18
- 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
18
+ 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=>p({command:`workers-for-platforms dispatch-namespaces scripts list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={tags:e.tags};if(e.dryRun){let n=await s();l({command:`cf workers-for-platforms dispatch-namespaces scripts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<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:t,bodyKind:`none`});return}let r=await n(e),i=e.local?f:await c();e.accountId=i;let a=await h(`Loading`,async()=>r.send(z,{account_id:i,dispatch_namespace:e[`dispatch-namespace`],...t}));m(a,{successLabel:`Loaded`})})};function H(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets bulk
19
19
 
20
20
  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:
21
21
  - Set to a secret object to create or update.
22
22
  - Set to \`null\` to delete.
23
- - 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:d(e.secrets,`secrets`),version_tags:d(e[`version-tags`],`version-tags`)},[[`secrets`],[`version_tags`]]):u(e.body):{file:e.file}});return}let l=e.file===void 0?e.body===void 0?void 0:u(e.body):void 0,m=await r(e),g=e.local?t:await a();if(e.accountId=g,e.file!==void 0){let t=h(e.file),r=await c(`Updating`,async()=>n(m,`PATCH`,`/accounts/${g}/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!==void 0){let t=l,r=await c(`Updating`,async()=>n(m,`PATCH`,`/accounts/${g}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,{body:t}));o(r,{successLabel:`Updated`});return}let _={};e.secrets!==void 0&&f(_,[`secrets`],d(e.secrets,`secrets`)),e[`version-tags`]!==void 0&&f(_,[`version_tags`],d(e[`version-tags`],`version-tags`));let v=await c(`Updating`,async()=>n(m,`PATCH`,`/accounts/${g}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,{body:_}));o(v,{successLabel:`Updated`})})};var W={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 G(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets delete <secret-name>
23
+ - Omit to leave unchanged. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": ({...} | null)}.`}).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. Shape: {"<key>": unknown}.`}).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=>p({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 s();l({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?o({secrets:i(e.secrets,`secrets`),version_tags:i(e[`version-tags`],`version-tags`)},[[`secrets`],[`version_tags`]]):a(e.body):{file:e.file}});return}let u=e.file===void 0?e.body===void 0?void 0:a(e.body):void 0,p=await n(e),g=e.local?f:await c();if(e.accountId=g,e.file!==void 0){let n=d(e.file),r=await h(`Updating`,async()=>t(p,`PATCH`,`/accounts/${g}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,{body:n,headers:{"Content-Type":`application/merge-patch+json`}}));m(r,{successLabel:`Updated`});return}if(e.body!==void 0){let n=u,r=await h(`Updating`,async()=>t(p,`PATCH`,`/accounts/${g}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,{body:n}));m(r,{successLabel:`Updated`});return}let _={};e.secrets!==void 0&&r(_,[`secrets`],i(e.secrets,`secrets`)),e[`version-tags`]!==void 0&&r(_,[`version_tags`],i(e[`version-tags`],`version-tags`));let v=await h(`Updating`,async()=>t(p,`PATCH`,`/accounts/${g}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,{body:_}));m(v,{successLabel:`Updated`})})};var W={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 G(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets delete <secret-name>
24
24
 
25
- 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 K={command:`delete <secret-name>`,describe:`Delete Workers for Platforms script secret`,builder:G,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.`}))return;let d=await c(`Deleting`,async()=>l.send(W,{account_id:u,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`],secret_name:e[`secret-name`],...n}));o(d,{successLabel:`Deleted`})})};var q={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 ne(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets get <secret-name>
25
+ 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 K={command:`delete <secret-name>`,describe:`Delete Workers for Platforms script secret`,builder:G,handler:async e=>p({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 t={url_encoded:e[`url-encoded`]};if(e.dryRun){let n=await s();l({command:`cf workers-for-platforms dispatch-namespaces scripts secrets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<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:t,bodyKind:`none`});return}let r=await n(e),i=e.local?f:await c();if(e.accountId=i,!await v({force:!!e.force,message:`This will permanently delete the Workers for Platforms script secret.`}))return;let a=await h(`Deleting`,async()=>r.send(W,{account_id:i,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`],secret_name:e[`secret-name`],...t}));m(a,{successLabel:`Deleted`})})};var q={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 ne(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets get <secret-name>
26
26
 
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 J={command:`get <secret-name>`,describe:`Get Workers for Platforms Script Secret`,builder:ne,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(q,{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
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 J={command:`get <secret-name>`,describe:`Get Workers for Platforms Script Secret`,builder:ne,handler:async e=>p({command:`workers-for-platforms dispatch-namespaces scripts secrets get`,classification:{safeFlags:[`url-encoded`,`dry-run`]}},e,async()=>{let t={url_encoded:e[`url-encoded`]};if(e.dryRun){let n=await s();l({command:`cf workers-for-platforms dispatch-namespaces scripts secrets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<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:t,bodyKind:`none`});return}let r=await n(e),i=e.local?f:await c();e.accountId=i;let a=await h(`Loading`,async()=>r.send(q,{account_id:i,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`],secret_name:e[`secret-name`],...t}));m(a,{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
28
 
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 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>
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 Z={command:`list`,describe:`List Workers for Platforms Script Secrets`,builder:X,handler:async e=>p({command:`workers-for-platforms dispatch-namespaces scripts secrets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({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 t=await n(e),r=e.local?f:await c();e.accountId=r;let i=await h(`Loading`,async()=>t.send(Y,{account_id:r,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));m(i,{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
30
 
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=>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`]).implies(`key-base64`,[`algorithm`,`format`,`usages`]).conflicts(`key-jwk`,[`text`]).implies(`key-jwk`,[`algorithm`,`format`,`usages`]).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:d(e.algorithm,`algorithm`),format:e.format,key_base64:m(e[`key-base64`],`key-base64`,`text`),key_jwk:d(e[`key-jwk`],`key-jwk`),usages:e.usages},[[`algorithm`],[`key_jwk`]]):u(e.body),sensitiveBodyPaths:[[`text`],[`key_base64`],[`key_jwk`]]});return}let n=e.body===void 0?void 0:u(e.body),l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(Q,{body:t,account_id:f,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 h=p({name:m(e.name,`name`,`text`),text:m(e.text,`text`,`text`),type:e.type,algorithm:d(e.algorithm,`algorithm`),format:e.format,key_base64:m(e[`key-base64`],`key-base64`,`text`),key_jwk:d(e[`key-jwk`],`key-jwk`),usages:e.usages},[[`algorithm`],[`key_jwk`]]),v=await c(`Updating`,async()=>l.send(Q,{body:h,account_id:f,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(v,{successLabel:`Updated`})})},ae={command:`secrets`,describe:`Operations for dispatch-namespaces.scripts.secrets`,builder:e=>e.command(U).command(K).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>
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=>u(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. Shape: {"<key>": unknown}.`}).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=>u(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. Shape: {"<key>": unknown}.'}).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`]).implies(`key-base64`,[`algorithm`,`format`,`usages`]).conflicts(`key-jwk`,[`text`]).implies(`key-jwk`,[`algorithm`,`format`,`usages`]).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=>p({command:`workers-for-platforms dispatch-namespaces scripts secrets update`,classification:{safeFlags:[`type`,`format`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({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?o({name:u(e.name,`name`,`text`),text:u(e.text,`text`,`text`),type:e.type,algorithm:i(e.algorithm,`algorithm`),format:e.format,key_base64:u(e[`key-base64`],`key-base64`,`text`),key_jwk:i(e[`key-jwk`],`key-jwk`),usages:e.usages},[[`algorithm`],[`key_jwk`]]):a(e.body),sensitiveBodyPaths:[[`text`],[`key_base64`],[`key_jwk`]]});return}let t=e.body===void 0?void 0:a(e.body),r=await n(e),d=e.local?f:await c();if(e.accountId=d,e.body!==void 0){let n=t,i=await h(`Updating`,async()=>r.send(Q,{body:n,account_id:d,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));m(i,{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 p=o({name:u(e.name,`name`,`text`),text:u(e.text,`text`,`text`),type:e.type,algorithm:i(e.algorithm,`algorithm`),format:e.format,key_base64:u(e[`key-base64`],`key-base64`,`text`),key_jwk:i(e[`key-jwk`],`key-jwk`),usages:e.usages},[[`algorithm`],[`key_jwk`]]),v=await h(`Updating`,async()=>r.send(Q,{body:p,account_id:d,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));m(v,{successLabel:`Updated`})})},ae={command:`secrets`,describe:`Operations for dispatch-namespaces.scripts.secrets`,builder:e=>e.command(U).command(K).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
32
 
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 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!==void 0){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!==void 0){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>
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 ce={command:`edit <script-name>`,describe:`Patch Workers for Platforms Script Settings`,builder:se,handler:async e=>p({command:`workers-for-platforms dispatch-namespaces scripts settings edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({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 r=await n(e),i=e.local?f:await c();if(e.accountId=i,e.file!==void 0||e.body!==void 0||e.settings!==void 0){let n=new FormData;if(e.file!==void 0){let t=d(e.file);n.append(`file`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&n.append(`file`,e.body);if(e.settings!==void 0){let t=typeof e.settings==`string`?u(e.settings,`settings`,`text`):e.settings;n.append(`settings`,typeof t==`string`?t:JSON.stringify(t))}let a=await h(`Updating`,async()=>t(r,`PATCH`,`/accounts/${i}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/settings`,{body:n}));m(a,{successLabel:`Updated`});return}if(e.body!==void 0){let n=u(e.body,`body`,`binary`),a=await h(`Updating`,async()=>t(r,`PATCH`,`/accounts/${i}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/settings`,{body:n,headers:{"Content-Type":`multipart/form-data`}}));m(a,{successLabel:`Updated`});return}let a=await h(`Updating`,async()=>r.send(oe,{account_id:i,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));m(a,{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
34
 
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 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.`}))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
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 de={command:`get <script-name>`,describe:`Get Workers for Platforms Script Settings`,builder:ue,handler:async e=>p({command:`workers-for-platforms dispatch-namespaces scripts settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({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 t=await n(e),r=e.local?f:await c();e.accountId=r;let i=await h(`Loading`,async()=>t.send(le,{account_id:r,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));m(i,{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=>p({command:`workers-for-platforms dispatch-namespaces scripts tags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let r={};if(e[`api-version`]!==void 0&&(r[`api-version`]=String(e[`api-version`])),e.dryRun){let t=await s();l({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 i=await n(e),a=e.local?f:await c();if(e.accountId=a,!await v({force:!!e.force,message:`This will delete the tag from the Workers for Platforms script.`}))return;let o=await h(`Deleting`,async()=>t(i,`DELETE`,`/accounts/${a}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/tags/${encodeURIComponent(String(e.tag))}`,{headers:Object.keys(r).length>0?r:void 0}));m(o,{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
36
36
 
37
- 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`})})};var _e={method:`PUT`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/tags`,body:`json`};function ve(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts tags update <script-name>
37
+ 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=>p({command:`workers-for-platforms dispatch-namespaces scripts tags list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({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 t=await n(e),r=e.local?f:await c();e.accountId=r;let i=await h(`Loading`,async()=>t.send(me,{account_id:r,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));m(i,{successLabel:`Loaded`})})};var _e={method:`PUT`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/tags`,body:`json`};function ve(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts tags update <script-name>
38
38
 
39
- 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 ye={command:`update <script-name>`,describe:`Replace Workers for Platforms Script Tags`,builder:ve,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,[],10)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let n=e.body===void 0?void 0:u(e.body,[],10),l=await r(e),d=e.local?t:await a();if(e.accountId=d,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(_e,{body:t,account_id:d,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(r,{successLabel:`Updated`})}})},be={command:`tags`,describe:`Operations for dispatch-namespaces.scripts.tags`,builder:e=>e.command($).command(ge).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`scripts`,describe:`Operations around customer Workers deployed inside a dispatch namespace`,builder:e=>e.command(F).command(R).command(V).command(M).command(ae).command(fe).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Se={command:`dispatch-namespaces`,describe:`Isolate and route requests to many individual user Workers`,builder:e=>e.command(te).command(S).command(T).command(O).command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ce={command:`workers-for-platforms`,describe:`Workers for Platforms uses dispatch namespaces to isolate and route requests to many individual user Workers, letting platforms run untrusted customer or AI-generated code at scale with per-tenant bindings, limits, and observability`,builder:e=>e.command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ce as default};
39
+ 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 ye={command:`update <script-name>`,describe:`Replace Workers for Platforms Script Tags`,builder:ve,handler:async e=>p({command:`workers-for-platforms dispatch-namespaces scripts tags update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({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:a(e.body,[],10)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let t=e.body===void 0?void 0:a(e.body,[],10),r=await n(e),i=e.local?f:await c();if(e.accountId=i,e.body!==void 0){let n=t,a=await h(`Updating`,async()=>r.send(_e,{body:n,account_id:i,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));m(a,{successLabel:`Updated`})}})},be={command:`tags`,describe:`Operations for dispatch-namespaces.scripts.tags`,builder:e=>e.command($).command(ge).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`scripts`,describe:`Operations around customer Workers deployed inside a dispatch namespace`,builder:e=>e.command(F).command(R).command(V).command(M).command(ae).command(fe).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Se={command:`dispatch-namespaces`,describe:`Isolate and route requests to many individual user Workers`,builder:e=>e.command(te).command(S).command(T).command(O).command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ce={command:`workers-for-platforms`,describe:`Workers for Platforms uses dispatch namespaces to isolate and route requests to many individual user Workers, letting platforms run untrusted customer or AI-generated code at scale with per-tenant bindings, limits, and observability`,builder:e=>e.command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ce as default};
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{n}from"./auth-B-h0BHg7.mjs";import{a as r,t as i}from"./context-BY1Eh_Qe.mjs";import{t as a}from"./output-BZQEl3mK.mjs";import{t as o}from"./dry-run-kJbjn4kG.mjs";import{t as s}from"./progress-yvPscjYg.mjs";import{t as c}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as l,t as u}from"./body-parser-DoewLePl.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-CEpZ-lQZ.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-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{r as n,t as r}from"./body-parser-HN91kAf0.mjs";import{a as i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./dry-run-qsnRlRk6.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import{t as u}from"./output-hFMAotFl.mjs";import{t as d}from"./progress-DE_G09u2.mjs";import{a as f,i as p,n as m}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.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
- 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\n\n`disabled` cannot be combined with `certificate_authority`: a custom CA is\nonly used to verify the server certificate.'}).option(`tls-settings-certificate-authority`,{type:`string`,description:`UUID of the custom CA certificate or chain.`}).option(`tls-settings-client-certificate`,{type:`string`,description:`UUID of the mTLS client certificate and private key.`}).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-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).implies(`host-ipv4`,[`host-network-tunnel-id`]).conflicts(`host-network-tunnel-id`,[`host-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).conflicts(`host-ipv6`,[`host-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).implies(`host-ipv6`,[`host-network-tunnel-id`]).conflicts(`host-hostname`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-hostname`,[`host-resolver-network-tunnel-id`]).conflicts(`host-resolver-network-resolver-ips`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-resolver-network-resolver-ips`,[`host-hostname`,`host-resolver-network-tunnel-id`]).conflicts(`host-resolver-network-tunnel-id`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-resolver-network-tunnel-id`,[`host-hostname`]).implies(`tls-settings-certificate-authority`,[`tls-settings-cert-verification-mode`]).implies(`tls-settings-client-certificate`,[`tls-settings-cert-verification-mode`]).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`])}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`),certificate_authority:d(e[`tls-settings-certificate-authority`],`tls-settings-certificate-authority`,`text`),client_certificate:d(e[`tls-settings-client-certificate`],`tls-settings-client-certificate`,`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=e.body===void 0?void 0:l(e.body),m=await n(e),g=e.local?t:await i();if(e.accountId=g,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>m.send(h,{body:e,account_id:g}));a(t,{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 _=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`),certificate_authority:d(e[`tls-settings-certificate-authority`],`tls-settings-certificate-authority`,`text`),client_certificate:d(e[`tls-settings-client-certificate`],`tls-settings-client-certificate`,`text`)},type:e.type,http_port:e[`http-port`],https_port:e[`https-port`],app_protocol:e[`app-protocol`],tcp_port:e[`tcp-port`]}),v=await s(`Creating`,async()=>m.send(h,{body:_,account_id:g}));a(v,{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>
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\n\n`disabled` cannot be combined with `certificate_authority`: a custom CA is\nonly used to verify the server certificate.'}).option(`tls-settings-certificate-authority`,{type:`string`,description:`UUID of the custom CA certificate or chain.`}).option(`tls-settings-client-certificate`,{type:`string`,description:`UUID of the mTLS client certificate and private key.`}).option(`type`,{type:`string`,description:`The type field`,choices:[`tcp`,`http`]}).coerce(`type`,e=>s(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=>s(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-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).implies(`host-ipv4`,[`host-network-tunnel-id`]).conflicts(`host-network-tunnel-id`,[`host-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).conflicts(`host-ipv6`,[`host-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).implies(`host-ipv6`,[`host-network-tunnel-id`]).conflicts(`host-hostname`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-hostname`,[`host-resolver-network-tunnel-id`]).conflicts(`host-resolver-network-resolver-ips`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-resolver-network-resolver-ips`,[`host-hostname`,`host-resolver-network-tunnel-id`]).conflicts(`host-resolver-network-tunnel-id`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-resolver-network-tunnel-id`,[`host-hostname`]).implies(`tls-settings-certificate-authority`,[`tls-settings-cert-verification-mode`]).implies(`tls-settings-client-certificate`,[`tls-settings-cert-verification-mode`]).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`])}const _={command:`create`,describe:`Create Workers VPC connectivity service`,builder:g,handler:async e=>l({command:`workers-vpc services create`,classification:{safeFlags:[`type`,`app-protocol`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();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?r({host:{ipv4:s(e[`host-ipv4`],`host-ipv4`,`text`),network:{tunnel_id:s(e[`host-network-tunnel-id`],`host-network-tunnel-id`,`text`)},ipv6:s(e[`host-ipv6`],`host-ipv6`,`text`),hostname:s(e[`host-hostname`],`host-hostname`,`text`),resolver_network:{resolver_ips:e[`host-resolver-network-resolver-ips`],tunnel_id:s(e[`host-resolver-network-tunnel-id`],`host-resolver-network-tunnel-id`,`text`)}},name:s(e.name,`name`,`text`),tls_settings:{cert_verification_mode:s(e[`tls-settings-cert-verification-mode`],`tls-settings-cert-verification-mode`,`text`),certificate_authority:s(e[`tls-settings-certificate-authority`],`tls-settings-certificate-authority`,`text`),client_certificate:s(e[`tls-settings-client-certificate`],`tls-settings-client-certificate`,`text`)},type:e.type,http_port:e[`http-port`],https_port:e[`https-port`],app_protocol:e[`app-protocol`],tcp_port:e[`tcp-port`]}):n(e.body)});return}let l=e.body===void 0?void 0:n(e.body),m=await t(e),g=e.local?c:await a();if(e.accountId=g,e.body!==void 0){let e=l,t=await d(`Creating`,async()=>m.send(h,{body:e,account_id:g}));u(t,{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 _=r({host:{ipv4:s(e[`host-ipv4`],`host-ipv4`,`text`),network:{tunnel_id:s(e[`host-network-tunnel-id`],`host-network-tunnel-id`,`text`)},ipv6:s(e[`host-ipv6`],`host-ipv6`,`text`),hostname:s(e[`host-hostname`],`host-hostname`,`text`),resolver_network:{resolver_ips:e[`host-resolver-network-resolver-ips`],tunnel_id:s(e[`host-resolver-network-tunnel-id`],`host-resolver-network-tunnel-id`,`text`)}},name:s(e.name,`name`,`text`),tls_settings:{cert_verification_mode:s(e[`tls-settings-cert-verification-mode`],`tls-settings-cert-verification-mode`,`text`),certificate_authority:s(e[`tls-settings-certificate-authority`],`tls-settings-certificate-authority`,`text`),client_certificate:s(e[`tls-settings-client-certificate`],`tls-settings-client-certificate`,`text`)},type:e.type,http_port:e[`http-port`],https_port:e[`https-port`],app_protocol:e[`app-protocol`],tcp_port:e[`tcp-port`]}),v=await d(`Creating`,async()=>m.send(h,{body:_,account_id:g}));u(v,{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
 
6
- Removes a single Workers VPC connectivity service by its ID. Any Worker bindings referencing this service will stop working.`).positional(`service-id`,{type:`string`,description:`Service ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <service-id>`,describe:`Delete Workers VPC connectivity service`,builder:y,handler:async e=>c({command:`workers-vpc services delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-vpc services delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/connectivity/directory/services/${e[`service-id`]==null?`<service-id>`:encodeURIComponent(String(e[`service-id`]))}`,pathParams:{"service-id":String(e[`service-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`This operation permanently deletes a Workers VPC connectivity service.`}))return;let u=await s(`Deleting`,async()=>c.send(v,{account_id:l,service_id:e[`service-id`]}));a(u,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/accounts/${t.account_id}/connectivity/directory/services/${t.service_id}`};function S(e){return e.usage(`$0 workers-vpc services get <service-id>
6
+ Removes a single Workers VPC connectivity service by its ID. Any Worker bindings referencing this service will stop working.`).positional(`service-id`,{type:`string`,description:`Service ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <service-id>`,describe:`Delete Workers VPC connectivity service`,builder:y,handler:async e=>l({command:`workers-vpc services delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf workers-vpc services delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/connectivity/directory/services/${e[`service-id`]==null?`<service-id>`:encodeURIComponent(String(e[`service-id`]))}`,pathParams:{"service-id":String(e[`service-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?c:await a();if(e.accountId=r,!await m({force:!!e.force,message:`This operation permanently deletes a Workers VPC connectivity service.`}))return;let s=await d(`Deleting`,async()=>n.send(v,{account_id:r,service_id:e[`service-id`]}));u(s,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/accounts/${t.account_id}/connectivity/directory/services/${t.service_id}`};function S(e){return e.usage(`$0 workers-vpc services get <service-id>
7
7
 
8
- Fetches a single Workers VPC connectivity service by its ID.`).positional(`service-id`,{type:`string`,description:`Service ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <service-id>`,describe:`Get Workers VPC connectivity service`,builder:S,handler:async e=>c({command:`workers-vpc services get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-vpc services get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/connectivity/directory/services/${e[`service-id`]==null?`<service-id>`:encodeURIComponent(String(e[`service-id`]))}`,pathParams:{"service-id":String(e[`service-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(x,{account_id:l,service_id:e[`service-id`]}));a(u,{successLabel:`Loaded`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/connectivity/directory/services`,query:[`type`,`page`,`per_page`]};function T(e){return e.usage(`$0 workers-vpc services list
8
+ Fetches a single Workers VPC connectivity service by its ID.`).positional(`service-id`,{type:`string`,description:`Service ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <service-id>`,describe:`Get Workers VPC connectivity service`,builder:S,handler:async e=>l({command:`workers-vpc services get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf workers-vpc services get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/connectivity/directory/services/${e[`service-id`]==null?`<service-id>`:encodeURIComponent(String(e[`service-id`]))}`,pathParams:{"service-id":String(e[`service-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?c:await a();e.accountId=r;let s=await d(`Loading`,async()=>n.send(x,{account_id:r,service_id:e[`service-id`]}));u(s,{successLabel:`Loaded`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/connectivity/directory/services`,query:[`type`,`page`,`per_page`]};function T(e){return e.usage(`$0 workers-vpc services list
9
9
 
10
- Lists the Workers VPC connectivity services in the account.`).option(`type`,{type:`string`,description:`Type`,choices:[`tcp`,`http`]}).option(`page`,{type:`number`,description:`Current page in the response`}).option(`per-page`,{type:`number`,description:`Max amount of entries returned per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Workers VPC connectivity services`,builder:T,handler:async e=>c({command:`workers-vpc services list`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{let c={type:e.type,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf workers-vpc services list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/connectivity/directory/services`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(w,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var D={method:`PUT`,path:t=>e`/accounts/${t.account_id}/connectivity/directory/services/${t.service_id}`,body:`json`};function O(e){return e.usage(`$0 workers-vpc services update <service-id>
10
+ Lists the Workers VPC connectivity services in the account.`).option(`type`,{type:`string`,description:`Type`,choices:[`tcp`,`http`]}).option(`page`,{type:`number`,description:`Current page in the response`}).option(`per-page`,{type:`number`,description:`Max amount of entries returned per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Workers VPC connectivity services`,builder:T,handler:async e=>l({command:`workers-vpc services list`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{let n={type:e.type,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();o({command:`cf workers-vpc services list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/connectivity/directory/services`,pathParams:{},query:n,bodyKind:`none`});return}let r=await t(e),s=e.local?c:await a();e.accountId=s;let l=await d(`Loading`,async()=>r.send(w,{account_id:s,...n}));u(l,{successLabel:`Loaded`})})};var D={method:`PUT`,path:t=>e`/accounts/${t.account_id}/connectivity/directory/services/${t.service_id}`,body:`json`};function O(e){return e.usage(`$0 workers-vpc services update <service-id>
11
11
 
12
- Updates an existing Workers VPC connectivity service by its ID.`).positional(`service-id`,{type:`string`,description:`Service ID`,demandOption:!0}).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\n\n`disabled` cannot be combined with `certificate_authority`: a custom CA is\nonly used to verify the server certificate.'}).option(`tls-settings-certificate-authority`,{type:`string`,description:`UUID of the custom CA certificate or chain.`}).option(`tls-settings-client-certificate`,{type:`string`,description:`UUID of the mTLS client certificate and private key.`}).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-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).implies(`host-ipv4`,[`host-network-tunnel-id`]).conflicts(`host-network-tunnel-id`,[`host-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).conflicts(`host-ipv6`,[`host-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).implies(`host-ipv6`,[`host-network-tunnel-id`]).conflicts(`host-hostname`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-hostname`,[`host-resolver-network-tunnel-id`]).conflicts(`host-resolver-network-resolver-ips`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-resolver-network-resolver-ips`,[`host-hostname`,`host-resolver-network-tunnel-id`]).conflicts(`host-resolver-network-tunnel-id`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-resolver-network-tunnel-id`,[`host-hostname`]).implies(`tls-settings-certificate-authority`,[`tls-settings-cert-verification-mode`]).implies(`tls-settings-client-certificate`,[`tls-settings-cert-verification-mode`]).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`])}const k={command:`update <service-id>`,describe:`Update Workers VPC connectivity service`,builder:O,handler:async e=>c({command:`workers-vpc services update`,classification:{safeFlags:[`type`,`app-protocol`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-vpc services update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/connectivity/directory/services/${e[`service-id`]==null?`<service-id>`:encodeURIComponent(String(e[`service-id`]))}`,pathParams:{"service-id":String(e[`service-id`]??``)},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`),certificate_authority:d(e[`tls-settings-certificate-authority`],`tls-settings-certificate-authority`,`text`),client_certificate:d(e[`tls-settings-client-certificate`],`tls-settings-client-certificate`,`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=e.body===void 0?void 0:l(e.body),m=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>m.send(D,{body:t,account_id:h,service_id:e[`service-id`]}));a(n,{successLabel:`Updated`});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`),certificate_authority:d(e[`tls-settings-certificate-authority`],`tls-settings-certificate-authority`,`text`),client_certificate:d(e[`tls-settings-client-certificate`],`tls-settings-client-certificate`,`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(`Updating`,async()=>m.send(D,{body:g,account_id:h,service_id:e[`service-id`]}));a(_,{successLabel:`Updated`})})},A={command:`services`,describe:`Operations for services`,builder:e=>e.command(_).command(b).command(C).command(E).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`workers-vpc`,describe:`workers-vpc`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{j as default};
12
+ Updates an existing Workers VPC connectivity service by its ID.`).positional(`service-id`,{type:`string`,description:`Service ID`,demandOption:!0}).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\n\n`disabled` cannot be combined with `certificate_authority`: a custom CA is\nonly used to verify the server certificate.'}).option(`tls-settings-certificate-authority`,{type:`string`,description:`UUID of the custom CA certificate or chain.`}).option(`tls-settings-client-certificate`,{type:`string`,description:`UUID of the mTLS client certificate and private key.`}).option(`type`,{type:`string`,description:`The type field`,choices:[`tcp`,`http`]}).coerce(`type`,e=>s(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=>s(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-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).implies(`host-ipv4`,[`host-network-tunnel-id`]).conflicts(`host-network-tunnel-id`,[`host-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).conflicts(`host-ipv6`,[`host-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).implies(`host-ipv6`,[`host-network-tunnel-id`]).conflicts(`host-hostname`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-hostname`,[`host-resolver-network-tunnel-id`]).conflicts(`host-resolver-network-resolver-ips`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-resolver-network-resolver-ips`,[`host-hostname`,`host-resolver-network-tunnel-id`]).conflicts(`host-resolver-network-tunnel-id`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-resolver-network-tunnel-id`,[`host-hostname`]).implies(`tls-settings-certificate-authority`,[`tls-settings-cert-verification-mode`]).implies(`tls-settings-client-certificate`,[`tls-settings-cert-verification-mode`]).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`])}const k={command:`update <service-id>`,describe:`Update Workers VPC connectivity service`,builder:O,handler:async e=>l({command:`workers-vpc services update`,classification:{safeFlags:[`type`,`app-protocol`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf workers-vpc services update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/connectivity/directory/services/${e[`service-id`]==null?`<service-id>`:encodeURIComponent(String(e[`service-id`]))}`,pathParams:{"service-id":String(e[`service-id`]??``)},bodyKind:`json`,body:e.body===void 0?r({host:{ipv4:s(e[`host-ipv4`],`host-ipv4`,`text`),network:{tunnel_id:s(e[`host-network-tunnel-id`],`host-network-tunnel-id`,`text`)},ipv6:s(e[`host-ipv6`],`host-ipv6`,`text`),hostname:s(e[`host-hostname`],`host-hostname`,`text`),resolver_network:{resolver_ips:e[`host-resolver-network-resolver-ips`],tunnel_id:s(e[`host-resolver-network-tunnel-id`],`host-resolver-network-tunnel-id`,`text`)}},name:s(e.name,`name`,`text`),tls_settings:{cert_verification_mode:s(e[`tls-settings-cert-verification-mode`],`tls-settings-cert-verification-mode`,`text`),certificate_authority:s(e[`tls-settings-certificate-authority`],`tls-settings-certificate-authority`,`text`),client_certificate:s(e[`tls-settings-client-certificate`],`tls-settings-client-certificate`,`text`)},type:e.type,http_port:e[`http-port`],https_port:e[`https-port`],app_protocol:e[`app-protocol`],tcp_port:e[`tcp-port`]}):n(e.body)});return}let l=e.body===void 0?void 0:n(e.body),m=await t(e),h=e.local?c:await a();if(e.accountId=h,e.body!==void 0){let t=l,n=await d(`Updating`,async()=>m.send(D,{body:t,account_id:h,service_id:e[`service-id`]}));u(n,{successLabel:`Updated`});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=r({host:{ipv4:s(e[`host-ipv4`],`host-ipv4`,`text`),network:{tunnel_id:s(e[`host-network-tunnel-id`],`host-network-tunnel-id`,`text`)},ipv6:s(e[`host-ipv6`],`host-ipv6`,`text`),hostname:s(e[`host-hostname`],`host-hostname`,`text`),resolver_network:{resolver_ips:e[`host-resolver-network-resolver-ips`],tunnel_id:s(e[`host-resolver-network-tunnel-id`],`host-resolver-network-tunnel-id`,`text`)}},name:s(e.name,`name`,`text`),tls_settings:{cert_verification_mode:s(e[`tls-settings-cert-verification-mode`],`tls-settings-cert-verification-mode`,`text`),certificate_authority:s(e[`tls-settings-certificate-authority`],`tls-settings-certificate-authority`,`text`),client_certificate:s(e[`tls-settings-client-certificate`],`tls-settings-client-certificate`,`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 d(`Updating`,async()=>m.send(D,{body:g,account_id:h,service_id:e[`service-id`]}));u(_,{successLabel:`Updated`})})},A={command:`services`,describe:`Operations for services`,builder:e=>e.command(_).command(b).command(C).command(E).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`workers-vpc`,describe:`workers-vpc`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{j as default};