cf 1.0.0-beta.26 → 1.0.0-beta.27

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 (256) hide show
  1. package/dist/_meta/commands.json +1996 -3422
  2. package/dist/_meta/schemas.json +9249 -2339
  3. package/dist/abuse-reports-RxXqfDEW.mjs +24 -0
  4. package/dist/{access-DCOOmDC5.mjs → access-BxEprr2f.mjs} +1 -1
  5. package/dist/{accounts-HC6XuIwP.mjs → accounts-DU2ZNYqP.mjs} +17 -11
  6. package/dist/{acm-DYgr6SAR.mjs → acm-CBCIKBJ4.mjs} +1 -1
  7. package/dist/{addressing-BS66pJ_a.mjs → addressing-BKxiLRHk.mjs} +1 -1
  8. package/dist/{agent-memory-BbXdueL0.mjs → agent-memory-DkBpQYUL.mjs} +1 -1
  9. package/dist/{ai-BiIKznNv.mjs → ai-DqEN_hhg.mjs} +2 -2
  10. package/dist/{ai-audit-DI4Rw2wl.mjs → ai-audit-BmzOgt6x.mjs} +1 -1
  11. package/dist/{ai-gateway-rlYCbts5.mjs → ai-gateway-B0uiYVHq.mjs} +3 -3
  12. package/dist/ai-search-DbZIxdio.mjs +74 -0
  13. package/dist/{ai-security-BUwS6kVh.mjs → ai-security-CvZfP2JC.mjs} +1 -1
  14. package/dist/{alerting-BSzuvFk1.mjs → alerting-BjGwBxZT.mjs} +1 -1
  15. package/dist/{analytics-CQ-Yt1mm.mjs → analytics-C7kT_H-W.mjs} +4 -4
  16. package/dist/{analytics-engine-CdrY5-95.mjs → analytics-engine-BHpcNSdD.mjs} +1 -1
  17. package/dist/{api-security-BBxEJjGv.mjs → api-security-BbcvDtff.mjs} +2 -2
  18. package/dist/{argo-BiefH8wc.mjs → argo-D1VONzu-.mjs} +1 -1
  19. package/dist/{artifacts-B9g9aPrk.mjs → artifacts-2R2sxIKO.mjs} +1 -1
  20. package/dist/{audit-logs-BhJs-OS2.mjs → audit-logs-LoBB1OO_.mjs} +1 -1
  21. package/dist/auth-CspwoBlp.mjs +2 -0
  22. package/dist/{auth-C50SqX9F.mjs → auth-D499YE2n.mjs} +3 -3
  23. package/dist/{auth-D5Yj9eYU.mjs → auth-FK2eLQ02.mjs} +1 -1
  24. package/dist/{auth-token-DvNoIhRL.mjs → auth-token-BwpERbnG.mjs} +1 -1
  25. package/dist/{autoconfig-ldsgXxa6.mjs → autoconfig-B2w-woU0.mjs} +36 -36
  26. package/dist/{basin-catalog-CtKFiH-n.mjs → basin-catalog-AgOHGiPI.mjs} +2 -2
  27. package/dist/billing-DRNww0iC.mjs +24 -0
  28. package/dist/{blocks-DnNrvi8s.mjs → blocks-C8vyXIAT.mjs} +1 -1
  29. package/dist/body-unions-CjpNjwSW.mjs +2 -0
  30. package/dist/bot-management-fwxKIbaB.mjs +9 -0
  31. package/dist/{botnet-feed-lD9s2oLA.mjs → botnet-feed-DCYB5kYZ.mjs} +1 -1
  32. package/dist/{brand-protection-Byoa1hvj.mjs → brand-protection-BVICLzBc.mjs} +1 -1
  33. package/dist/browser-run-CEk-NIgP.mjs +40 -0
  34. package/dist/build-CRm2TQq8.mjs +2 -0
  35. package/dist/{build-Dwd1_7o0.mjs → build-DO_GNhRl.mjs} +1 -1
  36. package/dist/{builds-D3mAH87h.mjs → builds-CoazxuN-.mjs} +26 -26
  37. package/dist/{cache-0xCdyNg9.mjs → cache-jlLJLSu7.mjs} +1 -1
  38. package/dist/{cf-CpC4giTf.mjs → cf-hP0SOgC6.mjs} +2 -2
  39. package/dist/{chunk-DSGVRFIS-vdfri8fR.mjs → chunk-DSGVRFIS-DQwKND2c.mjs} +1 -1
  40. package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +363 -0
  41. package/dist/{cli-Cm4Twas4.mjs → cli-Nqf58-1c.mjs} +1 -1
  42. package/dist/{client-side-security-BRn7KBpu.mjs → client-side-security-VmZzMy-m.mjs} +1 -1
  43. package/dist/{cloud-connector-DqkOIRDr.mjs → cloud-connector-bMlFnqP0.mjs} +1 -1
  44. package/dist/{cloudflared-DDp_8PTK.mjs → cloudflared-Ba4KWdTO.mjs} +1 -1
  45. package/dist/{cloudforce-one-B9k8vhso.mjs → cloudforce-one-CCaIBOAo.mjs} +121 -119
  46. package/dist/{command-BV8-laJK.mjs → command-BASaTmJc.mjs} +1 -1
  47. package/dist/{command-CfOqnqlN.mjs → command-BiIVclNA.mjs} +1 -1
  48. package/dist/{command-BKNQsGqu.mjs → command-Bih1HLr3.mjs} +1 -1
  49. package/dist/{command-BVz2aES3.mjs → command-BxZBNPxG.mjs} +1 -1
  50. package/dist/{command-B-_ba4rQ.mjs → command-ByYf12-8.mjs} +1 -1
  51. package/dist/{command-Dn39o5xQ.mjs → command-C0qCuw03.mjs} +1 -1
  52. package/dist/{command-BsCFkho-.mjs → command-C2FVMd1b.mjs} +1 -1
  53. package/dist/{command--Y_QAiU2.mjs → command-C4OgtX_x.mjs} +1 -1
  54. package/dist/{command-DlI7Z_7j.mjs → command-C5Kqc5Km.mjs} +1 -1
  55. package/dist/{command-CQMRxiDz.mjs → command-CFxyp8Uo.mjs} +1 -1
  56. package/dist/{command-CN8NFLs2.mjs → command-CZAR85ba.mjs} +1 -1
  57. package/dist/{command-QHmV62Fv.mjs → command-CelQVrZL.mjs} +1 -1
  58. package/dist/{command-yOG9VUtq.mjs → command-CrAlzysj.mjs} +1 -1
  59. package/dist/{command-DsOv6z9q.mjs → command-pMoNdd22.mjs} +1 -1
  60. package/dist/{completions-BA52jTea.mjs → completions-DRzBiqpv.mjs} +1 -1
  61. package/dist/{connector-interrupts-zL7pxPn6.mjs → connector-interrupts-CrTeSyaM.mjs} +1 -1
  62. package/dist/{connector-telemetry-events-PL4Fqqvu.mjs → connector-telemetry-events-BbAOUt9h.mjs} +1 -1
  63. package/dist/{connector-telemetry-snapshots-DyBSuEFB.mjs → connector-telemetry-snapshots-DcpBx7Qx.mjs} +1 -1
  64. package/dist/{connectors-D8H6rQz9.mjs → connectors-D1WFLJoE.mjs} +1 -1
  65. package/dist/{containers-Db-eWudu.mjs → containers-BOBEs1Gk.mjs} +4 -4
  66. package/dist/containers-DINLx5_i.mjs +380 -0
  67. package/dist/{content-scan-DUVq09i8.mjs → content-scan-D1GfPSL0.mjs} +1 -1
  68. package/dist/{context-BvLXzoMs.mjs → context-Dp4CXG22.mjs} +1 -1
  69. package/dist/{cps-CqaRliZZ.mjs → cps-D4uhzg3k.mjs} +1 -1
  70. package/dist/{csam-scanner-DsXvOOsZ.mjs → csam-scanner-DOOUBeBM.mjs} +1 -3
  71. package/dist/custom-csrs-DtdFo5YZ.mjs +18 -0
  72. package/dist/{custom-hostnames-Cj_csfo_.mjs → custom-hostnames-ccdlELaD.mjs} +1 -1
  73. package/dist/custom-nameservers-p3gDjfva.mjs +12 -0
  74. package/dist/custom-pages-DAkKVzgR.mjs +38 -0
  75. package/dist/d1-CDIyRdh4.mjs +52 -0
  76. package/dist/{delegate-CMfEjvHn.mjs → delegate-B4bKqF7i.mjs} +1 -1
  77. package/dist/delegate.mjs +1 -1
  78. package/dist/{deploy-DDbmxkiX.mjs → deploy-BaC5Ty7F.mjs} +1 -1
  79. package/dist/{deploy-context-DsEVu7bf.mjs → deploy-context-DTTgNGro.mjs} +1 -1
  80. package/dist/{deploy-input-BA_3Q2Xu.mjs → deploy-input-mAy06fAI.mjs} +1 -1
  81. package/dist/{dev-BS156bim.mjs → dev-De-HszNT.mjs} +1 -1
  82. package/dist/{diagnostics-BmkQnSEb.mjs → diagnostics-D1CUs2o9.mjs} +1 -1
  83. package/dist/{dist-DehXZozc.mjs → dist-D5qkmHhC.mjs} +1 -1
  84. package/dist/{dls-DciZC_gQ.mjs → dls-DWBiYzY1.mjs} +1 -1
  85. package/dist/{dns-firewall-CRfde07f.mjs → dns-firewall-DH9xIT5H.mjs} +8 -8
  86. package/dist/{dns-C2YPspGN.mjs → dns-wMjf1t6-.mjs} +14 -8
  87. package/dist/{docs-CYjyBA8q.mjs → docs-BA7qslb2.mjs} +1 -1
  88. package/dist/{durable-objects-DcI97y4p.mjs → durable-objects-DF0MYpnV.mjs} +1 -1
  89. package/dist/{email-auth-CMCQAu99.mjs → email-auth-BShMFXn4.mjs} +1 -1
  90. package/dist/email-domains-CDSbVclP.mjs +14 -0
  91. package/dist/{email-routing-7p9dr5Ue.mjs → email-routing-CBCkbg_F.mjs} +4 -2
  92. package/dist/{email-security-Bu0fAYh-.mjs → email-security-CnNa1YON.mjs} +4 -4
  93. package/dist/{email-sending-OpMZNaHZ.mjs → email-sending-CpDSw-Eb.mjs} +16 -16
  94. package/dist/{errors-C5RGao2J.mjs → errors-DatLr-iR.mjs} +1 -1
  95. package/dist/{field-extractors-BfsNjd0e.mjs → field-extractors-BwGdMnTr.mjs} +1 -1
  96. package/dist/{firewall-CJ-VIOk1.mjs → firewall-CY_oem-d.mjs} +25 -9
  97. package/dist/{flagship-C5PTR1ND.mjs → flagship-Bat5EZCk.mjs} +1 -1
  98. package/dist/{fraud-B7hwBheX.mjs → fraud-CSUKLh8X.mjs} +2 -2
  99. package/dist/global-options-DiKj2cQy.mjs +2 -0
  100. package/dist/{google-tag-gateway-D7iFDVEa.mjs → google-tag-gateway-C2skt6t-.mjs} +1 -1
  101. package/dist/{healthchecks-B4jTcKV7.mjs → healthchecks-uC43QKQd.mjs} +1 -1
  102. package/dist/{hyperdrive-1432DM-p.mjs → hyperdrive-FcBbpew4.mjs} +3 -3
  103. package/dist/iam-8T74DNhH.mjs +62 -0
  104. package/dist/{images-Ttea4khD.mjs → images-C3JUaf6b.mjs} +1 -1
  105. package/dist/index.mjs +1 -1
  106. package/dist/{init-BeYrAg7Q.mjs → init-BEVVz4_P.mjs} +1 -1
  107. package/dist/{intel-CJznBf5n.mjs → intel-DRy4rHrt.mjs} +6 -7
  108. package/dist/{interactive-DsU8VDvK.mjs → interactive-CKHdGvkh.mjs} +1 -1
  109. package/dist/{internal-DOho_iA0.mjs → internal-CamuESs0.mjs} +1 -1
  110. package/dist/{ips-BgNoRwFN.mjs → ips-DinCNnWj.mjs} +1 -1
  111. package/dist/k2-wsanPL3y.mjs +10 -0
  112. package/dist/{kv-CTyuvcAz.mjs → kv-BLSPcEnH.mjs} +1 -1
  113. package/dist/{lazy-command-DeTzOWvU.mjs → lazy-command-WB1FOuew.mjs} +1 -1
  114. package/dist/{leaked-credential-checks-21Wc7OqL.mjs → leaked-credential-checks-CSZd9hBQ.mjs} +1 -1
  115. package/dist/{live-BfrWKfq8.mjs → live-B6AsI_E5.mjs} +1 -1
  116. package/dist/{load-balancers-DMTsh-9q.mjs → load-balancers-gap5u4b1.mjs} +19 -7
  117. package/dist/local-CFsO9Tkg.mjs +2 -0
  118. package/dist/{local-CvzO-cQH.mjs → local-CgBhtmON.mjs} +1 -1
  119. package/dist/{local-runtime-DOpR_Tnc.mjs → local-runtime-CmlJ20uJ.mjs} +1 -1
  120. package/dist/{login-CVWkMh1L.mjs → login-BJHaTERg.mjs} +1 -1
  121. package/dist/login-BfuOf-Yi.mjs +2 -0
  122. package/dist/logpush-qhlxsioM.mjs +68 -0
  123. package/dist/{logs-BSyyNwso.mjs → logs-bI54CJ0w.mjs} +23 -7
  124. package/dist/{magic-network-monitoring-DRRvSrDP.mjs → magic-network-monitoring-CX3TaMTu.mjs} +1 -1
  125. package/dist/{magic-transit-BhP424T-.mjs → magic-transit-BwDyySHJ.mjs} +20 -20
  126. package/dist/{managed-defense-6l_B3hn_.mjs → managed-defense-CsBBkfeQ.mjs} +2 -2
  127. package/dist/{managed-transforms-D7FMBsnq.mjs → managed-transforms-CUC-uAbW.mjs} +1 -1
  128. package/dist/{mcp-BUOfMkBP.mjs → mcp-CyI0sDmL.mjs} +3 -3
  129. package/dist/{mesh-B1RrhAT1.mjs → mesh-Czr0UCP4.mjs} +2 -2
  130. package/dist/{migrate-BTU8AvlP.mjs → migrate-DKDWYrz2.mjs} +1 -1
  131. package/dist/{monetization-Da3ooFLC.mjs → monetization-NUgfDtSy.mjs} +7 -3
  132. package/dist/{network-CjhSzhMm.mjs → network-B42zrBic.mjs} +1 -1
  133. package/dist/{network-interconnects-DEQD6GM8.mjs → network-interconnects-DuIBe8fK.mjs} +4 -4
  134. package/dist/{o11y-DeNxXxcp.mjs → o11y-oEUpMC3O.mjs} +6 -6
  135. package/dist/{oauth-DdXkpU44.mjs → oauth-BLQ1-y3R.mjs} +1 -1
  136. package/dist/{oauth-Dnog5v-Q.mjs → oauth-BmSFLp_s.mjs} +1 -1
  137. package/dist/observability-BxhJQCgZ.mjs +4 -0
  138. package/dist/organization-CEnlXwrl.mjs +70 -0
  139. package/dist/{organizations-p8Mgo8A7.mjs → organizations-Dt86ToxE.mjs} +1 -1
  140. package/dist/{origin-post-quantum-encryption-Bwysyttf.mjs → origin-post-quantum-encryption-lX-uaJSL.mjs} +1 -1
  141. package/dist/package-CiRJBRHO.mjs +2 -0
  142. package/dist/{page-rules-D2eFbKWb.mjs → page-rules-J6LhwR-s.mjs} +1 -1
  143. package/dist/{pages-DYZDvWK6.mjs → pages-BksdnChs.mjs} +4 -4
  144. package/dist/{pay-per-crawl-CgPFv5HT.mjs → pay-per-crawl-BLcbHRoR.mjs} +1 -1
  145. package/dist/{pay-per-use-BIQrsrTy.mjs → pay-per-use-VatiU-Nt.mjs} +4 -2
  146. package/dist/{pipelines-D6pkhlpm.mjs → pipelines-B5AoB3f3.mjs} +5 -5
  147. package/dist/precursor-D3VH2MXT.mjs +4 -0
  148. package/dist/{previews-B1mqjXaJ.mjs → previews-DzJ85fsr.mjs} +1 -1
  149. package/dist/{progress-B-CVX0kn.mjs → progress-DLri-rA7.mjs} +1 -1
  150. package/dist/{prompt-DJF_Rs5S.mjs → prompt-D0dXwuME.mjs} +1 -1
  151. package/dist/{queues-DaqLO-UO.mjs → queues-BsAck4To.mjs} +5 -5
  152. package/dist/{r2-DDIU9JN3.mjs → r2-BYjdHDEZ.mjs} +38 -38
  153. package/dist/{radar-D59qCgld.mjs → radar-CvLtu-Vr.mjs} +1 -1
  154. package/dist/{raw-fetch-BrOxDN9k.mjs → raw-fetch-DQeDx1wT.mjs} +1 -1
  155. package/dist/{ready-DgE08svD.mjs → ready-gsGEaWLL.mjs} +1 -1
  156. package/dist/{realtime-DWjdrDzv.mjs → realtime-DiCEgFTC.mjs} +81 -79
  157. package/dist/{registrar-uYOU1U27.mjs → registrar-D4wdgWpo.mjs} +8 -8
  158. package/dist/{registrar-sandbox-uzs3eOKk.mjs → registrar-sandbox-B6yopzdG.mjs} +2 -2
  159. package/dist/{reporting-Dx2YTick.mjs → reporting-BiHgnT8L.mjs} +1 -1
  160. package/dist/{request-headers-DHzBX7dQ.mjs → request-headers-CoxHUNcB.mjs} +1 -1
  161. package/dist/{request-tracers-B49cBKkj.mjs → request-tracers-817HTytF.mjs} +1 -1
  162. package/dist/{resource-sharing-CIsLVAcK.mjs → resource-sharing-CW9xxtq5.mjs} +12 -12
  163. package/dist/{rules-CjgLSlUC.mjs → rules-CRhe_ca9.mjs} +1 -1
  164. package/dist/rulesets-CKyc-Xlx.mjs +42 -0
  165. package/dist/{rum-vPEpMS_h.mjs → rum-BfnWHW_d.mjs} +1 -1
  166. package/dist/{run-BZ6Fj3jQ.mjs → run-Ciw_GIrC.mjs} +1 -1
  167. package/dist/run-DD45EQTm.mjs +2 -0
  168. package/dist/{schema-cache-C_rvto6Y.mjs → schema-cache-BIo0Gi2H.mjs} +1 -1
  169. package/dist/schema-flags-DrqvwQNw.mjs +4 -0
  170. package/dist/{scim-BA7XbsSu.mjs → scim-C4iRWNYB.mjs} +1 -1
  171. package/dist/{secrets-store-MEUNt1Ph.mjs → secrets-store-DgtzZRze.mjs} +1 -1
  172. package/dist/security-insights-SlUGW3F_.mjs +62 -0
  173. package/dist/{security-txt-DikhnR2L.mjs → security-txt-C3YS0REz.mjs} +1 -1
  174. package/dist/{session-BOnam-Wv.mjs → session-D2yuwO4i.mjs} +1 -1
  175. package/dist/{shared-DmmWSObC.mjs → shared--uVkAAd7.mjs} +1 -1
  176. package/dist/{signed-url-C-24KbWB.mjs → signed-url-ClLk45_J.mjs} +1 -1
  177. package/dist/{smart-shield-DPqLMz7M.mjs → smart-shield-Dn95hqUH.mjs} +1 -1
  178. package/dist/{snippets-Bi3Uq1DF.mjs → snippets-BNUKOajz.mjs} +1 -1
  179. package/dist/{spawn-C3hzWVrJ.mjs → spawn-DuT4snxu.mjs} +1 -1
  180. package/dist/{spectrum-BaWKMoAl.mjs → spectrum-Cj0BMtg2.mjs} +3 -3
  181. package/dist/{speed-DShjlpAs.mjs → speed-BrVeZRyX.mjs} +1 -1
  182. package/dist/{sql-DCoFf15T.mjs → sql-BX1pBqj3.mjs} +2 -2
  183. package/dist/src-DPnUfK4c.mjs +131 -0
  184. package/dist/{ssl-C4nt4pJK.mjs → ssl-Bx4LCutF.mjs} +3 -3
  185. package/dist/{startup-profile-CFJ_Lu1c.mjs → startup-profile-DqaYNT0b.mjs} +1 -1
  186. package/dist/startup-profile-tZNb2HGz.mjs +2 -0
  187. package/dist/{state-DmjHXZat.mjs → state-BmzOLELo.mjs} +1 -1
  188. package/dist/state-Uwfrmw5I.mjs +2 -0
  189. package/dist/{stream-CpZbnSpH.mjs → stream-BRzr6yh0.mjs} +1 -1
  190. package/dist/{tags-BIjQ3Kjh.mjs → tags-xVzjZxdt.mjs} +11 -5
  191. package/dist/{telemetry-BDhqOpUw.mjs → telemetry-CJ9URio3.mjs} +1 -1
  192. package/dist/telemetry-Pt5GpCKD.mjs +2 -0
  193. package/dist/tenant-custom-nameservers-M7Fxqh2W.mjs +8 -0
  194. package/dist/{tunnels-CXAO2CeL.mjs → tunnels-DQVXKUKA.mjs} +3 -3
  195. package/dist/{turnstile-Ctm0rs0q.mjs → turnstile-B_Ugzgom.mjs} +1 -1
  196. package/dist/ui-FYultowZ.mjs +2 -0
  197. package/dist/{update-check-D_Wtw0_D.mjs → update-check-DHUo4FOJ.mjs} +1 -1
  198. package/dist/{update-check-Dc7cRFlx.mjs → update-check-DRr0eRhB.mjs} +1 -1
  199. package/dist/update-check-worker.mjs +1 -1
  200. package/dist/{url-normalization-DOfc2Q7a.mjs → url-normalization-CZRQH_pJ.mjs} +1 -1
  201. package/dist/{url-scanner-J8M3X2tR.mjs → url-scanner-BH4PLy16.mjs} +1 -1
  202. package/dist/{user-BaF0qvvO.mjs → user-Bn82Qw0Y.mjs} +10 -12
  203. package/dist/{vectorize-D5qiggZU.mjs → vectorize-DoVVz_sh.mjs} +1 -1
  204. package/dist/version-Zr2oF8mY.mjs +2 -0
  205. package/dist/{waiting-rooms-BdmAq7ul.mjs → waiting-rooms-QUW131o3.mjs} +5 -3
  206. package/dist/{web-assets-BySw_Tme.mjs → web-assets-CgQXsp8m.mjs} +2 -2
  207. package/dist/{web3-BKkKf1RF.mjs → web3-TY9s6Swn.mjs} +3 -3
  208. package/dist/workers-B3uJqJKc.mjs +39 -0
  209. package/dist/{workers-builds-CVJ4FqzB.mjs → workers-builds-BgGY0IGk.mjs} +2 -2
  210. package/dist/{workers-for-platforms-mzdtmr6r.mjs → workers-for-platforms-5RkV9MVp.mjs} +2 -2
  211. package/dist/workers-vpc-Bt4OQbwM.mjs +12 -0
  212. package/dist/{workflows-Cr957c4U.mjs → workflows-6m85DdqF.mjs} +7 -7
  213. package/dist/{wrangler-migration-DZV7-4Fp.mjs → wrangler-migration-BbmGOu8l.mjs} +3 -3
  214. package/dist/{zaraz-C8__FhOh.mjs → zaraz-8WSJ7l0L.mjs} +2 -2
  215. package/dist/{zero-trust-BVCvQJ4e.mjs → zero-trust-DK0cqDZv.mjs} +483 -405
  216. package/dist/{zones-BzyjOT10.mjs → zones-DTAcguf6.mjs} +3 -3
  217. package/package.json +14 -14
  218. package/dist/abuse-reports-zPrsxbRz.mjs +0 -24
  219. package/dist/ai-search-QOenIzDL.mjs +0 -74
  220. package/dist/auth-Czzy5Rs_.mjs +0 -2
  221. package/dist/billing-BrLJqlOf.mjs +0 -22
  222. package/dist/bot-management-BSBVuKc0.mjs +0 -9
  223. package/dist/browser-run-BSVANGzU.mjs +0 -40
  224. package/dist/build-CPKxZ3kL.mjs +0 -2
  225. package/dist/chunk-3PJ54H4K-CY8EY_n2.mjs +0 -363
  226. package/dist/containers-D4sa-Eoy.mjs +0 -380
  227. package/dist/custom-csrs-Dl_daAbX.mjs +0 -10
  228. package/dist/custom-nameservers-Bw2P7F_W.mjs +0 -8
  229. package/dist/custom-pages-CJ7ecSX6.mjs +0 -20
  230. package/dist/d1-BsWI546w.mjs +0 -89
  231. package/dist/email-domains-1Nx60ETD.mjs +0 -12
  232. package/dist/iam-DuZenYtc.mjs +0 -48
  233. package/dist/k2-Cj1ORHul.mjs +0 -10
  234. package/dist/local-CWTti4ot.mjs +0 -2
  235. package/dist/login-Djz5mvHJ.mjs +0 -2
  236. package/dist/logpush-OMhp7VgE.mjs +0 -44
  237. package/dist/magic-cloud-networking-DD29yMnE.mjs +0 -68
  238. package/dist/oauth-clients-UnbMcHkx.mjs +0 -14
  239. package/dist/oauth-scopes-DbtnZVO4.mjs +0 -4
  240. package/dist/organization-IsxVyWol.mjs +0 -73
  241. package/dist/package-BOE_De2L.mjs +0 -2
  242. package/dist/precursor-B35P8h6h.mjs +0 -4
  243. package/dist/rulesets-C7_aZA7m.mjs +0 -34
  244. package/dist/run-D4-K_cbQ.mjs +0 -2
  245. package/dist/schema-flags-Cr6kleor.mjs +0 -4
  246. package/dist/security-insights-ZKtey62s.mjs +0 -40
  247. package/dist/src-jyCTFHcS.mjs +0 -131
  248. package/dist/startup-profile-D_Qjgca1.mjs +0 -2
  249. package/dist/state-C7lNNN31.mjs +0 -2
  250. package/dist/telemetry-BZdRnr26.mjs +0 -2
  251. package/dist/tenant-CqYoylyU.mjs +0 -10
  252. package/dist/tenant-custom-nameservers-DDzzdyY3.mjs +0 -8
  253. package/dist/ui-BUCBQ3Sq.mjs +0 -2
  254. package/dist/version-DNcdABcr.mjs +0 -2
  255. package/dist/workers-TS0oQ-XH.mjs +0 -39
  256. package/dist/workers-vpc-xB1hHFPd.mjs +0 -12
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{O as e,U as t,X as n,Y as r,_ as i,g as a,rt as o,tt as s,v as c}from"./dist-DehXZozc.mjs";import{M as l,N as u,d,g as f,k as p,v as m}from"./chunk-AAQI36FL-e6E5HW1g.mjs";import{t as h}from"./version-DNcdABcr.mjs";import{t as g}from"./log-BWdaOGOW.mjs";import{n as _,r as v,t as y}from"./dialog-D5lus4M4.mjs";import{S as b,T as x,b as S,c as C,f as ee,g as te,h as ne,i as re,o as ie,p as ae,u as w,w as oe,x as T}from"./interactive-DsU8VDvK.mjs";import{createRequire as se}from"node:module";import{setTimeout as E}from"node:timers/promises";import{existsSync as ce,readFileSync as D}from"node:fs";import O,{join as le}from"node:path";import k from"node:process";import{release as A}from"node:os";import ue from"node:assert";import{createServer as de}from"node:net";import{once as fe}from"node:events";import j,{createHash as pe,randomUUID as me}from"node:crypto";import{execFile as he,execFileSync as ge,spawn as M}from"node:child_process";import{cleanBuildOutputDir as _e,normalizeDirectoryName as ve,writeContainerConfig as N}from"@cloudflare/build-output-utils";function ye(e,t=k.stderr){t.isTTY&&(e?t.write(`\x1B[?25h`):t.write(`\x1B[?25l`))}const P=se(import.meta.url||(typeof __filename==`string`?__filename:`/`));var be=Object.create,xe=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,Ce=Object.getOwnPropertyNames,we=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty,F=(e,t)=>xe(e,`name`,{value:t,configurable:!0}),I=/* @__PURE__ */ (e=>P===void 0?typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(P===void 0?e:P)[t]}):e:P)(function(e){if(P!==void 0)return P.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)}),L=(e,t)=>function(){return t||(0,e[Ce(e)[0]])((t={exports:{}}).exports,t),t.exports},Ee=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of Ce(t))!Te.call(e,i)&&i!==n&&xe(e,i,{get:()=>t[i],enumerable:!(r=Se(t,i))||r.enumerable});return e},R=(e,t,n)=>(n=e==null?{}:be(we(e)),Ee(xe(n,`default`,{value:e,enumerable:!0}),e)),z=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js"(e,t){var n=[`nodebuffer`,`arraybuffer`,`fragments`],r=typeof Blob<`u`;r&&n.push(`blob`),t.exports={BINARY_TYPES:n,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:`258EAFA5-E914-47DA-95CA-C5AB0DC85B11`,hasBlob:r,kForOnEventAttribute:Symbol(`kIsForOnEventAttribute`),kListener:Symbol(`kListener`),kStatusCode:Symbol(`status-code`),kWebSocket:Symbol(`websocket`),NOOP:/* @__PURE__ */ F(()=>{},`NOOP`)}}}),De=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js"(e,t){var{EMPTY_BUFFER:n}=z(),r=Buffer[Symbol.species];function i(e,t){if(e.length===0)return n;if(e.length===1)return e[0];let i=Buffer.allocUnsafe(t),a=0;for(let t=0;t<e.length;t++){let n=e[t];i.set(n,a),a+=n.length}return a<t?new r(i.buffer,i.byteOffset,a):i}F(i,`concat`);function a(e,t,n,r,i){for(let a=0;a<i;a++)n[r+a]=e[a]^t[a&3]}F(a,`_mask`);function o(e,t){for(let n=0;n<e.length;n++)e[n]^=t[n&3]}F(o,`_unmask`);function s(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}F(s,`toArrayBuffer`);function c(e){if(c.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=new r(e):ArrayBuffer.isView(e)?t=new r(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),c.readOnly=!1),t}if(F(c,`toBuffer`),t.exports={concat:i,mask:a,toArrayBuffer:s,toBuffer:c,unmask:o},!process.env.WS_NO_BUFFER_UTIL)try{let e=I(`bufferutil`);t.exports.mask=function(t,n,r,i,o){o<48?a(t,n,r,i,o):e.mask(t,n,r,i,o)},t.exports.unmask=function(t,n){t.length<32?o(t,n):e.unmask(t,n)}}catch{}}}),Oe=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/limiter.js"(e,t){var n=Symbol(`kDone`),r=Symbol(`kRun`);t.exports=class{static{F(this,`Limiter`)}constructor(e){this[n]=()=>{this.pending--,this[r]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[r]()}[r](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[n])}}}}}),B=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js"(e,t){var n=I(`zlib`),r=De(),i=Oe(),{kStatusCode:a}=z(),o=Buffer[Symbol.species],s=Buffer.from([0,0,255,255]),c=Symbol(`permessage-deflate`),l=Symbol(`total-length`),u=Symbol(`callback`),d=Symbol(`buffers`),f=Symbol(`error`),p;t.exports=class{static{F(this,`PerMessageDeflate`)}constructor(e){this._options=e||{},this._threshold=this._options.threshold===void 0?1024:this._options.threshold,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,p||=new i(this._options.concurrencyLimit===void 0?10:this._options.concurrencyLimit)}static get extensionName(){return`permessage-deflate`}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits??(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&=(this._inflate.close(),null),this._deflate){let e=this._deflate[u];this._deflate.close(),this._deflate=null,e&&e(/* @__PURE__ */ Error(`The deflate stream was closed while data was being processed`))}}acceptAsServer(e){let t=this._options,n=e.find(e=>!(t.serverNoContextTakeover===!1&&e.server_no_context_takeover||e.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits==`number`&&t.serverMaxWindowBits>e.server_max_window_bits)||typeof t.clientMaxWindowBits==`number`&&!e.client_max_window_bits));if(!n)throw Error(`None of the extension offers can be accepted`);return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof t.serverMaxWindowBits==`number`&&(n.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits==`number`?n.client_max_window_bits=t.clientMaxWindowBits:(n.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw Error(`Unexpected parameter "client_no_context_takeover"`);if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits==`number`&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits==`number`&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw Error(`Unexpected or invalid parameter "client_max_window_bits"`);return t}normalizeParams(e){return e.forEach(e=>{Object.keys(e).forEach(t=>{let n=e[t];if(n.length>1)throw Error(`Parameter "${t}" must have only a single value`);if(n=n[0],t===`client_max_window_bits`){if(n!==!0){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else if(t===`server_max_window_bits`){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(t===`client_no_context_takeover`||t===`server_no_context_takeover`){if(n!==!0)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else throw Error(`Unknown parameter "${t}"`);e[t]=n})}),e}decompress(e,t,n){p.add(r=>{this._decompress(e,t,(e,t)=>{r(),n(e,t)})})}compress(e,t,n){p.add(r=>{this._compress(e,t,(e,t)=>{r(),n(e,t)})})}_decompress(e,t,i){let a=this._isServer?`client`:`server`;if(!this._inflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:n.Z_DEFAULT_WINDOWBITS;this._inflate=n.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[c]=this,this._inflate[l]=0,this._inflate[d]=[],this._inflate.on(`error`,g),this._inflate.on(`data`,h)}this._inflate[u]=i,this._inflate.write(e),t&&this._inflate.write(s),this._inflate.flush(()=>{let e=this._inflate[f];if(e){this._inflate.close(),this._inflate=null,i(e);return}let n=r.concat(this._inflate[d],this._inflate[l]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[l]=0,this._inflate[d]=[],t&&this.params[`${a}_no_context_takeover`]&&this._inflate.reset()),i(null,n)})}_compress(e,t,i){let a=this._isServer?`server`:`client`;if(!this._deflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:n.Z_DEFAULT_WINDOWBITS;this._deflate=n.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[l]=0,this._deflate[d]=[],this._deflate.on(`data`,m)}this._deflate[u]=i,this._deflate.write(e),this._deflate.flush(n.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=r.concat(this._deflate[d],this._deflate[l]);t&&(e=new o(e.buffer,e.byteOffset,e.length-4)),this._deflate[u]=null,this._deflate[l]=0,this._deflate[d]=[],t&&this.params[`${a}_no_context_takeover`]&&this._deflate.reset(),i(null,e)})}};function m(e){this[d].push(e),this[l]+=e.length}F(m,`deflateOnData`);function h(e){this[l]+=e.length,this[c]._maxPayload<1||this[l]<=this[c]._maxPayload?this[d].push(e):(this[f]=/* @__PURE__ */ RangeError(`Max payload size exceeded`),this[f].code=`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`,this[f][a]=1009,this.removeListener(`data`,h),this.reset())}F(h,`inflateOnData`);function g(e){this[c]._inflate=null,this[f]?this[u](this[f]):(e[a]=1007,this[u](e))}F(g,`inflateOnError`)}}),ke=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js"(e,t){var{isUtf8:n}=I(`buffer`),{hasBlob:r}=z(),i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function a(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}F(a,`isValidStatusCode`);function o(e){let t=e.length,n=0;for(;n<t;)if(!(e[n]&128))n++;else if((e[n]&224)==192){if(n+1===t||(e[n+1]&192)!=128||(e[n]&254)==192)return!1;n+=2}else if((e[n]&240)==224){if(n+2>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||e[n]===224&&(e[n+1]&224)==128||e[n]===237&&(e[n+1]&224)==160)return!1;n+=3}else if((e[n]&248)==240){if(n+3>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||(e[n+3]&192)!=128||e[n]===240&&(e[n+1]&240)==128||e[n]===244&&e[n+1]>143||e[n]>244)return!1;n+=4}else return!1;return!0}F(o,`_isValidUTF8`);function s(e){return r&&typeof e==`object`&&typeof e.arrayBuffer==`function`&&typeof e.type==`string`&&typeof e.stream==`function`&&(e[Symbol.toStringTag]===`Blob`||e[Symbol.toStringTag]===`File`)}if(F(s,`isBlob`),t.exports={isBlob:s,isValidStatusCode:a,isValidUTF8:o,tokenChars:i},n)t.exports.isValidUTF8=function(e){return e.length<24?o(e):n(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=I(`utf-8-validate`);t.exports.isValidUTF8=function(t){return t.length<32?o(t):e(t)}}catch{}}}),Ae=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/receiver.js"(e,t){var{Writable:n}=I(`stream`),r=B(),{BINARY_TYPES:i,EMPTY_BUFFER:a,kStatusCode:o,kWebSocket:s}=z(),{concat:c,toArrayBuffer:l,unmask:u}=De(),{isValidStatusCode:d,isValidUTF8:f}=ke(),p=Buffer[Symbol.species],m=0,h=1,g=2,_=3,v=4,y=5,b=6;t.exports=class extends n{static{F(this,`Receiver`)}constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents===void 0||e.allowSynchronousEvents,this._binaryType=e.binaryType||i[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[s]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=m}_write(e,t,n){if(this._opcode===8&&this._state==m)return n();this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks?n(this.createError(RangeError,`Too many buffered chunks`,!1,1008,`WS_ERR_TOO_MANY_BUFFERED_PARTS`)):(this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n))}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let t=this._buffers[0];return this._buffers[0]=new p(t.buffer,t.byteOffset+e,t.length-e),new p(t.buffer,t.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=new p(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case m:this.getInfo(e);break;case h:this.getPayloadLength16(e);break;case g:this.getPayloadLength64(e);break;case _:this.getMask();break;case v:this.getData(e);break;case y:case b:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if(t[0]&48){e(this.createError(RangeError,`RSV2 and RSV3 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_2_3`));return}let n=(t[0]&64)==64;if(n&&!this._extensions[r.extensionName])e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));else{if(this._fin=(t[0]&128)==128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(!this._fragmented){e(this.createError(RangeError,`invalid opcode 0`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){e(this.createError(RangeError,`FIN must be set`,!0,1002,`WS_ERR_EXPECTED_FIN`));return}if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,`WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH`));return}}else{e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)==128,this._isServer){if(!this._masked){e(this.createError(RangeError,`MASK must be set`,!0,1002,`WS_ERR_EXPECTED_MASK`));return}}else if(this._masked){e(this.createError(RangeError,`MASK must be clear`,!0,1002,`WS_ERR_UNEXPECTED_MASK`));return}this._payloadLength===126?this._state=h:this._payloadLength===127?this._state=g:this.haveLength(e)}}getPayloadLength16(e){this._bufferedBytes<2?this._loop=!1:(this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e))}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),n=t.readUInt32BE(0);n>2**21-1?e(this.createError(RangeError,`Unsupported WebSocket frame: payload length > 2^53 - 1`,!1,1009,`WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH`)):(this._payloadLength=n*2**32+t.readUInt32BE(4),this.haveLength(e))}haveLength(e){this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)?e(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`)):this._state=this._masked?_:v}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=v)}getData(e){let t=a;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&u(t,this._mask)}if(this._opcode>7)this.controlMessage(t,e);else if(this._compressed)this._state=y,this.decompress(t,e);else{if(t.length){if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){e(this.createError(RangeError,`Too many message fragments`,!1,1008,`WS_ERR_TOO_MANY_BUFFERED_PARTS`));return}this._messageLength=this._totalPayloadLength,this._fragments.push(t)}this.dataMessage(e)}}decompress(e,t){this._extensions[r.extensionName].decompress(e,this._fin,(e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){t(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`));return}if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){t(this.createError(RangeError,`Too many message fragments`,!1,1008,`WS_ERR_TOO_MANY_BUFFERED_PARTS`));return}this._fragments.push(n)}this.dataMessage(t),this._state===m&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=m;return}let t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let r;r=this._binaryType===`nodebuffer`?c(n,t):this._binaryType===`arraybuffer`?l(c(n,t)):this._binaryType===`blob`?new Blob(n):n,this._allowSynchronousEvents?(this.emit(`message`,r,!0),this._state=m):(this._state=b,setImmediate(()=>{this.emit(`message`,r,!0),this._state=m,this.startLoop(e)}))}else{let r=c(n,t);if(!this._skipUTF8Validation&&!f(r)){e(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._state===y||this._allowSynchronousEvents?(this.emit(`message`,r,!1),this._state=m):(this._state=b,setImmediate(()=>{this.emit(`message`,r,!1),this._state=m,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit(`conclude`,1005,a),this.end();else{let n=e.readUInt16BE(0);if(!d(n)){t(this.createError(RangeError,`invalid status code ${n}`,!0,1002,`WS_ERR_INVALID_CLOSE_CODE`));return}let r=new p(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!f(r)){t(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._loop=!1,this.emit(`conclude`,n,r),this.end()}this._state=m}else this._allowSynchronousEvents?(this.emit(this._opcode===9?`ping`:`pong`,e),this._state=m):(this._state=b,setImmediate(()=>{this.emit(this._opcode===9?`ping`:`pong`,e),this._state=m,this.startLoop(t)}))}createError(e,t,n,r,i){this._loop=!1,this._errored=!0;let a=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(a,this.createError),a.code=i,a[o]=r,a}}}}),je=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/sender.js"(e,t){var{Duplex:n}=I(`stream`),{randomFillSync:r}=I(`crypto`),{types:{isUint8Array:i}}=I(`util`),a=B(),{EMPTY_BUFFER:o,kWebSocket:s,NOOP:c}=z(),{isBlob:l,isValidStatusCode:u}=ke(),{mask:d,toBuffer:f}=De(),p=Symbol(`kByteLength`),m=Buffer.alloc(4),h=8192,g,_=h,v=0,y=1,b=2;t.exports=class e{static{F(this,`Sender`)}constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=v,this.onerror=c,this[s]=void 0}static frame(e,t){let n,i=!1,a=2,o=!1;t.mask&&(n=t.maskBuffer||m,t.generateMask?t.generateMask(n):(_===h&&(g===void 0&&(g=Buffer.alloc(h)),r(g,0,h),_=0),n[0]=g[_++],n[1]=g[_++],n[2]=g[_++],n[3]=g[_++]),o=(n[0]|n[1]|n[2]|n[3])===0,a=6);let s;typeof e==`string`?(!t.mask||o)&&t[p]!==void 0?s=t[p]:(e=Buffer.from(e),s=e.length):(s=e.length,i=t.mask&&t.readOnly&&!o);let c=s;s>=65536?(a+=8,c=127):s>125&&(a+=2,c=126);let l=Buffer.allocUnsafe(i?s+a:a);return l[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(l[0]|=64),l[1]=c,c===126?l.writeUInt16BE(s,2):c===127&&(l[2]=l[3]=0,l.writeUIntBE(s,4,6)),!t.mask||(l[1]|=128,l[a-4]=n[0],l[a-3]=n[1],l[a-2]=n[2],l[a-1]=n[3],o)?[l,e]:i?(d(e,n,l,a,s),[l]):(d(e,n,e,0,s),[l,e])}close(t,n,r,a){let s;if(t===void 0)s=o;else if(typeof t!=`number`||!u(t))throw TypeError(`First argument must be a valid error code number`);else if(n===void 0||!n.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(t,0);else{let e=Buffer.byteLength(n);if(e>123)throw RangeError(`The message must not be greater than 123 bytes`);if(s=Buffer.allocUnsafe(2+e),s.writeUInt16BE(t,0),typeof n==`string`)s.write(n,2);else if(i(n))s.set(n,2);else throw TypeError(`Second argument must be a string or a Uint8Array`)}let c={[p]:s.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state===v?this.sendFrame(e.frame(s,c),a):this.enqueue([this.dispatch,s,!1,c,a])}ping(t,n,r){let i,a;if(typeof t==`string`?(i=Buffer.byteLength(t),a=!1):l(t)?(i=t.size,a=!1):(t=f(t),i=t.length,a=f.readOnly),i>125)throw RangeError(`The data size must not be greater than 125 bytes`);let o={[p]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:9,readOnly:a,rsv1:!1};l(t)?this._state===v?this.getBlobData(t,!1,o,r):this.enqueue([this.getBlobData,t,!1,o,r]):this._state===v?this.sendFrame(e.frame(t,o),r):this.enqueue([this.dispatch,t,!1,o,r])}pong(t,n,r){let i,a;if(typeof t==`string`?(i=Buffer.byteLength(t),a=!1):l(t)?(i=t.size,a=!1):(t=f(t),i=t.length,a=f.readOnly),i>125)throw RangeError(`The data size must not be greater than 125 bytes`);let o={[p]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:10,readOnly:a,rsv1:!1};l(t)?this._state===v?this.getBlobData(t,!1,o,r):this.enqueue([this.getBlobData,t,!1,o,r]):this._state===v?this.sendFrame(e.frame(t,o),r):this.enqueue([this.dispatch,t,!1,o,r])}send(e,t,n){let r=this._extensions[a.extensionName],i=t.binary?2:1,o=t.compress,s,c;typeof e==`string`?(s=Buffer.byteLength(e),c=!1):l(e)?(s=e.size,c=!1):(e=f(e),s=e.length,c=f.readOnly),this._firstFragment?(this._firstFragment=!1,o&&r&&r.params[r._isServer?`server_no_context_takeover`:`client_no_context_takeover`]&&(o=s>=r._threshold),this._compress=o):(o=!1,i=0),t.fin&&(this._firstFragment=!0);let u={[p]:s,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:i,readOnly:c,rsv1:o};l(e)?this._state===v?this.getBlobData(e,this._compress,u,n):this.enqueue([this.getBlobData,e,this._compress,u,n]):this._state===v?this.dispatch(e,this._compress,u,n):this.enqueue([this.dispatch,e,this._compress,u,n])}getBlobData(t,n,r,i){this._bufferedBytes+=r[p],this._state=b,t.arrayBuffer().then(t=>{if(this._socket.destroyed){let e=/* @__PURE__ */ Error(`The socket was closed while the blob was being read`);process.nextTick(x,this,e,i);return}this._bufferedBytes-=r[p];let a=f(t);n?this.dispatch(a,n,r,i):(this._state=v,this.sendFrame(e.frame(a,r),i),this.dequeue())}).catch(e=>{process.nextTick(S,this,e,i)})}dispatch(t,n,r,i){if(!n){this.sendFrame(e.frame(t,r),i);return}let o=this._extensions[a.extensionName];this._bufferedBytes+=r[p],this._state=y,o.compress(t,r.fin,(t,n)=>{if(this._socket.destroyed){let e=/* @__PURE__ */ Error(`The socket was closed while data was being compressed`);x(this,e,i)}else this._bufferedBytes-=r[p],this._state=v,r.readOnly=!1,this.sendFrame(e.frame(n,r),i),this.dequeue()})}dequeue(){for(;this._state===v&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][p],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][p],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};function x(e,t,n){typeof n==`function`&&n(t);for(let n=0;n<e._queue.length;n++){let r=e._queue[n],i=r[r.length-1];typeof i==`function`&&i(t)}}F(x,`callCallbacks`);function S(e,t,n){x(e,t,n),e.onerror(t)}F(S,`onError`)}}),Me=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/event-target.js"(e,t){var{kForOnEventAttribute:n,kListener:r}=z(),i=Symbol(`kCode`),a=Symbol(`kData`),o=Symbol(`kError`),s=Symbol(`kMessage`),c=Symbol(`kReason`),l=Symbol(`kTarget`),u=Symbol(`kType`),d=Symbol(`kWasClean`),f=class{static{F(this,`Event`)}constructor(e){this[l]=null,this[u]=e}get target(){return this[l]}get type(){return this[u]}};Object.defineProperty(f.prototype,"target",{enumerable:!0}),Object.defineProperty(f.prototype,"type",{enumerable:!0});var p=class extends f{static{F(this,`CloseEvent`)}constructor(e,t={}){super(e),this[i]=t.code===void 0?0:t.code,this[c]=t.reason===void 0?``:t.reason,this[d]=t.wasClean!==void 0&&t.wasClean}get code(){return this[i]}get reason(){return this[c]}get wasClean(){return this[d]}};Object.defineProperty(p.prototype,"code",{enumerable:!0}),Object.defineProperty(p.prototype,"reason",{enumerable:!0}),Object.defineProperty(p.prototype,"wasClean",{enumerable:!0});var m=class extends f{static{F(this,`ErrorEvent`)}constructor(e,t={}){super(e),this[o]=t.error===void 0?null:t.error,this[s]=t.message===void 0?``:t.message}get error(){return this[o]}get message(){return this[s]}};Object.defineProperty(m.prototype,"error",{enumerable:!0}),Object.defineProperty(m.prototype,"message",{enumerable:!0});var h=class extends f{static{F(this,`MessageEvent`)}constructor(e,t={}){super(e),this[a]=t.data===void 0?null:t.data}get data(){return this[a]}};Object.defineProperty(h.prototype,"data",{enumerable:!0}),t.exports={CloseEvent:p,ErrorEvent:m,Event:f,EventTarget:{addEventListener(e,t,i={}){for(let a of this.listeners(e))if(!i[n]&&a[r]===t&&!a[n])return;let a;if(e===`message`)a=/* @__PURE__ */ F(function(e,n){let r=new h(`message`,{data:n?e:e.toString()});r[l]=this,g(t,this,r)},`onMessage`);else if(e===`close`)a=/* @__PURE__ */ F(function(e,n){let r=new p(`close`,{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[l]=this,g(t,this,r)},`onClose`);else if(e===`error`)a=/* @__PURE__ */ F(function(e){let n=new m(`error`,{error:e,message:e.message});n[l]=this,g(t,this,n)},`onError`);else if(e===`open`)a=/* @__PURE__ */ F(function(){let e=new f(`open`);e[l]=this,g(t,this,e)},`onOpen`);else return;a[n]=!!i[n],a[r]=t,i.once?this.once(e,a):this.on(e,a)},removeEventListener(e,t){for(let i of this.listeners(e))if(i[r]===t&&!i[n]){this.removeListener(e,i);break}}},MessageEvent:h};function g(e,t,n){typeof e==`object`&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}F(g,`callListener`)}}),Ne=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js"(e,t){var{tokenChars:n}=ke();function r(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}F(r,`push`);function i(e){let t=/* @__PURE__ */ Object.create(null),i=/* @__PURE__ */ Object.create(null),a=!1,o=!1,s=!1,c,l,u=-1,d=-1,f=-1,p=0;for(;p<e.length;p++)if(d=e.charCodeAt(p),c===void 0){if(f===-1&&n[d]===1)u===-1&&(u=p);else if(p!==0&&(d===32||d===9))f===-1&&u!==-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p);let n=e.slice(u,f);d===44?(r(t,n,i),i=/* @__PURE__ */ Object.create(null)):c=n,u=f=-1}else throw SyntaxError(`Unexpected character at index ${p}`)}else if(l===void 0){if(f===-1&&n[d]===1)u===-1&&(u=p);else if(d===32||d===9)f===-1&&u!==-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p),r(i,e.slice(u,f),!0),d===44&&(r(t,c,i),i=/* @__PURE__ */ Object.create(null),c=void 0),u=f=-1}else if(d===61&&u!==-1&&f===-1)l=e.slice(u,p),u=f=-1;else throw SyntaxError(`Unexpected character at index ${p}`)}else if(o){if(n[d]!==1)throw SyntaxError(`Unexpected character at index ${p}`);u===-1?u=p:a||=!0,o=!1}else if(s){if(n[d]===1)u===-1&&(u=p);else if(d===34&&u!==-1)s=!1,f=p;else if(d===92)o=!0;else throw SyntaxError(`Unexpected character at index ${p}`)}else if(d===34&&e.charCodeAt(p-1)===61)s=!0;else if(f===-1&&n[d]===1)u===-1&&(u=p);else if(u!==-1&&(d===32||d===9))f===-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p);let n=e.slice(u,f);a&&=(n=n.replace(/\\/g,``),!1),r(i,l,n),d===44&&(r(t,c,i),i=/* @__PURE__ */ Object.create(null),c=void 0),l=void 0,u=f=-1}else throw SyntaxError(`Unexpected character at index ${p}`);if(u===-1||s||d===32||d===9)throw SyntaxError(`Unexpected end of input`);f===-1&&(f=p);let m=e.slice(u,f);return c===void 0?r(t,m,i):(l===void 0?r(i,m,!0):a?r(i,l,m.replace(/\\/g,``)):r(i,l,m),r(t,c,i)),t}F(i,`parse`);function a(e){return Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(e=>[t].concat(Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(e=>e===!0?t:`${t}=${e}`).join(`; `)})).join(`; `)).join(`, `)}).join(`, `)}F(a,`format`),t.exports={format:a,parse:i}}}),Pe=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js"(e,t){var n=I(`events`),r=I(`https`),i=I(`http`),a=I(`net`),o=I(`tls`),{randomBytes:s,createHash:c}=I(`crypto`),{Duplex:l,Readable:u}=I(`stream`),{URL:d}=I(`url`),f=B(),p=Ae(),m=je(),{isBlob:h}=ke(),{BINARY_TYPES:g,CLOSE_TIMEOUT:_,EMPTY_BUFFER:v,GUID:y,kForOnEventAttribute:b,kListener:x,kStatusCode:S,kWebSocket:C,NOOP:ee}=z(),{EventTarget:{addEventListener:te,removeEventListener:ne}}=Me(),{format:re,parse:ie}=Ne(),{toBuffer:ae}=De(),w=Symbol(`kAborted`),oe=[8,13],T=[`CONNECTING`,`OPEN`,`CLOSING`,`CLOSED`],se=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,E=class e extends n{static{F(this,`WebSocket`)}constructor(t,n,r){super(),this._binaryType=g[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=v,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol=``,this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t===null?(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0):(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,n===void 0?n=[]:Array.isArray(n)||(typeof n==`object`&&n?(r=n,n=[]):n=[n]),ce(this,t,n,r))}get binaryType(){return this._binaryType}set binaryType(e){g.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}
2
+ import{O as e,U as t,X as n,Y as r,_ as i,g as a,rt as o,tt as s,v as c}from"./dist-D5qkmHhC.mjs";import{M as l,N as u,d,g as f,k as p,v as m}from"./chunk-AAQI36FL-e6E5HW1g.mjs";import{t as h}from"./version-Zr2oF8mY.mjs";import{t as g}from"./log-BWdaOGOW.mjs";import{n as _,r as v,t as y}from"./dialog-D5lus4M4.mjs";import{S as b,T as x,b as S,c as C,f as ee,g as te,h as ne,i as re,o as ie,p as ae,u as w,w as oe,x as T}from"./interactive-CKHdGvkh.mjs";import{createRequire as se}from"node:module";import{setTimeout as E}from"node:timers/promises";import{existsSync as ce,readFileSync as D}from"node:fs";import O,{join as le}from"node:path";import k from"node:process";import{release as A}from"node:os";import ue from"node:assert";import{createServer as de}from"node:net";import{once as fe}from"node:events";import j,{createHash as pe,randomUUID as me}from"node:crypto";import{execFile as he,execFileSync as ge,spawn as M}from"node:child_process";import{cleanBuildOutputDir as _e,normalizeDirectoryName as ve,writeContainerConfig as N}from"@cloudflare/build-output-utils";function ye(e,t=k.stderr){t.isTTY&&(e?t.write(`\x1B[?25h`):t.write(`\x1B[?25l`))}const P=se(import.meta.url||(typeof __filename==`string`?__filename:`/`));var be=Object.create,xe=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,Ce=Object.getOwnPropertyNames,we=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty,F=(e,t)=>xe(e,`name`,{value:t,configurable:!0}),I=/* @__PURE__ */ (e=>P===void 0?typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(P===void 0?e:P)[t]}):e:P)(function(e){if(P!==void 0)return P.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)}),L=(e,t)=>function(){return t||(0,e[Ce(e)[0]])((t={exports:{}}).exports,t),t.exports},Ee=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of Ce(t))!Te.call(e,i)&&i!==n&&xe(e,i,{get:()=>t[i],enumerable:!(r=Se(t,i))||r.enumerable});return e},R=(e,t,n)=>(n=e==null?{}:be(we(e)),Ee(xe(n,`default`,{value:e,enumerable:!0}),e)),z=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js"(e,t){var n=[`nodebuffer`,`arraybuffer`,`fragments`],r=typeof Blob<`u`;r&&n.push(`blob`),t.exports={BINARY_TYPES:n,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:`258EAFA5-E914-47DA-95CA-C5AB0DC85B11`,hasBlob:r,kForOnEventAttribute:Symbol(`kIsForOnEventAttribute`),kListener:Symbol(`kListener`),kStatusCode:Symbol(`status-code`),kWebSocket:Symbol(`websocket`),NOOP:/* @__PURE__ */ F(()=>{},`NOOP`)}}}),De=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js"(e,t){var{EMPTY_BUFFER:n}=z(),r=Buffer[Symbol.species];function i(e,t){if(e.length===0)return n;if(e.length===1)return e[0];let i=Buffer.allocUnsafe(t),a=0;for(let t=0;t<e.length;t++){let n=e[t];i.set(n,a),a+=n.length}return a<t?new r(i.buffer,i.byteOffset,a):i}F(i,`concat`);function a(e,t,n,r,i){for(let a=0;a<i;a++)n[r+a]=e[a]^t[a&3]}F(a,`_mask`);function o(e,t){for(let n=0;n<e.length;n++)e[n]^=t[n&3]}F(o,`_unmask`);function s(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}F(s,`toArrayBuffer`);function c(e){if(c.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=new r(e):ArrayBuffer.isView(e)?t=new r(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),c.readOnly=!1),t}if(F(c,`toBuffer`),t.exports={concat:i,mask:a,toArrayBuffer:s,toBuffer:c,unmask:o},!process.env.WS_NO_BUFFER_UTIL)try{let e=I(`bufferutil`);t.exports.mask=function(t,n,r,i,o){o<48?a(t,n,r,i,o):e.mask(t,n,r,i,o)},t.exports.unmask=function(t,n){t.length<32?o(t,n):e.unmask(t,n)}}catch{}}}),Oe=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/limiter.js"(e,t){var n=Symbol(`kDone`),r=Symbol(`kRun`);t.exports=class{static{F(this,`Limiter`)}constructor(e){this[n]=()=>{this.pending--,this[r]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[r]()}[r](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[n])}}}}}),B=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js"(e,t){var n=I(`zlib`),r=De(),i=Oe(),{kStatusCode:a}=z(),o=Buffer[Symbol.species],s=Buffer.from([0,0,255,255]),c=Symbol(`permessage-deflate`),l=Symbol(`total-length`),u=Symbol(`callback`),d=Symbol(`buffers`),f=Symbol(`error`),p;t.exports=class{static{F(this,`PerMessageDeflate`)}constructor(e){this._options=e||{},this._threshold=this._options.threshold===void 0?1024:this._options.threshold,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,p||=new i(this._options.concurrencyLimit===void 0?10:this._options.concurrencyLimit)}static get extensionName(){return`permessage-deflate`}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits??(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&=(this._inflate.close(),null),this._deflate){let e=this._deflate[u];this._deflate.close(),this._deflate=null,e&&e(/* @__PURE__ */ Error(`The deflate stream was closed while data was being processed`))}}acceptAsServer(e){let t=this._options,n=e.find(e=>!(t.serverNoContextTakeover===!1&&e.server_no_context_takeover||e.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits==`number`&&t.serverMaxWindowBits>e.server_max_window_bits)||typeof t.clientMaxWindowBits==`number`&&!e.client_max_window_bits));if(!n)throw Error(`None of the extension offers can be accepted`);return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof t.serverMaxWindowBits==`number`&&(n.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits==`number`?n.client_max_window_bits=t.clientMaxWindowBits:(n.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw Error(`Unexpected parameter "client_no_context_takeover"`);if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits==`number`&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits==`number`&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw Error(`Unexpected or invalid parameter "client_max_window_bits"`);return t}normalizeParams(e){return e.forEach(e=>{Object.keys(e).forEach(t=>{let n=e[t];if(n.length>1)throw Error(`Parameter "${t}" must have only a single value`);if(n=n[0],t===`client_max_window_bits`){if(n!==!0){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else if(t===`server_max_window_bits`){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(t===`client_no_context_takeover`||t===`server_no_context_takeover`){if(n!==!0)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else throw Error(`Unknown parameter "${t}"`);e[t]=n})}),e}decompress(e,t,n){p.add(r=>{this._decompress(e,t,(e,t)=>{r(),n(e,t)})})}compress(e,t,n){p.add(r=>{this._compress(e,t,(e,t)=>{r(),n(e,t)})})}_decompress(e,t,i){let a=this._isServer?`client`:`server`;if(!this._inflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:n.Z_DEFAULT_WINDOWBITS;this._inflate=n.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[c]=this,this._inflate[l]=0,this._inflate[d]=[],this._inflate.on(`error`,g),this._inflate.on(`data`,h)}this._inflate[u]=i,this._inflate.write(e),t&&this._inflate.write(s),this._inflate.flush(()=>{let e=this._inflate[f];if(e){this._inflate.close(),this._inflate=null,i(e);return}let n=r.concat(this._inflate[d],this._inflate[l]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[l]=0,this._inflate[d]=[],t&&this.params[`${a}_no_context_takeover`]&&this._inflate.reset()),i(null,n)})}_compress(e,t,i){let a=this._isServer?`server`:`client`;if(!this._deflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:n.Z_DEFAULT_WINDOWBITS;this._deflate=n.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[l]=0,this._deflate[d]=[],this._deflate.on(`data`,m)}this._deflate[u]=i,this._deflate.write(e),this._deflate.flush(n.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=r.concat(this._deflate[d],this._deflate[l]);t&&(e=new o(e.buffer,e.byteOffset,e.length-4)),this._deflate[u]=null,this._deflate[l]=0,this._deflate[d]=[],t&&this.params[`${a}_no_context_takeover`]&&this._deflate.reset(),i(null,e)})}};function m(e){this[d].push(e),this[l]+=e.length}F(m,`deflateOnData`);function h(e){this[l]+=e.length,this[c]._maxPayload<1||this[l]<=this[c]._maxPayload?this[d].push(e):(this[f]=/* @__PURE__ */ RangeError(`Max payload size exceeded`),this[f].code=`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`,this[f][a]=1009,this.removeListener(`data`,h),this.reset())}F(h,`inflateOnData`);function g(e){this[c]._inflate=null,this[f]?this[u](this[f]):(e[a]=1007,this[u](e))}F(g,`inflateOnError`)}}),ke=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js"(e,t){var{isUtf8:n}=I(`buffer`),{hasBlob:r}=z(),i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function a(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}F(a,`isValidStatusCode`);function o(e){let t=e.length,n=0;for(;n<t;)if(!(e[n]&128))n++;else if((e[n]&224)==192){if(n+1===t||(e[n+1]&192)!=128||(e[n]&254)==192)return!1;n+=2}else if((e[n]&240)==224){if(n+2>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||e[n]===224&&(e[n+1]&224)==128||e[n]===237&&(e[n+1]&224)==160)return!1;n+=3}else if((e[n]&248)==240){if(n+3>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||(e[n+3]&192)!=128||e[n]===240&&(e[n+1]&240)==128||e[n]===244&&e[n+1]>143||e[n]>244)return!1;n+=4}else return!1;return!0}F(o,`_isValidUTF8`);function s(e){return r&&typeof e==`object`&&typeof e.arrayBuffer==`function`&&typeof e.type==`string`&&typeof e.stream==`function`&&(e[Symbol.toStringTag]===`Blob`||e[Symbol.toStringTag]===`File`)}if(F(s,`isBlob`),t.exports={isBlob:s,isValidStatusCode:a,isValidUTF8:o,tokenChars:i},n)t.exports.isValidUTF8=function(e){return e.length<24?o(e):n(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=I(`utf-8-validate`);t.exports.isValidUTF8=function(t){return t.length<32?o(t):e(t)}}catch{}}}),Ae=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/receiver.js"(e,t){var{Writable:n}=I(`stream`),r=B(),{BINARY_TYPES:i,EMPTY_BUFFER:a,kStatusCode:o,kWebSocket:s}=z(),{concat:c,toArrayBuffer:l,unmask:u}=De(),{isValidStatusCode:d,isValidUTF8:f}=ke(),p=Buffer[Symbol.species],m=0,h=1,g=2,_=3,v=4,y=5,b=6;t.exports=class extends n{static{F(this,`Receiver`)}constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents===void 0||e.allowSynchronousEvents,this._binaryType=e.binaryType||i[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[s]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=m}_write(e,t,n){if(this._opcode===8&&this._state==m)return n();this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks?n(this.createError(RangeError,`Too many buffered chunks`,!1,1008,`WS_ERR_TOO_MANY_BUFFERED_PARTS`)):(this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n))}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let t=this._buffers[0];return this._buffers[0]=new p(t.buffer,t.byteOffset+e,t.length-e),new p(t.buffer,t.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=new p(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case m:this.getInfo(e);break;case h:this.getPayloadLength16(e);break;case g:this.getPayloadLength64(e);break;case _:this.getMask();break;case v:this.getData(e);break;case y:case b:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if(t[0]&48){e(this.createError(RangeError,`RSV2 and RSV3 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_2_3`));return}let n=(t[0]&64)==64;if(n&&!this._extensions[r.extensionName])e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));else{if(this._fin=(t[0]&128)==128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(!this._fragmented){e(this.createError(RangeError,`invalid opcode 0`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){e(this.createError(RangeError,`FIN must be set`,!0,1002,`WS_ERR_EXPECTED_FIN`));return}if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,`WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH`));return}}else{e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)==128,this._isServer){if(!this._masked){e(this.createError(RangeError,`MASK must be set`,!0,1002,`WS_ERR_EXPECTED_MASK`));return}}else if(this._masked){e(this.createError(RangeError,`MASK must be clear`,!0,1002,`WS_ERR_UNEXPECTED_MASK`));return}this._payloadLength===126?this._state=h:this._payloadLength===127?this._state=g:this.haveLength(e)}}getPayloadLength16(e){this._bufferedBytes<2?this._loop=!1:(this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e))}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),n=t.readUInt32BE(0);n>2**21-1?e(this.createError(RangeError,`Unsupported WebSocket frame: payload length > 2^53 - 1`,!1,1009,`WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH`)):(this._payloadLength=n*2**32+t.readUInt32BE(4),this.haveLength(e))}haveLength(e){this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)?e(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`)):this._state=this._masked?_:v}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=v)}getData(e){let t=a;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&u(t,this._mask)}if(this._opcode>7)this.controlMessage(t,e);else if(this._compressed)this._state=y,this.decompress(t,e);else{if(t.length){if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){e(this.createError(RangeError,`Too many message fragments`,!1,1008,`WS_ERR_TOO_MANY_BUFFERED_PARTS`));return}this._messageLength=this._totalPayloadLength,this._fragments.push(t)}this.dataMessage(e)}}decompress(e,t){this._extensions[r.extensionName].decompress(e,this._fin,(e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){t(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`));return}if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){t(this.createError(RangeError,`Too many message fragments`,!1,1008,`WS_ERR_TOO_MANY_BUFFERED_PARTS`));return}this._fragments.push(n)}this.dataMessage(t),this._state===m&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=m;return}let t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let r;r=this._binaryType===`nodebuffer`?c(n,t):this._binaryType===`arraybuffer`?l(c(n,t)):this._binaryType===`blob`?new Blob(n):n,this._allowSynchronousEvents?(this.emit(`message`,r,!0),this._state=m):(this._state=b,setImmediate(()=>{this.emit(`message`,r,!0),this._state=m,this.startLoop(e)}))}else{let r=c(n,t);if(!this._skipUTF8Validation&&!f(r)){e(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._state===y||this._allowSynchronousEvents?(this.emit(`message`,r,!1),this._state=m):(this._state=b,setImmediate(()=>{this.emit(`message`,r,!1),this._state=m,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit(`conclude`,1005,a),this.end();else{let n=e.readUInt16BE(0);if(!d(n)){t(this.createError(RangeError,`invalid status code ${n}`,!0,1002,`WS_ERR_INVALID_CLOSE_CODE`));return}let r=new p(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!f(r)){t(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._loop=!1,this.emit(`conclude`,n,r),this.end()}this._state=m}else this._allowSynchronousEvents?(this.emit(this._opcode===9?`ping`:`pong`,e),this._state=m):(this._state=b,setImmediate(()=>{this.emit(this._opcode===9?`ping`:`pong`,e),this._state=m,this.startLoop(t)}))}createError(e,t,n,r,i){this._loop=!1,this._errored=!0;let a=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(a,this.createError),a.code=i,a[o]=r,a}}}}),je=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/sender.js"(e,t){var{Duplex:n}=I(`stream`),{randomFillSync:r}=I(`crypto`),{types:{isUint8Array:i}}=I(`util`),a=B(),{EMPTY_BUFFER:o,kWebSocket:s,NOOP:c}=z(),{isBlob:l,isValidStatusCode:u}=ke(),{mask:d,toBuffer:f}=De(),p=Symbol(`kByteLength`),m=Buffer.alloc(4),h=8192,g,_=h,v=0,y=1,b=2;t.exports=class e{static{F(this,`Sender`)}constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=v,this.onerror=c,this[s]=void 0}static frame(e,t){let n,i=!1,a=2,o=!1;t.mask&&(n=t.maskBuffer||m,t.generateMask?t.generateMask(n):(_===h&&(g===void 0&&(g=Buffer.alloc(h)),r(g,0,h),_=0),n[0]=g[_++],n[1]=g[_++],n[2]=g[_++],n[3]=g[_++]),o=(n[0]|n[1]|n[2]|n[3])===0,a=6);let s;typeof e==`string`?(!t.mask||o)&&t[p]!==void 0?s=t[p]:(e=Buffer.from(e),s=e.length):(s=e.length,i=t.mask&&t.readOnly&&!o);let c=s;s>=65536?(a+=8,c=127):s>125&&(a+=2,c=126);let l=Buffer.allocUnsafe(i?s+a:a);return l[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(l[0]|=64),l[1]=c,c===126?l.writeUInt16BE(s,2):c===127&&(l[2]=l[3]=0,l.writeUIntBE(s,4,6)),!t.mask||(l[1]|=128,l[a-4]=n[0],l[a-3]=n[1],l[a-2]=n[2],l[a-1]=n[3],o)?[l,e]:i?(d(e,n,l,a,s),[l]):(d(e,n,e,0,s),[l,e])}close(t,n,r,a){let s;if(t===void 0)s=o;else if(typeof t!=`number`||!u(t))throw TypeError(`First argument must be a valid error code number`);else if(n===void 0||!n.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(t,0);else{let e=Buffer.byteLength(n);if(e>123)throw RangeError(`The message must not be greater than 123 bytes`);if(s=Buffer.allocUnsafe(2+e),s.writeUInt16BE(t,0),typeof n==`string`)s.write(n,2);else if(i(n))s.set(n,2);else throw TypeError(`Second argument must be a string or a Uint8Array`)}let c={[p]:s.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state===v?this.sendFrame(e.frame(s,c),a):this.enqueue([this.dispatch,s,!1,c,a])}ping(t,n,r){let i,a;if(typeof t==`string`?(i=Buffer.byteLength(t),a=!1):l(t)?(i=t.size,a=!1):(t=f(t),i=t.length,a=f.readOnly),i>125)throw RangeError(`The data size must not be greater than 125 bytes`);let o={[p]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:9,readOnly:a,rsv1:!1};l(t)?this._state===v?this.getBlobData(t,!1,o,r):this.enqueue([this.getBlobData,t,!1,o,r]):this._state===v?this.sendFrame(e.frame(t,o),r):this.enqueue([this.dispatch,t,!1,o,r])}pong(t,n,r){let i,a;if(typeof t==`string`?(i=Buffer.byteLength(t),a=!1):l(t)?(i=t.size,a=!1):(t=f(t),i=t.length,a=f.readOnly),i>125)throw RangeError(`The data size must not be greater than 125 bytes`);let o={[p]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:10,readOnly:a,rsv1:!1};l(t)?this._state===v?this.getBlobData(t,!1,o,r):this.enqueue([this.getBlobData,t,!1,o,r]):this._state===v?this.sendFrame(e.frame(t,o),r):this.enqueue([this.dispatch,t,!1,o,r])}send(e,t,n){let r=this._extensions[a.extensionName],i=t.binary?2:1,o=t.compress,s,c;typeof e==`string`?(s=Buffer.byteLength(e),c=!1):l(e)?(s=e.size,c=!1):(e=f(e),s=e.length,c=f.readOnly),this._firstFragment?(this._firstFragment=!1,o&&r&&r.params[r._isServer?`server_no_context_takeover`:`client_no_context_takeover`]&&(o=s>=r._threshold),this._compress=o):(o=!1,i=0),t.fin&&(this._firstFragment=!0);let u={[p]:s,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:i,readOnly:c,rsv1:o};l(e)?this._state===v?this.getBlobData(e,this._compress,u,n):this.enqueue([this.getBlobData,e,this._compress,u,n]):this._state===v?this.dispatch(e,this._compress,u,n):this.enqueue([this.dispatch,e,this._compress,u,n])}getBlobData(t,n,r,i){this._bufferedBytes+=r[p],this._state=b,t.arrayBuffer().then(t=>{if(this._socket.destroyed){let e=/* @__PURE__ */ Error(`The socket was closed while the blob was being read`);process.nextTick(x,this,e,i);return}this._bufferedBytes-=r[p];let a=f(t);n?this.dispatch(a,n,r,i):(this._state=v,this.sendFrame(e.frame(a,r),i),this.dequeue())}).catch(e=>{process.nextTick(S,this,e,i)})}dispatch(t,n,r,i){if(!n){this.sendFrame(e.frame(t,r),i);return}let o=this._extensions[a.extensionName];this._bufferedBytes+=r[p],this._state=y,o.compress(t,r.fin,(t,n)=>{if(this._socket.destroyed){let e=/* @__PURE__ */ Error(`The socket was closed while data was being compressed`);x(this,e,i)}else this._bufferedBytes-=r[p],this._state=v,r.readOnly=!1,this.sendFrame(e.frame(n,r),i),this.dequeue()})}dequeue(){for(;this._state===v&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][p],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][p],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};function x(e,t,n){typeof n==`function`&&n(t);for(let n=0;n<e._queue.length;n++){let r=e._queue[n],i=r[r.length-1];typeof i==`function`&&i(t)}}F(x,`callCallbacks`);function S(e,t,n){x(e,t,n),e.onerror(t)}F(S,`onError`)}}),Me=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/event-target.js"(e,t){var{kForOnEventAttribute:n,kListener:r}=z(),i=Symbol(`kCode`),a=Symbol(`kData`),o=Symbol(`kError`),s=Symbol(`kMessage`),c=Symbol(`kReason`),l=Symbol(`kTarget`),u=Symbol(`kType`),d=Symbol(`kWasClean`),f=class{static{F(this,`Event`)}constructor(e){this[l]=null,this[u]=e}get target(){return this[l]}get type(){return this[u]}};Object.defineProperty(f.prototype,"target",{enumerable:!0}),Object.defineProperty(f.prototype,"type",{enumerable:!0});var p=class extends f{static{F(this,`CloseEvent`)}constructor(e,t={}){super(e),this[i]=t.code===void 0?0:t.code,this[c]=t.reason===void 0?``:t.reason,this[d]=t.wasClean!==void 0&&t.wasClean}get code(){return this[i]}get reason(){return this[c]}get wasClean(){return this[d]}};Object.defineProperty(p.prototype,"code",{enumerable:!0}),Object.defineProperty(p.prototype,"reason",{enumerable:!0}),Object.defineProperty(p.prototype,"wasClean",{enumerable:!0});var m=class extends f{static{F(this,`ErrorEvent`)}constructor(e,t={}){super(e),this[o]=t.error===void 0?null:t.error,this[s]=t.message===void 0?``:t.message}get error(){return this[o]}get message(){return this[s]}};Object.defineProperty(m.prototype,"error",{enumerable:!0}),Object.defineProperty(m.prototype,"message",{enumerable:!0});var h=class extends f{static{F(this,`MessageEvent`)}constructor(e,t={}){super(e),this[a]=t.data===void 0?null:t.data}get data(){return this[a]}};Object.defineProperty(h.prototype,"data",{enumerable:!0}),t.exports={CloseEvent:p,ErrorEvent:m,Event:f,EventTarget:{addEventListener(e,t,i={}){for(let a of this.listeners(e))if(!i[n]&&a[r]===t&&!a[n])return;let a;if(e===`message`)a=/* @__PURE__ */ F(function(e,n){let r=new h(`message`,{data:n?e:e.toString()});r[l]=this,g(t,this,r)},`onMessage`);else if(e===`close`)a=/* @__PURE__ */ F(function(e,n){let r=new p(`close`,{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[l]=this,g(t,this,r)},`onClose`);else if(e===`error`)a=/* @__PURE__ */ F(function(e){let n=new m(`error`,{error:e,message:e.message});n[l]=this,g(t,this,n)},`onError`);else if(e===`open`)a=/* @__PURE__ */ F(function(){let e=new f(`open`);e[l]=this,g(t,this,e)},`onOpen`);else return;a[n]=!!i[n],a[r]=t,i.once?this.once(e,a):this.on(e,a)},removeEventListener(e,t){for(let i of this.listeners(e))if(i[r]===t&&!i[n]){this.removeListener(e,i);break}}},MessageEvent:h};function g(e,t,n){typeof e==`object`&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}F(g,`callListener`)}}),Ne=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js"(e,t){var{tokenChars:n}=ke();function r(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}F(r,`push`);function i(e){let t=/* @__PURE__ */ Object.create(null),i=/* @__PURE__ */ Object.create(null),a=!1,o=!1,s=!1,c,l,u=-1,d=-1,f=-1,p=0;for(;p<e.length;p++)if(d=e.charCodeAt(p),c===void 0){if(f===-1&&n[d]===1)u===-1&&(u=p);else if(p!==0&&(d===32||d===9))f===-1&&u!==-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p);let n=e.slice(u,f);d===44?(r(t,n,i),i=/* @__PURE__ */ Object.create(null)):c=n,u=f=-1}else throw SyntaxError(`Unexpected character at index ${p}`)}else if(l===void 0){if(f===-1&&n[d]===1)u===-1&&(u=p);else if(d===32||d===9)f===-1&&u!==-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p),r(i,e.slice(u,f),!0),d===44&&(r(t,c,i),i=/* @__PURE__ */ Object.create(null),c=void 0),u=f=-1}else if(d===61&&u!==-1&&f===-1)l=e.slice(u,p),u=f=-1;else throw SyntaxError(`Unexpected character at index ${p}`)}else if(o){if(n[d]!==1)throw SyntaxError(`Unexpected character at index ${p}`);u===-1?u=p:a||=!0,o=!1}else if(s){if(n[d]===1)u===-1&&(u=p);else if(d===34&&u!==-1)s=!1,f=p;else if(d===92)o=!0;else throw SyntaxError(`Unexpected character at index ${p}`)}else if(d===34&&e.charCodeAt(p-1)===61)s=!0;else if(f===-1&&n[d]===1)u===-1&&(u=p);else if(u!==-1&&(d===32||d===9))f===-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p);let n=e.slice(u,f);a&&=(n=n.replace(/\\/g,``),!1),r(i,l,n),d===44&&(r(t,c,i),i=/* @__PURE__ */ Object.create(null),c=void 0),l=void 0,u=f=-1}else throw SyntaxError(`Unexpected character at index ${p}`);if(u===-1||s||d===32||d===9)throw SyntaxError(`Unexpected end of input`);f===-1&&(f=p);let m=e.slice(u,f);return c===void 0?r(t,m,i):(l===void 0?r(i,m,!0):a?r(i,l,m.replace(/\\/g,``)):r(i,l,m),r(t,c,i)),t}F(i,`parse`);function a(e){return Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(e=>[t].concat(Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(e=>e===!0?t:`${t}=${e}`).join(`; `)})).join(`; `)).join(`, `)}).join(`, `)}F(a,`format`),t.exports={format:a,parse:i}}}),Pe=L({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js"(e,t){var n=I(`events`),r=I(`https`),i=I(`http`),a=I(`net`),o=I(`tls`),{randomBytes:s,createHash:c}=I(`crypto`),{Duplex:l,Readable:u}=I(`stream`),{URL:d}=I(`url`),f=B(),p=Ae(),m=je(),{isBlob:h}=ke(),{BINARY_TYPES:g,CLOSE_TIMEOUT:_,EMPTY_BUFFER:v,GUID:y,kForOnEventAttribute:b,kListener:x,kStatusCode:S,kWebSocket:C,NOOP:ee}=z(),{EventTarget:{addEventListener:te,removeEventListener:ne}}=Me(),{format:re,parse:ie}=Ne(),{toBuffer:ae}=De(),w=Symbol(`kAborted`),oe=[8,13],T=[`CONNECTING`,`OPEN`,`CLOSING`,`CLOSED`],se=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,E=class e extends n{static{F(this,`WebSocket`)}constructor(t,n,r){super(),this._binaryType=g[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=v,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol=``,this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t===null?(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0):(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,n===void 0?n=[]:Array.isArray(n)||(typeof n==`object`&&n?(r=n,n=[]):n=[n]),ce(this,t,n,r))}get binaryType(){return this._binaryType}set binaryType(e){g.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}
3
3
  /* istanbul ignore next */
4
4
  get onclose(){return null}
5
5
  /* istanbul ignore next */
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{c as e}from"./build-Dwd1_7o0.mjs";import{existsSync as t,readFileSync as n,statSync as r}from"node:fs";import{dirname as i,join as a,sep as o}from"node:path";const s={esm:`esm`,cjs:`commonjs`,python:`python`,"python-requirement":`python-requirement`,wasm:`compiled-wasm`,text:`text`,data:`buffer`,json:`text`};function c(e,t,n,r,a){let o=process.cwd(),s=t.main??``;return{entry:{file:s,projectRoot:o,configPath:e.configPath,format:`modules`,moduleRoot:s?i(s):e.bundleDir??``,exports:[]},name:e.config.name,compatibilityDate:t.compatibility_date,compatibilityFlags:t.compatibility_flags??[],assetsDir:p(e,t),main:t.main??void 0,keepVars:t.keep_vars??!1,dryRun:r[`dry-run`],env:void 0,outfile:void 0,tag:r.tag,message:r.message,secretsFile:r[`secrets-file`],experimentalAutoCreate:!0,accountId:n,sendMetrics:!1,resourcesProvision:!0,skipProvisioningConfigWriteback:!0,skipLastDeployedFromApiCheck:!1,containers:a,cliVars:{},isWorkersSite:!1,useServiceEnvApiPath:!1}}function l(e,t,n,r,i){return{...c(e,t,n,r,i),command:`deploy`,resourcesProvision:r.provision??!0,containersRollout:r[`containers-rollout`],triggers:t.triggers?.crons,routes:f(t),logpush:t.logpush,dispatchNamespace:r[`dispatch-namespace`],strict:!0,legacyAssetPaths:void 0,oldAssetTtl:void 0}}function u(e,t,n,r,i){return{...c(e,t,n,r,i),command:`versions upload`,strict:!0,previewAlias:r[`preview-alias`]}}function d(e,t,n,r){return{config:t,accountId:n,scriptName:t.name??e.config.name,crons:t.triggers?.crons,routes:f(t),firstDeploy:!1,dryRun:r[`dry-run`],validated:!1}}function f(e){return e.routes?e.routes:e.route?[e.route]:[]}function p(t,n){let r=t.assetsDir;if(!r)return;let i=!!n.main,a=n.assets?.run_worker_first;if(!i&&a)throw new e(`assets.run_worker_first requires a Worker entrypoint, but no main module is configured.`);return{directory:r,binding:n.assets?.binding,directoryExists:!0}}function m(i,o){if(!o.manifest||!i.bundleDir)return{modules:[],sourceMaps:void 0,dependencies:{},resolvedEntryPointPath:``,bundleType:`esm`,content:``};let{mainModule:c,modules:l}=o.manifest;h(c,i.bundleDir);let u=a(i.bundleDir,c);if(!t(u))throw new e(`Main module not found: ${u}`);let d=l?.[c]?.type??`esm`;if(d===`sourcemap`)throw new e(`Main module "${c}" cannot be a sourcemap.`);let f=n(u,`utf8`),p=s[d],m=[],g=[],_={};if(_[u]={bytesInOutput:r(u).size},l)for(let[o,u]of Object.entries(l)){if(o===c)continue;h(o,i.bundleDir);let l=a(i.bundleDir,o);if(u.type===`sourcemap`){if(!t(l))throw new e(`Module not found: ${l}`);g.push({name:o,content:n(l,`utf8`)});continue}if(!t(l))throw new e(`Module not found: ${l}`);let d=u.type===`wasm`||u.type===`data`?n(l):n(l,`utf8`);m.push({name:o,filePath:l,content:d,type:s[u.type]}),_[l]={bytesInOutput:r(l).size}}return{modules:m,sourceMaps:g.length>0?g:void 0,dependencies:_,resolvedEntryPointPath:u,bundleType:p,content:f}}function h(t,n){let r=a(n,t);if(r!==n&&!r.startsWith(n+o))throw new e(`Module path "${t}" escapes the bundle directory.`)}export{u as i,l as n,d as r,m as t};
2
+ import{c as e}from"./build-DO_GNhRl.mjs";import{existsSync as t,readFileSync as n,statSync as r}from"node:fs";import{dirname as i,join as a,sep as o}from"node:path";const s={esm:`esm`,cjs:`commonjs`,python:`python`,"python-requirement":`python-requirement`,wasm:`compiled-wasm`,text:`text`,data:`buffer`,json:`text`};function c(e,t,n,r,a){let o=process.cwd(),s=t.main??``;return{entry:{file:s,projectRoot:o,configPath:e.configPath,format:`modules`,moduleRoot:s?i(s):e.bundleDir??``,exports:[]},name:e.config.name,compatibilityDate:t.compatibility_date,compatibilityFlags:t.compatibility_flags??[],assetsDir:p(e,t),main:t.main??void 0,keepVars:t.keep_vars??!1,dryRun:r[`dry-run`],env:void 0,outfile:void 0,tag:r.tag,message:r.message,secretsFile:r[`secrets-file`],experimentalAutoCreate:!0,accountId:n,sendMetrics:!1,resourcesProvision:!0,skipProvisioningConfigWriteback:!0,skipLastDeployedFromApiCheck:!1,containers:a,cliVars:{},isWorkersSite:!1,useServiceEnvApiPath:!1}}function l(e,t,n,r,i){return{...c(e,t,n,r,i),command:`deploy`,resourcesProvision:r.provision??!0,containersRollout:r[`containers-rollout`],triggers:t.triggers?.crons,routes:f(t),logpush:t.logpush,dispatchNamespace:r[`dispatch-namespace`],strict:!0,legacyAssetPaths:void 0,oldAssetTtl:void 0}}function u(e,t,n,r,i){return{...c(e,t,n,r,i),command:`versions upload`,strict:!0,previewAlias:r[`preview-alias`]}}function d(e,t,n,r){return{config:t,accountId:n,scriptName:t.name??e.config.name,crons:t.triggers?.crons,routes:f(t),firstDeploy:!1,dryRun:r[`dry-run`],validated:!1}}function f(e){return e.routes?e.routes:e.route?[e.route]:[]}function p(t,n){let r=t.assetsDir;if(!r)return;let i=!!n.main,a=n.assets?.run_worker_first;if(!i&&a)throw new e(`assets.run_worker_first requires a Worker entrypoint, but no main module is configured.`);return{directory:r,binding:n.assets?.binding,directoryExists:!0}}function m(i,o){if(!o.manifest||!i.bundleDir)return{modules:[],sourceMaps:void 0,dependencies:{},resolvedEntryPointPath:``,bundleType:`esm`,content:``};let{mainModule:c,modules:l}=o.manifest;h(c,i.bundleDir);let u=a(i.bundleDir,c);if(!t(u))throw new e(`Main module not found: ${u}`);let d=l?.[c]?.type??`esm`;if(d===`sourcemap`)throw new e(`Main module "${c}" cannot be a sourcemap.`);let f=n(u,`utf8`),p=s[d],m=[],g=[],_={};if(_[u]={bytesInOutput:r(u).size},l)for(let[o,u]of Object.entries(l)){if(o===c)continue;h(o,i.bundleDir);let l=a(i.bundleDir,o);if(u.type===`sourcemap`){if(!t(l))throw new e(`Module not found: ${l}`);g.push({name:o,content:n(l,`utf8`)});continue}if(!t(l))throw new e(`Module not found: ${l}`);let d=u.type===`wasm`||u.type===`data`?n(l):n(l,`utf8`);m.push({name:o,filePath:l,content:d,type:s[u.type]}),_[l]={bytesInOutput:r(l).size}}return{modules:m,sourceMaps:g.length>0?g:void 0,dependencies:_,resolvedEntryPointPath:u,bundleType:p,content:f}}function h(t,n){let r=a(n,t);if(r!==n&&!r.startsWith(n+o))throw new e(`Module path "${t}" escapes the bundle directory.`)}export{u as i,l as n,d as r,m as t};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{i as n,r}from"./autoconfig-ldsgXxa6.mjs";import"./ui-BUCBQ3Sq.mjs";import{n as i,t as a}from"./spawn-C3hzWVrJ.mjs";const o={command:`dev [implArgs..]`,describe:`Run the project's Cloudflare dev server`,builder:t=>t.positional(`implArgs`,{type:`string`,array:!0,describe:`Arguments forwarded to the dev-server implementation`}).parserConfiguration({"unknown-options-as-args":!0,"camel-case-expansion":!1}).epilogue(`cf dev starts the appropriate development server for your project. It runs your framework's dev command when available, falling back to an installed Cloudflare dev server.
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{i as n,r}from"./autoconfig-B2w-woU0.mjs";import"./ui-FYultowZ.mjs";import{n as i,t as a}from"./spawn-DuT4snxu.mjs";const o={command:`dev [implArgs..]`,describe:`Run the project's Cloudflare dev server`,builder:t=>t.positional(`implArgs`,{type:`string`,array:!0,describe:`Arguments forwarded to the dev-server implementation`}).parserConfiguration({"unknown-options-as-args":!0,"camel-case-expansion":!1}).epilogue(`cf dev starts the appropriate development server for your project. It runs your framework's dev command when available, falling back to an installed Cloudflare dev server.
3
3
 
4
4
  Only ${e.brand(`--mode`)} is forwarded to supported framework development servers. Other arguments are forwarded only to Cloudflare dev-server implementations.`),handler:async e=>{let o=process.cwd(),{details:s}=await r(o),c=(e.implArgs??[]).map(String),l=e.mode?[`--mode`,e.mode]:[];if(s?.devCommand){if(c.length>0)throw Error(`Arguments cannot currently be forwarded to the detected dev command \`${s.devCommand}\`. Run that command directly with the required arguments.`);if(e.mode&&!s.framework?.supportsMode)throw Error(`The detected command \`${s.devCommand}\` does not currently support \`--mode\`.`);let r=await n(s.devCommand,o,{env:s.env,args:l,output:`inherit`});throw new t(r.exitCode,{signal:r.signal})}let u=i(o),d=await a(u,`dev`,[...l,...c],{output:`inherit`});throw new t(d.exitCode,{signal:d.signal})}};export{o as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{n}from"./auth-D5Yj9eYU.mjs";import{a as r,t as i}from"./context-BvLXzoMs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-B-CVX0kn.mjs";import{t as c}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-DJF_Rs5S.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/diagnostics/endpoint-healthchecks`,body:`json`,constants:{check_type:`icmp`}};function g(e){return e.usage(`$0 diagnostics endpoint-healthchecks create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-D0dXwuME.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/diagnostics/endpoint-healthchecks`,body:`json`,constants:{check_type:`icmp`}};function g(e){return e.usage(`$0 diagnostics endpoint-healthchecks create
3
3
 
4
4
  Create Endpoint Health Check.`).option(`check-type`,{type:`string`,description:`type of check to perform`,choices:[`icmp`],default:`icmp`}).coerce(`check-type`,e=>d(e,`check-type`,`text`)).option(`endpoint`,{type:`string`,description:`the IP address of the host to perform checks against`}).option(`name`,{type:`string`,description:`Optional name associated with this check`}).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 _={command:`create`,describe:`Endpoint Health Check`,builder:g,handler:async e=>c({command:`diagnostics endpoint-healthchecks create`,classification:{safeFlags:[`check-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf diagnostics endpoint-healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/diagnostics/endpoint-healthchecks`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({check_type:e[`check-type`],endpoint:d(e.endpoint,`endpoint`,`text`),name:d(e.name,`name`,`text`)}):l(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(h,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}e[`check-type`]===void 0&&(e[`check-type`]=await p(`check-type`,`type of check to perform`,[`icmp`])),e.endpoint===void 0&&(e.endpoint=await f(`endpoint`,`the IP address of the host to perform checks against`));let g=u({check_type:e[`check-type`],endpoint:d(e.endpoint,`endpoint`,`text`),name:d(e.name,`name`,`text`)}),_=await s(`Creating`,async()=>c.send(h,{body:g,account_id:m}));a(_,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/diagnostics/endpoint-healthchecks/${t.id}`};function y(e){return e.usage(`$0 diagnostics endpoint-healthchecks delete <id>
5
5
 
@@ -360,7 +360,7 @@ Please use "main" if you are deploying a Worker, or "pages_build_output_dir" if
360
360
  Pages requires the name of your project to be configured at the top-level of your Wrangler configuration file. This is because, in Pages, environments target the same project.`)}a(qE,`validateProjectName`);function JE(e,t){if(!e?.length)return;let n=e.filter(e=>e!==`preview`&&e!==`production`);n.length>0&&t.errors.push(`Configuration file contains the following environment names that are not supported by Pages projects:
361
361
  ${n.map(e=>`"${e}"`).join()}.
362
362
  The supported named-environments for Pages are "preview" and "production".`)}a(JE,`validatePagesEnvironmentNames`);function YE(e,t){let n=new Set(Object.keys(e));for(let t of WE)t===`queues`&&e.queues?.consumers?.length||n.delete(t);for(let t of n)(e[t]===void 0||JSON.stringify(e[t])===JSON.stringify(zC[t]))&&n.delete(t);n.size>0&&Array.from(n.keys()).forEach(n=>{n===`queues`&&e.queues?.consumers?.length?t.errors.push(`Configuration file for Pages projects does not support "queues.consumers"`):t.errors.push(`Configuration file for Pages projects does not support "${n}"`)})}a(YE,`validateUnsupportedFields`);function XE(e,t){e.durable_objects.bindings.length>0&&e.durable_objects.bindings.filter(e=>!X(e,`script_name`,`string`)).length>0&&t.errors.push(`Durable Objects bindings should specify a "script_name".
363
- Pages requires Durable Object bindings to specify the name of the Worker where the Durable Object is defined.`)}a(XE,`validateDurableObjectBinding`);function ZE(e,t){try{return I.dirname(r.resolve(`${e}/package.json`,{paths:[t]}))}catch{}try{return I.dirname(r.resolve(e,{paths:[t]}))}catch{}try{let n=I.join(t,`node_modules`,e,`package.json`);if(ae(n).isFile())return I.dirname(n)}catch{}}a(ZE,`getPackagePath`);function QE(e,t){return!!ZE(e,t)}a(QE,`isPackageInstalled`);function $E(e,t,n={}){try{let r=ZE(e,t);if(!r)return;let i=eD(`package.json`,r,n.stopAtProjectPath===!0?t:void 0);if(!i)return;let a=g(p(i),i);if(a.name!==e){let t=a.bundledVersions?.[e];if(t!==void 0)return t}return a.version}catch{}}a($E,`getInstalledPackageVersion`);function eD(e,t,n){let r=t,i=I.parse(r).root;for(;;){let t=I.join(r,e);try{if(ae(t).isFile())return t}catch{}if(n!==void 0&&r===n)break;let a=I.dirname(r);if(a===r||r===i)break;r=a}}a(eD,`findFileUp`);function tD(e){return e.filter(e=>e.type!==`secret_text`).reduce((e,t)=>{switch(t.type){case`plain_text`:e.vars={...e.vars??{},[t.name]:t.text};break;case`json`:e.vars={...e.vars??{},[t.name]:t.json};break;case`kv_namespace`:e.kv_namespaces=[...e.kv_namespaces??[],{id:t.namespace_id,binding:t.name}];break;case`durable_object_namespace`:e.durable_objects={bindings:[...e.durable_objects?.bindings??[],{name:t.name,class_name:t.class_name,script_name:t.script_name,environment:t.environment}]};break;case`d1`:e.d1_databases=[...e.d1_databases??[],{binding:t.name,database_id:t.id}];break;case`browser`:e.browser={binding:t.name};break;case`analytics`:e.analytics={binding:t.name};break;case`ai`:e.ai={binding:t.name};break;case`images`:e.images={binding:t.name};break;case`stream`:e.stream={binding:t.name};break;case`media`:e.media={binding:t.name};break;case`r2_bucket`:e.r2_buckets=[...e.r2_buckets??[],{binding:t.name,bucket_name:t.bucket_name,jurisdiction:t.jurisdiction}];break;case`secrets_store_secret`:e.secrets_store_secrets=[...e.secrets_store_secrets??[],{binding:t.name,store_id:t.store_id,secret_name:t.secret_name}];break;case`artifacts`:e.artifacts=[...e.artifacts??[],{binding:t.name,namespace:t.namespace}];break;case`unsafe_hello_world`:e.unsafe_hello_world=[...e.unsafe_hello_world??[],{binding:t.name,enable_timer:t.enable_timer}];break;case`flagship`:e.flagship=[...e.flagship??[],{binding:t.name,app_id:t.app_id}];break;case`service`:e.services=[...e.services??[],{binding:t.name,service:t.service,environment:t.environment,entrypoint:t.entrypoint}];break;case`analytics_engine`:e.analytics_engine_datasets=[...e.analytics_engine_datasets??[],{binding:t.name,dataset:t.dataset}];break;case`dispatch_namespace`:e.dispatch_namespaces=[...e.dispatch_namespaces??[],{binding:t.name,namespace:t.namespace,...t.outbound&&{outbound:{service:t.outbound.worker.service,environment:t.outbound.worker.environment,parameters:t.outbound.params?.map(e=>e.name)??[]}}}];break;case`logfwdr`:e.logfwdr={bindings:[...e.logfwdr?.bindings??[],{name:t.name,destination:t.destination}]};break;case`wasm_module`:e.wasm_modules={...e.wasm_modules??{},[t.name]:t.part};break;case`text_blob`:e.text_blobs={...e.text_blobs??{},[t.name]:t.part};break;case`data_blob`:e.data_blobs={...e.data_blobs??{},[t.name]:t.part};break;case`secret_text`:break;case`version_metadata`:e.version_metadata={binding:t.name};break;case`send_email`:e.send_email=[...e.send_email??[],{name:t.name,destination_address:t.destination_address,allowed_destination_addresses:t.allowed_destination_addresses,allowed_sender_addresses:t.allowed_sender_addresses}];break;case`queue`:e.queues??={producers:[]},e.queues.producers=[...e.queues.producers??[],{binding:t.name,queue:t.queue_name,delivery_delay:t.delivery_delay}];break;case`vectorize`:e.vectorize=[...e.vectorize??[],{binding:t.name,index_name:t.index_name}];break;case`ai_search_namespace`:e.ai_search_namespaces=[...e.ai_search_namespaces??[],{binding:t.name,namespace:t.namespace}];break;case`ai_search`:e.ai_search=[...e.ai_search??[],{binding:t.name,instance_name:t.instance_name}];break;case`agent_memory`:e.agent_memory=[...e.agent_memory??[],{binding:t.name,namespace:t.namespace}];break;case`hyperdrive`:e.hyperdrive=[...e.hyperdrive??[],{binding:t.name,id:t.id}];break;case`mtls_certificate`:e.mtls_certificates=[...e.mtls_certificates??[],{binding:t.name,certificate_id:t.certificate_id}];break;case`pipelines`:e.pipelines=[...e.pipelines??[],{binding:t.name,...t.stream&&{stream:t.stream},...t.pipeline&&{pipeline:t.pipeline}}];break;case`k2`:e.k2=[...e.k2??[],{binding:t.name,stream:t.stream}];break;case`assets`:e.assets={binding:t.name};break;case`inherit`:e.unsafe={bindings:[...e.unsafe?.bindings??[],t],metadata:e.unsafe?.metadata??void 0};break;case`workflow`:e.workflows=[...e.workflows??[],{binding:t.name,name:t.workflow_name,class_name:t.class_name,script_name:t.script_name}];break;case`worker_loader`:e.worker_loaders=[...e.worker_loaders??[],{binding:t.name}];break;case`ratelimit`:e.ratelimits=[...e.ratelimits??[],{name:t.name,namespace_id:t.namespace_id,simple:{limit:t.simple.limit,period:t.simple.period}}];break;case`vpc_service`:e.vpc_services=[...e.vpc_services??[],{binding:t.name,service_id:t.service_id}];break;case`vpc_network`:t.tunnel_id===void 0?t.network_id!==void 0&&(e.vpc_networks=[...e.vpc_networks??[],{binding:t.name,network_id:t.network_id}]):e.vpc_networks=[...e.vpc_networks??[],{binding:t.name,tunnel_id:t.tunnel_id}];break;default:e.unsafe={bindings:[...e.unsafe?.bindings??[],t],metadata:e.unsafe?.metadata??void 0}}return e},{})}a(tD,`mapWorkerMetadataBindings`);var nD=`2026-10-23`;function rD(e){let t=tD(e.bindings),n=e.bindings.filter(t=>t.type===`durable_object_namespace`&&t.script_name===e.name).map(e=>e.class_name),r=[...e.routes.map(e=>({pattern:e.pattern,zone_name:e.zone_name})),...e.domains.map(e=>({pattern:e.hostname,zone_name:e.zone_name,custom_domain:!0,enabled:e.enabled,previews_enabled:e.previews_enabled}))];return{name:e.name,main:e.entrypoint,workers_dev:e.subdomain.enabled,preview_urls:e.subdomain.previews_enabled,compatibility_date:e.compatibility_date??`2026-10-23`,compatibility_flags:e.compatibility_flags,...r.length?{routes:r}:{},placement:e.placement?.mode===`smart`?{mode:`smart`}:void 0,limits:e.limits,...n.length&&e.migration_tag?{migrations:[{tag:e.migration_tag,new_classes:n}]}:{},...e.schedules.length?{triggers:{crons:e.schedules.map(e=>e.cron)}}:{},tail_consumers:e.tail_consumers??void 0,observability:e.observability,...t}}a(rD,`constructWranglerConfig`);function iD(e){}a(iD,`assertNever`);function aD(e,t){let{usePreviewIds:n=!1,pages:r=!1}=t??{},i={},a=Object.entries(e);for(let[e,t]of a)if(t!==void 0)switch(e){case`vars`:for(let[e,n]of Object.entries(t))i[e]=typeof n==`string`?{type:`plain_text`,value:n}:{type:`json`,value:n};break;case`kv_namespaces`:for(let{binding:e,...r}of t)i[e]={type:`kv_namespace`,...r,id:n?r.preview_id??r.id:r.id};break;case`send_email`:if(r)break;for(let{name:e,destination_address:n,allowed_destination_addresses:r,allowed_sender_addresses:a,remote:o}of t){let t={type:`send_email`,allowed_sender_addresses:a,remote:o};i[e]=n===void 0?r===void 0?t:{...t,allowed_destination_addresses:r}:{...t,destination_address:n}}break;case`wasm_modules`:if(r)break;for(let[e,n]of Object.entries(t))i[e]=typeof n==`string`?{type:`wasm_module`,source:{path:n}}:{type:`wasm_module`,source:{contents:n}};break;case`text_blobs`:if(r)break;for(let[e,n]of Object.entries(t))i[e]={type:`text_blob`,source:{path:n}};break;case`data_blobs`:if(r)break;for(let[e,n]of Object.entries(t))i[e]=typeof n==`string`?{type:`data_blob`,source:{path:n}}:{type:`data_blob`,source:{contents:n}};break;case`browser`:{let{binding:e,...n}=t;i[e]={type:`browser`,...n};break}case`analytics`:{let{binding:e,...n}=t;i[e]={type:`analytics`,...n};break}case`durable_objects`:for(let{name:e,...n}of t.bindings??[])i[e]={type:`durable_object_namespace`,...n};break;case`workflows`:for(let{binding:e,...n}of t)i[e]={type:`workflow`,...n};break;case`queues`:for(let{binding:e,...n}of t.producers??[])i[e]={type:`queue`,queue_name:n.queue,...n};break;case`r2_buckets`:for(let{binding:e,...r}of t)i[e]={type:`r2_bucket`,...r,bucket_name:n?r.preview_bucket_name??r.bucket_name:r.bucket_name};break;case`d1_databases`:for(let{binding:e,...r}of t)i[e]={type:`d1`,...r,database_id:n?r.preview_database_id??r.database_id:r.database_id};break;case`services`:for(let{binding:e,...n}of t)i[e]={type:`service`,...n};break;case`analytics_engine_datasets`:for(let{binding:e,...n}of t)i[e]={type:`analytics_engine`,...n};break;case`dispatch_namespaces`:if(r)break;for(let{binding:e,...n}of t)i[e]={type:`dispatch_namespace`,...n};break;case`mtls_certificates`:for(let{binding:e,...n}of t)i[e]={type:`mtls_certificate`,...n};break;case`logfwdr`:if(r)break;for(let{name:e,...n}of t.bindings??[])i[e]={type:`logfwdr`,...n};break;case`ai`:{let{binding:e,...n}=t;i[e]={type:`ai`,...n};break}case`images`:{let{binding:e,...n}=t;i[e]={type:`images`,...n};break}case`stream`:{let{binding:e,...n}=t;i[e]={type:`stream`,...n};break}case`version_metadata`:{let{binding:e,...n}=t;i[e]={type:`version_metadata`,...n};break}case`hyperdrive`:for(let{binding:e,...n}of t)i[e]={type:`hyperdrive`,...n};break;case`vectorize`:for(let{binding:e,...n}of t)i[e]={type:`vectorize`,...n};break;case`ai_search_namespaces`:for(let{binding:e,...n}of t)i[e]={type:`ai_search_namespace`,...n};break;case`ai_search`:for(let{binding:e,...n}of t)i[e]={type:`ai_search`,...n};break;case`agent_memory`:for(let{binding:e,...n}of t)i[e]={type:`agent_memory`,...n};break;case`unsafe`:if(r)break;for(let{type:e,name:n,...r}of t.bindings??[])i[n]={type:`unsafe_${e}`,...r};break;case`assets`:if(r)break;t.binding&&(i[t.binding]={type:`assets`});break;case`pipelines`:if(r)break;for(let{binding:e,...n}of t)i[e]={type:`pipeline`,...n};break;case`k2`:if(r)break;for(let{binding:e,...n}of t)i[e]={type:`k2`,...n};break;case`secrets_store_secrets`:for(let{binding:e,...n}of t)i[e]={type:`secrets_store_secret`,...n};break;case`artifacts`:for(let{binding:e,...n}of t)i[e]={type:`artifacts`,...n};break;case`unsafe_hello_world`:if(r)break;for(let{binding:e,...n}of t)i[e]={type:`unsafe_hello_world`,...n};break;case`flagship`:for(let{binding:e,...n}of t)i[e]={type:`flagship`,...n};break;case`ratelimits`:for(let{name:e,...n}of t)i[e]={type:`ratelimit`,...n};break;case`worker_loaders`:for(let{binding:e,...n}of t)i[e]={type:`worker_loader`,...n};break;case`vpc_services`:for(let{binding:e,...n}of t)i[e]={type:`vpc_service`,...n};break;case`vpc_networks`:for(let{binding:e,...n}of t)i[e]={type:`vpc_network`,...n};break;case`media`:{let{binding:e,...n}=t;i[e]={type:`media`,...n};break}}return i}a(aD,`convertConfigToBindings`);function oD(e){return e.startsWith(`unsafe_`)}a(oD,`isUnsafeBindingType`);var sD=[`durable_object_namespace`,`logfwdr`,`ratelimit`,`unsafe_ratelimit`,`send_email`];function cD(e){return sD.includes(e)?`name`:`binding`}a(cD,`getBindingKey`);function lD(e,t){return Object.entries(t??{}).filter(t=>t[1].type===e).map(t=>({...t[1],[cD(e)]:t[0]}))}a(lD,`extractBindingsOfType`);function uD(e,t){return e?aD(e,{usePreviewIds:!1,pages:t?.pages}):{}}a(uD,`getBindings`);var{dim:dD,white:fD}=wx,pD=wx.hex(`#BD5B08`),mD=!1;function hD(e,t){let{containers:n=[],log:r,streamingTailConsumers:i=[],tailConsumers:o=[]}=t,s=t,c=!1,l=s.isMultiWorker??!1,u=_D({isProvisioning:s.provisioning,isLocalDev:s.local}),d=/* @__PURE__ */ a((e,t=40)=>{let n=typeof e==`string`?e:JSON.stringify(e);return n.length<t?n:`${n.substring(0,t-3)}...`},`truncate`),f=[],p=lD(`data_blob`,e),m=lD(`durable_object_namespace`,e),h=lD(`workflow`,e),g=lD(`kv_namespace`,e),_=lD(`send_email`,e),v=lD(`queue`,e),y=lD(`d1`,e),b=lD(`vectorize`,e),x=lD(`ai_search_namespace`,e),S=lD(`ai_search`,e),C=lD(`agent_memory`,e),w=lD(`hyperdrive`,e),T=lD(`r2_bucket`,e),E=lD(`logfwdr`,e),D=lD(`secrets_store_secret`,e),O=lD(`artifacts`,e),k=lD(`service`,e),A=lD(`vpc_service`,e),j=lD(`vpc_network`,e),M=lD(`analytics_engine`,e),N=lD(`text_blob`,e),P=lD(`browser`,e),ee=lD(`analytics`,e),te=lD(`images`,e),F=lD(`stream`,e),ne=lD(`ai`,e),re=lD(`version_metadata`,e),ie=Object.entries(e??{}).filter(([e,t])=>t.type===`plain_text`||t.type===`json`||t.type===`secret_text`).map(([e,t])=>({binding:e,...t})),ae=lD(`wasm_module`,e),oe=lD(`dispatch_namespace`,e),se=lD(`mtls_certificate`,e),ce=lD(`pipeline`,e),I=lD(`k2`,e),le=lD(`ratelimit`,e),ue=lD(`assets`,e),de=lD(`unsafe_hello_world`,e),fe=lD(`flagship`,e),L=lD(`media`,e),pe=lD(`worker_loader`,e),me=Object.entries(e??{}).filter(([e,t])=>oD(t.type)&&t.type!==`unsafe_hello_world`).map(([e,t])=>({name:e,...t}));if(p.length>0&&f.push(...p.map(({binding:e,source:t})=>({name:e,type:Q(`data_blob`),value:`contents`in t?`<Buffer>`:d(t.path),mode:u({isSimulatedLocally:!0})}))),m.length>0&&f.push(...m.map(({name:e,class_name:t,script_name:n})=>{let r=t,i;if(n){if(s.local&&s.registry!==null){let e=s.registry?.[n];c=!0,e&&e.debugPortAddress?(r+=`, defined in ${n}`,i=u({isSimulatedLocally:!0,connected:!0})):(r+=`, defined in ${n}`,i=u({isSimulatedLocally:!0,connected:!1}))}else r+=`, defined in ${n}`,i=u({isSimulatedLocally:!0})}else i=u({isSimulatedLocally:!0});return{name:e,type:Q(`durable_object_namespace`),value:r,mode:i}})),h.length>0&&f.push(...h.map(({class_name:e,script_name:t,binding:n})=>{let r=e;return t&&(r+=` (defined in ${t})`),{name:n,type:Q(`workflow`),value:r,mode:u({isSimulatedLocally:!0})}})),g.length>0&&f.push(...g.map(({binding:e,id:t,remote:n})=>({name:e,type:Q(`kv_namespace`),value:t,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!n})}))),_.length>0&&f.push(..._.map(e=>{let t=`destination_address`in e?e.destination_address:void 0,n=`allowed_destination_addresses`in e?e.allowed_destination_addresses:void 0,r=`allowed_sender_addresses`in e?e.allowed_sender_addresses:void 0,i=t||n?.join(`, `)||`unrestricted`;return r&&(i+=` - senders: ${r.join(`, `)}`),{name:e.name,type:Q(`send_email`),value:i,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!e.remote})}})),v.length>0&&f.push(...v.map(({binding:e,queue_name:t,remote:n})=>({name:e,type:Q(`queue`),value:t,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!n})}))),y.length>0&&f.push(...y.map(({binding:e,database_name:t,database_id:n,preview_database_id:r,remote:i})=>{let a=typeof n==`symbol`?n:r??t??n;return{name:e,type:Q(`d1`),mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!i}),value:a}})),b.length>0&&f.push(...b.map(({binding:e,index_name:t,remote:n})=>({name:e,type:Q(`vectorize`),value:t,mode:u({isSimulatedLocally:n&&!s.remoteBindingsDisabled?!1:void 0})}))),x.length>0&&f.push(...x.map(({binding:e,namespace:t})=>({name:e,type:Q(`ai_search_namespace`),value:t??void 0,mode:u({isSimulatedLocally:!1})}))),S.length>0&&f.push(...S.map(({binding:e,instance_name:t})=>({name:e,type:Q(`ai_search`),value:t?String(t):void 0,mode:u({isSimulatedLocally:!1})}))),C.length>0&&f.push(...C.map(({binding:e,namespace:t})=>({name:e,type:Q(`agent_memory`),value:t??void 0,mode:u({isSimulatedLocally:!1})}))),w.length>0&&f.push(...w.map(({binding:e,id:t,remote:n})=>({name:e,type:Q(`hyperdrive`),value:t,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!n})}))),A.length>0&&f.push(...A.map(({binding:e,service_id:t,remote:n})=>({name:e,type:Q(`vpc_service`),value:t,mode:u({isSimulatedLocally:n&&!s.remoteBindingsDisabled?!1:void 0})}))),j.length>0&&f.push(...j.map(({binding:e,tunnel_id:t,network_id:n,remote:r})=>({name:e,type:Q(`vpc_network`),value:t??n,mode:u({isSimulatedLocally:r&&!s.remoteBindingsDisabled?!1:void 0})}))),T.length>0&&f.push(...T.map(({binding:e,bucket_name:t,jurisdiction:n,remote:r})=>{let i=typeof t==`symbol`?t:t?`${t}${n?` (${n})`:``}`:void 0;return{name:e,type:Q(`r2_bucket`),value:i,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!r})}})),E.length>0&&f.push(...E.map(({name:e,destination:t})=>({name:e,type:Q(`logfwdr`),value:t,mode:u()}))),D.length>0&&f.push(...D.map(({binding:e,store_id:t,secret_name:n})=>({name:e,type:Q(`secrets_store_secret`),value:`${t}/${n}`,mode:u({isSimulatedLocally:!0})}))),O.length>0&&f.push(...O.map(({binding:e,namespace:t})=>({name:e,type:Q(`artifacts`),value:t,mode:u({isSimulatedLocally:!1})}))),de.length>0&&f.push(...de.map(({binding:e,enable_timer:t})=>({name:e,type:Q(`unsafe_hello_world`),value:t?`Timer enabled`:`Timer disabled`,mode:u({isSimulatedLocally:!0})}))),fe.length>0&&f.push(...fe.map(({binding:e,app_id:t,remote:n})=>({name:e,type:Q(`flagship`),value:t,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!n})}))),k.length>0&&f.push(...k.map(({binding:e,service:t,entrypoint:n,remote:r,dev:i})=>{let a=t,o;if(n&&(a+=`#${n}`),i!==void 0&&s.local)o=u({isSimulatedLocally:!0});else if(r)o=u({isSimulatedLocally:!1});else if(s.local&&s.registry!==null){if(t===s.name)c=!0,o=u({isSimulatedLocally:!0,connected:!0});else{let e=s.registry?.[t];c=!0,o=e&&e.debugPortAddress?u({isSimulatedLocally:!0,connected:!0}):u({isSimulatedLocally:!0,connected:!1})}}return{name:e,type:Q(`service`),value:a,mode:o}})),M.length>0&&f.push(...M.map(({binding:e,dataset:t,remote:n})=>({name:e,type:Q(`analytics_engine`),value:t??e,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!n})}))),N.length>0&&f.push(...N.map(({binding:e,source:t})=>({name:e,type:Q(`text_blob`),value:`contents`in t?d(t.contents):`path`in t?d(t.path):void 0,mode:u({isSimulatedLocally:!0})}))),P.length>0&&f.push(...P.map(({binding:e,remote:t})=>({name:e,type:Q(`browser`),value:void 0,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!t})}))),ee.length>0&&f.push(...ee.map(({binding:e,remote:t})=>({name:e,type:Q(`analytics`),value:void 0,mode:u({isSimulatedLocally:(t===!0||t===void 0)&&!s.remoteBindingsDisabled?!1:void 0})}))),te.length>0&&f.push(...te.map(({binding:e,remote:t})=>({name:e,type:Q(`images`),value:void 0,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!t})}))),F.length>0&&f.push(...F.map(({binding:e,remote:t})=>({name:e,type:Q(`stream`),value:void 0,mode:u({isSimulatedLocally:(t===!0||t===void 0)&&!s.remoteBindingsDisabled?!1:void 0})}))),L.length>0&&f.push(...L.map(({binding:e,remote:t})=>({name:e,type:Q(`media`),value:void 0,mode:u({isSimulatedLocally:(t===!0||t===void 0)&&!s.remoteBindingsDisabled?!1:void 0})}))),ne.length>0&&f.push(...ne.map(({binding:e,staging:t,remote:n})=>({name:e,type:Q(`ai`),value:t?`staging`:void 0,mode:u({isSimulatedLocally:(n===!0||n===void 0)&&!s.remoteBindingsDisabled?!1:void 0})}))),ce.length>0&&f.push(...ce.map(({binding:e,stream:t,pipeline:n,remote:r})=>({name:e,type:Q(`pipeline`),value:t||n,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!r})}))),I.length>0&&f.push(...I.map(({binding:e,stream:t})=>({name:e,type:Q(`k2`),value:t,mode:u({isSimulatedLocally:s.remoteBindingsDisabled?void 0:!1})}))),le.length>0&&f.push(...le.map(({name:e,simple:t})=>({name:e,type:Q(`ratelimit`),value:`${t.limit} requests/${t.period}s`,mode:u({isSimulatedLocally:!0})}))),ue.length>0&&f.push(...ue.map(({binding:e})=>({name:e,type:Q(`assets`),value:void 0,mode:u({isSimulatedLocally:!0})}))),re.length>0&&f.push(...re.map(({binding:e})=>({name:e,type:Q(`version_metadata`),value:void 0,mode:u({isSimulatedLocally:!0})}))),me.length>0&&f.push(...me.map(e=>{let t=`dev`in e?e.dev:void 0,n=e.type.slice(7);return{name:e.name,type:t?t.plugin.name:Q(e.type),value:n,mode:u({isSimulatedLocally:!!t})}})),ie.length>0&&f.push(...ie.map(e=>{let{binding:t,type:n,value:r}=e,i;return i=n===`plain_text`&&e.hidden!==!0?`"${d(r)}"`:n===`json`?d(JSON.stringify(r)):`"(hidden)"`,{name:t,type:Q(n),value:i,mode:u({isSimulatedLocally:!0})}})),ae.length>0&&f.push(...ae.map(({binding:e,source:t})=>({name:e,type:Q(`wasm_module`),value:`contents`in t?`<Wasm>`:d(t.path),mode:u({isSimulatedLocally:!0})}))),oe.length>0&&f.push(...oe.map(({binding:e,namespace:t,outbound:n,remote:r})=>({name:e,type:Q(`dispatch_namespace`),value:typeof t==`symbol`?t:n?`${t} (outbound -> ${n.service})`:t,mode:u({isSimulatedLocally:r&&!s.remoteBindingsDisabled?!1:void 0})}))),se.length>0&&f.push(...se.map(({binding:e,certificate_id:t,remote:n})=>({name:e,type:Q(`mtls_certificate`),value:t,mode:u({isSimulatedLocally:n&&!s.remoteBindingsDisabled?!1:void 0})}))),pe.length>0&&f.push(...pe.map(({binding:e})=>({name:e,type:Q(`worker_loader`),value:void 0,mode:u({isSimulatedLocally:!0})}))),f.length===0)s.warnIfNoBindings&&(s.name&&l?r(`No bindings found for ${wx.blue(s.name)}`):r(`No bindings found.`));else{let e;e=s.provisioning?`The following bindings need to be provisioned:`:s.name&&l?`${wx.blue(s.name)} has access to the following bindings:`:`Your Worker has access to the following bindings:`;let t={binding:`Binding`,resource:`Resource`,mode:`Mode`},n=Math.max(...f.map(e=>typeof e.value==`symbol`?9:e.value?.length??0)),i=Math.max(...f.map(e=>e.name.length)),a=Math.max(...f.map(e=>e.type.length),t.resource.length),o=Math.max(...f.map(e=>e.mode?Se(e.mode).length:t.mode.length)),c=f.some(e=>e.mode),u=4+i+2+n+1,d=u+6+a+6+o>=process.stdout.columns;r(e);let p=d?` `.repeat(4):` `.repeat(6);r(`${gD(dD(t.binding),d?4+i:u)}${p}${gD(dD(t.resource),a)}${p}${c?dD(t.mode):``}`);for(let e of f){let t=dD(typeof e.value==`symbol`?wx.italic(`inherited`):e.value??``),n=gD(`${fD(`env.${e.name}`)}${e.value&&!d?` (${t})`:``}`,d?4+i:u),o=d&&e.value?`
363
+ Pages requires Durable Object bindings to specify the name of the Worker where the Durable Object is defined.`)}a(XE,`validateDurableObjectBinding`);function ZE(e,t){try{return I.dirname(r.resolve(`${e}/package.json`,{paths:[t]}))}catch{}try{return I.dirname(r.resolve(e,{paths:[t]}))}catch{}try{let n=I.join(t,`node_modules`,e,`package.json`);if(ae(n).isFile())return I.dirname(n)}catch{}}a(ZE,`getPackagePath`);function QE(e,t){return!!ZE(e,t)}a(QE,`isPackageInstalled`);function $E(e,t,n={}){try{let r=ZE(e,t);if(!r)return;let i=eD(`package.json`,r,n.stopAtProjectPath===!0?t:void 0);if(!i)return;let a=g(p(i),i);if(a.name!==e){let t=a.bundledVersions?.[e];if(t!==void 0)return t}return a.version}catch{}}a($E,`getInstalledPackageVersion`);function eD(e,t,n){let r=t,i=I.parse(r).root;for(;;){let t=I.join(r,e);try{if(ae(t).isFile())return t}catch{}if(n!==void 0&&r===n)break;let a=I.dirname(r);if(a===r||r===i)break;r=a}}a(eD,`findFileUp`);function tD(e){return e.filter(e=>e.type!==`secret_text`).reduce((e,t)=>{switch(t.type){case`plain_text`:e.vars={...e.vars??{},[t.name]:t.text};break;case`json`:e.vars={...e.vars??{},[t.name]:t.json};break;case`kv_namespace`:e.kv_namespaces=[...e.kv_namespaces??[],{id:t.namespace_id,binding:t.name}];break;case`durable_object_namespace`:e.durable_objects={bindings:[...e.durable_objects?.bindings??[],{name:t.name,class_name:t.class_name,script_name:t.script_name,environment:t.environment}]};break;case`d1`:e.d1_databases=[...e.d1_databases??[],{binding:t.name,database_id:t.id}];break;case`browser`:e.browser={binding:t.name};break;case`analytics`:e.analytics={binding:t.name};break;case`ai`:e.ai={binding:t.name};break;case`images`:e.images={binding:t.name};break;case`stream`:e.stream={binding:t.name};break;case`media`:e.media={binding:t.name};break;case`r2_bucket`:e.r2_buckets=[...e.r2_buckets??[],{binding:t.name,bucket_name:t.bucket_name,jurisdiction:t.jurisdiction}];break;case`secrets_store_secret`:e.secrets_store_secrets=[...e.secrets_store_secrets??[],{binding:t.name,store_id:t.store_id,secret_name:t.secret_name}];break;case`artifacts`:e.artifacts=[...e.artifacts??[],{binding:t.name,namespace:t.namespace}];break;case`unsafe_hello_world`:e.unsafe_hello_world=[...e.unsafe_hello_world??[],{binding:t.name,enable_timer:t.enable_timer}];break;case`flagship`:e.flagship=[...e.flagship??[],{binding:t.name,app_id:t.app_id}];break;case`service`:e.services=[...e.services??[],{binding:t.name,service:t.service,environment:t.environment,entrypoint:t.entrypoint}];break;case`analytics_engine`:e.analytics_engine_datasets=[...e.analytics_engine_datasets??[],{binding:t.name,dataset:t.dataset}];break;case`dispatch_namespace`:e.dispatch_namespaces=[...e.dispatch_namespaces??[],{binding:t.name,namespace:t.namespace,...t.outbound&&{outbound:{service:t.outbound.worker.service,environment:t.outbound.worker.environment,parameters:t.outbound.params?.map(e=>e.name)??[]}}}];break;case`logfwdr`:e.logfwdr={bindings:[...e.logfwdr?.bindings??[],{name:t.name,destination:t.destination}]};break;case`wasm_module`:e.wasm_modules={...e.wasm_modules??{},[t.name]:t.part};break;case`text_blob`:e.text_blobs={...e.text_blobs??{},[t.name]:t.part};break;case`data_blob`:e.data_blobs={...e.data_blobs??{},[t.name]:t.part};break;case`secret_text`:break;case`version_metadata`:e.version_metadata={binding:t.name};break;case`send_email`:e.send_email=[...e.send_email??[],{name:t.name,destination_address:t.destination_address,allowed_destination_addresses:t.allowed_destination_addresses,allowed_sender_addresses:t.allowed_sender_addresses}];break;case`queue`:e.queues??={producers:[]},e.queues.producers=[...e.queues.producers??[],{binding:t.name,queue:t.queue_name,delivery_delay:t.delivery_delay}];break;case`vectorize`:e.vectorize=[...e.vectorize??[],{binding:t.name,index_name:t.index_name}];break;case`ai_search_namespace`:e.ai_search_namespaces=[...e.ai_search_namespaces??[],{binding:t.name,namespace:t.namespace}];break;case`ai_search`:e.ai_search=[...e.ai_search??[],{binding:t.name,instance_name:t.instance_name}];break;case`agent_memory`:e.agent_memory=[...e.agent_memory??[],{binding:t.name,namespace:t.namespace}];break;case`hyperdrive`:e.hyperdrive=[...e.hyperdrive??[],{binding:t.name,id:t.id}];break;case`mtls_certificate`:e.mtls_certificates=[...e.mtls_certificates??[],{binding:t.name,certificate_id:t.certificate_id}];break;case`pipelines`:e.pipelines=[...e.pipelines??[],{binding:t.name,...t.stream&&{stream:t.stream},...t.pipeline&&{pipeline:t.pipeline}}];break;case`k2`:e.k2=[...e.k2??[],{binding:t.name,stream:t.stream}];break;case`assets`:e.assets={binding:t.name};break;case`inherit`:e.unsafe={bindings:[...e.unsafe?.bindings??[],t],metadata:e.unsafe?.metadata??void 0};break;case`workflow`:e.workflows=[...e.workflows??[],{binding:t.name,name:t.workflow_name,class_name:t.class_name,script_name:t.script_name}];break;case`worker_loader`:e.worker_loaders=[...e.worker_loaders??[],{binding:t.name}];break;case`ratelimit`:e.ratelimits=[...e.ratelimits??[],{name:t.name,namespace_id:t.namespace_id,simple:{limit:t.simple.limit,period:t.simple.period}}];break;case`vpc_service`:e.vpc_services=[...e.vpc_services??[],{binding:t.name,service_id:t.service_id}];break;case`vpc_network`:t.tunnel_id===void 0?t.network_id!==void 0&&(e.vpc_networks=[...e.vpc_networks??[],{binding:t.name,network_id:t.network_id}]):e.vpc_networks=[...e.vpc_networks??[],{binding:t.name,tunnel_id:t.tunnel_id}];break;default:e.unsafe={bindings:[...e.unsafe?.bindings??[],t],metadata:e.unsafe?.metadata??void 0}}return e},{})}a(tD,`mapWorkerMetadataBindings`);var nD=`2026-11-01`;function rD(e){let t=tD(e.bindings),n=e.bindings.filter(t=>t.type===`durable_object_namespace`&&t.script_name===e.name).map(e=>e.class_name),r=[...e.routes.map(e=>({pattern:e.pattern,zone_name:e.zone_name})),...e.domains.map(e=>({pattern:e.hostname,zone_name:e.zone_name,custom_domain:!0,enabled:e.enabled,previews_enabled:e.previews_enabled}))];return{name:e.name,main:e.entrypoint,workers_dev:e.subdomain.enabled,preview_urls:e.subdomain.previews_enabled,compatibility_date:e.compatibility_date??`2026-11-01`,compatibility_flags:e.compatibility_flags,...r.length?{routes:r}:{},placement:e.placement?.mode===`smart`?{mode:`smart`}:void 0,limits:e.limits,...n.length&&e.migration_tag?{migrations:[{tag:e.migration_tag,new_classes:n}]}:{},...e.schedules.length?{triggers:{crons:e.schedules.map(e=>e.cron)}}:{},tail_consumers:e.tail_consumers??void 0,observability:e.observability,...t}}a(rD,`constructWranglerConfig`);function iD(e){}a(iD,`assertNever`);function aD(e,t){let{usePreviewIds:n=!1,pages:r=!1}=t??{},i={},a=Object.entries(e);for(let[e,t]of a)if(t!==void 0)switch(e){case`vars`:for(let[e,n]of Object.entries(t))i[e]=typeof n==`string`?{type:`plain_text`,value:n}:{type:`json`,value:n};break;case`kv_namespaces`:for(let{binding:e,...r}of t)i[e]={type:`kv_namespace`,...r,id:n?r.preview_id??r.id:r.id};break;case`send_email`:if(r)break;for(let{name:e,destination_address:n,allowed_destination_addresses:r,allowed_sender_addresses:a,remote:o}of t){let t={type:`send_email`,allowed_sender_addresses:a,remote:o};i[e]=n===void 0?r===void 0?t:{...t,allowed_destination_addresses:r}:{...t,destination_address:n}}break;case`wasm_modules`:if(r)break;for(let[e,n]of Object.entries(t))i[e]=typeof n==`string`?{type:`wasm_module`,source:{path:n}}:{type:`wasm_module`,source:{contents:n}};break;case`text_blobs`:if(r)break;for(let[e,n]of Object.entries(t))i[e]={type:`text_blob`,source:{path:n}};break;case`data_blobs`:if(r)break;for(let[e,n]of Object.entries(t))i[e]=typeof n==`string`?{type:`data_blob`,source:{path:n}}:{type:`data_blob`,source:{contents:n}};break;case`browser`:{let{binding:e,...n}=t;i[e]={type:`browser`,...n};break}case`analytics`:{let{binding:e,...n}=t;i[e]={type:`analytics`,...n};break}case`durable_objects`:for(let{name:e,...n}of t.bindings??[])i[e]={type:`durable_object_namespace`,...n};break;case`workflows`:for(let{binding:e,...n}of t)i[e]={type:`workflow`,...n};break;case`queues`:for(let{binding:e,...n}of t.producers??[])i[e]={type:`queue`,queue_name:n.queue,...n};break;case`r2_buckets`:for(let{binding:e,...r}of t)i[e]={type:`r2_bucket`,...r,bucket_name:n?r.preview_bucket_name??r.bucket_name:r.bucket_name};break;case`d1_databases`:for(let{binding:e,...r}of t)i[e]={type:`d1`,...r,database_id:n?r.preview_database_id??r.database_id:r.database_id};break;case`services`:for(let{binding:e,...n}of t)i[e]={type:`service`,...n};break;case`analytics_engine_datasets`:for(let{binding:e,...n}of t)i[e]={type:`analytics_engine`,...n};break;case`dispatch_namespaces`:if(r)break;for(let{binding:e,...n}of t)i[e]={type:`dispatch_namespace`,...n};break;case`mtls_certificates`:for(let{binding:e,...n}of t)i[e]={type:`mtls_certificate`,...n};break;case`logfwdr`:if(r)break;for(let{name:e,...n}of t.bindings??[])i[e]={type:`logfwdr`,...n};break;case`ai`:{let{binding:e,...n}=t;i[e]={type:`ai`,...n};break}case`images`:{let{binding:e,...n}=t;i[e]={type:`images`,...n};break}case`stream`:{let{binding:e,...n}=t;i[e]={type:`stream`,...n};break}case`version_metadata`:{let{binding:e,...n}=t;i[e]={type:`version_metadata`,...n};break}case`hyperdrive`:for(let{binding:e,...n}of t)i[e]={type:`hyperdrive`,...n};break;case`vectorize`:for(let{binding:e,...n}of t)i[e]={type:`vectorize`,...n};break;case`ai_search_namespaces`:for(let{binding:e,...n}of t)i[e]={type:`ai_search_namespace`,...n};break;case`ai_search`:for(let{binding:e,...n}of t)i[e]={type:`ai_search`,...n};break;case`agent_memory`:for(let{binding:e,...n}of t)i[e]={type:`agent_memory`,...n};break;case`unsafe`:if(r)break;for(let{type:e,name:n,...r}of t.bindings??[])i[n]={type:`unsafe_${e}`,...r};break;case`assets`:if(r)break;t.binding&&(i[t.binding]={type:`assets`});break;case`pipelines`:if(r)break;for(let{binding:e,...n}of t)i[e]={type:`pipeline`,...n};break;case`k2`:if(r)break;for(let{binding:e,...n}of t)i[e]={type:`k2`,...n};break;case`secrets_store_secrets`:for(let{binding:e,...n}of t)i[e]={type:`secrets_store_secret`,...n};break;case`artifacts`:for(let{binding:e,...n}of t)i[e]={type:`artifacts`,...n};break;case`unsafe_hello_world`:if(r)break;for(let{binding:e,...n}of t)i[e]={type:`unsafe_hello_world`,...n};break;case`flagship`:for(let{binding:e,...n}of t)i[e]={type:`flagship`,...n};break;case`ratelimits`:for(let{name:e,...n}of t)i[e]={type:`ratelimit`,...n};break;case`worker_loaders`:for(let{binding:e,...n}of t)i[e]={type:`worker_loader`,...n};break;case`vpc_services`:for(let{binding:e,...n}of t)i[e]={type:`vpc_service`,...n};break;case`vpc_networks`:for(let{binding:e,...n}of t)i[e]={type:`vpc_network`,...n};break;case`media`:{let{binding:e,...n}=t;i[e]={type:`media`,...n};break}}return i}a(aD,`convertConfigToBindings`);function oD(e){return e.startsWith(`unsafe_`)}a(oD,`isUnsafeBindingType`);var sD=[`durable_object_namespace`,`logfwdr`,`ratelimit`,`unsafe_ratelimit`,`send_email`];function cD(e){return sD.includes(e)?`name`:`binding`}a(cD,`getBindingKey`);function lD(e,t){return Object.entries(t??{}).filter(t=>t[1].type===e).map(t=>({...t[1],[cD(e)]:t[0]}))}a(lD,`extractBindingsOfType`);function uD(e,t){return e?aD(e,{usePreviewIds:!1,pages:t?.pages}):{}}a(uD,`getBindings`);var{dim:dD,white:fD}=wx,pD=wx.hex(`#BD5B08`),mD=!1;function hD(e,t){let{containers:n=[],log:r,streamingTailConsumers:i=[],tailConsumers:o=[]}=t,s=t,c=!1,l=s.isMultiWorker??!1,u=_D({isProvisioning:s.provisioning,isLocalDev:s.local}),d=/* @__PURE__ */ a((e,t=40)=>{let n=typeof e==`string`?e:JSON.stringify(e);return n.length<t?n:`${n.substring(0,t-3)}...`},`truncate`),f=[],p=lD(`data_blob`,e),m=lD(`durable_object_namespace`,e),h=lD(`workflow`,e),g=lD(`kv_namespace`,e),_=lD(`send_email`,e),v=lD(`queue`,e),y=lD(`d1`,e),b=lD(`vectorize`,e),x=lD(`ai_search_namespace`,e),S=lD(`ai_search`,e),C=lD(`agent_memory`,e),w=lD(`hyperdrive`,e),T=lD(`r2_bucket`,e),E=lD(`logfwdr`,e),D=lD(`secrets_store_secret`,e),O=lD(`artifacts`,e),k=lD(`service`,e),A=lD(`vpc_service`,e),j=lD(`vpc_network`,e),M=lD(`analytics_engine`,e),N=lD(`text_blob`,e),P=lD(`browser`,e),ee=lD(`analytics`,e),te=lD(`images`,e),F=lD(`stream`,e),ne=lD(`ai`,e),re=lD(`version_metadata`,e),ie=Object.entries(e??{}).filter(([e,t])=>t.type===`plain_text`||t.type===`json`||t.type===`secret_text`).map(([e,t])=>({binding:e,...t})),ae=lD(`wasm_module`,e),oe=lD(`dispatch_namespace`,e),se=lD(`mtls_certificate`,e),ce=lD(`pipeline`,e),I=lD(`k2`,e),le=lD(`ratelimit`,e),ue=lD(`assets`,e),de=lD(`unsafe_hello_world`,e),fe=lD(`flagship`,e),L=lD(`media`,e),pe=lD(`worker_loader`,e),me=Object.entries(e??{}).filter(([e,t])=>oD(t.type)&&t.type!==`unsafe_hello_world`).map(([e,t])=>({name:e,...t}));if(p.length>0&&f.push(...p.map(({binding:e,source:t})=>({name:e,type:Q(`data_blob`),value:`contents`in t?`<Buffer>`:d(t.path),mode:u({isSimulatedLocally:!0})}))),m.length>0&&f.push(...m.map(({name:e,class_name:t,script_name:n})=>{let r=t,i;if(n){if(s.local&&s.registry!==null){let e=s.registry?.[n];c=!0,e&&e.debugPortAddress?(r+=`, defined in ${n}`,i=u({isSimulatedLocally:!0,connected:!0})):(r+=`, defined in ${n}`,i=u({isSimulatedLocally:!0,connected:!1}))}else r+=`, defined in ${n}`,i=u({isSimulatedLocally:!0})}else i=u({isSimulatedLocally:!0});return{name:e,type:Q(`durable_object_namespace`),value:r,mode:i}})),h.length>0&&f.push(...h.map(({class_name:e,script_name:t,binding:n})=>{let r=e;return t&&(r+=` (defined in ${t})`),{name:n,type:Q(`workflow`),value:r,mode:u({isSimulatedLocally:!0})}})),g.length>0&&f.push(...g.map(({binding:e,id:t,remote:n})=>({name:e,type:Q(`kv_namespace`),value:t,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!n})}))),_.length>0&&f.push(..._.map(e=>{let t=`destination_address`in e?e.destination_address:void 0,n=`allowed_destination_addresses`in e?e.allowed_destination_addresses:void 0,r=`allowed_sender_addresses`in e?e.allowed_sender_addresses:void 0,i=t||n?.join(`, `)||`unrestricted`;return r&&(i+=` - senders: ${r.join(`, `)}`),{name:e.name,type:Q(`send_email`),value:i,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!e.remote})}})),v.length>0&&f.push(...v.map(({binding:e,queue_name:t,remote:n})=>({name:e,type:Q(`queue`),value:t,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!n})}))),y.length>0&&f.push(...y.map(({binding:e,database_name:t,database_id:n,preview_database_id:r,remote:i})=>{let a=typeof n==`symbol`?n:r??t??n;return{name:e,type:Q(`d1`),mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!i}),value:a}})),b.length>0&&f.push(...b.map(({binding:e,index_name:t,remote:n})=>({name:e,type:Q(`vectorize`),value:t,mode:u({isSimulatedLocally:n&&!s.remoteBindingsDisabled?!1:void 0})}))),x.length>0&&f.push(...x.map(({binding:e,namespace:t})=>({name:e,type:Q(`ai_search_namespace`),value:t??void 0,mode:u({isSimulatedLocally:!1})}))),S.length>0&&f.push(...S.map(({binding:e,instance_name:t})=>({name:e,type:Q(`ai_search`),value:t?String(t):void 0,mode:u({isSimulatedLocally:!1})}))),C.length>0&&f.push(...C.map(({binding:e,namespace:t})=>({name:e,type:Q(`agent_memory`),value:t??void 0,mode:u({isSimulatedLocally:!1})}))),w.length>0&&f.push(...w.map(({binding:e,id:t,remote:n})=>({name:e,type:Q(`hyperdrive`),value:t,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!n})}))),A.length>0&&f.push(...A.map(({binding:e,service_id:t,remote:n})=>({name:e,type:Q(`vpc_service`),value:t,mode:u({isSimulatedLocally:n&&!s.remoteBindingsDisabled?!1:void 0})}))),j.length>0&&f.push(...j.map(({binding:e,tunnel_id:t,network_id:n,remote:r})=>({name:e,type:Q(`vpc_network`),value:t??n,mode:u({isSimulatedLocally:r&&!s.remoteBindingsDisabled?!1:void 0})}))),T.length>0&&f.push(...T.map(({binding:e,bucket_name:t,jurisdiction:n,remote:r})=>{let i=typeof t==`symbol`?t:t?`${t}${n?` (${n})`:``}`:void 0;return{name:e,type:Q(`r2_bucket`),value:i,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!r})}})),E.length>0&&f.push(...E.map(({name:e,destination:t})=>({name:e,type:Q(`logfwdr`),value:t,mode:u()}))),D.length>0&&f.push(...D.map(({binding:e,store_id:t,secret_name:n})=>({name:e,type:Q(`secrets_store_secret`),value:`${t}/${n}`,mode:u({isSimulatedLocally:!0})}))),O.length>0&&f.push(...O.map(({binding:e,namespace:t})=>({name:e,type:Q(`artifacts`),value:t,mode:u({isSimulatedLocally:!1})}))),de.length>0&&f.push(...de.map(({binding:e,enable_timer:t})=>({name:e,type:Q(`unsafe_hello_world`),value:t?`Timer enabled`:`Timer disabled`,mode:u({isSimulatedLocally:!0})}))),fe.length>0&&f.push(...fe.map(({binding:e,app_id:t,remote:n})=>({name:e,type:Q(`flagship`),value:t,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!n})}))),k.length>0&&f.push(...k.map(({binding:e,service:t,entrypoint:n,remote:r,dev:i})=>{let a=t,o;if(n&&(a+=`#${n}`),i!==void 0&&s.local)o=u({isSimulatedLocally:!0});else if(r)o=u({isSimulatedLocally:!1});else if(s.local&&s.registry!==null){if(t===s.name)c=!0,o=u({isSimulatedLocally:!0,connected:!0});else{let e=s.registry?.[t];c=!0,o=e&&e.debugPortAddress?u({isSimulatedLocally:!0,connected:!0}):u({isSimulatedLocally:!0,connected:!1})}}return{name:e,type:Q(`service`),value:a,mode:o}})),M.length>0&&f.push(...M.map(({binding:e,dataset:t,remote:n})=>({name:e,type:Q(`analytics_engine`),value:t??e,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!n})}))),N.length>0&&f.push(...N.map(({binding:e,source:t})=>({name:e,type:Q(`text_blob`),value:`contents`in t?d(t.contents):`path`in t?d(t.path):void 0,mode:u({isSimulatedLocally:!0})}))),P.length>0&&f.push(...P.map(({binding:e,remote:t})=>({name:e,type:Q(`browser`),value:void 0,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!t})}))),ee.length>0&&f.push(...ee.map(({binding:e,remote:t})=>({name:e,type:Q(`analytics`),value:void 0,mode:u({isSimulatedLocally:(t===!0||t===void 0)&&!s.remoteBindingsDisabled?!1:void 0})}))),te.length>0&&f.push(...te.map(({binding:e,remote:t})=>({name:e,type:Q(`images`),value:void 0,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!t})}))),F.length>0&&f.push(...F.map(({binding:e,remote:t})=>({name:e,type:Q(`stream`),value:void 0,mode:u({isSimulatedLocally:(t===!0||t===void 0)&&!s.remoteBindingsDisabled?!1:void 0})}))),L.length>0&&f.push(...L.map(({binding:e,remote:t})=>({name:e,type:Q(`media`),value:void 0,mode:u({isSimulatedLocally:(t===!0||t===void 0)&&!s.remoteBindingsDisabled?!1:void 0})}))),ne.length>0&&f.push(...ne.map(({binding:e,staging:t,remote:n})=>({name:e,type:Q(`ai`),value:t?`staging`:void 0,mode:u({isSimulatedLocally:(n===!0||n===void 0)&&!s.remoteBindingsDisabled?!1:void 0})}))),ce.length>0&&f.push(...ce.map(({binding:e,stream:t,pipeline:n,remote:r})=>({name:e,type:Q(`pipeline`),value:t||n,mode:u({isSimulatedLocally:s.remoteBindingsDisabled||!r})}))),I.length>0&&f.push(...I.map(({binding:e,stream:t})=>({name:e,type:Q(`k2`),value:t,mode:u({isSimulatedLocally:s.remoteBindingsDisabled?void 0:!1})}))),le.length>0&&f.push(...le.map(({name:e,simple:t})=>({name:e,type:Q(`ratelimit`),value:`${t.limit} requests/${t.period}s`,mode:u({isSimulatedLocally:!0})}))),ue.length>0&&f.push(...ue.map(({binding:e})=>({name:e,type:Q(`assets`),value:void 0,mode:u({isSimulatedLocally:!0})}))),re.length>0&&f.push(...re.map(({binding:e})=>({name:e,type:Q(`version_metadata`),value:void 0,mode:u({isSimulatedLocally:!0})}))),me.length>0&&f.push(...me.map(e=>{let t=`dev`in e?e.dev:void 0,n=e.type.slice(7);return{name:e.name,type:t?t.plugin.name:Q(e.type),value:n,mode:u({isSimulatedLocally:!!t})}})),ie.length>0&&f.push(...ie.map(e=>{let{binding:t,type:n,value:r}=e,i;return i=n===`plain_text`&&e.hidden!==!0?`"${d(r)}"`:n===`json`?d(JSON.stringify(r)):`"(hidden)"`,{name:t,type:Q(n),value:i,mode:u({isSimulatedLocally:!0})}})),ae.length>0&&f.push(...ae.map(({binding:e,source:t})=>({name:e,type:Q(`wasm_module`),value:`contents`in t?`<Wasm>`:d(t.path),mode:u({isSimulatedLocally:!0})}))),oe.length>0&&f.push(...oe.map(({binding:e,namespace:t,outbound:n,remote:r})=>({name:e,type:Q(`dispatch_namespace`),value:typeof t==`symbol`?t:n?`${t} (outbound -> ${n.service})`:t,mode:u({isSimulatedLocally:r&&!s.remoteBindingsDisabled?!1:void 0})}))),se.length>0&&f.push(...se.map(({binding:e,certificate_id:t,remote:n})=>({name:e,type:Q(`mtls_certificate`),value:t,mode:u({isSimulatedLocally:n&&!s.remoteBindingsDisabled?!1:void 0})}))),pe.length>0&&f.push(...pe.map(({binding:e})=>({name:e,type:Q(`worker_loader`),value:void 0,mode:u({isSimulatedLocally:!0})}))),f.length===0)s.warnIfNoBindings&&(s.name&&l?r(`No bindings found for ${wx.blue(s.name)}`):r(`No bindings found.`));else{let e;e=s.provisioning?`The following bindings need to be provisioned:`:s.name&&l?`${wx.blue(s.name)} has access to the following bindings:`:`Your Worker has access to the following bindings:`;let t={binding:`Binding`,resource:`Resource`,mode:`Mode`},n=Math.max(...f.map(e=>typeof e.value==`symbol`?9:e.value?.length??0)),i=Math.max(...f.map(e=>e.name.length)),a=Math.max(...f.map(e=>e.type.length),t.resource.length),o=Math.max(...f.map(e=>e.mode?Se(e.mode).length:t.mode.length)),c=f.some(e=>e.mode),u=4+i+2+n+1,d=u+6+a+6+o>=process.stdout.columns;r(e);let p=d?` `.repeat(4):` `.repeat(6);r(`${gD(dD(t.binding),d?4+i:u)}${p}${gD(dD(t.resource),a)}${p}${c?dD(t.mode):``}`);for(let e of f){let t=dD(typeof e.value==`symbol`?wx.italic(`inherited`):e.value??``),n=gD(`${fD(`env.${e.name}`)}${e.value&&!d?` (${t})`:``}`,d?4+i:u),o=d&&e.value?`
364
364
  ${t}`:``;r(`${n}${p}${pD(e.type.padEnd(a))}${p}${c?e.mode:``}${o}`)}r(``)}let he;he=s.name&&l?`${wx.blue(s.name)} is sending Tail events to the following Workers:`:`Your Worker is sending Tail events to the following Workers:`;let ge=[...(o??[]).map(e=>({service:e.service,streaming:!1})),...(i??[]).map(e=>({service:e.service,streaming:!0}))];if(ge.length>0&&r(`${he}
365
365
  ${ge.map(({service:e,streaming:t})=>{let n=`${e}${t?` (streaming)`:``}`;if(s.local&&s.registry!==null){let t=s.registry?.[e];return c=!0,t?`- ${n} ${wx.green(`[connected]`)}`:`- ${n} ${wx.red(`[not connected]`)}`}return`- ${n}`}).join(`
366
366
  `)}`),n.length>0&&!s.provisioning){let e=`The following containers are available:`;s.name&&l&&(e=`The following containers are available from ${wx.blue(s.name)}:`),r(`${e}
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{n}from"./auth-D5Yj9eYU.mjs";import{a as r,t as i}from"./context-BvLXzoMs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-B-CVX0kn.mjs";import{t as c}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-DJF_Rs5S.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/dls/regional_services/prefix_bindings`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,409:`ConflictError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 dls regional-services prefix-bindings create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-D0dXwuME.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/dls/regional_services/prefix_bindings`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,409:`ConflictError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 dls regional-services prefix-bindings create
3
3
 
4
4
  Bind a CIDR from a BYOIP prefix to a region. This requires the **IP Prefixes Write** permission in addition to **DLS Write**, because the binding is created against a BYOIP prefix in Addressing.`).option(`cidr`,{type:`string`,description:`IP prefix in CIDR notation to bind.`}).option(`prefix-id`,{type:`string`,description:`The ID of the parent IP prefix that contains the CIDR.`}).option(`region-key`,{type:`string`,description:`Region key from managed regions (e.g., "us", "eu").`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create a DLS prefix binding`,builder:h,handler:async e=>c({command:`dls regional-services prefix-bindings create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dls regional-services prefix-bindings create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dls/regional_services/prefix_bindings`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({cidr:d(e.cidr,`cidr`,`text`),prefix_id:d(e[`prefix-id`],`prefix-id`,`text`),region_key:d(e[`region-key`],`region-key`,`text`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.cidr===void 0&&(e.cidr=await f(`cidr`,`IP prefix in CIDR notation to bind.`)),e[`prefix-id`]===void 0&&(e[`prefix-id`]=await f(`prefix-id`,`The ID of the parent IP prefix that contains the CIDR.`)),e[`region-key`]===void 0&&(e[`region-key`]=await f(`region-key`,`Region key from managed regions (e.g., "us", "eu").`));let h=u({cidr:d(e.cidr,`cidr`,`text`),prefix_id:d(e[`prefix-id`],`prefix-id`,`text`),region_key:d(e[`region-key`],`region-key`,`text`)}),g=await s(`Creating`,async()=>c.send(m,{body:h,account_id:p}));a(g,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dls/regional_services/prefix_bindings/${t.binding_id}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 dls regional-services prefix-bindings delete <binding-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{n}from"./auth-D5Yj9eYU.mjs";import{a as r,t as i}from"./context-BvLXzoMs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-B-CVX0kn.mjs";import{t as c}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{n as l,r as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-DJF_Rs5S.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/dns_firewall`,body:`json`};function g(e){return e.usage(`$0 dns-firewall create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as l,r as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{n as p}from"./prompt-D0dXwuME.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/dns_firewall`,body:`json`};function h(e){return e.usage(`$0 dns-firewall create
3
3
 
4
4
  Create a DNS Firewall cluster`).option(`attack-mitigation-enabled`,{type:`boolean`,description:`When enabled, automatically mitigate random-prefix attacks to protect upstream DNS servers`}).option(`attack-mitigation-only-when-upstream-unhealthy`,{type:`boolean`,description:`Only mitigate attacks when upstream servers seem unhealthy`}).option(`deprecate-any-requests`,{type:`boolean`,description:`Whether to refuse to answer queries for the ANY type`}).option(`ecs-fallback`,{type:`boolean`,description:`Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent`}).option(`maximum-cache-ttl`,{type:`number`,description:`By default, Cloudflare attempts to cache responses for as long as
5
5
  indicated by the TTL received from upstream nameservers. This setting
@@ -28,9 +28,9 @@ responses (e.g., NXDOMAIN) from the upstream servers.
28
28
  This setting does not affect the TTL value in the DNS response
29
29
  Cloudflare returns to clients. Cloudflare will always forward the TTL
30
30
  value received from upstream nameservers.
31
- `}).option(`ratelimit`,{type:`number`,description:`Maximum number of DNS queries per second that will be forwarded to your upstream nameservers. The limit is enforced per server, where each server receives a fraction of the configured value. The actual aggregate rate for a data center may vary depending on how many servers are present. Responses served from cache do not count toward this limit. Set to null to disable rate limiting.`}).option(`retries`,{type:`number`,description:`Number of retries for fetching DNS responses from upstream nameservers (not counting the initial attempt)`,default:2}).option(`upstream-ips`,{type:`string`,array:!0,description:`The upstream_ips field`}).option(`dns-firewall-ip-count`,{type:`number`,description:`Number of IPv4 addresses to assign to the DNS Firewall cluster. Only used during cluster creation and cannot be changed later.`,default:2}).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 _={command:`create`,describe:`Create DNS Firewall Cluster`,builder:g,handler:async e=>c({command:`dns-firewall create`,classification:{safeFlags:[`attack-mitigation-enabled`,`attack-mitigation-only-when-upstream-unhealthy`,`deprecate-any-requests`,`ecs-fallback`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({attack_mitigation:{enabled:e[`attack-mitigation-enabled`],only_when_upstream_unhealthy:e[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:e[`deprecate-any-requests`],ecs_fallback:e[`ecs-fallback`],maximum_cache_ttl:e[`maximum-cache-ttl`],minimum_cache_ttl:e[`minimum-cache-ttl`],name:f(e.name,`name`,`text`),negative_cache_ttl:e[`negative-cache-ttl`],ratelimit:e.ratelimit,retries:e.retries,upstream_ips:e[`upstream-ips`],dns_firewall_ip_count:e[`dns-firewall-ip-count`]}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(h,{body:t,account_id:u}));a(n,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await p(`name`,`DNS Firewall cluster name`)),e[`upstream-ips`]===void 0)throw Error(`--upstream-ips is required (or pass --body with this field set).`);let m=d({attack_mitigation:{enabled:e[`attack-mitigation-enabled`],only_when_upstream_unhealthy:e[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:e[`deprecate-any-requests`],ecs_fallback:e[`ecs-fallback`],maximum_cache_ttl:e[`maximum-cache-ttl`],minimum_cache_ttl:e[`minimum-cache-ttl`],name:f(e.name,`name`,`text`),negative_cache_ttl:e[`negative-cache-ttl`],ratelimit:e.ratelimit,retries:e.retries,upstream_ips:e[`upstream-ips`],dns_firewall_ip_count:e[`dns-firewall-ip-count`]}),g=await s(`Creating`,async()=>c.send(h,{body:m,account_id:u}));a(g,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}`};function y(e){return e.usage(`$0 dns-firewall delete <dns-firewall-id>
31
+ `}).option(`ratelimit`,{type:`number`,description:`Maximum number of DNS queries per second that will be forwarded to your upstream nameservers. The limit is enforced per server, where each server receives a fraction of the configured value. The actual aggregate rate for a data center may vary depending on how many servers are present. Responses served from cache do not count toward this limit. Set to null to disable rate limiting.`}).option(`retries`,{type:`number`,description:`Number of retries for fetching DNS responses from upstream nameservers (not counting the initial attempt)`,default:2}).option(`upstream-ips`,{type:`string`,array:!0,description:`The upstream_ips field`}).option(`dns-firewall-ip-count`,{type:`number`,description:`Number of IPv4 addresses to assign to the DNS Firewall cluster. Only used during cluster creation and cannot be changed later.`,default:2}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create DNS Firewall Cluster`,builder:h,handler:async e=>c({command:`dns-firewall create`,classification:{safeFlags:[`attack-mitigation-enabled`,`attack-mitigation-only-when-upstream-unhealthy`,`deprecate-any-requests`,`ecs-fallback`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({attack_mitigation:{enabled:e[`attack-mitigation-enabled`],only_when_upstream_unhealthy:e[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:e[`deprecate-any-requests`],ecs_fallback:e[`ecs-fallback`],maximum_cache_ttl:e[`maximum-cache-ttl`],minimum_cache_ttl:e[`minimum-cache-ttl`],name:f(e.name,`name`,`text`),negative_cache_ttl:e[`negative-cache-ttl`],ratelimit:e.ratelimit,retries:e.retries,upstream_ips:e[`upstream-ips`],dns_firewall_ip_count:e[`dns-firewall-ip-count`]}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:u}));a(n,{successLabel:`Created`});return}let p=d({attack_mitigation:{enabled:e[`attack-mitigation-enabled`],only_when_upstream_unhealthy:e[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:e[`deprecate-any-requests`],ecs_fallback:e[`ecs-fallback`],maximum_cache_ttl:e[`maximum-cache-ttl`],minimum_cache_ttl:e[`minimum-cache-ttl`],name:f(e.name,`name`,`text`),negative_cache_ttl:e[`negative-cache-ttl`],ratelimit:e.ratelimit,retries:e.retries,upstream_ips:e[`upstream-ips`],dns_firewall_ip_count:e[`dns-firewall-ip-count`]}),h=await s(`Creating`,async()=>c.send(m,{body:p,account_id:u}));a(h,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}`};function v(e){return e.usage(`$0 dns-firewall delete <dns-firewall-id>
32
32
 
33
- Delete a DNS Firewall cluster`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <dns-firewall-id>`,describe:`Delete DNS Firewall Cluster`,builder:y,handler:async e=>c({command:`dns-firewall delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(v,{account_id:l,dns_firewall_id:e[`dns-firewall-id`]}));a(u,{successLabel:`Deleted`})})};var x={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}`,body:`json`};function S(e){return e.usage(`$0 dns-firewall edit <dns-firewall-id>
33
+ Delete a DNS Firewall cluster`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,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 y={command:`delete <dns-firewall-id>`,describe:`Delete DNS Firewall Cluster`,builder:v,handler:async e=>c({command:`dns-firewall delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(_,{account_id:l,dns_firewall_id:e[`dns-firewall-id`]}));a(u,{successLabel:`Deleted`})})};var b={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}`,body:`json`};function x(e){return e.usage(`$0 dns-firewall edit <dns-firewall-id>
34
34
 
35
35
  Modify the configuration of a DNS Firewall cluster`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`attack-mitigation-enabled`,{type:`boolean`,description:`When enabled, automatically mitigate random-prefix attacks to protect upstream DNS servers`}).option(`attack-mitigation-only-when-upstream-unhealthy`,{type:`boolean`,description:`Only mitigate attacks when upstream servers seem unhealthy`}).option(`deprecate-any-requests`,{type:`boolean`,description:`Whether to refuse to answer queries for the ANY type`}).option(`ecs-fallback`,{type:`boolean`,description:`Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent`}).option(`maximum-cache-ttl`,{type:`number`,description:`By default, Cloudflare attempts to cache responses for as long as
36
36
  indicated by the TTL received from upstream nameservers. This setting
@@ -59,12 +59,12 @@ responses (e.g., NXDOMAIN) from the upstream servers.
59
59
  This setting does not affect the TTL value in the DNS response
60
60
  Cloudflare returns to clients. Cloudflare will always forward the TTL
61
61
  value received from upstream nameservers.
62
- `}).option(`ratelimit`,{type:`number`,description:`Maximum number of DNS queries per second that will be forwarded to your upstream nameservers. The limit is enforced per server, where each server receives a fraction of the configured value. The actual aggregate rate for a data center may vary depending on how many servers are present. Responses served from cache do not count toward this limit. Set to null to disable rate limiting.`}).option(`retries`,{type:`number`,description:`Number of retries for fetching DNS responses from upstream nameservers (not counting the initial attempt)`}).option(`upstream-ips`,{type:`string`,array:!0,description:`The upstream_ips field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`edit <dns-firewall-id>`,describe:`Update DNS Firewall Cluster`,builder:S,handler:async e=>c({command:`dns-firewall edit`,classification:{safeFlags:[`attack-mitigation-enabled`,`attack-mitigation-only-when-upstream-unhealthy`,`deprecate-any-requests`,`ecs-fallback`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({attack_mitigation:{enabled:e[`attack-mitigation-enabled`],only_when_upstream_unhealthy:e[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:e[`deprecate-any-requests`],ecs_fallback:e[`ecs-fallback`],maximum_cache_ttl:e[`maximum-cache-ttl`],minimum_cache_ttl:e[`minimum-cache-ttl`],name:f(e.name,`name`,`text`),negative_cache_ttl:e[`negative-cache-ttl`],ratelimit:e.ratelimit,retries:e.retries,upstream_ips:e[`upstream-ips`]}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(x,{body:t,account_id:u,dns_firewall_id:e[`dns-firewall-id`]}));a(n,{successLabel:`Updated`});return}let p=d({attack_mitigation:{enabled:e[`attack-mitigation-enabled`],only_when_upstream_unhealthy:e[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:e[`deprecate-any-requests`],ecs_fallback:e[`ecs-fallback`],maximum_cache_ttl:e[`maximum-cache-ttl`],minimum_cache_ttl:e[`minimum-cache-ttl`],name:f(e.name,`name`,`text`),negative_cache_ttl:e[`negative-cache-ttl`],ratelimit:e.ratelimit,retries:e.retries,upstream_ips:e[`upstream-ips`]}),m=await s(`Updating`,async()=>c.send(x,{body:p,account_id:u,dns_firewall_id:e[`dns-firewall-id`]}));a(m,{successLabel:`Updated`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}`};function T(e){return e.usage(`$0 dns-firewall get <dns-firewall-id>
62
+ `}).option(`ratelimit`,{type:`number`,description:`Maximum number of DNS queries per second that will be forwarded to your upstream nameservers. The limit is enforced per server, where each server receives a fraction of the configured value. The actual aggregate rate for a data center may vary depending on how many servers are present. Responses served from cache do not count toward this limit. Set to null to disable rate limiting.`}).option(`retries`,{type:`number`,description:`Number of retries for fetching DNS responses from upstream nameservers (not counting the initial attempt)`}).option(`upstream-ips`,{type:`string`,array:!0,description:`The upstream_ips field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`edit <dns-firewall-id>`,describe:`Update DNS Firewall Cluster`,builder:x,handler:async e=>c({command:`dns-firewall edit`,classification:{safeFlags:[`attack-mitigation-enabled`,`attack-mitigation-only-when-upstream-unhealthy`,`deprecate-any-requests`,`ecs-fallback`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({attack_mitigation:{enabled:e[`attack-mitigation-enabled`],only_when_upstream_unhealthy:e[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:e[`deprecate-any-requests`],ecs_fallback:e[`ecs-fallback`],maximum_cache_ttl:e[`maximum-cache-ttl`],minimum_cache_ttl:e[`minimum-cache-ttl`],name:f(e.name,`name`,`text`),negative_cache_ttl:e[`negative-cache-ttl`],ratelimit:e.ratelimit,retries:e.retries,upstream_ips:e[`upstream-ips`]}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(b,{body:t,account_id:u,dns_firewall_id:e[`dns-firewall-id`]}));a(n,{successLabel:`Updated`});return}let p=d({attack_mitigation:{enabled:e[`attack-mitigation-enabled`],only_when_upstream_unhealthy:e[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:e[`deprecate-any-requests`],ecs_fallback:e[`ecs-fallback`],maximum_cache_ttl:e[`maximum-cache-ttl`],minimum_cache_ttl:e[`minimum-cache-ttl`],name:f(e.name,`name`,`text`),negative_cache_ttl:e[`negative-cache-ttl`],ratelimit:e.ratelimit,retries:e.retries,upstream_ips:e[`upstream-ips`]}),m=await s(`Updating`,async()=>c.send(b,{body:p,account_id:u,dns_firewall_id:e[`dns-firewall-id`]}));a(m,{successLabel:`Updated`})})};var C={method:`GET`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}`};function w(e){return e.usage(`$0 dns-firewall get <dns-firewall-id>
63
63
 
64
- Show a single DNS Firewall cluster for an account`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <dns-firewall-id>`,describe:`DNS Firewall Cluster Details`,builder:T,handler:async e=>c({command:`dns-firewall get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(w,{account_id:l,dns_firewall_id:e[`dns-firewall-id`]}));a(u,{successLabel:`Loaded`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/dns_firewall`,query:[`page`,`per_page`]};function O(e){return e.usage(`$0 dns-firewall list
64
+ Show a single DNS Firewall cluster for an account`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <dns-firewall-id>`,describe:`DNS Firewall Cluster Details`,builder:w,handler:async e=>c({command:`dns-firewall get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(C,{account_id:l,dns_firewall_id:e[`dns-firewall-id`]}));a(u,{successLabel:`Loaded`})})};var E={method:`GET`,path:t=>e`/accounts/${t.account_id}/dns_firewall`,query:[`page`,`per_page`]};function D(e){return e.usage(`$0 dns-firewall list
65
65
 
66
- List DNS Firewall clusters for an account`).option(`page`,{type:`number`,description:`Page number of paginated results`}).option(`per-page`,{type:`number`,description:`Number of clusters per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List DNS Firewall Clusters`,builder:O,handler:async e=>c({command:`dns-firewall list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf dns-firewall list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_firewall`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(D,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var A={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}/reverse_dns`,body:`json`};function j(e){return e.usage(`$0 dns-firewall reverse-dns edit <dns-firewall-id>
66
+ List DNS Firewall clusters for an account`).option(`page`,{type:`number`,description:`Page number of paginated results`}).option(`per-page`,{type:`number`,description:`Number of clusters per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List DNS Firewall Clusters`,builder:D,handler:async e=>c({command:`dns-firewall list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf dns-firewall list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_firewall`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(E,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var k={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}/reverse_dns`,body:`json`};function A(e){return e.usage(`$0 dns-firewall reverse-dns edit <dns-firewall-id>
67
67
 
68
- Update reverse DNS configuration (PTR records) for a DNS Firewall cluster`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`ptr`,{type:`string`,description:`Map of cluster IP addresses to PTR record contents. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`edit <dns-firewall-id>`,describe:`Update DNS Firewall Cluster Reverse DNS`,builder:j,handler:async e=>c({command:`dns-firewall reverse-dns edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.body===void 0&&e.ptr===void 0)throw Error(`--body is required unless at least one JSON map flag is provided (--ptr).`);if(e.dryRun){let t=await r();o({command:`cf dns-firewall reverse-dns edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}/reverse_dns`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({ptr:u(e.ptr,`ptr`)},[[`ptr`]]):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(A,{body:t,account_id:f,dns_firewall_id:e[`dns-firewall-id`]}));a(n,{successLabel:`Updated`});return}let p=d({ptr:u(e.ptr,`ptr`)},[[`ptr`]]),m=await s(`Updating`,async()=>c.send(A,{body:p,account_id:f,dns_firewall_id:e[`dns-firewall-id`]}));a(m,{successLabel:`Updated`})})};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}/reverse_dns`};function P(e){return e.usage(`$0 dns-firewall reverse-dns get <dns-firewall-id>
68
+ Update reverse DNS configuration (PTR records) for a DNS Firewall cluster`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`ptr`,{type:`string`,description:`Map of cluster IP addresses to PTR record contents. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const j={command:`edit <dns-firewall-id>`,describe:`Update DNS Firewall Cluster Reverse DNS`,builder:A,handler:async e=>c({command:`dns-firewall reverse-dns edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.body===void 0&&e.ptr===void 0)throw Error(`--body is required unless at least one JSON map flag is provided (--ptr).`);if(e.dryRun){let t=await r();o({command:`cf dns-firewall reverse-dns edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}/reverse_dns`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({ptr:u(e.ptr,`ptr`)},[[`ptr`]]):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(k,{body:t,account_id:f,dns_firewall_id:e[`dns-firewall-id`]}));a(n,{successLabel:`Updated`});return}let p=d({ptr:u(e.ptr,`ptr`)},[[`ptr`]]),m=await s(`Updating`,async()=>c.send(k,{body:p,account_id:f,dns_firewall_id:e[`dns-firewall-id`]}));a(m,{successLabel:`Updated`})})};var M={method:`GET`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}/reverse_dns`};function N(e){return e.usage(`$0 dns-firewall reverse-dns get <dns-firewall-id>
69
69
 
70
- Show reverse DNS configuration (PTR records) for a DNS Firewall cluster`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <dns-firewall-id>`,describe:`Show DNS Firewall Cluster Reverse DNS`,builder:P,handler:async e=>c({command:`dns-firewall reverse-dns get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall reverse-dns get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}/reverse_dns`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(N,{account_id:l,dns_firewall_id:e[`dns-firewall-id`]}));a(u,{successLabel:`Loaded`})})},I={command:`reverse-dns`,describe:`Operations for reverse-dns`,builder:e=>e.command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},L={command:`dns-firewall`,describe:`dns-firewall`,builder:e=>e.command(_).command(b).command(C).command(E).command(k).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{L as default};
70
+ Show reverse DNS configuration (PTR records) for a DNS Firewall cluster`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get <dns-firewall-id>`,describe:`Show DNS Firewall Cluster Reverse DNS`,builder:N,handler:async e=>c({command:`dns-firewall reverse-dns get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall reverse-dns get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}/reverse_dns`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(M,{account_id:l,dns_firewall_id:e[`dns-firewall-id`]}));a(u,{successLabel:`Loaded`})})},F={command:`reverse-dns`,describe:`Operations for reverse-dns`,builder:e=>e.command(j).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},I={command:`dns-firewall`,describe:`dns-firewall`,builder:e=>e.command(g).command(y).command(S).command(T).command(O).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{I as default};