cf 1.0.0-beta.0 → 1.0.0-beta.1

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 (207) hide show
  1. package/dist/_meta/commands.json +62 -6
  2. package/dist/_meta/hand-written-commands.json +31 -1
  3. package/dist/_meta/schemas.json +23 -1
  4. package/dist/{abuse-reports-BwsJLiPN.mjs → abuse-reports-Dd6kJM7r.mjs} +1 -1
  5. package/dist/{access-BVbIajYr.mjs → access-C_2rEi0H.mjs} +1 -1
  6. package/dist/{account-DBLarar2.mjs → account-CZ9SPVdz.mjs} +1 -1
  7. package/dist/{account-tags-BNrSShjj.mjs → account-tags-DAf-hq1m.mjs} +1 -1
  8. package/dist/{accounts-CCAnDjFk.mjs → accounts-BDIKjiG2.mjs} +1 -1
  9. package/dist/{acm-ZPYQbZQr.mjs → acm-D-q1FVWJ.mjs} +1 -1
  10. package/dist/{addressing-BFpzLfTn.mjs → addressing-0w2U1NEy.mjs} +1 -1
  11. package/dist/{agent-memory-DEvy2dLU.mjs → agent-memory-Drumm4qd.mjs} +1 -1
  12. package/dist/{ai-BF0_0NtS.mjs → ai-ARwLeQ1O.mjs} +1 -1
  13. package/dist/{ai-audit-Dn03zntn.mjs → ai-audit-CPrmohqf.mjs} +1 -1
  14. package/dist/{ai-gateway-CVABbCjv.mjs → ai-gateway-DNY4FPF2.mjs} +1 -1
  15. package/dist/{ai-search-g0tR8Cut.mjs → ai-search-B5l4IDSR.mjs} +1 -1
  16. package/dist/{ai-security-BXXA0Jnk.mjs → ai-security-C7_IGDDl.mjs} +1 -1
  17. package/dist/{alerting-Bst10SOG.mjs → alerting-B6m1Rhf4.mjs} +1 -1
  18. package/dist/{analytics-DgEaxta8.mjs → analytics-nnzFBB_7.mjs} +1 -1
  19. package/dist/{analytics_engine-B4DvcYmB.mjs → analytics_engine-BvjKCwn1.mjs} +1 -1
  20. package/dist/{api-security-Dkx1Codr.mjs → api-security-B9IozS2a.mjs} +1 -1
  21. package/dist/{argo-BvswWPlP.mjs → argo-C_QcqR6P.mjs} +1 -1
  22. package/dist/{artifacts-D8kZKJq0.mjs → artifacts-DDFNpYBz.mjs} +1 -1
  23. package/dist/{audit-logs-Bp_yQpXJ.mjs → audit-logs-cTzNV0DV.mjs} +1 -1
  24. package/dist/{auth-C80y97yu.mjs → auth-DJhSjNNL.mjs} +1 -1
  25. package/dist/{auth-B9w55oRg.mjs → auth-sAorfdWU.mjs} +1 -1
  26. package/dist/{billing-Cqj64fqz.mjs → billing-DU2X-q-x.mjs} +1 -1
  27. package/dist/{bot-management-CzZx_aml.mjs → bot-management-BHAAoZOh.mjs} +1 -1
  28. package/dist/{botnet-feed-Co0c8Xdj.mjs → botnet-feed-DOOnGVVY.mjs} +1 -1
  29. package/dist/{brand-protection-CDsGaPIl.mjs → brand-protection-C_DYa7IK.mjs} +1 -1
  30. package/dist/{browser-extension-BRHJm3Qf.mjs → browser-extension-C48pKh3t.mjs} +1 -1
  31. package/dist/{browser-run-DFrohJ1p.mjs → browser-run-Dw-vgWGR.mjs} +1 -1
  32. package/dist/build-1a8CiNIT.mjs +2 -0
  33. package/dist/build-Ca_drQY2.mjs +2 -0
  34. package/dist/{builds-CamhClyb.mjs → builds-CO0MmSd3.mjs} +1 -1
  35. package/dist/{cache-BiTk4-Zc.mjs → cache-XxusQxXe.mjs} +1 -1
  36. package/dist/{certificate-authorities-Dal9DNjW.mjs → certificate-authorities-Dmxh7w-Z.mjs} +1 -1
  37. package/dist/{client-certificates-DDisXoTE.mjs → client-certificates-CgaIc3zN.mjs} +1 -1
  38. package/dist/{client-side-security-CIO_YPtN.mjs → client-side-security-D7NWV0YH.mjs} +1 -1
  39. package/dist/{cloud-connector-vwdixea0.mjs → cloud-connector-XMFOTNqT.mjs} +1 -1
  40. package/dist/{cloudforce-one-C1cFVBGK.mjs → cloudforce-one-Cew4MHvA.mjs} +1 -1
  41. package/dist/{command-BP7ldws1.mjs → command-CsZFRm3P.mjs} +1 -1
  42. package/dist/{command-BtNRBTP6.mjs → command-DBz8QiFk.mjs} +1 -1
  43. package/dist/command-RiZ_LYcm.mjs +2 -0
  44. package/dist/{connector-interrupts-DQ5T-HMN.mjs → connector-interrupts-BfQN_pm6.mjs} +1 -1
  45. package/dist/{connector-telemetry-events-DWam38_9.mjs → connector-telemetry-events-B7qLZsZJ.mjs} +1 -1
  46. package/dist/{connector-telemetry-snapshots-DX6AJf9Q.mjs → connector-telemetry-snapshots-Ckvg9BPc.mjs} +1 -1
  47. package/dist/{connectors-CBhLWVd-.mjs → connectors-BhvAP5fb.mjs} +1 -1
  48. package/dist/{containers-C7blN-pe.mjs → containers-Bl3EY-cy.mjs} +1 -1
  49. package/dist/{containers-Bx_44bmJ.mjs → containers-Cq1gtnq6.mjs} +1 -1
  50. package/dist/{content-scan-CC91dAlv.mjs → content-scan-BYGe9fFj.mjs} +1 -1
  51. package/dist/{cps-D9a4N_bH.mjs → cps-BWMDWeVq.mjs} +1 -1
  52. package/dist/{csamScanner-T7nbCnep.mjs → csamScanner-DMYGzLNi.mjs} +1 -1
  53. package/dist/{ct-alerting-CkjNJlla.mjs → ct-alerting-Vq4l2s7n.mjs} +1 -1
  54. package/dist/{custom-certificates-DnWnt9oJ.mjs → custom-certificates-BDEHH0Ym.mjs} +1 -1
  55. package/dist/{custom-csrs-Db2pF9Ib.mjs → custom-csrs-CHSkZNdX.mjs} +1 -1
  56. package/dist/{custom-hostnames-B_N-uSIa.mjs → custom-hostnames-Bch3iQZC.mjs} +1 -1
  57. package/dist/{custom-nameservers-DPA_sFY8.mjs → custom-nameservers-Tdvu1-vr.mjs} +1 -1
  58. package/dist/{custom-pages-D6fxEBoh.mjs → custom-pages-rFsiIXlr.mjs} +1 -1
  59. package/dist/{d1-DXs1xVmH.mjs → d1-C1GK7DsW.mjs} +1 -1
  60. package/dist/{data-security-CVZAIzhe.mjs → data-security-DDhPnX8Z.mjs} +1 -1
  61. package/dist/{dcv-delegation-as1ue_wx.mjs → dcv-delegation-D6xiYj2l.mjs} +1 -1
  62. package/dist/{deploy-D2XXCkqk.mjs → deploy-D04Xvm0m.mjs} +1 -1
  63. package/dist/{deploy-input-BCYyKXpp.mjs → deploy-input-COEKxOA1.mjs} +1 -1
  64. package/dist/{dev-nsNxyg2D.mjs → dev-CVD3BVUG.mjs} +1 -1
  65. package/dist/{diagnostics-BKH1Oh-C.mjs → diagnostics-BZVAAguV.mjs} +1 -1
  66. package/dist/{dialog-Dx4rRcKM.mjs → dialog--iw0F2s-.mjs} +1 -1
  67. package/dist/{dist-BDOzKthe.mjs → dist-CUUGKvjh.mjs} +1 -1
  68. package/dist/{dls-C5kAQsN6.mjs → dls-BsnURYja.mjs} +1 -1
  69. package/dist/{dns-CYwXrdJO.mjs → dns-B_nTXhuM.mjs} +1 -1
  70. package/dist/{dns-firewall-BEw4QcXj.mjs → dns-firewall-DDsrdulo.mjs} +1 -1
  71. package/dist/{durable-objects-3jvUgzKd.mjs → durable-objects-8U8DpF9q.mjs} +1 -1
  72. package/dist/{email-auth-B3MD8FrJ.mjs → email-auth-CzjtGH6g.mjs} +1 -1
  73. package/dist/{email-routing-C4YhZGPw.mjs → email-routing-B92fty1-.mjs} +1 -1
  74. package/dist/{email-security-BcFyWNby.mjs → email-security-keTqF0nJ.mjs} +1 -1
  75. package/dist/{email-sending-BO1GOAho.mjs → email-sending-B7f95epu.mjs} +5 -5
  76. package/dist/error-sanitization-Cbd_oegl.mjs +2 -0
  77. package/dist/{error-sanitization-DOlqWkNu.mjs → error-sanitization-DwOlM3R7.mjs} +1 -1
  78. package/dist/{fieldExtractors-BJDnzNCN.mjs → fieldExtractors-DL_H1m7E.mjs} +1 -1
  79. package/dist/{firewall-BSMa9aH3.mjs → firewall-67qoXiqD.mjs} +1 -1
  80. package/dist/{flagship-BJYMb7hb.mjs → flagship-CjC3dF7L.mjs} +1 -1
  81. package/dist/{fraud-C7kS7kP9.mjs → fraud-DU_YCLC5.mjs} +1 -1
  82. package/dist/{google-tag-gateway-8VR-j0sa.mjs → google-tag-gateway-xqN-QudN.mjs} +1 -1
  83. package/dist/{healthchecks-BJleItOD.mjs → healthchecks-COnq1YOx.mjs} +1 -1
  84. package/dist/{hostnames-CHajvoHa.mjs → hostnames-CxRAY_Pp.mjs} +1 -1
  85. package/dist/{hyperdrive-DlxQrok-.mjs → hyperdrive-DPWyiXpj.mjs} +1 -1
  86. package/dist/{iam-B7oTr6vW.mjs → iam-CtX9NPCy.mjs} +1 -1
  87. package/dist/{images-xLAYe436.mjs → images-CuWFOsGw.mjs} +1 -1
  88. package/dist/index.mjs +1 -1
  89. package/dist/{intel-DwZXY1YE.mjs → intel-BeGV3VXt.mjs} +1 -1
  90. package/dist/{ips-BC_9nKE7.mjs → ips-d6aoKAI4.mjs} +1 -1
  91. package/dist/{keyless-certificates-CtsCsbZ2.mjs → keyless-certificates-Dvib4jhw.mjs} +1 -1
  92. package/dist/{keys-K-GFzhku.mjs → keys-Fyf3vWcA.mjs} +1 -1
  93. package/dist/{kv-Bfwz_ULu.mjs → kv-CA4J7cCq.mjs} +1 -1
  94. package/dist/{leaked-credential-checks-D8UuxztO.mjs → leaked-credential-checks-B7ewx3W-.mjs} +1 -1
  95. package/dist/{load-balancers-B0XeGLhT.mjs → load-balancers-DHD4f2CT.mjs} +1 -1
  96. package/dist/{login-DaglE6WA.mjs → login-CLW108XX.mjs} +1 -1
  97. package/dist/{login-CAsRUF4c.mjs → login-xgRjiyJa.mjs} +1 -1
  98. package/dist/{logo-matches-DWg5ezsM.mjs → logo-matches-BAX8v3iL.mjs} +1 -1
  99. package/dist/{logos-6A6gJC5C.mjs → logos-BWBVGwU6.mjs} +1 -1
  100. package/dist/{logpush-DwehajAw.mjs → logpush-CZKR8DHO.mjs} +1 -1
  101. package/dist/{logs-BWg7YymF.mjs → logs-CiDyrqEu.mjs} +1 -1
  102. package/dist/{magic-cloud-networking--14hNj2F.mjs → magic-cloud-networking-DttrBXqd.mjs} +1 -1
  103. package/dist/{magic-network-monitoring-Dzo4L6kd.mjs → magic-network-monitoring-9VXDSYuL.mjs} +1 -1
  104. package/dist/{magic-transit-DDO0A5v4.mjs → magic-transit-Dsu_cSGM.mjs} +1 -1
  105. package/dist/{managed-defense-DQ0iwWdG.mjs → managed-defense-SYreve4W.mjs} +1 -1
  106. package/dist/{managed-transforms-DDIdcPG0.mjs → managed-transforms-CzSy_xPw.mjs} +1 -1
  107. package/dist/{matches-D6ahHNaP.mjs → matches-qf7GReyu.mjs} +1 -1
  108. package/dist/{mcp-BcIrLbRv.mjs → mcp-DYSk5_gc.mjs} +1 -1
  109. package/dist/{mesh-wLiPcWyN.mjs → mesh-DdY07OYt.mjs} +1 -1
  110. package/dist/{mtls-certificates-AEuNOERQ.mjs → mtls-certificates-LXlgdkf1.mjs} +1 -1
  111. package/dist/{network-DZsrs_sw.mjs → network-DpaZ5LJL.mjs} +1 -1
  112. package/dist/{network-interconnects-Cjbu4EMv.mjs → network-interconnects-C4uUoeNa.mjs} +1 -1
  113. package/dist/{oauth-C-QCVfWz.mjs → oauth-Dzk6Gy-6.mjs} +1 -1
  114. package/dist/{oauth-clients-DR0hzakz.mjs → oauth-clients-D7Ou7oAS.mjs} +1 -1
  115. package/dist/{oauth-Cu1twz9z.mjs → oauth-nsTDJ0dF.mjs} +1 -1
  116. package/dist/{oauth-scopes-BDNpJJ32.mjs → oauth-scopes-BFoE82Mv.mjs} +1 -1
  117. package/dist/{observability-BnHy2M6p.mjs → observability-smcOFbC1.mjs} +1 -1
  118. package/dist/{organization-iasRm69J.mjs → organization-Dyf_0mq4.mjs} +1 -1
  119. package/dist/{organizations-CUzCIKXV.mjs → organizations-D7zGPLVm.mjs} +1 -1
  120. package/dist/{origin-ca-certificates-iQXSqBI0.mjs → origin-ca-certificates-DJrp29gv.mjs} +1 -1
  121. package/dist/{origin-post-quantum-encryption-DcMDK6Tz.mjs → origin-post-quantum-encryption-BYj3kJiq.mjs} +1 -1
  122. package/dist/{origin-tls-client-auth-D1X26X7y.mjs → origin-tls-client-auth-j0tGh6Fy.mjs} +1 -1
  123. package/dist/{page-rules-CXa8EYcP.mjs → page-rules-CLzba_nr.mjs} +1 -1
  124. package/dist/{pages-Cu0m9GSH.mjs → pages-pah6dZBJ.mjs} +1 -1
  125. package/dist/{pay-per-crawl-DmF8xlm_.mjs → pay-per-crawl-DbaTVI8V.mjs} +1 -1
  126. package/dist/{pay-per-use-DIp2fwJU.mjs → pay-per-use-BEvtoppJ.mjs} +1 -1
  127. package/dist/{pipelines-MmXlsxYO.mjs → pipelines-lps71uoA.mjs} +1 -1
  128. package/dist/{precursor-jqeEG_mJ.mjs → precursor-DTTYLDEa.mjs} +1 -1
  129. package/dist/previews-B89cUmpr.mjs +4 -0
  130. package/dist/{progress-Bpp73hIu.mjs → progress-D_mL-Kcy.mjs} +1 -1
  131. package/dist/{prompt-CpZztV8c.mjs → prompt-sL_yMZbI.mjs} +1 -1
  132. package/dist/{queries-VzdcSR5H.mjs → queries-EJYlFw8m.mjs} +1 -1
  133. package/dist/{queues-BZYl2emH.mjs → queues-CozKGaA4.mjs} +1 -1
  134. package/dist/{r2-omcKF8_A.mjs → r2-Chn_JQUM.mjs} +1 -1
  135. package/dist/{r2-data-catalog-DISnPFPY.mjs → r2-data-catalog-Bfn3AWzn.mjs} +1 -1
  136. package/dist/{radar-JzBTD249.mjs → radar-NmpdyMo5.mjs} +1 -1
  137. package/dist/{raw-fetch-DxGs_eRm.mjs → raw-fetch-lSVttVJF.mjs} +1 -1
  138. package/dist/{realtime-yIdAJ0Yf.mjs → realtime-iWTz8WbH.mjs} +1 -1
  139. package/dist/{registrar-D-Li9gNk.mjs → registrar-Cza1L8i_.mjs} +1 -1
  140. package/dist/{registrar-sandbox-CKSSHAyv.mjs → registrar-sandbox-BP4GQg5s.mjs} +1 -1
  141. package/dist/{reporting-Cf-pnw6h.mjs → reporting-gvXX2MxY.mjs} +1 -1
  142. package/dist/{request-headers-DaXBfmVn.mjs → request-headers-POBKmu93.mjs} +1 -1
  143. package/dist/{request-tracers-BegIQTzt.mjs → request-tracers-F8a_aj32.mjs} +1 -1
  144. package/dist/{resource-sharing-DEVgiYzM.mjs → resource-sharing-D6XWIDmb.mjs} +1 -1
  145. package/dist/{resource-tagging-Cm2yJkU9.mjs → resource-tagging-c_z4VZt0.mjs} +1 -1
  146. package/dist/{rules-DDCa7cYF.mjs → rules-_QDaG3U5.mjs} +1 -1
  147. package/dist/{rulesets-BhS7Hvtu.mjs → rulesets-Bc4ZuPG_.mjs} +1 -1
  148. package/dist/{rum-EIj9ViSn.mjs → rum-ChPyfpM2.mjs} +1 -1
  149. package/dist/{run-ChM_YpZ0.mjs → run-DtN51G2A.mjs} +1 -1
  150. package/dist/run-oACgYK8I.mjs +2 -0
  151. package/dist/{schema-DCBb3Fcs.mjs → schema-DZSSJaY0.mjs} +1 -1
  152. package/dist/{schema-flags--GosoCMU.mjs → schema-flags-C9lbLgE-.mjs} +1 -1
  153. package/dist/{scim-DA83eNe-.mjs → scim-BjiswXbC.mjs} +1 -1
  154. package/dist/{sdk-CvIO3tWS.mjs → sdk-CsWOex96.mjs} +1 -1
  155. package/dist/{secrets-store-BTd3eGIB.mjs → secrets-store-Cn3D5a0d.mjs} +1 -1
  156. package/dist/{security-center-DbH_7h-T.mjs → security-center-DP4GC1cG.mjs} +1 -1
  157. package/dist/{security-txt-DSrHhVEN.mjs → security-txt-CaR5Idmz.mjs} +1 -1
  158. package/dist/shared-W9uoX1-W.mjs +2 -0
  159. package/dist/{smart-shield-DnSTo-OI.mjs → smart-shield-CphSzoh4.mjs} +1 -1
  160. package/dist/{snippets-An5kQs33.mjs → snippets-r-Mre0cE.mjs} +1 -1
  161. package/dist/{spawn-7IW1UyoH.mjs → spawn-BWEuIO-w.mjs} +1 -1
  162. package/dist/{spectrum-Ci79n7fd.mjs → spectrum-BhjCVFZk.mjs} +1 -1
  163. package/dist/{speed-BBL7LrLn.mjs → speed-CPgypY7n.mjs} +1 -1
  164. package/dist/{src-CNHNCZpy.mjs → src-Hw-TlVAO.mjs} +5 -5
  165. package/dist/{ssl-B2psFIRm.mjs → ssl-DsMrXyqK.mjs} +1 -1
  166. package/dist/{stream-Du0Q7UOh.mjs → stream-L2NmGPby.mjs} +1 -1
  167. package/dist/{submit-CU8S2jBT.mjs → submit-KN0Ul5fV.mjs} +1 -1
  168. package/dist/{tags-C3l5aZSi.mjs → tags-CZMFKGdP.mjs} +1 -1
  169. package/dist/{telemetry-PHe8XxA2.mjs → telemetry-CSj_ezpk.mjs} +1 -1
  170. package/dist/telemetry-DAf9gLyH.mjs +2 -0
  171. package/dist/{tenant-BZ0ysR9L.mjs → tenant-Cu4P-foo.mjs} +1 -1
  172. package/dist/{tenant-custom-nameservers-DtKeyM5J.mjs → tenant-custom-nameservers-Nx59Buv0.mjs} +1 -1
  173. package/dist/{tunnels-D1tRWQQi.mjs → tunnels-C-mMZy4v.mjs} +1 -1
  174. package/dist/{turnstile-DBa4_Vyz.mjs → turnstile-39JL9tMt.mjs} +1 -1
  175. package/dist/{update-check-AAn7EXw8.mjs → update-check-BKQBD4MQ.mjs} +1 -1
  176. package/dist/update-check-CE9XB6gf.mjs +2 -0
  177. package/dist/update-check-worker.mjs +1 -1
  178. package/dist/{url-info-BRA0XGT2.mjs → url-info-7ikewAnp.mjs} +1 -1
  179. package/dist/{url-normalization-B6N2m5s6.mjs → url-normalization-B0D7Fhf3.mjs} +1 -1
  180. package/dist/{url-scanner-CeKkzkhe.mjs → url-scanner-DpKIqkin.mjs} +1 -1
  181. package/dist/{user-CftksgmF.mjs → user-BFq8UM1s.mjs} +1 -1
  182. package/dist/{values-m7w9PX3o.mjs → values-DnBYV1ZD.mjs} +1 -1
  183. package/dist/{vectorize-BWBEtsgZ.mjs → vectorize-BpZ4UsUj.mjs} +1 -1
  184. package/dist/version-Bh3b9vTa.mjs +2 -0
  185. package/dist/{waiting-rooms-BVZSYTNJ.mjs → waiting-rooms-DJfqehy9.mjs} +1 -1
  186. package/dist/{web-assets-CLU5vAgP.mjs → web-assets-CCSSW_JH.mjs} +1 -1
  187. package/dist/{web3-Dkd4XRNH.mjs → web3-bbT1REPc.mjs} +1 -1
  188. package/dist/{workers-BQi4_SBS.mjs → workers-CXuyjZB8.mjs} +20 -20
  189. package/dist/{workers-builds-BgtPSDYJ.mjs → workers-builds-TRF3K416.mjs} +1 -1
  190. package/dist/{workers-for-platforms-actLCM6Q.mjs → workers-for-platforms-B57iKiSN.mjs} +1 -1
  191. package/dist/{workers-vpc-DjGfJgQn.mjs → workers-vpc-kgryQ48l.mjs} +1 -1
  192. package/dist/{workflows-Cm7WsAgB.mjs → workflows-CKdPlIkK.mjs} +1 -1
  193. package/dist/{zaraz-DurWe32F.mjs → zaraz-BXFlEWSx.mjs} +1 -1
  194. package/dist/{zero-trust-D8SVU8YZ.mjs → zero-trust-M08mBsYd.mjs} +1 -1
  195. package/dist/{zone-B3AEAfcd.mjs → zone-DHmrotGW.mjs} +1 -1
  196. package/dist/{zones-DiX5LoSU.mjs → zones-C0eKBTqG.mjs} +1 -1
  197. package/package.json +1 -1
  198. package/dist/build-BbjcJxKq.mjs +0 -2
  199. package/dist/build-DQh5-KK4.mjs +0 -2
  200. package/dist/command-Ck9rbHA4.mjs +0 -2
  201. package/dist/error-sanitization-BkgUhGVc.mjs +0 -2
  202. package/dist/previews-Cg6lc24N.mjs +0 -4
  203. package/dist/run-CSFE1qVX.mjs +0 -2
  204. package/dist/shared-CtBkOWGN.mjs +0 -2
  205. package/dist/telemetry-CNt8H3aA.mjs +0 -2
  206. package/dist/update-check-BbIXBq1o.mjs +0 -2
  207. package/dist/version-cPq-WKL8.mjs +0 -2
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e,t}from"./chunk-DL5FNmn1.mjs";import{n}from"./version-cPq-WKL8.mjs";import{i as r}from"./cf-oadujOtC.mjs";import{closeSync as i,mkdirSync as a,openSync as o,readFileSync as s,renameSync as c,statSync as l,unlinkSync as u,writeFileSync as d}from"node:fs";import{dirname as f,join as p}from"node:path";import{fileURLToPath as m}from"node:url";import{spawn as h}from"node:child_process";var g=t(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),_=t(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),v=t(((e,t)=>{let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=_(),a=g();e=t.exports={};let o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),y=t(((e,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),b=t(((e,t)=>{let n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),x=t(((e,t)=>{let n=g(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=_(),{safeRe:a,t:o}=v(),s=y(),{compareIdentifiers:c}=b(),l=(e,t)=>{let n=t.split(`.`);if(n.length>e.length)return!1;for(let t=0;t<n.length;t++)if(c(e[t],n[t])!==0)return!1;return!0};t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:+(this.patch>t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];if(n===!1&&(r=[t]),l(this.prerelease,t)){let e=this.prerelease[t.split(`.`).length];isNaN(e)&&(this.prerelease=r)}else this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),S=t(((e,t)=>{let n=x();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),C=t(((e,t)=>{let n=S();t.exports=(e,t,r)=>n(e,t,r)>0})),w=t(((e,t)=>{let n=x();t.exports=(e,t)=>new n(e,t).major})),T=t(((e,t)=>{let n=x();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),E=t(((e,t)=>{let n=T();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),D=t(((e,t)=>{let n=T();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),O=e(C(),1),k=e(w(),1),A=e(E(),1),j=e(D(),1);const M=1440*60*1e3;function N(e){return(0,A.default)(e)?.includes(`beta`)?`beta`:`latest`}function P(e=n){return p(r(),`cache`,`update-check-${N(e)}.json`)}function F(e=P()){try{let t=JSON.parse(s(e,`utf8`));if(typeof t!=`object`||!t||Array.isArray(t))return{};let n=t;return{lastAttemptedAt:typeof n.lastAttemptedAt==`number`&&Number.isFinite(n.lastAttemptedAt)?n.lastAttemptedAt:void 0,lastSuccessfulAt:typeof n.lastSuccessfulAt==`number`&&Number.isFinite(n.lastSuccessfulAt)?n.lastSuccessfulAt:void 0,latestVersion:typeof n.latestVersion==`string`&&(0,j.default)(n.latestVersion)?n.latestVersion:void 0}}catch{return{}}}function I(e,t=P()){let n=`${t}.${process.pid}.tmp`;try{return a(f(t),{recursive:!0}),d(n,`${JSON.stringify(e)}\n`,{encoding:`utf8`,mode:384}),c(n,t),!0}catch{try{u(n)}catch{}return!1}}function L(e,t,n){let r=`${e}.lock`,s;try{a(f(e),{recursive:!0});try{s=o(r,`wx`,384)}catch{try{if(t-l(r).mtimeMs<=5e3)return;u(r),s=o(r,`wx`,384)}catch{return}}return n()}catch{return}finally{if(s!==void 0)try{i(s),u(r)}catch{}}}function R(e,t){if(!(0,j.default)(e)||!t.latestVersion||!(0,O.default)(t.latestVersion,e))return;let n=(0,k.default)(t.latestVersion)>(0,k.default)(e);return{latestVersion:t.latestVersion,isMajor:n}}function z(e,t=P(e)){return R(e,F(t))}function B(){let e=import.meta.url.endsWith(`.ts`),t=new URL(e?`../update-check-worker.ts`:`./update-check-worker.mjs`,import.meta.url),n=e?[...process.execArgv,m(t)]:[m(t)];h(process.execPath,n,{detached:!0,stdio:`ignore`,windowsHide:!0}).unref()}function V(e={}){let t=e.cachePath??P(e.currentVersion??n),r=e.now??Date.now();if(L(t,r,()=>{let e=F(t);return e.lastAttemptedAt!==void 0&&r-e.lastAttemptedAt<864e5?!1:I({...e,lastAttemptedAt:r},t)}))try{(e.spawnWorker??B)()}catch{}}async function H(e,t,r,i){if(!(0,j.default)(t))return{status:`failed`};let a=await i(`https://registry.npmjs.org/${encodeURIComponent(e)}/${r}`,{headers:{accept:`application/json`,"user-agent":`cf-cli/${n}`},signal:AbortSignal.timeout(3e3)});if(!a.ok)return{status:`failed`};let o=await a.json();if(typeof o!=`object`||!o||Array.isArray(o))return{status:`failed`};let s=o;return s.name!==e||typeof s.version!=`string`||!(0,j.default)(s.version)?{status:`failed`}:(0,O.default)(s.version,t)?{status:`update-available`,latest:s.version}:{status:`up-to-date`}}async function U(e={}){let t=e.currentVersion??n,r=N(t),i=e.cachePath??P(t),a=e.now??Date.now();try{let n=await(e.check??((t,n,r)=>H(t,n,r,e.fetch??globalThis.fetch)))(`cf`,t,r);if(n.status===`failed`)return;let o=n.status===`update-available`?n.latest:t;if(!(0,j.default)(o))return;I({...F(i),latestVersion:o,lastSuccessfulAt:a},i)}catch{}}export{U as i,z as n,V as r,M as t};
2
+ import{r as e,t}from"./chunk-DL5FNmn1.mjs";import{n}from"./version-Bh3b9vTa.mjs";import{i as r}from"./cf-oadujOtC.mjs";import{closeSync as i,mkdirSync as a,openSync as o,readFileSync as s,renameSync as c,statSync as l,unlinkSync as u,writeFileSync as d}from"node:fs";import{dirname as f,join as p}from"node:path";import{fileURLToPath as m}from"node:url";import{spawn as h}from"node:child_process";var g=t(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),_=t(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),v=t(((e,t)=>{let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=_(),a=g();e=t.exports={};let o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),y=t(((e,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),b=t(((e,t)=>{let n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),x=t(((e,t)=>{let n=g(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=_(),{safeRe:a,t:o}=v(),s=y(),{compareIdentifiers:c}=b(),l=(e,t)=>{let n=t.split(`.`);if(n.length>e.length)return!1;for(let t=0;t<n.length;t++)if(c(e[t],n[t])!==0)return!1;return!0};t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:+(this.patch>t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];if(n===!1&&(r=[t]),l(this.prerelease,t)){let e=this.prerelease[t.split(`.`).length];isNaN(e)&&(this.prerelease=r)}else this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),S=t(((e,t)=>{let n=x();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),C=t(((e,t)=>{let n=S();t.exports=(e,t,r)=>n(e,t,r)>0})),w=t(((e,t)=>{let n=x();t.exports=(e,t)=>new n(e,t).major})),T=t(((e,t)=>{let n=x();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),E=t(((e,t)=>{let n=T();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),D=t(((e,t)=>{let n=T();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),O=e(C(),1),k=e(w(),1),A=e(E(),1),j=e(D(),1);const M=1440*60*1e3;function N(e){return(0,A.default)(e)?.includes(`beta`)?`beta`:`latest`}function P(e=n){return p(r(),`cache`,`update-check-${N(e)}.json`)}function F(e=P()){try{let t=JSON.parse(s(e,`utf8`));if(typeof t!=`object`||!t||Array.isArray(t))return{};let n=t;return{lastAttemptedAt:typeof n.lastAttemptedAt==`number`&&Number.isFinite(n.lastAttemptedAt)?n.lastAttemptedAt:void 0,lastSuccessfulAt:typeof n.lastSuccessfulAt==`number`&&Number.isFinite(n.lastSuccessfulAt)?n.lastSuccessfulAt:void 0,latestVersion:typeof n.latestVersion==`string`&&(0,j.default)(n.latestVersion)?n.latestVersion:void 0}}catch{return{}}}function I(e,t=P()){let n=`${t}.${process.pid}.tmp`;try{return a(f(t),{recursive:!0}),d(n,`${JSON.stringify(e)}\n`,{encoding:`utf8`,mode:384}),c(n,t),!0}catch{try{u(n)}catch{}return!1}}function L(e,t,n){let r=`${e}.lock`,s;try{a(f(e),{recursive:!0});try{s=o(r,`wx`,384)}catch{try{if(t-l(r).mtimeMs<=5e3)return;u(r),s=o(r,`wx`,384)}catch{return}}return n()}catch{return}finally{if(s!==void 0)try{i(s),u(r)}catch{}}}function R(e,t){if(!(0,j.default)(e)||!t.latestVersion||!(0,O.default)(t.latestVersion,e))return;let n=(0,k.default)(t.latestVersion)>(0,k.default)(e);return{latestVersion:t.latestVersion,isMajor:n}}function z(e,t=P(e)){return R(e,F(t))}function B(){let e=import.meta.url.endsWith(`.ts`),t=new URL(e?`../update-check-worker.ts`:`./update-check-worker.mjs`,import.meta.url),n=e?[...process.execArgv,m(t)]:[m(t)];h(process.execPath,n,{detached:!0,stdio:`ignore`,windowsHide:!0}).unref()}function V(e={}){let t=e.cachePath??P(e.currentVersion??n),r=e.now??Date.now();if(L(t,r,()=>{let e=F(t);return e.lastAttemptedAt!==void 0&&r-e.lastAttemptedAt<864e5?!1:I({...e,lastAttemptedAt:r},t)}))try{(e.spawnWorker??B)()}catch{}}async function H(e,t,r,i){if(!(0,j.default)(t))return{status:`failed`};let a=await i(`https://registry.npmjs.org/${encodeURIComponent(e)}/${r}`,{headers:{accept:`application/json`,"user-agent":`cf-cli/${n}`},signal:AbortSignal.timeout(3e3)});if(!a.ok)return{status:`failed`};let o=await a.json();if(typeof o!=`object`||!o||Array.isArray(o))return{status:`failed`};let s=o;return s.name!==e||typeof s.version!=`string`||!(0,j.default)(s.version)?{status:`failed`}:(0,O.default)(s.version,t)?{status:`update-available`,latest:s.version}:{status:`up-to-date`}}async function U(e={}){let t=e.currentVersion??n,r=e.cachePath??P(t),i=e.now??Date.now();try{let n=await(e.check??((t,n,r)=>H(t,n,r,e.fetch??globalThis.fetch)))(`cf`,t,`latest`);if(n.status===`failed`)return;let a=n.status===`update-available`?n.latest:t;if(!(0,j.default)(a))return;I({...F(r),latestVersion:a,lastSuccessfulAt:i},r)}catch{}}export{U as i,z as n,V as r,M as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{n as e,r as t}from"./update-check-BKQBD4MQ.mjs";export{e as getUpdateNotice,t as maybeStartBackgroundUpdateCheck};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./update-check-AAn7EXw8.mjs";await e();export{};
2
+ import{i as e}from"./update-check-BKQBD4MQ.mjs";await e();export{};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";function c(e){return e.usage(`$0 url-info get
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";function c(e){return e.usage(`$0 url-info get
3
3
 
4
4
  Return submitted URLs based on ID`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Read submitted URLs by ID`,builder:c,handler:async c=>s({command:`url-info get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf url-info get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/url-info`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.urlInfo.get({account_id:l})),{successLabel:`Loaded`})})},u={command:`url-info`,describe:`url-info`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{u as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{_ as e}from"./oauth-C-QCVfWz.mjs";import{r as t}from"./auth-C80y97yu.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bpp73hIu.mjs";import{t as a}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{i as l,n as u}from"./prompt-CpZztV8c.mjs";function d(e){return e.usage(`$0 url-normalization delete
2
+ import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{i as l,n as u}from"./prompt-sL_yMZbI.mjs";function d(e){return e.usage(`$0 url-normalization delete
3
3
 
4
4
  Deletes the URL Normalization settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const f={command:`delete`,describe:`Delete URL Normalization settings`,builder:d,handler:async o=>a({command:`url-normalization delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf url-normalization delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/url_normalization`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
5
5
  `);return}n(await i(`Deleting`,async()=>a.urlNormalization.delete({zone_id:s})),{successLabel:`Deleted`})})};function p(e){return e.usage(`$0 url-normalization get
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d}from"./prompt-CpZztV8c.mjs";import{n as f,t as p}from"./raw-fetch-DxGs_eRm.mjs";function m(e){return e.usage("$0 url-scanner responses get <response-id>\n\nReturns the raw response of the network request. Find the `response_id` in the `data.requests.response.hash`.").positional(`response-id`,{type:`string`,description:`Response hash.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <response-id>`,describe:`Get raw response`,builder:m,handler:async i=>s({command:`url-scanner responses get`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){a({command:`cf url-scanner responses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/responses/${i[`response-id`]==null?`<response-id>`:encodeURIComponent(String(i[`response-id`]))}`,pathParams:{"response-id":String(i[`response-id`]??``)},bodyKind:`none`});return}await r(i);let s=i.local?e:await t();i.accountId=s,f((await o(`Loading`,async()=>p(`/accounts/${s}/urlscanner/v2/responses/${encodeURIComponent(String(i[`response-id`]))}`,{method:`GET`,local:i.local===!0,persistTo:i.persistTo}))).toString(`utf-8`))})},g={command:`responses`,describe:`Raw HTTP response data captured during URL scans`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 url-scanner scans bulk-create
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d}from"./prompt-sL_yMZbI.mjs";import{n as f,t as p}from"./raw-fetch-lSVttVJF.mjs";function m(e){return e.usage("$0 url-scanner responses get <response-id>\n\nReturns the raw response of the network request. Find the `response_id` in the `data.requests.response.hash`.").positional(`response-id`,{type:`string`,description:`Response hash.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <response-id>`,describe:`Get raw response`,builder:m,handler:async i=>s({command:`url-scanner responses get`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){a({command:`cf url-scanner responses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/responses/${i[`response-id`]==null?`<response-id>`:encodeURIComponent(String(i[`response-id`]))}`,pathParams:{"response-id":String(i[`response-id`]??``)},bodyKind:`none`});return}await r(i);let s=i.local?e:await t();i.accountId=s,f((await o(`Loading`,async()=>p(`/accounts/${s}/urlscanner/v2/responses/${encodeURIComponent(String(i[`response-id`]))}`,{method:`GET`,local:i.local===!0,persistTo:i.persistTo}))).toString(`utf-8`))})},g={command:`responses`,describe:`Raw HTTP response data captured during URL scans`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 url-scanner scans bulk-create
3
3
 
4
4
  Submit URLs to scan. Check limits at https://developers.cloudflare.com/security-center/investigate/scan-limits/ and take into account scans submitted in bulk have lower priority and may take longer to finish.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of urls to scan (up to a 100).`})}const v={command:`bulk-create`,describe:`Bulk create URL Scans`,builder:_,handler:async l=>s({command:`url-scanner scans bulk-create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf url-scanner scans bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/bulk`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await t();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.urlScanner.scans.bulkCreate({body:e,account_id:u})),{successLabel:`Created`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function y(e){return e.usage(`$0 url-scanner scans create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{a as e,r as t}from"./auth-C80y97yu.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bpp73hIu.mjs";import{t as a}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{i as o,n as s,r as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,n as f}from"./prompt-CpZztV8c.mjs";import{t as p}from"./cli-types-tt_LZMbn.mjs";function ee(e){return e.usage(`$0 user audit-logs list
2
+ import{a as e,r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{i as o,n as s,r as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,n as f}from"./prompt-sL_yMZbI.mjs";import{t as p}from"./cli-types-tt_LZMbn.mjs";function ee(e){return e.usage(`$0 user audit-logs list
3
3
 
4
4
  Gets a list of audit logs for a user account. Can be filtered by who made the change, on which zone, and the timeframe of the change.`).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`export`,{type:`boolean`,description:`Indicates that this request is an export of logs in CSV format.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-ip`,{type:`string`,description:`Filters by the IP address of the request that made the change by specific IP address or valid CIDR Range.`}).option(`actor-email`,{type:`string`,description:`Filters by the email address of the actor that made the change.`}).option(`since`,{type:`string`,description:"Limits the returned results to logs newer than the specified date. A `full-date` that conforms to RFC3339."}).option(`before`,{type:`string`,description:"Limits the returned results to logs older than the specified date. A `full-date` that conforms to RFC3339."}).option(`zone-name`,{type:`string`,description:`Filters by the name of the zone associated to the change.`}).option(`direction`,{type:`string`,description:`Changes the direction of the chronological sorting.`,choices:[`desc`,`asc`]}).option(`per-page`,{type:`number`,description:`Sets the number of results to return per page.`}).option(`page`,{type:`number`,description:`Defines which page of results to return.`}).option(`hide-user-logs`,{type:`boolean`,description:`Indicates whether or not to hide user level audit logs.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`list`,describe:`Get user audit logs`,builder:p(ee),handler:async e=>a({command:`user audit-logs list`,classification:{safeFlags:[`export`,`direction`,`hide-user-logs`,`dry-run`]}},e,async()=>{let a={id:e.id,export:e.export,"action.type":e[`action-type`],"actor.ip":e[`actor-ip`],"actor.email":e[`actor-email`],since:e.since,before:e.before,"zone.name":e[`zone-name`],direction:e.direction,per_page:e[`per-page`],page:e.page,hide_user_logs:e[`hide-user-logs`]};if(e.dryRun){r({command:`cf user audit-logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/audit_logs`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e);n(await i(`Loading`,async()=>o.user.auditLogs.list(a)),{successLabel:`Loaded`})})},m={command:`audit-logs`,describe:`Operations for audit-logs`,builder:e=>e.command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function h(e){return e.usage(`$0 user billing history list
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{t as c}from"./cli-types-tt_LZMbn.mjs";function l(e){return e.usage(`$0 values list
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{t as c}from"./cli-types-tt_LZMbn.mjs";function l(e){return e.usage(`$0 values list
3
3
 
4
4
  Lists all distinct values for a given tag key, optionally filtered by resource type.`).option(`tag-key`,{type:`string`,description:`The tag key to retrieve values for.`,demandOption:!0}).option(`type`,{type:`string`,description:`Filter by resource type.`,choices:`access_application.access_application_policy.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.api_gateway_operation.cloudflared_tunnel.custom_certificate.custom_hostname.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.dns_record.durable_object_namespace.gateway_list.gateway_rule.healthcheck.image.infrastructure_target.kv_namespace.load_balancer.load_balancer_monitor.load_balancer_pool.managed_client_certificate.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker.worker_route.worker_version.zone.zone_ruleset`.split(`.`)}).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`list`,describe:`List tag values`,builder:c(l),handler:async c=>s({command:`values list`,classification:{safeFlags:[`type`,`dry-run`]}},c,async()=>{let s={type:c.type,cursor:c.cursor};if(c.dryRun){a({command:`cf values list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/tags/values/${c[`tag-key`]==null?`<tag-key>`:encodeURIComponent(String(c[`tag-key`]))}`,pathParams:{"tag-key":String(c[`tag-key`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.values.list({account_id:u,tag_key:c[`tag-key`],...s})),{successLabel:`Loaded`})})},d={command:`values`,describe:`values`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{a as r,r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d,t as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,i as m,n as h}from"./prompt-CpZztV8c.mjs";function g(e){return e.usage(`$0 vectorize create
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{a as r,r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d,t as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,i as m,n as h}from"./prompt-sL_yMZbI.mjs";function g(e){return e.usage(`$0 vectorize create
3
3
 
4
4
  Creates and returns a new Vectorize Index.`).option(`config-dimensions`,{type:`number`,description:`Specifies the number of dimensions for the index`}).option(`config-metric`,{type:`string`,description:`Specifies the type of metric to use calculating distance.`,choices:[`cosine`,`euclidean`,`dot-product`]}).option(`config-preset`,{type:`string`,description:`Specifies the preset to use for the index.`,choices:[`@cf/baai/bge-small-en-v1.5`,`@cf/baai/bge-base-en-v1.5`,`@cf/baai/bge-large-en-v1.5`,`openai/text-embedding-ada-002`,`cohere/embed-multilingual-v2.0`]}).option(`description`,{type:`string`,description:`Specifies the description of the index.`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`config-dimensions`,[`config-preset`]).implies(`config-dimensions`,[`config-metric`]).conflicts(`config-metric`,[`config-preset`]).implies(`config-metric`,[`config-dimensions`]).conflicts(`config-preset`,[`config-dimensions`,`config-metric`])}const _={command:`create`,describe:`Create Vectorize Index`,builder:g,handler:async r=>c({command:`vectorize create`,classification:{safeFlags:[`config-metric`,`config-preset`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf vectorize create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/vectorize/v2/indexes`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({config:{dimensions:r[`config-dimensions`],metric:d(r[`config-metric`],`config-metric`,`text`),preset:d(r[`config-preset`],`config-preset`,`text`)},description:d(r.description,`description`,`text`),name:d(r.name,`name`,`text`)}):l(r.body)});return}let c=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.vectorize.create({body:e,account_id:f})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await p(`name`,`The name field`));let m=u({config:{dimensions:r[`config-dimensions`],metric:d(r[`config-metric`],`config-metric`,`text`),preset:d(r[`config-preset`],`config-preset`,`text`)},description:d(r.description,`description`,`text`),name:d(r.name,`name`,`text`)});a(await s(`Creating`,async()=>c.vectorize.create({body:m,account_id:f})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 vectorize delete-by-ids <index-name>
5
5
 
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ const e=process.env.CLI_VERSION??`1.0.0-beta.1`,t=`cf-cli/${e}`;export{e as n,t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-C-QCVfWz.mjs";import{r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,i as m,n as h}from"./prompt-CpZztV8c.mjs";function ee(e){return e.usage(`$0 waiting-rooms account-waiting-rooms list
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-Dzk6Gy-6.mjs";import{r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,i as m,n as h}from"./prompt-sL_yMZbI.mjs";function ee(e){return e.usage(`$0 waiting-rooms account-waiting-rooms list
3
3
 
4
4
  Lists waiting rooms for account or zone.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page. Must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`List waiting rooms for account or zone`,builder:ee,handler:async l=>c({command:`waiting-rooms account-waiting-rooms list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={page:l.page,per_page:l[`per-page`]};if(l.dryRun){let e=l.zone===void 0?await r():void 0,t=l.zone===void 0?`accounts`:`zones`,n=l.zone??e??`<account-id>`;o({command:`cf waiting-rooms account-waiting-rooms list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/waiting_rooms`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await t({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await n();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.waitingRooms.accountWaitingRooms.list({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})},_={command:`account-waiting-rooms`,describe:`Account-scoped waiting room listing`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.usage(`$0 waiting-rooms create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{_ as e}from"./oauth-C-QCVfWz.mjs";import{r as t}from"./auth-C80y97yu.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bpp73hIu.mjs";import{t as a}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{a as l,i as u,n as d}from"./prompt-CpZztV8c.mjs";import{t as f}from"./cli-types-tt_LZMbn.mjs";function p(e){return e.usage(`$0 web-assets discovery get
2
+ import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{a as l,i as u,n as d}from"./prompt-sL_yMZbI.mjs";import{t as f}from"./cli-types-tt_LZMbn.mjs";function p(e){return e.usage(`$0 web-assets discovery get
3
3
 
4
4
  Returns the latest API operations discovered from zone traffic, rendered as OpenAPI schemas.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get`,describe:`Export discovered API operations as OpenAPI schemas`,builder:p,handler:async o=>a({command:`web-assets discovery get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf web-assets discovery get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/discovery`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.webAssets.discovery.get({zone_id:s})),{successLabel:`Loaded`})})};function m(e){return e.usage(`$0 web-assets discovery operations bulk-edit
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{_ as e}from"./oauth-C-QCVfWz.mjs";import{r as t}from"./auth-C80y97yu.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bpp73hIu.mjs";import{t as a}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as o,r as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./input-validation-Ch4Vllrm.mjs";import{a as u,i as d,n as f}from"./prompt-CpZztV8c.mjs";function p(e){return e.usage(`$0 web3 hostnames create
2
+ import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,r as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./input-validation-Ch4Vllrm.mjs";import{a as u,i as d,n as f}from"./prompt-sL_yMZbI.mjs";function p(e){return e.usage(`$0 web3 hostnames create
3
3
 
4
4
  Create Web3 Hostname`).option(`description`,{type:`string`,description:`Specify an optional description of the hostname.`}).option(`dnslink`,{type:`string`,description:`Specify the DNSLink value used if the target is ipfs.`}).option(`name`,{type:`string`,description:`Specify the hostname that points to the target gateway via CNAME.`}).option(`target`,{type:`string`,description:`Specify the target gateway of the hostname.`,choices:[`ethereum`,`ipfs`,`ipfs_universal_path`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create`,describe:`Create Web3 Hostname`,builder:p,handler:async s=>a({command:`web3 hostnames create`,classification:{safeFlags:[`target`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf web3 hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/web3/hostnames`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({description:l(s.description,`description`,`text`),dnslink:l(s.dnslink,`dnslink`,`text`),name:l(s.name,`name`,`text`),target:l(s.target,`target`,`text`)}):o(s.body)});return}let a=await t(s),f=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=f,s.body){let e=o(s.body);n(await i(`Creating`,async()=>a.web3.hostnames.create({...e,zone_id:f})),{successLabel:`Created`});return}s.name===void 0&&(s.name=await u(`name`,`Specify the hostname that points to the target gateway via CNAME.`)),s.target===void 0&&(s.target=await d(`target`,`Specify the target gateway of the hostname.`,[`ethereum`,`ipfs`,`ipfs_universal_path`]));let p=c({description:l(s.description,`description`,`text`),dnslink:l(s.dnslink,`dnslink`,`text`),name:l(s.name,`name`,`text`),target:l(s.target,`target`,`text`)});n(await i(`Creating`,async()=>a.web3.hostnames.create({...p,zone_id:f})),{successLabel:`Created`})})};function h(e){return e.usage(`$0 web3 hostnames delete <identifier>
5
5
 
@@ -1,36 +1,36 @@
1
1
  #!/usr/bin/env node
2
- import{s as e}from"./src-CNHNCZpy.mjs";import{a as t,o as n}from"./theme-BiIYWOed.mjs";import"./ui-DH95w1Qk.mjs";import{t as r}from"./local-B6b2OIBW.mjs";import{g as i,m as a,v as o}from"./oauth-C-QCVfWz.mjs";import{n as s}from"./dist-BpadEMNY.mjs";import{i as c,r as l}from"./auth-C80y97yu.mjs";import{t as u}from"./output-Bia1u2k5.mjs";import{t as d}from"./dry-run-CLX6Pbtq.mjs";import{t as f}from"./progress-Bpp73hIu.mjs";import{n as p,t as m}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as h,r as g,t as _}from"./body-parser-CUWbw_Tq.mjs";import{n as v}from"./input-validation-Ch4Vllrm.mjs";import{i as ee,n as y}from"./prompt-CpZztV8c.mjs";import{t as b}from"./cli-types-tt_LZMbn.mjs";import{D as x}from"./dist-BDOzKthe.mjs";import{l as S,s as C}from"./containers-Bx_44bmJ.mjs";import{i as w,n as T,r as E}from"./build-BbjcJxKq.mjs";import{r as D}from"./deploy-input-BCYyKXpp.mjs";import{n as O,t as k}from"./shared-CtBkOWGN.mjs";import{readBuildOutput as A}from"@cloudflare/build-output-utils";var j=e(`check`,`Profile a Worker's startup performance`,()=>import(`./command-Ck9rbHA4.mjs`),{command:`workers check`,classification:{safeFlags:[`prebuilt`]}});function M(e){return e.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})}const N={command:`deploy`,describe:`Apply triggers (Routes, Workflows, Cron triggers etc.)`,builder:M,handler:async e=>{e.prebuilt||(await T(e.mode),s.message(``,{spacing:0}));let{workers:{default:r},rootConfig:i}=await A(process.cwd());if(i.buildContext.isPreview){let e=[`cf previews deploy`,`--prebuilt`,...i.buildContext.mode===void 0?[]:[`--mode`,i.buildContext.mode]].join(` `);throw Error(`The Build Output was created for a Preview, but this command deploys production triggers. To use the existing Build Output and deploy the Preview, run "${e}". To deploy production triggers, rebuild without Preview settings before deploying.`)}w(e.mode,i.buildContext.mode,{requireRequestedMode:e.prebuilt});let{wranglerConfig:o}=E(r,i),l=e[`dry-run`]?``:await c(),u=e[`dry-run`]?void 0:await a();S(x(l)),s.message(t.bold(`Deploy triggers`),{symbol:n.dim(`├`),spacing:0}),await C(D(r,o,u,e)),s.success(e[`dry-run`]?`Dry run complete`:`Trigger deploy complete`)}},P={command:`triggers`,describe:`Manage triggers (Routes, Workflows, Cron triggers etc.)`,builder:e=>e.command(p(N,{command:`workers triggers deploy`,classification:{safeFlags:[`dry-run`,`prebuilt`]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var F=e(`types`,`Generate types from cloudflare.config.ts`,()=>import(`./command-CF0giIIc.mjs`),{command:`workers types`,classification:{safeFlags:[`include-runtime`]}});function I(e){return e.usage(`$0 workers delete <worker-id>
2
+ import{s as e}from"./src-Hw-TlVAO.mjs";import{a as t,o as n}from"./theme-BiIYWOed.mjs";import"./ui-DH95w1Qk.mjs";import{t as r}from"./local-B6b2OIBW.mjs";import{g as i,m as a,v as o}from"./oauth-Dzk6Gy-6.mjs";import{n as s}from"./dist-BpadEMNY.mjs";import{i as c,r as l}from"./auth-DJhSjNNL.mjs";import{t as u}from"./output-Bia1u2k5.mjs";import{t as d}from"./dry-run-CLX6Pbtq.mjs";import{t as f}from"./progress-D_mL-Kcy.mjs";import{n as p,t as m}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as h,r as g,t as _}from"./body-parser-CUWbw_Tq.mjs";import{n as v}from"./input-validation-Ch4Vllrm.mjs";import{i as ee,n as y}from"./prompt-sL_yMZbI.mjs";import{t as b}from"./cli-types-tt_LZMbn.mjs";import{D as x}from"./dist-CUUGKvjh.mjs";import{l as S,s as C}from"./containers-Cq1gtnq6.mjs";import{a as w,i as T,n as E,o as D,r as O}from"./build-1a8CiNIT.mjs";import{r as k}from"./deploy-input-COEKxOA1.mjs";import{n as A,t as j}from"./shared-W9uoX1-W.mjs";import{readBuildOutput as M}from"@cloudflare/build-output-utils";var N=e(`check`,`Profile a Worker's startup performance`,()=>import(`./command-RiZ_LYcm.mjs`),{command:`workers check`,classification:{safeFlags:[`prebuilt`]}});function P(e){return e.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`,O)}const F={command:`deploy`,describe:`Apply triggers (Routes, Workflows, Cron triggers etc.)`,builder:P,handler:async e=>{e.prebuilt||(await E(e.mode,{worker:e.worker}),s.message(``,{spacing:0}));let{workers:r,rootConfig:i}=await M(process.cwd());if(i.buildContext.isPreview){let e=[`cf previews deploy`,`--prebuilt`,...i.buildContext.mode===void 0?[]:[`--mode`,i.buildContext.mode]].join(` `);throw Error(`The Build Output was created for a Preview, but this command deploys production triggers. To use the existing Build Output and deploy the Preview, run "${e}". To deploy production triggers, rebuild without Preview settings before deploying.`)}D(e.mode,i.buildContext.mode,{requireRequestedMode:e.prebuilt});let o=w(r,e.worker),{wranglerConfig:l}=T(o,i),u=e[`dry-run`]?``:await c(),d=e[`dry-run`]?void 0:await a();S(x(u)),s.message(t.bold(`Deploy triggers`),{symbol:n.dim(`├`),spacing:0}),await C(k(o,l,d,e)),s.success(e[`dry-run`]?`Dry run complete`:`Trigger deploy complete`)}},I={command:`triggers`,describe:`Manage triggers (Routes, Workflows, Cron triggers etc.)`,builder:e=>e.command(p(F,{command:`workers triggers deploy`,classification:{safeFlags:[`dry-run`,`prebuilt`]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var L=e(`types`,`Generate types from cloudflare.config.ts`,()=>import(`./command-CF0giIIc.mjs`),{command:`workers types`,classification:{safeFlags:[`include-runtime`]}});function R(e){return e.usage(`$0 workers delete <worker-id>
3
3
 
4
- Delete a Worker and all its associated resources (versions, deployments, etc.).`).positional(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`force`,{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})}const L={command:`delete <worker-id>`,describe:`Delete Worker`,builder:I,handler:async e=>m({command:`workers delete`,classification:{safeFlags:[`force`,`dry-run`]}},e,async()=>{let t={force:e.force};if(e.dryRun){d({command:`cf workers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``)},query:t,bodyKind:`none`});return}let n=await l(e),i=e.local?r:await a();if(e.accountId=i,!await y({force:!!e.force,message:`This will permanently delete the Worker and its associated versions and deployments.`})){process.stderr.write(`Aborted.
5
- `);return}u(await f(`Deleting`,async()=>n.workers.delete({account_id:i,worker_id:e[`worker-id`],...t})),{successLabel:`Deleted`})})};function R(e){return e.usage(`$0 workers deployments create
4
+ Delete a Worker and all its associated resources (versions, deployments, etc.).`).positional(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`force`,{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})}const z={command:`delete <worker-id>`,describe:`Delete Worker`,builder:R,handler:async e=>m({command:`workers delete`,classification:{safeFlags:[`force`,`dry-run`]}},e,async()=>{let t={force:e.force};if(e.dryRun){d({command:`cf workers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``)},query:t,bodyKind:`none`});return}let n=await l(e),i=e.local?r:await a();if(e.accountId=i,!await y({force:!!e.force,message:`This will permanently delete the Worker and its associated versions and deployments.`})){process.stderr.write(`Aborted.
5
+ `);return}u(await f(`Deleting`,async()=>n.workers.delete({account_id:i,worker_id:e[`worker-id`],...t})),{successLabel:`Deleted`})})};function B(e){return e.usage(`$0 workers deployments create
6
6
 
7
- Deployments configure how [Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions) are deployed to traffic. A deployment can consist of multiple versions of a Worker.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).option(`force`,{type:`boolean`,description:`If set to true, the deployment will be created even if normally blocked by something such rolling back to an older version when a secret has changed.`}).option(`strategy`,{type:`string`,description:`The strategy field`,choices:[`percentage`]}).option(`versions`,{type:`string`,description:'Worker versions included in this deployment. Each object must contain a `version_id` UUID and a `percentage`; percentages across all objects must total 100. In the `cf` CLI, pass the entire array as one JSON value to `--versions`, either inline, for example `--versions \'[{"version_id":"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f","percentage":100}]\'`, or from a JSON file with `--versions @versions.json`. Provide as a JSON array of objects or @path/to/file.json.'}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`create`,describe:`Create Worker Deployment`,builder:R,handler:async e=>m({command:`workers deployments create`,classification:{safeFlags:[`force`,`strategy`,`dry-run`]}},e,async()=>{let t={force:e.force};if(e.dryRun){d({command:`cf workers deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments`,pathParams:{"script-name":String(e[`script-name`]??``)},query:t,bodyKind:`json`,body:e.body===void 0?_({strategy:v(e.strategy,`strategy`,`text`),versions:g(e.versions,`versions`)}):h(e.body)});return}let n=await l(e),s=e.local?r:await a();e.accountId=s;let c=i({scriptName:e.worker});if(e.worker=c,e.body){let r=h(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u(await f(`Creating`,async()=>n.workers.deployments.create({body:r,account_id:s,script_name:c,...t})),{successLabel:`Created`});return}if(e.strategy===void 0&&(e.strategy=await ee(`strategy`,`The strategy field`,[`percentage`])),e.versions===void 0)throw Error(`--versions is required (or pass --body with this field set).`);let p=_({strategy:v(e.strategy,`strategy`,`text`),versions:g(e.versions,`versions`)});new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u(await f(`Creating`,async()=>n.workers.deployments.create({body:p,account_id:s,script_name:c,...t})),{successLabel:`Created`})})};function B(e){return e.usage(`$0 workers deployments delete <deployment-id>
7
+ Deployments configure how [Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions) are deployed to traffic. A deployment can consist of multiple versions of a Worker.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).option(`force`,{type:`boolean`,description:`If set to true, the deployment will be created even if normally blocked by something such rolling back to an older version when a secret has changed.`}).option(`strategy`,{type:`string`,description:`The strategy field`,choices:[`percentage`]}).option(`versions`,{type:`string`,description:'Worker versions included in this deployment. Each object must contain a `version_id` UUID and a `percentage`; percentages across all objects must total 100. In the `cf` CLI, pass the entire array as one JSON value to `--versions`, either inline, for example `--versions \'[{"version_id":"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f","percentage":100}]\'`, or from a JSON file with `--versions @versions.json`. Provide as a JSON array of objects or @path/to/file.json.'}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const V={command:`create`,describe:`Create Worker Deployment`,builder:B,handler:async e=>m({command:`workers deployments create`,classification:{safeFlags:[`force`,`strategy`,`dry-run`]}},e,async()=>{let t={force:e.force};if(e.dryRun){d({command:`cf workers deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments`,pathParams:{"script-name":String(e[`script-name`]??``)},query:t,bodyKind:`json`,body:e.body===void 0?_({strategy:v(e.strategy,`strategy`,`text`),versions:g(e.versions,`versions`)}):h(e.body)});return}let n=await l(e),s=e.local?r:await a();e.accountId=s;let c=i({scriptName:e.worker});if(e.worker=c,e.body){let r=h(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u(await f(`Creating`,async()=>n.workers.deployments.create({body:r,account_id:s,script_name:c,...t})),{successLabel:`Created`});return}if(e.strategy===void 0&&(e.strategy=await ee(`strategy`,`The strategy field`,[`percentage`])),e.versions===void 0)throw Error(`--versions is required (or pass --body with this field set).`);let p=_({strategy:v(e.strategy,`strategy`,`text`),versions:g(e.versions,`versions`)});new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u(await f(`Creating`,async()=>n.workers.deployments.create({body:p,account_id:s,script_name:c,...t})),{successLabel:`Created`})})};function H(e){return e.usage(`$0 workers deployments delete <deployment-id>
8
8
 
9
- Delete a Worker Deployment. The latest deployment, which is actively serving traffic, cannot be deleted. All other deployments can be deleted.`).positional(`deployment-id`,{type:`string`,description:`Deployment ID`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const V={command:`delete <deployment-id>`,describe:`Delete Worker Deployment`,builder:B,handler:async e=>m({command:`workers deployments delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){d({command:`cf workers deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await a();e.accountId=n;let s=i({scriptName:e.worker});if(e.worker=s,!await y({force:!!e.force,message:`This will permanently delete the Worker deployment.`})){process.stderr.write(`Aborted.
10
- `);return}u(await f(`Deleting`,async()=>t.workers.deployments.delete({account_id:n,script_name:s,deployment_id:e[`deployment-id`]})),{successLabel:`Deleted`})})};function H(e){return e.usage(`$0 workers deployments get <deployment-id>
9
+ Delete a Worker Deployment. The latest deployment, which is actively serving traffic, cannot be deleted. All other deployments can be deleted.`).positional(`deployment-id`,{type:`string`,description:`Deployment ID`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const U={command:`delete <deployment-id>`,describe:`Delete Worker Deployment`,builder:H,handler:async e=>m({command:`workers deployments delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){d({command:`cf workers deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await a();e.accountId=n;let s=i({scriptName:e.worker});if(e.worker=s,!await y({force:!!e.force,message:`This will permanently delete the Worker deployment.`})){process.stderr.write(`Aborted.
10
+ `);return}u(await f(`Deleting`,async()=>t.workers.deployments.delete({account_id:n,script_name:s,deployment_id:e[`deployment-id`]})),{successLabel:`Deleted`})})};function W(e){return e.usage(`$0 workers deployments get <deployment-id>
11
11
 
12
- Get information about a Worker Deployment.`).positional(`deployment-id`,{type:`string`,description:`Deployment ID`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get <deployment-id>`,describe:`Get Worker Deployment`,builder:H,handler:async e=>m({command:`workers deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){d({command:`cf workers deployments get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await a();e.accountId=n;let s=i({scriptName:e.worker});e.worker=s,u(await f(`Loading`,async()=>t.workers.deployments.get({account_id:n,script_name:s,deployment_id:e[`deployment-id`]})),{successLabel:`Loaded`})})};function W(e){return e.usage(`$0 workers deployments list
12
+ Get information about a Worker Deployment.`).positional(`deployment-id`,{type:`string`,description:`Deployment ID`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`get <deployment-id>`,describe:`Get Worker Deployment`,builder:W,handler:async e=>m({command:`workers deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){d({command:`cf workers deployments get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await a();e.accountId=n;let s=i({scriptName:e.worker});e.worker=s,u(await f(`Loading`,async()=>t.workers.deployments.get({account_id:n,script_name:s,deployment_id:e[`deployment-id`]})),{successLabel:`Loaded`})})};function K(e){return e.usage(`$0 workers deployments list
13
13
 
14
- List Worker deployments. The first deployment in the list is the latest deployment actively serving traffic.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).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 te={command:`list`,describe:`List Worker Deployments`,builder:W,handler:async e=>m({command:`workers deployments list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={since:e.since,until:e.until,page:e.page,per_page:e[`per-page`]};if(e.dryRun){d({command:`cf workers deployments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments`,pathParams:{"script-name":String(e[`script-name`]??``)},query:t,bodyKind:`none`});return}let n=await l(e),s=e.local?r:await a();e.accountId=s;let c=i({scriptName:e.worker});e.worker=c,u(await f(`Loading`,async()=>n.workers.deployments.list({account_id:s,script_name:c,...t})),{successLabel:`Loaded`})})},G={command:`deployments`,describe:`Operations for deployments`,builder:e=>e.command(z).command(V).command(U).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function K(e){return e.usage(`$0 workers get <worker-id>
14
+ List Worker deployments. The first deployment in the list is the latest deployment actively serving traffic.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).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 q={command:`list`,describe:`List Worker Deployments`,builder:K,handler:async e=>m({command:`workers deployments list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={since:e.since,until:e.until,page:e.page,per_page:e[`per-page`]};if(e.dryRun){d({command:`cf workers deployments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments`,pathParams:{"script-name":String(e[`script-name`]??``)},query:t,bodyKind:`none`});return}let n=await l(e),s=e.local?r:await a();e.accountId=s;let c=i({scriptName:e.worker});e.worker=c,u(await f(`Loading`,async()=>n.workers.deployments.list({account_id:s,script_name:c,...t})),{successLabel:`Loaded`})})},J={command:`deployments`,describe:`Operations for deployments`,builder:e=>e.command(V).command(U).command(G).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(e){return e.usage(`$0 workers get <worker-id>
15
15
 
16
- Get details about a specific Worker.`).positional(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`get <worker-id>`,describe:`Get Worker`,builder:K,handler:async e=>m({command:`workers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){d({command:`cf workers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``)},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await a();e.accountId=n,u(await f(`Loading`,async()=>t.workers.get({account_id:n,worker_id:e[`worker-id`]})),{successLabel:`Loaded`})})};function J(e){return e.usage(`$0 workers list
16
+ Get details about a specific Worker.`).positional(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`get <worker-id>`,describe:`Get Worker`,builder:te,handler:async e=>m({command:`workers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){d({command:`cf workers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``)},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await a();e.accountId=n,u(await f(`Loading`,async()=>t.workers.get({account_id:n,worker_id:e[`worker-id`]})),{successLabel:`Loaded`})})};function X(e){return e.usage(`$0 workers list
17
17
 
18
- List all Workers for an account.`).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`order-by`,{type:`string`,description:`Property to sort results by.`,choices:[`deployed_on`,`updated_on`,`created_on`,`name`]}).option(`order`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`list`,describe:`List Workers`,builder:b(J),handler:async e=>m({command:`workers list`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`],order_by:e[`order-by`],order:e.order};if(e.dryRun){d({command:`cf workers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/workers`,pathParams:{},query:t,bodyKind:`none`});return}let n=await l(e),i=e.local?r:await a();e.accountId=i,u(await f(`Loading`,async()=>n.workers.list({account_id:i,...t})),{successLabel:`Loaded`})})};function X(e){return e.usage(`$0 workers placement regions list
18
+ List all Workers for an account.`).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`order-by`,{type:`string`,description:`Property to sort results by.`,choices:[`deployed_on`,`updated_on`,`created_on`,`name`]}).option(`order`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`List Workers`,builder:b(X),handler:async e=>m({command:`workers list`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`],order_by:e[`order-by`],order:e.order};if(e.dryRun){d({command:`cf workers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/workers`,pathParams:{},query:t,bodyKind:`none`});return}let n=await l(e),i=e.local?r:await a();e.accountId=i,u(await f(`Loading`,async()=>n.workers.list({account_id:i,...t})),{successLabel:`Loaded`})})};function Q(e){return e.usage(`$0 workers placement regions list
19
19
 
20
- Returns a list of available placement regions organized by cloud provider. These regions can be used to configure Smart Placement for Workers.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`List Workers Smart Placement Regions`,builder:X,handler:async e=>m({command:`workers placement regions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){d({command:`cf workers placement regions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/placement/regions`,pathParams:{},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await a();e.accountId=n,u(await f(`Loading`,async()=>t.workers.placement.regions.list({account_id:n})),{successLabel:`Loaded`})})},Q={command:`regions`,describe:`Operations for placement.regions`,builder:e=>e.command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ne={command:`placement`,describe:`Operations for placement`,builder:e=>e.command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function re(e){return e.usage(`$0 workers scripts search
20
+ Returns a list of available placement regions organized by cloud provider. These regions can be used to configure Smart Placement for Workers.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`list`,describe:`List Workers Smart Placement Regions`,builder:Q,handler:async e=>m({command:`workers placement regions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){d({command:`cf workers placement regions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/placement/regions`,pathParams:{},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await a();e.accountId=n,u(await f(`Loading`,async()=>t.workers.placement.regions.list({account_id:n})),{successLabel:`Loaded`})})},re={command:`regions`,describe:`Operations for placement.regions`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ie={command:`placement`,describe:`Operations for placement`,builder:e=>e.command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ae(e){return e.usage(`$0 workers scripts search
21
21
 
22
- 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 ie={command:`search`,describe:`Search Worker Scripts`,builder:b(re),handler:async e=>m({command:`workers scripts search`,classification:{safeFlags:[`order-by`,`dry-run`]}},e,async()=>{let t={name:e.name,id:e.id,order_by:e[`order-by`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){d({command:`cf workers scripts search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/scripts-search`,pathParams:{},query:t,bodyKind:`none`});return}let n=await l(e),i=e.local?r:await a();e.accountId=i,u(await f(`Loading`,async()=>n.workers.scripts.search({account_id:i,...t})),{successLabel:`Loaded`})})},ae={command:`scripts`,describe:`Operations for scripts`,builder:e=>e.command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oe(e){return e.usage(`$0 workers secrets delete <secret-name>
22
+ 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 oe={command:`search`,describe:`Search Worker Scripts`,builder:b(ae),handler:async e=>m({command:`workers scripts search`,classification:{safeFlags:[`order-by`,`dry-run`]}},e,async()=>{let t={name:e.name,id:e.id,order_by:e[`order-by`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){d({command:`cf workers scripts search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/scripts-search`,pathParams:{},query:t,bodyKind:`none`});return}let n=await l(e),i=e.local?r:await a();e.accountId=i,u(await f(`Loading`,async()=>n.workers.scripts.search({account_id:i,...t})),{successLabel:`Loaded`})})},se={command:`scripts`,describe:`Operations for scripts`,builder:e=>e.command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ce(e){return e.usage(`$0 workers secrets delete <secret-name>
23
23
 
24
- Remove a secret from a Worker script by creating a new version without that secret. When changing more than one secret at a time, prefer the "Patch multiple script secrets" API instead of changing many secrets individually.`).positional(`secret-name`,{type:`string`,description:`A JavaScript variable name for the secret binding.`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).option(`url-encoded`,{type:`boolean`,description:`Flag that indicates whether the secret name is URL encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const se={command:`delete <secret-name>`,describe:`Delete Worker script secret`,builder:oe,handler:async e=>m({command:`workers secrets delete`,classification:{safeFlags:[`url-encoded`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={url_encoded:e[`url-encoded`]};if(e.dryRun){d({command:`cf workers secrets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:t,bodyKind:`none`});return}let n=await l(e),s=e.local?r:await a();e.accountId=s;let c=i({scriptName:e.worker});if(e.worker=c,!await y({force:!!e.force,message:`This will permanently delete the Worker script secret.`})){process.stderr.write(`Aborted.
25
- `);return}u(await f(`Deleting`,async()=>n.workers.secrets.delete({account_id:s,script_name:c,secret_name:e[`secret-name`],...t})),{successLabel:`Deleted`})})};function ce(e){return e.usage(`$0 workers secrets get <secret-name>
24
+ Remove a secret from a Worker script by creating a new version without that secret. When changing more than one secret at a time, prefer the "Patch multiple script secrets" API instead of changing many secrets individually.`).positional(`secret-name`,{type:`string`,description:`A JavaScript variable name for the secret binding.`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).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 le={command:`delete <secret-name>`,describe:`Delete Worker script secret`,builder:ce,handler:async e=>m({command:`workers secrets delete`,classification:{safeFlags:[`url-encoded`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={url_encoded:e[`url-encoded`]};if(e.dryRun){d({command:`cf workers secrets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:t,bodyKind:`none`});return}let n=await l(e),s=e.local?r:await a();e.accountId=s;let c=i({scriptName:e.worker});if(e.worker=c,!await y({force:!!e.force,message:`This will permanently delete the Worker script secret.`})){process.stderr.write(`Aborted.
25
+ `);return}u(await f(`Deleting`,async()=>n.workers.secrets.delete({account_id:s,script_name:c,secret_name:e[`secret-name`],...t})),{successLabel:`Deleted`})})};function ue(e){return e.usage(`$0 workers secrets get <secret-name>
26
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`,description:`Name of the script, used in URLs and route configuration.`}).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 le={command:`get <secret-name>`,describe:`Get a secret binding`,builder:ce,handler:async e=>m({command:`workers secrets get`,classification:{safeFlags:[`url-encoded`,`dry-run`]}},e,async()=>{let t={url_encoded:e[`url-encoded`]};if(e.dryRun){d({command:`cf workers secrets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:t,bodyKind:`none`});return}let n=await l(e),s=e.local?r:await a();e.accountId=s;let c=i({scriptName:e.worker});e.worker=c,u(await f(`Loading`,async()=>n.workers.secrets.get({account_id:s,script_name:c,secret_name:e[`secret-name`],...t})),{successLabel:`Loaded`})})};function ue(e){return e.usage(`$0 workers secrets list
27
+ Get a given secret binding (value omitted) on a Worker script.`).positional(`secret-name`,{type:`string`,description:`A JavaScript variable name for the secret binding.`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).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 de={command:`get <secret-name>`,describe:`Get a secret binding`,builder:ue,handler:async e=>m({command:`workers secrets get`,classification:{safeFlags:[`url-encoded`,`dry-run`]}},e,async()=>{let t={url_encoded:e[`url-encoded`]};if(e.dryRun){d({command:`cf workers secrets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:t,bodyKind:`none`});return}let n=await l(e),s=e.local?r:await a();e.accountId=s;let c=i({scriptName:e.worker});e.worker=c,u(await f(`Loading`,async()=>n.workers.secrets.get({account_id:s,script_name:c,secret_name:e[`secret-name`],...t})),{successLabel:`Loaded`})})};function fe(e){return e.usage(`$0 workers secrets list
28
28
 
29
- List the names of secrets bound to a Worker script.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`list`,describe:`List secrets bound to a Worker script`,builder:ue,handler:async e=>m({command:`workers secrets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){d({command:`cf workers secrets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await a();e.accountId=n;let s=i({scriptName:e.worker});e.worker=s,u(await f(`Loading`,async()=>t.workers.secrets.list({account_id:n,script_name:s})),{successLabel:`Loaded`})})},fe={command:`secrets`,describe:`Operations for secrets`,builder:e=>e.command(se).command(le).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pe(e){return O(e).option(`preview-alias`,{type:`string`,description:`Preview alias for this Worker Version`,requiresArg:!0})}var $=p({command:`create`,describe:`Upload a new Worker Version without deploying it`,builder:pe,handler:async e=>{await k(e,{command:`Version upload`})}},{command:`workers versions create`,classification:{safeFlags:[`dry-run`,`prebuilt`]}});function me(e){return e.usage(`$0 workers versions delete <version-id>
29
+ List the names of secrets bound to a Worker script.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`list`,describe:`List secrets bound to a Worker script`,builder:fe,handler:async e=>m({command:`workers secrets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){d({command:`cf workers secrets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await a();e.accountId=n;let s=i({scriptName:e.worker});e.worker=s,u(await f(`Loading`,async()=>t.workers.secrets.list({account_id:n,script_name:s})),{successLabel:`Loaded`})})},$={command:`secrets`,describe:`Operations for secrets`,builder:e=>e.command(le).command(de).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function me(e){return A(e).option(`preview-alias`,{type:`string`,description:`Preview alias for this Worker Version`,requiresArg:!0})}var he=p({command:`create`,describe:`Upload a new Worker Version without deploying it`,builder:me,handler:async e=>{await j(e,{command:`Version upload`})}},{command:`workers versions create`,classification:{safeFlags:[`dry-run`,`prebuilt`]}});function ge(e){return e.usage(`$0 workers versions delete <version-id>
30
30
 
31
- Delete a Worker version.`).positional(`version-id`,{type:`string`,description:`Identifier for the version, which can be a UUID, a UUID prefix (minimum length 8), or the literal "latest" to operate on the most recently created version.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const he={command:`delete <version-id>`,describe:`Delete Worker Version`,builder:me,handler:async e=>m({command:`workers versions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){d({command:`cf workers versions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await a();if(e.accountId=n,!await y({force:!!e.force,message:`This will permanently delete the Worker version.`})){process.stderr.write(`Aborted.
32
- `);return}u(await f(`Deleting`,async()=>t.workers.versions.delete({account_id:n,worker_id:e[`worker-id`],version_id:e[`version-id`]})),{successLabel:`Deleted`})})};function ge(e){return e.usage(`$0 workers versions get <version-id>
31
+ Delete a Worker version.`).positional(`version-id`,{type:`string`,description:`Identifier for the version, which can be a UUID, a UUID prefix (minimum length 8), or the literal "latest" to operate on the most recently created version.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _e={command:`delete <version-id>`,describe:`Delete Worker Version`,builder:ge,handler:async e=>m({command:`workers versions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){d({command:`cf workers versions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await a();if(e.accountId=n,!await y({force:!!e.force,message:`This will permanently delete the Worker version.`})){process.stderr.write(`Aborted.
32
+ `);return}u(await f(`Deleting`,async()=>t.workers.versions.delete({account_id:n,worker_id:e[`worker-id`],version_id:e[`version-id`]})),{successLabel:`Deleted`})})};function ve(e){return e.usage(`$0 workers versions get <version-id>
33
33
 
34
- Get details about a specific Worker version.`).positional(`version-id`,{type:`string`,description:`Identifier for the version, which can be a UUID, a UUID prefix (minimum length 8), or the literal "latest" to operate on the most recently created version.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`include`,{type:`string`,description:"Whether to include the `modules` property of the version in the response, which contains code and sourcemap content and may add several megabytes to the response size.",choices:[`modules`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`get <version-id>`,describe:`Get Worker Version`,builder:b(ge),handler:async e=>m({command:`workers versions get`,classification:{safeFlags:[`include`,`dry-run`]}},e,async()=>{let t={include:e.include};if(e.dryRun){d({command:`cf workers versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},query:t,bodyKind:`none`});return}let n=await l(e),i=e.local?r:await a();e.accountId=i,u(await f(`Loading`,async()=>n.workers.versions.get({account_id:i,worker_id:e[`worker-id`],version_id:e[`version-id`],...t})),{successLabel:`Loaded`})})};function ve(e){return e.usage(`$0 workers versions list
34
+ Get details about a specific Worker version.`).positional(`version-id`,{type:`string`,description:`Identifier for the version, which can be a UUID, a UUID prefix (minimum length 8), or the literal "latest" to operate on the most recently created version.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`include`,{type:`string`,description:"Whether to include the `modules` property of the version in the response, which contains code and sourcemap content and may add several megabytes to the response size.",choices:[`modules`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ye={command:`get <version-id>`,describe:`Get Worker Version`,builder:b(ve),handler:async e=>m({command:`workers versions get`,classification:{safeFlags:[`include`,`dry-run`]}},e,async()=>{let t={include:e.include};if(e.dryRun){d({command:`cf workers versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},query:t,bodyKind:`none`});return}let n=await l(e),i=e.local?r:await a();e.accountId=i,u(await f(`Loading`,async()=>n.workers.versions.get({account_id:i,worker_id:e[`worker-id`],version_id:e[`version-id`],...t})),{successLabel:`Loaded`})})};function be(e){return e.usage(`$0 workers versions list
35
35
 
36
- List all versions for a Worker.`).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ye={command:`list`,describe:`List Worker Versions`,builder:ve,handler:async e=>m({command:`workers versions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){d({command:`cf workers versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions`,pathParams:{"worker-id":String(e[`worker-id`]??``)},query:t,bodyKind:`none`});return}let n=await l(e),i=e.local?r:await a();e.accountId=i,u(await f(`Loading`,async()=>n.workers.versions.list({account_id:i,worker_id:e[`worker-id`],...t})),{successLabel:`Loaded`})})},be={command:`versions`,describe:`Operations for versions`,builder:e=>e.command($).command(he).command(_e).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`workers`,describe:`workers`,builder:e=>e.command(j).command(L).command(q).command(Y).command(F).command(G).command(ne).command(ae).command(fe).command(P).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{xe as default};
36
+ List all versions for a Worker.`).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xe={command:`list`,describe:`List Worker Versions`,builder:be,handler:async e=>m({command:`workers versions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){d({command:`cf workers versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await o()??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions`,pathParams:{"worker-id":String(e[`worker-id`]??``)},query:t,bodyKind:`none`});return}let n=await l(e),i=e.local?r:await a();e.accountId=i,u(await f(`Loading`,async()=>n.workers.versions.list({account_id:i,worker_id:e[`worker-id`],...t})),{successLabel:`Loaded`})})},Se={command:`versions`,describe:`Operations for versions`,builder:e=>e.command(he).command(_e).command(ye).command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ce={command:`workers`,describe:`workers`,builder:e=>e.command(N).command(z).command(Y).command(Z).command(L).command(J).command(ie).command(se).command($).command(I).command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ce as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";function d(e){return e.usage(`$0 workers-builds workers migrate-to-previews <script-tag>
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";function d(e){return e.usage(`$0 workers-builds workers migrate-to-previews <script-tag>
3
3
 
4
4
  Migrate a Worker's legacy non-production trigger to Previews. The legacy build settings become the Previews base config and the legacy trigger is removed.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`deploy-command`,{type:`string`,description:`Deploy command for the migrated Preview settings. Omit it to have the existing 'wrangler versions upload' command rewritten to 'wrangler preview' automatically, which fails with 400 when the existing command cannot be rewritten.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for migrating a Worker's legacy non-production trigger to Previews.`})}const f={command:`migrate-to-previews <script-tag>`,describe:`Migrate worker to previews`,builder:d,handler:async d=>s({command:`workers-builds workers migrate-to-previews`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf workers-builds workers migrate-to-previews`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/builds/workers/${d[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(d[`script-tag`]))}/migrate_to_previews`,pathParams:{"script-tag":String(d[`script-tag`]??``)},bodyKind:`json`,body:d.body===void 0?l({deploy_command:u(d[`deploy-command`],`deploy-command`,`text`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.workersBuilds.workers.migrateToPreviews({...e,account_id:f,script_tag:d[`script-tag`]})),{successLabel:`Created`});return}let p=l({deploy_command:u(d[`deploy-command`],`deploy-command`,`text`)});i(await o(`Creating`,async()=>s.workersBuilds.workers.migrateToPreviews({...p,account_id:f,script_tag:d[`script-tag`]})),{successLabel:`Created`})})};function p(e){return e.usage(`$0 workers-builds workers previews create-build <preview-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{a as r,r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d,t as f}from"./input-validation-Ch4Vllrm.mjs";import{n as p}from"./prompt-CpZztV8c.mjs";function m(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces create
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{a as r,r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d,t as f}from"./input-validation-Ch4Vllrm.mjs";import{n as p}from"./prompt-sL_yMZbI.mjs";function m(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces create
3
3
 
4
4
  Create a new Workers for Platforms dispatch namespace.`).option(`name`,{type:`string`,description:`The name of the dispatch namespace.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Create Workers for Platforms Dispatch Namespace`,builder:m,handler:async r=>c({command:`workers-for-platforms dispatch-namespaces create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf workers-for-platforms dispatch-namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/dispatch/namespaces`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({name:d(r.name,`name`,`text`)}):l(r.body)});return}let c=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.workersForPlatforms.dispatchNamespaces.create({...e,account_id:f})),{successLabel:`Created`});return}let p=u({name:d(r.name,`name`,`text`)});a(await s(`Creating`,async()=>c.workersForPlatforms.dispatchNamespaces.create({...p,account_id:f})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces delete <dispatch-namespace>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,i as f,n as p}from"./prompt-CpZztV8c.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 workers-vpc services create
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,i as f,n as p}from"./prompt-sL_yMZbI.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 workers-vpc services create
3
3
 
4
4
  Creates a new Workers VPC connectivity service in the account.`).option(`host-ipv4`,{type:`string`,description:`The host.ipv4 field`}).option(`host-network-tunnel-id`,{type:`string`,description:`The host.network.tunnel_id field`}).option(`host-ipv6`,{type:`string`,description:`The host.ipv6 field`}).option(`host-hostname`,{type:`string`,description:`The host.hostname field`}).option(`host-resolver-network-resolver-ips`,{type:`string`,array:!0,description:`The host.resolver_network.resolver_ips field`}).option(`host-resolver-network-tunnel-id`,{type:`string`,description:`The host.resolver_network.tunnel_id field`}).option(`name`,{type:`string`,description:`The name field`}).option(`tls-settings-cert-verification-mode`,{type:`string`,description:'TLS certificate verification mode for the connection to the origin.\n\n- `"verify_full"` — verify certificate chain and hostname (default)\n- `"verify_ca"` — verify certificate chain only, skip hostname check\n- `"disabled"` — do not verify the server certificate at all'}).option(`type`,{type:`string`,description:`The type field`,choices:[`tcp`,`http`]}).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`]}).option(`tcp-port`,{type:`number`,description:`The tcp_port field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`host-ipv4`,[`host-ipv6`,`host-hostname`,`host-resolver-network-resolver-ips`]).conflicts(`host-ipv6`,[`host-ipv4`,`host-hostname`,`host-resolver-network-resolver-ips`]).conflicts(`host-hostname`,[`host-ipv4`,`host-ipv6`]).conflicts(`host-resolver-network-resolver-ips`,[`host-ipv4`,`host-ipv6`]).conflicts(`http-port`,[`app-protocol`,`tcp-port`]).conflicts(`https-port`,[`app-protocol`,`tcp-port`]).conflicts(`app-protocol`,[`http-port`,`https-port`]).conflicts(`tcp-port`,[`http-port`,`https-port`]).check(e=>{if([`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`,`host-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`].some(t=>e[t]!==void 0)){let t=[`host-network-tunnel-id`,`host-resolver-network-tunnel-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --host-* flag is set`)}return!0}).check(e=>{if([`tls-settings-cert-verification-mode`].some(t=>e[t]!==void 0)){let t=[`tls-settings-cert-verification-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --tls_settings-* flag is set`)}return!0})}const g={command:`create`,describe:`Create Workers VPC connectivity service`,builder:h,handler:async p=>s({command:`workers-vpc services create`,classification:{safeFlags:[`type`,`app-protocol`,`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf workers-vpc services create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/connectivity/directory/services`,pathParams:{},bodyKind:`json`,body:p.body===void 0?l({host:{ipv4:u(p[`host-ipv4`],`host-ipv4`,`text`),network:{tunnel_id:u(p[`host-network-tunnel-id`],`host-network-tunnel-id`,`text`)},ipv6:u(p[`host-ipv6`],`host-ipv6`,`text`),hostname:u(p[`host-hostname`],`host-hostname`,`text`),resolver_network:{resolver_ips:p[`host-resolver-network-resolver-ips`],tunnel_id:u(p[`host-resolver-network-tunnel-id`],`host-resolver-network-tunnel-id`,`text`)}},name:u(p.name,`name`,`text`),tls_settings:{cert_verification_mode:u(p[`tls-settings-cert-verification-mode`],`tls-settings-cert-verification-mode`,`text`)},type:u(p.type,`type`,`text`),http_port:p[`http-port`],https_port:p[`https-port`],app_protocol:u(p[`app-protocol`],`app-protocol`,`text`),tcp_port:p[`tcp-port`]}):c(p.body)});return}let s=await r(p),m=p.local?e:await t();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Creating`,async()=>s.workersVpc.services.create({body:e,account_id:m})),{successLabel:`Created`});return}p.name===void 0&&(p.name=await d(`name`,`The name field`)),p.type===void 0&&(p.type=await f(`type`,`The type field`,[`tcp`,`http`]));let h=l({host:{ipv4:u(p[`host-ipv4`],`host-ipv4`,`text`),network:{tunnel_id:u(p[`host-network-tunnel-id`],`host-network-tunnel-id`,`text`)},ipv6:u(p[`host-ipv6`],`host-ipv6`,`text`),hostname:u(p[`host-hostname`],`host-hostname`,`text`),resolver_network:{resolver_ips:p[`host-resolver-network-resolver-ips`],tunnel_id:u(p[`host-resolver-network-tunnel-id`],`host-resolver-network-tunnel-id`,`text`)}},name:u(p.name,`name`,`text`),tls_settings:{cert_verification_mode:u(p[`tls-settings-cert-verification-mode`],`tls-settings-cert-verification-mode`,`text`)},type:u(p.type,`type`,`text`),http_port:p[`http-port`],https_port:p[`https-port`],app_protocol:u(p[`app-protocol`],`app-protocol`,`text`),tcp_port:p[`tcp-port`]});i(await o(`Creating`,async()=>s.workersVpc.services.create({body:h,account_id:m})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 workers-vpc services delete <service-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{a as r,r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{i as f,n as p}from"./prompt-CpZztV8c.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";import{n as h,t as ee}from"./raw-fetch-DxGs_eRm.mjs";function g(e){return e.usage(`$0 workflows delete <workflow-name>
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{a as r,r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{i as f,n as p}from"./prompt-sL_yMZbI.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";import{n as h,t as ee}from"./raw-fetch-lSVttVJF.mjs";function g(e){return e.usage(`$0 workflows delete <workflow-name>
3
3
 
4
4
  Deletes a Workflow. This only deletes the Workflow and does not delete or modify any Worker associated to this Workflow or bounded to it.`).positional(`workflow-name`,{type:`string`,description:`Workflow name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _={command:`delete <workflow-name>`,describe:`Deletes a Workflow`,builder:g,handler:async r=>c({command:`workflows delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf workflows delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workflows/${r[`workflow-name`]==null?`<workflow-name>`:encodeURIComponent(String(r[`workflow-name`]))}`,pathParams:{"workflow-name":String(r[`workflow-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await p({force:!!r.force,message:`This operation permanently deletes the Workflow.`})){process.stderr.write(`Aborted.
5
5
  `);return}a(await s(`Deleting`,async()=>c.workflows.delete({account_id:l,workflow_name:r[`workflow-name`]})),{successLabel:`Deleted`})})};function v(e){return e.usage(`$0 workflows get <workflow-name>
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{_ as e}from"./oauth-C-QCVfWz.mjs";import{a as t,r as n}from"./auth-C80y97yu.mjs";import{t as r}from"./output-Bia1u2k5.mjs";import{t as i}from"./dry-run-CLX6Pbtq.mjs";import{t as a}from"./progress-Bpp73hIu.mjs";import{t as o}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./input-validation-Ch4Vllrm.mjs";import{a as u}from"./prompt-CpZztV8c.mjs";import{t as d}from"./cli-types-tt_LZMbn.mjs";function f(e){return e.usage(`$0 zaraz config get
2
+ import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{a as t,r as n}from"./auth-DJhSjNNL.mjs";import{t as r}from"./output-Bia1u2k5.mjs";import{t as i}from"./dry-run-CLX6Pbtq.mjs";import{t as a}from"./progress-D_mL-Kcy.mjs";import{t as o}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./input-validation-Ch4Vllrm.mjs";import{a as u}from"./prompt-sL_yMZbI.mjs";import{t as d}from"./cli-types-tt_LZMbn.mjs";function f(e){return e.usage(`$0 zaraz config get
3
3
 
4
4
  Gets latest Zaraz configuration for a zone. It can be preview or published configuration, whichever was the last updated. Secret variables values will not be included.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`get`,describe:`Get Zaraz configuration`,builder:f,handler:async t=>o({command:`zaraz config get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf zaraz config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/settings/zaraz/config`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});t.zoneId=s,r(await a(`Loading`,async()=>o.zaraz.config.get({zone_id:s})),{successLabel:`Loaded`})})};function m(e){return e.usage(`$0 zaraz config update
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-C-QCVfWz.mjs";import{a as i,r as a}from"./auth-C80y97yu.mjs";import{t as o}from"./output-Bia1u2k5.mjs";import{t as s}from"./dry-run-CLX6Pbtq.mjs";import{t as c}from"./progress-Bpp73hIu.mjs";import{t as l}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-CUWbw_Tq.mjs";import{n as m,t as h}from"./input-validation-Ch4Vllrm.mjs";import{a as g,i as _,n as v}from"./prompt-CpZztV8c.mjs";import{t as y}from"./cli-types-tt_LZMbn.mjs";import{n as ee,t as te}from"./raw-fetch-DxGs_eRm.mjs";function b(e){return e.usage(`$0 zero-trust access applications cas create <app-id>
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-Dzk6Gy-6.mjs";import{a as i,r as a}from"./auth-DJhSjNNL.mjs";import{t as o}from"./output-Bia1u2k5.mjs";import{t as s}from"./dry-run-CLX6Pbtq.mjs";import{t as c}from"./progress-D_mL-Kcy.mjs";import{t as l}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-CUWbw_Tq.mjs";import{n as m,t as h}from"./input-validation-Ch4Vllrm.mjs";import{a as g,i as _,n as v}from"./prompt-sL_yMZbI.mjs";import{t as y}from"./cli-types-tt_LZMbn.mjs";import{n as ee,t as te}from"./raw-fetch-lSVttVJF.mjs";function b(e){return e.usage(`$0 zero-trust access applications cas create <app-id>
3
3
 
4
4
  Generates a new short-lived certificate CA and public key.`).positional(`app-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`create <app-id>`,describe:`Create a short-lived certificate CA`,builder:b,handler:async i=>l({command:`zero-trust access applications cas create`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await r():void 0,t=i.zone===void 0?`accounts`:`zones`,n=i.zone??e??`<account-id>`;s({command:`cf zero-trust access applications cas create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/access/apps/${i[`app-id`]==null?`<app-id>`:encodeURIComponent(String(i[`app-id`]))}/ca`,pathParams:{"account-or-zone":String(t),"app-id":String(i[`app-id`]??``),"account-or-zone-id":String(n)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await t({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await n();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Creating`,async()=>l.zeroTrust.access.applications.cas.create({account_or_zone:u,account_or_zone_id:d,app_id:i[`app-id`]})),{successLabel:`Created`})})};function S(e){return e.usage(`$0 zero-trust access applications cas delete <app-id>
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{_ as e}from"./oauth-C-QCVfWz.mjs";import{r as t}from"./auth-C80y97yu.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bpp73hIu.mjs";import{t as a}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";function o(e){return e.usage(`$0 zone activate
2
+ import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";function o(e){return e.usage(`$0 zone activate
3
3
 
4
4
  Triggeres a new activation check for a PENDING Zone. This can be triggered every 5 min for paygo/ent customers, every hour for FREE Zones.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`activate`,describe:`Rerun the Activation Check`,builder:o,handler:async o=>a({command:`zone activate`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zone activate`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/activation_check`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Updating`,async()=>a.zone.activate({zone_id:s})),{successLabel:`Updated`})})},c={command:`zone`,describe:`zone`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{_ as e}from"./oauth-C-QCVfWz.mjs";import{r as t}from"./auth-C80y97yu.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bpp73hIu.mjs";import{t as a}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as o,r as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./input-validation-Ch4Vllrm.mjs";import{a as u,i as d,n as f}from"./prompt-CpZztV8c.mjs";import{t as ee}from"./cli-types-tt_LZMbn.mjs";function te(e){return e.usage(`$0 zones aegis edit
2
+ import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,r as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./input-validation-Ch4Vllrm.mjs";import{a as u,i as d,n as f}from"./prompt-sL_yMZbI.mjs";import{t as ee}from"./cli-types-tt_LZMbn.mjs";function te(e){return e.usage(`$0 zones aegis edit
3
3
 
4
4
  Aegis provides dedicated egress IPs (from Cloudflare to your origin) for your layer 7 WAF and CDN services. The egress IPs are reserved exclusively for your account so that you can increase your origin security by only allowing traffic from a small list of IP addresses.`).option(`value-enabled`,{type:`boolean`,description:`Whether the feature is enabled or not.`}).option(`value-pool-id`,{type:`string`,description:`Egress pool id which refers to a grouping of dedicated egress IPs through which Cloudflare will connect to origin.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`edit`,describe:`Change aegis setting`,builder:te,handler:async s=>a({command:`zones aegis edit`,classification:{safeFlags:[`value-enabled`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones aegis edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/settings/aegis`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({value:{enabled:s[`value-enabled`],pool_id:l(s[`value-pool-id`],`value-pool-id`,`text`)}}):o(s.body)});return}let a=await t(s),u=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.aegis.edit({...e,zone_id:u})),{successLabel:`Updated`});return}let d=c({value:{enabled:s[`value-enabled`],pool_id:l(s[`value-pool-id`],`value-pool-id`,`text`)}});n(await i(`Updating`,async()=>a.zones.aegis.edit({...d,zone_id:u})),{successLabel:`Updated`})})};function m(e){return e.usage(`$0 zones aegis get
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cf",
3
- "version": "1.0.0-beta.0",
3
+ "version": "1.0.0-beta.1",
4
4
  "description": "The Cloudflare CLI",
5
5
  "keywords": [
6
6
  "ai",
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./src-CNHNCZpy.mjs";import{v as t}from"./dist-dc4E1u01.mjs";import{a as n,o as r}from"./theme-BiIYWOed.mjs";import"./ui-DH95w1Qk.mjs";import{n as i}from"./dist-BpadEMNY.mjs";import{a,i as o,n as s,r as c,t as l}from"./spawn-7IW1UyoH.mjs";import u from"node:path";import{readBuildOutput as d}from"@cloudflare/build-output-utils";import{convertToWranglerConfig as f}from"@cloudflare/config";var p=class extends Error{constructor(e){super(e),this.name=`BuildOutputConfigError`}};function m(e,t,n={}){if(e===void 0){if(n.requireRequestedMode&&t!==void 0)throw new p(`The Build Output was created with mode "${t}", but this command did not specify a mode. Rerun with "--mode ${t}".`);return}if(t===void 0)throw new p(`The Build Output does not record which mode it was created with, but this command requested mode "${e}". Rebuild with "--mode ${e}" before deploying.`);if(t!==e)throw new p(`The Build Output was created with mode "${t}", but this command requested mode "${e}". To use the existing Build Output, rerun with "--mode ${t}". To deploy in ${e} mode, rebuild with "--mode ${e}" before deploying.`)}function h(e,t){let n=e.config,{buildContext:r,...i}=t,{manifest:a,...o}=n,s=f({...i,worker:o,containers:[]});n.manifest?.mainModule&&e.bundleDir&&(s.main=u.join(e.bundleDir,n.manifest.mainModule));let c=u.resolve(`cloudflare.config.ts`),{validationConfig:l,containerReferences:d}=_(s),p=g(l,e.configPath,c);v(p,d);let{containers:m,...h}=p;return{wranglerConfig:h,builtConfig:n}}function g(e,n,r){let{config:i,diagnostics:a}=t(e,n,r,{});if(a.hasErrors())throw new p(a.renderErrors());return a.hasWarnings()&&console.warn(a.renderWarnings()),i}function _(e){let{containers:t,...n}=e,r=new Map;return n.exports!==void 0&&(n.exports=Object.fromEntries(Object.entries(n.exports).map(([e,t])=>{if(!(`container`in t)||typeof t.container!=`string`)return[e,t];r.set(e,t.container);let{container:n,...i}=t;return[e,i]}))),{validationConfig:n,containerReferences:r}}function v(e,t){e.exports===void 0||t.size===0||(e.exports=Object.fromEntries(Object.entries(e.exports).map(([e,n])=>{let r=t.get(e);return[e,r===void 0?n:{...n,container:r}]})))}function y(e){return e}async function b(t,u={},f={}){let p=u.output??`stdout`,m=process.cwd(),g=await c(m,u),_=g?.buildCommand,v={...g?.env,...f.isPreview?{CLOUDFLARE_PREVIEW_BUILD:`true`}:{}};if(g&&!g.configured&&(_=(await o(g,u)).buildCommand),_&&t&&!g?.framework?.supportsMode)throw Error(`The detected command \`${_}\` does not currently support \`--mode\`.`);p!==`silent`&&i.message(n.bold(`Build`),{symbol:r.dim(`├`),spacing:0,output:p===`stderr`?process.stderr:void 0});let y=t?[`--mode`,t]:[],b;if(_)b=await a(_,m,{...u,env:v,args:y});else{let e=s(m);p!==`silent`&&i.message(`Delegating to ${x(e)}`,{spacing:0,output:p===`stderr`?process.stderr:void 0}),b=await l(e,`build`,y,{...u,env:v})}if(b.exitCode!==0||b.signal)throw new e(b.exitCode,{signal:b.signal});let{workers:{default:S},rootConfig:C}=await d(m);h(S,C),p!==`silent`&&i.success(`Build complete`,{spacing:0,output:p===`stderr`?process.stderr:void 0})}function x(e){switch(e.impl.pkg){case`@cloudflare/vite-plugin`:return`Vite`;case`wrangler`:return`Wrangler`;case`cloudflare-py-dev-server`:return`the Python dev server`;case`cloudflare-rs-dev-server`:return`the Rust dev server`;default:return e.impl.pkg}}const S={command:`build`,describe:`Build a project for Cloudflare`,builder:y,handler:async e=>{await b(e.mode)}};export{p as a,m as i,b as n,h as r,S as t};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{n as e,t}from"./build-BbjcJxKq.mjs";export{t as default,e as runBuild};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{d as e}from"./dist-dc4E1u01.mjs";import{t}from"./chunk-QBZBEHZB-Byagrlop.mjs";import{i as n,n as r,t as i}from"./startup-profile-CgWHy4rE.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{a as s,i as c,n as l,r as u}from"./build-BbjcJxKq.mjs";import{t as d}from"./deploy-input-BCYyKXpp.mjs";import f from"node:path";import{writeFile as p}from"node:fs/promises";import{readBuildOutput as m}from"@cloudflare/build-output-utils";function h(e){return e.option(`outfile`,{type:`string`,description:`Output file for the startup CPU profile`,default:`worker-startup.cpuprofile`,requiresArg:!0}).option(`prebuilt`,{type:`boolean`,description:`Use existing Build Output Specification files without building`,default:!1})}const g={command:`check`,describe:`Profile a Worker's startup performance`,builder:h,handler:async h=>{if(h.local)throw Error(`--local is not supported by cf workers check.`);h.prebuilt||await l(h.mode,{output:h.quiet?`silent`:`stderr`});let{workers:{default:g},rootConfig:_}=await m(process.cwd());c(h.mode,_.buildContext.mode,{requireRequestedMode:h.prebuilt});let{wranglerConfig:v,builtConfig:y}=u(g,_),b=d(g,y);if(!b.resolvedEntryPointPath)throw new s(`Startup profiling requires a Worker entrypoint; assets-only projects cannot be profiled.`);if(b.bundleType===`commonjs`)throw new s(`Startup profiling does not support service-worker format Workers. Refer to https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/ for migration guidance.`);let x=t({name:v.name??g.config.name??`worker`,main:{name:y.manifest?.mainModule??f.basename(b.resolvedEntryPointPath),filePath:b.resolvedEntryPointPath,content:b.content,type:b.bundleType},modules:b.modules,sourceMaps:b.sourceMaps,compatibility_date:v.compatibility_date,compatibility_flags:v.compatibility_flags??[],assets:void 0,containers:void 0,migrations:void 0,exports:void 0,keepVars:void 0,keepSecrets:void 0,logpush:void 0,placement:void 0,tail_consumers:void 0,streaming_tail_consumers:void 0,limits:void 0,annotations:void 0,observability:void 0,cache:void 0,package_dependencies:void 0},e(v),{dryRun:!0,unsafe:v.unsafe}),S=await r(x),C=h.quiet?await i(x):await o(`Profiling Worker startup`,()=>i(x)),w=n(C);await p(h.outfile,JSON.stringify(C)),a({bundle:{sizeBytes:S.size,gzipSizeBytes:S.gzipSize},startup:{profileWindowMs:w.profileWindow/1e3,sampledTimeMs:w.sampledTime/1e3,activeTimeMs:w.activeTime/1e3,garbageCollectionTimeMs:w.garbageCollectionTime/1e3,idleTimeMs:w.idleTime/1e3,sampleCount:w.sampleCount},profile:h.outfile,note:`This profile was measured locally. Use it to understand where startup time is spent, not to predict startup time on Cloudflare.`},{quiet:h.quiet})}};export{g as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./error-sanitization-DOlqWkNu.mjs";export{e as sanitizeError};
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import{E as e,M as t}from"./dist-dc4E1u01.mjs";import{m as n}from"./oauth-C-QCVfWz.mjs";import{d as r,h as i}from"./interactive-B6woOLo-.mjs";import{i as a}from"./auth-C80y97yu.mjs";import{t as o}from"./output-Bia1u2k5.mjs";import{n as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{D as c,S as l,b as u,c as d,d as f,g as p,n as m,u as h,v as g}from"./dist-BDOzKthe.mjs";import{a as _,l as v,n as y,o as b,r as x,t as S}from"./containers-Bx_44bmJ.mjs";import{a as C,i as w,n as T,r as E}from"./build-BbjcJxKq.mjs";import{t as D}from"./deploy-input-BCYyKXpp.mjs";import{readBuildOutput as O}from"@cloudflare/build-output-utils";function k(e){return{getNormalizedContainerOptions:async t=>e.standard.normalized.map(e=>({...e,name:t.containers?.find(({class_name:t})=>t===e.class_name)?.name??e.name})),deployPreviewContainers:async(n,r,i,a,o)=>A(o.quiet,async()=>{let s=new Map;for(let e of Object.values(i.env??{}))e.type===`durable_object_namespace`&&e.class_name&&e.namespace_id&&e.script_name===void 0&&s.set(e.class_name,e.namespace_id);let c;for(let t of r){let r=s.get(t.class_name);if(r||=(c??=await g(n,a),c.find(e=>e.class===t.class_name&&e.preview?.id===i.preview_id)?.id),!r)throw Error(`Could not find a Preview Durable Object namespace for Container class "${t.class_name}".`);await d({imageRef:await j(t,e,i.id,a,n,o.localImageReferences?.get(t.class_name)),durable_object_namespace_id:r},t,n,a)}await h(e.standard.builtImages.filter(({container:e})=>!o.localImageReferences?.has(e.class_name)),t())})}}async function A(e,t){if(!e)return t();let n=r();i(`error`);try{return await t()}finally{i(n)}}async function j(e,n,r,i,a,o){if(o!==void 0)return l({pathToDocker:t(),sourceTag:o,targetTag:o,accountId:i,complianceConfig:a,containerConfig:`dockerfile`in e?e:void 0,cleanupSourceTag:!1});let s=n.standard.builtImages.find(({container:t})=>t.class_name===e.class_name);if(s)return u(s,r,t(),i,a);if(`image_uri`in e)return{newTag:e.image_uri};throw Error(`Container "${e.name}" has no Build Output image to deploy.`)}function M(e){return e.positional(`preview-name`,{type:`string`,description:`Preview name. Defaults to the current CI or Git branch; required if no branch is available.`}).option(`prebuilt`,{type:`boolean`,description:`Use existing Preview Build Output Specification files without building`,default:!1})}function N(e){return{type:`preview`,version:1,preview_id:e.preview.id,preview_name:e.preview.name,preview_slug:e.preview.slug,preview_urls:e.preview.urls,deployment_id:e.deployment.id,deployment_urls:e.deployment.urls}}async function P(t){let r=t[`preview-name`],i=r??_();if(!i||!r&&i===`HEAD`)throw Error(`We couldn't determine a Preview name from CI or Git. The name is optional when a branch is available. Otherwise, run:
3
-
4
- cf previews deploy PREVIEW_NAME`);t.prebuilt||await T(t.mode,{output:t.quiet?`silent`:`stderr`},{isPreview:!0});let o=await O(process.cwd());x(o.rootConfig),w(t.mode,o.rootConfig.buildContext.mode,{requireRequestedMode:t.prebuilt});let s=o.workers.default,{wranglerConfig:l,builtConfig:u}=E(s,o.rootConfig),d=await a(),h=await n({isPreview:!0}),g=c(d);v({...g,logger:{...g.logger,log:()=>{},info:()=>{}}}),p({logger:{...g.logger,debug:()=>{},debugWithSanitization:()=>{},log:()=>{},info:()=>{}},fetchResult:g.fetchResult,fetchPagedListResult:g.fetchPagedListResult});let A=new Set(Object.values(u.exports??{}).filter(y).map(({container:e})=>e)),j=o.containers?.filter(({config:e})=>A.has(e.name))??[],M=S(j,l,{accountId:h}),N=M.source;if(N?.some(e=>e.scheduling_policy===`durable_object`))throw new C(`Preview deployments do not support Durable Object-managed Containers (schedulingPolicy: "durable-object").`);return N&&N.length>0&&f(h,d,e(l)),b(h,{name:i,json:!0},{workerConfig:u,rootConfig:o.rootConfig,containers:j.filter(({config:e})=>N?.some(({name:t})=>t===e.name)).map(({config:e})=>e),buildResult:s.bundleDir?D(s,u):void 0,assets:s.assetsDir?{directory:s.assetsDir}:void 0},{...k(M),verifyContainersScope:async()=>{await m.listApplications()}})}const F={command:`deploy [preview-name]`,describe:`Deploy a Worker Preview`,builder:M,handler:async e=>{o(N(await P(e)),{quiet:e.quiet})}},I={command:`previews`,describe:`Manage Worker Previews`,builder:e=>e.command(s(F,{command:`previews deploy`,classification:{safeFlags:[`prebuilt`]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{I as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./run-ChM_YpZ0.mjs";export{e as runWithTelemetry};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{E as e,M as t}from"./dist-dc4E1u01.mjs";import{a as n,o as r}from"./theme-BiIYWOed.mjs";import"./ui-DH95w1Qk.mjs";import{m as i}from"./oauth-C-QCVfWz.mjs";import{n as a}from"./dist-BpadEMNY.mjs";import{i as o}from"./auth-C80y97yu.mjs";import{D as s,d as c,g as l,u}from"./dist-BDOzKthe.mjs";import{c as d,i as f,l as p,t as m}from"./containers-Bx_44bmJ.mjs";import{i as h,n as g,r as _}from"./build-BbjcJxKq.mjs";import{i as v,n as y,t as b}from"./deploy-input-BCYyKXpp.mjs";import{readBuildOutput as x}from"@cloudflare/build-output-utils";function S(e){return e.option(`prebuilt`,{type:`boolean`,description:`Deploy existing Build Output Specification files without building`,default:!1}).option(`tag`,{type:`string`,description:`A tag to associate with this Worker Version`,requiresArg:!0}).option(`message`,{type:`string`,description:`A message to associate with this Worker Version`,requiresArg:!0}).option(`secrets-file`,{type:`string`,description:`Path to a file containing secrets to upload with the version (JSON or .env format)`,requiresArg:!0}).option(`dry-run`,{describe:`Build a project and run checks without actually uploading the Worker`,type:`boolean`,default:!1})}async function C(S,C){S.prebuilt||(await g(S.mode),a.message(``,{spacing:0}));let{workers:{default:w},rootConfig:T,containers:E}=await x(process.cwd());if(T.buildContext.isPreview){let e=[`cf previews deploy`,...S.prebuilt?[`--prebuilt`]:[],...T.buildContext.mode===void 0?[]:[`--mode`,T.buildContext.mode]].join(` `);throw Error(`This build output is for a Preview. Run ${e} instead.`)}h(S.mode,T.buildContext.mode,{requireRequestedMode:S.prebuilt});let{wranglerConfig:D,builtConfig:O}=_(w,T),k=b(w,O),A=S[`dry-run`]?``:await o(),j=S[`dry-run`]?void 0:await i(),M=s(A);p(M),l({logger:M.logger,fetchResult:M.fetchResult,fetchPagedListResult:M.fetchPagedListResult}),j!==void 0&&E.length>0&&c(j,A,e(D));let N=m(E,D,{accountId:j,containersRollout:S[`containers-rollout`]}),P;if(C.command===`Deploy`){let e=y(w,D,j,S,N);a.message(n.bold(`Deploy`),{symbol:r.dim(`├`),spacing:0}),{versionId:P}=await f(e,D,k,{syncWorkersSite:void 0,analyseBundle:void 0})}else{let e=v(w,D,j,S,N);a.message(n.bold(`Upload`),{symbol:r.dim(`├`),spacing:0}),{versionId:P}=await d(e,D,k,{analyseBundle:void 0})}P!==null&&!S[`dry-run`]&&(C.command!==`Deploy`||S[`containers-rollout`]!==`none`)&&await u([...C.command===`Deploy`?N.standard.builtImages:[],...N.durableObjects.builtImages],t()),a.success(S[`dry-run`]?`Dry run complete`:`${C.command} complete`)}export{S as n,C as t};