cf 0.13.0 → 0.14.0

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 (266) hide show
  1. package/dist/_meta/agent-context.json +189 -187
  2. package/dist/_meta/commands.json +2591 -2248
  3. package/dist/_meta/hand-written-commands.json +146 -1
  4. package/dist/_meta/schemas.json +1548 -1313
  5. package/dist/{abuse-reports-BbaHw4ST.mjs → abuse-reports-CDFjJ2e8.mjs} +1 -1
  6. package/dist/{access-D6Xz892p.mjs → access-BoT1waG4.mjs} +1 -1
  7. package/dist/{account-DvxcqeaK.mjs → account-agnMUKWj.mjs} +1 -1
  8. package/dist/{account-tags-CeqfEWpz.mjs → account-tags-BRMMHCee.mjs} +1 -1
  9. package/dist/{accounts-Bx-8BMH9.mjs → accounts-Cut77dAt.mjs} +2 -2
  10. package/dist/{acm--0opdSGE.mjs → acm-C8WgXNCl.mjs} +1 -1
  11. package/dist/{addressing-BS1ynzLA.mjs → addressing-CR8EV42x.mjs} +1 -1
  12. package/dist/{agent-context-BPhyrSns.mjs → agent-context-Wj5TRRbW.mjs} +1 -1
  13. package/dist/{agent-memory-DczzpEw5.mjs → agent-memory-CVJpKKZy.mjs} +1 -1
  14. package/dist/{ai-CDdCTcQl.mjs → ai-BbNYt-yI.mjs} +1 -1
  15. package/dist/{ai-audit-Bx9KMQYh.mjs → ai-audit-mVajM-2i.mjs} +1 -1
  16. package/dist/{ai-gateway-BSXJEaYS.mjs → ai-gateway-BsepSA_v.mjs} +2 -2
  17. package/dist/{ai-search-DRQj1aMu.mjs → ai-search-DbEJqm5-.mjs} +1 -1
  18. package/dist/{ai-security-C_Rb0lGT.mjs → ai-security-DmyB5EYk.mjs} +1 -1
  19. package/dist/{alerting-BAR9eFs2.mjs → alerting-dmy3hd8O.mjs} +3 -3
  20. package/dist/analytics-B1xBMla0.mjs +5 -0
  21. package/dist/{analytics_engine-DkEzlhfT.mjs → analytics_engine-DazCn3iC.mjs} +1 -1
  22. package/dist/{api-security-jA0lOk6a.mjs → api-security-0HXCzfHk.mjs} +1 -1
  23. package/dist/{argo-Cz4pDagx.mjs → argo-DSHsE8zv.mjs} +1 -1
  24. package/dist/{artifacts-BcLTGfAv.mjs → artifacts-CwiU9Mxu.mjs} +1 -1
  25. package/dist/{audit-logs-DbIv4n6u.mjs → audit-logs-DwFtMDwH.mjs} +1 -1
  26. package/dist/{auth-rW5d3jtr.mjs → auth-B0ZyXc3y.mjs} +1 -1
  27. package/dist/{auth-tvDdC1J-.mjs → auth-DWxtJ918.mjs} +2 -2
  28. package/dist/{billing-Md87QjqW.mjs → billing-Cbpadkgu.mjs} +1 -1
  29. package/dist/{bot-management-VHMo4hpU.mjs → bot-management-B6M2Vyyn.mjs} +1 -1
  30. package/dist/{botnet-feed-BHqfo3sa.mjs → botnet-feed-Dn8UuE4h.mjs} +1 -1
  31. package/dist/{brand-protection-HUeR6Pof.mjs → brand-protection-B5R0b3pu.mjs} +1 -1
  32. package/dist/{browser-extension-199oZg3X.mjs → browser-extension-D55pYZf_.mjs} +1 -1
  33. package/dist/{browser-run-DDasyux-.mjs → browser-run-C1b2VkGB.mjs} +1 -1
  34. package/dist/build-CP2JUfV1.mjs +2 -0
  35. package/dist/{builds-B-lXn6JR.mjs → builds-CVEXO_4a.mjs} +8 -8
  36. package/dist/{cache-CevKpiTM.mjs → cache-BU5xX82E.mjs} +1 -1
  37. package/dist/{certificate-authorities-DAg-aO1B.mjs → certificate-authorities--tZTWJWD.mjs} +1 -1
  38. package/dist/cf-BV2HLCQm.mjs +18 -0
  39. package/dist/{chunk-QBZBEHZB-BuiXJn8j.mjs → chunk-QBZBEHZB-BcCMlc8C.mjs} +1 -1
  40. package/dist/chunk-XLADBZ7F-DgFrtUhW.mjs +103 -0
  41. package/dist/{client-certificates-Bay7oPLE.mjs → client-certificates-DX84qeYG.mjs} +1 -1
  42. package/dist/{client-side-security-CbU9xn0k.mjs → client-side-security-DsSO2rZQ.mjs} +1 -1
  43. package/dist/{cloud-connector-AH2ClcSL.mjs → cloud-connector-cf8qlxap.mjs} +1 -1
  44. package/dist/{cloudforce-one-DwOfS75V.mjs → cloudforce-one-DzVXorbu.mjs} +2 -2
  45. package/dist/command-BL6weJf3.mjs +3 -0
  46. package/dist/command-DYrspBc0.mjs +2 -0
  47. package/dist/{completions-nPO9PdSu.mjs → completions-Dn621okY.mjs} +1 -1
  48. package/dist/{config-B8lwPpVl.mjs → config-BY6KpMZs.mjs} +1 -1
  49. package/dist/config.d.mts +1 -1729
  50. package/dist/config.mjs +1 -1
  51. package/dist/{connector-interrupts-DcLrqM2V.mjs → connector-interrupts-DqpqPPkp.mjs} +1 -1
  52. package/dist/{connector-telemetry-events-PrJWgNs9.mjs → connector-telemetry-events-CCD-_B-8.mjs} +1 -1
  53. package/dist/{connector-telemetry-snapshots-CIjJm5yu.mjs → connector-telemetry-snapshots-D3CeGGhk.mjs} +1 -1
  54. package/dist/{connectors-CEAy30E-.mjs → connectors-aPQspZdg.mjs} +1 -1
  55. package/dist/{containers-BsbDqbSn.mjs → containers-D0Kjl8h-.mjs} +1 -1
  56. package/dist/{content-scan-BdK936iO.mjs → content-scan-BVx18XmS.mjs} +1 -1
  57. package/dist/{cps-oP97-qkm.mjs → cps-ByazyM0x.mjs} +1 -1
  58. package/dist/{csamScanner-DUNN4INg.mjs → csamScanner-OG5lQxBC.mjs} +1 -1
  59. package/dist/{ct-alerting-dV_gsV2w.mjs → ct-alerting-BJx5n8Zf.mjs} +1 -1
  60. package/dist/{custom-certificates-DYspvjo4.mjs → custom-certificates-BuJ2e9TA.mjs} +1 -1
  61. package/dist/{custom-csrs-DjSWLQRu.mjs → custom-csrs-CR_5qbST.mjs} +1 -1
  62. package/dist/{custom-hostnames-df1lH6IY.mjs → custom-hostnames-BzDTsQXb.mjs} +1 -1
  63. package/dist/{custom-nameservers-CLTbN-9R.mjs → custom-nameservers-OfMPRGkD.mjs} +1 -1
  64. package/dist/custom-pages-BmGXoTIo.mjs +3 -0
  65. package/dist/d1-DedC8N0N.mjs +21 -0
  66. package/dist/data-security-B2UB26ry.mjs +7 -0
  67. package/dist/{dcv-delegation-_r6Vc6VL.mjs → dcv-delegation-C11vmzbG.mjs} +1 -1
  68. package/dist/{deploy-QTGENpOM.mjs → deploy-BtETDvDA.mjs} +1 -1
  69. package/dist/{deploy-input-C7W1Bsji.mjs → deploy-input-BoLTdQzS.mjs} +1 -1
  70. package/dist/{dev-CAubuxCc.mjs → dev-B5WcIpEr.mjs} +2 -2
  71. package/dist/{diagnostics-B0DRh714.mjs → diagnostics-Cf6BLpAo.mjs} +1 -1
  72. package/dist/dialog-Bud0hiYv.mjs +2 -0
  73. package/dist/{dist-DW5BPGFs.mjs → dist-BRg_z9Ut.mjs} +1 -1
  74. package/dist/{shared-YJtB5KZB.mjs → dist-CFQREIRi.mjs} +86 -86
  75. package/dist/dist-CyisSore.mjs +371 -0
  76. package/dist/dist-Dr4Hg_Up.mjs +48 -0
  77. package/dist/{dls-CFzTHcZM.mjs → dls-R6PvHbhj.mjs} +1 -1
  78. package/dist/{dns-Dw6u-NV1.mjs → dns-Cl8se64c.mjs} +1 -1
  79. package/dist/{dns-firewall-CIPptslp.mjs → dns-firewall-WtmKilDT.mjs} +1 -1
  80. package/dist/dry-run-YSQndLvt.mjs +2 -0
  81. package/dist/{durable-objects-CCkeqqBq.mjs → durable-objects-jfVU6yp_.mjs} +1 -1
  82. package/dist/{email-auth-kdxO51Oz.mjs → email-auth-DPmZ85eW.mjs} +1 -1
  83. package/dist/{email-routing-BLggZdQq.mjs → email-routing-Bf6DbNTr.mjs} +1 -1
  84. package/dist/{email-security-DjADlgdM.mjs → email-security-DTifjSxM.mjs} +1 -1
  85. package/dist/{email-sending-Cz7E7GoP.mjs → email-sending-Dm3WkFHV.mjs} +1 -1
  86. package/dist/{error-sanitization-DfLijlBJ.mjs → error-sanitization-D8zuyPj_.mjs} +1 -1
  87. package/dist/{fieldExtractors-BWaMi6lD.mjs → fieldExtractors-CeXZL0-I.mjs} +1 -1
  88. package/dist/{firewall-5t6OBIOl.mjs → firewall-D5N2APXO.mjs} +1 -1
  89. package/dist/{flagship-CzG_VoNR.mjs → flagship-sUOy9jei.mjs} +1 -1
  90. package/dist/{fraud-UOg_69Ob.mjs → fraud-WLW2Ep1Z.mjs} +1 -1
  91. package/dist/{google-tag-gateway-DirkD-Q2.mjs → google-tag-gateway-lbww1FaJ.mjs} +1 -1
  92. package/dist/{healthchecks-BkHZGTp1.mjs → healthchecks-0ih8Qjiw.mjs} +1 -1
  93. package/dist/{hostnames-EUYOZm21.mjs → hostnames-Ba6FuL8K.mjs} +1 -1
  94. package/dist/{hyperdrive-ZoLJlJCL.mjs → hyperdrive-DMqcU639.mjs} +1 -1
  95. package/dist/{iam-BQ2xSgYN.mjs → iam-CXlYm0uC.mjs} +1 -1
  96. package/dist/{images-CkEq6ScP.mjs → images-D_g1oli6.mjs} +1 -1
  97. package/dist/index.mjs +1 -1
  98. package/dist/{intel-DDWEdGyl.mjs → intel-B8bS0ARd.mjs} +1 -1
  99. package/dist/interactive-CGOh-aYq.mjs +32 -0
  100. package/dist/{ips-54Qmy-Uw.mjs → ips-68fzniN4.mjs} +1 -1
  101. package/dist/{keyless-certificates-CXHLc3Qz.mjs → keyless-certificates-CeLnqBvX.mjs} +1 -1
  102. package/dist/{keys-rvI4TC3Z.mjs → keys-DkVdS2lF.mjs} +1 -1
  103. package/dist/{kv-CAeN1zBy.mjs → kv-gDAN50BQ.mjs} +1 -1
  104. package/dist/{leaked-credential-checks-CbbwtG-p.mjs → leaked-credential-checks-DfnvHpvg.mjs} +1 -1
  105. package/dist/{lifecycle-XswDq0ZB.mjs → lifecycle-CadF_i2n.mjs} +1 -1
  106. package/dist/{load-balancers-BFwdwAIU.mjs → load-balancers-m0HqyXPZ.mjs} +1 -1
  107. package/dist/{local-C6XsFD_W.mjs → local-BwL_gesw.mjs} +1 -1
  108. package/dist/{local-runtime-BUGCbx8r.mjs → local-runtime-Dj8k-p62.mjs} +1 -1
  109. package/dist/{logo-matches-Y3PxVn7t.mjs → logo-matches-DPbHlsKQ.mjs} +1 -1
  110. package/dist/{logos-BN8SvJhS.mjs → logos-DFBJFAYJ.mjs} +1 -1
  111. package/dist/{logpush-BnLA4WVm.mjs → logpush-gzmlZayc.mjs} +1 -1
  112. package/dist/logs-BuzwQgt5.mjs +18 -0
  113. package/dist/{magic-cloud-networking-wPuLwu-F.mjs → magic-cloud-networking-BbHCi1Vp.mjs} +1 -1
  114. package/dist/{magic-network-monitoring-BNERUpxS.mjs → magic-network-monitoring-kWMmnPTG.mjs} +1 -1
  115. package/dist/{magic-transit-6tvVOECW.mjs → magic-transit-ClSmJDKw.mjs} +1 -1
  116. package/dist/{managed-defense-AYwBOYIH.mjs → managed-defense-EOihg1UR.mjs} +1 -1
  117. package/dist/{managed-transforms-HZZNrkC7.mjs → managed-transforms-BZ_XdGE2.mjs} +1 -1
  118. package/dist/{matches-Dp91L3dL.mjs → matches-B6sG0_fr.mjs} +1 -1
  119. package/dist/{mcp-P7pcieiT.mjs → mcp--kK0vS5i.mjs} +1 -1
  120. package/dist/{mesh-DjFrk6PL.mjs → mesh-DfXYUHOO.mjs} +1 -1
  121. package/dist/{mtls-certificates-DZMoef2H.mjs → mtls-certificates-DZd-0X7l.mjs} +1 -1
  122. package/dist/{network-7cd1U6-I.mjs → network-U6f_5ihp.mjs} +1 -1
  123. package/dist/{network-interconnects-CQ7cPZjK.mjs → network-interconnects-DKZGTiYM.mjs} +1 -1
  124. package/dist/oauth-BdVr2hJp.mjs +14 -0
  125. package/dist/{oauth-clients-P9t-eMnx.mjs → oauth-clients-CY3OkPhC.mjs} +1 -1
  126. package/dist/{oauth-scopes-C3r9Qh_y.mjs → oauth-scopes-BTY7_5L-.mjs} +1 -1
  127. package/dist/{observability-M1DnLhMR.mjs → observability-Bsp-LdmJ.mjs} +1 -1
  128. package/dist/{open-PBXRGS4R-DARSUDEI.mjs → open-PBXRGS4R-ClEt4E8F.mjs} +3 -3
  129. package/dist/{organization-cUE7GDCt.mjs → organization-BSeMdj-7.mjs} +1 -1
  130. package/dist/{organizations-C-Hcpd0w.mjs → organizations-BroR48Nv.mjs} +1 -1
  131. package/dist/{origin-ca-certificates-C8cJMyQH.mjs → origin-ca-certificates-jC-EMn6W.mjs} +1 -1
  132. package/dist/{origin-post-quantum-encryption-DjZJCk8M.mjs → origin-post-quantum-encryption-DIspLvA0.mjs} +1 -1
  133. package/dist/{origin-tls-client-auth-BsjR5EAV.mjs → origin-tls-client-auth-CZ_nUEcM.mjs} +1 -1
  134. package/dist/{page-rules-B-zq1EUb.mjs → page-rules-ZcdjPohY.mjs} +1 -1
  135. package/dist/{pages-B6YpkPos.mjs → pages-W4tKa7xk.mjs} +1 -1
  136. package/dist/pay-per-crawl-BNM1mJmP.mjs +5 -0
  137. package/dist/pay-per-use-DKxlnkH3.mjs +2 -0
  138. package/dist/{pipelines-BJc_RylD.mjs → pipelines-Dug0BR-c.mjs} +1 -1
  139. package/dist/{precursor-CLQu7suY.mjs → precursor-D-11DkRU.mjs} +1 -1
  140. package/dist/previews-D_Nv4dR6.mjs +4 -0
  141. package/dist/{progress-V6SZV3Ux.mjs → progress-a5IKeKni.mjs} +1 -1
  142. package/dist/project-settings-Bc3wYHo8.mjs +3 -0
  143. package/dist/prompt-BP8XrQSj.mjs +3 -0
  144. package/dist/{queries-DSrrket-.mjs → queries-BdA2vJoe.mjs} +1 -1
  145. package/dist/{queues-Tf7kPBpn.mjs → queues-Bu06ZqUE.mjs} +1 -1
  146. package/dist/{r2-DmKNnxtC.mjs → r2-COC9wMKb.mjs} +1 -1
  147. package/dist/{r2-data-catalog-DBxoifOq.mjs → r2-data-catalog-CX5Rl5Qx.mjs} +1 -1
  148. package/dist/{radar-Csk7Ab-b.mjs → radar-L-yoLIHF.mjs} +1 -1
  149. package/dist/{raw-fetch-BVYQR6C5.mjs → raw-fetch-DNH2V8qH.mjs} +1 -1
  150. package/dist/{realtime-CDehZVhV.mjs → realtime-JKIiXfzi.mjs} +1 -1
  151. package/dist/{registrar-vflzeNQ9.mjs → registrar-_dYUZrK0.mjs} +2 -2
  152. package/dist/{registrar-sandbox-BxVdfnam.mjs → registrar-sandbox-D1yfW_Q_.mjs} +2 -2
  153. package/dist/{registry-CWUfXloz.mjs → registry-BrtVdMrC.mjs} +1 -1
  154. package/dist/{reporting-BaPZ1PHN.mjs → reporting-3fyoMcmb.mjs} +1 -1
  155. package/dist/request-headers-BhQQAfJt.mjs +2 -0
  156. package/dist/{request-tracers-C_UVBexV.mjs → request-tracers-TisEth2p.mjs} +1 -1
  157. package/dist/{resolve-B8CyM1mi.mjs → resolve-CYUp6YgC.mjs} +1 -1
  158. package/dist/{resource-sharing-CoB4S9j1.mjs → resource-sharing-C4-dnohU.mjs} +1 -1
  159. package/dist/{resource-tagging-CUiUC5g4.mjs → resource-tagging-BRDifKqM.mjs} +1 -1
  160. package/dist/{rules-4O8076_s.mjs → rules-BCF3gIkw.mjs} +2 -2
  161. package/dist/{rulesets-C84MxTYo.mjs → rulesets-wp6rllt3.mjs} +1 -1
  162. package/dist/{rum-Bvwkrntx.mjs → rum-B77awgoB.mjs} +1 -1
  163. package/dist/run-BS8otL3u.mjs +2 -0
  164. package/dist/{schema-C8hU6G9R.mjs → schema-DmuJtMN5.mjs} +1 -1
  165. package/dist/{schema-flags-DC4c6dka.mjs → schema-flags-CUGxFeZe.mjs} +4 -4
  166. package/dist/{scim-BvxQmde6.mjs → scim-C9BmUYil.mjs} +1 -1
  167. package/dist/{sdk-C12y5qCN.mjs → sdk-Bvqx-_3z.mjs} +1 -1
  168. package/dist/{secrets-store-DOKWiC-j.mjs → secrets-store-ckkZR2dM.mjs} +1 -1
  169. package/dist/{security-center-Bhy_aC-w.mjs → security-center-BCahKT57.mjs} +1 -1
  170. package/dist/{security-txt-L7HJ9tq5.mjs → security-txt-0SI5du7I.mjs} +1 -1
  171. package/dist/shared-D0B-7q-D.mjs +2 -0
  172. package/dist/{smart-shield-COMXuQ1S.mjs → smart-shield-BDPbrZa4.mjs} +1 -1
  173. package/dist/{snippets-DffQhlKt.mjs → snippets-CVRR_h0i.mjs} +1 -1
  174. package/dist/spawn-DP4T92ss.mjs +519 -0
  175. package/dist/{spectrum-Cmf7SqQE.mjs → spectrum-CjNXQIQE.mjs} +3 -3
  176. package/dist/{speed-m8cdhLFS.mjs → speed-CrXCHk3h.mjs} +1 -1
  177. package/dist/src-BbnV77C4.mjs +108 -0
  178. package/dist/{ssl-D4ffsdSw.mjs → ssl-DKORhHkh.mjs} +1 -1
  179. package/dist/{startup-profile-Dx95Y5cl.mjs → startup-profile-CBIH6yZy.mjs} +3 -3
  180. package/dist/{state-CHif8Y5I.mjs → state-QUu6HfxC.mjs} +1 -1
  181. package/dist/{stream-DPF5fojV.mjs → stream-wY3zi3FK.mjs} +1 -1
  182. package/dist/{submit-Br8hfP0_.mjs → submit-B-4oCBSk.mjs} +1 -1
  183. package/dist/{tags-Bnt4JuxQ.mjs → tags-5uJEkYJZ.mjs} +1 -1
  184. package/dist/{telemetry-DjGNSlkU.mjs → telemetry-2s9Y3FaN.mjs} +1 -1
  185. package/dist/{telemetry-Ch1vCICm.mjs → telemetry-n3NJourL.mjs} +1 -1
  186. package/dist/{tenant-D8u0CxoC.mjs → tenant-BkFvv2o3.mjs} +1 -1
  187. package/dist/{tenant-custom-nameservers-BrWMyslZ.mjs → tenant-custom-nameservers-DcjC1q0r.mjs} +1 -1
  188. package/dist/{tools-D9RZkZRc.mjs → tools-Dz1JCrHd.mjs} +1 -1
  189. package/dist/tunnel-Cd4ipbvJ.mjs +2 -0
  190. package/dist/{tunnels-BkNPpTHa.mjs → tunnels-9Zg3ePwD.mjs} +1 -1
  191. package/dist/{turnstile-MgwRECJv.mjs → turnstile-BTwKYpzD.mjs} +1 -1
  192. package/dist/{url-info-Ddp7MgcI.mjs → url-info-D7Y61BFd.mjs} +1 -1
  193. package/dist/{url-normalization-3ptK9ntV.mjs → url-normalization-B4n8HiNQ.mjs} +1 -1
  194. package/dist/{url-scanner-Psb9ollR.mjs → url-scanner-CiCIltSQ.mjs} +1 -1
  195. package/dist/{user-DWdshcIu.mjs → user-DDFDGJ0Y.mjs} +1 -1
  196. package/dist/{values-CDKQL1z2.mjs → values-DRznB_Cl.mjs} +1 -1
  197. package/dist/{vectorize-CTYYUyQj.mjs → vectorize-CbznPhzq.mjs} +1 -1
  198. package/dist/waiting-rooms-CKP5hYBK.mjs +11 -0
  199. package/dist/{web-assets-CpDwDEx8.mjs → web-assets-C-ZoSkkh.mjs} +1 -1
  200. package/dist/{web3-YsjDyAzH.mjs → web3-DwlN4dOw.mjs} +1 -1
  201. package/dist/{workers-builds-BWo5vUA9.mjs → workers-builds-ECw_x_kp.mjs} +1 -1
  202. package/dist/{workers-for-platforms-ASJsxYdM.mjs → workers-for-platforms-BYGy46R6.mjs} +2 -2
  203. package/dist/{workers-vpc-RkTnRvA2.mjs → workers-vpc-CCosFcxz.mjs} +1 -1
  204. package/dist/workers-zFMrbUkg.mjs +6 -0
  205. package/dist/{workflows-KrIFI9ns.mjs → workflows-C8GXGDRW.mjs} +1 -1
  206. package/dist/{zaraz-DglXbVzZ.mjs → zaraz-B5UIREaz.mjs} +1 -1
  207. package/dist/{zero-trust-RilTdSjX.mjs → zero-trust-DUp0XoIo.mjs} +50 -50
  208. package/dist/{zone-DsBtVkvT.mjs → zone-BGLkk-mL.mjs} +1 -1
  209. package/dist/{zones-BFxvWFQW.mjs → zones-CwYjNXMH.mjs} +1 -1
  210. package/package.json +11 -11
  211. package/dist/analytics-BaUZwNc5.mjs +0 -4
  212. package/dist/build-0QlYUfFS.mjs +0 -2
  213. package/dist/cf-C11NGkjx.mjs +0 -18
  214. package/dist/chunk-LQW53VED-CoECHA3R.mjs +0 -119
  215. package/dist/command-CMzMsll4.mjs +0 -2
  216. package/dist/custom-pages-DzKnSgL3.mjs +0 -3
  217. package/dist/d1-JBEqjJoj.mjs +0 -20
  218. package/dist/data-security-CIktWnXt.mjs +0 -7
  219. package/dist/dist-12KzRsBM.mjs +0 -387
  220. package/dist/dist-BCVqQpg2.mjs +0 -2
  221. package/dist/dist-Cp3uJN1x.mjs +0 -48
  222. package/dist/dist-S9K_8gq9.mjs +0 -9
  223. package/dist/dry-run-DiVy1lVo.mjs +0 -2
  224. package/dist/interactive-B2E03Fs-.mjs +0 -11
  225. package/dist/interactive-_B-EqD0Y.mjs +0 -23
  226. package/dist/logexplorer-D8rOPB5I.mjs +0 -17
  227. package/dist/logs-CDo7Y5sA.mjs +0 -3
  228. package/dist/oauth-DH3kMXSs.mjs +0 -14
  229. package/dist/pay-per-crawl-B4wx0lUb.mjs +0 -4
  230. package/dist/prompt-DjRTpML4.mjs +0 -3
  231. package/dist/public-BMg6-Hxh-BfUOZTDP.mjs +0 -2
  232. package/dist/request-headers-CC4eHmI2.mjs +0 -3
  233. package/dist/run-CRfinkSe.mjs +0 -2
  234. package/dist/schemas-O_ZNaF8R.mjs +0 -65
  235. package/dist/spawn-C1AISA2V.mjs +0 -526
  236. package/dist/src-C8phrg-8.mjs +0 -109
  237. package/dist/waiting-rooms-BUdmwXDY.mjs +0 -11
  238. package/dist/workers-BKKxaZcz.mjs +0 -6
  239. /package/dist/{alerts-B2SJO4nd.mjs → alerts-CarPLL8k.mjs} +0 -0
  240. /package/dist/{autorag-iNjZXw1n.mjs → autorag-zK-3harf.mjs} +0 -0
  241. /package/dist/{body-parser-DIlfApuJ.mjs → body-parser-Cmw7PZ7a.mjs} +0 -0
  242. /package/dist/{brands-BrVnNrT3.mjs → brands-CpgTsX8h.mjs} +0 -0
  243. /package/dist/{clear-an9o3dJ3.mjs → clear-C5gzBA8G.mjs} +0 -0
  244. /package/dist/{cli-types-CrSoSMPF.mjs → cli-types-abvWQN3T.mjs} +0 -0
  245. /package/dist/{connector-telemetry-events-latest-BqWfopFc.mjs → connector-telemetry-events-latest-BY-dbhQZ.mjs} +0 -0
  246. /package/dist/{connector-telemetry-snapshots-latest-C1m9U1En.mjs → connector-telemetry-snapshots-latest-DoMvHvCO.mjs} +0 -0
  247. /package/dist/{domain-info-B0Ykqv5l.mjs → domain-info-Cw3G4nap.mjs} +0 -0
  248. /package/dist/{health-CIUg1C5o.mjs → health-DkEXPkS6.mjs} +0 -0
  249. /package/dist/{input-validation-BxchZ9jE.mjs → input-validation-nF-0Ze2h.mjs} +0 -0
  250. /package/dist/{internal-DmpATljO.mjs → internal-4fU2r5en.mjs} +0 -0
  251. /package/dist/{live-B66u3_0g.mjs → live-B4iGrwY2.mjs} +0 -0
  252. /package/dist/{metadata-D062SVyy.mjs → metadata-C5fJJr-k.mjs} +0 -0
  253. /package/dist/{output-COcSQsfn.mjs → output-Z2lQmPUW.mjs} +0 -0
  254. /package/dist/{rate-limit-analytics-BknoecoM.mjs → rate-limit-analytics-DNsAFIeM.mjs} +0 -0
  255. /package/dist/{rate-limits-cdChIg_S.mjs → rate-limits-CsOim7bm.mjs} +0 -0
  256. /package/dist/{ready-C-H2cwp_.mjs → ready-tTe-zcIw.mjs} +0 -0
  257. /package/dist/{recent-submissions-DyuH_n5u.mjs → recent-submissions-B3eTV5yC.mjs} +0 -0
  258. /package/dist/{refute-uSlzkQKq.mjs → refute-BY76YVrT.mjs} +0 -0
  259. /package/dist/{scan-logo-DMk--WT7.mjs → scan-logo-DdoF_a5y.mjs} +0 -0
  260. /package/dist/{scan-page-DEHnAOJo.mjs → scan-page-sSgLwwZN.mjs} +0 -0
  261. /package/dist/{search-BlKeSfVD.mjs → search-BFvQr-sl.mjs} +0 -0
  262. /package/dist/{signed-url-CiGmGkLQ.mjs → signed-url-Cr8hiZPJ.mjs} +0 -0
  263. /package/dist/{submission-info-DHlTHDrs.mjs → submission-info-DT2mLnu1.mjs} +0 -0
  264. /package/dist/{total-queries-D5WvVfYi.mjs → total-queries-6gs5iy9T.mjs} +0 -0
  265. /package/dist/{tracked-domains-9deBK9bp.mjs → tracked-domains-D6XKO2EV.mjs} +0 -0
  266. /package/dist/{verify-S-TmhUDr.mjs → verify-CM1NakP0.mjs} +0 -0
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-C6XsFD_W.mjs";import{f as t,g as n,h as r}from"./oauth-DH3kMXSs.mjs";import{r as i}from"./auth-tvDdC1J-.mjs";import{t as a}from"./output-COcSQsfn.mjs";import{t as o}from"./dry-run-DiVy1lVo.mjs";import{t as s}from"./progress-V6SZV3Ux.mjs";import{t as c}from"./run-CRfinkSe.mjs";import"./telemetry-Ch1vCICm.mjs";import{n as l,r as u,t as d}from"./body-parser-DIlfApuJ.mjs";import{n as f}from"./input-validation-BxchZ9jE.mjs";import{a as p,i as m,n as h}from"./prompt-DjRTpML4.mjs";function ee(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page. Must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`Lists waiting rooms for account or zone.`,builder:ee,handler:async l=>c({command:`waiting-rooms account-waiting-rooms list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={page:l.page,per_page:l[`per-page`]};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf waiting-rooms account-waiting-rooms list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/waiting_rooms`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await t();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.waitingRooms.accountWaitingRooms.list({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})},_={command:`account-waiting-rooms`,describe:`Account-scoped waiting room listing`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.option(`additional-routes`,{type:`string`,description:`Only available for the Waiting Room Advanced subscription. Additional hostname and path combinations to which this waiting room will be applied. There is an implied wildcard at the end of the path. The hostname and path combination must be unique to this and all other waiting rooms. Provide as a JSON array of objects or @path/to/file.json.`}).option(`cookie-attributes-samesite`,{type:`string`,description:"Configures the SameSite attribute on the waiting room cookie. Value `auto` will be translated to `lax` or `none` depending if **Always Use HTTPS** is enabled. Note that when using value `none`, the secure attribute cannot be set to `never`.",choices:[`auto`,`lax`,`none`,`strict`]}).option(`cookie-attributes-secure`,{type:`string`,description:"Configures the Secure attribute on the waiting room cookie. Value `always` indicates that the Secure attribute will be set in the Set-Cookie header, `never` indicates that the Secure attribute will not be set, and `auto` will set the Secure attribute depending if **Always Use HTTPS** is enabled.",choices:[`auto`,`always`,`never`]}).option(`cookie-suffix`,{type:`string`,description:"Appends a '_' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(__cf_waitingroom). If `cookie_suffix` is \"abcd\", the cookie name will be `__cf_waitingroom_abcd`. This field is required if using `additional_routes`.",default:``}).option(`custom-page-html`,{type:`string`,description:"Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custom_page_html is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:\n1. {{`waitTimeKnown`}} Acts like a boolean value that indicates the behavior to take when wait time is not available, for instance when queue_all is **true**.\n2. {{`waitTimeFormatted`}} Estimated wait time for the user. For example, five minutes. Alternatively, you can use:\n3. {{`waitTime`}} Number of minutes of estimated wait for a user.\n4. {{`waitTimeHours`}} Number of hours of estimated wait for a user (`Math.floor(waitTime/60)`).\n5. {{`waitTimeHourMinutes`}} Number of minutes above the `waitTimeHours` value (`waitTime%60`).\n6. {{`queueIsFull`}} Changes to **true** when no more people can be added to the queue.\n\nTo view the full list of variables, look at the `cfWaitingRoom` object described under the `json_response_enabled` property in other Waiting Room API calls.",default:``}).option(`default-template-language`,{type:`string`,description:"The language of the default page template. If no default_template_language is provided, then `en-US` (English) will be used.",choices:`en-US.es-ES.de-DE.fr-FR.it-IT.ja-JP.ko-KR.pt-BR.zh-CN.zh-TW.nl-NL.pl-PL.id-ID.tr-TR.ar-EG.ru-RU.fa-IR.bg-BG.hr-HR.cs-CZ.da-DK.fi-FI.lt-LT.ms-MY.nb-NO.ro-RO.el-GR.he-IL.hi-IN.hu-HU.sr-BA.sk-SK.sl-SI.sv-SE.tl-PH.th-TH.uk-UA.vi-VN`.split(`.`),default:`en-US`}).option(`description`,{type:`string`,description:`A note that you can use to add more details about the waiting room.`,default:``}).option(`disable-session-renewal`,{type:`boolean`,description:"Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If `true`, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. If `false`, a user's session cookie will be automatically renewed on every request.",default:!1}).option(`enabled-origin-commands`,{type:`string`,array:!0,description:`A list of enabled origin commands.`}).option(`host`,{type:`string`,description:`The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.`}).option(`json-response-enabled`,{type:`boolean`,description:'Only available for the Waiting Room Advanced subscription. If `true`, requests to the waiting room with the header `Accept: application/json` will receive a JSON response object with information on the user\'s status in the waiting room as opposed to the configured static HTML page. This JSON response object has one property `cfWaitingRoom` which is an object containing the following fields:\n1. `inWaitingRoom`: Boolean indicating if the user is in the waiting room (always **true**).\n2. `waitTimeKnown`: Boolean indicating if the current estimated wait times are accurate. If **false**, they are not available.\n3. `waitTime`: Valid only when `waitTimeKnown` is **true**. Integer indicating the current estimated time in minutes the user will wait in the waiting room. When `queueingMethod` is **random**, this is set to `waitTime50Percentile`.\n4. `waitTime25Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile).\n5. `waitTime50Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website before `waitTime50Percentile` and half are expected to be let in after it.\n6. `waitTime75Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile).\n7. `waitTimeFormatted`: String displaying the `waitTime` formatted in English for users. If `waitTimeKnown` is **false**, `waitTimeFormatted` will display **unavailable**.\n8. `queueIsFull`: Boolean indicating if the waiting room\'s queue is currently full and not accepting new users at the moment.\n9. `queueAll`: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website.\n10. `lastUpdated`: String displaying the timestamp as an ISO 8601 string of the user\'s last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt after `refreshIntervalSeconds` past this time. If the user makes a request too soon, it will be ignored and `lastUpdated` will not change.\n11. `refreshIntervalSeconds`: Integer indicating the number of seconds after `lastUpdated` until the user is able to make another attempt to leave the waiting room and be let into the origin website. When the `queueingMethod` is `reject`, there is no specified refresh time —\\_it will always be **zero**.\n12. `queueingMethod`: The queueing method currently used by the waiting room. It is either **fifo**, **random**, **passthrough**, or **reject**.\n13. `isFIFOQueue`: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue.\n14. `isRandomQueue`: Boolean indicating if the waiting room uses a Random queue where users gain access randomly.\n15. `isPassthroughQueue`: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist when `queueAll` is **true** or `isEventPrequeueing` is **true** because in all other cases requests will go directly to the origin.\n16. `isRejectQueue`: Boolean indicating if the waiting room uses a reject queue.\n17. `isEventActive`: Boolean indicating if an event is currently occurring. Events are able to change a waiting room\'s behavior during a specified period of time. For additional information, look at the event properties `prequeue_start_time`, `event_start_time`, and `event_end_time` in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists.\n18. `isEventPrequeueing`: Valid only when `isEventActive` is **true**. Boolean indicating if an event is currently prequeueing users before it starts.\n19. `timeUntilEventStart`: Valid only when `isEventPrequeueing` is **true**. Integer indicating the number of minutes until the event starts.\n20. `timeUntilEventStartFormatted`: String displaying the `timeUntilEventStart` formatted in English for users. If `isEventPrequeueing` is **false**, `timeUntilEventStartFormatted` will display **unavailable**.\n21. `timeUntilEventEnd`: Valid only when `isEventActive` is **true**. Integer indicating the number of minutes until the event ends.\n22. `timeUntilEventEndFormatted`: String displaying the `timeUntilEventEnd` formatted in English for users. If `isEventActive` is **false**, `timeUntilEventEndFormatted` will display **unavailable**.\n23. `shuffleAtEventStart`: Valid only when `isEventActive` is **true**. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts.\n24. `turnstile`: Empty when turnstile isn\'t enabled. String displaying an html tag to display the Turnstile widget. Please add the `{{{turnstile}}}` tag to the `custom_html` template to ensure the Turnstile widget appears.\n25. `infiniteQueue`: Boolean indicating whether the response is for a user in the infinite queue.\n\nAn example cURL to a waiting room could be:\n\n curl -X GET "https://example.com/waitingroom" \\\n -H "Accept: application/json"\n\nIf `json_response_enabled` is **true** and the request hits the waiting room, an example JSON response when `queueingMethod` is **fifo** and no event is active could be:\n\n {\n "cfWaitingRoom": {\n "inWaitingRoom": true,\n "waitTimeKnown": true,\n "waitTime": 10,\n "waitTime25Percentile": 0,\n "waitTime50Percentile": 0,\n "waitTime75Percentile": 0,\n "waitTimeFormatted": "10 minutes",\n "queueIsFull": false,\n "queueAll": false,\n "lastUpdated": "2020-08-03T23:46:00.000Z",\n "refreshIntervalSeconds": 20,\n "queueingMethod": "fifo",\n "isFIFOQueue": true,\n "isRandomQueue": false,\n "isPassthroughQueue": false,\n "isRejectQueue": false,\n "isEventActive": false,\n "isEventPrequeueing": false,\n "timeUntilEventStart": 0,\n "timeUntilEventStartFormatted": "unavailable",\n "timeUntilEventEnd": 0,\n "timeUntilEventEndFormatted": "unavailable",\n "shuffleAtEventStart": false\n }\n }\n\nIf `json_response_enabled` is **true** and the request hits the waiting room, an example JSON response when `queueingMethod` is **random** and an event is active could be:\n\n {\n "cfWaitingRoom": {\n "inWaitingRoom": true,\n "waitTimeKnown": true,\n "waitTime": 10,\n "waitTime25Percentile": 5,\n "waitTime50Percentile": 10,\n "waitTime75Percentile": 15,\n "waitTimeFormatted": "5 minutes to 15 minutes",\n "queueIsFull": false,\n "queueAll": false,\n "lastUpdated": "2020-08-03T23:46:00.000Z",\n "refreshIntervalSeconds": 20,\n "queueingMethod": "random",\n "isFIFOQueue": false,\n "isRandomQueue": true,\n "isPassthroughQueue": false,\n "isRejectQueue": false,\n "isEventActive": true,\n "isEventPrequeueing": false,\n "timeUntilEventStart": 0,\n "timeUntilEventStartFormatted": "unavailable",\n "timeUntilEventEnd": 15,\n "timeUntilEventEndFormatted": "15 minutes",\n "shuffleAtEventStart": true\n }\n }',default:!1}).option(`name`,{type:`string`,description:`A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`new-users-per-minute`,{type:`number`,description:`Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.`}).option(`path`,{type:`string`,description:`Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.`,default:`/`}).option(`queue-all`,{type:`boolean`,description:"If queue_all is `true`, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable.",default:!1}).option(`queueing-method`,{type:`string`,description:"Sets the queueing method used by the waiting room. Changing this parameter from the **default** queueing method is only available for the Waiting Room Advanced subscription. Regardless of the queueing method, if `queue_all` is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are:\n1. `fifo` **(default)**: First-In-First-Out queue where customers gain access in the order they arrived.\n2. `random`: Random queue where customers gain access randomly, regardless of arrival time.\n3. `passthrough`: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (with `suspended`) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa.\n4. `reject`: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room uses `reject`, and its events override this with `fifo`, `random`, or `passthrough`. When this queueing method is enabled and neither `queueAll` is enabled nor an event is prequeueing, the waiting room page **will not refresh automatically**.",choices:[`fifo`,`random`,`passthrough`,`reject`],default:`fifo`}).option(`queueing-status-code`,{type:`number`,description:`HTTP status code returned to a user while in the queue.`,default:200}).option(`session-duration`,{type:`number`,description:`Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.`,default:5}).option(`suspended`,{type:`boolean`,description:"Suspends or allows traffic going to the waiting room. If set to `true`, the traffic will not go to the waiting room.",default:!1}).option(`total-active-users`,{type:`number`,description:`Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.`}).option(`turnstile-action`,{type:`string`,description:"Which action to take when a bot is detected using Turnstile. `log` will\nhave no impact on queueing behavior, simply keeping track of how many\nbots are detected in Waiting Room Analytics. `infinite_queue` will send\nbots to a false queueing state, where they will never reach your\norigin. `infinite_queue` requires Advanced Waiting Room.\n",choices:[`log`,`infinite_queue`],default:`log`}).option(`turnstile-mode`,{type:`string`,description:"Which Turnstile widget type to use for detecting bot traffic. See\n[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)\nfor the definitions of these widget types. Set to `off` to disable the\nTurnstile integration entirely. Setting this to anything other than\n`off` or `invisible` requires Advanced Waiting Room.\n",choices:[`off`,`invisible`,`visible_non_interactive`,`visible_managed`],default:`invisible`}).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 y={command:`create`,describe:`Creates a new waiting room.`,builder:v,handler:async e=>c({command:`waiting-rooms create`,classification:{safeFlags:[`cookie-attributes-samesite`,`cookie-attributes-secure`,`default-template-language`,`disable-session-renewal`,`json-response-enabled`,`queue-all`,`queueing-method`,`suspended`,`turnstile-action`,`turnstile-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({additional_routes:u(e[`additional-routes`],`additional-routes`),cookie_attributes:{samesite:f(e[`cookie-attributes-samesite`],`cookie-attributes-samesite`,`text`),secure:f(e[`cookie-attributes-secure`],`cookie-attributes-secure`,`text`)},cookie_suffix:f(e[`cookie-suffix`],`cookie-suffix`,`text`),custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),default_template_language:f(e[`default-template-language`],`default-template-language`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],enabled_origin_commands:e[`enabled-origin-commands`],host:f(e.host,`host`,`text`),json_response_enabled:e[`json-response-enabled`],name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],path:f(e.path,`path`,`text`),queue_all:e[`queue-all`],queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),queueing_status_code:e[`queueing-status-code`],session_duration:e[`session-duration`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Creating`,async()=>t.waitingRooms.create({body:r,zone_id:n})),{successLabel:`Created`});return}if(e.host===void 0&&(e.host=await p(`host`,`The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.`)),e.name===void 0&&(e.name=await p(`name`,`A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.`)),e[`new-users-per-minute`]===void 0)throw Error(`--new-users-per-minute is required (or pass --body with this field set).`);if(e[`total-active-users`]===void 0)throw Error(`--total-active-users is required (or pass --body with this field set).`);let c=d({additional_routes:u(e[`additional-routes`],`additional-routes`),cookie_attributes:{samesite:f(e[`cookie-attributes-samesite`],`cookie-attributes-samesite`,`text`),secure:f(e[`cookie-attributes-secure`],`cookie-attributes-secure`,`text`)},cookie_suffix:f(e[`cookie-suffix`],`cookie-suffix`,`text`),custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),default_template_language:f(e[`default-template-language`],`default-template-language`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],enabled_origin_commands:e[`enabled-origin-commands`],host:f(e.host,`host`,`text`),json_response_enabled:e[`json-response-enabled`],name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],path:f(e.path,`path`,`text`),queue_all:e[`queue-all`],queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),queueing_status_code:e[`queueing-status-code`],session_duration:e[`session-duration`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)});a(await s(`Creating`,async()=>t.waitingRooms.create({body:c,zone_id:n})),{successLabel:`Created`})})};function b(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const x={command:`delete <waiting-room-id>`,describe:`Deletes a waiting room.`,builder:b,handler:async e=>c({command:`waiting-rooms delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await h({force:!!e.force})){process.stderr.write(`Aborted.
3
- `);return}a(await s(`Deleting`,async()=>t.waitingRooms.delete({zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Deleted`})})};function S(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`additional-routes`,{type:`string`,description:`Only available for the Waiting Room Advanced subscription. Additional hostname and path combinations to which this waiting room will be applied. There is an implied wildcard at the end of the path. The hostname and path combination must be unique to this and all other waiting rooms. Provide as a JSON array of objects or @path/to/file.json.`}).option(`cookie-attributes-samesite`,{type:`string`,description:"Configures the SameSite attribute on the waiting room cookie. Value `auto` will be translated to `lax` or `none` depending if **Always Use HTTPS** is enabled. Note that when using value `none`, the secure attribute cannot be set to `never`.",choices:[`auto`,`lax`,`none`,`strict`]}).option(`cookie-attributes-secure`,{type:`string`,description:"Configures the Secure attribute on the waiting room cookie. Value `always` indicates that the Secure attribute will be set in the Set-Cookie header, `never` indicates that the Secure attribute will not be set, and `auto` will set the Secure attribute depending if **Always Use HTTPS** is enabled.",choices:[`auto`,`always`,`never`]}).option(`cookie-suffix`,{type:`string`,description:"Appends a '_' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(__cf_waitingroom). If `cookie_suffix` is \"abcd\", the cookie name will be `__cf_waitingroom_abcd`. This field is required if using `additional_routes`."}).option(`custom-page-html`,{type:`string`,description:"Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custom_page_html is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:\n1. {{`waitTimeKnown`}} Acts like a boolean value that indicates the behavior to take when wait time is not available, for instance when queue_all is **true**.\n2. {{`waitTimeFormatted`}} Estimated wait time for the user. For example, five minutes. Alternatively, you can use:\n3. {{`waitTime`}} Number of minutes of estimated wait for a user.\n4. {{`waitTimeHours`}} Number of hours of estimated wait for a user (`Math.floor(waitTime/60)`).\n5. {{`waitTimeHourMinutes`}} Number of minutes above the `waitTimeHours` value (`waitTime%60`).\n6. {{`queueIsFull`}} Changes to **true** when no more people can be added to the queue.\n\nTo view the full list of variables, look at the `cfWaitingRoom` object described under the `json_response_enabled` property in other Waiting Room API calls."}).option(`default-template-language`,{type:`string`,description:"The language of the default page template. If no default_template_language is provided, then `en-US` (English) will be used.",choices:`en-US.es-ES.de-DE.fr-FR.it-IT.ja-JP.ko-KR.pt-BR.zh-CN.zh-TW.nl-NL.pl-PL.id-ID.tr-TR.ar-EG.ru-RU.fa-IR.bg-BG.hr-HR.cs-CZ.da-DK.fi-FI.lt-LT.ms-MY.nb-NO.ro-RO.el-GR.he-IL.hi-IN.hu-HU.sr-BA.sk-SK.sl-SI.sv-SE.tl-PH.th-TH.uk-UA.vi-VN`.split(`.`)}).option(`description`,{type:`string`,description:`A note that you can use to add more details about the waiting room.`}).option(`disable-session-renewal`,{type:`boolean`,description:"Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If `true`, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. If `false`, a user's session cookie will be automatically renewed on every request."}).option(`enabled-origin-commands`,{type:`string`,array:!0,description:`A list of enabled origin commands.`}).option(`host`,{type:`string`,description:`The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.`}).option(`json-response-enabled`,{type:`boolean`,description:'Only available for the Waiting Room Advanced subscription. If `true`, requests to the waiting room with the header `Accept: application/json` will receive a JSON response object with information on the user\'s status in the waiting room as opposed to the configured static HTML page. This JSON response object has one property `cfWaitingRoom` which is an object containing the following fields:\n1. `inWaitingRoom`: Boolean indicating if the user is in the waiting room (always **true**).\n2. `waitTimeKnown`: Boolean indicating if the current estimated wait times are accurate. If **false**, they are not available.\n3. `waitTime`: Valid only when `waitTimeKnown` is **true**. Integer indicating the current estimated time in minutes the user will wait in the waiting room. When `queueingMethod` is **random**, this is set to `waitTime50Percentile`.\n4. `waitTime25Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile).\n5. `waitTime50Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website before `waitTime50Percentile` and half are expected to be let in after it.\n6. `waitTime75Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile).\n7. `waitTimeFormatted`: String displaying the `waitTime` formatted in English for users. If `waitTimeKnown` is **false**, `waitTimeFormatted` will display **unavailable**.\n8. `queueIsFull`: Boolean indicating if the waiting room\'s queue is currently full and not accepting new users at the moment.\n9. `queueAll`: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website.\n10. `lastUpdated`: String displaying the timestamp as an ISO 8601 string of the user\'s last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt after `refreshIntervalSeconds` past this time. If the user makes a request too soon, it will be ignored and `lastUpdated` will not change.\n11. `refreshIntervalSeconds`: Integer indicating the number of seconds after `lastUpdated` until the user is able to make another attempt to leave the waiting room and be let into the origin website. When the `queueingMethod` is `reject`, there is no specified refresh time —\\_it will always be **zero**.\n12. `queueingMethod`: The queueing method currently used by the waiting room. It is either **fifo**, **random**, **passthrough**, or **reject**.\n13. `isFIFOQueue`: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue.\n14. `isRandomQueue`: Boolean indicating if the waiting room uses a Random queue where users gain access randomly.\n15. `isPassthroughQueue`: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist when `queueAll` is **true** or `isEventPrequeueing` is **true** because in all other cases requests will go directly to the origin.\n16. `isRejectQueue`: Boolean indicating if the waiting room uses a reject queue.\n17. `isEventActive`: Boolean indicating if an event is currently occurring. Events are able to change a waiting room\'s behavior during a specified period of time. For additional information, look at the event properties `prequeue_start_time`, `event_start_time`, and `event_end_time` in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists.\n18. `isEventPrequeueing`: Valid only when `isEventActive` is **true**. Boolean indicating if an event is currently prequeueing users before it starts.\n19. `timeUntilEventStart`: Valid only when `isEventPrequeueing` is **true**. Integer indicating the number of minutes until the event starts.\n20. `timeUntilEventStartFormatted`: String displaying the `timeUntilEventStart` formatted in English for users. If `isEventPrequeueing` is **false**, `timeUntilEventStartFormatted` will display **unavailable**.\n21. `timeUntilEventEnd`: Valid only when `isEventActive` is **true**. Integer indicating the number of minutes until the event ends.\n22. `timeUntilEventEndFormatted`: String displaying the `timeUntilEventEnd` formatted in English for users. If `isEventActive` is **false**, `timeUntilEventEndFormatted` will display **unavailable**.\n23. `shuffleAtEventStart`: Valid only when `isEventActive` is **true**. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts.\n24. `turnstile`: Empty when turnstile isn\'t enabled. String displaying an html tag to display the Turnstile widget. Please add the `{{{turnstile}}}` tag to the `custom_html` template to ensure the Turnstile widget appears.\n25. `infiniteQueue`: Boolean indicating whether the response is for a user in the infinite queue.\n\nAn example cURL to a waiting room could be:\n\n curl -X GET "https://example.com/waitingroom" \\\n -H "Accept: application/json"\n\nIf `json_response_enabled` is **true** and the request hits the waiting room, an example JSON response when `queueingMethod` is **fifo** and no event is active could be:\n\n {\n "cfWaitingRoom": {\n "inWaitingRoom": true,\n "waitTimeKnown": true,\n "waitTime": 10,\n "waitTime25Percentile": 0,\n "waitTime50Percentile": 0,\n "waitTime75Percentile": 0,\n "waitTimeFormatted": "10 minutes",\n "queueIsFull": false,\n "queueAll": false,\n "lastUpdated": "2020-08-03T23:46:00.000Z",\n "refreshIntervalSeconds": 20,\n "queueingMethod": "fifo",\n "isFIFOQueue": true,\n "isRandomQueue": false,\n "isPassthroughQueue": false,\n "isRejectQueue": false,\n "isEventActive": false,\n "isEventPrequeueing": false,\n "timeUntilEventStart": 0,\n "timeUntilEventStartFormatted": "unavailable",\n "timeUntilEventEnd": 0,\n "timeUntilEventEndFormatted": "unavailable",\n "shuffleAtEventStart": false\n }\n }\n\nIf `json_response_enabled` is **true** and the request hits the waiting room, an example JSON response when `queueingMethod` is **random** and an event is active could be:\n\n {\n "cfWaitingRoom": {\n "inWaitingRoom": true,\n "waitTimeKnown": true,\n "waitTime": 10,\n "waitTime25Percentile": 5,\n "waitTime50Percentile": 10,\n "waitTime75Percentile": 15,\n "waitTimeFormatted": "5 minutes to 15 minutes",\n "queueIsFull": false,\n "queueAll": false,\n "lastUpdated": "2020-08-03T23:46:00.000Z",\n "refreshIntervalSeconds": 20,\n "queueingMethod": "random",\n "isFIFOQueue": false,\n "isRandomQueue": true,\n "isPassthroughQueue": false,\n "isRejectQueue": false,\n "isEventActive": true,\n "isEventPrequeueing": false,\n "timeUntilEventStart": 0,\n "timeUntilEventStartFormatted": "unavailable",\n "timeUntilEventEnd": 15,\n "timeUntilEventEndFormatted": "15 minutes",\n "shuffleAtEventStart": true\n }\n }'}).option(`name`,{type:`string`,description:`A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`new-users-per-minute`,{type:`number`,description:`Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.`}).option(`path`,{type:`string`,description:`Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.`}).option(`queue-all`,{type:`boolean`,description:"If queue_all is `true`, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable."}).option(`queueing-method`,{type:`string`,description:"Sets the queueing method used by the waiting room. Changing this parameter from the **default** queueing method is only available for the Waiting Room Advanced subscription. Regardless of the queueing method, if `queue_all` is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are:\n1. `fifo` **(default)**: First-In-First-Out queue where customers gain access in the order they arrived.\n2. `random`: Random queue where customers gain access randomly, regardless of arrival time.\n3. `passthrough`: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (with `suspended`) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa.\n4. `reject`: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room uses `reject`, and its events override this with `fifo`, `random`, or `passthrough`. When this queueing method is enabled and neither `queueAll` is enabled nor an event is prequeueing, the waiting room page **will not refresh automatically**.",choices:[`fifo`,`random`,`passthrough`,`reject`]}).option(`queueing-status-code`,{type:`number`,description:`HTTP status code returned to a user while in the queue.`}).option(`session-duration`,{type:`number`,description:`Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.`}).option(`suspended`,{type:`boolean`,description:"Suspends or allows traffic going to the waiting room. If set to `true`, the traffic will not go to the waiting room."}).option(`total-active-users`,{type:`number`,description:`Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.`}).option(`turnstile-action`,{type:`string`,description:"Which action to take when a bot is detected using Turnstile. `log` will\nhave no impact on queueing behavior, simply keeping track of how many\nbots are detected in Waiting Room Analytics. `infinite_queue` will send\nbots to a false queueing state, where they will never reach your\norigin. `infinite_queue` requires Advanced Waiting Room.\n",choices:[`log`,`infinite_queue`]}).option(`turnstile-mode`,{type:`string`,description:"Which Turnstile widget type to use for detecting bot traffic. See\n[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)\nfor the definitions of these widget types. Set to `off` to disable the\nTurnstile integration entirely. Setting this to anything other than\n`off` or `invisible` requires Advanced Waiting Room.\n",choices:[`off`,`invisible`,`visible_non_interactive`,`visible_managed`]}).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 <waiting-room-id>`,describe:`Patches a configured waiting room.`,builder:S,handler:async e=>c({command:`waiting-rooms edit`,classification:{safeFlags:[`cookie-attributes-samesite`,`cookie-attributes-secure`,`default-template-language`,`disable-session-renewal`,`json-response-enabled`,`queue-all`,`queueing-method`,`suspended`,`turnstile-action`,`turnstile-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({additional_routes:u(e[`additional-routes`],`additional-routes`),cookie_attributes:{samesite:f(e[`cookie-attributes-samesite`],`cookie-attributes-samesite`,`text`),secure:f(e[`cookie-attributes-secure`],`cookie-attributes-secure`,`text`)},cookie_suffix:f(e[`cookie-suffix`],`cookie-suffix`,`text`),custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),default_template_language:f(e[`default-template-language`],`default-template-language`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],enabled_origin_commands:e[`enabled-origin-commands`],host:f(e.host,`host`,`text`),json_response_enabled:e[`json-response-enabled`],name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],path:f(e.path,`path`,`text`),queue_all:e[`queue-all`],queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),queueing_status_code:e[`queueing-status-code`],session_duration:e[`session-duration`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Updating`,async()=>t.waitingRooms.edit({body:r,zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Updated`});return}if(e.host===void 0&&(e.host=await p(`host`,`The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.`)),e.name===void 0&&(e.name=await p(`name`,`A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.`)),e[`new-users-per-minute`]===void 0)throw Error(`--new-users-per-minute is required (or pass --body with this field set).`);if(e[`total-active-users`]===void 0)throw Error(`--total-active-users is required (or pass --body with this field set).`);let c=d({additional_routes:u(e[`additional-routes`],`additional-routes`),cookie_attributes:{samesite:f(e[`cookie-attributes-samesite`],`cookie-attributes-samesite`,`text`),secure:f(e[`cookie-attributes-secure`],`cookie-attributes-secure`,`text`)},cookie_suffix:f(e[`cookie-suffix`],`cookie-suffix`,`text`),custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),default_template_language:f(e[`default-template-language`],`default-template-language`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],enabled_origin_commands:e[`enabled-origin-commands`],host:f(e.host,`host`,`text`),json_response_enabled:e[`json-response-enabled`],name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],path:f(e.path,`path`,`text`),queue_all:e[`queue-all`],queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),queueing_status_code:e[`queueing-status-code`],session_duration:e[`session-duration`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)});a(await s(`Updating`,async()=>t.waitingRooms.edit({body:c,zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Updated`})})};function w(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`custom-page-html`,{type:`string`,description:"If set, the event will override the waiting room's `custom_page_html` property while it is active. If null, the event will inherit it."}).option(`description`,{type:`string`,description:`A note that you can use to add more details about the event.`,default:``}).option(`disable-session-renewal`,{type:`boolean`,description:"If set, the event will override the waiting room's `disable_session_renewal` property while it is active. If null, the event will inherit it."}).option(`event-end-time`,{type:`string`,description:`An ISO 8601 timestamp that marks the end of the event.`}).option(`event-start-time`,{type:`string`,description:"An ISO 8601 timestamp that marks the start of the event. At this time, queued users will be processed with the event's configuration. The start time must be at least one minute before `event_end_time`."}).option(`name`,{type:`string`,description:`A unique name to identify the event. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`new-users-per-minute`,{type:`number`,description:"If set, the event will override the waiting room's `new_users_per_minute` property while it is active. If null, the event will inherit it. This can only be set if the event's `total_active_users` property is also set."}).option(`prequeue-start-time`,{type:`string`,description:"An ISO 8601 timestamp that marks when to begin queueing all users before the event starts. The prequeue must start at least five minutes before `event_start_time`."}).option(`queueing-method`,{type:`string`,description:"If set, the event will override the waiting room's `queueing_method` property while it is active. If null, the event will inherit it."}).option(`session-duration`,{type:`number`,description:"If set, the event will override the waiting room's `session_duration` property while it is active. If null, the event will inherit it."}).option(`shuffle-at-event-start`,{type:`boolean`,description:"If enabled, users in the prequeue will be shuffled randomly at the `event_start_time`. Requires that `prequeue_start_time` is not null. This is useful for situations when many users will join the event prequeue at the same time and you want to shuffle them to ensure fairness. Naturally, it makes the most sense to enable this feature when the `queueing_method` during the event respects ordering such as **fifo**, or else the shuffling may be unnecessary.",default:!1}).option(`suspended`,{type:`boolean`,description:"Suspends or allows an event. If set to `true`, the event is ignored and traffic will be handled based on the waiting room configuration.",default:!1}).option(`total-active-users`,{type:`number`,description:"If set, the event will override the waiting room's `total_active_users` property while it is active. If null, the event will inherit it. This can only be set if the event's `new_users_per_minute` property is also set."}).option(`turnstile-action`,{type:`string`,description:"If set, the event will override the waiting room's `turnstile_action` property while it is active. If null, the event will inherit it.",choices:[`log`,`infinite_queue`]}).option(`turnstile-mode`,{type:`string`,description:"If set, the event will override the waiting room's `turnstile_mode` property while it is active. If null, the event will inherit it.",choices:[`off`,`invisible`,`visible_non_interactive`,`visible_managed`]}).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 T={command:`create <waiting-room-id>`,describe:`Only available for the Waiting Room Advanced subscription. Creates an event for a waiting room. An event takes place during a specified period of time, temporarily changing the behavior of a waiting room. While the event is active, some of the properties in the event's configuration may either override or inherit from the waiting room's configuration. Note that events cannot overlap with each other, so only one event can be active at a time.`,builder:w,handler:async e=>c({command:`waiting-rooms events create`,classification:{safeFlags:[`disable-session-renewal`,`shuffle-at-event-start`,`suspended`,`turnstile-action`,`turnstile-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms events create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/events`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],event_end_time:f(e[`event-end-time`],`event-end-time`,`text`),event_start_time:f(e[`event-start-time`],`event-start-time`,`text`),name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],prequeue_start_time:f(e[`prequeue-start-time`],`prequeue-start-time`,`text`),queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),session_duration:e[`session-duration`],shuffle_at_event_start:e[`shuffle-at-event-start`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Creating`,async()=>t.waitingRooms.events.create({body:r,zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Created`});return}e[`event-end-time`]===void 0&&(e[`event-end-time`]=await p(`event-end-time`,`An ISO 8601 timestamp that marks the end of the event.`)),e[`event-start-time`]===void 0&&(e[`event-start-time`]=await p(`event-start-time`,"An ISO 8601 timestamp that marks the start of the event. At this time, queued users will be processed with the event's configuration. The start time must be at least one minute before `event_end_time`.")),e.name===void 0&&(e.name=await p(`name`,`A unique name to identify the event. Only alphanumeric characters, hyphens and underscores are allowed.`));let c=d({custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],event_end_time:f(e[`event-end-time`],`event-end-time`,`text`),event_start_time:f(e[`event-start-time`],`event-start-time`,`text`),name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],prequeue_start_time:f(e[`prequeue-start-time`],`prequeue-start-time`,`text`),queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),session_duration:e[`session-duration`],shuffle_at_event_start:e[`shuffle-at-event-start`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)});a(await s(`Creating`,async()=>t.waitingRooms.events.create({body:c,zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Created`})})};function E(e){return e.positional(`event-id`,{type:`string`,description:`Event ID`,demandOption:!0}).option(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const D={command:`delete <event-id>`,describe:`Deletes an event for a waiting room.`,builder:E,handler:async e=>c({command:`waiting-rooms events delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms events delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``),"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await h({force:!!e.force})){process.stderr.write(`Aborted.
4
- `);return}a(await s(`Deleting`,async()=>t.waitingRooms.events.delete({zone_id:n,waiting_room_id:e[`waiting-room-id`],event_id:e[`event-id`]})),{successLabel:`Deleted`})})};function O(e){return e.positional(`event-id`,{type:`string`,description:`Event ID`,demandOption:!0}).option(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <event-id>`,describe:`Previews an event's configuration as if it was active. Inherited fields from the waiting room will be displayed with their current values.`,builder:O,handler:async e=>c({command:`waiting-rooms events details get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms events details get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/details`,pathParams:{"event-id":String(e[`event-id`]??``),"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.waitingRooms.events.details.get({zone_id:n,waiting_room_id:e[`waiting-room-id`],event_id:e[`event-id`]})),{successLabel:`Loaded`})})},A={command:`details`,describe:`Operations for events.details`,builder:e=>e.command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.positional(`event-id`,{type:`string`,description:`Event ID`,demandOption:!0}).option(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`custom-page-html`,{type:`string`,description:"If set, the event will override the waiting room's `custom_page_html` property while it is active. If null, the event will inherit it."}).option(`description`,{type:`string`,description:`A note that you can use to add more details about the event.`}).option(`disable-session-renewal`,{type:`boolean`,description:"If set, the event will override the waiting room's `disable_session_renewal` property while it is active. If null, the event will inherit it."}).option(`event-end-time`,{type:`string`,description:`An ISO 8601 timestamp that marks the end of the event.`}).option(`event-start-time`,{type:`string`,description:"An ISO 8601 timestamp that marks the start of the event. At this time, queued users will be processed with the event's configuration. The start time must be at least one minute before `event_end_time`."}).option(`name`,{type:`string`,description:`A unique name to identify the event. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`new-users-per-minute`,{type:`number`,description:"If set, the event will override the waiting room's `new_users_per_minute` property while it is active. If null, the event will inherit it. This can only be set if the event's `total_active_users` property is also set."}).option(`prequeue-start-time`,{type:`string`,description:"An ISO 8601 timestamp that marks when to begin queueing all users before the event starts. The prequeue must start at least five minutes before `event_start_time`."}).option(`queueing-method`,{type:`string`,description:"If set, the event will override the waiting room's `queueing_method` property while it is active. If null, the event will inherit it."}).option(`session-duration`,{type:`number`,description:"If set, the event will override the waiting room's `session_duration` property while it is active. If null, the event will inherit it."}).option(`shuffle-at-event-start`,{type:`boolean`,description:"If enabled, users in the prequeue will be shuffled randomly at the `event_start_time`. Requires that `prequeue_start_time` is not null. This is useful for situations when many users will join the event prequeue at the same time and you want to shuffle them to ensure fairness. Naturally, it makes the most sense to enable this feature when the `queueing_method` during the event respects ordering such as **fifo**, or else the shuffling may be unnecessary."}).option(`suspended`,{type:`boolean`,description:"Suspends or allows an event. If set to `true`, the event is ignored and traffic will be handled based on the waiting room configuration."}).option(`total-active-users`,{type:`number`,description:"If set, the event will override the waiting room's `total_active_users` property while it is active. If null, the event will inherit it. This can only be set if the event's `new_users_per_minute` property is also set."}).option(`turnstile-action`,{type:`string`,description:"If set, the event will override the waiting room's `turnstile_action` property while it is active. If null, the event will inherit it.",choices:[`log`,`infinite_queue`]}).option(`turnstile-mode`,{type:`string`,description:"If set, the event will override the waiting room's `turnstile_mode` property while it is active. If null, the event will inherit it.",choices:[`off`,`invisible`,`visible_non_interactive`,`visible_managed`]}).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 <event-id>`,describe:`Patches a configured event for a waiting room.`,builder:j,handler:async e=>c({command:`waiting-rooms events edit`,classification:{safeFlags:[`disable-session-renewal`,`shuffle-at-event-start`,`suspended`,`turnstile-action`,`turnstile-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms events edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``),"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],event_end_time:f(e[`event-end-time`],`event-end-time`,`text`),event_start_time:f(e[`event-start-time`],`event-start-time`,`text`),name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],prequeue_start_time:f(e[`prequeue-start-time`],`prequeue-start-time`,`text`),queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),session_duration:e[`session-duration`],shuffle_at_event_start:e[`shuffle-at-event-start`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Updating`,async()=>t.waitingRooms.events.edit({body:r,zone_id:n,waiting_room_id:e[`waiting-room-id`],event_id:e[`event-id`]})),{successLabel:`Updated`});return}e[`event-end-time`]===void 0&&(e[`event-end-time`]=await p(`event-end-time`,`An ISO 8601 timestamp that marks the end of the event.`)),e[`event-start-time`]===void 0&&(e[`event-start-time`]=await p(`event-start-time`,"An ISO 8601 timestamp that marks the start of the event. At this time, queued users will be processed with the event's configuration. The start time must be at least one minute before `event_end_time`.")),e.name===void 0&&(e.name=await p(`name`,`A unique name to identify the event. Only alphanumeric characters, hyphens and underscores are allowed.`));let c=d({custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],event_end_time:f(e[`event-end-time`],`event-end-time`,`text`),event_start_time:f(e[`event-start-time`],`event-start-time`,`text`),name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],prequeue_start_time:f(e[`prequeue-start-time`],`prequeue-start-time`,`text`),queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),session_duration:e[`session-duration`],shuffle_at_event_start:e[`shuffle-at-event-start`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)});a(await s(`Updating`,async()=>t.waitingRooms.events.edit({body:c,zone_id:n,waiting_room_id:e[`waiting-room-id`],event_id:e[`event-id`]})),{successLabel:`Updated`})})};function N(e){return e.positional(`event-id`,{type:`string`,description:`Event ID`,demandOption:!0}).option(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get <event-id>`,describe:`Fetches a single configured event for a waiting room.`,builder:N,handler:async e=>c({command:`waiting-rooms events get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms events get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``),"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.waitingRooms.events.get({zone_id:n,waiting_room_id:e[`waiting-room-id`],event_id:e[`event-id`]})),{successLabel:`Loaded`})})};function F(e){return e.option(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page. Must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`list`,describe:`Lists events for a waiting room.`,builder:F,handler:async e=>c({command:`waiting-rooms events list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){o({command:`cf waiting-rooms events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/events`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await i(e),c=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>n.waitingRooms.events.list({zone_id:c,waiting_room_id:e[`waiting-room-id`],...t})),{successLabel:`Loaded`})})};function L(e){return e.positional(`event-id`,{type:`string`,description:`Event ID`,demandOption:!0}).option(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`custom-page-html`,{type:`string`,description:"If set, the event will override the waiting room's `custom_page_html` property while it is active. If null, the event will inherit it."}).option(`description`,{type:`string`,description:`A note that you can use to add more details about the event.`}).option(`disable-session-renewal`,{type:`boolean`,description:"If set, the event will override the waiting room's `disable_session_renewal` property while it is active. If null, the event will inherit it."}).option(`event-end-time`,{type:`string`,description:`An ISO 8601 timestamp that marks the end of the event.`}).option(`event-start-time`,{type:`string`,description:"An ISO 8601 timestamp that marks the start of the event. At this time, queued users will be processed with the event's configuration. The start time must be at least one minute before `event_end_time`."}).option(`name`,{type:`string`,description:`A unique name to identify the event. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`new-users-per-minute`,{type:`number`,description:"If set, the event will override the waiting room's `new_users_per_minute` property while it is active. If null, the event will inherit it. This can only be set if the event's `total_active_users` property is also set."}).option(`prequeue-start-time`,{type:`string`,description:"An ISO 8601 timestamp that marks when to begin queueing all users before the event starts. The prequeue must start at least five minutes before `event_start_time`."}).option(`queueing-method`,{type:`string`,description:"If set, the event will override the waiting room's `queueing_method` property while it is active. If null, the event will inherit it."}).option(`session-duration`,{type:`number`,description:"If set, the event will override the waiting room's `session_duration` property while it is active. If null, the event will inherit it."}).option(`shuffle-at-event-start`,{type:`boolean`,description:"If enabled, users in the prequeue will be shuffled randomly at the `event_start_time`. Requires that `prequeue_start_time` is not null. This is useful for situations when many users will join the event prequeue at the same time and you want to shuffle them to ensure fairness. Naturally, it makes the most sense to enable this feature when the `queueing_method` during the event respects ordering such as **fifo**, or else the shuffling may be unnecessary."}).option(`suspended`,{type:`boolean`,description:"Suspends or allows an event. If set to `true`, the event is ignored and traffic will be handled based on the waiting room configuration."}).option(`total-active-users`,{type:`number`,description:"If set, the event will override the waiting room's `total_active_users` property while it is active. If null, the event will inherit it. This can only be set if the event's `new_users_per_minute` property is also set."}).option(`turnstile-action`,{type:`string`,description:"If set, the event will override the waiting room's `turnstile_action` property while it is active. If null, the event will inherit it.",choices:[`log`,`infinite_queue`]}).option(`turnstile-mode`,{type:`string`,description:"If set, the event will override the waiting room's `turnstile_mode` property while it is active. If null, the event will inherit it.",choices:[`off`,`invisible`,`visible_non_interactive`,`visible_managed`]}).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 R={command:`update <event-id>`,describe:`Updates a configured event for a waiting room.`,builder:L,handler:async e=>c({command:`waiting-rooms events update`,classification:{safeFlags:[`disable-session-renewal`,`shuffle-at-event-start`,`suspended`,`turnstile-action`,`turnstile-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms events update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``),"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],event_end_time:f(e[`event-end-time`],`event-end-time`,`text`),event_start_time:f(e[`event-start-time`],`event-start-time`,`text`),name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],prequeue_start_time:f(e[`prequeue-start-time`],`prequeue-start-time`,`text`),queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),session_duration:e[`session-duration`],shuffle_at_event_start:e[`shuffle-at-event-start`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Updating`,async()=>t.waitingRooms.events.update({body:r,zone_id:n,waiting_room_id:e[`waiting-room-id`],event_id:e[`event-id`]})),{successLabel:`Updated`});return}e[`event-end-time`]===void 0&&(e[`event-end-time`]=await p(`event-end-time`,`An ISO 8601 timestamp that marks the end of the event.`)),e[`event-start-time`]===void 0&&(e[`event-start-time`]=await p(`event-start-time`,"An ISO 8601 timestamp that marks the start of the event. At this time, queued users will be processed with the event's configuration. The start time must be at least one minute before `event_end_time`.")),e.name===void 0&&(e.name=await p(`name`,`A unique name to identify the event. Only alphanumeric characters, hyphens and underscores are allowed.`));let c=d({custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],event_end_time:f(e[`event-end-time`],`event-end-time`,`text`),event_start_time:f(e[`event-start-time`],`event-start-time`,`text`),name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],prequeue_start_time:f(e[`prequeue-start-time`],`prequeue-start-time`,`text`),queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),session_duration:e[`session-duration`],shuffle_at_event_start:e[`shuffle-at-event-start`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)});a(await s(`Updating`,async()=>t.waitingRooms.events.update({body:c,zone_id:n,waiting_room_id:e[`waiting-room-id`],event_id:e[`event-id`]})),{successLabel:`Updated`})})},z={command:`events`,describe:`Scheduled events that temporarily override waiting room settings for sales, launches, etc.`,builder:e=>e.command(T).command(D).command(M).command(P).command(I).command(R).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get <waiting-room-id>`,describe:`Fetches a single configured waiting room.`,builder:te,handler:async e=>c({command:`waiting-rooms get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.waitingRooms.get({zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Loaded`})})};function V(e){return e.option(`custom-html`,{type:`string`,description:"Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custom_page_html is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:\n1. {{`waitTimeKnown`}} Acts like a boolean value that indicates the behavior to take when wait time is not available, for instance when queue_all is **true**.\n2. {{`waitTimeFormatted`}} Estimated wait time for the user. For example, five minutes. Alternatively, you can use:\n3. {{`waitTime`}} Number of minutes of estimated wait for a user.\n4. {{`waitTimeHours`}} Number of hours of estimated wait for a user (`Math.floor(waitTime/60)`).\n5. {{`waitTimeHourMinutes`}} Number of minutes above the `waitTimeHours` value (`waitTime%60`).\n6. {{`queueIsFull`}} Changes to **true** when no more people can be added to the queue.\n\nTo view the full list of variables, look at the `cfWaitingRoom` object described under the `json_response_enabled` property in other Waiting Room API calls.",default:``}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`preview`,describe:'Creates a waiting room page preview. Upload a custom waiting room page for preview. You will receive a preview URL in the form `http://waitingrooms.dev/preview/<uuid>`. You can use the following query parameters to change the state of the preview: 1. `force_queue`: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website (also known as queueAll). 2. `queue_is_full`: Boolean indicating if the waiting room\'s queue is currently full and not accepting new users at the moment. 3. `queueing_method`: The queueing method currently used by the waiting room. - **fifo** indicates a FIFO queue. - **random** indicates a Random queue. - **passthrough** indicates a Passthrough queue. Keep in mind that the waiting room page will only be displayed if `force_queue=true` or `event=prequeueing` — for other cases the request will pass through to the origin. For our preview, this will be a fake origin website returning \\"Welcome\\". - **reject** indicates a Reject queue. 4. `event`: Used to preview a waiting room event. - **none** indicates no event is occurring. - **prequeueing** indicates that an event is prequeueing (between `prequeue_start_time` and `event_start_time`). - **started** indicates that an event has started (between `event_start_time` and `event_end_time`). 5. `shuffle_at_event_start`: Boolean indicating if the event will shuffle users in the prequeue when it starts. This can only be set to **true** if an event is active (`event` is not **none**). For example, you can make a request to `http://waitingrooms.dev/preview/<uuid>?force_queue=false&queue_is_full=false&queueing_method=random&event=started&shuffle_at_event_start=true` 6. `waitTime`: Non-zero, positive integer indicating the estimated wait time in minutes. The default value is 10 minutes. For example, you can make a request to `http://waitingrooms.dev/preview/<uuid>?waitTime=50` to configure the estimated wait time as 50 minutes.',builder:V,handler:async e=>c({command:`waiting-rooms page preview`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms page preview`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/preview`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({custom_html:f(e[`custom-html`],`custom-html`,`text`)}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Loading`,async()=>t.waitingRooms.page.preview({...r,zone_id:n})),{successLabel:`Loaded`});return}e[`custom-html`]===void 0&&(e[`custom-html`]=await p(`custom-html`,"Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custom_page_html is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge: 1. {{`waitTimeKnown`}} Acts like a boolean value that indicates the behavior to take when wait time is not available, for instance when queue_all is **true**. 2. {{`waitTimeFormatted`}} Estimated wait time for the user. For example, five minutes. Alternatively, you can use: 3. {{`waitTime`}} Number of minutes of estimated wait for a user. 4. {{`waitTimeHours`}} Number of hours of estimated wait for a user (`Math.floor(waitTime/60)`). 5. {{`waitTimeHourMinutes`}} Number of minutes above the `waitTimeHours` value (`waitTime%60`). 6. {{`queueIsFull`}} Changes to **true** when no more people can be added to the queue. To view the full list of variables, look at the `cfWaitingRoom` object described under the `json_response_enabled` property in other Waiting Room API calls."));let c=d({custom_html:f(e[`custom-html`],`custom-html`,`text`)});a(await s(`Loading`,async()=>t.waitingRooms.page.preview({...c,zone_id:n})),{successLabel:`Loaded`})})},U={command:`page`,describe:`Custom HTML waiting page templates and preview rendering`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`action`,{type:`string`,description:`The action to take when the expression matches.`,choices:[`bypass_waiting_room`]}).option(`description`,{type:`string`,description:`The description of the rule.`,default:``}).option(`enabled`,{type:`boolean`,description:`When set to true, the rule is enabled.`,default:!0}).option(`expression`,{type:`string`,description:`Criteria defining when there is a match for the current rule.`}).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 <waiting-room-id>`,describe:`Only available for the Waiting Room Advanced subscription. Creates a rule for a waiting room.`,builder:W,handler:async e=>c({command:`waiting-rooms rules create`,classification:{safeFlags:[`action`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/rules`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({action:f(e.action,`action`,`text`),description:f(e.description,`description`,`text`),enabled:e.enabled,expression:f(e.expression,`expression`,`text`)}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Creating`,async()=>t.waitingRooms.rules.create({body:r,zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Created`});return}e.action===void 0&&(e.action=await m(`action`,`The action to take when the expression matches.`,[`bypass_waiting_room`])),e.expression===void 0&&(e.expression=await p(`expression`,`Criteria defining when there is a match for the current rule.`));let c=d({action:f(e.action,`action`,`text`),description:f(e.description,`description`,`text`),enabled:e.enabled,expression:f(e.expression,`expression`,`text`)});a(await s(`Creating`,async()=>t.waitingRooms.rules.create({body:c,zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Created`})})};function K(e){return e.positional(`rule-id`,{type:`string`,description:`The ID of the rule.`,demandOption:!0}).option(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const q={command:`delete <rule-id>`,describe:`Deletes a rule for a waiting room.`,builder:K,handler:async e=>c({command:`waiting-rooms rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``),"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await h({force:!!e.force})){process.stderr.write(`Aborted.
5
- `);return}a(await s(`Deleting`,async()=>t.waitingRooms.rules.delete({zone_id:n,waiting_room_id:e[`waiting-room-id`],rule_id:e[`rule-id`]})),{successLabel:`Deleted`})})};function J(e){return e.positional(`rule-id`,{type:`string`,description:`The ID of the rule.`,demandOption:!0}).option(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`action`,{type:`string`,description:`The action to take when the expression matches.`,choices:[`bypass_waiting_room`]}).option(`description`,{type:`string`,description:`The description of the rule.`}).option(`enabled`,{type:`boolean`,description:`When set to true, the rule is enabled.`}).option(`expression`,{type:`string`,description:`Criteria defining when there is a match for the current rule.`}).option(`position-index`,{type:`number`,description:`Places the rule in the exact position specified by the integer number <POSITION_NUMBER>. Position numbers start with 1. Existing rules in the ruleset from the specified position number onward are shifted one position (no rule is overwritten).`}).option(`position-before`,{type:`string`,description:`Places the rule before rule <RULE_ID>. Use this argument with an empty rule ID value ("") to set the rule as the first rule in the ruleset.`}).option(`position-after`,{type:`string`,description:`Places the rule after rule <RULE_ID>. Use this argument with an empty rule ID value ("") to set the rule as the last rule in the ruleset.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`position-index`,[`position-before`,`position-after`]).conflicts(`position-before`,[`position-index`,`position-after`]).conflicts(`position-after`,[`position-index`,`position-before`])}const Y={command:`edit <rule-id>`,describe:`Patches a rule for a waiting room.`,builder:J,handler:async e=>c({command:`waiting-rooms rules edit`,classification:{safeFlags:[`action`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``),"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({action:f(e.action,`action`,`text`),description:f(e.description,`description`,`text`),enabled:e.enabled,expression:f(e.expression,`expression`,`text`),position:{index:e[`position-index`],before:f(e[`position-before`],`position-before`,`text`),after:f(e[`position-after`],`position-after`,`text`)}}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Updating`,async()=>t.waitingRooms.rules.edit({...r,zone_id:n,waiting_room_id:e[`waiting-room-id`],rule_id:e[`rule-id`]})),{successLabel:`Updated`});return}e.action===void 0&&(e.action=await m(`action`,`The action to take when the expression matches.`,[`bypass_waiting_room`])),e.expression===void 0&&(e.expression=await p(`expression`,`Criteria defining when there is a match for the current rule.`));let c=d({action:f(e.action,`action`,`text`),description:f(e.description,`description`,`text`),enabled:e.enabled,expression:f(e.expression,`expression`,`text`),position:{index:e[`position-index`],before:f(e[`position-before`],`position-before`,`text`),after:f(e[`position-after`],`position-after`,`text`)}});a(await s(`Updating`,async()=>t.waitingRooms.rules.edit({...c,zone_id:n,waiting_room_id:e[`waiting-room-id`],rule_id:e[`rule-id`]})),{successLabel:`Updated`})})};function X(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`get <waiting-room-id>`,describe:`Lists rules for a waiting room.`,builder:X,handler:async e=>c({command:`waiting-rooms rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/rules`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.waitingRooms.rules.get({zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Loaded`})})};function Q(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ne={command:`update <waiting-room-id>`,describe:`Only available for the Waiting Room Advanced subscription. Replaces all rules for a waiting room.`,builder:Q,handler:async e=>c({command:`waiting-rooms rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/rules`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Updating`,async()=>t.waitingRooms.rules.update({body:r,zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},re={command:`rules`,describe:`Rules that bypass or modify waiting room behavior for specific request patterns`,builder:e=>e.command(G).command(q).command(Y).command(Z).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ie(e){return e.option(`search-engine-crawler-bypass`,{type:`boolean`,description:`Whether to allow verified search engine crawlers to bypass all waiting rooms on this zone.
6
- Verified search engine crawlers will not be tracked or counted by the waiting room system,
7
- and will not appear in waiting room analytics.
8
- `}).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 ae={command:`edit`,describe:`Patch zone-level Waiting Room settings.`,builder:ie,handler:async e=>c({command:`waiting-rooms settings edit`,classification:{safeFlags:[`search-engine-crawler-bypass`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms settings edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({search_engine_crawler_bypass:e[`search-engine-crawler-bypass`]}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Updating`,async()=>t.waitingRooms.settings.edit({body:r,zone_id:n})),{successLabel:`Updated`});return}let c=d({search_engine_crawler_bypass:e[`search-engine-crawler-bypass`]});a(await s(`Updating`,async()=>t.waitingRooms.settings.edit({body:c,zone_id:n})),{successLabel:`Updated`})})};function oe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $={command:`get`,describe:`Get zone-level Waiting Room settings.`,builder:oe,handler:async e=>c({command:`waiting-rooms settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.waitingRooms.settings.get({zone_id:n})),{successLabel:`Loaded`})})};function se(e){return e.option(`search-engine-crawler-bypass`,{type:`boolean`,description:`Whether to allow verified search engine crawlers to bypass all waiting rooms on this zone.
9
- Verified search engine crawlers will not be tracked or counted by the waiting room system,
10
- and will not appear in waiting room analytics.
11
- `}).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 ce={command:`update`,describe:`Replace zone-level Waiting Room settings.`,builder:se,handler:async e=>c({command:`waiting-rooms settings update`,classification:{safeFlags:[`search-engine-crawler-bypass`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({search_engine_crawler_bypass:e[`search-engine-crawler-bypass`]}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Updating`,async()=>t.waitingRooms.settings.update({body:r,zone_id:n})),{successLabel:`Updated`});return}let c=d({search_engine_crawler_bypass:e[`search-engine-crawler-bypass`]});a(await s(`Updating`,async()=>t.waitingRooms.settings.update({body:c,zone_id:n})),{successLabel:`Updated`})})},le={command:`settings`,describe:`Zone-level waiting room defaults and cookie configuration`,builder:e=>e.command(ae).command($).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ue(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`get <waiting-room-id>`,describe:"Fetches the status of a configured waiting room. Response fields include: 1. `status`: String indicating the status of the waiting room. The possible status are: - **not_queueing** indicates that the configured thresholds have not been met and all users are going through to the origin. - **queueing** indicates that the thresholds have been met and some users are held in the waiting room. - **event_prequeueing** indicates that an event is active and is currently prequeueing users before it starts. - **suspended** indicates that the room is suspended. 2. `event_id`: String of the current event's `id` if an event is active, otherwise an empty string. 3. `estimated_queued_users`: Integer of the estimated number of users currently waiting in the queue. 4. `estimated_total_active_users`: Integer of the estimated number of users currently active on the origin. 5. `max_estimated_time_minutes`: Integer of the maximum estimated time currently presented to the users.",builder:ue,handler:async e=>c({command:`waiting-rooms statuses get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms statuses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/status`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.waitingRooms.statuses.get({zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Loaded`})})},fe={command:`statuses`,describe:`Real-time queue status showing active users, queued users, and estimated wait times`,builder:e=>e.command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pe(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`additional-routes`,{type:`string`,description:`Only available for the Waiting Room Advanced subscription. Additional hostname and path combinations to which this waiting room will be applied. There is an implied wildcard at the end of the path. The hostname and path combination must be unique to this and all other waiting rooms. Provide as a JSON array of objects or @path/to/file.json.`}).option(`cookie-attributes-samesite`,{type:`string`,description:"Configures the SameSite attribute on the waiting room cookie. Value `auto` will be translated to `lax` or `none` depending if **Always Use HTTPS** is enabled. Note that when using value `none`, the secure attribute cannot be set to `never`.",choices:[`auto`,`lax`,`none`,`strict`]}).option(`cookie-attributes-secure`,{type:`string`,description:"Configures the Secure attribute on the waiting room cookie. Value `always` indicates that the Secure attribute will be set in the Set-Cookie header, `never` indicates that the Secure attribute will not be set, and `auto` will set the Secure attribute depending if **Always Use HTTPS** is enabled.",choices:[`auto`,`always`,`never`]}).option(`cookie-suffix`,{type:`string`,description:"Appends a '_' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(__cf_waitingroom). If `cookie_suffix` is \"abcd\", the cookie name will be `__cf_waitingroom_abcd`. This field is required if using `additional_routes`."}).option(`custom-page-html`,{type:`string`,description:"Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custom_page_html is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:\n1. {{`waitTimeKnown`}} Acts like a boolean value that indicates the behavior to take when wait time is not available, for instance when queue_all is **true**.\n2. {{`waitTimeFormatted`}} Estimated wait time for the user. For example, five minutes. Alternatively, you can use:\n3. {{`waitTime`}} Number of minutes of estimated wait for a user.\n4. {{`waitTimeHours`}} Number of hours of estimated wait for a user (`Math.floor(waitTime/60)`).\n5. {{`waitTimeHourMinutes`}} Number of minutes above the `waitTimeHours` value (`waitTime%60`).\n6. {{`queueIsFull`}} Changes to **true** when no more people can be added to the queue.\n\nTo view the full list of variables, look at the `cfWaitingRoom` object described under the `json_response_enabled` property in other Waiting Room API calls."}).option(`default-template-language`,{type:`string`,description:"The language of the default page template. If no default_template_language is provided, then `en-US` (English) will be used.",choices:`en-US.es-ES.de-DE.fr-FR.it-IT.ja-JP.ko-KR.pt-BR.zh-CN.zh-TW.nl-NL.pl-PL.id-ID.tr-TR.ar-EG.ru-RU.fa-IR.bg-BG.hr-HR.cs-CZ.da-DK.fi-FI.lt-LT.ms-MY.nb-NO.ro-RO.el-GR.he-IL.hi-IN.hu-HU.sr-BA.sk-SK.sl-SI.sv-SE.tl-PH.th-TH.uk-UA.vi-VN`.split(`.`)}).option(`description`,{type:`string`,description:`A note that you can use to add more details about the waiting room.`}).option(`disable-session-renewal`,{type:`boolean`,description:"Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If `true`, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. If `false`, a user's session cookie will be automatically renewed on every request."}).option(`enabled-origin-commands`,{type:`string`,array:!0,description:`A list of enabled origin commands.`}).option(`host`,{type:`string`,description:`The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.`}).option(`json-response-enabled`,{type:`boolean`,description:'Only available for the Waiting Room Advanced subscription. If `true`, requests to the waiting room with the header `Accept: application/json` will receive a JSON response object with information on the user\'s status in the waiting room as opposed to the configured static HTML page. This JSON response object has one property `cfWaitingRoom` which is an object containing the following fields:\n1. `inWaitingRoom`: Boolean indicating if the user is in the waiting room (always **true**).\n2. `waitTimeKnown`: Boolean indicating if the current estimated wait times are accurate. If **false**, they are not available.\n3. `waitTime`: Valid only when `waitTimeKnown` is **true**. Integer indicating the current estimated time in minutes the user will wait in the waiting room. When `queueingMethod` is **random**, this is set to `waitTime50Percentile`.\n4. `waitTime25Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile).\n5. `waitTime50Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website before `waitTime50Percentile` and half are expected to be let in after it.\n6. `waitTime75Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile).\n7. `waitTimeFormatted`: String displaying the `waitTime` formatted in English for users. If `waitTimeKnown` is **false**, `waitTimeFormatted` will display **unavailable**.\n8. `queueIsFull`: Boolean indicating if the waiting room\'s queue is currently full and not accepting new users at the moment.\n9. `queueAll`: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website.\n10. `lastUpdated`: String displaying the timestamp as an ISO 8601 string of the user\'s last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt after `refreshIntervalSeconds` past this time. If the user makes a request too soon, it will be ignored and `lastUpdated` will not change.\n11. `refreshIntervalSeconds`: Integer indicating the number of seconds after `lastUpdated` until the user is able to make another attempt to leave the waiting room and be let into the origin website. When the `queueingMethod` is `reject`, there is no specified refresh time —\\_it will always be **zero**.\n12. `queueingMethod`: The queueing method currently used by the waiting room. It is either **fifo**, **random**, **passthrough**, or **reject**.\n13. `isFIFOQueue`: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue.\n14. `isRandomQueue`: Boolean indicating if the waiting room uses a Random queue where users gain access randomly.\n15. `isPassthroughQueue`: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist when `queueAll` is **true** or `isEventPrequeueing` is **true** because in all other cases requests will go directly to the origin.\n16. `isRejectQueue`: Boolean indicating if the waiting room uses a reject queue.\n17. `isEventActive`: Boolean indicating if an event is currently occurring. Events are able to change a waiting room\'s behavior during a specified period of time. For additional information, look at the event properties `prequeue_start_time`, `event_start_time`, and `event_end_time` in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists.\n18. `isEventPrequeueing`: Valid only when `isEventActive` is **true**. Boolean indicating if an event is currently prequeueing users before it starts.\n19. `timeUntilEventStart`: Valid only when `isEventPrequeueing` is **true**. Integer indicating the number of minutes until the event starts.\n20. `timeUntilEventStartFormatted`: String displaying the `timeUntilEventStart` formatted in English for users. If `isEventPrequeueing` is **false**, `timeUntilEventStartFormatted` will display **unavailable**.\n21. `timeUntilEventEnd`: Valid only when `isEventActive` is **true**. Integer indicating the number of minutes until the event ends.\n22. `timeUntilEventEndFormatted`: String displaying the `timeUntilEventEnd` formatted in English for users. If `isEventActive` is **false**, `timeUntilEventEndFormatted` will display **unavailable**.\n23. `shuffleAtEventStart`: Valid only when `isEventActive` is **true**. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts.\n24. `turnstile`: Empty when turnstile isn\'t enabled. String displaying an html tag to display the Turnstile widget. Please add the `{{{turnstile}}}` tag to the `custom_html` template to ensure the Turnstile widget appears.\n25. `infiniteQueue`: Boolean indicating whether the response is for a user in the infinite queue.\n\nAn example cURL to a waiting room could be:\n\n curl -X GET "https://example.com/waitingroom" \\\n -H "Accept: application/json"\n\nIf `json_response_enabled` is **true** and the request hits the waiting room, an example JSON response when `queueingMethod` is **fifo** and no event is active could be:\n\n {\n "cfWaitingRoom": {\n "inWaitingRoom": true,\n "waitTimeKnown": true,\n "waitTime": 10,\n "waitTime25Percentile": 0,\n "waitTime50Percentile": 0,\n "waitTime75Percentile": 0,\n "waitTimeFormatted": "10 minutes",\n "queueIsFull": false,\n "queueAll": false,\n "lastUpdated": "2020-08-03T23:46:00.000Z",\n "refreshIntervalSeconds": 20,\n "queueingMethod": "fifo",\n "isFIFOQueue": true,\n "isRandomQueue": false,\n "isPassthroughQueue": false,\n "isRejectQueue": false,\n "isEventActive": false,\n "isEventPrequeueing": false,\n "timeUntilEventStart": 0,\n "timeUntilEventStartFormatted": "unavailable",\n "timeUntilEventEnd": 0,\n "timeUntilEventEndFormatted": "unavailable",\n "shuffleAtEventStart": false\n }\n }\n\nIf `json_response_enabled` is **true** and the request hits the waiting room, an example JSON response when `queueingMethod` is **random** and an event is active could be:\n\n {\n "cfWaitingRoom": {\n "inWaitingRoom": true,\n "waitTimeKnown": true,\n "waitTime": 10,\n "waitTime25Percentile": 5,\n "waitTime50Percentile": 10,\n "waitTime75Percentile": 15,\n "waitTimeFormatted": "5 minutes to 15 minutes",\n "queueIsFull": false,\n "queueAll": false,\n "lastUpdated": "2020-08-03T23:46:00.000Z",\n "refreshIntervalSeconds": 20,\n "queueingMethod": "random",\n "isFIFOQueue": false,\n "isRandomQueue": true,\n "isPassthroughQueue": false,\n "isRejectQueue": false,\n "isEventActive": true,\n "isEventPrequeueing": false,\n "timeUntilEventStart": 0,\n "timeUntilEventStartFormatted": "unavailable",\n "timeUntilEventEnd": 15,\n "timeUntilEventEndFormatted": "15 minutes",\n "shuffleAtEventStart": true\n }\n }'}).option(`name`,{type:`string`,description:`A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`new-users-per-minute`,{type:`number`,description:`Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.`}).option(`path`,{type:`string`,description:`Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.`}).option(`queue-all`,{type:`boolean`,description:"If queue_all is `true`, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable."}).option(`queueing-method`,{type:`string`,description:"Sets the queueing method used by the waiting room. Changing this parameter from the **default** queueing method is only available for the Waiting Room Advanced subscription. Regardless of the queueing method, if `queue_all` is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are:\n1. `fifo` **(default)**: First-In-First-Out queue where customers gain access in the order they arrived.\n2. `random`: Random queue where customers gain access randomly, regardless of arrival time.\n3. `passthrough`: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (with `suspended`) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa.\n4. `reject`: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room uses `reject`, and its events override this with `fifo`, `random`, or `passthrough`. When this queueing method is enabled and neither `queueAll` is enabled nor an event is prequeueing, the waiting room page **will not refresh automatically**.",choices:[`fifo`,`random`,`passthrough`,`reject`]}).option(`queueing-status-code`,{type:`number`,description:`HTTP status code returned to a user while in the queue.`}).option(`session-duration`,{type:`number`,description:`Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.`}).option(`suspended`,{type:`boolean`,description:"Suspends or allows traffic going to the waiting room. If set to `true`, the traffic will not go to the waiting room."}).option(`total-active-users`,{type:`number`,description:`Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.`}).option(`turnstile-action`,{type:`string`,description:"Which action to take when a bot is detected using Turnstile. `log` will\nhave no impact on queueing behavior, simply keeping track of how many\nbots are detected in Waiting Room Analytics. `infinite_queue` will send\nbots to a false queueing state, where they will never reach your\norigin. `infinite_queue` requires Advanced Waiting Room.\n",choices:[`log`,`infinite_queue`]}).option(`turnstile-mode`,{type:`string`,description:"Which Turnstile widget type to use for detecting bot traffic. See\n[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)\nfor the definitions of these widget types. Set to `off` to disable the\nTurnstile integration entirely. Setting this to anything other than\n`off` or `invisible` requires Advanced Waiting Room.\n",choices:[`off`,`invisible`,`visible_non_interactive`,`visible_managed`]}).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 me={command:`update <waiting-room-id>`,describe:`Updates a configured waiting room.`,builder:pe,handler:async e=>c({command:`waiting-rooms update`,classification:{safeFlags:[`cookie-attributes-samesite`,`cookie-attributes-secure`,`default-template-language`,`disable-session-renewal`,`json-response-enabled`,`queue-all`,`queueing-method`,`suspended`,`turnstile-action`,`turnstile-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf waiting-rooms update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({additional_routes:u(e[`additional-routes`],`additional-routes`),cookie_attributes:{samesite:f(e[`cookie-attributes-samesite`],`cookie-attributes-samesite`,`text`),secure:f(e[`cookie-attributes-secure`],`cookie-attributes-secure`,`text`)},cookie_suffix:f(e[`cookie-suffix`],`cookie-suffix`,`text`),custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),default_template_language:f(e[`default-template-language`],`default-template-language`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],enabled_origin_commands:e[`enabled-origin-commands`],host:f(e.host,`host`,`text`),json_response_enabled:e[`json-response-enabled`],name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],path:f(e.path,`path`,`text`),queue_all:e[`queue-all`],queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),queueing_status_code:e[`queueing-status-code`],session_duration:e[`session-duration`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Updating`,async()=>t.waitingRooms.update({body:r,zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Updated`});return}if(e.host===void 0&&(e.host=await p(`host`,`The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.`)),e.name===void 0&&(e.name=await p(`name`,`A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.`)),e[`new-users-per-minute`]===void 0)throw Error(`--new-users-per-minute is required (or pass --body with this field set).`);if(e[`total-active-users`]===void 0)throw Error(`--total-active-users is required (or pass --body with this field set).`);let c=d({additional_routes:u(e[`additional-routes`],`additional-routes`),cookie_attributes:{samesite:f(e[`cookie-attributes-samesite`],`cookie-attributes-samesite`,`text`),secure:f(e[`cookie-attributes-secure`],`cookie-attributes-secure`,`text`)},cookie_suffix:f(e[`cookie-suffix`],`cookie-suffix`,`text`),custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),default_template_language:f(e[`default-template-language`],`default-template-language`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],enabled_origin_commands:e[`enabled-origin-commands`],host:f(e.host,`host`,`text`),json_response_enabled:e[`json-response-enabled`],name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],path:f(e.path,`path`,`text`),queue_all:e[`queue-all`],queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),queueing_status_code:e[`queueing-status-code`],session_duration:e[`session-duration`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)});a(await s(`Updating`,async()=>t.waitingRooms.update({body:c,zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Updated`})})},he={command:`waiting-rooms`,describe:`Virtual queues that throttle traffic to your site during peak demand with customizable waiting pages`,builder:e=>e.command(y).command(x).command(C).command(B).command(me).command(_).command(z).command(U).command(re).command(le).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{he as default};
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import{l as e}from"./src-C8phrg-8.mjs";import{a as t,o as n}from"./theme-CeVf-5qG.mjs";import"./ui-DQSZeaG5.mjs";import{t as r}from"./local-C6XsFD_W.mjs";import{f as i,g as a,m as o}from"./oauth-DH3kMXSs.mjs";import{n as s}from"./dist-DW5BPGFs.mjs";import{i as c,r as l}from"./auth-tvDdC1J-.mjs";import{t as u}from"./output-COcSQsfn.mjs";import{t as d}from"./dry-run-DiVy1lVo.mjs";import{t as f}from"./progress-V6SZV3Ux.mjs";import{r as p,t as m}from"./run-CRfinkSe.mjs";import"./telemetry-Ch1vCICm.mjs";import{n as h,r as g,t as _}from"./body-parser-DIlfApuJ.mjs";import{n as v}from"./input-validation-BxchZ9jE.mjs";import{i as ee,n as y}from"./prompt-DjRTpML4.mjs";import{t as b}from"./cli-types-CrSoSMPF.mjs";import{E as x}from"./dist-Cp3uJN1x.mjs";import{r as S}from"./dist-BCVqQpg2.mjs";import{i as C,n as w,r as T,t as E}from"./shared-YJtB5KZB.mjs";import{n as D,r as O}from"./build-0QlYUfFS.mjs";import{r as k}from"./deploy-input-C7W1Bsji.mjs";var A=e(`check`,`Profile a Worker's startup performance`,()=>import(`./command-CMzMsll4.mjs`),{command:`workers check`,classification:{safeFlags:[`prebuilt`]}});function j(e){return e.option(`prebuilt`,{type:`boolean`,description:`Use existing Build Output Specification files without building`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Run checks without applying triggers`,default:!1})}const M={command:`deploy`,describe:`Apply triggers (Routes, Workflows, Cron triggers etc.)`,builder:j,handler:async e=>{e.prebuilt||(await D(e.mode),s.message(``,{spacing:0}));let{workers:{default:r},rootConfig:a}=await S(process.cwd()),{wranglerConfig:o}=O(r,a),l=await c(),u=await i();C(x(l)),s.message(t.bold(`Deploy triggers`),{symbol:n.dim(`├`),spacing:0}),await T(k(r,o,u,e)),s.success(e[`dry-run`]?`Dry run complete`:`Trigger deploy complete`)}},N={command:`triggers`,describe:`Manage triggers (Routes, Workflows, Cron triggers etc.)`,builder:e=>e.command(p(M,{command:`workers triggers deploy`,classification:{safeFlags:[`dry-run`,`prebuilt`]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.positional(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const F={command:`delete <worker-id>`,describe:`Delete a Worker and all its associated resources (versions, deployments, etc.).`,builder:P,handler:async e=>m({command:`workers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){d({command:`cf workers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await a()??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``)},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await i();if(e.accountId=n,!await y({force:!!e.force,message:`This will permanently delete the Worker and its associated versions and deployments.`})){process.stderr.write(`Aborted.
3
- `);return}u(await f(`Deleting`,async()=>t.workers.delete({account_id:n,worker_id:e[`worker-id`]})),{successLabel:`Deleted`})})};function I(e){return e.option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).option(`force`,{type:`boolean`,description:`If set to true, the deployment will be created even if normally blocked by something such rolling back to an older version when a secret has changed.`}).option(`strategy`,{type:`string`,description:`The strategy field`,choices:[`percentage`]}).option(`versions`,{type:`string`,description:'Worker versions included in this deployment. Each object must contain a `version_id` UUID and a `percentage`; percentages across all objects must total 100. In the `cf` CLI, pass the entire array as one JSON value to `--versions`, either inline, for example `--versions \'[{"version_id":"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f","percentage":100}]\'`, or from a JSON file with `--versions @versions.json`. Provide as a JSON array of objects or @path/to/file.json.'}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const L={command:`create`,describe:`Deployments configure how [Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions) are deployed to traffic. A deployment can consist of multiple versions of a Worker.`,builder:I,handler:async e=>m({command:`workers deployments create`,classification:{safeFlags:[`force`,`strategy`,`dry-run`]}},e,async()=>{let t={force:e.force};if(e.dryRun){d({command:`cf workers deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await a()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments`,pathParams:{"script-name":String(e[`script-name`]??``)},query:t,bodyKind:`json`,body:e.body===void 0?_({strategy:v(e.strategy,`strategy`,`text`),versions:g(e.versions,`versions`)}):h(e.body)});return}let n=await l(e),s=e.local?r:await i();e.accountId=s;let c=o({scriptName:e.worker});if(e.worker=c,e.body){let r=h(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u(await f(`Creating`,async()=>n.workers.deployments.create({body:r,account_id:s,script_name:c,...t})),{successLabel:`Created`});return}if(e.strategy===void 0&&(e.strategy=await ee(`strategy`,`The strategy field`,[`percentage`])),e.versions===void 0)throw Error(`--versions is required (or pass --body with this field set).`);let p=_({strategy:v(e.strategy,`strategy`,`text`),versions:g(e.versions,`versions`)});new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u(await f(`Creating`,async()=>n.workers.deployments.create({body:p,account_id:s,script_name:c,...t})),{successLabel:`Created`})})};function R(e){return e.positional(`deployment-id`,{type:`string`,description:`Deployment ID`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const z={command:`delete <deployment-id>`,describe:`Delete a Worker Deployment. The latest deployment, which is actively serving traffic, cannot be deleted. All other deployments can be deleted.`,builder:R,handler:async e=>m({command:`workers deployments delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){d({command:`cf workers deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await a()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await i();e.accountId=n;let s=o({scriptName:e.worker});if(e.worker=s,!await y({force:!!e.force,message:`This will permanently delete the Worker deployment.`})){process.stderr.write(`Aborted.
4
- `);return}u(await f(`Deleting`,async()=>t.workers.deployments.delete({account_id:n,script_name:s,deployment_id:e[`deployment-id`]})),{successLabel:`Deleted`})})};function B(e){return e.positional(`deployment-id`,{type:`string`,description:`Deployment ID`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`get <deployment-id>`,describe:`Get information about a Worker Deployment.`,builder:B,handler:async e=>m({command:`workers deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){d({command:`cf workers deployments get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await a()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await i();e.accountId=n;let s=o({scriptName:e.worker});e.worker=s,u(await f(`Loading`,async()=>t.workers.deployments.get({account_id:n,script_name:s,deployment_id:e[`deployment-id`]})),{successLabel:`Loaded`})})};function H(e){return e.option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).option(`since`,{type:`string`,description:`Start of the deployment creation time range, inclusive.`}).option(`until`,{type:`string`,description:`End of the deployment creation time range, inclusive.`}).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`list`,describe:`List Worker deployments. The first deployment in the list is the latest deployment actively serving traffic.`,builder:H,handler:async e=>m({command:`workers deployments list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={since:e.since,until:e.until,page:e.page,per_page:e[`per-page`]};if(e.dryRun){d({command:`cf workers deployments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await a()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments`,pathParams:{"script-name":String(e[`script-name`]??``)},query:t,bodyKind:`none`});return}let n=await l(e),s=e.local?r:await i();e.accountId=s;let c=o({scriptName:e.worker});e.worker=c,u(await f(`Loading`,async()=>n.workers.deployments.list({account_id:s,script_name:c,...t})),{successLabel:`Loaded`})})},W={command:`deployments`,describe:`Operations for deployments`,builder:e=>e.command(L).command(z).command(V).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(e){return e.positional(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`get <worker-id>`,describe:`Get details about a specific Worker.`,builder:te,handler:async e=>m({command:`workers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){d({command:`cf workers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await a()??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``)},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await i();e.accountId=n,u(await f(`Loading`,async()=>t.workers.get({account_id:n,worker_id:e[`worker-id`]})),{successLabel:`Loaded`})})};function K(e){return e.option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`order-by`,{type:`string`,description:`Property to sort results by.`,choices:[`deployed_on`,`updated_on`,`created_on`,`name`]}).option(`order`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`list`,describe:`List all Workers for an account.`,builder:b(K),handler:async e=>m({command:`workers list`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`],order_by:e[`order-by`],order:e.order};if(e.dryRun){d({command:`cf workers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await a()??`<account-id>`}/workers/workers`,pathParams:{},query:t,bodyKind:`none`});return}let n=await l(e),o=e.local?r:await i();e.accountId=o,u(await f(`Loading`,async()=>n.workers.list({account_id:o,...t})),{successLabel:`Loaded`})})};function J(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`list`,describe:`Returns a list of available placement regions organized by cloud provider. These regions can be used to configure Smart Placement for Workers.`,builder:J,handler:async e=>m({command:`workers placement regions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){d({command:`cf workers placement regions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await a()??`<account-id>`}/workers/placement/regions`,pathParams:{},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await i();e.accountId=n,u(await f(`Loading`,async()=>t.workers.placement.regions.list({account_id:n})),{successLabel:`Loaded`})})},X={command:`regions`,describe:`Operations for placement.regions`,builder:e=>e.command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Z={command:`placement`,describe:`Operations for placement`,builder:e=>e.command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Q(e){return e.option(`name`,{type:`string`,description:`Worker name to search for. Both exact and partial matches are returned.`}).option(`id`,{type:`string`,description:`Worker ID (also called tag) to search for. Only exact matches are returned.`}).option(`order-by`,{type:`string`,description:`Property to sort results by. Results are sorted in ascending order.`,choices:[`created_on`,`modified_on`,`name`]}).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`search`,describe:`Search for Worker scripts in an account.`,builder:b(Q),handler:async e=>m({command:`workers scripts search`,classification:{safeFlags:[`order-by`,`dry-run`]}},e,async()=>{let t={name:e.name,id:e.id,order_by:e[`order-by`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){d({command:`cf workers scripts search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await a()??`<account-id>`}/workers/scripts-search`,pathParams:{},query:t,bodyKind:`none`});return}let n=await l(e),o=e.local?r:await i();e.accountId=o,u(await f(`Loading`,async()=>n.workers.scripts.search({account_id:o,...t})),{successLabel:`Loaded`})})},re={command:`scripts`,describe:`Operations for scripts`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ie(e){return e.positional(`secret-name`,{type:`string`,description:`A JavaScript variable name for the secret binding.`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).option(`url-encoded`,{type:`boolean`,description:`Flag that indicates whether the secret name is URL encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ae={command:`delete <secret-name>`,describe:`Remove a secret from a Worker script by creating a new version without that secret. When changing more than one secret at a time, prefer the "Patch multiple script secrets" API instead of changing many secrets individually.`,builder:ie,handler:async e=>m({command:`workers secrets delete`,classification:{safeFlags:[`url-encoded`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={url_encoded:e[`url-encoded`]};if(e.dryRun){d({command:`cf workers secrets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await a()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:t,bodyKind:`none`});return}let n=await l(e),s=e.local?r:await i();e.accountId=s;let c=o({scriptName:e.worker});if(e.worker=c,!await y({force:!!e.force,message:`This will permanently delete the Worker script secret.`})){process.stderr.write(`Aborted.
5
- `);return}u(await f(`Deleting`,async()=>n.workers.secrets.delete({account_id:s,script_name:c,secret_name:e[`secret-name`],...t})),{successLabel:`Deleted`})})};function oe(e){return e.positional(`secret-name`,{type:`string`,description:`A JavaScript variable name for the secret binding.`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).option(`url-encoded`,{type:`boolean`,description:`Flag that indicates whether the secret name is URL encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get <secret-name>`,describe:`Get a given secret binding (value omitted) on a Worker script.`,builder:oe,handler:async e=>m({command:`workers secrets get`,classification:{safeFlags:[`url-encoded`,`dry-run`]}},e,async()=>{let t={url_encoded:e[`url-encoded`]};if(e.dryRun){d({command:`cf workers secrets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await a()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:t,bodyKind:`none`});return}let n=await l(e),s=e.local?r:await i();e.accountId=s;let c=o({scriptName:e.worker});e.worker=c,u(await f(`Loading`,async()=>n.workers.secrets.get({account_id:s,script_name:c,secret_name:e[`secret-name`],...t})),{successLabel:`Loaded`})})};function ce(e){return e.option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script, used in URLs and route configuration.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`list`,describe:`List the names of secrets bound to a Worker script.`,builder:ce,handler:async e=>m({command:`workers secrets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){d({command:`cf workers secrets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await a()??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await i();e.accountId=n;let s=o({scriptName:e.worker});e.worker=s,u(await f(`Loading`,async()=>t.workers.secrets.list({account_id:n,script_name:s})),{successLabel:`Loaded`})})},ue={command:`secrets`,describe:`Operations for secrets`,builder:e=>e.command(ae).command(se).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function de(e){return w(e).option(`preview-alias`,{type:`string`,description:`Preview alias for this Worker Version`,requiresArg:!0})}var fe=p({command:`create`,describe:`Upload a new Worker Version without deploying it`,builder:de,handler:async e=>{await E(e,{command:`Version upload`})}},{command:`workers versions create`,classification:{safeFlags:[`dry-run`,`prebuilt`]}});function pe(e){return e.positional(`version-id`,{type:`string`,description:`Identifier for the version, which can be a UUID, a UUID prefix (minimum length 8), or the literal "latest" to operate on the most recently created version.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const $={command:`delete <version-id>`,describe:`Delete a Worker version.`,builder:pe,handler:async e=>m({command:`workers versions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){d({command:`cf workers versions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await a()??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},bodyKind:`none`});return}let t=await l(e),n=e.local?r:await i();if(e.accountId=n,!await y({force:!!e.force,message:`This will permanently delete the Worker version.`})){process.stderr.write(`Aborted.
6
- `);return}u(await f(`Deleting`,async()=>t.workers.versions.delete({account_id:n,worker_id:e[`worker-id`],version_id:e[`version-id`]})),{successLabel:`Deleted`})})};function me(e){return e.positional(`version-id`,{type:`string`,description:`Identifier for the version, which can be a UUID, a UUID prefix (minimum length 8), or the literal "latest" to operate on the most recently created version.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`include`,{type:`string`,description:"Whether to include the `modules` property of the version in the response, which contains code and sourcemap content and may add several megabytes to the response size.",choices:[`modules`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`get <version-id>`,describe:`Get details about a specific Worker version.`,builder:b(me),handler:async e=>m({command:`workers versions get`,classification:{safeFlags:[`include`,`dry-run`]}},e,async()=>{let t={include:e.include};if(e.dryRun){d({command:`cf workers versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await a()??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},query:t,bodyKind:`none`});return}let n=await l(e),o=e.local?r:await i();e.accountId=o,u(await f(`Loading`,async()=>n.workers.versions.get({account_id:o,worker_id:e[`worker-id`],version_id:e[`version-id`],...t})),{successLabel:`Loaded`})})};function ge(e){return e.option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`list`,describe:`List all versions for a Worker.`,builder:ge,handler:async e=>m({command:`workers versions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){d({command:`cf workers versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await a()??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions`,pathParams:{"worker-id":String(e[`worker-id`]??``)},query:t,bodyKind:`none`});return}let n=await l(e),o=e.local?r:await i();e.accountId=o,u(await f(`Loading`,async()=>n.workers.versions.list({account_id:o,worker_id:e[`worker-id`],...t})),{successLabel:`Loaded`})})},ve={command:`versions`,describe:`Operations for versions`,builder:e=>e.command(fe).command($).command(he).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ye={command:`workers`,describe:`workers`,builder:e=>e.command(A).command(F).command(G).command(q).command(W).command(Z).command(re).command(ue).command(N).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ye as default};
File without changes
File without changes
File without changes